jklew: Added functions to matrix.h and matrix.cc