Skip to content

tuple_sgnTupleSgnTupleSgntuple_sgntuple_sgn🔗

説明🔗

tuple_sgnTupleSgnTupleSgntuple_sgntuple_sgn — tuple の符号を計算する。

書式🔗

tuple_sgn( number T, out number Sgn )void TupleSgn( const HTuple& T, HTuple* Sgn )static void HOperatorSet.TupleSgn( HTuple t, out HTuple sgn )def tuple_sgn( t: MaybeSequence[Union[float, int]] ) -> Sequence[int]

def tuple_sgn_s( t: MaybeSequence[Union[float, int]] ) -> intHerror tuple_sgn( double T, Hlong* Sgn )

Herror T_tuple_sgn( const Htuple T, Htuple* Sgn )

HTuple HTuple::TupleSgn( ) const

HTuple HTuple.TupleSgn( )

説明🔗

オペレーター tuple_sgnTupleSgn は、入力 tuple Tttの要素の符 号を計算し、整数値 (-1, 0, 1) として出力 tuple Sgnsgnsgn に値を 返します。 文字列の符号の計算は行えません。

例外: 入力tuple が 空🔗

入力tupleが空の場合、この関数は空のtupleを返します。

HDevelopインライン演算🔗

HDevelopは tuple_sgnTupleSgn の代わりとなるインライン演算を備えており、以下の構文形式で使 用することができます::

Sgn := sgn(T)

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Ttt (input_control) number(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

入力 tuple

Sgnsgnsgn (output_control) number(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

整数値での入力 tuple の符号

モジュール🔗

Foundation