All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----acg.stuttgart.rich.vector.VectorND
| Summary | 
public abstract class  VectorND
     extends java.lang.Object
{
          // Fields 1
     protected int dimension;
          // Constructors 1
     public VectorND(int);
          // Methods 11
     public static float[] add(float[], float[]) throws VectorNDException;
     public static float[] copy(float[]);
     public static float inner(float[], float[]) throws VectorNDException;
     public static float magnatude(float[]);
     public static float[] multiply(float[], float);
     public static float[][] outer(float[], float[]) throws VectorNDException;
     public static float[] subtract(float[], float[]) throws VectorNDException;
     public static String toString(float[]);
     public int getDimension();
     public abstract float[] toArray();
     public String toString();
}
The VectorND class is the abstract base class for the Vector2D and Vector3D classes, and also provides static methods for performing vector operations on arbitrary length arrays.
| Cross Reference | 
| Fields | 
· dimension |  Summary | Top | 
protected int dimension
| Constructors | 
· VectorND |  Summary | Top | 
public VectorND(int d)
Constructor
| Methods | 
· getDimension |  Summary | Top | 
public int getDimension()
Returns the dimension of a subclass of VectorND.
· toArray |  Summary | Top | 
public abstract float[] toArray()
Convert the vector to an array.
· toString |  Summary | Top | 
public String toString()
Convert this vector to a string
- Overrides:
 - toString in class Object
 
· toString |  Summary | Top | 
public static String toString(float[] a)
Static toString method.
· copy |  Summary | Top | 
public static float[] copy(float[] a)
Copy the contents of an arbitrary length vector.
· magnatude |  Summary | Top | 
public static float magnatude(float[] a)
The magnatude method computes the magnatude of an arbitrary length vector.
· add |  Summary | Top | 
   public static float[] add(float[] a, 
                             float[] b)  throws VectorNDException
Compute vector a + b
· subtract |  Summary | Top | 
   public static float[] subtract(float[] a, 
                                  float[] b)  throws VectorNDException
Compute vector a - b
· multiply |  Summary | Top | 
   public static float[] multiply(float[] a, 
                                  float s) 
Compute a*s, where s is scalar
· inner |  Summary | Top | 
   public static float inner(float[] a, 
                             float[] b)  throws VectorNDException
Compute inner (dot) product of vectors a and b.
· outer |  Summary | Top | 
   public static float[][] outer(float[] a, 
                                 float[] b)  throws VectorNDException
Compute outer product of two vectors. Note: this results in a square matrix of dimension
a.length
Parameter Description a An array representing the first vector. b An array representing the second vector. 
- Returns:
 - The matrix resulting from the outer product of the two vectors.
 
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7