def __init__(self, level, pos): Cell.__init__(self, level, pos) self.tile = 2, 0 self.player_can_enter = False self.robot_can_enter = True
def __init__(self, parent): Cell.__init__(self, parent) Controller.__init__(self, self.parent.canvas, parent) self.offset_x = 0 self.offset_y = 0 self.update_request = False self.old_zoom = False
def __init__(self, level, pos, flow_dir=None): Cell.__init__(self, level, pos) self.tile = (3, 0) if flow_dir is None else (4, 0) self.rotate = 0 if flow_dir is None else flow_dir self.player_can_enter = False self.robot_can_enter = False self.flow_dir = flow_dir
def __init__(self, level, pos, facing): Cell.__init__(self, level, pos) self.tile = 7, 3 + (facing % 2) self.player_can_enter = False self.robot_can_enter = False self.object_can_enter = False self.floor_tile = 0, 0
def __init__(self, cell, dir): Cell.__init__(self, cell.x, cell.y, cell.typeC, cell.txt, cell.rectangle) self.dir = dir self.cout = 0 self.h = float('inf') # heuristique self.parent = None self.arrow = [] self.time = 0
def __init__(self, level, pos, facing=None): Cell.__init__(self, level, pos) self.tile = 9, 0 self.facing = facing self.robot_can_enter = False self.corner_tile = 10, 0 # diagonal dir the corner is facing, clockwise from northeast (optional) self.facing = facing
def __init__(self, level, pos, facing, colour): Cell.__init__(self, level, pos) self.tile = 5, 2 + colour self.rotate = facing self.player_can_enter = False self.robot_can_enter = False self.object_can_enter = False self.floor_tile = 0, 0 self.colour = colour
def __init__(self, level, pos, state): Cell.__init__(self, level, pos) self.tile = 11, 0 self.player_can_enter = not state self.robot_can_enter = not state self.object_can_enter = not state self.state = bool(state) self.off_tile = 0, 0 self.on_tile = 1, 0
def __init__(self, x: int, y: int, size: int, color: SDL_Color, row: int, col: int): """ :param x: x position on screen in px :param y: y position on screen in px :param size: width/height in px :param color: cell color :param row: row position in board :param col: column position in board """ Cell.__init__(self, x, y, size, color) self._row = row self._col = col self._def_color = color self._used = False
def __init__(self, cellidx, channelwidth, net, filters, log_stats, outputs): self.cellidx = cellidx self.log_stats = log_stats self.cellname = "Envelope" self.numbins = 100 self.batchsize = int(net.shape[0]) self.output_per_filter = outputs img_dims = int(net.shape[1]) self.imagesize = [img_dims, img_dims] Cell.__init__(self) scope = 'Cell{}'.format(self.cellidx) if self.log_stats: with tf.variable_scope(scope, reuse=False): for branch in filters: with tf.variable_scope(branch, reuse=False): self.init_stats()
def __init__(self, cellidx, channelwidth, net, nn, filters, mode, outputs): self.cellidx = cellidx self.nn = nn self.mode = mode self.cellname = "Envelope" self.numbranches = 4 self.numbins = 100 self.batchsize = int(net.shape[0]) numfilters = len(filters.keys()) self.output_per_filter = outputs img_dims = int(net.shape[1]) self.imagesize = [img_dims, img_dims] Cell.__init__(self) scope = 'Cell' + str(self.cellidx) if self.mode == "construct": with tf.variable_scope(scope, reuse=False): for branch in filters.keys(): with tf.variable_scope(branch, reuse=False): self.init_stats()
def __init__(self, over_cell): Cell.__init__(self, over_cell.row, over_cell.column) if over_cell.horizontal_passage(): self.north = over_cell.north over_cell.north.south = self self.south = over_cell.south over_cell.south.north = self self.link(self.north) self.link(self.south) else: self.east = over_cell.east over_cell.east.west = self self.west = over_cell.west over_cell.west.east = self self.link(self.east) self.link(self.west)
def __init__( self, fname, bndy, skiprows=0, shape=(203,198), verbose=False ): """ Load a complete, concatenated cell text file. fname : path to file. skiprows : skip the first 'skiprows'. shape : shape for resizing each frame. default=(203,198) square : dimension for reshaping boundary to and cell frames to a square matrix. necessary for lining them up, since even though boundary is centered correctly over cell, this only occurs when shapes of matrices _do not_ line up. """ Cell.__init__( self, fname, bndy, skiprows, shape, verbose ) # self.fname = fname # self.shape = shape if shape[0] > shape[1]: self.square = shape[1] else: self.square = shape[0] self.verbose = verbose # #self.all_frames = np.loadtxt( fname, skiprows=skiprows, dtype=np.uint ) # if self.verbose: # print "Loaded frames" self.frames = [] for frame in self.all_frames: frame.resize( shape ) self.frames.append( frame[:self.square,:self.square] ) # B = np.loadtxt( bndy )# dtype=np.uint ) # B.resize( (shape[1],shape[0]) ) # boundary init'd in Cell self.boundary = self.boundary[:self.square,:self.square] if self.verbose: print "Done initializing frames and boundary"
def __init__(self): Gtk.Window.__init__(self) screen = self.get_screen() monitors = [] for m in range(screen.get_n_monitors()): monitors.append(screen.get_monitor_geometry(m)) rect = monitors[screen.get_monitor_at_window(screen.get_active_window())] w = rect.width h = rect.height self.x_offset = rect.x self.y_offset = rect.y Cell.__init__(self, 0, 0, w, h) print(self.w) self.set_position(Gtk.WindowPosition.CENTER) self.connect("delete-event", self.delete) self.connect("focus-out-event", Gtk.main_quit) self.connect("key-press-event", self.handle_keypress) self.connect("draw", self.area_draw) self.set_size_request(w, h) self.set_border_width(0) self.set_title('mouse-something') self.screen = self.get_screen() self.visual = self.screen.get_rgba_visual() if self.visual != None and self.screen.is_composited(): self.set_visual(self.visual) self.set_app_paintable(True) self.show_all() self.focus = self self.cells = [self.divide()]
def __init__(self, level, pos, flow_dir): Cell.__init__(self, level, pos) self.tile = 7, 0 self.rotate = flow_dir self.robot_can_enter = False
def __init__(self, cellidx): self.cellidx = cellidx self.cellname = "Init" Cell.__init__(self)
def __init__(self, **kwargs): if ICoolObject.check_command_params_init(self, HardEdgeTransport.command_params_ext, **kwargs) is False: sys.exit(0) he_sol = Sol(model='edge', ent_def=0, ex_def=0, foc_flag=0, bs=self.bs) Cell.__init__(self, ncells=1, flip=False, field=he_sol)
def __init__(self, level, pos): Cell.__init__(self, level, pos)
def __init__(self, cellidx, nn): self.cellidx = cellidx self.cellname = "Init" self.nn = nn Cell.__init__(self)
def __init__(self, parent): Cell.__init__(self, parent) self.add_output("Y") self.val = 0 self.old_value = 0 self.module = None
def __init__(self, row, column, max_size=20, min_size=0): Cell.__init__(self, row, column) self.size = random.randrange(min_size, max_size) / 2
def __init__(self, level, pos, colour): Cell.__init__(self, level, pos) self.tile = 9, 2 + colour self.colour = colour
def __init__(self, row, column, max_size=20, min_size = 0): Cell.__init__(self, row, column) size_range = max_size - min_size rand180 = random.randrange(180) self.size = min_size + (math.cos(math.radians(rand180)) * size_range + size_range) / 2
def __init__(self, ship): Cell.__init__(self, ship, 'white', None) self.char = '|'
def __init__(self, level, pos): Cell.__init__(self, level, pos) self.tile = 5, 0 self.robot_can_enter = False
def coordinate(cells): # 坐标系转换,为实现allcells转换这里是cells,可以带入cellsthen等等cellgroup coordinatecells = [] for cell in cells: x = Cell.__init__(cell, id=cell.id, pos=direction(cell), veloc=relative_speed(cell), radius=cell.radius) coordinatecells.append(x) return coordinatecells
def __init__(self, row, column): Cell.__init__(self, row, column) self.weight = 1
def __init__(self, level, pos): Cell.__init__(self, level, pos) self.tile = 6, 0
def __init__(self, row, column, grid): Cell.__init__(self, row, column) self.grid = grid
def __init__(self, row, column): Cell.__init__(self, row, column) self.outward = [] self.cw = None self.ccw = None self.inward = None
def __init__(self, ship): Cell.__init__(self, ship, (180, 255, 180), None, '%')
def __init__(self, parent): Cell.__init__(self, parent) self.add_input("A") self.old_value = 0
def __init__(self, nn, cellidx): self.cellidx = cellidx self.cellname = "Classification" self.nn = nn Cell.__init__(self)
def __init__(self, row, column): Cell.__init__(self, row, column) self.northeast = None self.northwest = None self.southeast = None self.southwest = None
def __init__(self): self.cellname = "Classification" Cell.__init__(self)
def __init__(self, face, row, column): self.face = face Cell.__init__(self, row, column)