
8 Mar
2011
8 Mar
'11
7:44 p.m.
Is it possible to predefine a subrange or project with a specific range so that when called I only had to pass in the matrix? I'm currently dealing with several 9x9 matrices that I need to access the 3x3 submatrix (topleft, topmiddle, topright, etc.). Is there a way to typedef or templatize a subrange or project so that I just need to pass the 9x9 matrix and get the topleft matrix? Example: typedef subrange(input_matrix, 0, 3, 0, 3) topleft; //This is what I want to somehow define. matrix<double> A(9,9); topleft(A) = zero_matrix<double>(3,3); Ryan