i want to use a matrix type data structure for storing and looking up values.
for this 2d array can be used. but i am looking for a better structure.
Requirements:
Matrix columns are fixed, but rows can increase.
for e.g.
see the following structure.
Issue| col1, col2, col3, col4
1 | 0, 1, 0, 0
2 | 0, 1, 0, 1
3 | 1, 1, 0, 0
[values in the structure are used as flag or status field]
now i want this structure to be used for look up
say i want to know the value for issue 2 col1 (which is 0 in above example)
what can be the better structure in ruby for the above scenario?
comments please?
What about a hash?