12 #include "parspline_service.hpp"
21 int cmpx(
const void *p1,
const void *p2);
22 int cmpn(
const void *p1,
const void *p2);
26 double *x,*z,*a1,*a2,*a3,*a4,*dphi3n,*G,*PHI;
29 double sigma,amax,MinRc;
33 void DateEditorApproxCubSplineOneD();
36 bool Gauss(
int N,
double **LN,
double *P,
double *x);
42 void ApproxCubSplineOneD();
46 bool PointLineIntersection(
double x01,
double z01,
double x11,
double z11,
47 double x02,
double z02,
double x12,
double z12,
double &xt,
double &zt);
51 bool CurveIntersection(
double x0,
double z0,
double x1,
double z1,
double a,
double b,
double c,
52 double d,
double xn,
double rsq,
double &xg,
double &zg);
55 double Angle(
double x01,
double x11,
double z01,
double z11,
56 double x02,
double x12,
double z02,
double z12);
61 double Interval(
double x1,
double x2,
double z1,
double z2,
int &num);
71 Spline(
int N0,
double *x0,
double *z0,
double minrc,
int N1 = 0,
double *x1 = NULL,
double *z1 = NULL);
76 void NewSpline(
int N,
double *x,
double *z,
int N1,
double *x1,
double *z1,
double rc);
82 void GetPoints(
int N1,
double *x1,
double *z1,
int flag,
int n1=-1,
int n2=-1);
90 void GetXZ(
double *x1,
double *z1);
93 void GetABCD(
double *a,
double *b,
double *c,
double *d);
127 bool SplineIntersection(
double x0,
double z0,
double x1,
double z1,
double eps,
double &xg,
130 bool SpIntersect(
double x,
double z,
double x2,
double z2,
double &resultX,
double &resultZ);
double GetMinRc()
Method returns spline minimal curvature radius.
int GetN()
Method returns approximated function nodes number.
Definition: spline.hpp:24
bool DerSplineFunction(double xt, double &zt)
Spline()
Constructor by default.
void GetPoints(int N1, double *x1, double *z1, int flag, int n1=-1, int n2=-1)
bool Der2SplineFunction(double xt, double &zt)
void GetABCD(double *a, double *b, double *c, double *d)
Method allows to get N-1 spline coefficients.
bool SplineIntersection(double x0, double z0, double x1, double z1, double eps, double &xg, double &zg)
double GetAmax()
Method returns maximal absolute deviation between spline and initial curve.
bool RadiusCurvitySplineFunction(double xt, double &zt)
Definition: cubspline.hpp:12
bool SplineFunction(double xt, double &zt)
double GetSigma()
Method returns mean-square deviation between spline and initial function.
bool CurvitySplineFunction(double xt, double &zt)
void GetXZ(double *x1, double *z1)
Definition: spline.hpp:14