I have a domain D
, and I want to use it to index several matrices A
. Something of the form
var dom: domain(1) = {0..5};
var mats: [dom] <?>;
var a0 = [[0.0, 0.1, 0.2], [0.3, 0.4, 0.5]];
var a1 = [[1.0, 1.1, 1.2, 1.3], [1.4, 1.5, 1.6, 1.7]];
mats[0] = a0;
mats[1] = a1;
Each a
will be 2D but have different sizes. Yes, some of these will be sparse (but need not be for purposes of this question)
== UPDATE ==
For clarity, I have a series of layers (it's a neural net), say 1..15. I created var layerDom = {1..15} Each layer has multiple objects associated with it, like error so I have
var errors: [layerDom] real; // Just a number
And I'd like to have
var Ws: [layerDom] <matrixy thingy>; // Weight matrices all of different shape.