Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <stdlib.h>
00018 #include <stdio.h>
00019 #include <time.h>
00020 #include <math.h>
00021 #include <shogun/lib/slep/q1/eppMatrix.h>
00022
00023 void eppMatrix(double *X, double * V, int k, int n, double rho, double p)
00024 {
00025 int i, j, *iter_step;
00026 double *v, *x;
00027 double c0, c;
00028
00029 v=(double *)malloc(sizeof(double)*n);
00030 x=(double *)malloc(sizeof(double)*n);
00031 iter_step=(int *)malloc(sizeof(int)*2);
00032
00033
00034
00035
00036
00037
00038
00039 c0=0;
00040 for(i=0; i<k; i++){
00041
00042 for(j=0; j<n; j++)
00043 v[j]=V[i + j*k];
00044
00045 epp(x, &c, iter_step, v, n, rho, p, c0);
00046 c0=c;
00047
00048 for(j=0; j<n; j++)
00049 X[i + j*k]=x[j];
00050 }
00051
00052 free(v);
00053 free(x);
00054 free(iter_step);
00055 };