Skip to content

sample_funct_1dSampleFunct1dSampleFunct1dsample_funct_1dT_sample_funct_1d🔗

Short description🔗

sample_funct_1dSampleFunct1dSampleFunct1dsample_funct_1dT_sample_funct_1d — Sample a function equidistantly in an interval.

Signature🔗

sample_funct_1d( function_1d Function, number XMin, number XMax, number XDist, string Border, out function_1d SampledFunction )void SampleFunct1d( const HTuple& Function, const HTuple& XMin, const HTuple& XMax, const HTuple& XDist, const HTuple& Border, HTuple* SampledFunction )static void HOperatorSet.SampleFunct1d( HTuple function, HTuple XMin, HTuple XMax, HTuple XDist, HTuple border, out HTuple sampledFunction )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]]

Herror T_sample_funct_1d( 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)

HFunction1D HFunction1D.SampleFunct1d( HTuple XMin, HTuple XMax, HTuple XDist, string border )

HFunction1D HFunction1D.SampleFunct1d( double XMin, double XMax, double XDist, string border )

Description🔗

sample_funct_1dSampleFunct1d samples the input function Functionfunctionfunction in the interval [XMinXMinxmin,XMaxXMaxxmax] at equidistant points with the distance XDistXDistxdist. The last point lies in the interval if XMaxXMaxxmax-XMinXMinxmin is not an integer multiple of XDistXDistxdist. To obtain the samples, the input function is interpolated linearly. The parameter Borderborderborder determines the values of the function Functionfunctionfunction outside of its domain. For Borderborderborder='zero'"zero" these values are set to 0, for Borderborderborder='constant'"constant" they are set to the corresponding value at the border, for Borderborderborder='mirror'"mirror" they are mirrored at the border, and for Borderborderborder='cyclic'"cyclic" they are continued cyclically.

Execution information🔗

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🔗

Functionfunctionfunction (input_control) function_1d → (real / integer)HTuple (double / Hlong)HFunction1D, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Input function.

XMinXMinxmin (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Minimum x value of the output function.

XMaxXMaxxmax (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Maximum x value of the output function.

Restriction: XMax > XMin

XDistXDistxdist (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Distance of the samples.

Restriction: XDist > 0

Borderborderborder (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Border treatment for the input function.

Default: 'constant'"constant"
List of values: 'constant', 'cyclic', 'mirror', 'zero'"constant", "cyclic", "mirror", "zero"

SampledFunctionsampledFunctionsampled_function (output_control) function_1d → (real / integer)HTuple (double / Hlong)HFunction1D, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Sampled function.

Combinations with other operators🔗

Combinations

Possible predecessors

transform_funct_1dTransformFunct1d, create_funct_1d_arrayCreateFunct1dArray, create_funct_1d_pairsCreateFunct1dPairs

Module🔗

Foundation