Rank1Tensor
jsci.physics.relativity

Class Rank1Tensor

    • 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(Object a)
        Compares two tensors for equality.
        Overrides:
        equals in class Object
        Parameters:
        a - a 1st rank tensor
      • toString

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

        public int hashCode()
        Returns a hashcode for this tensor.
        Overrides:
        hashCode in class 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

SCaVis 1.8 © jWork.org