17 #if !defined(ON_MATH_INC_)
65 void Begin(
double starting_value = 0.0 );
88 double Total(
double* error_estimate = NULL );
110 int m_pos_sum1_count;
111 int m_pos_sum2_count;
112 int m_pos_sum3_count;
113 double m_pos_sum1[sum1_max_count];
114 double m_pos_sum2[sum2_max_count];
115 double m_pos_sum3[sum3_max_count];
117 int m_neg_sum1_count;
118 int m_neg_sum2_count;
119 int m_neg_sum3_count;
120 double m_neg_sum1[sum1_max_count];
121 double m_neg_sum2[sum2_max_count];
122 double m_neg_sum3[sum3_max_count];
124 double SortAndSum(
int,
double* );
210 const double* parameters,
246 const double* parameters,
330 bool ON_IsValid(
double x );
333 bool ON_IsValidFloat(
float x );
352 #if defined(ON_LITTLE_ENDIAN)
355 #define ON_IS_FINITE(x) (0x7FF0 != (*((unsigned short*)(&x) + 3) & 0x7FF0))
356 #define ON_IS_VALID(x) (x != ON_UNSET_VALUE && 0x7FF0 != (*((unsigned short*)(&x) + 3) & 0x7FF0))
357 #define ON_IS_VALID_FLOAT(x) (x != ON_UNSET_FLOAT)
360 #elif defined(ON_BIG_ENDIAN)
363 #define ON_IS_FINITE(x) (0x7FF0 != (*((unsigned short*)(&x)) & 0x7FF0))
364 #define ON_IS_VALID(x) (x != ON_UNSET_VALUE && 0x7FF0 != (*((unsigned short*)(&x)) & 0x7FF0))
365 #define ON_IS_VALID_FLOAT(x) (x != ON_UNSET_FLOAT)
381 #if defined(_GNU_SOURCE)
384 #define ON_IS_FINITE(x) (isfinite(x)?true:false)
386 #define ON_IS_FINITE(x) (_finite(x)?true:false)
389 #define ON_IS_VALID(x) (x != ON_UNSET_VALUE && ON_IS_FINITE(x))
390 #define ON_IS_VALID_FLOAT(x) (x != ON_UNSET_FLOAT && ON_IS_FINITE(x))
396 float ON_ArrayDotProduct(
411 void ON_Array_aA_plus_B(
420 double ON_ArrayDotProduct(
427 double ON_ArrayDotDifference(
435 double ON_ArrayMagnitude(
441 double ON_ArrayMagnitudeSquared(
447 double ON_ArrayDistance(
454 double ON_ArrayDistanceSquared(
469 void ON_Array_aA_plus_B(
478 int ON_SearchMonotoneArray(
511 double ON_BinomialCoefficient(
539 double ON_TrinomialCoefficient(
547 ON_BOOL32 ON_GetParameterTolerance(
555 ON_BOOL32 ON_IsValidPointList(
564 ON_BOOL32 ON_IsValidPointList(
607 int ON_IsPointListPlanar(
611 const double* points,
612 const double* boxMin,
613 const double* boxMax,
619 ON_BOOL32 ON_IsValidPointGrid(
628 bool ON_ReversePointList(
637 ON_BOOL32 ON_ReversePointGrid(
647 bool ON_SwapPointListCoordinates(
655 bool ON_SwapPointListCoordinates(
663 ON_BOOL32 ON_SwapPointGridCoordinates(
671 bool ON_TransformPointList(
681 bool ON_TransformPointList(
691 ON_BOOL32 ON_TransformPointGrid(
701 ON_BOOL32 ON_TransformVectorList(
710 ON_BOOL32 ON_TransformVectorList(
734 bool ON_PointsAreCoincident(
737 const double* pointA,
763 bool ON_PointsAreCoincident(
783 int ON_ComparePointList(
799 ON_BOOL32 ON_IsPointListClosed(
808 ON_BOOL32 ON_IsPointGridClosed(
818 int ON_SolveQuadraticEquation(
825 double,
double,
double,
830 ON_BOOL32 ON_SolveTriDiagonal(
940 const double row0[3],
941 const double row1[3],
942 const double row2[3],
1003 const double row0[4],
1004 const double row1[4],
1005 const double row2[4],
1006 const double row3[4],
1074 double ON_SolveNxN(
bool bFullPivot,
bool bNormalize,
int n,
double* M[],
double B[],
double X[]);
1079 ON_BOOL32 ON_EvJacobian(
1105 int ON_DecomposeVector(
1109 double* x,
double* y
1130 ON_BOOL32 ON_EvNormalPartials(
1142 ON_Pullback3dVector(
1156 ON_GetParameterTolerance(
1166 ON_BOOL32 ON_EvNormal(
1183 ON_BOOL32 ON_EvCurvature(
1191 ON_BOOL32 ON_EvPrincipalCurvatures(
1208 ON_BOOL32 ON_EvPrincipalCurvatures(
1245 bool ON_EvSectionalCurvature(
1318 bool ON_IsCurvatureDiscontinuity(
1321 double cos_angle_tolerance,
1322 double curvature_tolerance,
1323 double zero_curvature,
1324 double radius_tolerance,
1325 double relative_tolerance
1329 bool ON_IsCurvatureDiscontinuity(
1332 double cos_angle_tolerance,
1333 double curvature_tolerance,
1334 double zero_curvature,
1335 double radius_tolerance
1354 bool ON_IsG2CurvatureContinuous(
1357 double cos_angle_tolerance,
1358 double curvature_tolerance
1376 bool ON_IsGsmoothCurvatureContinuous(
1379 double cos_angle_tolerance,
1380 double curvature_tolerance
1414 ON_BOOL32 ON_IsContinuous(
1422 double point_tolerance=ON_ZERO_TOLERANCE,
1423 double d1_tolerance=ON_ZERO_TOLERANCE,
1424 double d2_tolerance=ON_ZERO_TOLERANCE,
1425 double cos_angle_tolerance=ON_DEFAULT_ANGLE_TOLERANCE_COSINE,
1426 double curvature_tolerance=ON_SQRT_EPSILON
1431 bool ON_TuneupEvaluationParameter(
1433 double s0,
double s1,
1448 const ON_2dex* ON_BinarySearch2dexArray(
1644 int ON_ArePointsOnLine(
1657 int ON_ArePointsOnPlane(
1693 bool ON_EvaluateQuotientRule(
1725 bool ON_EvaluateQuotientRule2(
1761 bool ON_EvaluateQuotientRule3(
1769 bool ON_GetPolylineLength(
1793 bool ON_GetClosestPointInPointList(
1797 int* closest_point_index
1843 double ON_TestMathFunction(
1851 ON_DECL
double ON_Max(
double a,
double b);
1855 ON_DECL
float ON_Max(
float a,
float b);
1859 ON_DECL
int ON_Max(
int a,
int b);
1863 ON_DECL
double ON_Min(
double a,
double b);
1867 ON_DECL
float ON_Min(
float a,
float b);
1871 ON_DECL
int ON_Min(
int a,
int b);
1877 ON_DECL
int ON_Round(
double x);
1913 ON_DECL
bool ON_GetConicEquationThrough6Points(
1915 const double* points2d,
1943 ON_DECL
bool ON_IsConicEquationAnEllipse(
1944 const double conic[6],
1948 double* major_radius,
1949 double* minor_radius
1993 ON_DECL
bool ON_GetEllipseConicEquation(
1995 double x0,
double y0,
2006 ON_DECL
double ON_Length2d(
double x,
double y );
2014 ON_DECL
double ON_Length3d(
double x,
double y,
double z );
2027 ON_DECL
float ON_FloatFloor(
double x);
2039 ON_DECL
float ON_FloatCeil(
double x);
bool Periodic(int parameter_index) const
ON_SimpleArray< bool > m_bPeriodicParameter
virtual int EvaluateHessian(const double *parameters, double *value, double *gradient, double **hessian)
virtual int Evaluate(const double *parameters, double *values, double **jacobian)=0
ON_Interval Domain(int parameter_index) const
ON_SimpleArray< ON_Interval > m_domain
const int m_parameter_count
ON_Evaluator(int parameter_count, int value_count, const ON_Interval *domain, const bool *periodic)
bool FiniteDomain() const
void operator-=(double x)
void operator+=(double x)
void Begin(double starting_value=0.0)
double Total(double *error_estimate=NULL)