C++ matrix computing class