Package com.apple.foundationdb.linear
Class ColumnMajorRealMatrix
java.lang.Object
com.apple.foundationdb.linear.ColumnMajorRealMatrix
- All Implemented Interfaces:
LinearOperator,RealMatrix,VectorOperator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(RealVector vector) Apply this operator to the vector passed in.final booleandouble[]getColumn(int column) double[][]doublegetEntry(int row, int column) intintdouble[][]inthashCode()multiply(RealMatrix otherMatrix) Multiplies this matrix byotherMatrixand returns the column-major product.subMatrix(int startRow, int lengthRow, int startColumn, int lengthColumn) transposedApply(RealVector vector) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.apple.foundationdb.linear.LinearOperator
getNumDimensions, invertedApply, isSquareMethods inherited from interface com.apple.foundationdb.linear.RealMatrix
isTransposable, valueBasedHashCode, valueEqualsMethods inherited from interface com.apple.foundationdb.linear.VectorOperator
transform, untransform
-
Constructor Details
-
ColumnMajorRealMatrix
public ColumnMajorRealMatrix(@Nonnull double[][] data)
-
-
Method Details
-
getNumRowDimensions
public int getNumRowDimensions()- Specified by:
getNumRowDimensionsin interfaceLinearOperator
-
getNumColumnDimensions
public int getNumColumnDimensions()- Specified by:
getNumColumnDimensionsin interfaceLinearOperator
-
getEntry
public double getEntry(int row, int column) - Specified by:
getEntryin interfaceRealMatrix
-
getColumn
@Nonnull public double[] getColumn(int column) -
transpose
- Specified by:
transposein interfaceRealMatrix
-
apply
Description copied from interface:VectorOperatorApply this operator to the vector passed in.- Specified by:
applyin interfaceRealMatrix- Specified by:
applyin interfaceVectorOperator- Parameters:
vector- the vector- Returns:
- a new vector
-
transposedApply
- Specified by:
transposedApplyin interfaceLinearOperator- Specified by:
transposedApplyin interfaceRealMatrix
-
multiply
Multiplies this matrix byotherMatrixand returns the column-major product.Single universal AXPY fast path: each output column is built by accumulating
this's contiguous columns scaled by the corresponding entries ofB's column. Works regardless ofB's layout because the only thingBcontributes per inner step is a scalar fromgetEntry. SeeRowMajorRealMatrix.multiply(com.apple.foundationdb.linear.RealMatrix)for the longer story on why row-majorAcannot share this shape and instead needs two specialized branches.- Specified by:
multiplyin interfaceRealMatrix- Parameters:
otherMatrix- the right-hand operand; must satisfyotherMatrix.getNumRowDimensions() == this.getNumColumnDimensions()- Returns:
- a new
ColumnMajorRealMatrixcontaining the product
-
subMatrix
@Nonnull public ColumnMajorRealMatrix subMatrix(int startRow, int lengthRow, int startColumn, int lengthColumn) - Specified by:
subMatrixin interfaceRealMatrix
-
toRowMajor
- Specified by:
toRowMajorin interfaceRealMatrix
-
getRowMajorData
@Nonnull public double[][] getRowMajorData()- Specified by:
getRowMajorDatain interfaceRealMatrix
-
toColumnMajor
- Specified by:
toColumnMajorin interfaceRealMatrix
-
getColumnMajorData
@Nonnull public double[][] getColumnMajorData()- Specified by:
getColumnMajorDatain interfaceRealMatrix
-
quickTranspose
- Specified by:
quickTransposein interfaceRealMatrix
-
flipMajor
- Specified by:
flipMajorin interfaceRealMatrix
-
equals
-
hashCode
public int hashCode()
-