tuple_max2tuple_max2TupleMax2TupleMax2tuple_max2 (算子)

名称

tuple_max2tuple_max2TupleMax2TupleMax2tuple_max2 — 计算两个元组的元素最大值。

签名

tuple_max2( : : T1, T2 : Max2)

Herror tuple_max2(double T1, double T2, double* Max2)

Herror T_tuple_max2(const Htuple T1, const Htuple T2, Htuple* Max2)

void TupleMax2(const HTuple& T1, const HTuple& T2, HTuple* Max2)

HTuple HTuple::TupleMax2(const HTuple& T2) const

static void HOperatorSet.TupleMax2(HTuple t1, HTuple t2, out HTuple max2)

HTuple HTuple.TupleMax2(HTuple t2)

def tuple_max2(t1: MaybeSequence[Union[float, int, str]], t2: MaybeSequence[Union[float, int, str]]) -> Sequence[Union[float, int, str]]

def tuple_max2_s(t1: MaybeSequence[Union[float, int, str]], t2: MaybeSequence[Union[float, int, str]]) -> Union[float, int, str]

描述

tuple_max2tuple_max2TupleMax2TupleMax2TupleMax2tuple_max2 returns the elementwise maximum of the input tuples T1T1T1T1t1t1 and T2T2T2T2t2t2 in the output tuple Max2Max2Max2Max2max2max_2. If both tuples have the same length the corresponding elements of both tuples are compared. Otherwise, either T1T1T1T1t1t1 or T2T2T2T2t2t2 must have length 1. In this case, the comparison is performed for each element of the longer tuple with the single element of the other tuple. If the corresponding elements of the two tuples have the same type, it is allowed to mix strings with numerical values.

例外:空输入元组

If either or both of the input tuples are empty, the operator returns an empty tuple.

HDevelop 内联操作

HDevelop provides an in-line operation for tuple_max2tuple_max2TupleMax2TupleMax2TupleMax2tuple_max2, which can be used in an expression in the following syntax:

Max2 := max2(T1, T2)

执行信息

参数

T1T1T1T1t1t1 (输入控制)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

输入元组 1。

T2T2T2T2t2t2 (输入控制)  tuple(-array) HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

输入元组 2。

Max2Max2Max2Max2max2max_2 (输出控制)  tuple(-array) HTupleSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Elementwise maximum of the input tuples.

另见

tuple_min2tuple_min2TupleMin2TupleMin2TupleMin2tuple_min2, tuple_mintuple_minTupleMinTupleMinTupleMintuple_min, tuple_maxtuple_maxTupleMaxTupleMaxTupleMaxtuple_max, tuple_cumultuple_cumulTupleCumulTupleCumulTupleCumultuple_cumul

模块

基础