Package com.google.common.geometry
Class Matrix3x3
- java.lang.Object
-
- com.google.common.geometry.Matrix3x3
-
@GwtCompatible final class Matrix3x3 extends java.lang.Object
A simple 3x3 matrix.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
cols()
Returns the number of columns in this matrix.boolean
equals(java.lang.Object o)
static Matrix3x3
fromCols(S2Point... columns)
Constructs a matrix from a series of column vectors.static Matrix3x3
fromCols(java.util.List<S2Point> frame)
Constructs a matrix from a series of column vectors.double
get(int row, int col)
Gets a value.S2Point
getCol(int col)
Return the vector of the given column.int
hashCode()
Matrix3x3
mult(Matrix3x3 m)
Returns the result of multiplying this x m.int
rows()
Returns the number of rows in this matrix.void
set(int row, int col, double value)
Sets a value.Matrix3x3
transpose()
Returns the transpose of this.
-
-
-
Method Detail
-
fromCols
public static Matrix3x3 fromCols(S2Point... columns)
Constructs a matrix from a series of column vectors.
-
fromCols
public static Matrix3x3 fromCols(java.util.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
@CheckReturnValue public Matrix3x3 mult(Matrix3x3 m)
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(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-