I’m looking for a named matrix that acts like arrayfields so you can
get and set cells based on a name and/or an index. This is array
x = ArrayFields.new(:a,:b,:c,:d)
=> [:b, :d]
I basically want that but in two dimensions.
x = NamedMatrix.new
x.xs = %w(a b c d) # the names of the x axis
x.ys = %w(e f g h) # the names of the y axis
So that x[:a][:f] is the same as x for getting and setting. Also
have some dumping mechanism to get an array of arrays or arrays of
hashes or even csv or some other 2D dump.
I don’t think this is too tough to write especially with arrayfields
but was wondering if anyone has done it yet.