Search code examples
javamatrixvectorprintingejml

An ejml class for vector implementation


I'm trying to find a class similar to ejml's DMatrixRMaj but for vectors, for doing something like this

double[][] probPoints;
//initialize probPoints
[...]
provad = new DMatrixRMaj(probPoints);
provad.print();

unfortunately, DMatrixRMaj doesn't accept double[] in constructor and I can't find anything in javadoc. Do you know if it exists?


Solution

  • I've found for now an useful workaround

    double[] overUnder12;
    //initialize overUnder12;
    [...]
    new DMatrixRMaj(new double[][]{overUnder12}).print();
    

    Maybe not an official solution, but works very fine at least for what I have to do.