A matrix calculation library