MCPcopy Create free account
hub / github.com/COLA-Laboratory/TransOPT / __init__

Method __init__

transopt/space/variable.py:100–106  ·  view source on GitHub ↗
(self, name, range_)

Source from the content-addressed store, hash-verified

98
99class ExponentialInteger(Variable):
100 def __init__(self, name, range_):
101 super().__init__(name, "exp2")
102 # Adjust the range to ensure it is in the form of [2^x, 2^y] and satisfies 2^63 - 1
103 lower_bound = 2 ** math.floor(math.log2(range_[0]))
104 upper_bound = min(2 ** math.ceil(math.log2(range_[1])), 2 ** 63)
105 self.range = (lower_bound, upper_bound)
106 self.is_discrete = True
107
108 @property
109 def search_space_range(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected