Class JSci.physics.relativity.CoVector
All Packages Class Hierarchy This Package Previous Next Index
Class JSci.physics.relativity.CoVector
java.lang.Object
|
+----JSci.maths.Tensor
|
+----JSci.maths.Vector
|
+----JSci.physics.relativity.CoVector
- public final class CoVector
- extends Vector
The CoVector class provides an object for encapsulating covariant vectors.
-
CoVector(double, double, double, double)
- Constructs a covariant vector.
-
clone()
- Creates a clone of this covariant vector.
-
dimension()
- Returns the vector's dimension.
-
equals(Object)
- Compares two covariant vectors for equality.
-
getComponent(int)
- Returns a component of this vector.
-
hashCode()
- Returns a hashcode for this covariant vector.
-
norm()
- Returns the norm (invariant).
-
toString()
- Returns a comma delimited string representing the value of this vector.
CoVector
public CoVector(double s,
double v1,
double v2,
double v3)
- Constructs a covariant vector.
- Parameters:
- s - a scalar
- v1 - 1st 3-vector component
- v2 - 2nd 3-vector component
- v3 - 3rd 3-vector component
equals
public boolean equals(Object a)
- Compares two covariant vectors for equality.
- Parameters:
- a - a covariant vector
- Overrides:
- equals in class Object
clone
public Object clone()
- Creates a clone of this covariant vector.
- Returns:
- a copy of this covariant vector.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns a comma delimited string representing the value of this vector.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- Returns a hashcode for this covariant vector.
- Overrides:
- hashCode in class Object
getComponent
public double 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.
dimension
public int dimension()
- Returns the vector's dimension.
- Overrides:
- dimension in class Vector
norm
public double norm()
- Returns the norm (invariant).
- Overrides:
- norm in class Vector
All Packages Class Hierarchy This Package Previous Next Index