1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
|
import OCP.AdvApprox
from typing import *
from typing import Iterable as iterable
from typing import Iterator as iterator
from numpy import float64
_Shape = Tuple[int, ...]
import OCP.TColStd
import OCP.TColgp
import io
import OCP.PLib
import OCP.GeomAbs
__all__ = [
"AdvApprox_ApproxAFunction",
"AdvApprox_Cutting",
"AdvApprox_DichoCutting",
"AdvApprox_PrefAndRec",
"AdvApprox_PrefCutting",
"AdvApprox_SimpleApprox"
]
class AdvApprox_ApproxAFunction():
"""
this approximate a given function
"""
@staticmethod
def Approximation_s(TotalDimension : int,TotalNumSS : int,LocalDimension : OCP.TColStd.TColStd_Array1OfInteger,First : float,Last : float,Evaluator : AdvApprox_EvaluatorFunction,CutTool : AdvApprox_Cutting,ContinuityOrder : int,NumMaxCoeffs : int,MaxSegments : int,TolerancesArray : OCP.TColStd.TColStd_Array1OfReal,code_precis : int,NumCoeffPerCurveArray : OCP.TColStd.TColStd_Array1OfInteger,LocalCoefficientArray : OCP.TColStd.TColStd_Array1OfReal,IntervalsArray : OCP.TColStd.TColStd_Array1OfReal,ErrorMaxArray : OCP.TColStd.TColStd_Array1OfReal,AverageErrorArray : OCP.TColStd.TColStd_Array1OfReal) -> tuple[int, int]:
"""
None
"""
@overload
def AverageError(self,Dimension : int,Index : int) -> float:
"""
returns the error as is in the algorithms
None
"""
@overload
def AverageError(self,Dimension : int) -> OCP.TColStd.TColStd_HArray1OfReal: ...
def Degree(self) -> int:
"""
None
None
"""
def Dump(self,o : io.BytesIO) -> None:
"""
display information on approximation.
"""
def HasResult(self) -> bool:
"""
None
None
"""
def IsDone(self) -> bool:
"""
None
None
"""
def Knots(self) -> OCP.TColStd.TColStd_HArray1OfReal:
"""
None
None
"""
@overload
def MaxError(self,Dimension : int,Index : int) -> float:
"""
returns the error as is in the algorithms
None
"""
@overload
def MaxError(self,Dimension : int) -> OCP.TColStd.TColStd_HArray1OfReal: ...
def Multiplicities(self) -> OCP.TColStd.TColStd_HArray1OfInteger:
"""
None
None
"""
def NbKnots(self) -> int:
"""
None
None
"""
def NbPoles(self) -> int:
"""
as the name says
"""
def NumSubSpaces(self,Dimension : int) -> int:
"""
None
None
"""
@overload
def Poles(self) -> OCP.TColgp.TColgp_HArray2OfPnt:
"""
-- returns the poles from the algorithms as is
returns the poles at Index from the 3d subspace
-- returns the poles from the algorithms as is
"""
@overload
def Poles(self,Index : int,P : OCP.TColgp.TColgp_Array1OfPnt) -> None: ...
@overload
def Poles1d(self) -> OCP.TColStd.TColStd_HArray2OfReal:
"""
returns the poles from the algorithms as is
returns the poles at Index from the 1d subspace
returns the poles from the algorithms as is
"""
@overload
def Poles1d(self,Index : int,P : OCP.TColStd.TColStd_Array1OfReal) -> None: ...
@overload
def Poles2d(self) -> OCP.TColgp.TColgp_HArray2OfPnt2d:
"""
returns the poles from the algorithms as is
returns the poles at Index from the 2d subspace
returns the poles from the algorithms as is
"""
@overload
def Poles2d(self,Index : int,P : OCP.TColgp.TColgp_Array1OfPnt2d) -> None: ...
@overload
def __init__(self,Num1DSS : int,Num2DSS : int,Num3DSS : int,OneDTol : OCP.TColStd.TColStd_HArray1OfReal,TwoDTol : OCP.TColStd.TColStd_HArray1OfReal,ThreeDTol : OCP.TColStd.TColStd_HArray1OfReal,First : float,Last : float,Continuity : OCP.GeomAbs.GeomAbs_Shape,MaxDeg : int,MaxSeg : int,Func : AdvApprox_EvaluatorFunction,CutTool : AdvApprox_Cutting) -> None: ...
@overload
def __init__(self,Num1DSS : int,Num2DSS : int,Num3DSS : int,OneDTol : OCP.TColStd.TColStd_HArray1OfReal,TwoDTol : OCP.TColStd.TColStd_HArray1OfReal,ThreeDTol : OCP.TColStd.TColStd_HArray1OfReal,First : float,Last : float,Continuity : OCP.GeomAbs.GeomAbs_Shape,MaxDeg : int,MaxSeg : int,Func : AdvApprox_EvaluatorFunction) -> None: ...
pass
class AdvApprox_Cutting():
"""
to choose the way of cutting in approximation
"""
def Value(self,a : float,b : float,cuttingvalue : float) -> bool:
"""
None
"""
pass
class AdvApprox_DichoCutting(AdvApprox_Cutting):
"""
if Cutting is necessary in [a,b], we cut at (a+b) / 2.
"""
def Value(self,a : float,b : float,cuttingvalue : float) -> bool:
"""
None
"""
def __init__(self) -> None: ...
pass
class AdvApprox_PrefAndRec(AdvApprox_Cutting):
"""
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
"""
def Value(self,a : float,b : float,cuttingvalue : float) -> bool:
"""
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 ](r*a+b)/(r+1) , (a+r*b)/(r+1)[ where r = Weight - or (a+b)/2 else.
"""
def __init__(self,RecomendedCut : OCP.TColStd.TColStd_Array1OfReal,PrefferedCut : OCP.TColStd.TColStd_Array1OfReal,Weight : float=5.0) -> None: ...
pass
class AdvApprox_PrefCutting(AdvApprox_Cutting):
"""
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.
"""
def Value(self,a : float,b : float,cuttingvalue : float) -> bool:
"""
None
"""
def __init__(self,CutPnts : OCP.TColStd.TColStd_Array1OfReal) -> None: ...
pass
class AdvApprox_SimpleApprox():
"""
Approximate a function on an intervall [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 averrage error resulting from approximating the function by the polynomial are computed
"""
def AverageError(self,Index : int) -> float:
"""
None
"""
def Coefficients(self) -> OCP.TColStd.TColStd_HArray1OfReal:
"""
returns the coefficients in the Jacobi Base
"""
def Degree(self) -> int:
"""
None
"""
def DifTab(self) -> OCP.TColStd.TColStd_HArray1OfReal:
"""
None
"""
def Dump(self,o : io.BytesIO) -> None:
"""
display information on approximation
"""
def FirstConstr(self) -> OCP.TColStd.TColStd_HArray2OfReal:
"""
returns the constraints at First
"""
def IsDone(self) -> bool:
"""
None
"""
def LastConstr(self) -> OCP.TColStd.TColStd_HArray2OfReal:
"""
returns the constraints at Last
"""
def MaxError(self,Index : int) -> float:
"""
None
"""
def Perform(self,LocalDimension : OCP.TColStd.TColStd_Array1OfInteger,LocalTolerancesArray : OCP.TColStd.TColStd_Array1OfReal,First : float,Last : float,MaxDegree : int) -> None:
"""
Constructs approximator tool.
"""
def SomTab(self) -> OCP.TColStd.TColStd_HArray1OfReal:
"""
None
"""
def __init__(self,TotalDimension : int,TotalNumSS : int,Continuity : OCP.GeomAbs.GeomAbs_Shape,WorkDegree : int,NbGaussPoints : int,JacobiBase : OCP.PLib.PLib_JacobiPolynomial,Func : AdvApprox_EvaluatorFunction) -> None: ...
pass
|