我正在使用Universal Java Matrix Package创建一个稀疏矩阵。我想将此矩阵写到记事本中。但是我找不到在记事本中写下矩阵的命令。
import org.ujmp.core.Matrix;
import org.ujmp.core.SparseMatrix;
public class Uj {
public static void main(String args[]){
Printwriter write1=new Printwriter("C:\\notpad.txt");
Matrix sparse = SparseMatrix.Factory.zeros(4,4);
sparse.setAsDouble(2.0, 0, 0);
System.out.println(sparse);
}
writer1.close();
}
谁能知道如何在记事本中编写sparse
矩阵?