convert_tuple_to_vector_1dconvert_tuple_to_vector_1dConvertTupleToVector1dConvertTupleToVector1dconvert_tuple_to_vector_1d (Operator)
convert_tuple_to_vector_1dconvert_tuple_to_vector_1dConvertTupleToVector1dConvertTupleToVector1dconvert_tuple_to_vector_1d
— Distribute the elements of a tuple to a vector.
Signature
def convert_tuple_to_vector_1d(input_tuple: MaybeSequence[Union[int, float, str]], sub_tuple_length: int) -> Sequence[Union[int, float, str]]
def convert_tuple_to_vector_1d_s(input_tuple: MaybeSequence[Union[int, float, str]], sub_tuple_length: int) -> Union[int, float, str]
Description
convert_tuple_to_vector_1dconvert_tuple_to_vector_1dConvertTupleToVector1dConvertTupleToVector1dconvert_tuple_to_vector_1d
transforms a tuple into
a vector variable. The input tuple InputTupleInputTupleInputTupleinputTupleinput_tuple
is split into
sub-tuples each comprising of SubTupleLengthSubTupleLengthSubTupleLengthsubTupleLengthsub_tuple_length
elements. The
sub-tuples are stored in the output vector ResultVectorResultVectorResultVectorresultVectorresult_vector
.
Parameters
InputTupleInputTupleInputTupleinputTupleinput_tuple
(input_control) number(-array) →
HTupleMaybeSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Input tuple.
SubTupleLengthSubTupleLengthSubTupleLengthsubTupleLengthsub_tuple_length
(input_control) number →
HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Desired length of the resulting tuples in the output
vector.
Default:
1
ResultVectorResultVectorResultVectorresultVectorresult_vector
(output_control) number-vector{1} →
HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Output vector.
Result
If the values of the specified parameters are correct,
convert_tuple_to_vector_1dconvert_tuple_to_vector_1dConvertTupleToVector1dConvertTupleToVector1dconvert_tuple_to_vector_1d
returns 2 (
H_MSG_TRUE)
. Otherwise, an
exception is raised and an error code returned.
See also
convert_vector_to_tupleconvert_vector_to_tupleConvertVectorToTupleConvertVectorToTupleconvert_vector_to_tuple
Module
Foundation