alugowski/fast_matrix_market

Support skipping values

alugowski opened this issue · 2 comments

Support ability to read just the indices and ignore the values, i.e. pretend the file is a pattern file even if it isn't.

Example use case: unweighted graph algorithms.

Corner cases to think about:

  • should the value be initialized to a fixed value or left untouched? Allow both?
  • what should happen with array files? Both read into an array and read into sparse struct

Implementation idea:

Add flag to read_options. Flag could be set automatically if the value type is pattern_placeholder_type, but should not require that.

Potentially make the flag have three states:

  • read values normally
  • skip values, but set the struct to a fixed value (pretend it's a pattern)
  • skip values and don't touch the output struct at all

For the third state, I wonder how fmm treat zero values in matrix market file. Like 12 3 0.

Does fmm skip those lines?