org.jscience.physics.quantum
Class BraVector

java.lang.Object
  extended by org.jscience.mathematics.algebraic.AbstractHypermatrix
      extended by org.jscience.mathematics.algebraic.AbstractMatrix
          extended by org.jscience.mathematics.algebraic.AbstractVector
              extended by org.jscience.physics.quantum.BraVector
All Implemented Interfaces:
java.io.Serializable, Algebra.Member, Ring.Member, AbelianGroup.Member, Hypermatrix, Matrix, Module.Member, VectorSpace.Member, Vector, Member

public final class BraVector
extends AbstractVector

The BraVector class provides an object for encapsulating Dirac bra vectors.

See Also:
Serialized Form

Constructor Summary
BraVector(AbstractComplexVector rep)
          Constructs a bra vector given a vector representation.
 
Method Summary
 AbelianGroup.Member add(AbelianGroup.Member v)
          Returns the addition of this vector and another.
 BraVector add(BraVector v)
          Returns the addition of this vector and another.
 boolean equals(java.lang.Object a)
          Compares two bra vectors for equality.
 Vector getColumn(int j)
          DOCUMENT ME!
 Complex getElement(int i)
          Returns the element.
 AbstractComplexVector getRepresentation()
          Returns the representation.
 Vector getRow(int i)
          DOCUMENT ME!
 int hashCode()
          Returns a hashcode for this bra vector.
 Complex multiply(KetVector ket)
          Returns the multiplication of this bra vector and a ket vector.
 BraVector multiply(Operator op)
          Returns the multiplication of this bra vector and an operator.
 Ring.Member multiply(Ring.Member r)
          DOCUMENT ME!
 AbelianGroup.Member negate()
          Returns the negative of this vector.
 double norm()
          Returns the norm.
 VectorSpace.Member scalarDivide(Field.Member f)
          DOCUMENT ME!
 Module.Member scalarMultiply(Ring.Member x)
          Returns the multiplication of this bra vector by a scalar.
 AbelianGroup.Member subtract(AbelianGroup.Member v)
          Returns the subtraction of this vector by another.
 BraVector subtract(BraVector v)
          Returns the subtraction of this vector by another.
 KetVector toKetVector()
          Map this bra vector to a ket vector.
 java.lang.String toString()
          Returns a comma delimited string representing the value of this bra vector.
 Matrix transpose()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.mathematics.algebraic.AbstractVector
getDimension, getElement, getInvalidElementMsg, toArray, toArray
 
Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray
 
Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix
getDimensions, numDimensions, numElements, numElements, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jscience.mathematics.algebraic.Matrix
numColumns, numRows, toArray
 
Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix
getDimensions, getElement, numDimensions, numElements, numElements, toArray
 

Constructor Detail

BraVector

public BraVector(AbstractComplexVector rep)
Constructs a bra vector given a vector representation.

Parameters:
rep - a vector representation
Method Detail

equals

public boolean equals(java.lang.Object a)
Compares two bra vectors for equality.

Overrides:
equals in class java.lang.Object
Parameters:
a - a bra vector
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
Returns a comma delimited string representing the value of this bra vector.

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

hashCode

public int hashCode()
Returns a hashcode for this bra vector.

Overrides:
hashCode in class java.lang.Object
Returns:
DOCUMENT ME!

toKetVector

public KetVector toKetVector()
Map this bra vector to a ket vector.

Returns:
DOCUMENT ME!

getRepresentation

public AbstractComplexVector getRepresentation()
Returns the representation.

Returns:
DOCUMENT ME!

getElement

public Complex getElement(int i)
Returns the element.

Specified by:
getElement in interface Vector
Specified by:
getElement in class AbstractVector
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

norm

public double norm()
Returns the norm.

Returns:
DOCUMENT ME!

negate

public AbelianGroup.Member negate()
Returns the negative of this vector.

Returns:
DOCUMENT ME!

add

public AbelianGroup.Member add(AbelianGroup.Member v)
Returns the addition of this vector and another.

Parameters:
v - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

add

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

Parameters:
v - a bra vector
Returns:
DOCUMENT ME!

subtract

public AbelianGroup.Member subtract(AbelianGroup.Member v)
Returns the subtraction of this vector by another.

Parameters:
v - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

subtract

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

Parameters:
v - a bra vector
Returns:
DOCUMENT ME!

scalarMultiply

public Module.Member scalarMultiply(Ring.Member x)
Returns the multiplication of this bra vector by a scalar.

Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

multiply

public Complex multiply(KetVector ket)
Returns the multiplication of this bra vector and a ket vector.

Parameters:
ket - a ket vector
Returns:
DOCUMENT ME!
Throws:
IllegalDimensionException - If the vectors have different dimensions.

multiply

public BraVector multiply(Operator op)
Returns the multiplication of this bra vector and an operator.

Parameters:
op - an operator
Returns:
DOCUMENT ME!
Throws:
IllegalDimensionException - If the operator and vector have different dimensions.

getRow

public Vector getRow(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!

getColumn

public Vector getColumn(int j)
DOCUMENT ME!

Parameters:
j - DOCUMENT ME!
Returns:
DOCUMENT ME!

transpose

public Matrix transpose()
DOCUMENT ME!

Returns:
DOCUMENT ME!

scalarDivide

public VectorSpace.Member scalarDivide(Field.Member f)
DOCUMENT ME!

Parameters:
f - DOCUMENT ME!
Returns:
DOCUMENT ME!

multiply

public Ring.Member multiply(Ring.Member r)
DOCUMENT ME!

Parameters:
r - DOCUMENT ME!
Returns:
DOCUMENT ME!