HALCON Reference Manual 10.0.2
Table of Contents / Tuple / Selection ClassesClassesClasses | | | Operators

tuple_select_rangetuple_select_rangetuple_select_rangeTupleSelectRangeTupleSelectRange (Operator)

Name

tuple_select_rangetuple_select_rangetuple_select_rangeTupleSelectRangeTupleSelectRange — Select several elements of a tuple.

Signature

tuple_select_range( : : Tuple, Leftindex, Rightindex : Selected)

Herror tuple_select_range(const Hlong Tuple, const Hlong Leftindex, const Hlong Rightindex, Hlong* Selected)

Herror T_tuple_select_range(const Htuple Tuple, const Htuple Leftindex, const Htuple Rightindex, Htuple* Selected)

Herror tuple_select_range(const HTuple& Tuple, const HTuple& Leftindex, const HTuple& Rightindex, Hlong* Selected)

Herror tuple_select_range(const HTuple& Tuple, const HTuple& Leftindex, const HTuple& Rightindex, HTuple* Selected)

void HOperatorSetX.TupleSelectRange(
[in] VARIANT Tuple, [in] VARIANT Leftindex, [in] VARIANT Rightindex, [out] VARIANT* Selected)

VARIANT HTupleX.TupleSelectRange(
[in] VARIANT Tuple, [in] VARIANT Leftindex, [in] VARIANT Rightindex)

static void HOperatorSet.TupleSelectRange(HTuple tuple, HTuple leftindex, HTuple rightindex, out HTuple selected)

HTuple HTuple.TupleSelectRange(HTuple leftindex, HTuple rightindex)

Description

tuple_select_rangetuple_select_rangetuple_select_rangeTupleSelectRangeTupleSelectRange selects several consecutive elements of the input tuple TupleTupleTupleTupletuple and returns them with SelectedSelectedSelectedSelectedselected. At this, LeftindexLeftindexLeftindexLeftindexleftindex determines the index of the first element and RightindexRightindexRightindexRightindexrightindex determines the index of the last element to select. Thus both parameters LeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexrightindex must contain a single integer value (any floating point number must represent an integer value without fraction). Indices of tuple elements start at 0, that means, the first tuple element has got the index 0. The result tuple SelectedSelectedSelectedSelectedselected contains every element from the tuple TupleTupleTupleTupletuple that has got an index between LeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexrightindex (including the elements at position LeftindexLeftindexLeftindexLeftindexleftindex and RightindexRightindexRightindexRightindexrightindex). If the indices are equal, only one element is selected. In addition, it is possible that the right index is LeftindexLeftindexLeftindexLeftindexleftindex - 1. In this case and if the left or right index are valid an empty tuple is returned. Hence, the index RightindexRightindexRightindexRightindexrightindex must be greater or equal to LeftindexLeftindexLeftindexLeftindexleftindex - 1.

Parallelization

Parameters

TupleTupleTupleTupletuple (input_control)  number(-array) HTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Input tuple.

LeftindexLeftindexLeftindexLeftindexleftindex (input_control)  number(-array) HTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double)

Index of first element to select.

RightindexRightindexRightindexRightindexrightindex (input_control)  number(-array) HTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double)

Index of last element to select.

SelectedSelectedSelectedSelectedselected (output_control)  number(-array) HTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Selected tuple elements.

Alternatives

tuple_selecttuple_selecttuple_selectTupleSelectTupleSelect, tuple_first_ntuple_first_ntuple_first_nTupleFirstNTupleFirstN, tuple_last_ntuple_last_ntuple_last_nTupleLastNTupleLastN, tuple_str_bit_selecttuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelect, tuple_concattuple_concattuple_concatTupleConcatTupleConcat, tuple_select_ranktuple_select_ranktuple_select_rankTupleSelectRankTupleSelectRank

See also

tuple_removetuple_removetuple_removeTupleRemoveTupleRemove

Module

Foundation


Table of Contents / Tuple / Selection ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH