Module SimEconomica.PriceBelief
Expand source code
from dataclasses import dataclass
@dataclass
class PriceBelief(object):
LowerBound: int
HigherBound: int
def TranslateRange_Int(self, displacement: int):
self.LowerBound += displacement
self.HigherBound += displacement
def TranslateRange_Float(self, displacement: float):
self.LowerBound = int(self.LowerBound * displacement)
self.HigherBound = int(self.HigherBound * displacement)
def TranslateBounds_Int(self, lowerDisplacement: int, higherDisplacement: int):
self.LowerBound += lowerDisplacement
self.HigherBound += higherDisplacement
def TranslateBounds_Float(self, lowerDisplacement: float, higherDisplacement: float):
self.LowerBound = int(self.LowerBound * lowerDisplacement)
self.HigherBound = int(self.HigherBound * higherDisplacement)
Classes
class PriceBelief (LowerBound: int, HigherBound: int)
-
PriceBelief(LowerBound: int, HigherBound: int)
Expand source code
@dataclass class PriceBelief(object): LowerBound: int HigherBound: int def TranslateRange_Int(self, displacement: int): self.LowerBound += displacement self.HigherBound += displacement def TranslateRange_Float(self, displacement: float): self.LowerBound = int(self.LowerBound * displacement) self.HigherBound = int(self.HigherBound * displacement) def TranslateBounds_Int(self, lowerDisplacement: int, higherDisplacement: int): self.LowerBound += lowerDisplacement self.HigherBound += higherDisplacement def TranslateBounds_Float(self, lowerDisplacement: float, higherDisplacement: float): self.LowerBound = int(self.LowerBound * lowerDisplacement) self.HigherBound = int(self.HigherBound * higherDisplacement)
Class variables
var HigherBound : int
var LowerBound : int
Methods
def TranslateBounds_Float(self, lowerDisplacement: float, higherDisplacement: float)
-
Expand source code
def TranslateBounds_Float(self, lowerDisplacement: float, higherDisplacement: float): self.LowerBound = int(self.LowerBound * lowerDisplacement) self.HigherBound = int(self.HigherBound * higherDisplacement)
def TranslateBounds_Int(self, lowerDisplacement: int, higherDisplacement: int)
-
Expand source code
def TranslateBounds_Int(self, lowerDisplacement: int, higherDisplacement: int): self.LowerBound += lowerDisplacement self.HigherBound += higherDisplacement
def TranslateRange_Float(self, displacement: float)
-
Expand source code
def TranslateRange_Float(self, displacement: float): self.LowerBound = int(self.LowerBound * displacement) self.HigherBound = int(self.HigherBound * displacement)
def TranslateRange_Int(self, displacement: int)
-
Expand source code
def TranslateRange_Int(self, displacement: int): self.LowerBound += displacement self.HigherBound += displacement