summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2008-09-09 17:36:18 +0000
committerjofret2008-09-09 17:36:18 +0000
commit8405561a7747d0027538df0523d77da0631ff8fb (patch)
tree9080baeaec1e97265d792d67b4e0154ab9b6e356
parent0d67b0e29996ed0ed54125aa42de343a38513ba2 (diff)
downloadscilab2c-8405561a7747d0027538df0523d77da0631ff8fb.tar.gz
scilab2c-8405561a7747d0027538df0523d77da0631ff8fb.tar.bz2
scilab2c-8405561a7747d0027538df0523d77da0631ff8fb.zip
* eyes -> eye
* Change includes * conj moved from elementary to auxiliary
-rw-r--r--src/matrixOperations/Makefile.in2
-rw-r--r--src/matrixOperations/division/Makefile.am20
-rw-r--r--src/matrixOperations/division/Makefile.in20
-rw-r--r--src/matrixOperations/expm/Makefile.am5
-rw-r--r--src/matrixOperations/expm/Makefile.in5
-rw-r--r--src/matrixOperations/expm/cexpma.c68
-rw-r--r--src/matrixOperations/expm/dexpma.c44
-rw-r--r--src/matrixOperations/expm/sexpma.c46
-rw-r--r--src/matrixOperations/expm/zexpma.c74
-rw-r--r--src/matrixOperations/includes/eye.h (renamed from src/matrixOperations/includes/matrixEyes.h)14
-rw-r--r--src/matrixOperations/includes/matrixExponential.h6
11 files changed, 151 insertions, 153 deletions
diff --git a/src/matrixOperations/Makefile.in b/src/matrixOperations/Makefile.in
index 50fc20d3..ce98fedd 100644
--- a/src/matrixOperations/Makefile.in
+++ b/src/matrixOperations/Makefile.in
@@ -169,7 +169,7 @@ SUBDIRS = addition \
cat \
division \
expm \
- eyes \
+ eye \
hilbert \
infiniteNorm \
multiplication \
diff --git a/src/matrixOperations/division/Makefile.am b/src/matrixOperations/division/Makefile.am
index 22a49a1b..6549944e 100644
--- a/src/matrixOperations/division/Makefile.am
+++ b/src/matrixOperations/division/Makefile.am
@@ -11,9 +11,9 @@
##
libMatrixDivision_la_CFLAGS = -I $(top_builddir)/type \
- -I $(top_builddir)/matrixOperations/includes \
- -I $(top_builddir)/auxiliaryFunctions/includes \
- -I $(top_builddir)/elementaryFunctions/includes
+ -I $(top_builddir)/matrixOperations/includes \
+ -I $(top_builddir)/auxiliaryFunctions/includes \
+ -I $(top_builddir)/elementaryFunctions/includes
instdir = $(top_builddir)/lib
@@ -23,13 +23,13 @@ HEAD = ../includes/matrixDivision.h
libMatrixDivision_la_SOURCES = $(HEAD) \
srdiva.c \
- sldiva.c \
+ sldiva.c \
drdiva.c \
dldiva.c \
zrdiva.c \
- zldiva.c \
- crdiva.c \
- cldiva.c
+ zldiva.c \
+ crdiva.c \
+ cldiva.c
check_PROGRAMS = testMatrixRDivision \
testMatrixLDivision
@@ -39,13 +39,13 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/lib/lapack/libscilapack.la \
$(top_builddir)/matrixOperations/transpose/libMatrixTranspose.la \
$(top_builddir)/matrixOperations/cat/libMatrixConcatenation.la \
- $(top_builddir)/elementaryFunctions/conj/libConj.la \
+ $(top_builddir)/auxiliaryFunctions/conj/libConj.la \
libMatrixDivision.la
check_INCLUDES = -I $(top_builddir)/type \
-I $(top_builddir)/matrixOperations/includes \
- -I $(top_builddir)/auxiliaryFunctions/includes \
- -I $(top_builddir)/elementaryFunctions/includes
+ -I $(top_builddir)/auxiliaryFunctions/includes \
+ -I $(top_builddir)/elementaryFunctions/includes
testMatrixLDivision_SOURCES = testMatrixLDivision.c
testMatrixLDivision_LDADD = $(check_LDADD)
diff --git a/src/matrixOperations/division/Makefile.in b/src/matrixOperations/division/Makefile.in
index 1910c826..b8c8001b 100644
--- a/src/matrixOperations/division/Makefile.in
+++ b/src/matrixOperations/division/Makefile.in
@@ -211,35 +211,35 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
libMatrixDivision_la_CFLAGS = -I $(top_builddir)/type \
- -I $(top_builddir)/matrixOperations/includes \
- -I $(top_builddir)/auxiliaryFunctions/includes \
- -I $(top_builddir)/elementaryFunctions/includes
+ -I $(top_builddir)/matrixOperations/includes \
+ -I $(top_builddir)/auxiliaryFunctions/includes \
+ -I $(top_builddir)/elementaryFunctions/includes
instdir = $(top_builddir)/lib
pkglib_LTLIBRARIES = libMatrixDivision.la
HEAD = ../includes/matrixDivision.h
libMatrixDivision_la_SOURCES = $(HEAD) \
srdiva.c \
- sldiva.c \
+ sldiva.c \
drdiva.c \
dldiva.c \
zrdiva.c \
- zldiva.c \
- crdiva.c \
- cldiva.c
+ zldiva.c \
+ crdiva.c \
+ cldiva.c
check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/type/libFloatComplex.la \
$(top_builddir)/lib/lapack/libscilapack.la \
$(top_builddir)/matrixOperations/transpose/libMatrixTranspose.la \
$(top_builddir)/matrixOperations/cat/libMatrixConcatenation.la \
- $(top_builddir)/elementaryFunctions/conj/libConj.la \
+ $(top_builddir)/auxiliaryFunctions/conj/libConj.la \
libMatrixDivision.la
check_INCLUDES = -I $(top_builddir)/type \
-I $(top_builddir)/matrixOperations/includes \
- -I $(top_builddir)/auxiliaryFunctions/includes \
- -I $(top_builddir)/elementaryFunctions/includes
+ -I $(top_builddir)/auxiliaryFunctions/includes \
+ -I $(top_builddir)/elementaryFunctions/includes
testMatrixLDivision_SOURCES = testMatrixLDivision.c
testMatrixLDivision_LDADD = $(check_LDADD)
diff --git a/src/matrixOperations/expm/Makefile.am b/src/matrixOperations/expm/Makefile.am
index b42fec16..a369b489 100644
--- a/src/matrixOperations/expm/Makefile.am
+++ b/src/matrixOperations/expm/Makefile.am
@@ -41,6 +41,7 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/auxiliaryFunctions/sign/libSign.la \
$(top_builddir)/auxiliaryFunctions/pythag/libPythag.la \
$(top_builddir)/auxiliaryFunctions/frexp/libFrexp.la \
+ $(top_builddir)/auxiliaryFunctions/conj/libConj.la \
$(top_builddir)/elementaryFunctions/sqrt/libSqrt.la \
$(top_builddir)/elementaryFunctions/exp/libExp.la \
$(top_builddir)/elementaryFunctions/cos/libCos.la \
@@ -57,11 +58,9 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/matrixOperations/addition/libMatrixAddition.la \
$(top_builddir)/matrixOperations/subtraction/libMatrixSubtraction.la \
$(top_builddir)/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \
- $(top_builddir)/matrixOperations/eyes/libMatrixEyes.la \
- $(top_builddir)/elementaryFunctions/conj/libConj.la \
+ $(top_builddir)/matrixOperations/eye/libMatrixEye.la \
$(top_builddir)/lib/lapack/libscilapack.la \
$(top_builddir)/lib/blas/libsciblas.la \
- $(top_builddir)/elementaryFunctions/conj/libConj.la \
libMatrixExponential.la
check_INCLUDES = -I $(top_builddir)/type \
diff --git a/src/matrixOperations/expm/Makefile.in b/src/matrixOperations/expm/Makefile.in
index 08e45b1f..91eeb14c 100644
--- a/src/matrixOperations/expm/Makefile.in
+++ b/src/matrixOperations/expm/Makefile.in
@@ -227,6 +227,7 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/auxiliaryFunctions/sign/libSign.la \
$(top_builddir)/auxiliaryFunctions/pythag/libPythag.la \
$(top_builddir)/auxiliaryFunctions/frexp/libFrexp.la \
+ $(top_builddir)/auxiliaryFunctions/conj/libConj.la \
$(top_builddir)/elementaryFunctions/sqrt/libSqrt.la \
$(top_builddir)/elementaryFunctions/exp/libExp.la \
$(top_builddir)/elementaryFunctions/cos/libCos.la \
@@ -243,11 +244,9 @@ check_LDADD = $(top_builddir)/type/libDoubleComplex.la \
$(top_builddir)/matrixOperations/addition/libMatrixAddition.la \
$(top_builddir)/matrixOperations/subtraction/libMatrixSubtraction.la \
$(top_builddir)/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \
- $(top_builddir)/matrixOperations/eyes/libMatrixEyes.la \
- $(top_builddir)/elementaryFunctions/conj/libConj.la \
+ $(top_builddir)/matrixOperations/eye/libMatrixEye.la \
$(top_builddir)/lib/lapack/libscilapack.la \
$(top_builddir)/lib/blas/libsciblas.la \
- $(top_builddir)/elementaryFunctions/conj/libConj.la \
libMatrixExponential.la
check_INCLUDES = -I $(top_builddir)/type \
diff --git a/src/matrixOperations/expm/cexpma.c b/src/matrixOperations/expm/cexpma.c
index 4bb4d836..b58855dd 100644
--- a/src/matrixOperations/expm/cexpma.c
+++ b/src/matrixOperations/expm/cexpma.c
@@ -25,9 +25,9 @@ void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim)
float fltS = 0;
float fltS2 = 0;
double fltCst = 0.5;
-
-
-
+
+
+
floatComplex *pfltMatrixA = NULL;
floatComplex *pfltMatrixX = NULL;
floatComplex *pfltMatrixD = NULL;
@@ -58,34 +58,34 @@ void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim)
fltS2 = spows(2.0f, fltS);
/*A = A./2^s */
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pfltMatrixA[iIndex1] = cdevides ( in[iIndex1] , FloatComplex ( fltS2 , 0 ));
-
+
/* Pade approximation for exp(A)
//X = A */
/*C2F(zcopy)(&iSquare, pfltMatrixA, &iOne, pfltMatrixX, &iOne );*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ;
-
- ceyesa(pfltMatrixEye, _iLeadDim, _iLeadDim);
+
+ ceyea(pfltMatrixEye, _iLeadDim, _iLeadDim);
/*cmulma ( & cfltCst , 1 ,1,
pfltMatrixA , _iLeadDim, _iLeadDim,
pfltMatrixcA);*/
-
+
/* cA = A * c */
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pfltMatrixcA[iIndex1] = ctimess ( pfltMatrixA[iIndex1] , FloatComplex((float) fltCst , 0) ) ;
/*E = Eye + cA*/
-
+
caddma (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare, out ) ;
-
+
/* D = Eye - cA */
-
+
cdiffma (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare,pfltMatrixD ) ;
iMax = 6;
@@ -97,24 +97,24 @@ void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim)
/*Temp = X */
/*C2F(zcopy)(&iSquare, pfltMatrixX, &iOne, pfltMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ;
/* X = A * Temp; */
-
+
cmulma ( pfltMatrixA , _iLeadDim , _iLeadDim,
pfltMatrixTemp , _iLeadDim , _iLeadDim,
pfltMatrixX );
- /* cX = c * X */
-
+ /* cX = c * X */
+
/* cmulma ( & cfltCst , 1 ,1,
pfltMatrixX , _iLeadDim, _iLeadDim,
pfltMatrixcX);*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pfltMatrixcX[iIndex1] = ctimess ( pfltMatrixX[iIndex1] , FloatComplex((float) fltCst , 0) ) ;
-
+
/* E = E + cX */
-
+
caddma ( out, iSquare , pfltMatrixcX , iSquare , out ) ;
if(iFlag == 1) /* D = D + cX */
@@ -123,7 +123,7 @@ void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim)
}
else /* D = D - cX */
{
- cdiffma ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD );
+ cdiffma ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD );
}
/* Toggle iFlag */
@@ -132,31 +132,31 @@ void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim)
/* Temp = E */
/*C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixTemp[iIndex1] = out[iIndex1] ;
-
- /* E = D\E */
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixTemp[iIndex1] = out[iIndex1] ;
+
+ /* E = D\E */
cldiva ( pfltMatrixD , _iLeadDim , _iLeadDim , pfltMatrixTemp , _iLeadDim , _iLeadDim , out ) ;
-
+
/*/ Undo scaling by repeated squaring */
for(iLoop1 = 0 ; iLoop1 < fltS ; iLoop1++)
{
/*//Temp = E */
/*//Temp2 = E */
-
+
/*C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);
C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp2, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
{
pfltMatrixTemp [iIndex1] = out[iIndex1] ;
pfltMatrixTemp2[iIndex1] = out[iIndex1] ;
- }
+ }
- /* E = E*E*/
+ /* E = E*E*/
cmulma ( pfltMatrixTemp , _iLeadDim , _iLeadDim,
pfltMatrixTemp2 , _iLeadDim , _iLeadDim,
out );
-
+
}
free(pfltMatrixA);
diff --git a/src/matrixOperations/expm/dexpma.c b/src/matrixOperations/expm/dexpma.c
index 3bb3156b..b8616d81 100644
--- a/src/matrixOperations/expm/dexpma.c
+++ b/src/matrixOperations/expm/dexpma.c
@@ -13,7 +13,7 @@
#include "matrixExponential.h"
void dexpma (double* in, double* out, int _iLeadDim){
-
+
int iIndex1 = 0;
int iMax = 0;
int iFlag = 0;
@@ -57,25 +57,25 @@ void dexpma (double* in, double* out, int _iLeadDim){
/*A = A./2^s*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pdblMatrixA[iIndex1] = in[iIndex1] / dblS2 ;
-
+
/* Pade approximation for exp(A)*/
/*X = A */
/*C2F(dcopy)(&iSquare, pdblMatrixA, &iOne, pdblMatrixX, &iOne );*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ;
-
- deyesa(pdblMatrixEye, _iLeadDim, _iLeadDim);
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ;
+
+ deyea(pdblMatrixEye, _iLeadDim, _iLeadDim);
/*cA = A * c*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixcA[iIndex1] = pdblMatrixA[iIndex1] * dblCst ;
-
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixcA[iIndex1] = pdblMatrixA[iIndex1] * dblCst ;
+
/*E = Eye + cA*/
daddma (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare, out ) ;
@@ -89,11 +89,11 @@ void dexpma (double* in, double* out, int _iLeadDim){
for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++)
{
dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1));
-
+
/*Temp = X*/
/*C2F(dcopy)(&iSquare, pdblMatrixX, &iOne, pdblMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ;
/*X = A * Temp;*/
dmulma ( pdblMatrixA , _iLeadDim , _iLeadDim,
@@ -102,19 +102,19 @@ void dexpma (double* in, double* out, int _iLeadDim){
/*cX = c * X*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixcX[iIndex1] = pdblMatrixX[iIndex1] * dblCst ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixcX[iIndex1] = pdblMatrixX[iIndex1] * dblCst ;
/*E = E + cX*/
daddma ( out, iSquare , pdblMatrixcX , iSquare , out ) ;
-
+
if(iFlag == 1) /*D = D + cX*/
{
daddma ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ) ;
}
else /*D = D - cX*/
{
- ddiffma ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD );
+ ddiffma ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD );
}
/*Toggle iFlag*/
@@ -123,8 +123,8 @@ void dexpma (double* in, double* out, int _iLeadDim){
/*Temp = E*/
/*C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixTemp[iIndex1] = out[iIndex1] ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixTemp[iIndex1] = out[iIndex1] ;
/*E = D\E*/
dldiva ( pdblMatrixD , _iLeadDim , _iLeadDim , pdblMatrixTemp , _iLeadDim , _iLeadDim , out );
@@ -136,8 +136,8 @@ void dexpma (double* in, double* out, int _iLeadDim){
/*Temp2 = E*/
/*C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);
C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp2, &iOne);*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
{
pdblMatrixTemp [iIndex1] = out[iIndex1] ;
pdblMatrixTemp2[iIndex1] = out[iIndex1] ;
diff --git a/src/matrixOperations/expm/sexpma.c b/src/matrixOperations/expm/sexpma.c
index 5a0b8bdf..7bc1e91b 100644
--- a/src/matrixOperations/expm/sexpma.c
+++ b/src/matrixOperations/expm/sexpma.c
@@ -13,7 +13,7 @@
#include "matrixExponential.h"
void sexpma (float* in, float* out, int _iLeadDim){
-
+
int iIndex1 = 0;
int iMax = 0;
int iFlag = 0;
@@ -58,25 +58,25 @@ void sexpma (float* in, float* out, int _iLeadDim){
/*A = A./2^s*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pfltMatrixA[iIndex1] = in[iIndex1] / fltS2;
/* Pade approximation for exp(A)*/
/*X = A */
/*C2F(dcopy)(&iSquare, pfltMatrixA, &iOne, pfltMatrixX, &iOne );*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ;
-
- seyesa(pfltMatrixEye, _iLeadDim, _iLeadDim);
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ;
+
+ seyea(pfltMatrixEye, _iLeadDim, _iLeadDim);
/*cA = A * c*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixcA[iIndex1] = pfltMatrixA[iIndex1] * fltCst ;
-
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixcA[iIndex1] = pfltMatrixA[iIndex1] * fltCst ;
+
/*E = Eye + cA*/
saddma (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare, out ) ;
@@ -89,15 +89,15 @@ void sexpma (float* in, float* out, int _iLeadDim){
for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++)
{
-
-
+
+
dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1));
-
+
dblCst += 0 ;
/*Temp = X*/
/*C2F(dcopy)(&iSquare, pfltMatrixX, &iOne, pfltMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ;
/*X = A * Temp;*/
smulma ( pfltMatrixA , _iLeadDim , _iLeadDim,
@@ -106,19 +106,19 @@ void sexpma (float* in, float* out, int _iLeadDim){
/*cX = c * X*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixcX[iIndex1] = pfltMatrixX[iIndex1] * (float) dblCst ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixcX[iIndex1] = pfltMatrixX[iIndex1] * (float) dblCst ;
/*E = E + cX*/
saddma ( out, iSquare , pfltMatrixcX , iSquare , out ) ;
-
+
if(iFlag == 1) /*D = D + cX*/
{
saddma ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ) ;
}
else /*D = D - cX*/
{
- sdiffma ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD );
+ sdiffma ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD );
}
/*Toggle iFlag*/
@@ -127,8 +127,8 @@ void sexpma (float* in, float* out, int _iLeadDim){
/*Temp = E*/
/*C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pfltMatrixTemp[iIndex1] = out[iIndex1] ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pfltMatrixTemp[iIndex1] = out[iIndex1] ;
/*E = D\E*/
sldiva ( pfltMatrixD , _iLeadDim , _iLeadDim , pfltMatrixTemp , _iLeadDim , _iLeadDim , out );
@@ -140,8 +140,8 @@ void sexpma (float* in, float* out, int _iLeadDim){
/*Temp2 = E*/
/*C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);
C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp2, &iOne);*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
{
pfltMatrixTemp [iIndex1] = out[iIndex1] ;
pfltMatrixTemp2[iIndex1] = out[iIndex1] ;
diff --git a/src/matrixOperations/expm/zexpma.c b/src/matrixOperations/expm/zexpma.c
index 9b378690..331238d4 100644
--- a/src/matrixOperations/expm/zexpma.c
+++ b/src/matrixOperations/expm/zexpma.c
@@ -25,9 +25,9 @@ void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim)
double dblS = 0;
double dblS2 = 0;
double dblCst = 0.5;
-
+
doubleComplex zdblCst ;
-
+
doubleComplex *pdblMatrixA = NULL;
doubleComplex *pdblMatrixX = NULL;
doubleComplex *pdblMatrixD = NULL;
@@ -59,36 +59,36 @@ void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim)
dblS2 = pow(2, dblS);
/*A = A./2^s */
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pdblMatrixA[iIndex1] = zdevides ( in[iIndex1] , DoubleComplex ( dblS2 , 0 ));
-
+
/* Pade approximation for exp(A)
//X = A */
/*C2F(zcopy)(&iSquare, pdblMatrixA, &iOne, pdblMatrixX, &iOne );*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ;
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ;
+
-
- zeyesa(pdblMatrixEye, _iLeadDim, _iLeadDim);
+ zeyea(pdblMatrixEye, _iLeadDim, _iLeadDim);
/* zmulma ( & zdblCst , 1 ,1,
pdblMatrixA , _iLeadDim, _iLeadDim,
pdblMatrixcA);*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixcA[iIndex1] = ztimess ( pdblMatrixA[iIndex1] , zdblCst ) ;
-
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixcA[iIndex1] = ztimess ( pdblMatrixA[iIndex1] , zdblCst ) ;
+
/* cA = A * c */
-
+
/*E = Eye + cA*/
-
+
zaddma (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare, out ) ;
-
+
/* D = Eye - cA */
-
+
zdiffma (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare,pdblMatrixD ) ;
iMax = 6;
@@ -101,24 +101,24 @@ void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim)
/*Temp = X */
/*C2F(zcopy)(&iSquare, pdblMatrixX, &iOne, pdblMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ;
/* X = A * Temp; */
-
+
zmulma ( pdblMatrixA , _iLeadDim , _iLeadDim,
pdblMatrixTemp , _iLeadDim , _iLeadDim,
pdblMatrixX );
- /* cX = c * X */
-
+ /* cX = c * X */
+
/* zmulma ( & zdblCst , 1 ,1,
pdblMatrixX , _iLeadDim, _iLeadDim,
pdblMatrixcX);*/
-
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixcX[iIndex1] = ztimess ( pdblMatrixX[iIndex1] , zdblCst ) ;
-
+
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixcX[iIndex1] = ztimess ( pdblMatrixX[iIndex1] , zdblCst ) ;
+
/* E = E + cX */
-
+
zaddma ( out, iSquare , pdblMatrixcX , iSquare , out ) ;
if(iFlag == 1) /* D = D + cX */
@@ -127,7 +127,7 @@ void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim)
}
else /* D = D - cX */
{
- zdiffma ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD );
+ zdiffma ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD );
}
/* Toggle iFlag */
@@ -136,31 +136,31 @@ void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim)
/* Temp = E */
/*C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
- pdblMatrixTemp[iIndex1] = out[iIndex1] ;
-
- /* E = D\E */
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ pdblMatrixTemp[iIndex1] = out[iIndex1] ;
+
+ /* E = D\E */
zldiva ( pdblMatrixD , _iLeadDim , _iLeadDim , pdblMatrixTemp , _iLeadDim , _iLeadDim , out ) ;
-
+
/*/ Undo scaling by repeated squaring */
for(iLoop1 = 0 ; iLoop1 < dblS ; iLoop1++)
{
/*//Temp = E */
/*//Temp2 = E */
-
+
/*C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);
C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp2, &iOne);*/
- for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
+ for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ )
{
pdblMatrixTemp [iIndex1] = out[iIndex1] ;
pdblMatrixTemp2[iIndex1] = out[iIndex1] ;
- }
+ }
- /* E = E*E*/
+ /* E = E*E*/
zmulma ( pdblMatrixTemp , _iLeadDim , _iLeadDim,
pdblMatrixTemp2 , _iLeadDim , _iLeadDim,
out );
-
+
}
free(pdblMatrixA);
diff --git a/src/matrixOperations/includes/matrixEyes.h b/src/matrixOperations/includes/eye.h
index af10010d..4c7d4569 100644
--- a/src/matrixOperations/includes/matrixEyes.h
+++ b/src/matrixOperations/includes/eye.h
@@ -10,21 +10,21 @@
*
*/
-#ifndef __MATRIXEYES_H__
-#define __MATRIXEYES_H__
+#ifndef __EYE_H__
+#define __EYE_H__
#include "floatComplex.h"
#include "doubleComplex.h"
-void seyesa(float* in, int _iRows, int _iCols);
+void seyea(float* in, int _iRows, int _iCols);
-void deyesa(double* in, int _iRows, int _iCols);
+void deyea(double* in, int _iRows, int _iCols);
-void ceyesa(floatComplex* in, int _iRows, int _iCols);
+void ceyea(floatComplex* in, int _iRows, int _iCols);
-void zeyesa(doubleComplex* in, int _iRows, int _iCols);
+void zeyea(doubleComplex* in, int _iRows, int _iCols);
-#endif /* !__MATRIXEYES_H__ */
+#endif /* !__EYE_H__ */
diff --git a/src/matrixOperations/includes/matrixExponential.h b/src/matrixOperations/includes/matrixExponential.h
index 6e11649b..aceed63b 100644
--- a/src/matrixOperations/includes/matrixExponential.h
+++ b/src/matrixOperations/includes/matrixExponential.h
@@ -14,9 +14,9 @@
#define __MATRIXEXPONENTIAL_H__
#include <math.h>
-#include "lapack.h"
-#include "blas.h"
#include <stdlib.h>
+#include "lapack.h"
+#include "blas.h"
#include "abs.h"
#include "exp.h"
#include "max.h"
@@ -25,7 +25,7 @@
#include "matrixMultiplication.h"
#include "matrixAddition.h"
#include "matrixSubtraction.h"
-#include "matrixEyes.h"
+#include "eye.h"
#include "infiniteNorm.h"
#include "frexp.h"