Changeset 2556 in ntrip for trunk/BNC/bncutils.cpp
- Timestamp:
- Aug 10, 2010, 9:29:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncutils.cpp
r2530 r2556 255 255 const ColumnVector& yi, // vector of the initial y-values 256 256 double dx, // the step size for the integration 257 ColumnVector (*der)(double x, const ColumnVector& y) 257 double* acc, // aditional acceleration 258 ColumnVector (*der)(double x, const ColumnVector& y, double* acc) 258 259 // A pointer to a function that computes the 259 260 // derivative of a function at a point (x,y) 260 261 ) { 261 262 262 ColumnVector k1 = der(xi , yi ) * dx;263 ColumnVector k2 = der(xi+dx/2.0, yi+k1/2.0 ) * dx;264 ColumnVector k3 = der(xi+dx/2.0, yi+k2/2.0 ) * dx;265 ColumnVector k4 = der(xi+dx , yi+k3 ) * dx;263 ColumnVector k1 = der(xi , yi , acc) * dx; 264 ColumnVector k2 = der(xi+dx/2.0, yi+k1/2.0, acc) * dx; 265 ColumnVector k3 = der(xi+dx/2.0, yi+k2/2.0, acc) * dx; 266 ColumnVector k4 = der(xi+dx , yi+k3 , acc) * dx; 266 267 267 268 ColumnVector yf = yi + k1/6.0 + k2/3.0 + k3/3.0 + k4/6.0;
Note:
See TracChangeset
for help on using the changeset viewer.