#include "fortranfunctions.h" #include #include #include extern "C" void apply_ncep_offset( float* za, int* nl, double **sim_sig, double **meas_sig, float* zreg, int* nr, float* zr ) { double znew; static int c__1 = 1; float* j = std::find_if(za, za+ *nl, std::bind2nd(std::less(),*zreg) )-1; unsigned ival = std::distance(za, j); std::vector zDouble(za, za+ *nl); ::linerd_( &meas_sig[0][0], &zDouble[0], &sim_sig[0][ival], &znew, nl, &c__1); std::cout << "zold " << za[ival] << " new " << znew << " difference " << za[ival]-znew << std::endl; std::transform(zr, zr+ *nr, zr, std::bind2nd(std::minus(), za[ival]-znew ) ) ; }