pacman.operations.rigged_algorithms package¶
Submodules¶
pacman.operations.rigged_algorithms.hilbert_placer module¶
pacman.operations.rigged_algorithms.hilbert_state module¶
-
class
pacman.operations.rigged_algorithms.hilbert_state.
HilbertState
(xpos=0, ypos=0, xchange=1, ychange=0)[source]¶ Bases:
object
A mutable self object for the hilbert placer algorithm.
Constructor :param xpos: the x coordinate on the generated curve :param ypos: the y coordinate on the generated curve :param xchange: the change in x coordinate on the generated curve :param ychange: the change in y coordinate on the generated curve :type xpos: int :type ypos: int :type xchange: int :type ychange: int
-
move_forward
()[source]¶ method to move forward in the generation of a hilbert curve :return: the x and y coordinates on the generated curve
-
turn_left
(angle)[source]¶ method to turn left in the generation of a hilbert curve :param angle: determines the direction in which the curve turns :type angle: int :return: the x and y coordinates on the generated curve
-
turn_right
(angle)[source]¶ method to turn right in the generation of a hilbert curve :param angle: determines the direction in which the curve turns :type angle: int :return: the x and y coordinates on the generated curve
-
x_pos
¶
-
y_pos
¶
-
pacman.operations.rigged_algorithms.isomorph_check module¶
-
class
pacman.operations.rigged_algorithms.isomorph_check.
IsomorphicChecker
[source]¶ Bases:
object
A short algorithm to check if there is an isomorphism of the placement of vertices by two separate placement algorithms. One of the algorithms must output to memory placements_copy in its method and <param_type>MemoryPlacements2</param_type> in algorithms_metadata.xml.
-
check
(placements, placements_copy)[source]¶ Checks if the placements on each processor are the same for two placement algorithms.
Parameters: placements – Placements of vertices on the machine :type
pacman.model.placements.placements.Placements
:param placements_copy: memory copy of placements of vertices on the machine :typepacman.model.placements.placements.Placements
:return True if the placements are the same :rtype bool
-