def increase_volume_once(): """ Uses random volume increasing moves to increase the surface area once. """ # Try a random volume increasing move on a random simplex mdata = moves.try_random(moves.list_of_volume_increasing_functions) # If the movedata exists, apply the move if mdata: moves.apply_move(mdata)
def loop_once(self): """ Runs one iteration of the metropolis loop. """ # Move data for a random move on a random simplex mdata = moves.try_random(moves.list_of_try_functions) # If a move is topologically acceptable, check the fitness # function, and possibly accept it. Otherwise, do nothing. if mdata: do_move = self.confirm_move(mdata) if do_move: moves.apply_move(mdata)