I have a matrix-like data structure that I want to preserve in its original form as much as maybe allowed in a language such as Java. It is as follows:
a() b() ... n()
a() .1 .2 ... .9
b() .4 .3 ... .6
..
.
n() .1 .7 ... .4
One could imagine a(), b(), ... n() as instances of an object. The only reason why I have the parenthesis here is because I'm using a domain-specific language to solve the problem. But, I could very well raise this question for mainstream languages such as Java. How would I design a data structure, (or use an offered type) and subsequently an easy function call, where I could pass in two object parameters (i.e. (a,b) ) and get back the numeric value. The constraint is to not to resort to define a complicated class defining a series of sub hashmap fields and so on and so forth to store the data one row or column a time. Does Java provide a built in type to offer this as a direct solution?