34 #define MATRIXTEST_VERSION \ 35 "MATRIXTEST V1.0 test matrix functions and operators" 38 #include <tfxx/commandline.h> 40 #include <aff/shaper.h> 53 void dump(
const Tmatrix::Tcoc& m)
56 const int precision=5;
59 for (
int i=m.first(1); i<=m.last(1); ++i)
65 for (
int j=m.first(0); j<=m.last(0); ++j)
69 for (
int i=m.first(1); i<=m.last(1); ++i)
72 cout.precision(precision);
79 #define DUMP( M ) cout << "matrix " << #M << ":" << endl; dump(M); 83 int main(
int iargc,
char* argv[])
90 "usage: matrixtest" "\n" 91 " or: matrixtest --help|-h" "\n" 101 using namespace tfxx::cmdline;
102 static Declare options[]=
114 cerr << usage_text << endl;
119 Commandline cmdline(iargc, argv, options);
122 if (cmdline.optset(0))
124 cerr << usage_text << endl;
125 cerr << help_text << endl;
152 Tmatrix A(aff::Shaper(1,4)(1,3));
153 Tmatrix B(aff::Shaper(1,3)(1,5));
aff::Array< double > TDmatrix
TDmatrix transposeNxM(const TDmatrix::Tcoc &A)
calculate transpose of NxM matrix.
matrix and vector operators (prototypes)
void dump(const Tmatrix::Tcoc &m)
TDmatrix dotNxM(const TDmatrix::Tcoc &A, const TDmatrix::Tcoc &B)
dot product for NxM matrices.
int main(int iargc, char *argv[])
#define MATRIXTEST_VERSION