Search in sources :

Example 26 with RowMajorMatrix

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);
}
Also used : RowMajorMatrix(jmbench.matrix.RowMajorMatrix)

Example 27 with RowMajorMatrix

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);
}
Also used : RowMajorMatrix(jmbench.matrix.RowMajorMatrix)

Example 28 with RowMajorMatrix

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;
}
Also used : SimpleMatrix(org.ejml.simple.SimpleMatrix) RowMajorMatrix(jmbench.matrix.RowMajorMatrix)

Example 29 with RowMajorMatrix

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;
}
Also used : DMatrixRMaj(org.ejml.data.DMatrixRMaj) RowMajorMatrix(jmbench.matrix.RowMajorMatrix)

Aggregations

RowMajorMatrix (jmbench.matrix.RowMajorMatrix)29 BenchmarkMatrix (jmbench.interfaces.BenchmarkMatrix)6 DetectedException (jmbench.interfaces.DetectedException)5 MatrixProcessorInterface (jmbench.interfaces.MatrixProcessorInterface)5 DenseMatrix (jeigen.DenseMatrix)1 DMatrixRMaj (org.ejml.data.DMatrixRMaj)1 SimpleMatrix (org.ejml.simple.SimpleMatrix)1