输出写入使用的记事本UJMP矩阵

时间:2018-07-15 18:42:17

标签: java sparse-matrix printwriter ujmp

我正在使用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矩阵?

0 个答案:

没有答案