Class JSci.maths.IntegerVector
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.IntegerVector

java.lang.Object
   |
   +----JSci.maths.Tensor
           |
           +----JSci.maths.Vector
                   |
                   +----JSci.maths.IntegerVector

public final class IntegerVector
extends Vector
The IntegerVector class provides an object for encapsulating vectors containing integers.

Constructor Index

 o IntegerVector(int)
Constructs an empty vector.
 o IntegerVector(int, int, int)
Constructs a 3D vector.
 o IntegerVector(int[])
Constructs a vector by wrapping an array.

Method Index

 o clone()
Creates a clone of this vector.
 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 norm()
Returns the l2-norm (magnitude).
 o norm(int)
Returns the ln-norm.
 o setComponent(int, int)
Sets the value of a component of this vector.
 o toComplexVector()
Converts this vector to a complex vector.
 o toDoubleVector()
Converts this vector to a double vector.
 o toString()
Returns a comma delimited string representing the value of this vector.

Constructors

 o IntegerVector
  public IntegerVector(int dim)
Constructs an empty vector.
Parameters:
dim - the dimension of the vector.
 o IntegerVector
  public IntegerVector(int array[])
Constructs a vector by wrapping an array.
Parameters:
array - an assigned value
 o IntegerVector
  public IntegerVector(int x,
                       int y,
                       int z)
Constructs a 3D vector.
Parameters:
x - x ordinate
y - y ordinate
z - z ordinate

Methods

 o equals
  public boolean equals(Object a)
Compares two integer vectors for equality.
Parameters:
a - an integer vector
Overrides:
equals in class Object
 o clone
  public Object clone()
Creates a clone of this vector.
Returns:
a copy of this vector.
Overrides:
clone in class Object
 o toString
  public String toString()
Returns a comma delimited string representing the value of this vector.
Overrides:
toString in class Object
 o hashCode
  public int hashCode()
Returns a hashcode for this vector.
Overrides:
hashCode in class Object
 o toDoubleVector
  public DoubleVector toDoubleVector()
Converts this vector to a double vector.
Returns:
a double vector
 o toComplexVector
  public ComplexVector toComplexVector()
Converts this vector to a complex vector.
Returns:
a complex vector
 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.
 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.
 o dimension
  public int dimension()
Returns the vector's dimension.
Overrides:
dimension in class Vector
 o norm
  public double norm(int n)
Returns the ln-norm.
 o norm
  public double norm()
Returns the l2-norm (magnitude).
Overrides:
norm in class Vector
 o infNorm
  public double infNorm()
Returns the l(infinity)-norm.

All Packages  Class Hierarchy  This Package  Previous  Next  Index