jsci.physics.quantum
Class BraVector
- java.lang.Object
-
- jsci.maths.vectors.MathVector
-
- jsci.physics.quantum.BraVector
-
- All Implemented Interfaces:
- java.io.Serializable, Module.Member, AbelianGroup.Member, Member
public final class BraVector extends MathVector
The BraVector class provides an object for encapsulating Dirac bra vectors.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BraVector(AbstractComplexVector rep)Constructs a bra vector given a vector representation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AbelianGroup.Memberadd(AbelianGroup.Member v)Returns the addition of this vector and another.BraVectoradd(BraVector v)Returns the addition of this vector and another.booleanequals(java.lang.Object a)Compares two bra vectors for equality.AbstractComplexVectorgetRepresentation()Returns the representation.java.lang.ObjectgetSet()inthashCode()Returns a hashcode for this bra vector.Complexmultiply(KetVector ket)Returns the multiplication of this bra vector and a ket vector.BraVectormultiply(Operator op)Returns the multiplication of this bra vector and an operator.AbelianGroup.Membernegate()Returns the negative of this vector.doublenorm()Returns the norm.Module.MemberscalarMultiply(Ring.Member x)Returns the multiplication of this bra vector by a scalar.AbelianGroup.Membersubtract(AbelianGroup.Member v)Returns the subtraction of this vector by another.BraVectorsubtract(BraVector v)Returns the subtraction of this vector by another.KetVectortoKetVector()Map this bra vector to a ket vector.java.lang.StringtoString()Returns a comma delimited string representing the value of this bra vector.-
Methods inherited from class jsci.maths.vectors.MathVector
dimension
-
-
-
-
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:
equalsin classjava.lang.Object- Parameters:
a- a bra vector
-
toString
public java.lang.String toString()
Returns a comma delimited string representing the value of this bra vector.- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
Returns a hashcode for this bra vector.- Overrides:
hashCodein classjava.lang.Object
-
toKetVector
public KetVector toKetVector()
Map this bra vector to a ket vector.
-
getRepresentation
public AbstractComplexVector getRepresentation()
Returns the representation.
-
norm
public double norm()
Returns the norm.- Specified by:
normin classMathVector
-
getSet
public java.lang.Object getSet()
-
negate
public AbelianGroup.Member negate()
Returns the negative of this vector.
-
add
public AbelianGroup.Member add(AbelianGroup.Member v)
Returns the addition of this vector and another.- Parameters:
v- a group member
-
add
public BraVector add(BraVector v)
Returns the addition of this vector and another.- Parameters:
v- a bra vector- Throws:
VectorDimensionException- If the vectors are different sizes.
-
subtract
public AbelianGroup.Member subtract(AbelianGroup.Member v)
Returns the subtraction of this vector by another.- Parameters:
v- a group member
-
subtract
public BraVector subtract(BraVector v)
Returns the subtraction of this vector by another.- Parameters:
v- a bra vector- Throws:
VectorDimensionException- If the vectors are different sizes.
-
scalarMultiply
public Module.Member scalarMultiply(Ring.Member x)
Returns the multiplication of this bra vector by a scalar.- Parameters:
x- a ring member
-
multiply
public Complex multiply(KetVector ket)
Returns the multiplication of this bra vector and a ket vector.- Parameters:
ket- a ket vector- Throws:
VectorDimensionException- 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- Throws:
DimensionException- If the operator and vector have different dimensions.
-
-
DMelt 3.0 © DataMelt by jWork.ORG