pacman.model.graphs.common package¶
Module contents¶
-
class
pacman.model.graphs.common.
ConstrainedObject
(constraints=None)¶ Bases:
object
An implementation of an object which holds constraints.
Parameters: constraints (iterable(AbstractConstraint)) – Any initial constraints -
add_constraint
(constraint)[source]¶ Add a new constraint to the collection of constraints
Parameters: constraint (AbstractConstraint) – constraint to add Raises: PacmanInvalidParameterException – If the constraint is not valid
-
add_constraints
(constraints)[source]¶ Add an iterable of constraints to the collection of constraints
Parameters: constraints (AbstractConstraint) – the constraints to add Raises: PacmanInvalidParameterException – If one of the constraints is not valid
-
constraints
¶ An iterable of constraints
Return type: iterable(AbstractConstraint)
-
-
class
pacman.model.graphs.common.
Slice
¶ Bases:
pacman.model.graphs.common.slice.Slice
Represents a slice of a vertex.
Attr int lo_atom: The lowest atom represented in the slice. Attr int hi_atom: The highest atom represented in the slice. Attr int n_atoms: The number of atoms represented by the slice. Attr slice as_slice: This slice represented as a slice object (for use in indexing lists, arrays, etc.) Create a new Slice object.
Parameters: Raises: PacmanValueError – If the bounds of the slice are invalid.
-
as_slice
¶
-