class_docstr: A DiscreteSearchCallback class that handles mapping floating-point variables
  to discrete values.
docstr: Initialization method.
  
  Args:
      allowed_values: Possible values between lower and upper bounds that variables can be mapped.
docstr_tok: ["Initialization","method",".","Args",":","allowed_values",":","Possible","values","between","lower","and","upper","bounds","that","variables","can","be","mapped","."]
code: def __init__(
      self, allowed_values: List[Union[int, float]] = None
  ) -> None:
      """Initialization method.
  
      Args:
          allowed_values: Possible values between lower and upper bounds that variables can be mapped.
  
      """
  
      super(DiscreteSearchCallback, self).__init__()
  
      if allowed_values is not None:
          self.allowed_values = allowed_values
      else:
          self.allowed_values = []
  
imports: from typing import List, TypeVar, Union
  import numpy
  import opytimizer.utils.exception
  from opytimizer.core.space import Space
label_desc: Use image node_id 1 to create a new DiscreteSearchCallback object from inherited base classes: Callback with example: obj = DiscreteSearchCallback(allowed_values)