File indexing completed on 2025-01-18 10:02:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _AppDef_ParFunctionOfTheGradient_HeaderFile
0018 #define _AppDef_ParFunctionOfTheGradient_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <AppDef_MultiLine.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Standard_Real.hxx>
0027 #include <AppDef_ParLeastSquareOfTheGradient.hxx>
0028 #include <TColStd_HArray1OfInteger.hxx>
0029 #include <AppParCurves_HArray1OfConstraintCouple.hxx>
0030 #include <math_MultipleVarFunctionWithGradient.hxx>
0031 #include <AppParCurves_Constraint.hxx>
0032 class AppDef_MultiLine;
0033 class AppDef_MyLineTool;
0034 class AppDef_ParLeastSquareOfTheGradient;
0035 class AppDef_ResConstraintOfTheGradient;
0036 class AppParCurves_MultiCurve;
0037
0038
0039
0040 class AppDef_ParFunctionOfTheGradient : public math_MultipleVarFunctionWithGradient
0041 {
0042 public:
0043
0044 DEFINE_STANDARD_ALLOC
0045
0046
0047
0048
0049 Standard_EXPORT AppDef_ParFunctionOfTheGradient(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg);
0050
0051
0052
0053 Standard_EXPORT Standard_Integer NbVariables() const;
0054
0055
0056
0057
0058
0059 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
0060
0061
0062
0063 Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
0064
0065
0066
0067 Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
0068
0069
0070 Standard_EXPORT const math_Vector& NewParameters() const;
0071
0072
0073
0074 Standard_EXPORT const AppParCurves_MultiCurve& CurveValue();
0075
0076
0077
0078 Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const;
0079
0080
0081
0082 Standard_EXPORT Standard_Real MaxError3d() const;
0083
0084
0085
0086 Standard_EXPORT Standard_Real MaxError2d() const;
0087
0088 Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
0089
0090 Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const;
0091
0092
0093
0094
0095 protected:
0096
0097
0098
0099
0100 Standard_EXPORT void Perform (const math_Vector& X);
0101
0102
0103
0104
0105 private:
0106
0107
0108
0109 Standard_Boolean Done;
0110 AppDef_MultiLine MyMultiLine;
0111 AppParCurves_MultiCurve MyMultiCurve;
0112 Standard_Integer Degre;
0113 math_Vector myParameters;
0114 Standard_Real FVal;
0115 math_Vector ValGrad_F;
0116 math_Matrix MyF;
0117 math_Matrix PTLX;
0118 math_Matrix PTLY;
0119 math_Matrix PTLZ;
0120 math_Matrix A;
0121 math_Matrix DA;
0122 AppDef_ParLeastSquareOfTheGradient MyLeastSquare;
0123 Standard_Boolean Contraintes;
0124 Standard_Integer NbP;
0125 Standard_Integer NbCu;
0126 Standard_Integer Adeb;
0127 Standard_Integer Afin;
0128 Handle(TColStd_HArray1OfInteger) tabdim;
0129 Standard_Real ERR3d;
0130 Standard_Real ERR2d;
0131 Standard_Integer FirstP;
0132 Standard_Integer LastP;
0133 Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
0134
0135
0136 };
0137
0138
0139
0140
0141
0142
0143
0144 #endif