|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.vectors.MathVector
JSci.maths.vectors.AbstractDoubleVector
JSci.maths.vectors.Double3Vector
An optimised implementation of a 3D double vector.
| Field Summary | |
protected double |
x
|
protected double |
y
|
protected double |
z
|
| Fields inherited from class JSci.maths.vectors.MathVector |
N |
| Constructor Summary | |
Double3Vector()
Constructs an empty 3-vector. |
|
Double3Vector(double[] array)
Constructs a 3-vector. |
|
Double3Vector(double x,
double y,
double z)
Constructs a 3-vector. |
|
| Method Summary | |
AbelianGroup.Member |
add(AbelianGroup.Member vec)
Returns the addition of this vector and another. |
AbstractDoubleVector |
add(AbstractDoubleVector vec)
Returns the addition of this vector and another. |
boolean |
equals(java.lang.Object obj)
Compares two double vectors for equality. |
double |
getComponent(int n)
Returns a component of this vector. |
double |
infNorm()
Returns the l -norm. |
AbstractDoubleVector |
mapComponents(Mapping mapping)
Applies a function on all the vector components. |
Double3Vector |
multiply(Double3Vector vec)
Returns the vector product of this vector and another (so(3) algebra). |
AbelianGroup.Member |
negate()
Returns the negative of this vector. |
double |
norm()
Returns the l2-norm (magnitude). |
double |
norm(int n)
Returns the ln-norm. |
AbstractDoubleVector |
scalarDivide(double k)
Returns the division of this vector by a scalar. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this vector by a scalar. |
AbstractDoubleVector |
scalarMultiply(double k)
Returns the multiplication of this vector by a scalar. |
Module.Member |
scalarMultiply(Ring.Member x)
Returns the multiplication of this vector by a scalar. |
double |
scalarProduct(AbstractDoubleVector vec)
Returns the scalar product of this vector and another. |
void |
setComponent(int n,
double value)
Sets the value of a component of this vector. |
AbelianGroup.Member |
subtract(AbelianGroup.Member vec)
Returns the subtraction of this vector by another. |
AbstractDoubleVector |
subtract(AbstractDoubleVector vec)
Returns the subtraction of this vector by another. |
AbstractComplexVector |
toComplexVector()
Converts this 3-vector to a complex 3-vector. |
AbstractIntegerVector |
toIntegerVector()
Converts this 3-vector to an integer 3-vector. |
java.lang.String |
toString()
Returns a comma delimited string representing the value of this vector. |
| Methods inherited from class JSci.maths.vectors.AbstractDoubleVector |
hashCode, mass, normalize |
| Methods inherited from class JSci.maths.vectors.MathVector |
dimension, getInvalidComponentMsg |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double x
protected double y
protected double z
| Constructor Detail |
public Double3Vector()
public Double3Vector(double x,
double y,
double z)
x - x coordinate.y - y coordinate.z - z coordinate.public Double3Vector(double[] array)
| Method Detail |
public boolean equals(java.lang.Object obj)
equals in class AbstractDoubleVectorobj - a double 3-vectorpublic java.lang.String toString()
toString in class AbstractDoubleVectorpublic AbstractIntegerVector toIntegerVector()
public AbstractComplexVector toComplexVector()
public double getComponent(int n)
getComponent in class AbstractDoubleVectorn - index of the vector component
VectorDimensionException - If attempting to access an invalid component.
public void setComponent(int n,
double value)
setComponent in class AbstractDoubleVectorn - index of the vector componentvalue - a number
VectorDimensionException - If attempting to access an invalid component.public double norm(int n)
norm in class AbstractDoubleVectorpublic double norm()
norm in interface BanachSpace.Membernorm in class AbstractDoubleVectorpublic double infNorm()
-norm.
infNorm in class AbstractDoubleVectorpublic AbelianGroup.Member negate()
public AbelianGroup.Member add(AbelianGroup.Member vec)
vec - a group memberpublic AbstractDoubleVector add(AbstractDoubleVector vec)
add in class AbstractDoubleVectorvec - a double 3-vectorpublic AbelianGroup.Member subtract(AbelianGroup.Member vec)
vec - a group memberpublic AbstractDoubleVector subtract(AbstractDoubleVector vec)
subtract in class AbstractDoubleVectorvec - a double 3-vectorpublic Module.Member scalarMultiply(Ring.Member x)
x - a ring memberpublic AbstractDoubleVector scalarMultiply(double k)
scalarMultiply in class AbstractDoubleVectork - a double
public VectorSpace.Member scalarDivide(Field.Member x)
x - a field memberpublic AbstractDoubleVector scalarDivide(double k)
scalarDivide in class AbstractDoubleVectork - a double
java.lang.ArithmeticException - If divide by zero.public double scalarProduct(AbstractDoubleVector vec)
scalarProduct in class AbstractDoubleVectorvec - a double 3-vectorpublic Double3Vector multiply(Double3Vector vec)
vec - a double 3-vectorpublic AbstractDoubleVector mapComponents(Mapping mapping)
mapComponents in class AbstractDoubleVectormapping - a user-defined function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||