    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.physics.quantum.KetVector

    java.lang.Object
       |
       +----JSci.maths.MathVector
               |
               +----JSci.physics.quantum.KetVector

public final class KetVector
extends MathVector

The KetVector class provides an object for encapsulating Dirac ket vectors.

##

KetVector(ComplexVector)
  Constructs a ket vector given a vector representation.

##

add(AbelianGroupMember)
  Returns the addition of this vector and another.
add(KetVector)
  Returns the addition of this vector and another.
dimension()
  Returns the dimension.
equals(Object)
  Compares two ket vectors for equality.
getRepresentation()
  Returns the representation.
hashCode()
  Returns a hashcode for this ket vector.
multiply(BraVector)
  Returns the multiplication of this ket vector and a bra vector.
negate()
  Returns the negative of this vector.
norm()
  Returns the norm.
scalarMultiply(RingMember)
  Returns the multiplication of this ket vector by a scalar.
subtract(AbelianGroupMember)
  Returns the subtraction of this vector by another.
subtract(KetVector)
  Returns the subtraction of this vector by another.
toBraVector()
  Map this ket vector to a bra vector.
toString()
  Returns a comma delimited string representing the value of this ket vector.

##

KetVector

     public KetVector(ComplexVector rep)

  Constructs a ket vector given a vector representation.

  Parameters:
    rep - a vector representation

##

equals

     public boolean equals(Object a)

  Compares two ket vectors for equality.

  Parameters:
    a - a ket vector
  Overrides:
    equals in class Object

toString

     public String toString()

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

  Overrides:
    toString in class Object

hashCode

     public int hashCode()

  Returns a hashcode for this ket vector.

  Overrides:
    hashCode in class Object

toBraVector

     public BraVector toBraVector()

  Map this ket vector to a bra vector.

getRepresentation

     public ComplexVector getRepresentation()

  Returns the representation.

dimension

     public int dimension()

  Returns the dimension.

  Overrides:
    dimension in class MathVector

norm

     public double norm()

  Returns the norm.

  Overrides:
    norm in class MathVector

negate

     public AbelianGroupMember negate()

  Returns the negative of this vector.

  Overrides:
    negate in class MathVector

add

     public AbelianGroupMember add(AbelianGroupMember v)

  Returns the addition of this vector and another.

  Overrides:
    add in class MathVector

add

     public KetVector add(KetVector v)

  Returns the addition of this vector and another.

  Parameters:
    v - a ket vector
  Throws: VectorDimensionException
    If the vectors are different sizes.

subtract

     public AbelianGroupMember subtract(AbelianGroupMember v)

  Returns the subtraction of this vector by another.

  Overrides:
    subtract in class MathVector

subtract

     public KetVector subtract(KetVector v)

  Returns the subtraction of this vector by another.

  Parameters:
    v - a ket vector
  Throws: VectorDimensionException
    If the vectors are different sizes.

scalarMultiply

     public ModuleMember scalarMultiply(RingMember x)

  Returns the multiplication of this ket vector by a scalar.

  Overrides:
    scalarMultiply in class MathVector

multiply

     public Operator multiply(BraVector bra)

  Returns the multiplication of this ket vector and a bra vector.

  Parameters:
    bra - a bra vector
  Throws: VectorDimensionException
    If the vectors have different dimensions.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index