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.EdgeTrafficType

Bases: enum.IntEnum

Indicates the traffic type of an Edge in a graph

FIXED_ROUTE = 2
MULTICAST = 1
SDRAM = 3
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:
  • lo_atom (int) – Index of the lowest atom to represent.
  • hi_atom (int) – Index of the highest atom to represent.
Raises:

PacmanValueError – If the bounds of the slice are invalid.

as_slice