Boost logo

Boost :

Subject: Re: [boost] different matrix library?
From: DE (satan66613_at_[hidden])
Date: 2009-08-18 11:48:10

about indexing

first that comes to my mind is loop cascade like

  for (...

awful, i know
then consider a concept of hyperrange (ND-range)

    first(3, 5),
    second(5, 8); //etc.
  matrix2d setup; //2d matrix
  //setting up the setup
  matrix4d m; //say, 4d matrix
  m[first][second] = setup; //assign our setup to referenced
                             //hyperrange (here a 2d matrix)
don't know if it'll help but seems reasonable to me
(i just thought that it's just like slicing)

and to setup the 'setup' matrix we are able to write

  setup[0] = 1, 2, 3; //etc.
  setup[1] = 4, 5, 6; //note overloaded operator,
  setup[2] = 7, 8, 9;

actually this has some connection to rutger's earlier code with


Boost list run by bdawes at, gregod at, cpdaniel at, john at