本文整理汇总了Python中Grid.Grid.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Grid.__init__方法的具体用法?Python Grid.__init__怎么用?Python Grid.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid.Grid
的用法示例。
在下文中一共展示了Grid.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self, data, param):
Grid.__init__(self, data, param)
self.param.m = self.param.partitionsHTree[1]
self.param.maxHeightHTree = 2
logging.debug("Grid_pure: size: %d" % self.param.m)
示例2: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self, points=(), left=0.0, right=1.0,
start=0.0, end=1.0,
id=u'', classes=(),
lineidprefix=u'', lineclasses=()):
"""
@param points: A sequence of points to draw grid lines at
@param left: The leftmost coordinate to begin drawing grid lines at
@param right: The rightmost coordinate to stop drawing grid lines at
@param start: The starting coordinate of the axis
@param end: The ending coordinate of the axis
@param id: The unique ID to be used in the SVG document
@type id: string
@param classes: Classnames to be used in the SVG document
@type classes: string or sequence of strings
@param lineidprefix: The prefix for each grid line's ID
@type lineidprefix: string
@param lineclasses: Classnames to be applied to each grid line
@type lineclasses: string or sequence of strings
"""
Grid.__init__(self, points, start, end, id, classes, lineidprefix, lineclasses)
self.left = left
self.right = right
示例3: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self, data, param):
Grid.__init__(self, data, param)
self.param.m = self.param.part_size
self.param.maxHeightHTree = 2
logging.debug("Grid_standard: size: %d" % self.param.m)
示例4: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self, raw_grid):
Grid.__init__(self, raw_grid)
# Inherits Grid class
self.number_of_iterations_yet = 0
self.gamma = 0.7
# gamma : discount factor
self.errant_probability = 0.1
# two errant outcomes
self.intended_probability = 0.8
示例5: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self, **kwargs):
pygame.init()
self.screen_info = pygame.display.Info()
self.screen_size = kwargs.get("screen_size", (0, 0))
self.resizable = kwargs.get("resizable", True)
if self.resizable:
self.screen = pygame.display.set_mode(self.screen_size, RESIZABLE)
else:
self.screen = pygame.display.set_mode(self.screen_size)
self.rect = Rect((0, 0), self.screen.get_size())
self.layout = kwargs.get("layout", None)
if self.layout == "grid":
Grid.__init__(self)
self.layout = Grid
elif self.layout == "flow":
Flow.__init__(self)
self.layout = Flow
elif self.layout == "place" or self.layout is None:
Place.__init__(self)
self.layout = Place
self.fullscreen = kwargs.get("fullscreen", False)
self.last_screen_size = self.rect.size
示例6: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self, parent, **kwargs):
Widget.__init__(self, parent)
Grid.__init__(self)
self.rect = Rect(0, 0, kwargs.get("width", 0), kwargs.get("height", 0))
示例7: __init__
# 需要导入模块: from Grid import Grid [as 别名]
# 或者: from Grid.Grid import __init__ [as 别名]
def __init__(self):
"Inicializando variáveis."
Grid.__init__(self)