pacman.model.graphs.application.abstract package

Module contents

class pacman.model.graphs.application.abstract.AbstractOneAppOneMachineVertex(machine_vertex, label, constraints, n_atoms=1)

Bases: pacman.model.graphs.application.ApplicationVertex

An ApplicationVertex that has a fixed Singleton MachineVertex

Creates an ApplicationVertex which has exactly one predefined MachineVertex

Parameters:
  • machine_vertex – MachineVertex
  • label (str) – The optional name of the vertex.
  • constraints (iterable(AbstractConstraint)) – The optional initial constraints of the vertex.
Raises:

PacmanInvalidParameterException – If one of the constraints is not valid

machine_vertex

Provides access to the MachineVertex at all times

Return type:MachineVertex
n_atoms

The number of atoms in the vertex

Return type:int
remember_machine_vertex(machine_vertex)[source]

Adds the Machine vertex the iterable returned by machine_vertices

This method will be called by MachineVertex.app_vertex No other place should call it.

Parameters:machine_vertex (MachineVertex) – A pointer to a machine_vertex. This vertex may not be fully initialized but will have a slice
Raises:PacmanValueError – If the slice of the machine_vertex is too big