Model.permutemark#

Model.permutemark(collection, type)#

Permutes the entities on a collection.

Parameters:
  • collection (Collection) – The collection containing the entities.

  • type (int) –

    The type of action which should be taken:

    0 - Swap x with y

    1 - Swap x with z

    2 - Swap y with z

Example#

Permute the elements with IDs 10 , 11 , and 12 switch the x and y values#
import hm
import hm.entities as ent

model = hm.Model()

model.permutemark(collection=hm.Collection(model, ent.Element, [10, 11, 12]), type=0)