AdvApprox
OCCT package AdvApprox: AdvApprox_ApproxAFunction, AdvApprox_Cutting, AdvApprox_DichoCutting, AdvApprox_EvaluatorFunction, and 3 more bound classes.
AdvApprox_ApproxAFunction
this approximate a given function
Constructors(2)
- constructor(Num1DSS: number, Num2DSS: number, Num3DSS: number, OneDTol: NCollection_HArray1_double, TwoDTol: NCollection_HArray1_double, ThreeDTol: NCollection_HArray1_double, First: number, Last: number, Continuity: GeomAbs_Shape, MaxDeg: number, MaxSeg: number, Func: AdvApprox_EvaluatorFunction): AdvApprox_ApproxAFunction
Constructs approximator tool.
Warning: the Func should be valid reference to object of type inherited from class EvaluatorFunction from Approx with life time longer than that of the approximator tool;
the result should be formatted in the following way : <-Num1DSS--> <-2 * Num2DSS--> <-3 * Num3DSS--> R[0] .... R[Num1DSS]..... R[Dimension-1]
the order in which each Subspace appears should be consistent with the tolerances given in the create function and the results will be given in that order as well that is : Curve2d(n) will correspond to the nth entry described by Num2DSS, Curve(n) will correspond to the nth entry described by Num3DSS The same type of schema applies to the Poles1d, Poles2d and Poles.Parameters (12)Num1DSSNum2DSSNum3DSSOneDTolTwoDTolThreeDTolFirstLastContinuityMaxDegMaxSegFunc
- constructor(Num1DSS: number, Num2DSS: number, Num3DSS: number, OneDTol: NCollection_HArray1_double, TwoDTol: NCollection_HArray1_double, ThreeDTol: NCollection_HArray1_double, First: number, Last: number, Continuity: GeomAbs_Shape, MaxDeg: number, MaxSeg: number, Func: AdvApprox_EvaluatorFunction, CutTool: AdvApprox_Cutting): AdvApprox_ApproxAFunction
Approximation with user method of cutting.
Parameters (13)Num1DSSNum2DSSNum3DSSOneDTolTwoDTolThreeDTolFirstLastContinuityMaxDegMaxSegFuncCutTool
Static methods(1)
- Approximation(TotalDimension: number, TotalNumSS: number, LocalDimension: NCollection_Array1_int, First: number, Last: number, Evaluator: AdvApprox_EvaluatorFunction, CutTool: AdvApprox_Cutting, ContinuityOrder: number, NumMaxCoeffs: number, MaxSegments: number, TolerancesArray: NCollection_Array1_double, code_precis: number, NumCurves: number, NumCoeffPerCurveArray: NCollection_Array1_int, LocalCoefficientArray: NCollection_Array1_double, IntervalsArray: NCollection_Array1_double, ErrorMaxArray: NCollection_Array1_double, AverageErrorArray: NCollection_Array1_double, ErrorCode: number): { NumCurves: number; ErrorCode: number }Parameters (19)
TotalDimensionTotalNumSSLocalDimensionFirstLastEvaluatorCutToolContinuityOrderNumMaxCoeffsMaxSegmentsTolerancesArraycode_precisNumCurvesNumCoeffPerCurveArrayLocalCoefficientArrayIntervalsArrayErrorMaxArrayAverageErrorArrayErrorCode
Instance methods(18)
- IsDone(): boolean
- HasResult(): boolean
returns the poles from the algorithms as is
- Poles1d(Index: number, P: NCollection_Array1_double): void
returns the poles at Index from the 1d subspace
Parameters (2)IndexP—Mutated in place; read the updated value from this argument after the call.
returns the poles from the algorithms as is
- Poles2d(Index: number, P: NCollection_Array1_gp_Pnt2d): void
returns the poles at Index from the 2d subspace
Parameters (2)IndexP—Mutated in place; read the updated value from this argument after the call.
- returns the poles from the algorithms as is
- Poles(Index: number, P: NCollection_Array1_gp_Pnt): void
returns the poles at Index from the 3d subspace
Parameters (2)IndexP—Mutated in place; read the updated value from this argument after the call.
- NbPoles(): number
as the name says
- Degree(): number
- NbKnots(): number
- NumSubSpaces(Dimension: number): numberParameters (1)
Dimension
- MaxError(Dimension: number): NCollection_HArray1_double
returns the error as is in the algorithms
Parameters (1)Dimension
- MaxError(Dimension: number, Index: number): numberParameters (2)
DimensionIndex
- AverageError(Dimension: number): NCollection_HArray1_double
returns the error as is in the algorithms
Parameters (1)Dimension
- AverageError(Dimension: number, Index: number): numberParameters (2)
DimensionIndex
AdvApprox_Cutting
to choose the way of cutting in approximation
Instance methods(1)
- Value(a: number, b: number, cuttingvalue: number): { returnValue: boolean; cuttingvalue: number }Parameters (3)
abcuttingvalue
AdvApprox_DichoCutting
if Cutting is necessary in [a,b], we cut at (a+b) / 2.
Constructors(1)
Instance methods(1)
- Value(a: number, b: number, cuttingvalue: number): { returnValue: boolean; cuttingvalue: number }Parameters (3)
abcuttingvalue
AdvApprox_EvaluatorFunction
Interface for a class implementing a function to be approximated by AdvApprox_ApproxAFunction.
Instance methods(1)
- Evaluate(Dimension: number, StartEnd: [number, number], Parameter: number, DerivativeRequest: number, Result: number, ErrorCode: number): void
Function evaluation method to be defined by descendant.
Parameters (6)DimensionStartEndParameterDerivativeRequestResultErrorCode
AdvApprox_PrefAndRec
inherits class Cutting; contains a list of preferential points (pi)i and a list of Recommended points used in cutting management. if Cutting is necessary in [a,b], we cut at the di nearest from (a+b)/2
Constructors(1)
- constructor(RecomendedCut: NCollection_Array1_double, PrefferedCut: NCollection_Array1_double, Weight?: number): AdvApprox_PrefAndRecParameters (3)
RecomendedCutPrefferedCutWeight
Instance methods(1)
- Value(a: number, b: number, cuttingvalue: number): { returnValue: boolean; cuttingvalue: number }
cuting value is
- the recommended point nerest of (a+b)/2 if pi is in ]a,b[ or else
- the preferential point nearest of (a+b) / 2 if pi is in ](ra+b)/(r+1) , (a+rb)/(r+1)[ where r = Weight
- or (a+b)/2 else.
Parameters (3)abcuttingvalue
ReturnsA result object with fields:
returnValue: the C++ return valuecuttingvalue: updated value from the call.
AdvApprox_PrefCutting
inherits class Cutting; contains a list of preferential points (di)i if Cutting is necessary in [a,b], we cut at the di nearest from (a+b)/2.
Constructors(1)
- Parameters (1)
CutPnts
Instance methods(1)
- Value(a: number, b: number, cuttingvalue: number): { returnValue: boolean; cuttingvalue: number }Parameters (3)
abcuttingvalue
AdvApprox_SimpleApprox
Approximate a function on an interval [First,Last] The result is a simple polynomial whose degree is as low as possible to satisfy the required tolerance and the maximum degree. The maximum error and the average error resulting from approximating the function by the polynomial are computed.
Constructors(1)
- constructor(TotalDimension: number, TotalNumSS: number, Continuity: GeomAbs_Shape, WorkDegree: number, NbGaussPoints: number, JacobiBase: PLib_JacobiPolynomial, Func: AdvApprox_EvaluatorFunction): AdvApprox_SimpleApproxParameters (7)
TotalDimensionTotalNumSSContinuityWorkDegreeNbGaussPointsJacobiBaseFunc
Instance methods(10)
- Perform(LocalDimension: NCollection_Array1_int, LocalTolerancesArray: NCollection_Array1_double, First: number, Last: number, MaxDegree: number): void
Constructs approximator tool.
Warning: the Func should be valid reference to object of type inherited from class EvaluatorFunction from Approx with life time longer than that of the approximator tool;Parameters (5)LocalDimensionLocalTolerancesArrayFirstLastMaxDegree
- IsDone(): boolean
- Degree(): number
returns the coefficients in the Jacobi Base
returns the constraints at First
returns the constraints at Last
- MaxError(Index: number): numberParameters (1)
Index
- AverageError(Index: number): numberParameters (1)
Index