Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Replace in <obj>, that must be of integer type, the values of the list <old_ids> by the values of <new_ids>
<old_ids> and <new_ids> must be intarray, and if <new_ids> is missing it is assumed as an increasing array starting from 0

Warning: the values of <obj> itself are modified, without creating another copy of the object

e.g.

Code Block
set obj [objarray new intarray -values {10 15 3 15 20 3}]
-> 10 15 3 15 20 3
set old_ids [objarray new intarray -values {3 10 15 20}]
objarray renumber $obj $old_ids
-> 1 2 0 2 3 0

...