Unable to create 3x8 matrix having real numbers.

Ananda Murthy R S rsamurti at sancharnet.in
Sun Jan 13 12:56:19 CET 2002


Hello:

The program given below is not compiling.

//Creating a 3x8 Matrix
#include <iostream>
#include <ginac/ginac.h>
using namespace GiNaC;
using namespace std;

int main()
{
   matrix A(3,8,
   lst(-2.902280128,  4.902280128,   3.698135576 , -1.091710896, 
-1.339597088, -3.833588112,   0.1354525359,  0.1354525359,
       14.57598539,   8.663631092,   4.471485536,  -6.163631092, 
-1.031929416,  1.692145555, -11.85191042,    0.5280631913,
      -13.01717766,   5.242845433,   6.808655713,   0.3658471056, 
-1.250335699, -9.401666250,   5.593010537,  -0.1838540200));
   cout << "A = "  << A << endl;
   return 0;
}

But if I change it to a 2 x 8 matrix as shown below it is compiling.

//Creating a 2x8 Matrix
#include <iostream>
#include <ginac/ginac.h>
using namespace GiNaC;
using namespace std;

int main()
{
   matrix A(2,8,
   lst(-2.902280128,  4.902280128,   3.698135576 , -1.091710896, 
-1.339597088, -3.833588112,   0.1354525359,  0.1354525359,
       14.57598539,   8.663631092,   4.471485536,  -6.163631092, 
-1.031929416,  1.692145555, -11.85191042,    0.5280631913));
   cout << "A = "  << A << endl;
   return 0;
}

Can somebody tell me what is the problem? Is there any limit on the 
dimensions of the matrix that can be created in GiNaC?

I am runnilng GiNaC on Linux-Mandrake 8.1.

Thanks in advance,

Sincerely,

Ananda Murthy R S




More information about the GiNaC-list mailing list