public final class BraVector extends MathVector
CLASS_SPECIFIC, N, storageFormat
Constructor and Description |
---|
BraVector(ComplexVector rep)
Constructs a bra vector given a vector representation.
|
Modifier and Type | Method and Description |
---|---|
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.
|
ComplexVector |
getRepresentation()
Returns the representation.
|
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.
|
AbelianGroup.Member |
negate()
Returns the negative of this vector.
|
double |
norm()
Returns the norm.
|
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.
|
dimension, getInvalidComponentMsg
public BraVector(ComplexVector rep)
rep
- a vector representationpublic boolean equals(java.lang.Object a)
equals
in class java.lang.Object
a
- a bra vectorpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public KetVector toKetVector()
public ComplexVector getRepresentation()
public double norm()
norm
in class MathVector
public AbelianGroup.Member negate()
public AbelianGroup.Member add(AbelianGroup.Member v)
v
- a group memberpublic BraVector add(BraVector v)
v
- a bra vectorVectorDimensionException
- If the vectors are different sizes.public AbelianGroup.Member subtract(AbelianGroup.Member v)
v
- a group memberpublic BraVector subtract(BraVector v)
v
- a bra vectorVectorDimensionException
- If the vectors are different sizes.public Module.Member scalarMultiply(Ring.Member x)
x
- a ring memberpublic Complex multiply(KetVector ket)
ket
- a ket vectorVectorDimensionException
- If the vectors have different dimensions.public BraVector multiply(Operator op)
op
- an operatorDimensionException
- If the operator and vector have different dimensions.