|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.buffalo.fs7.mathlib.MathObject
|
+--edu.buffalo.fs7.mathlib.Argument
|
+--edu.buffalo.fs7.mathlib.Vect
Class representing a mathematical vector. The string representation of the default vector is given by [a b c]. The default vector therefore is a dual vector. A normal vector is created by parsing [a b c]' or calling the constructor followed by a transpose() operation.
Braket| Field Summary | |
protected Complex[] |
data
holds the components. |
int |
dimension
holds the dimension |
protected boolean |
transpose
holds the information whether or not the vector is transposed. |
| Fields inherited from class edu.buffalo.fs7.mathlib.MathObject |
mathlib |
| Constructor Summary | |
Vect()
generates a vector of dimension 0. |
|
Vect(int dimension)
generates a 0-vector of dimension dimension |
|
Vect(MathObject o)
clone constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
clones the vector. |
void |
conjugate()
conjugates the vector |
boolean |
equals(MathObject o)
equality predicate |
Complex |
getElement(int x)
returns the component of the vector specified by x. |
void |
negative()
negates the vector |
static Vect |
parseVector(java.lang.String str)
parses the vect object from a string. |
java.lang.String |
toParseableString()
returns a parseable representation of the object |
java.lang.String |
toString()
returns a string representation of the object (not necessarily parseable). |
void |
transpose()
transposes the vector |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Complex[] data
getElement(int)protected boolean transpose
public int dimension
| Constructor Detail |
public Vect()
public Vect(int dimension)
dimension - the dimension of the vectorpublic Vect(MathObject o)
| Method Detail |
public java.lang.Object clone()
clone in class MathObjectVect(MathObject)
public static Vect parseVector(java.lang.String str)
throws java.lang.NumberFormatException,
java.lang.IllegalArgumentException
str - string of the form [a b c]public void transpose()
public void conjugate()
public void negative()
public boolean equals(MathObject o)
equals in class Argumentpublic Complex getElement(int x)
x - number of component starting with 0public java.lang.String toString()
MathObjecttoString in class MathObjectpublic java.lang.String toParseableString()
MathObjecttoParseableString in class MathObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||