matrix - library for matrices in c++ -


i have lot of elements in matrix , when access them manually takes pretty long time eliminate bugs arising wrong indexing... there suitable library can keep track of e.g neighbors,the numbering, if element in outer edge or not , on.

e.g.

va= 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 

now write function says like

for every neighbor element @ index 12(which 41)  

i recognize elements @ index 8 (31) , 13 (42).

right i'm using vectors (vector<vector<int>>v;)but code gets pretty difficult , clumsy both write , read since have these annoying if statements in every single function. example:

     (int i=0;i<matrixsize;i++)         if ((i+1)%rowsize!=0){//check it's not in outer edge.     //do } 

what approach suggest? can boost::multiarray me here in way? there other similar?

update:: i'm looking more template can access elements template can matrix arithmetichs.

there this: http://osl.iu.edu/research/mtl/

or this: http://www.robertnz.net/nm_intro.htm

if google bit, there's quite few matrix libraries out there c++.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -