create_funct_1d_arrayT_create_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArray (Operator)

Name

create_funct_1d_arrayT_create_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArray — 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)

Description

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

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

Execution Information

Parameters

YValuesYValuesYValuesYValuesYValues (input_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

X value for function points.

FunctionFunctionFunctionFunctionfunction (output_control)  function_1d HFunction1D, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Created function.

Possible Successors

write_funct_1dwrite_funct_1dWriteFunct1dWriteFunct1dWriteFunct1d, y_range_funct_1dy_range_funct_1dYRangeFunct1dYRangeFunct1dYRangeFunct1d, get_pair_funct_1dget_pair_funct_1dGetPairFunct1dGetPairFunct1dGetPairFunct1d, transform_funct_1dtransform_funct_1dTransformFunct1dTransformFunct1dTransformFunct1d

Alternatives

create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairs, read_funct_1dread_funct_1dReadFunct1dReadFunct1dReadFunct1d

See also

funct_1d_to_pairsfunct_1d_to_pairsFunct1dToPairsFunct1dToPairsFunct1dToPairs

Module

Foundation