class_docstr: Class providing the core functionality of a parameter, aka
  value, internal/model parameters, mutation, recombination
  and additional features such as shared random state,
  constraint check, hashes, generation and naming.
  The value field should sent to the function to optimize.
  
  Example
  -------
  >>> ng.p.Array(shape=(2,)).value
  array([0., 0.])
docstr: Whether the instance satisfies the constraints added through
  the `register_cheap_constraint` method
  
  Parameters
  ----------
  ref
      parameter of the optimization algorithm, if we want to check the tabu list.
  no_tabu
      if we want to ignore the Tabu system.
  Returns
  -------
  bool
      True iff the constraint is satisfied
docstr_tok: ["Whether","the","instance","satisfies","the","constraints","added","through","the","`","register_cheap_constraint","`","method","Parameters","--","--","--","--","--","ref","parameter","of","the","optimization","algorithm",",","if","we","want","to","check","the","tabu","list",".","no_tabu","if","we","want","to","ignore","the","Tabu","system",".","Returns","--","--","--","-","bool","True","iff","the","constraint","is","satisfied"]
code: def satisfies_constraints(
      self, ref: tp.Optional[P] = None, no_tabu: bool = False
  ) -> bool:
      """Whether the instance satisfies the constraints added through
      the `register_cheap_constraint` method
  
      Parameters
      ----------
      ref
          parameter of the optimization algorithm, if we want to check the tabu list.
      no_tabu
          if we want to ignore the Tabu system.
      Returns
      -------
      bool
          True iff the constraint is satisfied
      """
      inside = self._subobjects.apply("satisfies_constraints")
      if not all(inside.values()):
          return False
      val = self.value
      if (
          not no_tabu
          and ref is not None
          and ref.tabu_length > 0
          and self.tabu_fails < 30
      ):
          tabu_val = self.tabu_congruence(val)
          if isinstance(tabu_val, np.ndarray):
              tabu_val = hash(tabu_val.tobytes())
          if isinstance(tabu_val, dict):
              keys = sorted(list(tabu_val.keys()))
              tabu_val = str(keys) + str([tabu_val[k] for k in keys])
          try:
              if tabu_val in ref.tabu_set:
                  self.tabu_fails += 1
                  return False
              else:
                  ref.tabu_set.add(tabu_val)
                  if len(ref.tabu_list) > ref.tabu_index:
                      ref.tabu_set.remove(ref.tabu_list[ref.tabu_index])
                      ref.tabu_list[ref.tabu_index] = tabu_val
                  else:
                      assert len(ref.tabu_list) == ref.tabu_index
                      ref.tabu_list += [tabu_val]
                  ref.tabu_list[ref.tabu_index] = tabu_val
                  ref.tabu_index = (
                      ref.tabu_index + 1
                  ) % ref.tabu_length
          except RuntimeError as e:
              raise RuntimeError(
                  f"{tabu_val} has type {type(tabu_val)}, and this leads to {e}."
              )
      if not self._constraint_checkers:
          return True
      return all(
          utils.float_penalty(func(val)) <= 0
          for func in self._constraint_checkers
      )
  
imports: import uuid
  import warnings
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from .None import utils
  from ._layering import ValueProperty
  from ._layering import Layered
  from ._layering import Level
label_desc: Use image node_id 18 for calling the Parameter obj's underlying member method code with example usage: obj.satisfies_constraints(ref, no_tabu) and returns: all, False, True, False