Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // TODO: Is there a way for this method to get the rowSize of the matrix without us providing it?
- public static void printSpareMatrix(String i_matName, PnSparseMatrix i_mat, int i_row) {
- for (int row = 0; row < i_row; row += 1) {
- StringBuilder debugMsg = new StringBuilder();
- final PiVector colInx = i_mat.getColIndices(row);
- for (int i = 0; i < colInx.getSize(); i += 1) {
- debugMsg.append("G[").append(row).append("][").append(colInx.getEntry(i)).append("]=").append(i_mat.getEntry(
- row,
- colInx.getEntry(i))).append("\t");
- }
- PsDebug.message(debugMsg.toString());
- }
- }
Add Comment
Please, Sign In to add comment