The following non-member functions are avaiable for the matrix class object.
1. matrix<T> pow (const matrix<T>& m, size_t n);
2. matrix<T> abs (const matrix<T>& m);
3. matrix<T> floor (const matrix<T>& m);
4. matrix<T> ceil (const matrix<T>& m);
5. void mswap (matrix<T>& x, matrix<T>& y);
typedef techsoft::matrix<double> Matrix;
Matrix A(4,4), B(4,4);
A.rand();
B = techsoft::abs( A);
B = techsoft::floor( A);
B = techsoft::ceil( A);
B = techsoft::pow( A, 9); // Calculates A9
using techsoft::mswap;
mswap( A, B);
mswap( A[1], B[1]); // Swaps row A[1] and row B[1]
mswap( A(1), A(2)); // Swaps column A(1) and column A(2)
mswap( A.diag(1), A.diag(-1)); // Swaps the upper and lower diagonals just below the main diagonal
mswap( A[2][3], A[3][2]);
mswap( A(2,3), B(3,2));