Model.markdifference#

Model.markdifference(collectiona, collectionb)#

Determines the difference between two collections and stores the results in the first collection.

Both collectiona and collectionb must contain the same entity type.

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

  • collectionb (Collection) – The collection containing second the element entities.

Example#

Delete the difference between the elements on collectiona and collectionb#
import hm
import hm.entities as ent

model = hm.Model()

Collection1 = hm.Collection(model,ent.Element,[1,2,3,4])
Collection2 = hm.Collection(model,ent.Element,[4,5,6,7])

model.markdifference(collectiona=Collection1,collectionb=Collection2)
model.deletemark(Collection1)

Note

This will delete elements with IDs 1, 2, and 3.