All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.Integer3Vector

java.lang.Object
   |
   +----JSci.maths.MathVector
           |
           +----JSci.maths.IntegerVector
                   |
                   +----JSci.maths.Integer3Vector

public class Integer3Vector
extends IntegerVector
The Integer3Vector class encapsulates integer 3-vectors.


Constructor Index

 o Integer3Vector()
Constructs an empty 3-vector.
 o Integer3Vector(int, int, int)
Constructs a 3-vector.

Method Index

 o add(Integer3Vector)
Returns the addition of this vector and another.
 o add(MathVector)
Returns the addition of this vector and another.
 o dimension()
Returns the vector's dimension.
 o equals(Object)
Compares two integer vectors for equality.
 o getComponent(int)
Returns a component of this vector.
 o hashCode()
Returns a hashcode for this vector.
 o infNorm()
Returns the l(infinity)-norm.
 o multiply(Integer3Vector)
Returns the vector product of this vector and another.
 o norm()
Returns the l2-norm (magnitude).
 o norm(int)
Returns the ln-norm.
 o scalarMultiply(int)
Returns the multiplication of this vector by a scalar.
 o scalarProduct(Integer3Vector)
Returns the scalar product of this vector and another.
 o setComponent(int, int)
Sets the value of a component of this vector.
 o subtract(Integer3Vector)
Returns the subtraction of this vector by another.
 o subtract(MathVector)
Returns the subtraction of this vector by another.
 o toComplexVector()
Converts this 3-vector to a complex 3-vector.
 o toDoubleVector()
Converts this 3-vector to a double 3-vector.
 o toString()
Returns a comma delimited string representing the value of this vector.

Constructors

 o Integer3Vector
 public Integer3Vector()
Constructs an empty 3-vector.

 o Integer3Vector
 public Integer3Vector(int x,
                       int y,
                       int z)
Constructs a 3-vector.

Parameters:
x - x coordinate
y - y coordinate
z - z coordinate

Methods

 o equals
 public boolean equals(Object a)
Compares two integer vectors for equality.

Parameters:
a - an integer 3-vector
Overrides:
equals in class IntegerVector
 o toString
 public String toString()
Returns a comma delimited string representing the value of this vector.

Overrides:
toString in class IntegerVector
 o hashCode
 public int hashCode()
Returns a hashcode for this vector.

Overrides:
hashCode in class IntegerVector
 o toDoubleVector
 public DoubleVector toDoubleVector()
Converts this 3-vector to a double 3-vector.

Returns:
a double 3-vector
Overrides:
toDoubleVector in class IntegerVector
 o toComplexVector
 public ComplexVector toComplexVector()
Converts this 3-vector to a complex 3-vector.

Returns:
a complex 3-vector
Overrides:
toComplexVector in class IntegerVector
 o getComponent
 public int getComponent(int n)
Returns a component of this vector.

Parameters:
n - index of the vector component
Throws: VectorDimensionException
If attempting to access an invalid component.
Overrides:
getComponent in class IntegerVector
 o setComponent
 public void setComponent(int n,
                          int x)
Sets the value of a component of this vector.

Parameters:
n - index of the vector component
x - an integer
Throws: VectorDimensionException
If attempting to access an invalid component.
Overrides:
setComponent in class IntegerVector
 o dimension
 public int dimension()
Returns the vector's dimension.

Overrides:
dimension in class IntegerVector
 o norm
 public double norm(int n)
Returns the ln-norm.

Overrides:
norm in class IntegerVector
 o norm
 public double norm()
Returns the l2-norm (magnitude).

Overrides:
norm in class IntegerVector
 o infNorm
 public double infNorm()
Returns the l(infinity)-norm.

Overrides:
infNorm in class IntegerVector
 o add
 public MathVector add(MathVector v)
Returns the addition of this vector and another.

 o add
 public Integer3Vector add(Integer3Vector v)
Returns the addition of this vector and another.

Parameters:
v - an integer 3-vector
 o subtract
 public MathVector subtract(MathVector v)
Returns the subtraction of this vector by another.

 o subtract
 public Integer3Vector subtract(Integer3Vector v)
Returns the subtraction of this vector by another.

Parameters:
v - an integer 3-vector
 o scalarMultiply
 public IntegerVector scalarMultiply(int x)
Returns the multiplication of this vector by a scalar.

Parameters:
x - an integer
Returns:
an integer 3-vector
Overrides:
scalarMultiply in class IntegerVector
 o scalarProduct
 public int scalarProduct(Integer3Vector v)
Returns the scalar product of this vector and another.

Parameters:
v - an integer 3-vector
 o multiply
 public Integer3Vector multiply(Integer3Vector v)
Returns the vector product of this vector and another.

Parameters:
v - an integer 3-vector

All Packages  Class Hierarchy  This Package  Previous  Next  Index