tuple_gen_sequencetuple_gen_sequenceTupleGenSequenceTupleGenSequencetuple_gen_sequence (Operator)
Name
tuple_gen_sequencetuple_gen_sequenceTupleGenSequenceTupleGenSequencetuple_gen_sequence
— Generate a tuple with a sequence of equidistant values.
Signature
def tuple_gen_sequence(start: Union[float, int], end: Union[float, int], step: Union[float, int]) -> Sequence[Union[float, int]]
def tuple_gen_sequence_s(start: Union[float, int], end: Union[float, int], step: Union[float, int]) -> Union[float, int]
Description
tuple_gen_sequencetuple_gen_sequenceTupleGenSequenceTupleGenSequenceTupleGenSequencetuple_gen_sequence
generates a new tuple SequenceSequenceSequenceSequencesequencesequence
with
a sequence of equidistant values:
[Start, Start + Step, Start + 2*Step, ... End]
StepStepStepStepstepstep
must not be zero and the sign of
(EndEndEndEndendend
- StartStartStartStartstartstart
) must be equal to the sign of StepStepStepStepstepstep
.
The last entry of SequenceSequenceSequenceSequencesequencesequence
may actually be less than EndEndEndEndendend
,
if (EndEndEndEndendend
- StartStartStartStartstartstart
) is not divisible by StepStepStepStepstepstep
without
remainder.
Exception: Empty input tuples
If any of the input tuples is empty, an exception is raised.
HDevelop In-line Operation
HDevelop provides an in-line operation for tuple_gen_sequencetuple_gen_sequenceTupleGenSequenceTupleGenSequenceTupleGenSequencetuple_gen_sequence
,
which can be used in an expression in the following syntax:
Sequence := [Start:Step:End]
An alternative syntax is
Sequence := [Start:End]
,
where StepStepStepStepstepstep
defaults to 1.
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
StartStartStartStartstartstart
(input_control) number →
HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Start value of the tuple.
EndEndEndEndendend
(input_control) number →
HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Maximum value for the last entry.
StepStepStepStepstepstep
(input_control) number →
HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Increment value.
SequenceSequenceSequenceSequencesequencesequence
(output_control) number(-array) →
HTupleSequence[Union[float, int]]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
The resulting sequence.
Alternatives
tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_select
,
tuple_selecttuple_selectTupleSelectTupleSelectTupleSelecttuple_select
,
tuple_str_first_ntuple_str_first_nTupleStrFirstNTupleStrFirstNTupleStrFirstNtuple_str_first_n
,
tuple_str_last_ntuple_str_last_nTupleStrLastNTupleStrLastNTupleStrLastNtuple_str_last_n
,
tuple_concattuple_concatTupleConcatTupleConcatTupleConcattuple_concat
,
tuple_inserttuple_insertTupleInsertTupleInsertTupleInserttuple_insert
,
tuple_replacetuple_replaceTupleReplaceTupleReplaceTupleReplacetuple_replace
,
tuple_gen_consttuple_gen_constTupleGenConstTupleGenConstTupleGenConsttuple_gen_const
See also
tuple_randtuple_randTupleRandTupleRandTupleRandtuple_rand
Module
Foundation