create_funct_1d_arrayT_create_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array (Operator)

Name

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

Signature

create_funct_1d_array( : : YValues : Function)

Herror T_create_funct_1d_array(const Htuple YValues, Htuple* Function)

void CreateFunct1dArray(const HTuple& YValues, HTuple* Function)

void HFunction1D::HFunction1D(const HTuple& YValues)

void HFunction1D::HFunction1D(double YValues)

void HFunction1D::CreateFunct1dArray(const HTuple& YValues)

void HFunction1D::CreateFunct1dArray(double YValues)

static void HOperatorSet.CreateFunct1dArray(HTuple YValues, out HTuple function)

public HFunction1D(HTuple YValues)

public HFunction1D(double YValues)

void HFunction1D.CreateFunct1dArray(HTuple YValues)

void HFunction1D.CreateFunct1dArray(double YValues)

def create_funct_1d_array(yvalues: MaybeSequence[Union[float, int]]) -> Sequence[Union[float, int]]

Description

create_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array creates a one-dimensional function from a set of y values YValuesYValuesYValuesYValuesYValuesyvalues. The resulting function can then be processed and analyzed with the operators for 1d functions. YValuesYValuesYValuesYValuesYValuesyvalues is interpreted as follows: the first value of YValuesYValuesYValuesYValuesYValuesyvalues 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 ), starting at .

The created function is composed like this:

where

denotes the function type as an equidistant function,

is the equidistance of the x values,

is the starting x value (is always 0), and

are the y values passed in YValuesYValuesYValuesYValuesYValuesyvalues with .

Alternatively, the operator create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs can be used to create a function. create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs 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_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array, one would pass a tuple of x values to create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs that has the same length as YValuesYValuesYValuesYValuesYValuesyvalues and contains values starting at 0 and increasing by 1 in each position. Note, however, that create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs 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_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array.

Execution Information

Parameters

YValuesYValuesYValuesYValuesYValuesyvalues (input_control)  number(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X value for function points.

FunctionFunctionFunctionFunctionfunctionfunction (output_control)  function_1d HFunction1D, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Created function.

Possible Successors

write_funct_1dwrite_funct_1dWriteFunct1dWriteFunct1dWriteFunct1dwrite_funct_1d, y_range_funct_1dy_range_funct_1dYRangeFunct1dYRangeFunct1dYRangeFunct1dy_range_funct_1d, get_pair_funct_1dget_pair_funct_1dGetPairFunct1dGetPairFunct1dGetPairFunct1dget_pair_funct_1d, transform_funct_1dtransform_funct_1dTransformFunct1dTransformFunct1dTransformFunct1dtransform_funct_1d

Alternatives

create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs, read_funct_1dread_funct_1dReadFunct1dReadFunct1dReadFunct1dread_funct_1d

See also

funct_1d_to_pairsfunct_1d_to_pairsFunct1dToPairsFunct1dToPairsFunct1dToPairsfunct_1d_to_pairs

Module

Foundation