def __init__(self, n_atoms, label, max_atoms_per_core, constraints=None): """ :param n_atoms: the number of atoms for the vertex :type n_atoms: int :param label: the label of the vertex :type label: str :param max_atoms_per_core: the max atoms that cna be supported by a \ core. Note that this is translated into a partitioner max \ size constraint :type max_atoms_per_core: int :param constraints: any extra constraints to be added to this vertex. :type constraints: iterable of\ :py:class:`pacman.model.constraints.abstract_contraints.abstract_constraint.AbstractConstraint` """ AbstractConstrainedVertex.__init__(self, label, constraints) if n_atoms < 1: raise PacmanInvalidParameterException( "n_atoms", str(n_atoms), "Must be at least one atom in the vertex") self._n_atoms = n_atoms # add the max atom per core constraint max_atom_per_core_constraint = \ PartitionerMaximumSizeConstraint(max_atoms_per_core) self.add_constraint(max_atom_per_core_constraint)
def __init__(self, n_atoms, label, max_atoms_per_core, constraints=None): """ :param n_atoms: the number of atoms for the vertex :type n_atoms: int :param label: the label of the vertex :type label: str :param max_atoms_per_core: the max atoms that can be supported by a \ core. Note that this is translated into a partitioner max \ size constraint :type max_atoms_per_core: int :param constraints: any extra constraints to be added to this vertex. :type constraints: iterable of\ :py:class:`pacman.model.constraints.abstract_contraints.abstract_constraint.AbstractConstraint` """ AbstractConstrainedVertex.__init__(self, label, constraints) if n_atoms < 1: raise PacmanInvalidParameterException( "n_atoms", str(n_atoms), "Must be at least one atom in the vertex") self._n_atoms = n_atoms # add the max atom per core constraint max_atom_per_core_constraint = \ PartitionerMaximumSizeConstraint(max_atoms_per_core) self.add_constraint(max_atom_per_core_constraint)
def __init__(self, resources_required, label, constraints=None): """ :param resources_required: The approximate resources needed for\ the vertex :type resources_required: :py:class:`pacman.models.resources.resource_container.ResourceContainer` :param label: The name of the subvertex :type label: str :param constraints: The constraints of the subvertex :type constraints: iterable of\ :py:class:`pacman.model.constraints.abstract_constraint\ .AbstractConstraint` :raise pacman.exceptions.PacmanInvalidParameterException: * If one of the constraints is not valid """ AbstractConstrainedVertex.__init__(self, label=label, constraints=constraints) self._resources_required = resources_required
def __init__(self, resources_required, label, constraints=None): """ :param resources_required: The approximate resources needed for\ the vertex :type resources_required: :py:class:`pacman.models.resources.resource_container.ResourceContainer` :param label: The name of the subvertex :type label: str :param constraints: The constraints of the subvertex :type constraints: iterable of\ :py:class:`pacman.model.constraints.abstract_constraint\ .AbstractConstraint` :raise pacman.exceptions.PacmanInvalidParameterException: * If one of the constraints is not valid """ AbstractConstrainedVertex.__init__(self, label=label, constraints=constraints) self._resources_required = resources_required