Documentation of 'jsci.maths.vectors.AbstractIntegerVector' Java class
AbstractIntegerVector
jsci.maths.vectors

Class AbstractIntegerVector

    • Method Detail

      • equals

        public boolean equals(java.lang.Object obj)
        Compares two integer vectors for equality. Two vectors are considered to be equal if the norm of their difference is zero.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - an integer vector
      • toString

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

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

        public AbstractDoubleVector toDoubleVector()
        Converts this vector to a double vector.
        Returns:
        a double vector
      • getComponent

        public abstract int 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.
      • setComponent

        public abstract void setComponent(int n,
                                          int x)
        Sets the value of a component of this vector.
        Parameters:
        n - index of the vector component
        x - an integer
        Throws:
        VectorDimensionException - If attempting to access an invalid component.
      • getSet

        public java.lang.Object getSet()
      • norm

        public double norm(int n)
        Returns the ln-norm.
      • norm

        public double norm()
        Returns the l2-norm (magnitude).
        Specified by:
        norm in class MathVector
      • infNorm

        public double infNorm()
        Returns the linfinity-norm.
      • scalarMultiply

        public abstract AbstractIntegerVector scalarMultiply(int x)
        Returns the multiplication of this vector by a scalar.
        Parameters:
        x - an integer
      • scalarProduct

        public abstract int scalarProduct(AbstractIntegerVector v)
        Returns the scalar product of this vector and another.
        Parameters:
        v - an integer vector
        Throws:
        VectorDimensionException - If the vectors are different sizes.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.