I want to create a Sparse Matrix using Universal Java Matrix package(UJMP)(https://ujmp.org/). I download a zip file (https://github.com/ujmp/universal-java-matrix-package) name universal-java-matrix-package-master. Unzip it.
I am using intellij Idea for java program. I create a folder UJMP in Intellij as java project and create a java file uj under the src folder of UJMP folder. Here I copy paste universal-java-matrix-package-master folder.
Now I write down code in my Uj.java file.
import org.ujmp.core.Matrix;
import org.ujmp.core.SparseMatrix;
public class Uj {
public static void main(String args[]){
Matrix sparse = SparseMatrix.Factory.zeros(4, 4);}}
Here I getting an error : Required: org.ujmp.core.Matrix Found: org.ujmp.core.SparseMatrix
To fix this problem I try something. I change my code as shown below
import org.ujmp.core.Matrix;
import org.ujmp.core.SparseMatrix;
public class Uj {
public static void main(String args[]){
SparseMatrix sparse = SparseMatrix.Factory.zeros(4, 4);
sparse.setAsDouble(2.0,0,0); }}
After change this previous error gone new error occurred that cannot resolve method setAsDouble
.
For better understanding I attached a screenshot with this question
What should I do to fix this error?