Skip to content

create_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_arrayT_create_funct_1d_array🔗

Short description🔗

create_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_arrayT_create_funct_1d_array — Create a function from a sequence of y values.

Signature🔗

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

Herror T_create_funct_1d_array( const Htuple YValues, Htuple* Function )

void HFunction1D::HFunction1D( const HTuple& YValues )

void HFunction1D::HFunction1D( double YValues )

public HFunction1D( HTuple YValues )

public HFunction1D( double YValues )

void HFunction1D::CreateFunct1dArray( const HTuple& YValues )

void HFunction1D::CreateFunct1dArray( double YValues )

void HFunction1D.CreateFunct1dArray( HTuple YValues )

void HFunction1D.CreateFunct1dArray( double YValues )

Description🔗

create_funct_1d_arrayCreateFunct1dArray creates a one-dimensional function from a set of y values YValuesYValuesyvalues. The resulting function can then be processed and analyzed with the operators for 1d functions. YValuesYValuesyvalues is interpreted as follows: the first value of YValuesYValuesyvalues is the function value at zero, the second value is the function value at one, etc. Thus, the values define a function at equidistant x values (with distance \(\Delta x = 1\)), starting at \(x_{1} = 0\).

The created function is composed like this:

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

where

\(\textrm{Function}[0] = 0,\) denotes the function type as an equidistant function,

\(\Delta x\) is the equidistance of the x values,

\(x_{1}\) is the starting x value (is always 0), and

\(y_{i}\) are the y values passed in YValuesYValuesyvalues with \(i \in [1, n]\) .

Alternatively, the operator create_funct_1d_pairsCreateFunct1dPairs can be used to create a function. create_funct_1d_pairsCreateFunct1dPairs also allows to define a function with non-equidistant x values by specifying them explicitly. Thus to get the same definition as with create_funct_1d_arrayCreateFunct1dArray, one would pass a tuple of x values to create_funct_1d_pairsCreateFunct1dPairs that has the same length as YValuesYValuesyvalues and contains values starting at 0 and increasing by 1 in each position. Note, however, that create_funct_1d_pairsCreateFunct1dPairs leads to a different internal representation of the function which needs more storage (because all (x,y) pairs are stored) and sometimes cannot be processed as efficiently as functions created by create_funct_1d_arrayCreateFunct1dArray.

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🔗

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

X value for function points.

Functionfunctionfunction (output_control) function_1d → (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, transform_funct_1dTransformFunct1d

Alternatives

create_funct_1d_pairsCreateFunct1dPairs, read_funct_1dReadFunct1d

See also

funct_1d_to_pairsFunct1dToPairs

Module🔗

Foundation