remove_objremove_objRemoveObjRemoveObjremove_obj (Operator)
Name
remove_objremove_objRemoveObjRemoveObjremove_obj
— Remove objects from an iconic object tuple.
Signature
def remove_obj(objects: HObject, index: MaybeSequence[int]) -> HObject
Description
remove_objremove_objRemoveObjRemoveObjRemoveObjremove_obj
removes the elements referred by IndexIndexIndexIndexindexindex
from
the tuple ObjectsObjectsObjectsObjectsobjectsobjects
and returns the rest in the tuple ObjectsReducedObjectsReducedObjectsReducedObjectsReducedobjectsReducedobjects_reduced
.
IndexIndexIndexIndexindexindex
determines the index of the elements to remove. Note that, in
contrast to control tuples, indices for the object tuple elements start at 1,
i.e. the first tuple element has got the index 1. Duplicates and indices
out of range are ignored.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
ObjectsObjectsObjectsObjectsobjectsobjects
(input_object) object(-array) →
objectHObjectHObjectHObjectHobject
Input object tuple.
ObjectsReducedObjectsReducedObjectsReducedObjectsReducedobjectsReducedobjects_reduced
(output_object) object(-array) →
objectHObjectHObjectHObjectHobject *
Remaining object tuple.
IndexIndexIndexIndexindexindex
(input_control) number(-array) →
HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Indices of the objects to be removed.
Example (HDevelop)
gen_empty_obj (Images)
for Index := 1 to 10 by 1
gen_image_const (Image, 'byte', Index, Index)
concat_obj (Images, Image, Images)
endfor
remove_obj (Images, Images, [7, 4])
Alternatives
select_objselect_objSelectObjSelectObjSelectObjselect_obj
See also
count_objcount_objCountObjCountObjCountObjcount_obj
,
select_objselect_objSelectObjSelectObjSelectObjselect_obj
,
copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj
,
insert_objinsert_objInsertObjInsertObjInsertObjinsert_obj
Module
Foundation