create_funct_1d_pairsT_create_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs创建函数一维数对(算子)

名称

create_funct_1d_pairsT_create_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs — 从一组(x,y)数对中创建一个函数。

签名

create_funct_1d_pairs( : : XValues, YValues : Function)

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

void CreateFunct1dPairs(const HTuple& XValues, const HTuple& YValues, HTuple* Function)

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

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

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

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

static void HOperatorSet.CreateFunct1dPairs(HTuple XValues, HTuple YValues, out HTuple function)

public HFunction1D(HTuple XValues, HTuple YValues)

public HFunction1D(double XValues, double YValues)

void HFunction1D.CreateFunct1dPairs(HTuple XValues, HTuple YValues)

void HFunction1D.CreateFunct1dPairs(double XValues, double YValues)

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

描述

create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs 函数根据一组 (x,y) 值对创建一维函数。函数的 XValuesXValuesXValuesXValuesXValuesxvalues 必须按升序传递。生成的函数可通过一维函数算子进行处理与分析。

生成的函数结构如下:

其中

表示函数类型为一维函数,其输入为一组成对的值,

表示通过 XValuesXValuesXValuesXValuesXValuesxvaluesYValuesYValuesYValuesYValuesYValuesyvalues 传递的 (x,y) 值对,满足

或者,可以使用 create_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array 算子创建函数。与该算子不同,create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs 算子可指定任意位置的 x 值,因此具有更强的通用性。但需注意,正因这种通用性,使用 create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs 创建的函数在处理效率上不及等间距函数。尤其需要注意的是,并非所有算子都支持此类函数。必要时,可通过 sample_funct_1dsample_funct_1dSampleFunct1dSampleFunct1dSampleFunct1dsample_funct_1d 算子将函数转换为等间距函数。

注意

create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs 函数用于检查类型为‘double’的 x 值是否呈递增序。其他某些算子同样执行此检查,但使用 ‘float’ 类型替代 ‘double’。若此类算子被作为后续操作调用,可能出现以下情况:在 ‘float’ 变体中,两个连续的 x 值看似相等,但在 ‘double’ 变体中它们本应呈递增序。若发生此类情况,则会抛出错误。

执行信息

参数

XValuesXValuesXValuesXValuesXValuesxvalues (输入控制)  number(-array) HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

函数点的 X 值。

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

函数点的 Y 值。

FunctionFunctionFunctionFunctionfunctionfunction (输出控制)  function_1d HFunction1D, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

创建函数。

可能的后继

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

替代

create_funct_1d_arraycreate_funct_1d_arrayCreateFunct1dArrayCreateFunct1dArrayCreateFunct1dArraycreate_funct_1d_array, read_funct_1dread_funct_1dReadFunct1dReadFunct1dReadFunct1dread_funct_1d

另见

funct_1d_to_pairsfunct_1d_to_pairsFunct1dToPairsFunct1dToPairsFunct1dToPairsfunct_1d_to_pairs

模块

基础