Skip to content

create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairsT_create_funct_1d_pairsπŸ”—

Short descriptionπŸ”—

create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairsT_create_funct_1d_pairs β€” Create a function from a set of (x,y) pairs.

SignatureπŸ”—

create_funct_1d_pairs( number XValues, number YValues, out function_1d Function )create_funct_1d_pairs( : : XValues, YValues : Function )void CreateFunct1dPairs( const HTuple& XValues, const HTuple& YValues, HTuple* Function )static void HOperatorSet.CreateFunct1dPairs( HTuple XValues, HTuple YValues, out HTuple function )def create_funct_1d_pairs( xvalues: MaybeSequence[Union[float, int]], yvalues: MaybeSequence[Union[float, int]] ) -> Sequence[Union[float, int]]

Herror T_create_funct_1d_pairs( const Htuple XValues, const Htuple YValues, Htuple* Function )

void HFunction1D::HFunction1D( const HTuple& XValues, const HTuple& YValues )

void HFunction1D::HFunction1D( double XValues, double YValues )

public HFunction1D( HTuple XValues, HTuple YValues )

public HFunction1D( double XValues, double YValues )

void HFunction1D::CreateFunct1dPairs( const HTuple& XValues, const HTuple& YValues )

void HFunction1D::CreateFunct1dPairs( double XValues, double YValues )

void HFunction1D.CreateFunct1dPairs( HTuple XValues, HTuple YValues )

void HFunction1D.CreateFunct1dPairs( double XValues, double YValues )

DescriptionπŸ”—

create_funct_1d_pairsCreateFunct1dPairs creates a one-dimensional function from a set of pairs of (x,y) values. The XValuesXValuesxvalues of the functions have to be passed in ascending order. The resulting function can then be processed and analyzed with the operators for 1d functions.

The created function is composed like this:

\(\textrm{Function} = [1, x_{1}, y_{1}, x_{2}, y_{2}, ... , x_{n}, y_{n}]\)

where

\(\textrm{Function}[1] = 1\) denotes the function type as a one-dimensional function from a set of pairs and

\([x_{i}, y_{i}]\) are pairs of (x,y) values passed in XValuesXValuesxvalues and YValuesYValuesyvalues with \(i \in [1, n]\) .

Alternatively, functions can be created with the operator create_funct_1d_arrayCreateFunct1dArray. In contrast to this operator, x values with arbitrary positions can be specified with create_funct_1d_pairsCreateFunct1dPairs. Hence, it is the more general operator. It should be noted, however, that because of this generality the processing of a function created with create_funct_1d_pairsCreateFunct1dPairs cannot be carried out as efficiently as for equidistant functions. In particular, not all operators accept such functions. If necessary, a function can be transformed into an equidistant function with the operator sample_funct_1dSampleFunct1d.

AttentionπŸ”—

create_funct_1d_pairsCreateFunct1dPairs examines whether the x values of type β€˜double’ are ascending. Some other operators apply the same check but use the type β€˜float’ instead of β€˜double’. If such an operator is called as successor, it might happen that two consecutive x values seem to be equal for the β€˜float’ variant, although they were ascending in the β€˜double’ variant. If this happens, an error is thrown.

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πŸ”—

XValuesXValuesxvalues (input_control) number(-array) β†’ (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

X value for function points.

YValuesYValuesyvalues (input_control) number(-array) β†’ (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Y value for function points.

Functionfunctionfunction (output_control) function_1d β†’ (real / integer)(real / integer)HTuple (double / Hlong)HFunction1D, HTuple (double / int / long)Sequence[Union[float, int]]Htuple (double / Hlong)

Created function.

Combinations with other operatorsπŸ”—

Combinations

Possible successors

write_funct_1dWriteFunct1d, y_range_funct_1dYRangeFunct1d, get_pair_funct_1dGetPairFunct1d

Alternatives

create_funct_1d_arrayCreateFunct1dArray, read_funct_1dReadFunct1d

See also

funct_1d_to_pairsFunct1dToPairs

ModuleπŸ”—

Foundation