motris.main
Class Double4Vector

java.lang.Object
  extended byJSci.maths.MathVector
      extended byJSci.maths.DoubleVector
          extended bymotris.main.Double4Vector
All Implemented Interfaces:
JSci.maths.groups.AbelianGroup.Member, JSci.maths.algebras.BanachSpace.Member, JSci.maths.Member, JSci.maths.algebras.Module.Member, java.io.Serializable, JSci.maths.algebras.VectorSpace.Member

public class Double4Vector
extends DoubleVector

Class for homogenous 3-dimensional Vectors (that is, the 4th dimension is =1). Useful for compile-time typechecking and specific 3d functions (i.e. cross product)

Author:
dahlkamp
See Also:
Serialized Form

Field Summary
 
Fields inherited from class JSci.maths.DoubleVector
ARRAY_1D, vector
 
Fields inherited from class JSci.maths.MathVector
CLASS_SPECIFIC, N, storageFormat
 
Constructor Summary
Double4Vector()
           
Double4Vector(double[] arg0)
           
Double4Vector(double x, double y, double z)
           
Double4Vector(double x, double y, double z, double a)
           
Double4Vector(DoubleVector a)
           
Double4Vector(int _dimension)
           
 
Method Summary
 Double4Vector crossProduct(Double4Vector a)
           
 void normalize()
          Makes the norm of this vector equal to 1.
 void setValues(double x, double y, double z)
           
 void setValues(double x, double y, double z, double a)
           
 
Methods inherited from class JSci.maths.DoubleVector
add, add, equals, getComponent, hashCode, infNorm, mapComponents, negate, norm, norm, scalarDivide, scalarDivide, scalarMultiply, scalarMultiply, scalarProduct, setComponent, subtract, subtract, toComplexVector, toIntegerVector, toString
 
Methods inherited from class JSci.maths.MathVector
dimension, getInvalidComponentMsg
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Double4Vector

public Double4Vector()

Double4Vector

public Double4Vector(int _dimension)
              throws JSci.maths.DimensionException

Double4Vector

public Double4Vector(double[] arg0)
              throws JSci.maths.DimensionException
Parameters:
arg0 -

Double4Vector

public Double4Vector(double x,
                     double y,
                     double z)

Double4Vector

public Double4Vector(double x,
                     double y,
                     double z,
                     double a)

Double4Vector

public Double4Vector(DoubleVector a)
              throws java.lang.ClassCastException
Method Detail

setValues

public void setValues(double x,
                      double y,
                      double z)

setValues

public void setValues(double x,
                      double y,
                      double z,
                      double a)

normalize

public void normalize()
Description copied from class: DoubleVector
Makes the norm of this vector equal to 1.

Overrides:
normalize in class DoubleVector

crossProduct

public Double4Vector crossProduct(Double4Vector a)