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 (...
    for(...
      //etc.

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

  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;
  //etc.

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

-- 
Pavel

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk