#ifndef _WIN32
#include "../include/lminmaxgd.h"
#else
#include "..\include\lminmaxgd.h"
using namespace std;
#endif


#include "..\src\gd.cpp"
#include "..\src\poly.cpp"
#include "..\src\serie.cpp"
#include "..\src\smatrix.cpp"
#include "..\src\tools.cpp"
#include <iostream>

using namespace std;
using namespace mmgd; //Seulement avec la derniere version


int main()
{
    int n=6; //Etats
	int p=2; //Entress
	int q=1; //Sorties


    smatrix A(n,n);
    smatrix B(n,p);
    smatrix C(q,n);
    smatrix H(q,p);
    smatrix As(n,n);
    smatrix CAs(q,n);


    A(0,1)=gd(1,0); //gd(1,0);
    A(1,0)=gd(0,2);
    A(2,3)=gd(1,0); //gd(1,0);
    A(3,2)=gd(0,3);
    A(4,1)=gd(0,3);
    A(4,3)=gd(0,5);
    A(4,5)=gd(2,0);
    A(5,4)=gd(0,2);
    cout << "A :\n" << A << endl;

    B(0,0)=e;
    B(2,1)=e;
    cout << "B :\n" << B << endl;

    C(0,5)=e;
    cout << "C :\n" << C << endl;

    As=star(A);
    CAs=otimes(C,As); //CA(1,6); observability matrix
    H=otimes(CAs,B);//H(1,2); CA*B tf

    cout << "A* :\n" << As << endl;
    cout << "CA* :\n" << CAs << endl;
	cout << "H :\n" << H << endl;

	smatrix A2 = otimes(A,A);
	cout << "A2 :\n" << A2 << endl;


    return 0;
}
