Package com.powsybl.math.matrix
Class AbstractMatrix
- java.lang.Object
-
- com.powsybl.math.matrix.AbstractMatrix
-
- All Implemented Interfaces:
Matrix
- Direct Known Subclasses:
DenseMatrix
,SparseMatrix
public abstract class AbstractMatrix extends Object implements Matrix
Abstract class for matrix that provides an implementation for common methods.- Author:
- Geoffroy Jamgotchian
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.math.matrix.Matrix
Matrix.Element, Matrix.ElementHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractMatrix()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Matrix
add(Matrix other)
Addition the matrix with another one (this + other).protected void
checkBounds(int i, int j)
Check that rowi
and columnj
are in matrix bounds.Matrix
copy(MatrixFactory factory)
Copy this matrix using another implementation.protected abstract int
getEstimatedNonZeroValueCount()
Get an estimation of non zero value count.Matrix
times(Matrix other)
Multiply the matrix by another one.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.math.matrix.Matrix
add, add, addAndGetElement, addAndGetIndex, addAtIndex, addQuickAtIndex, addValue, decomposeLU, getColumnCount, getM, getN, getRowCount, iterateNonZeroValue, iterateNonZeroValueOfColumn, print, print, reset, set, setAtIndex, setQuickAtIndex, setValue, times, to, toDense, toSparse, transpose
-
-
-
-
Method Detail
-
getEstimatedNonZeroValueCount
protected abstract int getEstimatedNonZeroValueCount()
Get an estimation of non zero value count.- Returns:
- an estimation of non zero value count
-
checkBounds
protected void checkBounds(int i, int j)
Check that rowi
and columnj
are in matrix bounds.- Parameters:
i
- row indexj
- column index
-
copy
public Matrix copy(MatrixFactory factory)
Copy this matrix using another implementation. This method is not allowed to return this.
-
add
public Matrix add(Matrix other)
Description copied from interface:Matrix
Addition the matrix with another one (this + other). The resulting matrix has the same implementation as this matrix.
-
-