INSTRUCTION
stringlengths
1
8.43k
RESPONSE
stringlengths
75
104k
Sends a message to the UDP receiver
def send(self, message_type, task_id, message): """ Sends a message to the UDP receiver Parameter --------- message_type: monitoring.MessageType (enum) In this case message type is RESOURCE_INFO most often task_id: int Task identifier of the task for whi...
Internal Wrap the Parsl app with a function that will call the monitor function and point it at the correct pid when the task begins.
def monitor_wrapper(f, task_id, monitoring_hub_url, run_id, sleep_dur): """ Internal Wrap the Parsl app with a function that will call the monitor function and point it at the correct pid when the task begins. """ def wrapped(*args, **kwargs): p = Process(target=monitor, args...
Synchronously execute a commandline string on the shell.
def execute_wait(self, cmd, walltime=2, envs={}): ''' Synchronously execute a commandline string on the shell. Args: - cmd (string) : Commandline string to execute - walltime (int) : walltime in seconds Kwargs: - envs (dict) : Dictionary of env variables ...
Execute asynchronousely without waiting for exitcode
def execute_no_wait(self, cmd, walltime=2, envs={}): ''' Execute asynchronousely without waiting for exitcode Args: - cmd (string): Commandline string to be executed on the remote side - walltime (int): timeout to exec_command KWargs: - envs (dict): A dictio...
Transport a local file to a directory on a remote machine
def push_file(self, local_source, remote_dir): ''' Transport a local file to a directory on a remote machine Args: - local_source (string): Path - remote_dir (string): Remote path Returns: - str: Path to copied file on remote machine Raises: ...
Transport file on the remote side to a local directory
def pull_file(self, remote_source, local_dir): ''' Transport file on the remote side to a local directory Args: - remote_source (string): remote_source - local_dir (string): Local directory to copy to Returns: - str: Local path to file Raises: ...
Return true if the path refers to an existing directory.
def isdir(self, path): """Return true if the path refers to an existing directory. Parameters ---------- path : str Path of directory on the remote side to check. """ result = True try: self.sftp_client.lstat(path) except FileNotFo...
Create a directory on the remote side.
def makedirs(self, path, mode=511, exist_ok=False): """Create a directory on the remote side. If intermediate directories do not exist, they will be created. Parameters ---------- path : str Path of directory on the remote side to create. mode : int ...
This function needs to be fast at the same time aware of the possibility of ZMQ pipes overflowing.
def run(self, message): """ This function needs to be fast at the same time aware of the possibility of ZMQ pipes overflowing. The timeout increases slowly if contention is detected on ZMQ pipes. We could set copy=False and get slightly better latency but this results in ZMQ soc...
This function needs to be fast at the same time aware of the possibility of ZMQ pipes overflowing.
def put(self, message): """ This function needs to be fast at the same time aware of the possibility of ZMQ pipes overflowing. The timeout increases slowly if contention is detected on ZMQ pipes. We could set copy=False and get slightly better latency but this results in ZMQ soc...
Internal. This is the function that the thread will execute. waits on an event so that the thread can make a quick exit when close () is called
def _wake_up_timer(self, kill_event): """Internal. This is the function that the thread will execute. waits on an event so that the thread can make a quick exit when close() is called Args: - kill_event (threading.Event) : Event to wait on """ while True: ...
Let the FlowControl system know that there is an event.
def notify(self, event_id): """Let the FlowControl system know that there is an event.""" self._event_buffer.extend([event_id]) self._event_count += 1 if self._event_count >= self.threshold: logger.debug("Eventcount >= threshold") self.make_callback(kind="event")
Makes the callback and resets the timer.
def make_callback(self, kind=None): """Makes the callback and resets the timer. KWargs: - kind (str): Default=None, used to pass information on what triggered the callback """ self._wake_up_time = time.time() + self.interval self.callback(tasks=se...
Makes the callback and resets the timer.
def make_callback(self, kind=None): """Makes the callback and resets the timer. """ self._wake_up_time = time.time() + self.interval self.callback(*self.cb_args)
Returns the IP address of the given interface name e. g. eth0
def address_by_interface(ifname): """Returns the IP address of the given interface name, e.g. 'eth0' Parameters ---------- ifname : str Name of the interface whose address is to be returned. Required. Taken from this Stack Overflow answer: https://stackoverflow.com/questions/24196932/how-c...
Submit a job Args: - cmd_string: ( String ) - Name of the container to initiate - blocksize: ( float ) - Number of replicas - tasks_per_node ( int ): command invocations to be launched per node
def submit(self, cmd_string, blocksize, tasks_per_node, job_name="parsl"): """ Submit a job Args: - cmd_string :(String) - Name of the container to initiate - blocksize :(float) - Number of replicas - tasks_per_node (int) : command invocations to be launched per...
Create a kubernetes deployment for the job. Args: - job_name ( string ): Name of the job and deployment - job_image ( string ): Docker image to launch KWargs: - port ( integer ): Container port - replicas: Number of replica containers to maintain Returns: - True: The deployment object to launch
def _create_deployment_object(self, job_name, job_image, deployment_name, port=80, replicas=1, cmd_string=None, engine_json_file='~/.ipython/profile_default/security/ipcontroller-engin...
Create the kubernetes deployment
def _create_deployment(self, deployment): """ Create the kubernetes deployment """ api_response = self.kube_client.create_namespaced_deployment( body=deployment, namespace=self.namespace) logger.debug("Deployment created. status='{0}'".format(str(api_response.status)))
Delete deployment
def _delete_deployment(self, deployment_name): """ Delete deployment """ api_response = self.kube_client.delete_namespaced_deployment( name=deployment_name, namespace=self.namespace, body=client.V1DeleteOptions( propagation_policy='Foreground', ...
Compose the launch command and call the scale_out
def initialize_scaling(self): """ Compose the launch command and call the scale_out This should be implemented in the child classes to take care of executor specific oddities. """ debug_opts = "--debug" if self.worker_debug else "" max_workers = "" if self.max_workers ==...
Create the Interchange process and connect to it.
def start(self): """Create the Interchange process and connect to it. """ self.outgoing_q = zmq_pipes.TasksOutgoing("127.0.0.1", self.interchange_port_range) self.incoming_q = zmq_pipes.ResultsIncoming("127.0.0.1", self.interchange_port_range) self.command_client = zmq_pipes.Comm...
Listen to the queue for task status messages and handle them.
def _queue_management_worker(self): """Listen to the queue for task status messages and handle them. Depending on the message, tasks will be updated with results, exceptions, or updates. It expects the following messages: .. code:: python { "task_id" : <task...
Starts the interchange process locally
def _start_local_queue_process(self): """ Starts the interchange process locally Starts the interchange process locally and uses an internal command queue to get the worker task and result ports that the interchange has bound to. """ comm_q = Queue(maxsize=10) self.queue...
Puts a worker on hold preventing scheduling of additional tasks to it.
def hold_worker(self, worker_id): """Puts a worker on hold, preventing scheduling of additional tasks to it. This is called "hold" mostly because this only stops scheduling of tasks, and does not actually kill the worker. Parameters ---------- worker_id : str ...
Sends hold command to all managers which are in a specific block
def _hold_block(self, block_id): """ Sends hold command to all managers which are in a specific block Parameters ---------- block_id : str Block identifier of the block to be put on hold """ managers = self.connected_managers for manager in manager...
Scales out the number of blocks by blocks
def scale_out(self, blocks=1): """Scales out the number of blocks by "blocks" Raises: NotImplementedError """ r = [] for i in range(blocks): if self.provider: external_block_id = str(len(self.blocks)) launch_cmd = self.lau...
Scale in the number of active blocks by specified amount.
def scale_in(self, blocks=None, block_ids=[]): """Scale in the number of active blocks by specified amount. The scale in method here is very rude. It doesn't give the workers the opportunity to finish current tasks or cleanup. This is tracked in issue #530 Parameters --...
Return status of all blocks.
def status(self): """Return status of all blocks.""" status = [] if self.provider: status = self.provider.status(self.blocks.values()) return status
Shutdown the executor including all workers and controllers.
def shutdown(self, hub=True, targets='all', block=False): """Shutdown the executor, including all workers and controllers. This is not implemented. Kwargs: - hub (Bool): Whether the hub should be shutdown, Default:True, - targets (list of ints| 'all'): List of block id'...
Read into buf from the device. The number of bytes read will be the length of buf.
def readinto(self, buf, **kwargs): """ Read into ``buf`` from the device. The number of bytes read will be the length of ``buf``. If ``start`` or ``end`` is provided, then the buffer will be sliced as if ``buf[start:end]``. This will not cause an allocation like ``buf[st...
Write the bytes from buffer to the device. Transmits a stop bit if stop is set.
def write(self, buf, **kwargs): """ Write the bytes from ``buffer`` to the device. Transmits a stop bit if ``stop`` is set. If ``start`` or ``end`` is provided, then the buffer will be sliced as if ``buffer[start:end]``. This will not cause an allocation like ``buffer[st...
Write the bytes from out_buffer to the device then immediately reads into in_buffer from the device. The number of bytes read will be the length of in_buffer. Transmits a stop bit after the write if stop is set.
def write_then_readinto(self, out_buffer, in_buffer, *, out_start=0, out_end=None, in_start=0, in_end=None, stop=True): """ Write the bytes from ``out_buffer`` to the device, then immediately reads into ``in_buffer`` from the device. The number of bytes read w...
!
def read_sample(filename): """! @brief Returns data sample from simple text file. @details This function should be used for text file with following format: @code point_1_coord_1 point_1_coord_2 ... point_1_coord_n point_2_coord_1 point_2_coord_2 ... point_2_coord_n ... ... @endc...
!
def calculate_distance_matrix(sample): """! @brief Calculates distance matrix for data sample (sequence of points) using Euclidean distance as a metric. @param[in] sample (array_like): Data points that are used for distance calculation. @return (list) Matrix distance between data points. ...
!
def read_image(filename): """! @brief Returns image as N-dimension (depends on the input image) matrix, where one element of list describes pixel. @param[in] filename (string): Path to image. @return (list) Pixels where each pixel described by list of RGB-values. """ ...
!
def rgb2gray(image_rgb_array): """! @brief Returns image as 1-dimension (gray colored) matrix, where one element of list describes pixel. @details Luma coding is used for transformation and that is calculated directly from gamma-compressed primary intensities as a weighted sum: \f[Y = 0.2989R ...
!
def stretch_pattern(image_source): """! @brief Returns stretched content as 1-dimension (gray colored) matrix with size of input image. @param[in] image_source (Image): PIL Image instance. @return (list, Image) Stretched image as gray colored matrix and source image. """ ...
!
def gray_pattern_borders(image): """! @brief Returns coordinates of gray image content on the input image. @param[in] image (Image): PIL Image instance that is processed. @return (tuple) Returns coordinates of gray image content as (width_start, height_start, width_end, height_end). ...
!
def average_neighbor_distance(points, num_neigh): """! @brief Returns average distance for establish links between specified number of nearest neighbors. @param[in] points (list): Input data, list of points where each point represented by list. @param[in] num_neigh (uint): Number of neighbors ...
!
def medoid(data, indexes=None, **kwargs): """! @brief Calculate medoid for input points using Euclidean distance. @param[in] data (list): Set of points for that median should be calculated. @param[in] indexes (list): Indexes of input set of points that will be taken into account during median ...
!
def euclidean_distance_square(a, b): """! @brief Calculate square Euclidian distance between vector a and b. @param[in] a (list): The first vector. @param[in] b (list): The second vector. @return (double) Square Euclidian distance between two vectors. """ if ...
!
def manhattan_distance(a, b): """! @brief Calculate Manhattan distance between vector a and b. @param[in] a (list): The first cluster. @param[in] b (list): The second cluster. @return (double) Manhattan distance between two vectors. """ if ( ((type(a) == float)...
!
def average_inter_cluster_distance(cluster1, cluster2, data = None): """! @brief Calculates average inter-cluster distance between two clusters. @details Clusters can be represented by list of coordinates (in this case data shouldn't be specified), or by list of indexes of points from the d...
!
def average_intra_cluster_distance(cluster1, cluster2, data=None): """! @brief Calculates average intra-cluster distance between two clusters. @details Clusters can be represented by list of coordinates (in this case data shouldn't be specified), or by list of indexes of points from the dat...
!
def variance_increase_distance(cluster1, cluster2, data = None): """! @brief Calculates variance increase distance between two clusters. @details Clusters can be represented by list of coordinates (in this case data shouldn't be specified), or by list of indexes of points from the data (rep...
!
def calculate_ellipse_description(covariance, scale = 2.0): """! @brief Calculates description of ellipse using covariance matrix. @param[in] covariance (numpy.array): Covariance matrix for which ellipse area should be calculated. @param[in] scale (float): Scale of the ellipse. @ret...
!
def data_corners(data, data_filter = None): """! @brief Finds maximum and minimum corner in each dimension of the specified data. @param[in] data (list): List of points that should be analysed. @param[in] data_filter (list): List of indexes of the data that should be analysed, ...
!
def norm_vector(vector): """! @brief Calculates norm of an input vector that is known as a vector length. @param[in] vector (list): The input vector whose length is calculated. @return (double) vector norm known as vector length. """ length = 0.0 for component ...
!
def timedcall(executable_function, *args): """! @brief Executes specified method or function with measuring of execution time. @param[in] executable_function (pointer): Pointer to function or method. @param[in] args (*): Arguments of called function or method. @return (tuple) Execut...
!
def extract_number_oscillations(osc_dyn, index = 0, amplitude_threshold = 1.0): """! @brief Extracts number of oscillations of specified oscillator. @param[in] osc_dyn (list): Dynamic of oscillators. @param[in] index (uint): Index of oscillator in dynamic. @param[in] amplitude_threshold (...
!
def allocate_sync_ensembles(dynamic, tolerance = 0.1, threshold = 1.0, ignore = None): """! @brief Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster. @param[in] dynamic (dynamic): Dynamic of each oscillato...
!
def draw_clusters(data, clusters, noise = [], marker_descr = '.', hide_axes = False, axes = None, display_result = True): """! @brief Displays clusters for data in 2D or 3D. @param[in] data (list): Points that are described by coordinates represented. @param[in] clusters (list): Clusters that ...
!
def draw_dynamics(t, dyn, x_title = None, y_title = None, x_lim = None, y_lim = None, x_labels = True, y_labels = True, separate = False, axes = None): """! @brief Draw dynamics of neurons (oscillators) in the network. @details It draws if matplotlib is not specified (None), othewise it should be perform...
!
def set_ax_param(ax, x_title = None, y_title = None, x_lim = None, y_lim = None, x_labels = True, y_labels = True, grid = True): """! @brief Sets parameters for matplotlib ax. @param[in] ax (Axes): Axes for which parameters should applied. @param[in] x_title (string): Title for Y. @param[...
!
def draw_dynamics_set(dynamics, xtitle = None, ytitle = None, xlim = None, ylim = None, xlabels = False, ylabels = False): """! @brief Draw lists of dynamics of neurons (oscillators) in the network. @param[in] dynamics (list): List of network outputs that are represented by values of output of osci...
!
def draw_image_color_segments(source, clusters, hide_axes = True): """! @brief Shows image segments using colored image. @details Each color on result image represents allocated segment. The first image is initial and other is result of segmentation. @param[in] source (string): Path to image. ...
!
def draw_image_mask_segments(source, clusters, hide_axes = True): """! @brief Shows image segments using black masks. @details Each black mask of allocated segment is presented on separate plot. The first image is initial and others are black masks of segments. @param[in] source ...
!
def linear_sum(list_vector): """! @brief Calculates linear sum of vector that is represented by list, each element can be represented by list - multidimensional elements. @param[in] list_vector (list): Input vector. @return (list|double) Linear sum of vector that can be represented by li...
!
def square_sum(list_vector): """! @brief Calculates square sum of vector that is represented by list, each element can be represented by list - multidimensional elements. @param[in] list_vector (list): Input vector. @return (double) Square sum of vector. """ square_...
!
def list_math_subtraction(a, b): """! @brief Calculates subtraction of two lists. @details Each element from list 'a' is subtracted by element from list 'b' accordingly. @param[in] a (list): List of elements that supports mathematical subtraction. @param[in] b (list): List of elements tha...
!
def list_math_substraction_number(a, b): """! @brief Calculates subtraction between list and number. @details Each element from list 'a' is subtracted by number 'b'. @param[in] a (list): List of elements that supports mathematical subtraction. @param[in] b (list): Value that supports math...
!
def list_math_addition(a, b): """! @brief Addition of two lists. @details Each element from list 'a' is added to element from list 'b' accordingly. @param[in] a (list): List of elements that supports mathematic addition.. @param[in] b (list): List of elements that supports mathematic addi...
!
def list_math_addition_number(a, b): """! @brief Addition between list and number. @details Each element from list 'a' is added to number 'b'. @param[in] a (list): List of elements that supports mathematic addition. @param[in] b (double): Value that supports mathematic addition. ...
!
def list_math_division_number(a, b): """! @brief Division between list and number. @details Each element from list 'a' is divided by number 'b'. @param[in] a (list): List of elements that supports mathematic division. @param[in] b (double): Value that supports mathematic division. ...
!
def list_math_division(a, b): """! @brief Division of two lists. @details Each element from list 'a' is divided by element from list 'b' accordingly. @param[in] a (list): List of elements that supports mathematic division. @param[in] b (list): List of elements that supports mathematic div...
!
def list_math_multiplication_number(a, b): """! @brief Multiplication between list and number. @details Each element from list 'a' is multiplied by number 'b'. @param[in] a (list): List of elements that supports mathematic division. @param[in] b (double): Number that supports mathematic d...
!
def list_math_multiplication(a, b): """! @brief Multiplication of two lists. @details Each element from list 'a' is multiplied by element from list 'b' accordingly. @param[in] a (list): List of elements that supports mathematic multiplication. @param[in] b (list): List of elements that su...
!
def __create_all_to_all_connections(self): """! @brief Creates connections between all oscillators. """ if (self._conn_represent == conn_represent.MATRIX): for index in range(0, self._num_osc, 1): self._osc_conn.append([True] * self._...
!
def __create_grid_four_connections(self): """! @brief Creates network with connections that make up four grid structure. @details Each oscillator may be connected with four neighbors in line with 'grid' structure: right, upper, left, lower. """ side_size ...
!
def __create_grid_eight_connections(self): """! @brief Creates network with connections that make up eight grid structure. @details Each oscillator may be connected with eight neighbors in line with grid structure: right, right-upper, upper, upper-left, left, left-lower, lower, lower-right. ...
!
def __create_list_bidir_connections(self): """! @brief Creates network as bidirectional list. @details Each oscillator may be conneted with two neighbors in line with classical list structure: right, left. """ if (self._conn_represent == conn_represent.MA...
!
def __create_none_connections(self): """! @brief Creates network without connections. """ if (self._conn_represent == conn_represent.MATRIX): for _ in range(0, self._num_osc, 1): self._osc_conn.append([False] * self._num_osc); elif (se...
!
def _create_structure(self, type_conn = conn_type.ALL_TO_ALL): """! @brief Creates connection in line with representation of matrix connections [NunOsc x NumOsc]. @param[in] type_conn (conn_type): Connection type (all-to-all, bidirectional list, grid structure, etc.) that is used by...
!
def has_connection(self, i, j): """! @brief Returns True if there is connection between i and j oscillators and False - if connection doesn't exist. @param[in] i (uint): index of an oscillator in the network. @param[in] j (uint): index of an oscillator in the network. ...
!
def set_connection(self, i, j): """! @brief Couples two specified oscillators in the network with dynamic connections. @param[in] i (uint): index of an oscillator that should be coupled with oscillator 'j' in the network. @param[in] j (uint): index of an oscillator that sho...
!
def get_neighbors(self, index): """! @brief Finds neighbors of the oscillator with specified index. @param[in] index (uint): index of oscillator for which neighbors should be found in the network. @return (list) Indexes of neighbors of the specified oscillator. ...
!
def process(self): """! @brief Performs cluster analysis in line with rules of CLARANS algorithm. @see get_clusters() @see get_medoids() """ random.seed() for _ in range(0, self.__numlocal): # set (curren...
!
def __update_clusters(self, medoids): """! @brief Forms cluster in line with specified medoids by calculation distance from each point to medoids. """ self.__belong = [0] * len(self.__pointer_data) self.__clusters = [[] for i in range(len(medoids))] ...
!
def __optimize_configuration(self): """! @brief Finds quasi-optimal medoids and updates in line with them clusters in line with algorithm's rules. """ index_neighbor = 0 while (index_neighbor < self.__maxneighbor): # get random current medoid that is ...
!
def __find_another_nearest_medoid(self, point_index, current_medoid_index): """! @brief Finds the another nearest medoid for the specified point that is differ from the specified medoid. @param[in] point_index: index of point in dataspace for that searching of medoid in current lis...
!
def __calculate_estimation(self): """! @brief Calculates estimation (cost) of the current clusters. The lower the estimation, the more optimally configuration of clusters. @return (double) estimation of current clusters. """ estimation = 0...
Good example of three synchronous ensembels
def thirteen_oscillator_three_stimulated_ensembles_list(): "Good example of three synchronous ensembels" "Not accurate due to false skipes are observed" parameters = legion_parameters(); parameters.Wt = 4.0; parameters.fi = 10.0; template_dynamic_legion(15, 1000, 1000, conn_type = conn_typ...
Good example of three synchronous ensembels
def thirteen_simplify_oscillator_three_stimulated_ensembles_list(): "Good example of three synchronous ensembels" "Not accurate due to false skipes are observed" parameters = legion_parameters(); parameters.Wt = 4.0; parameters.fi = 0.8; parameters.ENABLE_POTENTIONAL = False; template...
Not accurate false due to spikes are observed
def sixteen_oscillator_two_stimulated_ensembles_grid(): "Not accurate false due to spikes are observed" parameters = legion_parameters(); parameters.teta_x = -1.1; template_dynamic_legion(16, 2000, 1500, conn_type = conn_type.GRID_FOUR, params = parameters, stimulus = [1, 1, 1, 0, ...
Perfect results!
def simple_segmentation_example(): "Perfect results!" parameters = legion_parameters(); parameters.eps = 0.02; parameters.alpha = 0.005; parameters.betta = 0.1; parameters.gamma = 7.0; parameters.teta = 0.9; parameters.lamda = 0.1; parameters.teta_x = -0.5; parameters.t...
!
def visualize(self, display=True): """! @brief Display KD-tree to console. @param[in] display (bool): If 'True' then tree will be shown in console. @return (string) Text representation of the KD-tree. """ kdnodes = self.__get_nodes() ...
!
def insert(self, point, payload): """! @brief Insert new point with payload to kd-tree. @param[in] point (list): Coordinates of the point of inserted node. @param[in] payload (any-type): Payload of inserted node. It can be identificator of the node or s...
!
def remove(self, point, **kwargs): """! @brief Remove specified point from kd-tree. @details It removes the first found node that satisfy to the input parameters. Make sure that pair (point, payload) is unique for each node, othewise the first found is removed. ...
!
def __recursive_remove(self, node_removed): """! @brief Delete node and return root of subtree. @param[in] node_removed (node): Node that should be removed. @return (node) Minimal node in line with coordinate that is defined by descriminator. ""...
!
def find_minimal_node(self, node_head, discriminator): """! @brief Find minimal node in line with coordinate that is defined by discriminator. @param[in] node_head (node): Node of KD tree from that search should be started. @param[in] discriminator (uint): Coordinate number...
!
def __fill_tree(self, data_list, payload_list): """! @brief Fill KD-tree by specified data and create point comparator in line with data type. @param[in] data_list (array_like): Data points that should be inserted to the tree. @param[in] payload_list (array_like): Data point payloa...
!
def __create_point_comparator(self, type_point): """! @brief Create point comparator. @details In case of numpy.array specific comparator is required. @param[in] type_point (data_type): Type of point that is stored in KD-node. @return (callable) Callable point comparator...
!
def __find_node_by_rule(self, point, search_rule, cur_node): """! @brief Search node that satisfy to parameters in search rule. @details If node with specified parameters does not exist then None will be returned, otherwise required node will be returned. ...
!
def find_node_with_payload(self, point, point_payload, cur_node = None): """! @brief Find node with specified coordinates and payload. @details If node with specified parameters does not exist then None will be returned, otherwise required node will be returned. ...
!
def find_node(self, point, cur_node = None): """! @brief Find node with coordinates that are defined by specified point. @details If node with specified parameters does not exist then None will be returned, otherwise required node will be returned. @para...
!
def find_nearest_dist_node(self, point, distance, retdistance = False): """! @brief Find nearest neighbor in area with radius = distance. @param[in] point (list): Maximum distance where neighbors are searched. @param[in] distance (double): Maximum distance where neighbors a...
!
def find_nearest_dist_nodes(self, point, distance): """! @brief Find neighbors that are located in area that is covered by specified distance. @param[in] point (list): Coordinates that is considered as centroind for searching. @param[in] distance (double): Distance from the...
!
def __recursive_nearest_nodes(self, point, distance, sqrt_distance, node_head, best_nodes): """! @brief Returns list of neighbors such as tuple (distance, node) that is located in area that is covered by distance. @param[in] point (list): Coordinates that is considered as centroind ...
!
def children(self, node_parent): """! @brief Returns list of children of node. @param[in] node_parent (node): Node whose children are required. @return (list) Children of node. If node haven't got any child then None is returned. """ ...
!
def traverse(self, start_node = None, level = None): """! @brief Traverses all nodes of subtree that is defined by node specified in input parameter. @param[in] start_node (node): Node from that travering of subtree is performed. @param[in, out] level (uint): Should be igno...