Guest User

Untitled

a guest
Jun 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // TODO: Is there a way for this method to get the rowSize of the matrix without us providing it?
  2. public static void printSpareMatrix(String i_matName, PnSparseMatrix i_mat, int i_row) {
  3.  
  4. for (int row = 0; row < i_row; row += 1) {
  5. StringBuilder debugMsg = new StringBuilder();
  6. final PiVector colInx = i_mat.getColIndices(row);
  7. for (int i = 0; i < colInx.getSize(); i += 1) {
  8. debugMsg.append("G[").append(row).append("][").append(colInx.getEntry(i)).append("]=").append(i_mat.getEntry(
  9. row,
  10. colInx.getEntry(i))).append("\t");
  11. }
  12. PsDebug.message(debugMsg.toString());
  13. }
  14. }
Add Comment
Please, Sign In to add comment