When I test it with the following piece of code, I cannot
get the right answer, and the result is "inverseResult: Failed". Anybody can
help me out?
Do I need to update "lu.hpp"
header includes from boost-CVS? if yest, anybody can email me one or tell me how
to get from there?
matrix<float>inverseTest(3,3);
for(int i = 0; i < inverseTest.size1(); ++i)
{
for(int j = 0; j <
inverseTest.size2(); ++j)
{
inverseTest(i, j) = j + 1;
}
}
cout <<
"inverseTest: " << inverseTest << endl;
matrix<float>inverseResult(3,3);
bool status =
InvertMatrix(inverseTest, inverseResult);
if(status)
{
cout << "inverseResult: " << inverseResult <<
endl;
}
else
{
cout << "inverseResult:
Failed" << endl;
}
thanks,
James