[ https://issues.apache.org/jira/browse/MAHOUT-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635670#comment-13635670 ]
Gokhan Capan commented on MAHOUT-1193: -------------------------------------- Is it just me or doesn't it compile because it does not have super-matching constructor and cardinality is not declared? What I understand from the implementation is that we create a Map<Integer, Matrix>, each Entry of which represents a block and the associated DenseMatrix. If I didn't totally misunderstand the implementation, if the blockSize always will be 1, this associates a matrix with each row. Say I want to sacrifice some memory and try to set blockSize to 5, so if there were n actual rows in [row/blockSize, row/blockSize+5), there would be 5-n empty ones, and I am OK with that. Shouldn't we modify the extendToThisRow method such that: int blockIndex = row / blockSize; Matrix block = data.get(blockIndex); if (block == null) { data.put(blockIndex, new DenseMatrix(blockSize, columns)); } else if (!block.hasRow(row)) { block.assignRow(row % blockIndex, new DenseVector(columns)) } rows = Math.max(row + 1, rows); cardinality[ROW] = rows; > We may want a BlockSparseMatrix > ------------------------------- > > Key: MAHOUT-1193 > URL: https://issues.apache.org/jira/browse/MAHOUT-1193 > Project: Mahout > Issue Type: Bug > Reporter: Ted Dunning > Attachments: MAHOUT-1193.patch > > > Here is an implementation. > Is it good enough to commit? > Is it useful? > Is it redundant? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira