Display a Matrix on the Screen
Every matrix can be visualized in a JFrame by invoking:
matrix.showGUI();
Universal Java Matrix Package
Archive for the ‘Examples’ Category.
Every matrix can be visualized in a JFrame by invoking:
matrix.showGUI();
If you have a very large CSV file, that is bigger than the available memory, you can link to the file instead of importing the data:
Matrix hugeMatrix = MatrixFactory.linkToFile(FileFormat.CSV, new File("VeryBigFile.csv"));
However, this matrix will be read-only.
You can also create a ListMatrix instead of an ArrayList. A ListMatrix behaves like a java.List but is a Matrix at the same time:
ListMatrix S = new DefaultListMatrix(); // List methods: S.add(0.5); S.clear(); // Matrix methods: S.exportToFile(someFile); S.showGUI(); Matrix P = S.plus(5).times(2); // but: P is not a ListMatrix anymore
The same works also for maps:
MapMatrix map = new DefaultMapMatrix();
map.put(key,o);
Matrix m = MatrixFactory.sparse(10, 10);
Matrix m = MatrixFactory.zeros(10, 10);