spoke.math.numeric
Class SpokeVector

java.lang.Object
  extended by spoke.math.numeric.Arithmetic
      extended by spoke.math.numeric.SpokeVector
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
Quaternion

public class SpokeVector
extends Arithmetic


Field Summary
 double[] element
           
protected  int n
           
 
Constructor Summary
SpokeVector(double[] element)
           
 
Method Summary
 Arithmetic add(Arithmetic arithmetic)
           
 Arithmetic add(double d)
           
 Arithmetic divide(Arithmetic arithmetic)
           
 Arithmetic divide(double d)
           
 Arithmetic multiply(Arithmetic arithmetic)
           
 Arithmetic multiply(double d)
           
 Arithmetic negate()
           
protected  Arithmetic newinstance()
           
protected  Arithmetic newinstance(int n)
           
 double norm()
           
 double norm2()
           
 SpokeVector normalize()
           
 double scalarProduct(SpokeVector vector)
           
 int signum()
           
 Arithmetic subtract(Arithmetic arithmetic)
           
 Arithmetic subtract(double d)
           
static SpokeVector unity(int dimension)
           
 Arithmetic valueof(double d)
           
 SpokeVector vectorProduct(SpokeVector vector)
           
 
Methods inherited from class spoke.math.numeric.Arithmetic
compareTo, pow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

public double[] element

n

protected int n
Constructor Detail

SpokeVector

public SpokeVector(double[] element)
Method Detail

add

public Arithmetic add(double d)
Specified by:
add in class Arithmetic

subtract

public Arithmetic subtract(double d)
Specified by:
subtract in class Arithmetic

multiply

public Arithmetic multiply(double d)
Specified by:
multiply in class Arithmetic

divide

public Arithmetic divide(double d)
Specified by:
divide in class Arithmetic

add

public Arithmetic add(Arithmetic arithmetic)
Specified by:
add in class Arithmetic

subtract

public Arithmetic subtract(Arithmetic arithmetic)
Overrides:
subtract in class Arithmetic

multiply

public Arithmetic multiply(Arithmetic arithmetic)
Specified by:
multiply in class Arithmetic

divide

public Arithmetic divide(Arithmetic arithmetic)
Specified by:
divide in class Arithmetic

negate

public Arithmetic negate()
Specified by:
negate in class Arithmetic

signum

public int signum()
Specified by:
signum in class Arithmetic

valueof

public Arithmetic valueof(double d)
Specified by:
valueof in class Arithmetic

normalize

public SpokeVector normalize()

norm

public double norm()

norm2

public double norm2()

scalarProduct

public double scalarProduct(SpokeVector vector)

vectorProduct

public SpokeVector vectorProduct(SpokeVector vector)

unity

public static SpokeVector unity(int dimension)

newinstance

protected Arithmetic newinstance()
Specified by:
newinstance in class Arithmetic

newinstance

protected Arithmetic newinstance(int n)