Class Column

    • Constructor Detail

      • Column

        public Column​(int r)
        Creates a new column
        Parameters:
        r - number of rows
      • Column

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

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

      • get

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

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

        public static Column random​(int r)
        New random column.
        Parameters:
        r - number of rows
        Returns:
        new Random Column
      • random

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

        public static Column random​(int r,
                                    boolean signed,
                                    java.util.Random rand)
        New random column.
        Parameters:
        r - number of rows
        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 Row 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​(Row result)