Class Row

    • Constructor Detail

      • Row

        public Row​(int c)
        Creates a new row
        Parameters:
        c - number of columns
      • Row

        public Row​(double[] data)
        Creates a new row
        Parameters:
        data - row array
      • Row

        public Row​(Row copy)
        Copy constructor.
        Parameters:
        copy - Row to copy
    • Method Detail

      • get

        public double get​(int i)
        Retrieves the value of a given column.
        Parameters:
        i - column number
        Returns:
        value
        Since:
        1.2.0-RIDDLER
      • set

        public void set​(int i,
                        double val)
        Sets the value for a given column.
        Parameters:
        i - column number
        val - value
        Since:
        1.2.0-RIDDLER
      • random

        public static Row random​(int c)
        New random row.
        Parameters:
        c - number of columns
        Returns:
        new Random Column
      • random

        public static Row random​(int c,
                                 boolean signed)
        New random row.
        Parameters:
        c - number of columns
        signed - false if all the numbers should be positive, false otherwise
        Returns:
        new Random Column
      • random

        public static Row random​(int c,
                                 boolean signed,
                                 java.util.Random rand)
        New random row.
        Parameters:
        c - number of columns
        signed - false if all the numbers should be positive, false otherwise
        rand - The Random object used to fill the matrix, if null it will fallback to ThreadLocalRandom#current()
        Returns:
        new Random Column
      • transpose

        public Column transpose()
        Description copied from class: Matrix
        Return the transpose of this matrix.
        Overrides:
        transpose in class Matrix
        Returns:
        A new matrix with the transpose of this.
      • transpose

        public void transpose​(Column result)