Matrix manipulation library in C++