use of jmbench.matrix.RowMajorMatrix in project Java-Matrix-Benchmark by lessthanoptimal.
the class EigSymmOverflow method createMatrix.
@Override
protected void createMatrix(int m, int n) {
A = RowMajorOps.createSymmetric(m, -1, 1, rand);
Ascaled = new RowMajorMatrix(m, m);
L = new RowMajorMatrix(m, m);
R = new RowMajorMatrix(m, m);
}
use of jmbench.matrix.RowMajorMatrix in project Java-Matrix-Benchmark by lessthanoptimal.
the class SolverOverflow method evaluateOverflowSolver.
private void evaluateOverflowSolver(int m, int n) {
// avoid declaring new memory, which is important when prcessing large matrices
if (A_scale.data.length >= m * n) {
A_scale.reshape(m, n);
} else {
A_scale = new RowMajorMatrix(m, n);
}
if (b_scale.data.length >= m) {
b_scale.reshape(m, 1);
y.reshape(m, 1);
} else {
b_scale = new RowMajorMatrix(m, 1);
y = new RowMajorMatrix(m, 1);
}
reason = OutputError.NO_ERROR;
int where = search.findCriticalPoint(0, findMaxPow(scaling));
foundResult = Math.pow(scaling, where);
}
use of jmbench.matrix.RowMajorMatrix in project Java-Matrix-Benchmark by lessthanoptimal.
the class EjmlSimpleAlgorithmFactory method convertToRowMajor.
@Override
public RowMajorMatrix convertToRowMajor(BenchmarkMatrix input) {
SimpleMatrix m = input.getOriginal();
RowMajorMatrix out = new RowMajorMatrix(1, 1);
out.data = m.getDDRM().data;
out.numCols = m.getDDRM().numCols;
out.numRows = m.getDDRM().numRows;
return out;
}
use of jmbench.matrix.RowMajorMatrix in project Java-Matrix-Benchmark by lessthanoptimal.
the class EjmlAlgorithmFactory method convertToRowMajor.
@Override
public RowMajorMatrix convertToRowMajor(BenchmarkMatrix input) {
DMatrixRMaj m = ((EjmlBenchmarkMatrix) input).mat;
RowMajorMatrix out = new RowMajorMatrix(1, 1);
out.data = m.data;
out.numCols = m.numCols;
out.numRows = m.numRows;
return out;
}
Aggregations