1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
#include <flens/flens.cxx>
#include <iostream>

using namespace flens;
using namespace std;

int
main()
{
    GeMatrix<FullStorage<double> >   A(4,4), B(4,4), C(4,4);

    A =  1,  2,  3,  4,
         5,  6,  7,  8,
         9101112,
        13141516;

    B = 17181920,
        21222324,
        25262728,
        29303132;

    auto U = A.upper();
    auto S = A.upper().symmetric();

    cout << "A = " << A << endl;
    cout << "B = " << B << endl;
    cout << "S = " << S << endl;
    cout << "U = " << U << endl;

//
//  compute  C = A*B
//
    C = A*B;

    cout << "C = A*B = " << C << endl;

//
//  compute  C = A^T*B
//
    C = transpose(A)*B;

    cout << "C = A^T*B = " << C << endl;

//
//  compute  C = S*B
//
    C = S*B;

    cout << "C = S*B = " << C << endl;

//
//  compute  B = U*B
//
    B = U*B;

    cout << "B = U*B = " << B << endl;
}