// Targe COPY and transposition / / - * - C - * - //// $ copyright $ / // / ====================== ============================================================================================================================================================================================================= ===
#include
#include
/ * Transpose Matrix a Into Matrix B Using MTL :: Copy.
Sample Output
3X3 [[1, 4, 7], [2, 5, 8], [3, 6, 9]] 3X3 [[1, 2, 3], [4, 5, 6], [7, 8, 9 ] * /
Using namespace MTL;
Typedef Matrix
/ * An external matrix - uses memory from some "outside" source, and just makes that memory look like an MTL Matrix * / typedef matrix
INTMAIN () {Int i; const Int n = 3; Double DA [] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
Ematrix A (DA, N, N); Matrix B (n, n);
Print_all_matrix (a);
// copy the color (i = 0; i Print_all_matrix (b); Return 0;}