tuple_sgntuple_sgnTupleSgnTupleSgntuple_sgn (算子)
名称
tuple_sgntuple_sgnTupleSgnTupleSgntuple_sgn — 计算元组的符号。
签名
Herror tuple_sgn(double T, Hlong* Sgn)
Herror T_tuple_sgn(const Htuple T, Htuple* Sgn)
def tuple_sgn(t: MaybeSequence[Union[float, int]]) -> Sequence[int]
def tuple_sgn_s(t: MaybeSequence[Union[float, int]]) -> int
描述
tuple_sgntuple_sgnTupleSgnTupleSgnTupleSgntuple_sgn calculates the sign of the elements of the
input tuple TTTTtt and returns them as integer numbers
(-1,0,1) in the output tuple SgnSgnSgnSgnsgnsgn.
The calculation of the sign of a string is not allowed.
例外:空输入元组
If the input tuple is empty, the operator returns an empty tuple.
HDevelop 内联操作
HDevelop provides an in-line operation for tuple_sgntuple_sgnTupleSgnTupleSgnTupleSgntuple_sgn,
which can be used in an expression in the following syntax:
Sgn := sgn(T)
执行信息
- 多线程类型:独立(即使使用独占算子也能并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
TTTTtt (输入控制) number(-array) → HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Input tuple.
SgnSgnSgnSgnsgnsgn (输出控制) number(-array) → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Signs of the input tuple as integer numbers.
模块
基础