summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimon2008-07-22 09:59:12 +0000
committersimon2008-07-22 09:59:12 +0000
commita957d9dca9cd35129023bedf1f2de260c7d1a867 (patch)
tree2babbb8cd55d6e6bb33939260c06c35a64a268ff /src
parente340a75afc0ca2f3e04baffde4f2d095117c1321 (diff)
downloadscilab2c-a957d9dca9cd35129023bedf1f2de260c7d1a867.tar.gz
scilab2c-a957d9dca9cd35129023bedf1f2de260c7d1a867.tar.bz2
scilab2c-a957d9dca9cd35129023bedf1f2de260c7d1a867.zip
added the trace functions, modifying matrixDivision Functions but still no change, these which worked are still working and those which failed are still failing
Diffstat (limited to 'src')
-rwxr-xr-xsrc/configure3
-rw-r--r--src/configure.ac1
-rw-r--r--src/includes/lapack.h26
-rw-r--r--src/matrixOperations/Makefile.am3
-rw-r--r--src/matrixOperations/Makefile.in3
-rw-r--r--src/matrixOperations/division/srdiva.c241
-rw-r--r--src/matrixOperations/division/testMatrixLDivision.c4
-rw-r--r--src/matrixOperations/division/testMatrixRDivision.c156
-rw-r--r--src/matrixOperations/division/zrdiva.c1
-rw-r--r--src/matrixOperations/includes/matrixTrace.h62
-rw-r--r--src/matrixOperations/trace/Makefile.am41
-rw-r--r--src/matrixOperations/trace/Makefile.in632
-rw-r--r--src/matrixOperations/trace/ctracea.c31
-rw-r--r--src/matrixOperations/trace/dtracea.c27
-rw-r--r--src/matrixOperations/trace/stracea.c27
-rw-r--r--src/matrixOperations/trace/testMatrixTrace.c237
-rw-r--r--src/matrixOperations/trace/ztracea.c31
17 files changed, 1387 insertions, 139 deletions
diff --git a/src/configure b/src/configure
index 5c6bac99..4d8fee99 100755
--- a/src/configure
+++ b/src/configure
@@ -22153,7 +22153,7 @@ fi
###### Creation of the header file (machine.h)
#######################
-ac_config_files="$ac_config_files Makefile lib/blas/Makefile lib/lapack/Makefile type/Makefile matrixOperations/Makefile matrixOperations/addition/Makefile matrixOperations/subtraction/Makefile matrixOperations/multiplication/Makefile matrixOperations/division/Makefile matrixOperations/cat/Makefile matrixOperations/transpose/Makefile implicitList/Makefile elementaryFunctions/Makefile elementaryFunctions/cos/Makefile elementaryFunctions/cosh/Makefile elementaryFunctions/acos/Makefile elementaryFunctions/acosh/Makefile elementaryFunctions/sin/Makefile elementaryFunctions/sinh/Makefile elementaryFunctions/asin/Makefile elementaryFunctions/asinh/Makefile elementaryFunctions/tan/Makefile elementaryFunctions/tanh/Makefile elementaryFunctions/atan/Makefile elementaryFunctions/atan2/Makefile elementaryFunctions/atanh/Makefile elementaryFunctions/log/Makefile elementaryFunctions/log1p/Makefile elementaryFunctions/log10/Makefile elementaryFunctions/exp/Makefile elementaryFunctions/exp10/Makefile elementaryFunctions/sqrt/Makefile elementaryFunctions/lnp1m1/Makefile elementaryFunctions/pow/Makefile auxiliaryFunctions/Makefile auxiliaryFunctions/abs/Makefile auxiliaryFunctions/find/Makefile auxiliaryFunctions/isempty/Makefile auxiliaryFunctions/isnan/Makefile auxiliaryFunctions/rand/Makefile auxiliaryFunctions/sign/Makefile auxiliaryFunctions/size/Makefile auxiliaryFunctions/length/Makefile auxiliaryFunctions/type/Makefile auxiliaryFunctions/pythag/Makefile statisticsFunctions/Makefile statisticsFunctions/mean/Makefile statisticsFunctions/sum/Makefile string/Makefile string/disp/Makefile string/string/Makefile"
+ac_config_files="$ac_config_files Makefile lib/blas/Makefile lib/lapack/Makefile type/Makefile matrixOperations/Makefile matrixOperations/addition/Makefile matrixOperations/subtraction/Makefile matrixOperations/multiplication/Makefile matrixOperations/division/Makefile matrixOperations/cat/Makefile matrixOperations/transpose/Makefile matrixOperations/trace/Makefile implicitList/Makefile elementaryFunctions/Makefile elementaryFunctions/cos/Makefile elementaryFunctions/cosh/Makefile elementaryFunctions/acos/Makefile elementaryFunctions/acosh/Makefile elementaryFunctions/sin/Makefile elementaryFunctions/sinh/Makefile elementaryFunctions/asin/Makefile elementaryFunctions/asinh/Makefile elementaryFunctions/tan/Makefile elementaryFunctions/tanh/Makefile elementaryFunctions/atan/Makefile elementaryFunctions/atan2/Makefile elementaryFunctions/atanh/Makefile elementaryFunctions/log/Makefile elementaryFunctions/log1p/Makefile elementaryFunctions/log10/Makefile elementaryFunctions/exp/Makefile elementaryFunctions/exp10/Makefile elementaryFunctions/sqrt/Makefile elementaryFunctions/lnp1m1/Makefile elementaryFunctions/pow/Makefile auxiliaryFunctions/Makefile auxiliaryFunctions/abs/Makefile auxiliaryFunctions/find/Makefile auxiliaryFunctions/isempty/Makefile auxiliaryFunctions/isnan/Makefile auxiliaryFunctions/rand/Makefile auxiliaryFunctions/sign/Makefile auxiliaryFunctions/size/Makefile auxiliaryFunctions/length/Makefile auxiliaryFunctions/type/Makefile auxiliaryFunctions/pythag/Makefile statisticsFunctions/Makefile statisticsFunctions/mean/Makefile statisticsFunctions/sum/Makefile string/Makefile string/disp/Makefile string/string/Makefile"
@@ -22775,6 +22775,7 @@ do
"matrixOperations/division/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/division/Makefile" ;;
"matrixOperations/cat/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/cat/Makefile" ;;
"matrixOperations/transpose/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/transpose/Makefile" ;;
+ "matrixOperations/trace/Makefile") CONFIG_FILES="$CONFIG_FILES matrixOperations/trace/Makefile" ;;
"implicitList/Makefile") CONFIG_FILES="$CONFIG_FILES implicitList/Makefile" ;;
"elementaryFunctions/Makefile") CONFIG_FILES="$CONFIG_FILES elementaryFunctions/Makefile" ;;
"elementaryFunctions/cos/Makefile") CONFIG_FILES="$CONFIG_FILES elementaryFunctions/cos/Makefile" ;;
diff --git a/src/configure.ac b/src/configure.ac
index 148e74b9..b2594b3d 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -171,6 +171,7 @@ matrixOperations/multiplication/Makefile
matrixOperations/division/Makefile
matrixOperations/cat/Makefile
matrixOperations/transpose/Makefile
+matrixOperations/trace/Makefile
implicitList/Makefile
elementaryFunctions/Makefile
elementaryFunctions/cos/Makefile
diff --git a/src/includes/lapack.h b/src/includes/lapack.h
index 020b435f..5201f5d6 100644
--- a/src/includes/lapack.h
+++ b/src/includes/lapack.h
@@ -87,4 +87,30 @@ extern double dlacpy_ (char* NORM, int* M, int* N, double* A, int* LDA,
double* B, int* LDB );
+/****** doubleComplex fortran function ************/
+
+extern doubleComplex zlamch_ (char *CMACH, unsigned long int i);
+
+extern double zlange_ (char* NORM, int* M, int* N, doubleComplex* A, int* LDA ,
+ doubleComplex* WORK);
+
+extern doubleComplex zgetrf_ (int* M, int* N , doubleComplex* A , int* LDA , int* IPIV ,
+ int* INFO);
+
+extern doubleComplex zgecon_ (char* NORM, int* N, doubleComplex* A, int* LDA, double* ANORM,
+ double* RCOND, doubleComplex* WORK , double* IWORK, int* INFO ) ;
+
+extern doubleComplex zgetrs_ (char* TRANS, int* N, int* NRHS, doubleComplex* A, int* LDA,
+ int* IPIV, doubleComplex* B, int* LDB, int* INFO ) ;
+
+extern doubleComplex zgelsy_ (int* M, int* N, int* NRHS, doubleComplex* A, int* LDA,
+ doubleComplex* B, int* LDB, int* JPVT, double* RCOND, int* RANK,
+ doubleComplex* WORK, int* LWORK, double* RWORK, int* INFO) ;
+
+
+
+
+
+extern doubleComplex zlacpy_ (char* NORM, int* M, int* N, doubleComplex* A, int* LDA,
+ doubleComplex* B, int* LDB );
#endif /* !__LAPACK_H__ */
diff --git a/src/matrixOperations/Makefile.am b/src/matrixOperations/Makefile.am
index 67dfaccd..8de48bab 100644
--- a/src/matrixOperations/Makefile.am
+++ b/src/matrixOperations/Makefile.am
@@ -16,5 +16,6 @@ SUBDIRS= addition \
division \
cat \
transpose \
- division
+ division \
+ trace
diff --git a/src/matrixOperations/Makefile.in b/src/matrixOperations/Makefile.in
index a265efd6..619708b8 100644
--- a/src/matrixOperations/Makefile.in
+++ b/src/matrixOperations/Makefile.in
@@ -171,7 +171,8 @@ SUBDIRS = addition \
division \
cat \
transpose \
- division
+ division \
+ trace
all: all-recursive
diff --git a/src/matrixOperations/division/srdiva.c b/src/matrixOperations/division/srdiva.c
index f5b21eaa..f6ae4a9d 100644
--- a/src/matrixOperations/division/srdiva.c
+++ b/src/matrixOperations/division/srdiva.c
@@ -15,150 +15,145 @@
/**** Because of problem of conversion float-> double ****/
#include "matrixDivision.h"
#include "lapack.h"
-
-
+#include <string.h>
+#include <stdio.h>
void srdiva ( float* in1, int lines1, int columns1 ,
float* in2, int lines2, int columns2 ,
float* out ){
+ char cNorm = 0;
+ int iExit = 0;
+ int i = 0 ,j = 0 ,ij = 0 ,ji = 0;
+
+ /*temporary variables*/
+ int iWork = 0;
+ int iInfo = 0;
+ int iMax = 0;
+ double dblRcond = 0;
+
+ double dblEps = 0;
+ double dblAnorm = 0;
-/* creation of all temp variable , maybe some of them are not accurate and could be deleted
-**/
- int iexit = 0 ;
- int iwork = 0 ;
- int info = 0 ;
- int imax = 0 ;
- /*int rank = 0 ;*/
-
- int tMinLinCol1 = 0 ;
- int temp = 0;
+ /* these 3 variable are created to permit to use the value in the fortran functions
+ because they need double matrix as arguments and we can't cast directly the pointers
+ without having problems , i know that's ugly */
+ double *dblin1 = NULL;
+ double *dblin2 = NULL;
+ double *dblout = NULL;
+
+ double *pAf = NULL;
+ double *pAt = NULL;
+ double *pBt = NULL;
+ double *pDwork = NULL;
+
+ int *pRank = NULL;
+ int *pIpiv = NULL;
+ int *pJpvt = NULL;
+ int *pIwork = NULL;
- int i = 0 , j = 0 ,ij = 0 ,ji = 0;
-
-
- int* pIpiv = (int*) malloc( sizeof(int) * (unsigned int) columns1);
- int* pIwork = (int*) malloc( sizeof(int) * (unsigned int) columns1);
- /*int* pJpvt = (int*) malloc( sizeof(int) * (unsigned int) lines1);*/
- double* work = NULL;
- double anorm = 0;
- double rcond = 0 ;
- double epsilon = getRelativeMachinePrecision() ;
+ iWork = Max(4 * columns2, Max(Min(lines2, columns2) + 3 * lines2 + 1, 2 * Min(lines2, columns2) + lines1));
+ /* Array allocations*/
+ dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2);
+ dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1);
+ dblout = (double*)malloc(sizeof(double) * (unsigned int)Max(lines2,columns2) * (unsigned int)lines1);
- float* transpOfIn1 = (float*) malloc(sizeof(float) * (unsigned int) lines1 * (unsigned int) columns1);
- float* transpOfIn2 = (float*) malloc(sizeof(float) * (unsigned int) lines2 * (unsigned int) columns2);
-
- float* copyOfTransIn1 = (float*) malloc( sizeof(float) * (unsigned int) lines1 * (unsigned int) columns1);
-
+ pAf = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2);
+ pAt = (double*)malloc(sizeof(double) * (unsigned int)columns2 *(unsigned int) lines2);
+ pBt = (double*)malloc(sizeof(double) * (unsigned int)Max(lines2,columns2) * (unsigned int)lines1);
-
- if (lines1 > columns1)
- tMinLinCol1 = columns1 ;
- else
- tMinLinCol1 = lines1;
-
- if ( (tMinLinCol1 + 3 * lines1 + 1) > (2*tMinLinCol1 + lines2))
- temp = tMinLinCol1 + 3 * lines1 + 1;
- else
- temp = 2*tMinLinCol1 + lines2;
-
- if ( 4* columns1 > temp )
- iwork = 4* columns1 ;
- else
- iwork = temp ;
-
- work = (double*) malloc (sizeof(double) *(unsigned int) iwork );
+ pRank = (int*)malloc(sizeof(int));
+ pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2);
+ pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2);
+ pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2);
- anorm = getOneNorm( &lines1, &columns1 , (double* ) in1 , work);
-
-/* end of allocation area*/
-
+ cNorm = '1';
+ pDwork = (double*)malloc(sizeof(double) * (unsigned int)iWork);
+ dblEps = getRelativeMachinePrecision() ;
+ dblAnorm = dlange_(&cNorm, &lines2, &columns1, dblin2, &lines2, pDwork);
- stransposea ( in1, lines1, columns1, transpOfIn1);
- stransposea ( in2, lines2, columns2, transpOfIn2) ;
-
- if ( lines1 == columns1 )
- {
- srowcata ( in1, lines1, columns1, NULL, 0 , 0 , copyOfTransIn1 ) ;
-
-
- /*/ put here algo of LU fact of in1 dgetrf ( &columns1 , &columns1 , in1 , &columns1 , pIpiv , &info )
- //return value in pIpiv*/
- dgetrf_ ( &columns1 , &columns1 , (double*) in1 , &columns1 , pIpiv , &info );
-
- if ( info == 0 )
+ /*copy and cast all the float value into double value */
+ for ( i = 0 ; i < lines2 * columns2 ; i ++ )
{
- /*/to get 1-norm of in1 put here algo dgecon which return rcond*/
- dgecon_("1" , &columns1, (double*) copyOfTransIn1 , &columns1, &anorm,
- &rcond, work, pIwork, &info);
-
- if ( rcond > sqrt(epsilon ))
- {/* put here algo to resolv linear equation in1 * X = in2 , the return value go in in2
- // put here algo to copy in2 in out */
- resolveSystemLinear (&columns1, &lines2,(double*) copyOfTransIn1, pIpiv,
- (double* )transpOfIn2, &info) ;
- stransposea ( transpOfIn2 , columns2 , lines2 , out) ;
- iexit = 1;
- }
-
+
+ dblin1[i] = (double) in1[i] ;
+ printf ( "dbl in1 = %e \n" , dblin1 [i] );
+ }
+
+ for ( i = 0 ; i < lines1 * columns1 ; i ++ )
+ dblin2[i] = (double) in2[i] ;
+
+
+ /*tranpose A and B*/
+
+ dtransposea(dblin1, lines2, columns2, pAt);
+ dtransposea(dblin2, lines1, columns2, pBt);
+
+ if(lines2 == columns2)
+ {
+ cNorm = 'F';
+ dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2);
+ dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo);
+ if(iInfo == 0)
+ {
+ cNorm = '1';
+ dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo);
+ if(dblRcond > sqrt(dblEps))
+ {
+ cNorm = 'N';
+ dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo);
+ dtransposea(pBt, columns2, lines1, dblout);
+ iExit = 1;
+ }
}
-
}
-
- if ( iexit== 0)
+
+ if(iExit == 0)
{
- rcond = sqrt(epsilon );
- if (lines1 < columns1)
- imax = columns1 ;
- else
- imax = lines1;
-
-
-/* if you uncomment this function you will get a fabulous random number generator
- actually the problem come from the convertion from float* to double*
- that also cause the free() of these cast variables to crash * */
- /* dgelsy_ (&columns1, &lines1, &lines2, (double*) transpOfIn1 , &columns1,
- (double*) transpOfIn2, &imax, pJpvt, &rcond, &rank, work,
- &iwork, &info);*/
-
-
-
- for(j = 0 ; j < lines1 ; j++)
- {
- for(i = 0 ; i < lines2 ; i++)
- {
- ij = i + j * lines2;
- if ( lines1 > columns1 )
- ji = j + i *lines1 ;
- else
- ji = j + i *columns1;
- out[ij] = transpOfIn2[ji];
- }
- }
-
-
+ dblRcond = sqrt(dblEps);
+ cNorm = 'F';
+ iMax = Max(lines2, columns2);
+ memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2);
+ dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax,
+ pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo);
+
+ if(iInfo == 0)
+ {
-
-
+ /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/
+
+ /*Mega caca de la mort qui tue des ours a mains nues
+ mais je ne sais pas comment le rendre "beau" :(*/
+ {
+
+ for(j = 0 ; j < lines2 ; j++)
+ {
+ for(i = 0 ; i < lines1 ; i++)
+ {
+ ij = i + j * lines1;
+ ji = j + i * Max(lines2, columns2);
+ dblout[ij] = pBt[ji];
+ }
+ }
+ }
+ }
}
-
-
- /* then we free all the allocated memory */
-
- free ( pIpiv ) ;
- free ( pIwork) ;
- free ( work ) ;
-
- /* the cast from float* to double* make these 3 functions crashing */
- free (transpOfIn1) ;
- free (transpOfIn2) ;
- free (copyOfTransIn1);
-
-}
+ for ( i = 0 ; i < Max(lines2,columns2) * lines1 ; i++ )
+ out[i] = (float) dblout[i] ;
+
+ free(pAf);
+ free(pAt);
+ free(pBt);
+ free(pRank);
+ free(pIpiv);
+ free(pJpvt);
+ free(pIwork);
+ free(pDwork);
+}
diff --git a/src/matrixOperations/division/testMatrixLDivision.c b/src/matrixOperations/division/testMatrixLDivision.c
index 0dc9a6c6..60c5b021 100644
--- a/src/matrixOperations/division/testMatrixLDivision.c
+++ b/src/matrixOperations/division/testMatrixLDivision.c
@@ -243,7 +243,9 @@ static void dldivaTest ( void )
0.52872556238983059,0.57098625620273025,1.06212082783082407,0.59423966432136910,
0.34731906030365728,-1.35636228486699051,0.60027136476023302,-0.01921912593105047,
-0.26023872041264290,0.60546432820947238,-0.64774098495099597,1.07329929083653908}
-; */
+;
+
+*/
double in1[] = { 4 , 3 , 8 , 9 } ;
diff --git a/src/matrixOperations/division/testMatrixRDivision.c b/src/matrixOperations/division/testMatrixRDivision.c
index bc211664..659aca0e 100644
--- a/src/matrixOperations/division/testMatrixRDivision.c
+++ b/src/matrixOperations/division/testMatrixRDivision.c
@@ -19,13 +19,17 @@
#define LINES2 1
#define COLUMNS 2
+#define ZLINES1 13
+#define ZLINES2 7
+#define ZCOLUMNS 10
+
+
-/*
static void sdivaTest ( void )
{
int i = 0 ;
-
+/*
float in1[] =
{0.51323400903493166f,0.6807207581587136f,0.54669387824833393f,0.24904179340228438f,
0.95017496403306723f,0.91187966475263238f,0.78931419923901558f,0.30985609395429492f,
@@ -202,13 +206,21 @@ float result[] =
-0.07318875604760167f,0.49681103126620946f,0.16658812117729807f,0.19247716660649325f,
0.17479922937365650f,0.20305642078183334f,-0.11893261285117168f,0.52167729786941019f,
-0.26590601210923126f,-0.17052720242327102f};
-
-float out[(COLUMNS)*(LINES2)] ;
+ */
+
+ /*float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ;
+ float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ;
+ float result[] = { 4.0f , 7.5f , 0.0f ,-1.5f };
+float out[(COLUMNS)*(LINES2)] ;*/
- printf("\n>rentre dans fonction \n");
- srdiva ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out ) ;
+ float in1[] = { 1.0f ,3.0f ,2.0f ,4.0f } ;
+ float in2[] = { 1.0f , 2.0f } ;
+ float result[] = { 1.0f , 2.2f };
+ float out [(COLUMNS)*(LINES2)] ;
+
+ srdiva ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ;
printf("\n\n\t>>>>>debut assert\n");
- for ( i = 0 ; i < LINES2 *COLUMNS ; i++ )
+ for ( i = 0 ; i < 4 ; i++ )
{
printf ( "\n %d out : %e result : %e\n" , i , out[i] , result[i] ) ;
assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-6 ) ;
@@ -219,8 +231,6 @@ float out[(COLUMNS)*(LINES2)] ;
-*/
-
@@ -239,10 +249,10 @@ static void drdivaTest ( void )
double out [(COLUMNS)*(LINES2)] ;
drdiva ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ;
- printf("\n\n\t>>>>>debut assert\n");
for ( i = 0 ; i < LINES2 *COLUMNS ; i++ )
{
- printf ( "\n %d out : %e result : %e assert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ;
+ printf ( "*\t\t %d out : %e result : %e assert : %e \n" ,
+ i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ;
assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-15 ) ;
}
@@ -251,12 +261,134 @@ static void drdivaTest ( void )
+
+static void zrdivaTest ( void ){
+ int i = 0 ;
+
+ double tin1 [] =
+ {0.69949407549574971,0.25834653992205858,0.61552664963528514,0.19030105322599411,
+ 0.46075769001618028,0.52200102340430021,0.70538004627451301,0.88748936913907528,
+ 0.18582182424142957,0.09225247148424387,0.37796644819900393,0.93693156912922859,
+ 0.19805216649547219,
+0.47020285483449697,0.37788185989484191,0.36296494491398335,0.27933338703587651,
+ 0.67214426863938570,0.69089507637545466,0.5104757994413376,0.06106034899130464,
+ 0.93353842478245497,0.14489983161911368,0.57212112657725811,0.54598869429901242,
+ 0.05166801903396845,
+0.50110132200643420,0.92609716579318047,0.85469480464234948,0.58570997323840857,
+ 0.8791871047578752,0.25320483185350895,0.7903951373882592,0.63298055250197649,
+ 0.86023237137123942,0.90196201950311661,0.31587493652477860,0.40010235738009214,
+ 0.11108959605917335,
+0.47051278315484524,0.53627631859853864,0.28784319106489420,0.87401255918666720,
+ 0.07408339157700539,0.28149573365226388,0.70837680157274008,0.16526474570855498,
+ 0.26673525758087635,0.88194080116227269,0.35371549893170595,0.02646211860701442,
+ 0.08616474270820618,
+0.23139652097597718,0.13406464736908674,0.67240026732906699,0.19029983691871166,
+ 0.73075085924938321,0.50484903249889612,0.87911593122407794,0.55444371327757835,
+ 0.2063297093845904,0.40116110350936651,0.45593289798125625,0.69771515764296055,
+ 0.39659122796729207,
+0.49838109035044909,0.14524227706715465,0.90753587335348129,0.10092954570427537,
+ 0.01771899592131376,0.79376714816316962,0.43091466091573238,0.58433785336092114,
+ 0.79542846325784922,0.13906158460304141,0.10127847269177437,0.331680862698704,
+ 0.83444251772016287,
+0.05499405181035399,0.36960034258663654,0.74532664241269231,0.05718118418008089,
+ 0.59996518073603511,0.20857419073581696,0.87988782906904817,0.47828097920864820,
+ 0.71160991629585624,0.85858650319278240,0.80782221304252744,0.51599627826362848,
+ 0.89173404080793262,
+0.88423488661646843,0.70964269945397973,0.66102255787700415,0.72523507243022323,
+ 0.51014349795877934,0.28248664410784841,0.22149151284247637,0.57675753859803081,
+ 0.70482534915208817,0.56079456442967057,0.36288804840296507,0.30883262446150184,
+ 0.98134148679673672,
+0.74284822540357709,0.16163914743810892,0.36525219632312655,0.38350704684853554,
+ 0.11691810050979257,0.89112461265176535,0.06342720007523894,0.62639418430626392,
+ 0.68077020766213536,0.25885968375951052,0.43948043463751674,0.85988187789916992,
+ 0.54828232014551759,
+0.81359952967613935,0.48982370039448142,0.02400260977447033,0.73691955255344510,
+ 0.24111561570316553,0.15296932263299823,0.26483592018485069,0.42981932172551751,
+ 0.76739394571632147,0.87532604997977614,0.37969883717596531,0.30623568268492818,
+ 0.38800517935305834}
+;
+ double tin2[] =
+ {0.10472932783886790,0.76038318127393723,0.03409303957596421,0.14239662420004606,
+ 0.55545594682916999,0.80318974517285824,0.51839923160150647,
+0.15185610298067331,0.58847306622192264,0.25450934842228889,0.99926799396052957,
+ 0.63989769574254751,0.55067161237820983,0.46070076711475849,
+0.59330079378560185,0.65381935704499483,0.41683405218645930,0.99101553857326508,
+ 0.37207804108038545,0.70618240814656019,0.57808654149994254,
+0.60231964103877544,0.57150967465713620,0.05496290419250727,0.12058544857427478,
+ 0.01436204835772514,0.02579512307420373,0.84112487640231848,
+0.43818825250491500,0.46434015966951847,0.41974264057353139,0.80236544925719500,
+ 0.52285881666466594,0.50951210409402847,0.45319801801815629,
+0.78178183268755674,0.77655703714117408,0.04660592041909695,0.51133266882970929,
+ 0.75021018926054239,0.68836286617442966,0.01677561178803444,
+0.93454108992591500,0.56098637636750937,0.22058471059426665,0.76485407538712025,
+ 0.48169769765809178,0.15587856341153383,0.24760220525786281,
+0.5216529071331024,0.08052303874865174,0.44094172399491072,0.89119336148723960,
+ 0.97805908136069775,0.45880937622860074,0.55104400310665369,
+0.09609609050676227,0.41967850551009178,0.75025565037503839,0.72181495930999517,
+ 0.28955410188063979,0.39077644981443882,0.66866181464865804,
+0.48776568192988634,0.46859717695042491,0.35626485198736191,0.34423254663124681,
+ 0.42533078324049711,0.55880581727251410,0.33048649691045284};
+
+ double tresult [] =
+{0.09451169317317064,0.75015055776907902,0.36496074775718695,0.68454978838459446,
+ 0.13580235186649750,-0.73350613524989861,0.36833823393043919,0.27427787570717332,
+ 0.17435767433670571,1.27922130237729870,-0.15718152608891298,-0.66812523122285583,
+ 0.43535989166783623,
+-0.17216817930992268,-1.11920478787033972,0.09365729285784405,-0.91168598672719281,
+ -0.5256902016286176,1.47418373212534837,0.32785551967187748,0.09665910045214705,
+ 0.38963814934750451,-0.74599090807052515,0.77435560834796702,1.17862196275483577,
+ 0.41913747422722752,
+0.65168405083167491,-0.79778304970274549,-0.36689764540805470,-0.07037790812871010,
+ -0.90964747913660449,0.87009086524746737,-0.86086796711204328,0.69420170666117553,
+ 0.39900228216491013,0.01839542030829135,0.34079166496122038,0.94979559344928910,
+ 1.29342689865858507,
+-0.64010890644433138,0.43942520236508265,0.36871562427022309,-0.23543430717113373,
+ 0.9837594524525952,-0.15541789413277388,0.51832027142464965,-0.49730447418173146,
+ 0.37785363034287500,0.05031307256758123,0.14529056591993289,-0.19261761155662854,
+ -0.65165849136819898,
+0.56992829732488970,-0.67626872453203313,0.08987541550832115,-0.27809079516465274,
+ -0.52685742082861620,0.87085948155471882,-0.36015598439076552,0.24628281709439132,
+ 0.16018284982540432,-0.78765458348414275,0.4868803314915888,0.67004786693098373,
+ 1.38638653773561149,
+0.49065638508775172,1.15002211885645633,0.31098171282535453,0.772677804931936,
+ 0.77563266454559698,-0.93158860042668212,0.20092451587523308,0.56834988643083173,
+ -0.03774794264631696,0.70322729924980754,-0.84660509947179974,-0.48910607201144141,
+ -0.91999377725600595,
+0.57044463605090034,0.85729374705550832,0.03549271915962299,1.08806327983132478,
+ 0.40323683962485551,-0.27978276073461661,0.45277262688908537,0.06218152458345420,
+ -0.2153422115217984,0.68840508909853904,0.09945644614561956,-0.17861252621808085,
+ -0.44037299008464365}
+;
+
+ doubleComplex* in1 ;
+ doubleComplex* in2 ;
+ doubleComplex out[ZLINES2*ZLINES1] ;
+ doubleComplex Result[ZLINES1*ZLINES2] ;
+
+ in1 = DoubleComplexMatrix ( tin1 , tin1 , ZLINES1*ZCOLUMNS );
+ in2 = DoubleComplexMatrix ( tin2 , tin2 , ZLINES2*ZCOLUMNS );
+
+ zrdiva ( in1 , ZLINES1 , ZCOLUMNS , in2 , ZLINES2 , ZCOLUMNS , out) ;
+
+ for ( i = 0 ; i < ZLINES2*ZCOLUMNS ; i++ )
+ {
+ Result[i] = DoubleComplex ( tresult[i] , 0 ) ;
+
+ assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-17 );
+ assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-17 ) ;
+
+ }
+}
+
static int testRDiva (void) {
printf("\n>>>> Right Tests\n");
- /*sdivaTest();*/
+ printf("\n\t>>>> Float real Tests\n");
+ sdivaTest();
printf("\n\t>>>> Double real Tests\n");
drdivaTest();
+ printf("\n\t>>>> Double complex Tests\n");
+ zrdivaTest();
return 0;
}
diff --git a/src/matrixOperations/division/zrdiva.c b/src/matrixOperations/division/zrdiva.c
index b5bd9dea..7f6f5962 100644
--- a/src/matrixOperations/division/zrdiva.c
+++ b/src/matrixOperations/division/zrdiva.c
@@ -100,6 +100,7 @@ int zrdiva( doubleComplex* in1, int lines1, int columns1 ,
dblRcond = sqrt(dblEps);
cNorm = 'F';
iMax = Max(lines2, columns2);
+ printf ( "columns2 : %d\n" , columns2 ) ;
memset(pJpvt, 0x00,(unsigned int) sizeof(int) *(unsigned int) lines2);
C2F(zgelsy)(&columns2, &lines2, &lines1, poAt, &columns2, poBt, &iMax,
pJpvt, &dblRcond, &pRank[0], poDwork, &iWork, pRwork, &iInfo);
diff --git a/src/matrixOperations/includes/matrixTrace.h b/src/matrixOperations/includes/matrixTrace.h
new file mode 100644
index 00000000..b63ae180
--- /dev/null
+++ b/src/matrixOperations/includes/matrixTrace.h
@@ -0,0 +1,62 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#ifndef __MATRICXTRACE_H__
+#define __MATRICXTRACE_H__
+
+#include "floatComplex.h"
+#include "doubleComplex.h"
+
+
+/*
+**
+** WARNING WE ASSUME MATRIXES TO BE SQUARE
+**
+*/
+
+
+/*
+** \brief Compute the trace of a float scalar matrix.
+** \param in : input array.
+** \param lines : number of lines
+** \param out : float scalar containing the trace.
+*/
+
+void stracea ( float* in ,int lines, float* out ) ;
+
+
+/*
+** \brief Compute the trace of a double scalar matrix.
+** \param in : input array.
+** \param lines : number of lines
+** \param out : double scalar containing the trace.
+*/
+void dtracea ( double* in ,int lines, double* out ) ;
+
+/*
+** \brief Compute the trace of a float complex matrix.
+** \param in : input array.
+** \param lines : number of lines
+** \param out : float complex containing the trace.
+*/
+void ctracea ( floatComplex* in ,int lines, floatComplex* out ) ;
+
+
+/*
+** \brief Compute the trace of a double complex matrix.
+** \param in : input array.
+** \param lines : number of lines
+** \param out : double complex containing the trace.
+*/
+void ztracea ( doubleComplex* in ,int lines, doubleComplex* out ) ;
+
+#endif /* !__MATRICXTRACE_H__ */
diff --git a/src/matrixOperations/trace/Makefile.am b/src/matrixOperations/trace/Makefile.am
new file mode 100644
index 00000000..041245cd
--- /dev/null
+++ b/src/matrixOperations/trace/Makefile.am
@@ -0,0 +1,41 @@
+##
+## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
+##
+## This file must be used under the terms of the CeCILL.
+## This source file is licensed as described in the file COPYING, which
+## you should have received as part of this distribution. The terms
+## are also available at
+## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+##
+##
+
+libMatrixTrace_la_CFLAGS = -I $(top_builddir)/type \
+ -I $(top_builddir)/matrixOperations/includes
+
+instdir = $(top_builddir)/lib
+
+pkglib_LTLIBRARIES = libMatrixTrace.la
+
+HEAD = ../includes/matrixTrace.h
+
+libMatrixTrace_la_SOURCES = $(HEAD) \
+ stracea.c \
+ dtracea.c \
+ ctracea.c \
+ ztracea.c
+
+check_PROGRAMS = testMatrixTrace
+
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+ $(top_builddir)/type/libFloatComplex.la \
+ libMatrixTrace.la
+
+check_INCLUDES = -I $(top_builddir)/type \
+ -I $(top_builddir)/matrixOperations/includes
+
+testMatrixTrace_SOURCES = testMatrixTrace.c
+testMatrixTrace_LDADD = $(check_LDADD)
+testMatrixTrace_CFLAGS = $(check_INCLUDES)
+
+TESTS = testMatrixTrace
diff --git a/src/matrixOperations/trace/Makefile.in b/src/matrixOperations/trace/Makefile.in
new file mode 100644
index 00000000..77b56234
--- /dev/null
+++ b/src/matrixOperations/trace/Makefile.in
@@ -0,0 +1,632 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = testMatrixTrace$(EXEEXT)
+TESTS = testMatrixTrace$(EXEEXT)
+subdir = matrixOperations/trace
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/includes/machine.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+pkglibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+libMatrixTrace_la_LIBADD =
+am__objects_1 =
+am_libMatrixTrace_la_OBJECTS = $(am__objects_1) \
+ libMatrixTrace_la-stracea.lo libMatrixTrace_la-dtracea.lo \
+ libMatrixTrace_la-ctracea.lo libMatrixTrace_la-ztracea.lo
+libMatrixTrace_la_OBJECTS = $(am_libMatrixTrace_la_OBJECTS)
+libMatrixTrace_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libMatrixTrace_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am_testMatrixTrace_OBJECTS = \
+ testMatrixTrace-testMatrixTrace.$(OBJEXT)
+testMatrixTrace_OBJECTS = $(am_testMatrixTrace_OBJECTS)
+testMatrixTrace_DEPENDENCIES = $(check_LDADD)
+testMatrixTrace_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixTrace_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libMatrixTrace_la_SOURCES) $(testMatrixTrace_SOURCES)
+DIST_SOURCES = $(libMatrixTrace_la_SOURCES) $(testMatrixTrace_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBMATH = @LIBMATH@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libMatrixTrace_la_CFLAGS = -I $(top_builddir)/type \
+ -I $(top_builddir)/matrixOperations/includes
+
+instdir = $(top_builddir)/lib
+pkglib_LTLIBRARIES = libMatrixTrace.la
+HEAD = ../includes/matrixTrace.h
+libMatrixTrace_la_SOURCES = $(HEAD) \
+ stracea.c \
+ dtracea.c \
+ ctracea.c \
+ ztracea.c
+
+check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
+ $(top_builddir)/type/libFloatComplex.la \
+ libMatrixTrace.la
+
+check_INCLUDES = -I $(top_builddir)/type \
+ -I $(top_builddir)/matrixOperations/includes
+
+testMatrixTrace_SOURCES = testMatrixTrace.c
+testMatrixTrace_LDADD = $(check_LDADD)
+testMatrixTrace_CFLAGS = $(check_INCLUDES)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign matrixOperations/trace/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign matrixOperations/trace/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-pkglibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+ done
+
+clean-pkglibLTLIBRARIES:
+ -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+ @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libMatrixTrace.la: $(libMatrixTrace_la_OBJECTS) $(libMatrixTrace_la_DEPENDENCIES)
+ $(libMatrixTrace_la_LINK) -rpath $(pkglibdir) $(libMatrixTrace_la_OBJECTS) $(libMatrixTrace_la_LIBADD) $(LIBS)
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+testMatrixTrace$(EXEEXT): $(testMatrixTrace_OBJECTS) $(testMatrixTrace_DEPENDENCIES)
+ @rm -f testMatrixTrace$(EXEEXT)
+ $(testMatrixTrace_LINK) $(testMatrixTrace_OBJECTS) $(testMatrixTrace_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-ctracea.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-dtracea.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-stracea.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-ztracea.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixTrace-testMatrixTrace.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+libMatrixTrace_la-stracea.lo: stracea.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-stracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-stracea.Tpo -c -o libMatrixTrace_la-stracea.lo `test -f 'stracea.c' || echo '$(srcdir)/'`stracea.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTrace_la-stracea.Tpo $(DEPDIR)/libMatrixTrace_la-stracea.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stracea.c' object='libMatrixTrace_la-stracea.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-stracea.lo `test -f 'stracea.c' || echo '$(srcdir)/'`stracea.c
+
+libMatrixTrace_la-dtracea.lo: dtracea.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-dtracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-dtracea.Tpo -c -o libMatrixTrace_la-dtracea.lo `test -f 'dtracea.c' || echo '$(srcdir)/'`dtracea.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTrace_la-dtracea.Tpo $(DEPDIR)/libMatrixTrace_la-dtracea.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtracea.c' object='libMatrixTrace_la-dtracea.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-dtracea.lo `test -f 'dtracea.c' || echo '$(srcdir)/'`dtracea.c
+
+libMatrixTrace_la-ctracea.lo: ctracea.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-ctracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-ctracea.Tpo -c -o libMatrixTrace_la-ctracea.lo `test -f 'ctracea.c' || echo '$(srcdir)/'`ctracea.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTrace_la-ctracea.Tpo $(DEPDIR)/libMatrixTrace_la-ctracea.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctracea.c' object='libMatrixTrace_la-ctracea.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-ctracea.lo `test -f 'ctracea.c' || echo '$(srcdir)/'`ctracea.c
+
+libMatrixTrace_la-ztracea.lo: ztracea.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-ztracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-ztracea.Tpo -c -o libMatrixTrace_la-ztracea.lo `test -f 'ztracea.c' || echo '$(srcdir)/'`ztracea.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTrace_la-ztracea.Tpo $(DEPDIR)/libMatrixTrace_la-ztracea.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztracea.c' object='libMatrixTrace_la-ztracea.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-ztracea.lo `test -f 'ztracea.c' || echo '$(srcdir)/'`ztracea.c
+
+testMatrixTrace-testMatrixTrace.o: testMatrixTrace.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -MT testMatrixTrace-testMatrixTrace.o -MD -MP -MF $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo -c -o testMatrixTrace-testMatrixTrace.o `test -f 'testMatrixTrace.c' || echo '$(srcdir)/'`testMatrixTrace.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo $(DEPDIR)/testMatrixTrace-testMatrixTrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTrace.c' object='testMatrixTrace-testMatrixTrace.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -c -o testMatrixTrace-testMatrixTrace.o `test -f 'testMatrixTrace.c' || echo '$(srcdir)/'`testMatrixTrace.c
+
+testMatrixTrace-testMatrixTrace.obj: testMatrixTrace.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -MT testMatrixTrace-testMatrixTrace.obj -MD -MP -MF $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo -c -o testMatrixTrace-testMatrixTrace.obj `if test -f 'testMatrixTrace.c'; then $(CYGPATH_W) 'testMatrixTrace.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTrace.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo $(DEPDIR)/testMatrixTrace-testMatrixTrace.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTrace.c' object='testMatrixTrace-testMatrixTrace.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -c -o testMatrixTrace-testMatrixTrace.obj `if test -f 'testMatrixTrace.c'; then $(CYGPATH_W) 'testMatrixTrace.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTrace.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *$$ws$$tst$$ws*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *$$ws$$tst$$ws*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+ for dir in "$(DESTDIR)$(pkglibdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-pkglibLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkglibLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkglibLTLIBRARIES install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-pkglibLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/matrixOperations/trace/ctracea.c b/src/matrixOperations/trace/ctracea.c
new file mode 100644
index 00000000..28829cb5
--- /dev/null
+++ b/src/matrixOperations/trace/ctracea.c
@@ -0,0 +1,31 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "matrixTrace.h"
+
+void ctracea ( floatComplex* in ,int lines, floatComplex* out ){
+
+
+ int i = 0 ;
+ float rout = 0.0f ;
+ float iout = 0.0f ;
+
+ for ( i = 0 ; i < lines ; ++i)
+ {
+ rout += creals (in[i*lines + i] ) ;
+ iout += cimags (in[i*lines + i] ) ;
+ }
+
+ *out = FloatComplex ( rout , iout ) ;
+}
+
+
diff --git a/src/matrixOperations/trace/dtracea.c b/src/matrixOperations/trace/dtracea.c
new file mode 100644
index 00000000..330064b1
--- /dev/null
+++ b/src/matrixOperations/trace/dtracea.c
@@ -0,0 +1,27 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "matrixTrace.h"
+
+void dtracea ( double* in ,int lines, double* out ){
+
+
+ int i = 0 ;
+ *out = 0 ;
+
+ for ( i = 0 ; i < lines ; ++i)
+ *out += in[i*lines + i] ;
+
+
+}
+
+
diff --git a/src/matrixOperations/trace/stracea.c b/src/matrixOperations/trace/stracea.c
new file mode 100644
index 00000000..b35a82c9
--- /dev/null
+++ b/src/matrixOperations/trace/stracea.c
@@ -0,0 +1,27 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "matrixTrace.h"
+
+void stracea ( float* in ,int lines, float* out ){
+
+
+ int i = 0 ;
+ *out = 0 ;
+
+ for ( i = 0 ; i < lines ; ++i)
+ *out += in[i*lines + i] ;
+
+
+}
+
+
diff --git a/src/matrixOperations/trace/testMatrixTrace.c b/src/matrixOperations/trace/testMatrixTrace.c
new file mode 100644
index 00000000..1cc25c7d
--- /dev/null
+++ b/src/matrixOperations/trace/testMatrixTrace.c
@@ -0,0 +1,237 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <math.h>
+#include "matrixTrace.h"
+
+#define LINES 10
+static void straceaTest ( void ) {
+
+ float in[] =
+ {0.41574033396318555f,0.49111106572672725f,0.44963645050302148f,0.83262220909819007f,
+ 0.64995764615014195f,0.49560560984537005f,0.61533244187012315f,0.52116033947095275f,
+ 0.31538392649963498f,0.50222720531746745f,
+0.15958226565271616f,0.34022171795368195f,0.96781380381435156f,0.74247795902192593f,
+ 0.23031901288777590f,0.18889334425330162f,0.89581834804266691f,0.45098419673740864f,
+ 0.34899875614792109f,0.05404338985681534f,
+0.38831026805564761f,0.99661536002531648f,0.64890601998195052f,0.01946402387693524f,
+ 0.55043680546805263f,0.56412307033315301f,0.87217613449320197f,0.39612928451970220f,
+ 0.74138183100149035f,0.01639390224590898f,
+0.94154607132077217f,0.02153958659619093f,0.25446669198572636f,0.80160319153219461f,
+ 0.30389970541000366f,0.85622101929038763f,0.83897679112851620f,0.72408697474747896f,
+ 0.97027219459414482f,0.60508118104189634f,
+0.47229793528094888f,0.68768908223137259f,0.19239750178530812f,0.25545394374057651f,
+ 0.03710305178537965f,0.07947642868384719f,0.20409553544595838f,0.67240559635683894f,
+ 0.12765105674043298f,0.29538751533254981f,
+0.85336526390165091f,0.00449241511523724f,0.68614923674613237f,0.26881096139550209f,
+ 0.17038810532540083f,0.61961987055838108f,0.31665382627397776f,0.23861460387706757f,
+ 0.38288621511310339f,0.64512947760522366f,
+0.12077391659840941f,0.63978545414283872f,0.42314558057114482f,0.75584907690063119f,
+ 0.56986862560734153f,0.22410399885848165f,0.70068256510421634f,0.71248416090384126f,
+ 0.48824774986132979f,0.94497666554525495f,
+0.89993809349834919f,0.5416147718206048f,0.67344415932893753f,0.43475896771997213f,
+ 0.00364112667739391f,0.85820947308093309f,0.20731051638722420f,0.32864938955754042f,
+ 0.51919496990740299f,0.5638650292530656f,
+0.43849021615460515f,0.22476492030546069f,0.82706967229023576f,0.64259665226563811f,
+ 0.44915470527485013f,0.71145519940182567f,0.52225506165996194f,0.48377691349014640f,
+ 0.09068560274317861f,0.97863480402156711f,
+0.89760566223412752f,0.73640052601695061f,0.93608058523386717f,0.69578680582344532f,
+ 0.05768106970936060f,0.80260276049375534f,0.94164209719747305f,0.76627670042216778f,
+ 0.68338975030928850f,0.93453497067093849f}
+;
+
+ float Result = 4.9177467138506472f ;
+
+ float out = 0.0f ;
+
+ stracea ( in , LINES , &out ) ;
+
+ assert(fabsf(out - Result) / fabsf( out )< 1e-07);
+
+}
+
+static void dtraceaTest ( void ) {
+
+ double in[] =
+ {0.41574033396318555,0.49111106572672725,0.44963645050302148,0.83262220909819007,
+ 0.64995764615014195,0.49560560984537005,0.61533244187012315,0.52116033947095275,
+ 0.31538392649963498,0.50222720531746745,
+0.15958226565271616,0.34022171795368195,0.96781380381435156,0.74247795902192593,
+ 0.23031901288777590,0.18889334425330162,0.89581834804266691,0.45098419673740864,
+ 0.34899875614792109,0.05404338985681534,
+0.38831026805564761,0.99661536002531648,0.64890601998195052,0.01946402387693524,
+ 0.55043680546805263,0.56412307033315301,0.87217613449320197,0.39612928451970220,
+ 0.74138183100149035,0.01639390224590898,
+0.94154607132077217,0.02153958659619093,0.25446669198572636,0.80160319153219461,
+ 0.30389970541000366,0.85622101929038763,0.83897679112851620,0.72408697474747896,
+ 0.97027219459414482,0.60508118104189634,
+0.47229793528094888,0.68768908223137259,0.19239750178530812,0.25545394374057651,
+ 0.03710305178537965,0.07947642868384719,0.20409553544595838,0.67240559635683894,
+ 0.12765105674043298,0.29538751533254981,
+0.85336526390165091,0.00449241511523724,0.68614923674613237,0.26881096139550209,
+ 0.17038810532540083,0.61961987055838108,0.31665382627397776,0.23861460387706757,
+ 0.38288621511310339,0.64512947760522366,
+0.12077391659840941,0.63978545414283872,0.42314558057114482,0.75584907690063119,
+ 0.56986862560734153,0.22410399885848165,0.70068256510421634,0.71248416090384126,
+ 0.48824774986132979,0.94497666554525495,
+0.89993809349834919,0.5416147718206048,0.67344415932893753,0.43475896771997213,
+ 0.00364112667739391,0.85820947308093309,0.20731051638722420,0.32864938955754042,
+ 0.51919496990740299,0.5638650292530656,
+0.43849021615460515,0.22476492030546069,0.82706967229023576,0.64259665226563811,
+ 0.44915470527485013,0.71145519940182567,0.52225506165996194,0.48377691349014640,
+ 0.09068560274317861,0.97863480402156711,
+0.89760566223412752,0.73640052601695061,0.93608058523386717,0.69578680582344532,
+ 0.05768106970936060,0.80260276049375534,0.94164209719747305,0.76627670042216778,
+ 0.68338975030928850,0.93453497067093849}
+;
+
+ double Result = 4.9177467138506472 ;
+
+ double out = 0 ;
+
+ dtracea ( in , LINES , &out ) ;
+
+ assert(fabs(out - Result) / fabs( out )< 1e-16);
+}
+
+
+
+static void ctraceaTest ( void ) {
+ int i = 0 ;
+
+ float tin[] =
+{0.41574033396318555f,0.49111106572672725f,0.44963645050302148f,0.83262220909819007f,
+ 0.64995764615014195f,0.49560560984537005f,0.61533244187012315f,0.52116033947095275f,
+ 0.31538392649963498f,0.50222720531746745f,
+0.15958226565271616f,0.34022171795368195f,0.96781380381435156f,0.74247795902192593f,
+ 0.23031901288777590f,0.18889334425330162f,0.89581834804266691f,0.45098419673740864f,
+ 0.34899875614792109f,0.05404338985681534f,
+0.38831026805564761f,0.99661536002531648f,0.64890601998195052f,0.01946402387693524f,
+ 0.55043680546805263f,0.56412307033315301f,0.87217613449320197f,0.39612928451970220f,
+ 0.74138183100149035f,0.01639390224590898f,
+0.94154607132077217f,0.02153958659619093f,0.25446669198572636f,0.80160319153219461f,
+ 0.30389970541000366f,0.85622101929038763f,0.83897679112851620f,0.72408697474747896f,
+ 0.97027219459414482f,0.60508118104189634f,
+0.47229793528094888f,0.68768908223137259f,0.19239750178530812f,0.25545394374057651f,
+ 0.03710305178537965f,0.07947642868384719f,0.20409553544595838f,0.67240559635683894f,
+ 0.12765105674043298f,0.29538751533254981f,
+0.85336526390165091f,0.00449241511523724f,0.68614923674613237f,0.26881096139550209f,
+ 0.17038810532540083f,0.61961987055838108f,0.31665382627397776f,0.23861460387706757f,
+ 0.38288621511310339f,0.64512947760522366f,
+0.12077391659840941f,0.63978545414283872f,0.42314558057114482f,0.75584907690063119f,
+ 0.56986862560734153f,0.22410399885848165f,0.70068256510421634f,0.71248416090384126f,
+ 0.48824774986132979f,0.94497666554525495f,
+0.89993809349834919f,0.5416147718206048f,0.67344415932893753f,0.43475896771997213f,
+ 0.00364112667739391f,0.85820947308093309f,0.20731051638722420f,0.32864938955754042f,
+ 0.51919496990740299f,0.5638650292530656f,
+0.43849021615460515f,0.22476492030546069f,0.82706967229023576f,0.64259665226563811f,
+ 0.44915470527485013f,0.71145519940182567f,0.52225506165996194f,0.48377691349014640f,
+ 0.09068560274317861f,0.97863480402156711f,
+0.89760566223412752f,0.73640052601695061f,0.93608058523386717f,0.69578680582344532f,
+ 0.05768106970936060f,0.80260276049375534f,0.94164209719747305f,0.76627670042216778f,
+ 0.68338975030928850f,0.93453497067093849f}
+;
+ floatComplex in [LINES*LINES] ;
+
+ floatComplex Result = FloatComplex ( 4.9177467138506472f, 4.9177467138506472f);
+
+ floatComplex out ;
+
+ for ( i = 0 ; i < LINES*LINES ; i++ )
+ in[i] = FloatComplex ( tin[i] , tin[i] ) ;
+
+ ctracea ( in , LINES , &out ) ;
+
+ assert ( fabs( creals(out) - creals (Result) )/ fabs (creals (out)) < 1e-07 );
+ assert ( fabs( cimags(out) - cimags (Result) )/ fabs (cimags (out)) < 1e-07 );
+
+}
+
+
+
+
+
+static void ztraceaTest ( void ) {
+
+ int i = 0 ;
+
+ double tin[] =
+ {0.41574033396318555,0.49111106572672725,0.44963645050302148,0.83262220909819007,
+ 0.64995764615014195,0.49560560984537005,0.61533244187012315,0.52116033947095275,
+ 0.31538392649963498,0.50222720531746745,
+0.15958226565271616,0.34022171795368195,0.96781380381435156,0.74247795902192593,
+ 0.23031901288777590,0.18889334425330162,0.89581834804266691,0.45098419673740864,
+ 0.34899875614792109,0.05404338985681534,
+0.38831026805564761,0.99661536002531648,0.64890601998195052,0.01946402387693524,
+ 0.55043680546805263,0.56412307033315301,0.87217613449320197,0.39612928451970220,
+ 0.74138183100149035,0.01639390224590898,
+0.94154607132077217,0.02153958659619093,0.25446669198572636,0.80160319153219461,
+ 0.30389970541000366,0.85622101929038763,0.83897679112851620,0.72408697474747896,
+ 0.97027219459414482,0.60508118104189634,
+0.47229793528094888,0.68768908223137259,0.19239750178530812,0.25545394374057651,
+ 0.03710305178537965,0.07947642868384719,0.20409553544595838,0.67240559635683894,
+ 0.12765105674043298,0.29538751533254981,
+0.85336526390165091,0.00449241511523724,0.68614923674613237,0.26881096139550209,
+ 0.17038810532540083,0.61961987055838108,0.31665382627397776,0.23861460387706757,
+ 0.38288621511310339,0.64512947760522366,
+0.12077391659840941,0.63978545414283872,0.42314558057114482,0.75584907690063119,
+ 0.56986862560734153,0.22410399885848165,0.70068256510421634,0.71248416090384126,
+ 0.48824774986132979,0.94497666554525495,
+0.89993809349834919,0.5416147718206048,0.67344415932893753,0.43475896771997213,
+ 0.00364112667739391,0.85820947308093309,0.20731051638722420,0.32864938955754042,
+ 0.51919496990740299,0.5638650292530656,
+0.43849021615460515,0.22476492030546069,0.82706967229023576,0.64259665226563811,
+ 0.44915470527485013,0.71145519940182567,0.52225506165996194,0.48377691349014640,
+ 0.09068560274317861,0.97863480402156711,
+0.89760566223412752,0.73640052601695061,0.93608058523386717,0.69578680582344532,
+ 0.05768106970936060,0.80260276049375534,0.94164209719747305,0.76627670042216778,
+ 0.68338975030928850,0.93453497067093849};
+
+ doubleComplex in [LINES*LINES] ;
+
+ doubleComplex Result = DoubleComplex ( 4.9177467138506472, 4.9177467138506472);
+
+ doubleComplex out ;
+
+
+
+ for ( i = 0 ; i < LINES*LINES ; i++ )
+ in[i] = DoubleComplex ( tin[i] , tin[i] ) ;
+
+ ztracea ( in , LINES , &out ) ;
+
+ assert ( fabs( zreals(out) - zreals (Result) )/ fabs (zreals (out)) < 1e-16 );
+ assert ( fabs( zimags(out) - zimags (Result) )/ fabs (zimags (out)) < 1e-16 );
+
+}
+
+static int testTrace(void) {
+
+ printf("\n>>>> Matrix Trace Tests\n");
+ straceaTest();
+ dtraceaTest();
+ ctraceaTest();
+ ztraceaTest();
+
+ return 0;
+}
+
+
+
+int main(void) {
+ assert(testTrace() == 0);
+ return 0;
+}
+
diff --git a/src/matrixOperations/trace/ztracea.c b/src/matrixOperations/trace/ztracea.c
new file mode 100644
index 00000000..57f136ca
--- /dev/null
+++ b/src/matrixOperations/trace/ztracea.c
@@ -0,0 +1,31 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Allan SIMON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+
+#include "matrixTrace.h"
+
+void ztracea ( doubleComplex* in ,int lines, doubleComplex* out ){
+
+
+ int i = 0 ;
+ double rout = 0 ;
+ double iout = 0 ;
+
+ for ( i = 0 ; i < lines ; ++i)
+ {
+ rout += zreals (in[i*lines + i] ) ;
+ iout += zimags (in[i*lines + i] ) ;
+ }
+
+ *out = DoubleComplex ( rout , iout ) ;
+}
+
+