Documentation of 'mikera.matrixx.impl.MatrixRowView' Java class
MatrixRowView
mikera.matrixx.impl

Class MatrixRowView

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<INDArray>, java.lang.Iterable<java.lang.Double>, INDArray, IVector


    public final class MatrixRowView
    extends AMatrixViewVector
    A class representing a wrapped view of a matrix row as a vector. Performance of this implementation is generally not as good as specialised implementations. Intended for use where no better implementations for getRowView(...) on a matrix exist.
    See Also:
    Serialized Form
    • Constructor Detail

      • MatrixRowView

        public MatrixRowView(AMatrix aMatrix,
                             int row)
    • Method Detail

      • get

        public double get(int i)
        Description copied from interface: INDArray
        Returns the double value at the specified position in a 1D vector
        Specified by:
        get in interface INDArray
        Specified by:
        get in interface IVector
        Overrides:
        get in class AMatrixViewVector
      • unsafeGet

        public double unsafeGet(int i)
        Description copied from class: AVector
        Like get, but performs no bounds checking. Results are undefined if the index is out of range
        Overrides:
        unsafeGet in class AMatrixViewVector
      • set

        public void set(int i,
                        double value)
        Description copied from interface: INDArray
        Sets a value at a given position in a mutable 1D array
        Specified by:
        set in interface INDArray
        Specified by:
        set in interface IVector
        Overrides:
        set in class AMatrixViewVector
      • unsafeSet

        public void unsafeSet(int i,
                              double value)
        Description copied from class: AVector
        Like set, but performs no bounds checking. Results are undefined if the index is out of range
        Overrides:
        unsafeSet in class AMatrixViewVector
      • isFullyMutable

        public boolean isFullyMutable()
        Description copied from class: AVector
        Returns true if this vector is fully mutable, i.e. can contain any unconstrained double values
        Specified by:
        isFullyMutable in interface INDArray
        Overrides:
        isFullyMutable in class AVector
      • exactClone

        public MatrixRowView exactClone()
        Description copied from class: AVector
        Returns an exact clone of this vector, i.e. of the same type
        Specified by:
        exactClone in interface INDArray
        Specified by:
        exactClone in class AVector
        Returns:
        A clone of the original array
      • getElements

        public void getElements(double[] data,
                                int offset)
        Description copied from interface: INDArray
        Copies all elements of this array a double array at the specified offset
        Specified by:
        getElements in interface INDArray
        Overrides:
        getElements in class AMatrixViewVector
      • clone

        public AVector clone()
        Description copied from class: AVector
        Clones the vector, creating a new mutable copy of all data. The clone is: - not guaranteed to be of the same type. - guaranteed to be fully mutable - guaranteed not to contain a reference (i.e. is a full deep copy)
        Specified by:
        clone in interface INDArray
        Specified by:
        clone in interface IVector
        Overrides:
        clone in class AVector
      • dotProduct

        public double dotProduct(double[] data,
                                 int offset)
        Description copied from class: AVector
        Fast dot product with a double[] array. Performs no bounds checking. Likely to be faster than most other dot product operations
        Specified by:
        dotProduct in class AVector
      • applyOp

        public void applyOp(Op op)
        Description copied from interface: INDArray
        Applies a unary operator to all elements of the array (in-place)
        Specified by:
        applyOp in interface INDArray
        Overrides:
        applyOp in class AVector
      • applyOp

        public void applyOp(Op2 op,
                            AVector v)
        Description copied from class: AVector
        Applies a binary operator to this vector and a second vector
        Overrides:
        applyOp in class AVector
      • applyOp

        public void applyOp(Op2 op,
                            double v)
        Description copied from interface: INDArray
        Applies a binary operator to this array and a double value. Works as if the double value was broadcast to the shape of this array.
        Specified by:
        applyOp in interface INDArray
        Overrides:
        applyOp in class AVector
      • multiply

        public void multiply(double factor)
        Description copied from class: AVector
        Multiplies the vector by a constant factor
        Specified by:
        multiply in interface INDArray
        Overrides:
        multiply in class AVector
        Parameters:
        factor - Factor by which to multiply each component of the vector
      • multiply

        public void multiply(AVector v)
        Description copied from class: AVector
        Multiplies this vector by another vector, elementwise.
        Overrides:
        multiply in class AVector
      • add

        public void add(AVector v)
        Description copied from class: AVector
        Adds another vector to this one
        Overrides:
        add in class AVector
      • addMultiple

        public void addMultiple(AVector v,
                                double factor)
        Description copied from class: AVector
        Adds a scaled multiple of another vector to this vector
        Overrides:
        addMultiple in class AVector
      • sub

        public void sub(AVector v)
        Description copied from class: AVector
        Subtracts a vector from this vector
        Overrides:
        sub in class AVector
      • set

        public void set(AVector v)
        Description copied from class: AVector
        Sets the vector to equal the value of another vector
        Overrides:
        set in class AVector
      • fill

        public void fill(double v)
        Description copied from class: AVector
        Fills the entire vector with a given value
        Specified by:
        fill in interface INDArray
        Overrides:
        fill in class AVector

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.