Class Matrix3x3

java.lang.Object
com.google.common.geometry.Matrix3x3

@GwtCompatible final class Matrix3x3 extends Object
A simple 3x3 matrix.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final int
     
    private final double[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Matrix3x3(int cols, double... values)
    Constructs a 2D matrix of the given width and values.
    Matrix3x3(int rows, int cols)
    Constructs a 2D matrix of a fixed size.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of columns in this matrix.
    boolean
     
    static Matrix3x3
    fromCols(S2Point... columns)
    Constructs a matrix from a series of column vectors.
    static Matrix3x3
    Constructs a matrix from a series of column vectors.
    double
    get(int row, int col)
    Gets a value.
    getCol(int col)
    Return the vector of the given column.
    int
     
    Returns the result of multiplying this x m.
    int
    Returns the number of rows in this matrix.
    void
    set(int row, int col, double value)
    Sets a value.
    Returns the transpose of this.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • values

      private final double[] values
    • rows

      private final int rows
    • cols

      private final int cols
  • Constructor Details

    • Matrix3x3

      public Matrix3x3(int cols, double... values)
      Constructs a 2D matrix of the given width and values.
    • Matrix3x3

      public Matrix3x3(int rows, int cols)
      Constructs a 2D matrix of a fixed size.
  • Method Details

    • fromCols

      public static Matrix3x3 fromCols(S2Point... columns)
      Constructs a matrix from a series of column vectors.
    • fromCols

      public static Matrix3x3 fromCols(List<S2Point> frame)
      Constructs a matrix from a series of column vectors.
    • rows

      public int rows()
      Returns the number of rows in this matrix.
    • cols

      public int cols()
      Returns the number of columns in this matrix.
    • set

      public void set(int row, int col, double value)
      Sets a value.
    • get

      public double get(int row, int col)
      Gets a value.
    • transpose

      @CheckReturnValue public Matrix3x3 transpose()
      Returns the transpose of this.
    • mult

      Returns the result of multiplying this x m.
    • getCol

      public S2Point getCol(int col)
      Return the vector of the given column.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object