diff options
author | Sandeep Gupta | 2017-07-06 15:16:16 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-07-06 15:16:16 +0530 |
commit | cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4 (patch) | |
tree | 47a9dacb127137102fefd3c4dfc7ce292381ae78 /src/c/linearAlgebra/hess/dhessa.c | |
parent | d5463e3c142c57a8f4dcf64da54e72d6af9a968b (diff) | |
download | Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.tar.gz Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.tar.bz2 Scilab2C_fossee_old-cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4.zip |
Changes
Diffstat (limited to 'src/c/linearAlgebra/hess/dhessa.c')
-rw-r--r-- | src/c/linearAlgebra/hess/dhessa.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/c/linearAlgebra/hess/dhessa.c b/src/c/linearAlgebra/hess/dhessa.c index 57f81b3..e1f2e2d 100644 --- a/src/c/linearAlgebra/hess/dhessa.c +++ b/src/c/linearAlgebra/hess/dhessa.c @@ -20,11 +20,13 @@ #include "matrixTranspose.h" #include "matrixMultiplication.h" +/* Lapack subroutines - which are used*/ extern int dgehrd_(int *, int *,int *,double *,int *,double *,double *,int *,int *); extern int dorghr_(int *, int *,int *,double *,int *,double *,double *,int *,int *); - +/* All the vairbale names are given exactly the same name as scilab source code */ void dhessa(double *in1,int size,int nout,double *out1, double *out2){ +/* Variables names are done through, Lapack library. */ int i,j,k; int N = size; int ILO=1; @@ -41,11 +43,11 @@ void dhessa(double *in1,int size,int nout,double *out1, double *out2){ WORK = (double *)malloc((double)LWORK*sizeof(double)); dgehrd_(&N,&ILO,&IHI,A,&LDA,TAU,WORK,&N,&INFO); - for(i=0;i<N;i++) + for(i=0;i<N;i++) /* copying it in output */ for(j=0;j<N;j++) out2[i+j*N] = A[i+j*N]; - for(j=1;j<=N-2;j++){ + for(j=1;j<=N-2;j++){ /* copying it in output */ for(i=j+2;i<=N;i++){ out2[(i-1)+(j-1)*N] = 0; } |