    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.

##

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

##

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

##

Integer3Vector

     public Integer3Vector()

  Constructs an empty 3-vector.

Integer3Vector

     public Integer3Vector(int x,
                           int y,
                           int z)

  Constructs a 3-vector.

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

##

equals

     public boolean equals(Object a)

  Compares two integer vectors for equality.

  Parameters:
    a - an integer 3-vector
  Overrides:
    equals in class IntegerVector

toString

     public String toString()

  Returns a comma delimited string representing the value of this vector.

  Overrides:
    toString in class IntegerVector

hashCode

     public int hashCode()

  Returns a hashcode for this vector.

  Overrides:
    hashCode in class IntegerVector

toDoubleVector

     public DoubleVector toDoubleVector()

  Converts this 3-vector to a double 3-vector.

  Returns:
    a double 3-vector
  Overrides:
    toDoubleVector in class IntegerVector

toComplexVector

     public ComplexVector toComplexVector()

  Converts this 3-vector to a complex 3-vector.

  Returns:
    a complex 3-vector
  Overrides:
    toComplexVector in class IntegerVector

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

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

dimension

     public int dimension()

  Returns the vector's dimension.

  Overrides:
    dimension in class IntegerVector

norm

     public double norm(int n)

  Returns the ln-norm.

  Overrides:
    norm in class IntegerVector

norm

     public double norm()

  Returns the l2-norm (magnitude).

  Overrides:
    norm in class IntegerVector

infNorm

     public double infNorm()

  Returns the l(infinity)-norm.

  Overrides:
    infNorm in class IntegerVector

add

     public MathVector add(MathVector v)

  Returns the addition of this vector and another.

add

     public Integer3Vector add(Integer3Vector v)

  Returns the addition of this vector and another.

  Parameters:
    v - an integer 3-vector

subtract

     public MathVector subtract(MathVector v)

  Returns the subtraction of this vector by another.

subtract

     public Integer3Vector subtract(Integer3Vector v)

  Returns the subtraction of this vector by another.

  Parameters:
    v - an integer 3-vector

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

scalarProduct

     public int scalarProduct(Integer3Vector v)

  Returns the scalar product of this vector and another.

  Parameters:
    v - an integer 3-vector

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