sample_funct_1dT_sample_funct_1dSampleFunct1dSampleFunct1dsample_funct_1d (Operator)
Name
sample_funct_1dT_sample_funct_1dSampleFunct1dSampleFunct1dsample_funct_1d
— Sample a function equidistantly in an interval.
Signature
void SampleFunct1d(const HTuple& Function, const HTuple& XMin, const HTuple& XMax, const HTuple& XDist, const HTuple& Border, HTuple* SampledFunction)
HFunction1D HFunction1D::SampleFunct1d(const HTuple& XMin, const HTuple& XMax, const HTuple& XDist, const HString& Border) const
HFunction1D HFunction1D::SampleFunct1d(double XMin, double XMax, double XDist, const HString& Border) const
HFunction1D HFunction1D::SampleFunct1d(double XMin, double XMax, double XDist, const char* Border) const
HFunction1D HFunction1D::SampleFunct1d(double XMin, double XMax, double XDist, const wchar_t* Border) const
(Windows only)
static void HOperatorSet.SampleFunct1d(HTuple function, HTuple XMin, HTuple XMax, HTuple XDist, HTuple border, out HTuple sampledFunction)
HFunction1D HFunction1D.SampleFunct1d(HTuple XMin, HTuple XMax, HTuple XDist, string border)
HFunction1D HFunction1D.SampleFunct1d(double XMin, double XMax, double XDist, string border)
def sample_funct_1d(function: Sequence[Union[float, int]], xmin: Union[float, int], xmax: Union[float, int], xdist: Union[float, int], border: str) -> Sequence[Union[float, int]]
Description
sample_funct_1dsample_funct_1dSampleFunct1dSampleFunct1dSampleFunct1dsample_funct_1d
samples the input function FunctionFunctionFunctionFunctionfunctionfunction
in the interval [XMinXMinXMinXMinXMinxmin
,XMaxXMaxXMaxXMaxXMaxxmax
] at equidistant points
with the distance XDistXDistXDistXDistXDistxdist
. The last point lies in the
interval if XMaxXMaxXMaxXMaxXMaxxmax
-XMinXMinXMinXMinXMinxmin
is not an integer multiple
of XDistXDistXDistXDistXDistxdist
. To obtain the samples, the input function is
interpolated linearly. The parameter BorderBorderBorderBorderborderborder
determines the
values of the function FunctionFunctionFunctionFunctionfunctionfunction
outside of its domain.
For BorderBorderBorderBorderborderborder
='zero'"zero""zero""zero""zero""zero" these values are set to 0, for
BorderBorderBorderBorderborderborder
='constant'"constant""constant""constant""constant""constant" they are set to the
corresponding value at the border, for
BorderBorderBorderBorderborderborder
='mirror'"mirror""mirror""mirror""mirror""mirror" they are mirrored at the border,
and for BorderBorderBorderBorderborderborder
='cyclic'"cyclic""cyclic""cyclic""cyclic""cyclic" they are continued
cyclically.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
FunctionFunctionFunctionFunctionfunctionfunction
(input_control) function_1d →
HFunction1D, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Input function.
XMinXMinXMinXMinXMinxmin
(input_control) number →
HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Minimum x value of the output function.
XMaxXMaxXMaxXMaxXMaxxmax
(input_control) number →
HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Maximum x value of the output function.
Restriction: XMax > XMin
XDistXDistXDistXDistXDistxdist
(input_control) number →
HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Distance of the samples.
Restriction: XDist > 0
BorderBorderBorderBorderborderborder
(input_control) string →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Border treatment for the input function.
Default value:
'constant'
"constant"
"constant"
"constant"
"constant"
"constant"
List of values: 'constant'"constant""constant""constant""constant""constant", 'cyclic'"cyclic""cyclic""cyclic""cyclic""cyclic", 'mirror'"mirror""mirror""mirror""mirror""mirror", 'zero'"zero""zero""zero""zero""zero"
SampledFunctionSampledFunctionSampledFunctionSampledFunctionsampledFunctionsampled_function
(output_control) function_1d →
HFunction1D, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Sampled function.
Possible Predecessors
transform_funct_1dtransform_funct_1dTransformFunct1dTransformFunct1dTransformFunct1dtransform_funct_1d
,
create_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array
,
create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs
Module
Foundation