Concatenate two iconic object tuples.
concat_obj concatenates the two tuples of iconic objects Objects1 and Objects2 into a new object tuple ObjectsConcat. Hence, this tuple contains all the objects of the two input tuples:
ObjectsConcat = [Objects1,Objects2]
In ObjectsConcat the objects of Objects1 are stored first, followed by the objects of Objects2. The order of the objects is preserved. As usual, only the objects are copied, and not the corresponding images and regions, i.e., no new memory is allocated. concat_obj is designed especially for HORUS/C. In languages like Smalltalk, Prolog, and C++ it is not needed.
concat_obj should not be confused with union1 or union2, in which regions are merged, i.e., in which the number of objects is modified.
Objects1 (input_object) |
object(-array) -> object |
Object tuple 1. |
Objects2 (input_object) |
object(-array) -> object |
Object tuple 2. |
ObjectsConcat (output_object) |
object-array -> object |
Concatenated objects. |
/* generate a tuple of a circle and a rectangle */ circle(&Circle,200.0,400.0,23.0); rectangle1(&Rectangle,23.0,44.0,203.0,201.0); concat_obj(Circle,Rectangle,&CirclAndRectangle); clear(Circle); clear(Rectangle); disp_region(CircleAndRectangle);
Runtime complexity: O(|Objects1| + |Objects2);
Memory complexity of the result objects: O(|Objects1| + |Objects2|)
concat_obj returns TRUE if all objects are contained in the HORUS database. If the input is empty the behaviour can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception is raised.
count_obj, copy_obj, select_obj