Model.markintersection#
- Model.markintersection(collectiona, collectionb)#
Determines the intersection between two collections of elements and stores the results in the first collection of elements.
Both
collectionaandcollectionbmust contain the same entity type.- Parameters:
collectiona (Collection) – The collection containing the first element entities.
collectionb (Collection) – The collection containing the second element entities.
Example#
Delete the intersection between the elements oncollectionaandcollectionb#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.markintersection(collectiona=Collection1, collectionb=Collection2)
Note
This will delete elements with ID 4.