Thank you!
However, I tried the following array on SymEigenValueVector and the Eigen Vectors that the pgm prints out, seem to be wrong.
If the input matrix should be a single memory block with a double *, how is the matrix read from this memory block (row-wise, or column-wise)?
int main()
{
int i, j;
double * array;
double * EValues;
double * EVectors;
EValues = (double *) malloc(2*sizeof(double));
EVectors = (double *) malloc(4*sizeof(double));
array = (double *) malloc(4*sizeof(double));
array[0] = 2;
array[1] = -1;
array[2] = 0;
array[3] = 1;
SymEigenValueVector (array, 2, 1, EValues,
EVectors);
Cls ();
for (i=0; i<2;i++) {
printf("evalues = %f\n",EValues[i]);
}
printf("===================
=====\n");
for (i=0; i<4;i++) {
printf("EVectors = %f\n",EVectors[i]);
}
return 0;
}
evalues = 2.000000
evalues = 1.000000
========================
EVectors = 1.000000
EVectors = 0.000000
EVectors = 0.000000
EVectors = 1.000000
Thank you!