search for: emd_l1

Displaying 1 result from an estimated 1 matches for "emd_l1".

Did you mean: email1
2008 Nov 19
1
C++ code from R
...se) C code from R, but now I have to use C++ code. After reading "Writing R extensions", I came up with the following code, which compiles fine ------------------- // emdL1_R.cc: #include <time.h> #include <stdio.h> #include "emdL1.h" extern "C" { void emd_L1( double *H1, int *n1, double *H2, int *n2, int *Dims, double *e ) { EmdL1 em; // EMD_L1 class e[0] = em.EmdDist( H1,H2, n1[0],n2[0], Dims[0]); // 2D EMD_L1 printf("For 2D histograms, EmdL1(h1,h2)=%lf\n", e[0]); } }// extern "C...