D1Matrix64F
org.ejml.data

Class D1Matrix64F

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    BlockMatrix64F, RowD1Matrix64F


    public abstract class D1Matrix64Fextends Matrix64F
    A generic abstract class for matrices whose data is stored in a single 1D array of doubles. The format of the elements in this array is not specified. For example row major, column major, and block row major are all common formats.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and TypeField and Description
      double[]data
      Where the raw data for the matrix is stored.
    • Constructor Summary

      Constructors 
      Constructor and Description
      D1Matrix64F() 
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      doublediv(int index, double val)
      Divides the specified value to the internal data array at the specified index.

      Equivalent to: this.data[index] /= val;
      doubleget(int index)
      Returns the value of the matrix at the specified internal array index.
      double[]getData()
      Used to get a reference to the internal data.
      abstract intgetIndex(int row, int col)
      Returns the internal array index for the specified row and column.
      doubleminus(int index, double val)
      Subtracts the specified value to the internal data array at the specified index.

      Equivalent to: this.data[index] -= val;
      doubleplus(int index, double val)
      Adds the specified value to the internal data array at the specified index.

      Equivalent to: this.data[index] += val;
      voidset(D1Matrix64F b)
      Sets the value of this matrix to be the same as the value of the provided matrix.
      doubleset(int index, double val)
      Sets the element's value at the specified index.
      voidsetData(double[] data)
      Changes the internal array reference.
      doubletimes(int index, double val)
      Multiplies the specified value to the internal data array at the specified index.

      Equivalent to: this.data[index] *= val;
    • Field Detail

      • data

        public double[] data
        Where the raw data for the matrix is stored. The format is type dependent.
    • Constructor Detail

      • D1Matrix64F

        public D1Matrix64F()
    • Method Detail

      • getData

        public double[] getData()
        Used to get a reference to the internal data.
        Returns:
        Reference to the matrix's data.
      • setData

        public void setData(double[] data)
        Changes the internal array reference.
      • getIndex

        public abstract int getIndex(int row,           int col)
        Returns the internal array index for the specified row and column.
        Parameters:
        row - Row index.
        col - Column index.
        Returns:
        Internal array index.
      • set

        public void set(D1Matrix64F b)
        Sets the value of this matrix to be the same as the value of the provided matrix. Both matrices must have the same shape:

        aij = bij

        Parameters:
        b - The matrix that this matrix is to be set equal to.
      • get

        public double get(int index)
        Returns the value of the matrix at the specified internal array index. The element at which row and column returned by this function depends upon the matrix's internal structure, e.g. row-major, column-major, or block.
        Parameters:
        index - Internal array index.
        Returns:
        Value at the specified index.
      • set

        public double set(int index,         double val)
        Sets the element's value at the specified index. The element at which row and column modified by this function depends upon the matrix's internal structure, e.g. row-major, column-major, or block.
        Parameters:
        index - Index of element that is to be set.
        val - The new value of the index.
      • plus

        public double plus(int index,          double val)

        Adds the specified value to the internal data array at the specified index.

        Equivalent to: this.data[index] += val;

        Intended for use in highly optimized code. The row/column coordinate of the modified element is dependent upon the matrix's internal structure.

        Parameters:
        index - The index which is being modified.
        val - The value that is being added.
      • minus

        public double minus(int index,           double val)

        Subtracts the specified value to the internal data array at the specified index.

        Equivalent to: this.data[index] -= val;

        Intended for use in highly optimized code. The row/column coordinate of the modified element is dependent upon the matrix's internal structure.

        Parameters:
        index - The index which is being modified.
        val - The value that is being subtracted.
      • times

        public double times(int index,           double val)

        Multiplies the specified value to the internal data array at the specified index.

        Equivalent to: this.data[index] *= val;

        Intended for use in highly optimized code. The row/column coordinate of the modified element is dependent upon the matrix's internal structure.

        Parameters:
        index - The index which is being modified.
        val - The value that is being multiplied.
      • div

        public double div(int index,         double val)

        Divides the specified value to the internal data array at the specified index.

        Equivalent to: this.data[index] /= val;

        Intended for use in highly optimized code. The row/column coordinate of the modified element is dependent upon the matrix's internal structure.

        Parameters:
        index - The index which is being modified.
        val - The value that is being divided.

SCaVis 1.7 © jWork.org