Documentation of 'jsci.physics.relativity.Rank1Tensor' Java class
Rank1Tensor
jsci.physics.relativity

Class Rank1Tensor

  • All Implemented Interfaces:
    java.io.Serializable, Member


    public class Rank1Tensor
    extends Tensor
    The Rank1Tensor class encapsulates 1st rank tensors.
    See Also:
    Serialized Form
    • Constructor Detail

      • Rank1Tensor

        public Rank1Tensor()
        Constructs a 1st rank tensor.
      • Rank1Tensor

        public Rank1Tensor(double s,
                           Double3Vector v)
        Constructs a 1st rank tensor.
        Parameters:
        s - a scalar
        v - a 3-vector
      • Rank1Tensor

        public Rank1Tensor(double s,
                           double v1,
                           double v2,
                           double v3)
        Constructs a 1st rank tensor.
        Parameters:
        s - a scalar
        v1 - 1st 3-vector component
        v2 - 2nd 3-vector component
        v3 - 3rd 3-vector component
    • Method Detail

      • equals

        public boolean equals(java.lang.Object a)
        Compares two tensors for equality.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        a - a 1st rank tensor
      • toString

        public java.lang.String toString()
        Returns a comma delimited string representing the value of this tensor.
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Returns a hashcode for this tensor.
        Overrides:
        hashCode in class java.lang.Object
      • getComponent

        public double getComponent(int i)
        Returns a component of this tensor.
        Parameters:
        i - 1st index
        Throws:
        DimensionException - If attempting to access an invalid component.
      • setComponent

        public void setComponent(int i,
                                 double x)
        Sets the value of a component of this tensor.
        Parameters:
        i - 1st index
        x - value
        Throws:
        DimensionException - If attempting to access an invalid component.
      • norm

        public double norm()
        Returns the norm (invariant).
      • add

        public Rank1Tensor add(Rank1Tensor t)
        Returns the addition of this tensor and another.
        Parameters:
        t - a 1st rank tensor
      • subtract

        public Rank1Tensor subtract(Rank1Tensor t)
        Returns the subtraction of this tensor by another.
        Parameters:
        t - a 1st rank tensor
      • tensorProduct

        public Rank2Tensor tensorProduct(Rank1Tensor t)
        Returns the tensor product of this tensor and another.
        Parameters:
        t - a 1st rank tensor
      • tensorProduct

        public Rank3Tensor tensorProduct(Rank2Tensor t)
        Returns the tensor product of this tensor and another.
        Parameters:
        t - a 2nd rank tensor
      • tensorProduct

        public Rank4Tensor tensorProduct(Rank3Tensor t)
        Returns the tensor product of this tensor and another.
        Parameters:
        t - a 3rd rank tensor

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.