class_docstr: Defines the optimisation domain of the objective function. It can be a
  continuous interval or a discrete set of numeric or non-numeric values.
  The latter is also designated as a categorical domain. It is represented as
  a Python dict object with the keys naming the variables and the values defining
  the set of allowed values. A :class:`Domain` can also be recursively
  specified. That is, a key can name a subdomain represented as a Python dict.
  
  For continuous sets use Python list to define an interval in the form
  [a, b], a < b. For discrete sets use Python sets, e.g. {1, 2, 5, -0.1}
  or {"option_a", "option_b"}.
  
  Examples:
      >>> simple_domain = {"x": {0, 1},
      >>>                  "y": [-1, 1],
      >>>                  "z": {-1, 2, 4}}
      >>> nested_domain = {"discrete": {"x": {1, 2, 3}, "y": {4, 5, 6}}
      >>>                  "continuous": {"x": [-4, 4], "y": [0, 1]}
      >>>                  "categorical": {"opt1", "opt2"}}
class_docstr_tok: ["Defines","the","optimisation","domain","of","the","objective","function",".","It","can","be","a","continuous","interval","or","a","discrete","set","of","numeric","or","non-numeric","values",".","The","latter","is","also","designated","as","a","categorical","domain",".","It","is","represented","as","a","Python","dict","object","with","the","keys","naming","the","variables","and","the","values","defining","the","set","of","allowed","values",".","A",":","class",":","`","Domain","`","can","also","be","recursively","specified",".","That","is",",","a","key","can","name","a","subdomain","represented","as","a","Python","dict",".","For","continuous","sets","use","Python","list","to","define","an","interval","in","the","form","[","a",",","b","]",",","a","<","b",".","For","discrete","sets","use","Python","sets",",","e.g",".","{","1",",","2",",","5",",","-0.1","}","or","{","``","option_a","''",",","``","option_b","''","}",".","Examples",":",">",">",">","simple_domain","=","{","``","x","''",":","{","0",",","1","}",",",">",">",">","``","y","''",":","[","-1",",","1","]",",",">",">",">","``","z","''",":","{","-1",",","2",",","4","}","}",">",">",">","nested_domain","=","{","``","discrete","''",":","{","``","x","''",":","{","1",",","2",",","3","}",",","``","y","''",":","{","4",",","5",",","6","}","}",">",">",">","``","continuous","''",":","{","``","x","''",":","[","-4",",","4","]",",","``","y","''",":","[","0",",","1","]","}",">",">",">","``","categorical","''",":","{","``","opt1","''",",","``","opt2","''","}","}"]
docstr: Initialise the :class:`Domain`.
  
  Args:
      dct: :obj:`dict`. The mapping of variable names to sets of
          allowed values.
      seed: (optional) :obj:`int`. Seed for the randomised sampling.
docstr_tok: ["Initialise","the",":","class",":","`","Domain","`",".","Args",":","dct",":",":","obj",":","`","dict","`",".","The","mapping","of","variable","names","to","sets","of","allowed","values",".","seed",":","(","optional",")",":","obj",":","`","int","`",".","Seed","for","the","randomised","sampling","."]
code: def __init__(self, dct, seed=None):
      """Initialise the :class:`Domain`.
  
      Args:
          dct: :obj:`dict`. The mapping of variable names to sets of
              allowed values.
          seed: (optional) :obj:`int`. Seed for the randomised sampling.
      """
      super(Domain, self).__init__(dct)
      self._validate()
      self._rng = random.Random(seed)
      self._is_continuous = False
      for _, val in _deepiter_dict(self._data):
          if isinstance(val, list):
              self._is_continuous = True
  
imports: import ast
  import copy
  import os
  import pickle
  import random
  from collections import namedtuple
  from typing import Tuple
label_desc: Use image node_id 1 to create a new Domain object from inherited base classes: _RecursiveDict with example: obj = Domain(dct, seed)