From 3bcc60c479e52c00ff42f9afc9d601d24b60830a Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Wed, 29 Apr 2020 10:42:57 +0200 Subject: [PATCH 01/17] Fix a bug in increasing orders in MGE. --- gklearn/ged/median/median_graph_estimator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gklearn/ged/median/median_graph_estimator.py b/gklearn/ged/median/median_graph_estimator.py index b5a829c..114c312 100644 --- a/gklearn/ged/median/median_graph_estimator.py +++ b/gklearn/ged/median/median_graph_estimator.py @@ -1115,7 +1115,12 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no continue for label in median_labels: weights[label_id] = min(weights[label_id], self.__ged_env.get_node_rel_cost(dict(label), dict(node_labels[label_id]))) - selected_label_id = urng.choice(range(0, len(weights)), size=1, p=np.array(weights) / np.sum(weights))[0] # for c++ test: xxx[iii] + sum_weight = np.sum(weights) + if sum_weight == 0: + p = np.array([1 / len(weights)] * len(weights)) + else: + p = np.array(weights) / np.sum(weights) + selected_label_id = urng.choice(range(0, len(weights)), size=1, p=p)[0] # for c++ test: xxx[iii] # iii += 1 for c++ test median_labels.append(node_labels[selected_label_id]) already_selected[selected_label_id] = True From 9a365fac98a05e88343a9f1d7bf86a5b102da1da Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Thu, 30 Apr 2020 10:31:08 +0200 Subject: [PATCH 02/17] Fix bugs for enum and add test for median preimage generator. --- gklearn/ged/env/common_types.py | 11 +-- gklearn/ged/median/median_graph_estimator.py | 2 +- .../tests/test_median_preimage_generator.py | 71 +++++++++++++++++++ gklearn/utils/utils.py | 11 +-- 4 files changed, 84 insertions(+), 11 deletions(-) create mode 100644 gklearn/tests/test_median_preimage_generator.py diff --git a/gklearn/ged/env/common_types.py b/gklearn/ged/env/common_types.py index 2face25..d195b11 100644 --- a/gklearn/ged/env/common_types.py +++ b/gklearn/ged/env/common_types.py @@ -6,12 +6,13 @@ Created on Thu Mar 19 18:17:38 2020 @author: ljia """ -from enum import Enum, auto +from enum import Enum, unique +@unique class AlgorithmState(Enum): """can be used to specify the state of an algorithm. """ - CALLED = auto # The algorithm has been called. - INITIALIZED = auto # The algorithm has been initialized. - CONVERGED = auto # The algorithm has converged. - TERMINATED = auto # The algorithm has terminated. \ No newline at end of file + CALLED = 1 # The algorithm has been called. + INITIALIZED = 2 # The algorithm has been initialized. + CONVERGED = 3 # The algorithm has converged. + TERMINATED = 4 # The algorithm has terminated. \ No newline at end of file diff --git a/gklearn/ged/median/median_graph_estimator.py b/gklearn/ged/median/median_graph_estimator.py index 114c312..df21601 100644 --- a/gklearn/ged/median/median_graph_estimator.py +++ b/gklearn/ged/median/median_graph_estimator.py @@ -302,7 +302,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__median_id = gen_median_id self.__state = AlgorithmState.TERMINATED - # Get ExchangeGraph representations of the input graphs. + # Get NetworkX graph representations of the input graphs. graphs = {} for graph_id in graph_ids: # @todo: get_nx_graph() function may need to be modified according to the coming code. diff --git a/gklearn/tests/test_median_preimage_generator.py b/gklearn/tests/test_median_preimage_generator.py new file mode 100644 index 0000000..c81bb7c --- /dev/null +++ b/gklearn/tests/test_median_preimage_generator.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Tue Jan 14 15:39:29 2020 + +@author: ljia +""" +import multiprocessing +import functools +from gklearn.preimage.utils import generate_median_preimages_by_class + + +def test_median_preimage_generator(): + """MAO, Treelet, using CONSTANT, symbolic only. + """ + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'MAO' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 3, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + pkernel = functools.partial(polynomialkernel, d=4, c=1e+7) + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': 1, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 600, + 'verbose': 2, + 'refine': False} + save_results = True + dir_save = ds_name + '.' + kernel_options['name'] + '.symb.pytest/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert', 'random']: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=range(0, 4)) \ No newline at end of file diff --git a/gklearn/utils/utils.py b/gklearn/utils/utils.py index 9223b7a..14dc7c1 100644 --- a/gklearn/utils/utils.py +++ b/gklearn/utils/utils.py @@ -1,7 +1,7 @@ import networkx as nx import numpy as np from copy import deepcopy -from enum import Enum, auto +from enum import Enum, unique #from itertools import product # from tqdm import tqdm @@ -467,8 +467,9 @@ def get_mlti_dim_edge_attrs(G, attr_names): attributes.append(tuple(attrs[aname] for aname in attr_names)) return attributes - +@unique class SpecialLabel(Enum): - """can be used to define special labels. - """ - DUMMY = auto # The dummy label. \ No newline at end of file + """can be used to define special labels. + """ + DUMMY = 1 # The dummy label. + # DUMMY = auto # enum.auto does not exist in Python 3.5. \ No newline at end of file From c2e88d927429934d6065941662852b9080879194 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Thu, 30 Apr 2020 10:38:44 +0200 Subject: [PATCH 03/17] Update requirement.txt for pre-image. --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 85aabf8..56401d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ networkx>=2.2 scikit-learn>=0.20.0 tabulate>=0.8.2 tqdm>=4.26.0 -# cvxpy # for preimage. -# cvxopt # for preimage. -# mosek # for preimage. +cvxpy # for preimage. +cvxopt # for preimage. +mosek # for preimage. From 1191009381a92137d89c65dc217f44d30f714b92 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Sat, 2 May 2020 16:39:28 +0200 Subject: [PATCH 04/17] Update requirements. --- README.md | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3958704..7cfdecc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A Python package for graph kernels, graph edit distances and graph pre-image pro ## Requirements * python>=3.5 -* numpy>=1.15.2 +* numpy>=1.16.2 * scipy>=1.1.0 * matplotlib>=3.0.0 * networkx>=2.2 diff --git a/requirements.txt b/requirements.txt index 56401d4..853d485 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy>=1.15.2 +numpy>=1.16.2 scipy>=1.1.0 matplotlib>=3.0.0 networkx>=2.2 From f5439ee8a1fd181907ec7142af9e789044773d4f Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Sat, 2 May 2020 16:47:38 +0200 Subject: [PATCH 05/17] Update requirements. --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 853d485..4dcd662 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ networkx>=2.2 scikit-learn>=0.20.0 tabulate>=0.8.2 tqdm>=4.26.0 -cvxpy # for preimage. -cvxopt # for preimage. -mosek # for preimage. +cvxpy>=1.0.31 # for preimage. +cvxopt>=1.2.5 # for preimage. +mosek>=9.2.5 # for preimage. From 1772f64ccba3d8cc2432ee8afbf54bc2835bdc51 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Sat, 2 May 2020 17:15:08 +0200 Subject: [PATCH 06/17] Update requirements. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4dcd662..47a91a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ tabulate>=0.8.2 tqdm>=4.26.0 cvxpy>=1.0.31 # for preimage. cvxopt>=1.2.5 # for preimage. -mosek>=9.2.5 # for preimage. +mosek>=9.2.5; python_version >= '3.6' # for preimage. From 34e82bfce8e5860342cb4f7b3420be3773de1c12 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Thu, 7 May 2020 17:05:27 +0200 Subject: [PATCH 07/17] Add parallel functions to MGE. --- gklearn/ged/median/median_graph_estimator.py | 282 +- .../ged/median/test_median_graph_estimator.py | 8 +- gklearn/ged/median/utils.py | 2 + gklearn/ged/util/util.py | 2 + gklearn/gedlib/gedlibpy.cpp | 2934 +++++++++-------- .../gedlibpy.cpython-36m-x86_64-linux-gnu.so | Bin 33390352 -> 33390352 bytes gklearn/gedlib/gedlibpy.pyx | 10 +- gklearn/preimage/median_preimage_generator.py | 8 +- 8 files changed, 1708 insertions(+), 1538 deletions(-) diff --git a/gklearn/ged/median/median_graph_estimator.py b/gklearn/ged/median/median_graph_estimator.py index df21601..9e0db71 100644 --- a/gklearn/ged/median/median_graph_estimator.py +++ b/gklearn/ged/median/median_graph_estimator.py @@ -13,6 +13,9 @@ import time from tqdm import tqdm import sys import networkx as nx +import multiprocessing +from multiprocessing import Pool +from functools import partial class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined node? @@ -47,6 +50,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__desired_num_random_inits = 10 self.__use_real_randomness = True self.__seed = 0 + self.__parallel = True self.__update_order = True self.__refine = True self.__time_limit_in_sec = 0 @@ -125,6 +129,16 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no else: raise Exception('Invalid argument "' + opt_val + '" for option stdout. Usage: options = "[--stdout 0|1|2] [...]"') + + elif opt_name == 'parallel': + if opt_val == 'TRUE': + self.__parallel = True + + elif opt_val == 'FALSE': + self.__parallel = False + + else: + raise Exception('Invalid argument "' + opt_val + '" for option parallel. Usage: options = "[--parallel TRUE|FALSE] [...]"') elif opt_name == 'update-order': if opt_val == 'TRUE': @@ -312,7 +326,6 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # print(graphs[0].nodes(data=True)) # print(graphs[0].edges(data=True)) # print(nx.adjacency_matrix(graphs[0])) - # Construct initial medians. medians = [] @@ -356,30 +369,12 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__ged_env.load_nx_graph(median, gen_median_id) self.__ged_env.init(self.__ged_env.get_init_type()) - # Print information about current iteration. - if self.__print_to_stdout == 2: - progress = tqdm(desc='Computing initial node maps', total=len(graph_ids), file=sys.stdout) - # Compute node maps and sum of distances for initial median. - self.__sum_of_distances = 0 - self.__node_maps_from_median.clear() - for graph_id in graph_ids: - self.__ged_env.run_method(gen_median_id, graph_id) - self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(gen_median_id, graph_id) -# print(self.__node_maps_from_median[graph_id]) - self.__sum_of_distances += self.__node_maps_from_median[graph_id].induced_cost() -# print(self.__sum_of_distances) - # Print information about current iteration. - if self.__print_to_stdout == 2: - progress.update(1) - + self.__compute_init_node_maps(graph_ids, gen_median_id) + self.__best_init_sum_of_distances = min(self.__best_init_sum_of_distances, self.__sum_of_distances) self.__ged_env.load_nx_graph(median, set_median_id) # print(self.__best_init_sum_of_distances) - - # Print information about current iteration. - if self.__print_to_stdout == 2: - print('\n') # Run block gradient descent from initial median. converged = False @@ -434,7 +429,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # print(self.__node_maps_from_median[graph_id].induced_cost()) # xxx = self.__node_maps_from_median[graph_id] self.__ged_env.compute_induced_cost(gen_median_id, graph_id, self.__node_maps_from_median[graph_id]) -# print('---------------------------------------') +# print('---------------------------------------') # print(self.__node_maps_from_median[graph_id].induced_cost()) # @todo:!!!!!!!!!!!!!!!!!!!!!!!!!!!!This value is a slight different from the c++ program, which might be a bug! Use it very carefully! @@ -637,6 +632,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__desired_num_random_inits = 10 self.__use_real_randomness = True self.__seed = 0 + self.__parallel = True self.__update_order = True self.__refine = True self.__time_limit_in_sec = 0 @@ -682,35 +678,123 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __compute_medoid(self, graph_ids, timer, initial_medians): # Use method selected for initialization phase. self.__ged_env.set_method(self.__init_method, self.__init_options) - - # Print information about current iteration. - if self.__print_to_stdout == 2: - progress = tqdm(desc='Computing medoid', total=len(graph_ids), file=sys.stdout) - + # Compute the medoid. - medoid_id = graph_ids[0] - best_sum_of_distances = np.inf - for g_id in graph_ids: - if timer.expired(): - self.__state = AlgorithmState.CALLED - break - sum_of_distances = 0 - for h_id in graph_ids: - self.__ged_env.run_method(g_id, h_id) - sum_of_distances += self.__ged_env.get_upper_bound(g_id, h_id) - if sum_of_distances < best_sum_of_distances: - best_sum_of_distances = sum_of_distances - medoid_id = g_id - + if self.__parallel: + # @todo: notice when parallel self.__ged_env is not modified. + sum_of_distances_list = [np.inf] * len(graph_ids) + len_itr = len(graph_ids) + itr = zip(graph_ids, range(0, len(graph_ids))) + n_jobs = multiprocessing.cpu_count() + if len_itr < 100 * n_jobs: + chunksize = int(len_itr / n_jobs) + 1 + else: + chunksize = 100 + def init_worker(ged_env_toshare): + global G_ged_env + G_ged_env = ged_env_toshare + do_fun = partial(_compute_medoid_parallel, graph_ids) + pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(self.__ged_env,)) + if self.__print_to_stdout == 2: + iterator = tqdm(pool.imap_unordered(do_fun, itr, chunksize), + desc='Computing medoid', file=sys.stdout) + else: + iterator = pool.imap_unordered(do_fun, itr, chunksize) + for i, dis in iterator: + sum_of_distances_list[i] = dis + pool.close() + pool.join() + + medoid_id = np.argmin(sum_of_distances_list) + best_sum_of_distances = sum_of_distances_list[medoid_id] + + initial_medians.append(self.__ged_env.get_nx_graph(medoid_id, True, True, False)) # @todo + + else: # Print information about current iteration. if self.__print_to_stdout == 2: - progress.update(1) - initial_medians.append(self.__ged_env.get_nx_graph(medoid_id, True, True, False)) # @todo + progress = tqdm(desc='Computing medoid', total=len(graph_ids), file=sys.stdout) - # Print information about current iteration. - if self.__print_to_stdout == 2: - print('\n') + medoid_id = graph_ids[0] + best_sum_of_distances = np.inf + for g_id in graph_ids: + if timer.expired(): + self.__state = AlgorithmState.CALLED + break + sum_of_distances = 0 + for h_id in graph_ids: + self.__ged_env.run_method(g_id, h_id) + sum_of_distances += self.__ged_env.get_upper_bound(g_id, h_id) + if sum_of_distances < best_sum_of_distances: + best_sum_of_distances = sum_of_distances + medoid_id = g_id + + # Print information about current iteration. + if self.__print_to_stdout == 2: + progress.update(1) + + initial_medians.append(self.__ged_env.get_nx_graph(medoid_id, True, True, False)) # @todo + + # Print information about current iteration. + if self.__print_to_stdout == 2: + print('\n') + + + def __compute_init_node_maps(self, graph_ids, gen_median_id): + # Compute node maps and sum of distances for initial median. + if self.__parallel: + # @todo: notice when parallel self.__ged_env is not modified. + self.__sum_of_distances = 0 + self.__node_maps_from_median.clear() + sum_of_distances_list = [0] * len(graph_ids) + + len_itr = len(graph_ids) + itr = graph_ids + n_jobs = multiprocessing.cpu_count() + if len_itr < 100 * n_jobs: + chunksize = int(len_itr / n_jobs) + 1 + else: + chunksize = 100 + def init_worker(ged_env_toshare): + global G_ged_env + G_ged_env = ged_env_toshare + do_fun = partial(_compute_init_node_maps_parallel, gen_median_id) + pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(self.__ged_env,)) + if self.__print_to_stdout == 2: + iterator = tqdm(pool.imap_unordered(do_fun, itr, chunksize), + desc='Computing initial node maps', file=sys.stdout) + else: + iterator = pool.imap_unordered(do_fun, itr, chunksize) + for g_id, sod, node_maps in iterator: + sum_of_distances_list[g_id] = sod + self.__node_maps_from_median[g_id] = node_maps + pool.close() + pool.join() + self.__sum_of_distances = np.sum(sum_of_distances_list) +# xxx = self.__node_maps_from_median + + else: + # Print information about current iteration. + if self.__print_to_stdout == 2: + progress = tqdm(desc='Computing initial node maps', total=len(graph_ids), file=sys.stdout) + + self.__sum_of_distances = 0 + self.__node_maps_from_median.clear() + for graph_id in graph_ids: + self.__ged_env.run_method(gen_median_id, graph_id) + self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(gen_median_id, graph_id) + # print(self.__node_maps_from_median[graph_id]) + self.__sum_of_distances += self.__node_maps_from_median[graph_id].induced_cost() + # print(self.__sum_of_distances) + # Print information about current iteration. + if self.__print_to_stdout == 2: + progress.update(1) + + # Print information about current iteration. + if self.__print_to_stdout == 2: + print('\n') + def __termination_criterion_met(self, converged, timer, itr, itrs_without_update): if timer.expired() or (itr >= self.__max_itrs if self.__max_itrs >= 0 else False): @@ -816,26 +900,57 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __update_node_maps(self): - # Print information about current iteration. - if self.__print_to_stdout == 2: - progress = tqdm(desc='Updating node maps', total=len(self.__node_maps_from_median), file=sys.stdout) - # Update the node maps. - node_maps_were_modified = False - for graph_id, node_map in self.__node_maps_from_median.items(): - self.__ged_env.run_method(self.__median_id, graph_id) - if self.__ged_env.get_upper_bound(self.__median_id, graph_id) < node_map.induced_cost() - self.__epsilon: -# xxx = self.__node_maps_from_median[graph_id] - self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(self.__median_id, graph_id) -# yyy = self.__node_maps_from_median[graph_id] - node_maps_were_modified = True + if self.__parallel: + # @todo: notice when parallel self.__ged_env is not modified. + node_maps_were_modified = False +# xxx = self.__node_maps_from_median.copy() + + len_itr = len(self.__node_maps_from_median) + itr = [item for item in self.__node_maps_from_median.items()] + n_jobs = multiprocessing.cpu_count() + if len_itr < 100 * n_jobs: + chunksize = int(len_itr / n_jobs) + 1 + else: + chunksize = 100 + def init_worker(ged_env_toshare): + global G_ged_env + G_ged_env = ged_env_toshare + do_fun = partial(_update_node_maps_parallel, self.__median_id, self.__epsilon) + pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(self.__ged_env,)) + if self.__print_to_stdout == 2: + iterator = tqdm(pool.imap_unordered(do_fun, itr, chunksize), + desc='Updating node maps', file=sys.stdout) + else: + iterator = pool.imap_unordered(do_fun, itr, chunksize) + for g_id, node_map, nm_modified in iterator: + self.__node_maps_from_median[g_id] = node_map + if nm_modified: + node_maps_were_modified = True + pool.close() + pool.join() +# yyy = self.__node_maps_from_median.copy() + + else: # Print information about current iteration. if self.__print_to_stdout == 2: - progress.update(1) - - # Print information about current iteration. - if self.__print_to_stdout == 2: - print('\n') + progress = tqdm(desc='Updating node maps', total=len(self.__node_maps_from_median), file=sys.stdout) + + node_maps_were_modified = False + for graph_id, node_map in self.__node_maps_from_median.items(): + self.__ged_env.run_method(self.__median_id, graph_id) + if self.__ged_env.get_upper_bound(self.__median_id, graph_id) < node_map.induced_cost() - self.__epsilon: + # xxx = self.__node_maps_from_median[graph_id] + self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(self.__median_id, graph_id) + # yyy = self.__node_maps_from_median[graph_id] + node_maps_were_modified = True + # Print information about current iteration. + if self.__print_to_stdout == 2: + progress.update(1) + + # Print information about current iteration. + if self.__print_to_stdout == 2: + print('\n') # Return true if the node maps were modified. return node_maps_were_modified @@ -1230,7 +1345,8 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __add_node_to_median(self, best_config, best_label, median): # Update the median. - median.add_node(nx.number_of_nodes(median), **best_label) + nb_nodes_median = nx.number_of_nodes(median) + median.add_node(nb_nodes_median, **best_label) # Update the node maps. for graph_id, node_map in self.__node_maps_from_median.items(): @@ -1494,4 +1610,40 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # median_label = {} # for key, val in median.items(): # median_label[key] = str(val) -# return median_label \ No newline at end of file +# return median_label + + +def _compute_medoid_parallel(graph_ids, itr): + g_id = itr[0] + i = itr[1] + # @todo: timer not considered here. +# if timer.expired(): +# self.__state = AlgorithmState.CALLED +# break + sum_of_distances = 0 + for h_id in graph_ids: + G_ged_env.run_method(g_id, h_id) + sum_of_distances += G_ged_env.get_upper_bound(g_id, h_id) + return i, sum_of_distances + + +def _compute_init_node_maps_parallel(gen_median_id, itr): + graph_id = itr + G_ged_env.run_method(gen_median_id, graph_id) + node_maps_from_median = G_ged_env.get_node_map(gen_median_id, graph_id) +# print(self.__node_maps_from_median[graph_id]) + sum_of_distance = node_maps_from_median.induced_cost() +# print(self.__sum_of_distances) + return graph_id, sum_of_distance, node_maps_from_median + + +def _update_node_maps_parallel(median_id, epsilon, itr): + graph_id = itr[0] + node_map = itr[1] + + node_maps_were_modified = False + G_ged_env.run_method(median_id, graph_id) + if G_ged_env.get_upper_bound(median_id, graph_id) < node_map.induced_cost() - epsilon: + node_map = G_ged_env.get_node_map(median_id, graph_id) + node_maps_were_modified = True + return graph_id, node_map, node_maps_were_modified \ No newline at end of file diff --git a/gklearn/ged/median/test_median_graph_estimator.py b/gklearn/ged/median/test_median_graph_estimator.py index 7497bab..60bce83 100644 --- a/gklearn/ged/median/test_median_graph_estimator.py +++ b/gklearn/ged/median/test_median_graph_estimator.py @@ -53,7 +53,7 @@ def test_median_graph_estimator(): mge.set_refine_method(algo, '--threads ' + str(threads) + ' --initial-solutions ' + str(initial_solutions) + ' --ratio-runs-from-initial-solutions 1') mge_options = '--time-limit ' + str(time_limit) + ' --stdout 2 --init-type ' + init_type - mge_options += ' --random-inits ' + str(num_inits) + ' --seed ' + '1' + ' --update-order TRUE --refine FALSE --randomness PSEUDO '# @todo: std::to_string(rng()) + mge_options += ' --random-inits ' + str(num_inits) + ' --seed ' + '1' + ' --update-order TRUE --refine FALSE --randomness PSEUDO --parallel TRUE '# @todo: std::to_string(rng()) # Select the GED algorithm. algo_options = '--threads ' + str(threads) + algo_options_suffix @@ -127,7 +127,7 @@ def test_median_graph_estimator_symb(): mge.set_refine_method(algo, '--threads ' + str(threads) + ' --initial-solutions ' + str(initial_solutions) + ' --ratio-runs-from-initial-solutions 1') mge_options = '--time-limit ' + str(time_limit) + ' --stdout 2 --init-type ' + init_type - mge_options += ' --random-inits ' + str(num_inits) + ' --seed ' + '1' + ' --update-order TRUE --refine FALSE'# @todo: std::to_string(rng()) + mge_options += ' --random-inits ' + str(num_inits) + ' --seed ' + '1' + ' --update-order TRUE --refine FALSE --randomness PSEUDO --parallel TRUE '# @todo: std::to_string(rng()) # Select the GED algorithm. algo_options = '--threads ' + str(threads) + algo_options_suffix @@ -155,5 +155,5 @@ def test_median_graph_estimator_symb(): if __name__ == '__main__': - set_median, gen_median = test_median_graph_estimator() - # set_median, gen_median = test_median_graph_estimator_symb() \ No newline at end of file + # set_median, gen_median = test_median_graph_estimator() + set_median, gen_median = test_median_graph_estimator_symb() \ No newline at end of file diff --git a/gklearn/ged/median/utils.py b/gklearn/ged/median/utils.py index 908cb11..5c4c52f 100644 --- a/gklearn/ged/median/utils.py +++ b/gklearn/ged/median/utils.py @@ -30,6 +30,8 @@ def mge_options_to_string(options): opt_str += '--randomness ' + str(val) + ' ' elif key == 'verbose': opt_str += '--stdout ' + str(val) + ' ' + elif key == 'parallel': + opt_str += '--parallel ' + ('TRUE' if val else 'FALSE') + ' ' elif key == 'update_order': opt_str += '--update-order ' + ('TRUE' if val else 'FALSE') + ' ' elif key == 'refine': diff --git a/gklearn/ged/util/util.py b/gklearn/ged/util/util.py index a18b0cb..d72c2e6 100644 --- a/gklearn/ged/util/util.py +++ b/gklearn/ged/util/util.py @@ -54,6 +54,8 @@ def compute_geds(graphs, options={}, parallel=False): ged_env.add_nx_graph(g, '') listID = ged_env.get_all_graph_ids() ged_env.init() + if parallel: + options['threads'] = 1 ged_env.set_method(options['method'], ged_options_to_string(options)) ged_env.init_method() diff --git a/gklearn/gedlib/gedlibpy.cpp b/gklearn/gedlib/gedlibpy.cpp index 58aa1fd..18e7cd8 100644 --- a/gklearn/gedlib/gedlibpy.cpp +++ b/gklearn/gedlib/gedlibpy.cpp @@ -1173,9 +1173,9 @@ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; */ typedef npy_cdouble __pyx_t_5numpy_complex_t; -/* "gedlibpy.pyx":180 - * +/* "gedlibpy.pyx":182 * + * # @cython.auto_pickle(True) * cdef class GEDEnv: # <<<<<<<<<<<<<< * """Cython wrapper class for C++ class PyGEDEnv * """ @@ -2155,6 +2155,8 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, cha static PyTypeObject *__pyx_ptype_7cpython_5array_array = 0; static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/ +/* Module declarations from 'cython' */ + /* Module declarations from 'gedlibpy' */ static PyTypeObject *__pyx_ptype_8gedlibpy_GEDEnv = 0; static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/ @@ -2685,7 +2687,7 @@ static PyObject *__pyx_codeobj__37; static PyObject *__pyx_codeobj__39; /* Late includes */ -/* "gedlibpy.pyx":128 +/* "gedlibpy.pyx":129 * * * def get_edit_cost_options() : # <<<<<<<<<<<<<< @@ -2720,7 +2722,7 @@ static PyObject *__pyx_pf_8gedlibpy_get_edit_cost_options(CYTHON_UNUSED PyObject PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_edit_cost_options", 0); - /* "gedlibpy.pyx":139 + /* "gedlibpy.pyx":140 * """ * * return [option.decode('utf-8') for option in getEditCostStringOptions()] # <<<<<<<<<<<<<< @@ -2729,13 +2731,13 @@ static PyObject *__pyx_pf_8gedlibpy_get_edit_cost_options(CYTHON_UNUSED PyObject */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); try { __pyx_t_2 = pyged::getEditCostStringOptions(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 139, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } __pyx_t_4 = &__pyx_t_2; __pyx_t_3 = __pyx_t_4->begin(); @@ -2744,9 +2746,9 @@ static PyObject *__pyx_pf_8gedlibpy_get_edit_cost_options(CYTHON_UNUSED PyObject __pyx_t_5 = *__pyx_t_3; ++__pyx_t_3; __pyx_7genexpr__pyx_v_option = __pyx_t_5; - __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_7genexpr__pyx_v_option, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_7genexpr__pyx_v_option, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ @@ -2754,7 +2756,7 @@ static PyObject *__pyx_pf_8gedlibpy_get_edit_cost_options(CYTHON_UNUSED PyObject __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":128 + /* "gedlibpy.pyx":129 * * * def get_edit_cost_options() : # <<<<<<<<<<<<<< @@ -2774,7 +2776,7 @@ static PyObject *__pyx_pf_8gedlibpy_get_edit_cost_options(CYTHON_UNUSED PyObject return __pyx_r; } -/* "gedlibpy.pyx":142 +/* "gedlibpy.pyx":143 * * * def get_method_options() : # <<<<<<<<<<<<<< @@ -2809,7 +2811,7 @@ static PyObject *__pyx_pf_8gedlibpy_2get_method_options(CYTHON_UNUSED PyObject * PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_method_options", 0); - /* "gedlibpy.pyx":152 + /* "gedlibpy.pyx":153 * .. note:: Prefer the list_of_method_options attribute of this module. * """ * return [option.decode('utf-8') for option in getMethodStringOptions()] # <<<<<<<<<<<<<< @@ -2818,13 +2820,13 @@ static PyObject *__pyx_pf_8gedlibpy_2get_method_options(CYTHON_UNUSED PyObject * */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); try { __pyx_t_2 = pyged::getMethodStringOptions(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 152, __pyx_L1_error) + __PYX_ERR(0, 153, __pyx_L1_error) } __pyx_t_4 = &__pyx_t_2; __pyx_t_3 = __pyx_t_4->begin(); @@ -2833,9 +2835,9 @@ static PyObject *__pyx_pf_8gedlibpy_2get_method_options(CYTHON_UNUSED PyObject * __pyx_t_5 = *__pyx_t_3; ++__pyx_t_3; __pyx_8genexpr1__pyx_v_option = __pyx_t_5; - __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_8genexpr1__pyx_v_option, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_8genexpr1__pyx_v_option, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 152, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ @@ -2843,7 +2845,7 @@ static PyObject *__pyx_pf_8gedlibpy_2get_method_options(CYTHON_UNUSED PyObject * __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":142 + /* "gedlibpy.pyx":143 * * * def get_method_options() : # <<<<<<<<<<<<<< @@ -2863,7 +2865,7 @@ static PyObject *__pyx_pf_8gedlibpy_2get_method_options(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "gedlibpy.pyx":155 +/* "gedlibpy.pyx":156 * * * def get_init_options() : # <<<<<<<<<<<<<< @@ -2898,7 +2900,7 @@ static PyObject *__pyx_pf_8gedlibpy_4get_init_options(CYTHON_UNUSED PyObject *__ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_init_options", 0); - /* "gedlibpy.pyx":165 + /* "gedlibpy.pyx":166 * .. note:: Prefer the list_of_init_options attribute of this module. * """ * return [option.decode('utf-8') for option in getInitStringOptions()] # <<<<<<<<<<<<<< @@ -2907,13 +2909,13 @@ static PyObject *__pyx_pf_8gedlibpy_4get_init_options(CYTHON_UNUSED PyObject *__ */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); try { __pyx_t_2 = pyged::getInitStringOptions(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 165, __pyx_L1_error) + __PYX_ERR(0, 166, __pyx_L1_error) } __pyx_t_4 = &__pyx_t_2; __pyx_t_3 = __pyx_t_4->begin(); @@ -2922,9 +2924,9 @@ static PyObject *__pyx_pf_8gedlibpy_4get_init_options(CYTHON_UNUSED PyObject *__ __pyx_t_5 = *__pyx_t_3; ++__pyx_t_3; __pyx_8genexpr2__pyx_v_option = __pyx_t_5; - __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_8genexpr2__pyx_v_option, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_8genexpr2__pyx_v_option, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ @@ -2932,7 +2934,7 @@ static PyObject *__pyx_pf_8gedlibpy_4get_init_options(CYTHON_UNUSED PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":155 + /* "gedlibpy.pyx":156 * * * def get_init_options() : # <<<<<<<<<<<<<< @@ -2952,7 +2954,7 @@ static PyObject *__pyx_pf_8gedlibpy_4get_init_options(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "gedlibpy.pyx":168 +/* "gedlibpy.pyx":169 * * * def get_dummy_node() : # <<<<<<<<<<<<<< @@ -2982,7 +2984,7 @@ static PyObject *__pyx_pf_8gedlibpy_6get_dummy_node(CYTHON_UNUSED PyObject *__py PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_dummy_node", 0); - /* "gedlibpy.pyx":177 + /* "gedlibpy.pyx":178 * .. note:: A dummy node is used when a node isn't associated to an other node. * """ * return getDummyNode() # <<<<<<<<<<<<<< @@ -2994,15 +2996,15 @@ static PyObject *__pyx_pf_8gedlibpy_6get_dummy_node(CYTHON_UNUSED PyObject *__py __pyx_t_1 = pyged::getDummyNode(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 177, __pyx_L1_error) + __PYX_ERR(0, 178, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":168 + /* "gedlibpy.pyx":169 * * * def get_dummy_node() : # <<<<<<<<<<<<<< @@ -3021,12 +3023,12 @@ static PyObject *__pyx_pf_8gedlibpy_6get_dummy_node(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "gedlibpy.pyx":187 +/* "gedlibpy.pyx":189 * * * def __cinit__(self): # <<<<<<<<<<<<<< + * # self.c_env = PyGEDEnv() * self.c_env = new PyGEDEnv() - * */ /* Python wrapper */ @@ -3051,9 +3053,9 @@ static int __pyx_pf_8gedlibpy_6GEDEnv___cinit__(struct __pyx_obj_8gedlibpy_GEDEn pyged::PyGEDEnv *__pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "gedlibpy.pyx":188 - * + /* "gedlibpy.pyx":191 * def __cinit__(self): + * # self.c_env = PyGEDEnv() * self.c_env = new PyGEDEnv() # <<<<<<<<<<<<<< * * @@ -3062,16 +3064,16 @@ static int __pyx_pf_8gedlibpy_6GEDEnv___cinit__(struct __pyx_obj_8gedlibpy_GEDEn __pyx_t_1 = new pyged::PyGEDEnv(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 188, __pyx_L1_error) + __PYX_ERR(0, 191, __pyx_L1_error) } __pyx_v_self->c_env = __pyx_t_1; - /* "gedlibpy.pyx":187 + /* "gedlibpy.pyx":189 * * * def __cinit__(self): # <<<<<<<<<<<<<< + * # self.c_env = PyGEDEnv() * self.c_env = new PyGEDEnv() - * */ /* function exit code */ @@ -3085,7 +3087,7 @@ static int __pyx_pf_8gedlibpy_6GEDEnv___cinit__(struct __pyx_obj_8gedlibpy_GEDEn return __pyx_r; } -/* "gedlibpy.pyx":191 +/* "gedlibpy.pyx":194 * * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3108,7 +3110,7 @@ static void __pyx_pf_8gedlibpy_6GEDEnv_2__dealloc__(struct __pyx_obj_8gedlibpy_G __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "gedlibpy.pyx":192 + /* "gedlibpy.pyx":195 * * def __dealloc__(self): * del self.c_env # <<<<<<<<<<<<<< @@ -3117,7 +3119,7 @@ static void __pyx_pf_8gedlibpy_6GEDEnv_2__dealloc__(struct __pyx_obj_8gedlibpy_G */ delete __pyx_v_self->c_env; - /* "gedlibpy.pyx":191 + /* "gedlibpy.pyx":194 * * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3129,7 +3131,7 @@ static void __pyx_pf_8gedlibpy_6GEDEnv_2__dealloc__(struct __pyx_obj_8gedlibpy_G __Pyx_RefNannyFinishContext(); } -/* "gedlibpy.pyx":195 +/* "gedlibpy.pyx":203 * * * def is_initialized(self) : # <<<<<<<<<<<<<< @@ -3158,7 +3160,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_4is_initialized(struct __pyx_obj_8ge PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("is_initialized", 0); - /* "gedlibpy.pyx":204 + /* "gedlibpy.pyx":212 * .. note:: This function exists for internals verifications but you can use it for your code. * """ * return self.c_env.isInitialized() # <<<<<<<<<<<<<< @@ -3170,15 +3172,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_4is_initialized(struct __pyx_obj_8ge __pyx_t_1 = __pyx_v_self->c_env->isInitialized(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 204, __pyx_L1_error) + __PYX_ERR(0, 212, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":195 + /* "gedlibpy.pyx":203 * * * def is_initialized(self) : # <<<<<<<<<<<<<< @@ -3197,7 +3199,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_4is_initialized(struct __pyx_obj_8ge return __pyx_r; } -/* "gedlibpy.pyx":207 +/* "gedlibpy.pyx":215 * * * def restart_env(self) : # <<<<<<<<<<<<<< @@ -3224,7 +3226,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_6restart_env(struct __pyx_obj_8gedli __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("restart_env", 0); - /* "gedlibpy.pyx":214 + /* "gedlibpy.pyx":222 * .. note:: You can now delete and add somes graphs after initialization so you can avoid this function. * """ * self.c_env.restartEnv() # <<<<<<<<<<<<<< @@ -3235,10 +3237,10 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_6restart_env(struct __pyx_obj_8gedli __pyx_v_self->c_env->restartEnv(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 214, __pyx_L1_error) + __PYX_ERR(0, 222, __pyx_L1_error) } - /* "gedlibpy.pyx":207 + /* "gedlibpy.pyx":215 * * * def restart_env(self) : # <<<<<<<<<<<<<< @@ -3258,7 +3260,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_6restart_env(struct __pyx_obj_8gedli return __pyx_r; } -/* "gedlibpy.pyx":217 +/* "gedlibpy.pyx":225 * * * def load_GXL_graphs(self, path_folder, path_XML, node_type, edge_type) : # <<<<<<<<<<<<<< @@ -3304,23 +3306,23 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_9load_GXL_graphs(PyObject *__pyx_v_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path_XML)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, 1); __PYX_ERR(0, 217, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, 1); __PYX_ERR(0, 225, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_type)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, 2); __PYX_ERR(0, 217, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, 2); __PYX_ERR(0, 225, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edge_type)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, 3); __PYX_ERR(0, 217, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, 3); __PYX_ERR(0, 225, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_GXL_graphs") < 0)) __PYX_ERR(0, 217, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_GXL_graphs") < 0)) __PYX_ERR(0, 225, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -3337,7 +3339,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_9load_GXL_graphs(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 217, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("load_GXL_graphs", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 225, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.load_GXL_graphs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3362,14 +3364,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_8load_GXL_graphs(struct __pyx_obj_8g bool __pyx_t_7; __Pyx_RefNannySetupContext("load_GXL_graphs", 0); - /* "gedlibpy.pyx":233 + /* "gedlibpy.pyx":241 * .. note:: You can call this function multiple times if you want, but not after an init call. * """ * self.c_env.loadGXLGraph(path_folder.encode('utf-8'), path_XML.encode('utf-8'), node_type, edge_type) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_folder, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_folder, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3383,12 +3385,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_8load_GXL_graphs(struct __pyx_obj_8g } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_XML, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_XML, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3402,21 +3404,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_8load_GXL_graphs(struct __pyx_obj_8g } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_node_type); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_edge_type); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_node_type); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_edge_type); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) try { __pyx_v_self->c_env->loadGXLGraph(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 233, __pyx_L1_error) + __PYX_ERR(0, 241, __pyx_L1_error) } - /* "gedlibpy.pyx":217 + /* "gedlibpy.pyx":225 * * * def load_GXL_graphs(self, path_folder, path_XML, node_type, edge_type) : # <<<<<<<<<<<<<< @@ -3439,7 +3441,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_8load_GXL_graphs(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":236 +/* "gedlibpy.pyx":244 * * * def graph_ids(self) : # <<<<<<<<<<<<<< @@ -3468,7 +3470,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_10graph_ids(struct __pyx_obj_8gedlib PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("graph_ids", 0); - /* "gedlibpy.pyx":245 + /* "gedlibpy.pyx":253 * .. note:: Prefer this function if you have huges structures with lots of graphs. * """ * return self.c_env.getGraphIds() # <<<<<<<<<<<<<< @@ -3480,15 +3482,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_10graph_ids(struct __pyx_obj_8gedlib __pyx_t_1 = __pyx_v_self->c_env->getGraphIds(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 245, __pyx_L1_error) + __PYX_ERR(0, 253, __pyx_L1_error) } - __pyx_t_2 = __pyx_convert_pair_to_py_size_t____size_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_pair_to_py_size_t____size_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":236 + /* "gedlibpy.pyx":244 * * * def graph_ids(self) : # <<<<<<<<<<<<<< @@ -3507,7 +3509,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_10graph_ids(struct __pyx_obj_8gedlib return __pyx_r; } -/* "gedlibpy.pyx":248 +/* "gedlibpy.pyx":256 * * * def get_all_graph_ids(self) : # <<<<<<<<<<<<<< @@ -3536,7 +3538,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_12get_all_graph_ids(struct __pyx_obj PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_all_graph_ids", 0); - /* "gedlibpy.pyx":257 + /* "gedlibpy.pyx":265 * .. note:: The last ID is equal to (number of graphs - 1). The order correspond to the loading order. * """ * return self.c_env.getAllGraphIds() # <<<<<<<<<<<<<< @@ -3548,15 +3550,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_12get_all_graph_ids(struct __pyx_obj __pyx_t_1 = __pyx_v_self->c_env->getAllGraphIds(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 257, __pyx_L1_error) + __PYX_ERR(0, 265, __pyx_L1_error) } - __pyx_t_2 = __pyx_convert_vector_to_py_size_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_2 = __pyx_convert_vector_to_py_size_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":248 + /* "gedlibpy.pyx":256 * * * def get_all_graph_ids(self) : # <<<<<<<<<<<<<< @@ -3575,7 +3577,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_12get_all_graph_ids(struct __pyx_obj return __pyx_r; } -/* "gedlibpy.pyx":260 +/* "gedlibpy.pyx":268 * * * def get_graph_class(self, id) : # <<<<<<<<<<<<<< @@ -3605,7 +3607,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_14get_graph_class(struct __pyx_obj_8 PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_graph_class", 0); - /* "gedlibpy.pyx":272 + /* "gedlibpy.pyx":280 * .. note:: An empty string can be a class. * """ * return self.c_env.getGraphClass(id) # <<<<<<<<<<<<<< @@ -3613,20 +3615,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_14get_graph_class(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->getGraphClass(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 272, __pyx_L1_error) + __PYX_ERR(0, 280, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":260 + /* "gedlibpy.pyx":268 * * * def get_graph_class(self, id) : # <<<<<<<<<<<<<< @@ -3645,7 +3647,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_14get_graph_class(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":275 +/* "gedlibpy.pyx":283 * * * def get_graph_name(self, id) : # <<<<<<<<<<<<<< @@ -3675,7 +3677,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_16get_graph_name(struct __pyx_obj_8g PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_graph_name", 0); - /* "gedlibpy.pyx":287 + /* "gedlibpy.pyx":295 * .. note:: An empty string can be a name. * """ * return self.c_env.getGraphName(id).decode('utf-8') # <<<<<<<<<<<<<< @@ -3683,20 +3685,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_16get_graph_name(struct __pyx_obj_8g * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->getGraphName(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 287, __pyx_L1_error) + __PYX_ERR(0, 295, __pyx_L1_error) } - __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_cpp_string(__pyx_t_2, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":275 + /* "gedlibpy.pyx":283 * * * def get_graph_name(self, id) : # <<<<<<<<<<<<<< @@ -3715,7 +3717,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_16get_graph_name(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":290 +/* "gedlibpy.pyx":298 * * * def add_graph(self, name="", classe="") : # <<<<<<<<<<<<<< @@ -3763,7 +3765,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_19add_graph(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_graph") < 0)) __PYX_ERR(0, 290, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_graph") < 0)) __PYX_ERR(0, 298, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3780,7 +3782,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_19add_graph(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_graph", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 290, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_graph", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 298, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.add_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3804,7 +3806,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_18add_graph(struct __pyx_obj_8gedlib size_t __pyx_t_6; __Pyx_RefNannySetupContext("add_graph", 0); - /* "gedlibpy.pyx":304 + /* "gedlibpy.pyx":312 * .. note:: You can call this function without parameters. You can also use this function after initialization, call init() after you're finished your modifications. * """ * return self.c_env.addGraph(name.encode('utf-8'), classe.encode('utf-8')) # <<<<<<<<<<<<<< @@ -3812,7 +3814,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_18add_graph(struct __pyx_obj_8gedlib * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3826,12 +3828,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_18add_graph(struct __pyx_obj_8gedlib } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_classe, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_classe, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3845,24 +3847,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_18add_graph(struct __pyx_obj_8gedlib } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_6 = __pyx_v_self->c_env->addGraph(__pyx_t_4, __pyx_t_5); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 304, __pyx_L1_error) + __PYX_ERR(0, 312, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":290 + /* "gedlibpy.pyx":298 * * * def add_graph(self, name="", classe="") : # <<<<<<<<<<<<<< @@ -3883,7 +3885,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_18add_graph(struct __pyx_obj_8gedlib return __pyx_r; } -/* "gedlibpy.pyx":307 +/* "gedlibpy.pyx":315 * * * def add_node(self, graph_id, node_id, node_label): # <<<<<<<<<<<<<< @@ -3926,17 +3928,17 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_21add_node(PyObject *__pyx_v_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_node", 1, 3, 3, 1); __PYX_ERR(0, 307, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_node", 1, 3, 3, 1); __PYX_ERR(0, 315, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_label)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_node", 1, 3, 3, 2); __PYX_ERR(0, 307, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_node", 1, 3, 3, 2); __PYX_ERR(0, 315, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_node") < 0)) __PYX_ERR(0, 307, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_node") < 0)) __PYX_ERR(0, 315, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3951,7 +3953,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_21add_node(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 307, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 315, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.add_node", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3975,15 +3977,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_20add_node(struct __pyx_obj_8gedlibp std::map __pyx_t_6; __Pyx_RefNannySetupContext("add_node", 0); - /* "gedlibpy.pyx":321 + /* "gedlibpy.pyx":329 * .. note:: You can also use this function after initialization, but only on a newly added graph. Call init() after you're finished your modifications. * """ * self.c_env.addNode(graph_id, node_id.encode('utf-8'), encode_your_map(node_label)) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_id, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_id, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -3997,12 +3999,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_20add_node(struct __pyx_obj_8gedlibp } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -4016,19 +4018,19 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_20add_node(struct __pyx_obj_8gedlibp } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_node_label) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_node_label); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; try { __pyx_v_self->c_env->addNode(__pyx_t_1, __pyx_t_5, __pyx_t_6); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 321, __pyx_L1_error) + __PYX_ERR(0, 329, __pyx_L1_error) } - /* "gedlibpy.pyx":307 + /* "gedlibpy.pyx":315 * * * def add_node(self, graph_id, node_id, node_label): # <<<<<<<<<<<<<< @@ -4051,7 +4053,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_20add_node(struct __pyx_obj_8gedlibp return __pyx_r; } -/* "gedlibpy.pyx":324 +/* "gedlibpy.pyx":332 * * * def add_edge(self, graph_id, tail, head, edge_label, ignore_duplicates=True) : # <<<<<<<<<<<<<< @@ -4101,19 +4103,19 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_23add_edge(PyObject *__pyx_v_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tail)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, 1); __PYX_ERR(0, 324, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, 1); __PYX_ERR(0, 332, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_head)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, 2); __PYX_ERR(0, 324, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, 2); __PYX_ERR(0, 332, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edge_label)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, 3); __PYX_ERR(0, 324, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, 3); __PYX_ERR(0, 332, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -4123,7 +4125,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_23add_edge(PyObject *__pyx_v_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_edge") < 0)) __PYX_ERR(0, 324, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_edge") < 0)) __PYX_ERR(0, 332, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4145,7 +4147,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_23add_edge(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 324, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_edge", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 332, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.add_edge", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4171,15 +4173,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_22add_edge(struct __pyx_obj_8gedlibp bool __pyx_t_8; __Pyx_RefNannySetupContext("add_edge", 0); - /* "gedlibpy.pyx":342 + /* "gedlibpy.pyx":350 * .. note:: You can also use this function after initialization, but only on a newly added graph. Call init() after you're finished your modifications. * """ * self.c_env.addEdge(graph_id, tail.encode('utf-8'), head.encode('utf-8'), encode_your_map(edge_label), ignore_duplicates) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tail, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tail, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -4193,12 +4195,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_22add_edge(struct __pyx_obj_8gedlibp } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_head, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_head, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -4212,12 +4214,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_22add_edge(struct __pyx_obj_8gedlibp } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -4231,20 +4233,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_22add_edge(struct __pyx_obj_8gedlibp } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_edge_label) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_edge_label); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_duplicates); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_duplicates); if (unlikely((__pyx_t_8 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 350, __pyx_L1_error) try { __pyx_v_self->c_env->addEdge(__pyx_t_1, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 342, __pyx_L1_error) + __PYX_ERR(0, 350, __pyx_L1_error) } - /* "gedlibpy.pyx":324 + /* "gedlibpy.pyx":332 * * * def add_edge(self, graph_id, tail, head, edge_label, ignore_duplicates=True) : # <<<<<<<<<<<<<< @@ -4267,7 +4269,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_22add_edge(struct __pyx_obj_8gedlibp return __pyx_r; } -/* "gedlibpy.pyx":345 +/* "gedlibpy.pyx":353 * * * def add_symmetrical_edge(self, graph_id, tail, head, edge_label) : # <<<<<<<<<<<<<< @@ -4313,23 +4315,23 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_25add_symmetrical_edge(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tail)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, 1); __PYX_ERR(0, 345, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, 1); __PYX_ERR(0, 353, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_head)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, 2); __PYX_ERR(0, 345, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, 2); __PYX_ERR(0, 353, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edge_label)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, 3); __PYX_ERR(0, 345, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, 3); __PYX_ERR(0, 353, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_symmetrical_edge") < 0)) __PYX_ERR(0, 345, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_symmetrical_edge") < 0)) __PYX_ERR(0, 353, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -4346,7 +4348,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_25add_symmetrical_edge(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_symmetrical_edge", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 353, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.add_symmetrical_edge", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4374,14 +4376,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_24add_symmetrical_edge(struct __pyx_ std::map __pyx_t_7; __Pyx_RefNannySetupContext("add_symmetrical_edge", 0); - /* "gedlibpy.pyx":361 + /* "gedlibpy.pyx":369 * .. note:: You can also use this function after initialization, but only on a newly added graph. Call init() after you're finished your modifications. * """ * tailB = tail.encode('utf-8') # <<<<<<<<<<<<<< * headB = head.encode('utf-8') * edgeLabelB = encode_your_map(edge_label) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tail, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tail, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4395,20 +4397,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_24add_symmetrical_edge(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tailB = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":362 + /* "gedlibpy.pyx":370 * """ * tailB = tail.encode('utf-8') * headB = head.encode('utf-8') # <<<<<<<<<<<<<< * edgeLabelB = encode_your_map(edge_label) * self.c_env.addEdge(graph_id, tailB, headB, edgeLabelB, True) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_head, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_head, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4422,20 +4424,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_24add_symmetrical_edge(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_headB = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":363 + /* "gedlibpy.pyx":371 * tailB = tail.encode('utf-8') * headB = head.encode('utf-8') * edgeLabelB = encode_your_map(edge_label) # <<<<<<<<<<<<<< * self.c_env.addEdge(graph_id, tailB, headB, edgeLabelB, True) * self.c_env.addEdge(graph_id, headB, tailB, edgeLabelB, True) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4449,49 +4451,49 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_24add_symmetrical_edge(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_edge_label) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_edge_label); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_edgeLabelB = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":364 + /* "gedlibpy.pyx":372 * headB = head.encode('utf-8') * edgeLabelB = encode_your_map(edge_label) * self.c_env.addEdge(graph_id, tailB, headB, edgeLabelB, True) # <<<<<<<<<<<<<< * self.c_env.addEdge(graph_id, headB, tailB, edgeLabelB, True) * */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_tailB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error) - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_headB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error) - __pyx_t_7 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_v_edgeLabelB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_tailB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_headB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_v_edgeLabelB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error) try { __pyx_v_self->c_env->addEdge(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, 1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 364, __pyx_L1_error) + __PYX_ERR(0, 372, __pyx_L1_error) } - /* "gedlibpy.pyx":365 + /* "gedlibpy.pyx":373 * edgeLabelB = encode_your_map(edge_label) * self.c_env.addEdge(graph_id, tailB, headB, edgeLabelB, True) * self.c_env.addEdge(graph_id, headB, tailB, edgeLabelB, True) # <<<<<<<<<<<<<< * * */ - __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 365, __pyx_L1_error) - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_headB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 365, __pyx_L1_error) - __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_tailB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 365, __pyx_L1_error) - __pyx_t_7 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_v_edgeLabelB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_headB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_v_tailB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_v_edgeLabelB); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error) try { __pyx_v_self->c_env->addEdge(__pyx_t_4, __pyx_t_6, __pyx_t_5, __pyx_t_7, 1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 365, __pyx_L1_error) + __PYX_ERR(0, 373, __pyx_L1_error) } - /* "gedlibpy.pyx":345 + /* "gedlibpy.pyx":353 * * * def add_symmetrical_edge(self, graph_id, tail, head, edge_label) : # <<<<<<<<<<<<<< @@ -4517,7 +4519,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_24add_symmetrical_edge(struct __pyx_ return __pyx_r; } -/* "gedlibpy.pyx":368 +/* "gedlibpy.pyx":376 * * * def clear_graph(self, graph_id) : # <<<<<<<<<<<<<< @@ -4545,22 +4547,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_26clear_graph(struct __pyx_obj_8gedl size_t __pyx_t_1; __Pyx_RefNannySetupContext("clear_graph", 0); - /* "gedlibpy.pyx":377 + /* "gedlibpy.pyx":385 * .. note:: Call init() after you're finished your modifications. * """ * self.c_env.clearGraph(graph_id) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error) try { __pyx_v_self->c_env->clearGraph(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 377, __pyx_L1_error) + __PYX_ERR(0, 385, __pyx_L1_error) } - /* "gedlibpy.pyx":368 + /* "gedlibpy.pyx":376 * * * def clear_graph(self, graph_id) : # <<<<<<<<<<<<<< @@ -4580,7 +4582,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_26clear_graph(struct __pyx_obj_8gedl return __pyx_r; } -/* "gedlibpy.pyx":380 +/* "gedlibpy.pyx":388 * * * def get_graph_internal_id(self, graph_id) : # <<<<<<<<<<<<<< @@ -4610,7 +4612,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_28get_graph_internal_id(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_graph_internal_id", 0); - /* "gedlibpy.pyx":392 + /* "gedlibpy.pyx":400 * .. note:: These functions allow to collect all the graph's informations. * """ * return self.c_env.getGraphInternalId(graph_id) # <<<<<<<<<<<<<< @@ -4618,20 +4620,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_28get_graph_internal_id(struct __pyx * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 400, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->getGraphInternalId(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 392, __pyx_L1_error) + __PYX_ERR(0, 400, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":380 + /* "gedlibpy.pyx":388 * * * def get_graph_internal_id(self, graph_id) : # <<<<<<<<<<<<<< @@ -4650,7 +4652,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_28get_graph_internal_id(struct __pyx return __pyx_r; } -/* "gedlibpy.pyx":395 +/* "gedlibpy.pyx":403 * * * def get_graph_num_nodes(self, graph_id) : # <<<<<<<<<<<<<< @@ -4680,7 +4682,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_30get_graph_num_nodes(struct __pyx_o PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_graph_num_nodes", 0); - /* "gedlibpy.pyx":407 + /* "gedlibpy.pyx":415 * .. note:: These functions allow to collect all the graph's informations. * """ * return self.c_env.getGraphNumNodes(graph_id) # <<<<<<<<<<<<<< @@ -4688,20 +4690,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_30get_graph_num_nodes(struct __pyx_o * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 415, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->getGraphNumNodes(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 407, __pyx_L1_error) + __PYX_ERR(0, 415, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":395 + /* "gedlibpy.pyx":403 * * * def get_graph_num_nodes(self, graph_id) : # <<<<<<<<<<<<<< @@ -4720,7 +4722,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_30get_graph_num_nodes(struct __pyx_o return __pyx_r; } -/* "gedlibpy.pyx":410 +/* "gedlibpy.pyx":418 * * * def get_graph_num_edges(self, graph_id) : # <<<<<<<<<<<<<< @@ -4750,7 +4752,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_32get_graph_num_edges(struct __pyx_o PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_graph_num_edges", 0); - /* "gedlibpy.pyx":422 + /* "gedlibpy.pyx":430 * .. note:: These functions allow to collect all the graph's informations. * """ * return self.c_env.getGraphNumEdges(graph_id) # <<<<<<<<<<<<<< @@ -4758,20 +4760,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_32get_graph_num_edges(struct __pyx_o * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->getGraphNumEdges(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 422, __pyx_L1_error) + __PYX_ERR(0, 430, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":410 + /* "gedlibpy.pyx":418 * * * def get_graph_num_edges(self, graph_id) : # <<<<<<<<<<<<<< @@ -4790,7 +4792,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_32get_graph_num_edges(struct __pyx_o return __pyx_r; } -/* "gedlibpy.pyx":425 +/* "gedlibpy.pyx":433 * * * def get_original_node_ids(self, graph_id) : # <<<<<<<<<<<<<< @@ -4825,7 +4827,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_34get_original_node_ids(struct __pyx PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("get_original_node_ids", 0); - /* "gedlibpy.pyx":437 + /* "gedlibpy.pyx":445 * .. note:: These functions allow to collect all the graph's informations. * """ * return [gid.decode('utf-8') for gid in self.c_env.getGraphOriginalNodeIds(graph_id)] # <<<<<<<<<<<<<< @@ -4834,14 +4836,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_34get_original_node_ids(struct __pyx */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getGraphOriginalNodeIds(__pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 437, __pyx_L1_error) + __PYX_ERR(0, 445, __pyx_L1_error) } __pyx_t_5 = &__pyx_t_3; __pyx_t_4 = __pyx_t_5->begin(); @@ -4850,9 +4852,9 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_34get_original_node_ids(struct __pyx __pyx_t_6 = *__pyx_t_4; ++__pyx_t_4; __pyx_8genexpr3__pyx_v_gid = __pyx_t_6; - __pyx_t_7 = __Pyx_decode_cpp_string(__pyx_8genexpr3__pyx_v_gid, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_7 = __Pyx_decode_cpp_string(__pyx_8genexpr3__pyx_v_gid, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 437, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* exit inner scope */ @@ -4860,7 +4862,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_34get_original_node_ids(struct __pyx __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":425 + /* "gedlibpy.pyx":433 * * * def get_original_node_ids(self, graph_id) : # <<<<<<<<<<<<<< @@ -4880,7 +4882,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_34get_original_node_ids(struct __pyx return __pyx_r; } -/* "gedlibpy.pyx":440 +/* "gedlibpy.pyx":448 * * * def get_graph_node_labels(self, graph_id) : # <<<<<<<<<<<<<< @@ -4918,7 +4920,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_36get_graph_node_labels(struct __pyx PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("get_graph_node_labels", 0); - /* "gedlibpy.pyx":452 + /* "gedlibpy.pyx":460 * .. note:: These functions allow to collect all the graph's informations. * """ * return [decode_your_map(node_label) for node_label in self.c_env.getGraphNodeLabels(graph_id)] # <<<<<<<<<<<<<< @@ -4927,14 +4929,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_36get_graph_node_labels(struct __pyx */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 460, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getGraphNodeLabels(__pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 452, __pyx_L1_error) + __PYX_ERR(0, 460, __pyx_L1_error) } __pyx_t_5 = &__pyx_t_3; __pyx_t_4 = __pyx_t_5->begin(); @@ -4943,9 +4945,9 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_36get_graph_node_labels(struct __pyx __pyx_t_6 = *__pyx_t_4; ++__pyx_t_4; __pyx_8genexpr4__pyx_v_node_label = __pyx_t_6; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 452, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_8genexpr4__pyx_v_node_label); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_9 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_8genexpr4__pyx_v_node_label); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -4960,10 +4962,10 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_36get_graph_node_labels(struct __pyx __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 452, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 452, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } /* exit inner scope */ @@ -4971,7 +4973,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_36get_graph_node_labels(struct __pyx __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":440 + /* "gedlibpy.pyx":448 * * * def get_graph_node_labels(self, graph_id) : # <<<<<<<<<<<<<< @@ -4994,7 +4996,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_36get_graph_node_labels(struct __pyx return __pyx_r; } -/* "gedlibpy.pyx":455 +/* "gedlibpy.pyx":463 * * * def get_graph_edges(self, graph_id) : # <<<<<<<<<<<<<< @@ -5027,7 +5029,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_38get_graph_edges(struct __pyx_obj_8 PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_graph_edges", 0); - /* "gedlibpy.pyx":467 + /* "gedlibpy.pyx":475 * .. note:: These functions allow to collect all the graph's informations. * """ * return decode_graph_edges(self.c_env.getGraphEdges(graph_id)) # <<<<<<<<<<<<<< @@ -5035,16 +5037,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_38get_graph_edges(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_graph_edges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_graph_edges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 475, __pyx_L1_error) try { __pyx_t_4 = __pyx_v_self->c_env->getGraphEdges(__pyx_t_3); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 467, __pyx_L1_error) + __PYX_ERR(0, 475, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e_______std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_string_3e___(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e_______std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_string_3e___(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5059,14 +5061,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_38get_graph_edges(struct __pyx_obj_8 __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":455 + /* "gedlibpy.pyx":463 * * * def get_graph_edges(self, graph_id) : # <<<<<<<<<<<<<< @@ -5088,7 +5090,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_38get_graph_edges(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":470 +/* "gedlibpy.pyx":478 * * * def get_graph_adjacence_matrix(self, graph_id) : # <<<<<<<<<<<<<< @@ -5118,7 +5120,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_40get_graph_adjacence_matrix(struct PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get_graph_adjacence_matrix", 0); - /* "gedlibpy.pyx":482 + /* "gedlibpy.pyx":490 * .. note:: These functions allow to collect all the graph's informations. * """ * return self.c_env.getGraphAdjacenceMatrix(graph_id) # <<<<<<<<<<<<<< @@ -5126,20 +5128,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_40get_graph_adjacence_matrix(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_graph_id); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 490, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->getGraphAdjacenceMatrix(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 482, __pyx_L1_error) + __PYX_ERR(0, 490, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_size_t_3e___(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_size_t_3e___(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":470 + /* "gedlibpy.pyx":478 * * * def get_graph_adjacence_matrix(self, graph_id) : # <<<<<<<<<<<<<< @@ -5158,7 +5160,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_40get_graph_adjacence_matrix(struct return __pyx_r; } -/* "gedlibpy.pyx":485 +/* "gedlibpy.pyx":493 * * * def set_edit_cost(self, edit_cost, edit_cost_constant = []) : # <<<<<<<<<<<<<< @@ -5203,7 +5205,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_43set_edit_cost(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_edit_cost") < 0)) __PYX_ERR(0, 485, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_edit_cost") < 0)) __PYX_ERR(0, 493, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5219,7 +5221,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_43set_edit_cost(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_edit_cost", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 485, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_edit_cost", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 493, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.set_edit_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5245,28 +5247,28 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_42set_edit_cost(struct __pyx_obj_8ge std::vector __pyx_t_7; __Pyx_RefNannySetupContext("set_edit_cost", 0); - /* "gedlibpy.pyx":497 + /* "gedlibpy.pyx":505 * .. note:: Try to make sure the edit cost function exists with list_of_edit_cost_options, raise an error otherwise. * """ * if edit_cost in list_of_edit_cost_options: # <<<<<<<<<<<<<< * edit_cost_b = edit_cost.encode('utf-8') * self.c_env.setEditCost(edit_cost_b, edit_cost_constant) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_list_of_edit_cost_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_list_of_edit_cost_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_edit_cost, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_edit_cost, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (likely(__pyx_t_3)) { - /* "gedlibpy.pyx":498 + /* "gedlibpy.pyx":506 * """ * if edit_cost in list_of_edit_cost_options: * edit_cost_b = edit_cost.encode('utf-8') # <<<<<<<<<<<<<< * self.c_env.setEditCost(edit_cost_b, edit_cost_constant) * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_edit_cost, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_edit_cost, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5280,29 +5282,29 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_42set_edit_cost(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_edit_cost_b = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":499 + /* "gedlibpy.pyx":507 * if edit_cost in list_of_edit_cost_options: * edit_cost_b = edit_cost.encode('utf-8') * self.c_env.setEditCost(edit_cost_b, edit_cost_constant) # <<<<<<<<<<<<<< * else: * raise EditCostError("This edit cost function doesn't exist, please see list_of_edit_cost_options for selecting a edit cost function") */ - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_edit_cost_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L1_error) - __pyx_t_7 = __pyx_convert_vector_from_py_double(__pyx_v_edit_cost_constant); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_edit_cost_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_vector_from_py_double(__pyx_v_edit_cost_constant); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 507, __pyx_L1_error) try { __pyx_v_self->c_env->setEditCost(__pyx_t_6, __pyx_t_7); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 499, __pyx_L1_error) + __PYX_ERR(0, 507, __pyx_L1_error) } - /* "gedlibpy.pyx":497 + /* "gedlibpy.pyx":505 * .. note:: Try to make sure the edit cost function exists with list_of_edit_cost_options, raise an error otherwise. * """ * if edit_cost in list_of_edit_cost_options: # <<<<<<<<<<<<<< @@ -5312,7 +5314,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_42set_edit_cost(struct __pyx_obj_8ge goto __pyx_L3; } - /* "gedlibpy.pyx":501 + /* "gedlibpy.pyx":509 * self.c_env.setEditCost(edit_cost_b, edit_cost_constant) * else: * raise EditCostError("This edit cost function doesn't exist, please see list_of_edit_cost_options for selecting a edit cost function") # <<<<<<<<<<<<<< @@ -5320,7 +5322,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_42set_edit_cost(struct __pyx_obj_8ge * */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_EditCostError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_EditCostError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -5334,16 +5336,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_42set_edit_cost(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_This_edit_cost_function_doesn_t) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_This_edit_cost_function_doesn_t); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 501, __pyx_L1_error) + __PYX_ERR(0, 509, __pyx_L1_error) } __pyx_L3:; - /* "gedlibpy.pyx":485 + /* "gedlibpy.pyx":493 * * * def set_edit_cost(self, edit_cost, edit_cost_constant = []) : # <<<<<<<<<<<<<< @@ -5367,7 +5369,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_42set_edit_cost(struct __pyx_obj_8ge return __pyx_r; } -/* "gedlibpy.pyx":504 +/* "gedlibpy.pyx":512 * * * def set_personal_edit_cost(self, edit_cost_constant = []) : # <<<<<<<<<<<<<< @@ -5405,7 +5407,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_45set_personal_edit_cost(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_personal_edit_cost") < 0)) __PYX_ERR(0, 504, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_personal_edit_cost") < 0)) __PYX_ERR(0, 512, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5419,7 +5421,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_45set_personal_edit_cost(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_personal_edit_cost", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 504, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_personal_edit_cost", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 512, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.set_personal_edit_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5438,22 +5440,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_44set_personal_edit_cost(struct __py std::vector __pyx_t_1; __Pyx_RefNannySetupContext("set_personal_edit_cost", 0); - /* "gedlibpy.pyx":514 + /* "gedlibpy.pyx":522 * .. note::You have to modify the C++ function to use it. Please see the documentation to add your Edit Cost function. * """ * self.c_env.setPersonalEditCost(edit_cost_constant) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __pyx_convert_vector_from_py_double(__pyx_v_edit_cost_constant); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_vector_from_py_double(__pyx_v_edit_cost_constant); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 522, __pyx_L1_error) try { __pyx_v_self->c_env->setPersonalEditCost(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 514, __pyx_L1_error) + __PYX_ERR(0, 522, __pyx_L1_error) } - /* "gedlibpy.pyx":504 + /* "gedlibpy.pyx":512 * * * def set_personal_edit_cost(self, edit_cost_constant = []) : # <<<<<<<<<<<<<< @@ -5473,7 +5475,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_44set_personal_edit_cost(struct __py return __pyx_r; } -/* "gedlibpy.pyx":517 +/* "gedlibpy.pyx":525 * * * def init(self, init_option='EAGER_WITHOUT_SHUFFLED_COPIES', print_to_stdout=False) : # <<<<<<<<<<<<<< @@ -5521,7 +5523,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_47init(PyObject *__pyx_v_self, PyObj } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init") < 0)) __PYX_ERR(0, 517, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init") < 0)) __PYX_ERR(0, 525, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5538,7 +5540,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_47init(PyObject *__pyx_v_self, PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("init", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 517, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("init", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 525, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.init", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5564,28 +5566,28 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_46init(struct __pyx_obj_8gedlibpy_GE bool __pyx_t_7; __Pyx_RefNannySetupContext("init", 0); - /* "gedlibpy.pyx":528 + /* "gedlibpy.pyx":536 * .. note:: Try to make sure the option exists with list_of_init_options or choose no options, raise an error otherwise. * """ * if init_option in list_of_init_options: # <<<<<<<<<<<<<< * init_option_b = init_option.encode('utf-8') * self.c_env.initEnv(init_option_b, print_to_stdout) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_list_of_init_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_list_of_init_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_init_option, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_init_option, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (likely(__pyx_t_3)) { - /* "gedlibpy.pyx":529 + /* "gedlibpy.pyx":537 * """ * if init_option in list_of_init_options: * init_option_b = init_option.encode('utf-8') # <<<<<<<<<<<<<< * self.c_env.initEnv(init_option_b, print_to_stdout) * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_option, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_option, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5599,29 +5601,29 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_46init(struct __pyx_obj_8gedlibpy_GE } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_init_option_b = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":530 + /* "gedlibpy.pyx":538 * if init_option in list_of_init_options: * init_option_b = init_option.encode('utf-8') * self.c_env.initEnv(init_option_b, print_to_stdout) # <<<<<<<<<<<<<< * else: * raise InitError("This init option doesn't exist, please see list_of_init_options for selecting an option. You can choose any options.") */ - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_init_option_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 530, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_print_to_stdout); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_init_option_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_print_to_stdout); if (unlikely((__pyx_t_7 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 538, __pyx_L1_error) try { __pyx_v_self->c_env->initEnv(__pyx_t_6, __pyx_t_7); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 530, __pyx_L1_error) + __PYX_ERR(0, 538, __pyx_L1_error) } - /* "gedlibpy.pyx":528 + /* "gedlibpy.pyx":536 * .. note:: Try to make sure the option exists with list_of_init_options or choose no options, raise an error otherwise. * """ * if init_option in list_of_init_options: # <<<<<<<<<<<<<< @@ -5631,7 +5633,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_46init(struct __pyx_obj_8gedlibpy_GE goto __pyx_L3; } - /* "gedlibpy.pyx":532 + /* "gedlibpy.pyx":540 * self.c_env.initEnv(init_option_b, print_to_stdout) * else: * raise InitError("This init option doesn't exist, please see list_of_init_options for selecting an option. You can choose any options.") # <<<<<<<<<<<<<< @@ -5639,7 +5641,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_46init(struct __pyx_obj_8gedlibpy_GE * */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InitError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_InitError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -5653,16 +5655,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_46init(struct __pyx_obj_8gedlibpy_GE } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_This_init_option_doesn_t_exist_p) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_This_init_option_doesn_t_exist_p); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 532, __pyx_L1_error) + __PYX_ERR(0, 540, __pyx_L1_error) } __pyx_L3:; - /* "gedlibpy.pyx":517 + /* "gedlibpy.pyx":525 * * * def init(self, init_option='EAGER_WITHOUT_SHUFFLED_COPIES', print_to_stdout=False) : # <<<<<<<<<<<<<< @@ -5686,7 +5688,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_46init(struct __pyx_obj_8gedlibpy_GE return __pyx_r; } -/* "gedlibpy.pyx":535 +/* "gedlibpy.pyx":543 * * * def set_method(self, method, options="") : # <<<<<<<<<<<<<< @@ -5731,7 +5733,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_49set_method(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_method") < 0)) __PYX_ERR(0, 535, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_method") < 0)) __PYX_ERR(0, 543, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5747,7 +5749,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_49set_method(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_method", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 535, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_method", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 543, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.set_method", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5773,28 +5775,28 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli std::string __pyx_t_7; __Pyx_RefNannySetupContext("set_method", 0); - /* "gedlibpy.pyx":547 + /* "gedlibpy.pyx":555 * .. note:: Try to make sure the edit cost function exists with list_of_method_options, raise an error otherwise. Call init_method() after your set. * """ * if method in list_of_method_options: # <<<<<<<<<<<<<< * method_b = method.encode('utf-8') * self.c_env.setMethod(method_b, options.encode('utf-8')) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_list_of_method_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_list_of_method_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_method, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_method, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (likely(__pyx_t_3)) { - /* "gedlibpy.pyx":548 + /* "gedlibpy.pyx":556 * """ * if method in list_of_method_options: * method_b = method.encode('utf-8') # <<<<<<<<<<<<<< * self.c_env.setMethod(method_b, options.encode('utf-8')) * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5808,21 +5810,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_method_b = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":549 + /* "gedlibpy.pyx":557 * if method in list_of_method_options: * method_b = method.encode('utf-8') * self.c_env.setMethod(method_b, options.encode('utf-8')) # <<<<<<<<<<<<<< * else: * raise MethodError("This method doesn't exist, please see list_of_method_options for selecting a method") */ - __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_method_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) + __pyx_t_6 = __pyx_convert_string_from_py_std__in_string(__pyx_v_method_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5836,19 +5838,19 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L1_error) + __pyx_t_7 = __pyx_convert_string_from_py_std__in_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_v_self->c_env->setMethod(__pyx_t_6, __pyx_t_7); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 549, __pyx_L1_error) + __PYX_ERR(0, 557, __pyx_L1_error) } - /* "gedlibpy.pyx":547 + /* "gedlibpy.pyx":555 * .. note:: Try to make sure the edit cost function exists with list_of_method_options, raise an error otherwise. Call init_method() after your set. * """ * if method in list_of_method_options: # <<<<<<<<<<<<<< @@ -5858,7 +5860,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli goto __pyx_L3; } - /* "gedlibpy.pyx":551 + /* "gedlibpy.pyx":559 * self.c_env.setMethod(method_b, options.encode('utf-8')) * else: * raise MethodError("This method doesn't exist, please see list_of_method_options for selecting a method") # <<<<<<<<<<<<<< @@ -5866,7 +5868,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli * */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MethodError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 551, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MethodError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -5880,16 +5882,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_u_This_method_doesn_t_exist_please) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_This_method_doesn_t_exist_please); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 551, __pyx_L1_error) + __PYX_ERR(0, 559, __pyx_L1_error) } __pyx_L3:; - /* "gedlibpy.pyx":535 + /* "gedlibpy.pyx":543 * * * def set_method(self, method, options="") : # <<<<<<<<<<<<<< @@ -5913,7 +5915,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_48set_method(struct __pyx_obj_8gedli return __pyx_r; } -/* "gedlibpy.pyx":554 +/* "gedlibpy.pyx":562 * * * def init_method(self) : # <<<<<<<<<<<<<< @@ -5940,7 +5942,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_50init_method(struct __pyx_obj_8gedl __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init_method", 0); - /* "gedlibpy.pyx":561 + /* "gedlibpy.pyx":569 * .. note:: Call this function after set the method. You can't launch computation or change the method after that. * """ * self.c_env.initMethod() # <<<<<<<<<<<<<< @@ -5951,10 +5953,10 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_50init_method(struct __pyx_obj_8gedl __pyx_v_self->c_env->initMethod(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 561, __pyx_L1_error) + __PYX_ERR(0, 569, __pyx_L1_error) } - /* "gedlibpy.pyx":554 + /* "gedlibpy.pyx":562 * * * def init_method(self) : # <<<<<<<<<<<<<< @@ -5974,7 +5976,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_50init_method(struct __pyx_obj_8gedl return __pyx_r; } -/* "gedlibpy.pyx":564 +/* "gedlibpy.pyx":572 * * * def get_init_time(self) : # <<<<<<<<<<<<<< @@ -6003,7 +6005,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_52get_init_time(struct __pyx_obj_8ge PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_init_time", 0); - /* "gedlibpy.pyx":571 + /* "gedlibpy.pyx":579 * :rtype: double * """ * return self.c_env.getInitime() # <<<<<<<<<<<<<< @@ -6015,15 +6017,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_52get_init_time(struct __pyx_obj_8ge __pyx_t_1 = __pyx_v_self->c_env->getInitime(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 571, __pyx_L1_error) + __PYX_ERR(0, 579, __pyx_L1_error) } - __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":564 + /* "gedlibpy.pyx":572 * * * def get_init_time(self) : # <<<<<<<<<<<<<< @@ -6042,7 +6044,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_52get_init_time(struct __pyx_obj_8ge return __pyx_r; } -/* "gedlibpy.pyx":574 +/* "gedlibpy.pyx":582 * * * def run_method(self, g, h) : # <<<<<<<<<<<<<< @@ -6082,11 +6084,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_55run_method(PyObject *__pyx_v_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("run_method", 1, 2, 2, 1); __PYX_ERR(0, 574, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("run_method", 1, 2, 2, 1); __PYX_ERR(0, 582, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run_method") < 0)) __PYX_ERR(0, 574, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "run_method") < 0)) __PYX_ERR(0, 582, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6099,7 +6101,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_55run_method(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("run_method", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("run_method", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 582, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.run_method", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6119,23 +6121,23 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_54run_method(struct __pyx_obj_8gedli size_t __pyx_t_2; __Pyx_RefNannySetupContext("run_method", 0); - /* "gedlibpy.pyx":586 + /* "gedlibpy.pyx":594 * .. note:: This function only compute the distance between two graphs, without returning a result. Use the differents function to see the result between the two graphs. * """ * self.c_env.runMethod(g, h) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 586, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 594, __pyx_L1_error) try { __pyx_v_self->c_env->runMethod(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 586, __pyx_L1_error) + __PYX_ERR(0, 594, __pyx_L1_error) } - /* "gedlibpy.pyx":574 + /* "gedlibpy.pyx":582 * * * def run_method(self, g, h) : # <<<<<<<<<<<<<< @@ -6155,7 +6157,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_54run_method(struct __pyx_obj_8gedli return __pyx_r; } -/* "gedlibpy.pyx":589 +/* "gedlibpy.pyx":597 * * * def get_upper_bound(self, g, h) : # <<<<<<<<<<<<<< @@ -6195,11 +6197,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_57get_upper_bound(PyObject *__pyx_v_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_upper_bound", 1, 2, 2, 1); __PYX_ERR(0, 589, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_upper_bound", 1, 2, 2, 1); __PYX_ERR(0, 597, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_upper_bound") < 0)) __PYX_ERR(0, 589, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_upper_bound") < 0)) __PYX_ERR(0, 597, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6212,7 +6214,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_57get_upper_bound(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_upper_bound", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 589, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_upper_bound", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 597, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_upper_bound", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6234,7 +6236,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_56get_upper_bound(struct __pyx_obj_8 PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_upper_bound", 0); - /* "gedlibpy.pyx":604 + /* "gedlibpy.pyx":612 * .. note:: The upper bound is equivalent to the result of the pessimist edit distance cost. Methods are heuristics so the library can't compute the real perfect result because it's NP-Hard problem. * """ * return self.c_env.getUpperBound(g, h) # <<<<<<<<<<<<<< @@ -6242,21 +6244,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_56get_upper_bound(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 604, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getUpperBound(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 604, __pyx_L1_error) + __PYX_ERR(0, 612, __pyx_L1_error) } - __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":589 + /* "gedlibpy.pyx":597 * * * def get_upper_bound(self, g, h) : # <<<<<<<<<<<<<< @@ -6275,7 +6277,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_56get_upper_bound(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":607 +/* "gedlibpy.pyx":615 * * * def get_lower_bound(self, g, h) : # <<<<<<<<<<<<<< @@ -6315,11 +6317,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_59get_lower_bound(PyObject *__pyx_v_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_lower_bound", 1, 2, 2, 1); __PYX_ERR(0, 607, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_lower_bound", 1, 2, 2, 1); __PYX_ERR(0, 615, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_lower_bound") < 0)) __PYX_ERR(0, 607, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_lower_bound") < 0)) __PYX_ERR(0, 615, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6332,7 +6334,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_59get_lower_bound(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_lower_bound", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 607, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_lower_bound", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 615, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_lower_bound", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6354,7 +6356,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_58get_lower_bound(struct __pyx_obj_8 PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_lower_bound", 0); - /* "gedlibpy.pyx":622 + /* "gedlibpy.pyx":630 * .. note:: This function can be ignored, because lower bound doesn't have a crucial utility. * """ * return self.c_env.getLowerBound(g, h) # <<<<<<<<<<<<<< @@ -6362,21 +6364,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_58get_lower_bound(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 622, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getLowerBound(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 622, __pyx_L1_error) + __PYX_ERR(0, 630, __pyx_L1_error) } - __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":607 + /* "gedlibpy.pyx":615 * * * def get_lower_bound(self, g, h) : # <<<<<<<<<<<<<< @@ -6395,7 +6397,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_58get_lower_bound(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":625 +/* "gedlibpy.pyx":633 * * * def get_forward_map(self, g, h) : # <<<<<<<<<<<<<< @@ -6435,11 +6437,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_61get_forward_map(PyObject *__pyx_v_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_forward_map", 1, 2, 2, 1); __PYX_ERR(0, 625, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_forward_map", 1, 2, 2, 1); __PYX_ERR(0, 633, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_forward_map") < 0)) __PYX_ERR(0, 625, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_forward_map") < 0)) __PYX_ERR(0, 633, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6452,7 +6454,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_61get_forward_map(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_forward_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 625, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_forward_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 633, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_forward_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6474,7 +6476,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_60get_forward_map(struct __pyx_obj_8 PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_forward_map", 0); - /* "gedlibpy.pyx":640 + /* "gedlibpy.pyx":648 * .. note:: I don't know how to connect the two map to reconstruct the adjacence matrix. Please come back when I know how it's work ! * """ * return self.c_env.getForwardMap(g, h) # <<<<<<<<<<<<<< @@ -6482,21 +6484,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_60get_forward_map(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getForwardMap(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 640, __pyx_L1_error) + __PYX_ERR(0, 648, __pyx_L1_error) } - __pyx_t_4 = __pyx_convert_vector_to_py_npy_uint64(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_vector_to_py_npy_uint64(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":625 + /* "gedlibpy.pyx":633 * * * def get_forward_map(self, g, h) : # <<<<<<<<<<<<<< @@ -6515,7 +6517,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_60get_forward_map(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":643 +/* "gedlibpy.pyx":651 * * * def get_backward_map(self, g, h) : # <<<<<<<<<<<<<< @@ -6555,11 +6557,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_63get_backward_map(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_backward_map", 1, 2, 2, 1); __PYX_ERR(0, 643, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_backward_map", 1, 2, 2, 1); __PYX_ERR(0, 651, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backward_map") < 0)) __PYX_ERR(0, 643, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_backward_map") < 0)) __PYX_ERR(0, 651, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6572,7 +6574,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_63get_backward_map(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_backward_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 643, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_backward_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 651, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_backward_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6594,7 +6596,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_62get_backward_map(struct __pyx_obj_ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_backward_map", 0); - /* "gedlibpy.pyx":658 + /* "gedlibpy.pyx":666 * .. note:: I don't know how to connect the two map to reconstruct the adjacence matrix. Please come back when I know how it's work ! * """ * return self.c_env.getBackwardMap(g, h) # <<<<<<<<<<<<<< @@ -6602,21 +6604,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_62get_backward_map(struct __pyx_obj_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getBackwardMap(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 658, __pyx_L1_error) + __PYX_ERR(0, 666, __pyx_L1_error) } - __pyx_t_4 = __pyx_convert_vector_to_py_npy_uint64(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_vector_to_py_npy_uint64(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":643 + /* "gedlibpy.pyx":651 * * * def get_backward_map(self, g, h) : # <<<<<<<<<<<<<< @@ -6635,7 +6637,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_62get_backward_map(struct __pyx_obj_ return __pyx_r; } -/* "gedlibpy.pyx":661 +/* "gedlibpy.pyx":669 * * * def get_node_image(self, g, h, node_id) : # <<<<<<<<<<<<<< @@ -6678,17 +6680,17 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_65get_node_image(PyObject *__pyx_v_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_node_image", 1, 3, 3, 1); __PYX_ERR(0, 661, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_image", 1, 3, 3, 1); __PYX_ERR(0, 669, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_node_image", 1, 3, 3, 2); __PYX_ERR(0, 661, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_image", 1, 3, 3, 2); __PYX_ERR(0, 669, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_image") < 0)) __PYX_ERR(0, 661, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_image") < 0)) __PYX_ERR(0, 669, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -6703,7 +6705,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_65get_node_image(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_node_image", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 661, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_image", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 669, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_node_image", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6726,7 +6728,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_64get_node_image(struct __pyx_obj_8g PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("get_node_image", 0); - /* "gedlibpy.pyx":679 + /* "gedlibpy.pyx":687 * * """ * return self.c_env.getNodeImage(g, h, node_id) # <<<<<<<<<<<<<< @@ -6734,22 +6736,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_64get_node_image(struct __pyx_obj_8g * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 679, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 679, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_node_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_node_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L1_error) try { __pyx_t_4 = __pyx_v_self->c_env->getNodeImage(__pyx_t_1, __pyx_t_2, __pyx_t_3); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 679, __pyx_L1_error) + __PYX_ERR(0, 687, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":661 + /* "gedlibpy.pyx":669 * * * def get_node_image(self, g, h, node_id) : # <<<<<<<<<<<<<< @@ -6768,7 +6770,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_64get_node_image(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":682 +/* "gedlibpy.pyx":690 * * * def get_node_pre_image(self, g, h, node_id) : # <<<<<<<<<<<<<< @@ -6811,17 +6813,17 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_67get_node_pre_image(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_node_pre_image", 1, 3, 3, 1); __PYX_ERR(0, 682, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_pre_image", 1, 3, 3, 1); __PYX_ERR(0, 690, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_node_pre_image", 1, 3, 3, 2); __PYX_ERR(0, 682, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_pre_image", 1, 3, 3, 2); __PYX_ERR(0, 690, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_pre_image") < 0)) __PYX_ERR(0, 682, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_pre_image") < 0)) __PYX_ERR(0, 690, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -6836,7 +6838,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_67get_node_pre_image(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_node_pre_image", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 682, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_pre_image", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 690, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_node_pre_image", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6859,7 +6861,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_66get_node_pre_image(struct __pyx_ob PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("get_node_pre_image", 0); - /* "gedlibpy.pyx":700 + /* "gedlibpy.pyx":708 * * """ * return self.c_env.getNodePreImage(g, h, node_id) # <<<<<<<<<<<<<< @@ -6867,22 +6869,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_66get_node_pre_image(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_node_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_node_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error) try { __pyx_t_4 = __pyx_v_self->c_env->getNodePreImage(__pyx_t_1, __pyx_t_2, __pyx_t_3); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 700, __pyx_L1_error) + __PYX_ERR(0, 708, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":682 + /* "gedlibpy.pyx":690 * * * def get_node_pre_image(self, g, h, node_id) : # <<<<<<<<<<<<<< @@ -6901,7 +6903,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_66get_node_pre_image(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":703 +/* "gedlibpy.pyx":711 * * * def get_induced_cost(self, g, h) : # <<<<<<<<<<<<<< @@ -6941,11 +6943,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_69get_induced_cost(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_induced_cost", 1, 2, 2, 1); __PYX_ERR(0, 703, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_induced_cost", 1, 2, 2, 1); __PYX_ERR(0, 711, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_induced_cost") < 0)) __PYX_ERR(0, 703, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_induced_cost") < 0)) __PYX_ERR(0, 711, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6958,7 +6960,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_69get_induced_cost(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_induced_cost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 703, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_induced_cost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 711, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_induced_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6980,7 +6982,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_68get_induced_cost(struct __pyx_obj_ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_induced_cost", 0); - /* "gedlibpy.pyx":719 + /* "gedlibpy.pyx":727 * * """ * return self.c_env.getInducedCost(g, h) # <<<<<<<<<<<<<< @@ -6988,21 +6990,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_68get_induced_cost(struct __pyx_obj_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getInducedCost(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 719, __pyx_L1_error) + __PYX_ERR(0, 727, __pyx_L1_error) } - __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":703 + /* "gedlibpy.pyx":711 * * * def get_induced_cost(self, g, h) : # <<<<<<<<<<<<<< @@ -7021,7 +7023,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_68get_induced_cost(struct __pyx_obj_ return __pyx_r; } -/* "gedlibpy.pyx":722 +/* "gedlibpy.pyx":730 * * * def get_node_map(self, g, h) : # <<<<<<<<<<<<<< @@ -7061,11 +7063,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_71get_node_map(PyObject *__pyx_v_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_node_map", 1, 2, 2, 1); __PYX_ERR(0, 722, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_map", 1, 2, 2, 1); __PYX_ERR(0, 730, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_map") < 0)) __PYX_ERR(0, 722, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_map") < 0)) __PYX_ERR(0, 730, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7078,7 +7080,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_71get_node_map(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_node_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 722, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 730, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7125,41 +7127,41 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged Py_ssize_t __pyx_t_17; __Pyx_RefNannySetupContext("get_node_map", 0); - /* "gedlibpy.pyx":737 + /* "gedlibpy.pyx":745 * .. note:: This function creates datas so use it if necessary, however you can understand how assignement works with this example. * """ * map_as_relation = self.c_env.getNodeMap(g, h) # <<<<<<<<<<<<<< * induced_cost = self.c_env.getInducedCost(g, h) # @todo: the C++ implementation for this function in GedLibBind.ipp re-call get_node_map() once more, this is not neccessary. * source_map = [item.first if item.first < len(map_as_relation) else np.inf for item in map_as_relation] # item.first < len(map_as_relation) is not exactly correct. */ - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getNodeMap(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 737, __pyx_L1_error) + __PYX_ERR(0, 745, __pyx_L1_error) } __pyx_v_map_as_relation = __pyx_t_3; - /* "gedlibpy.pyx":738 + /* "gedlibpy.pyx":746 * """ * map_as_relation = self.c_env.getNodeMap(g, h) * induced_cost = self.c_env.getInducedCost(g, h) # @todo: the C++ implementation for this function in GedLibBind.ipp re-call get_node_map() once more, this is not neccessary. # <<<<<<<<<<<<<< * source_map = [item.first if item.first < len(map_as_relation) else np.inf for item in map_as_relation] # item.first < len(map_as_relation) is not exactly correct. * # print(source_map) */ - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 738, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 738, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L1_error) try { __pyx_t_4 = __pyx_v_self->c_env->getInducedCost(__pyx_t_2, __pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 738, __pyx_L1_error) + __PYX_ERR(0, 746, __pyx_L1_error) } __pyx_v_induced_cost = __pyx_t_4; - /* "gedlibpy.pyx":739 + /* "gedlibpy.pyx":747 * map_as_relation = self.c_env.getNodeMap(g, h) * induced_cost = self.c_env.getInducedCost(g, h) # @todo: the C++ implementation for this function in GedLibBind.ipp re-call get_node_map() once more, this is not neccessary. * source_map = [item.first if item.first < len(map_as_relation) else np.inf for item in map_as_relation] # item.first < len(map_as_relation) is not exactly correct. # <<<<<<<<<<<<<< @@ -7167,7 +7169,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged * target_map = [item.second if item.second < len(map_as_relation) else np.inf for item in map_as_relation] */ { /* enter inner scope */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_v_map_as_relation.begin(); for (;;) { @@ -7175,32 +7177,32 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged __pyx_t_7 = *__pyx_t_6; ++__pyx_t_6; __pyx_8genexpr5__pyx_v_item = __pyx_t_7; - __pyx_t_9 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e___(__pyx_v_map_as_relation); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_9 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e___(__pyx_v_map_as_relation); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (((__pyx_8genexpr5__pyx_v_item.first < __pyx_t_10) != 0)) { - __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_8genexpr5__pyx_v_item.first); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_8genexpr5__pyx_v_item.first); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __pyx_t_9; __pyx_t_9 = 0; } else { - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 739, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = __pyx_t_11; __pyx_t_11 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 739, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } /* exit inner scope */ __pyx_v_source_map = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":741 + /* "gedlibpy.pyx":749 * source_map = [item.first if item.first < len(map_as_relation) else np.inf for item in map_as_relation] # item.first < len(map_as_relation) is not exactly correct. * # print(source_map) * target_map = [item.second if item.second < len(map_as_relation) else np.inf for item in map_as_relation] # <<<<<<<<<<<<<< @@ -7208,7 +7210,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged * num_node_source = len([item for item in source_map if item != np.inf]) */ { /* enter inner scope */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_v_map_as_relation.begin(); for (;;) { @@ -7216,32 +7218,32 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged __pyx_t_7 = *__pyx_t_6; ++__pyx_t_6; __pyx_8genexpr6__pyx_v_item = __pyx_t_7; - __pyx_t_11 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e___(__pyx_v_map_as_relation); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_11 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e___(__pyx_v_map_as_relation); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_10 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (((__pyx_8genexpr6__pyx_v_item.second < __pyx_t_10) != 0)) { - __pyx_t_11 = __Pyx_PyInt_FromSize_t(__pyx_8genexpr6__pyx_v_item.second); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_FromSize_t(__pyx_8genexpr6__pyx_v_item.second); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __pyx_t_11; __pyx_t_11 = 0; } else { - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_inf); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_inf); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __pyx_t_9; __pyx_t_9 = 0; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 741, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 749, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } /* exit inner scope */ __pyx_v_target_map = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":743 + /* "gedlibpy.pyx":751 * target_map = [item.second if item.second < len(map_as_relation) else np.inf for item in map_as_relation] * # print(target_map) * num_node_source = len([item for item in source_map if item != np.inf]) # <<<<<<<<<<<<<< @@ -7249,30 +7251,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged * num_node_target = len([item for item in target_map if item != np.inf]) */ { /* enter inner scope */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L9_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __pyx_v_source_map; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0; for (;;) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 743, __pyx_L9_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 751, __pyx_L9_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 743, __pyx_L9_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 751, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_item, __pyx_t_9); __pyx_t_9 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 743, __pyx_L9_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 751, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 743, __pyx_L9_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 751, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyObject_RichCompare(__pyx_8genexpr7__pyx_v_item, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 743, __pyx_L9_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_8genexpr7__pyx_v_item, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 751, __pyx_L9_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 743, __pyx_L9_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 751, __pyx_L9_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr7__pyx_v_item))) __PYX_ERR(0, 743, __pyx_L9_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr7__pyx_v_item))) __PYX_ERR(0, 751, __pyx_L9_error) } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -7283,11 +7285,11 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged goto __pyx_L1_error; __pyx_L13_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PyList_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 743, __pyx_L1_error) + __pyx_t_10 = PyList_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 751, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_num_node_source = __pyx_t_10; - /* "gedlibpy.pyx":745 + /* "gedlibpy.pyx":753 * num_node_source = len([item for item in source_map if item != np.inf]) * # print(num_node_source) * num_node_target = len([item for item in target_map if item != np.inf]) # <<<<<<<<<<<<<< @@ -7295,30 +7297,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged * */ { /* enter inner scope */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L16_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 753, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __pyx_v_target_map; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0; for (;;) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 745, __pyx_L16_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 753, __pyx_L16_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 745, __pyx_L16_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 753, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_item, __pyx_t_9); __pyx_t_9 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 745, __pyx_L16_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 753, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 745, __pyx_L16_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_inf); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 753, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyObject_RichCompare(__pyx_8genexpr8__pyx_v_item, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 745, __pyx_L16_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_8genexpr8__pyx_v_item, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 753, __pyx_L16_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 745, __pyx_L16_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 753, __pyx_L16_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr8__pyx_v_item))) __PYX_ERR(0, 745, __pyx_L16_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr8__pyx_v_item))) __PYX_ERR(0, 753, __pyx_L16_error) } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -7329,22 +7331,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged goto __pyx_L1_error; __pyx_L20_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PyList_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 745, __pyx_L1_error) + __pyx_t_10 = PyList_GET_SIZE(__pyx_t_5); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_num_node_target = __pyx_t_10; - /* "gedlibpy.pyx":748 + /* "gedlibpy.pyx":756 * # print(num_node_target) * * node_map = NodeMap(num_node_source, num_node_target) # <<<<<<<<<<<<<< * # print(node_map.get_forward_map(), node_map.get_backward_map()) * for i in range(len(source_map)): */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NodeMap); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 748, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_NodeMap); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_num_node_source); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_num_node_source); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_num_node_target); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_num_node_target); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = NULL; __pyx_t_14 = 0; @@ -7361,7 +7363,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_9, __pyx_t_11}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -7371,7 +7373,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_9, __pyx_t_11}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -7379,7 +7381,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged } else #endif { - __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL; @@ -7390,7 +7392,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_t_11); __pyx_t_9 = 0; __pyx_t_11 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } @@ -7398,30 +7400,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged __pyx_v_node_map = __pyx_t_5; __pyx_t_5 = 0; - /* "gedlibpy.pyx":750 + /* "gedlibpy.pyx":758 * node_map = NodeMap(num_node_source, num_node_target) * # print(node_map.get_forward_map(), node_map.get_backward_map()) * for i in range(len(source_map)): # <<<<<<<<<<<<<< * node_map.add_assignment(source_map[i], target_map[i]) * node_map.set_induced_cost(induced_cost) */ - __pyx_t_10 = PyList_GET_SIZE(__pyx_v_source_map); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_t_10 = PyList_GET_SIZE(__pyx_v_source_map); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 758, __pyx_L1_error) __pyx_t_16 = __pyx_t_10; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "gedlibpy.pyx":751 + /* "gedlibpy.pyx":759 * # print(node_map.get_forward_map(), node_map.get_backward_map()) * for i in range(len(source_map)): * node_map.add_assignment(source_map[i], target_map[i]) # <<<<<<<<<<<<<< * node_map.set_induced_cost(induced_cost) * */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_add_assignment); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_add_assignment); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_source_map, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_v_source_map, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_target_map, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_target_map, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = NULL; __pyx_t_14 = 0; @@ -7438,7 +7440,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_15, __pyx_t_11}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -7448,7 +7450,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_15, __pyx_t_11}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -7456,7 +7458,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged } else #endif { - __pyx_t_13 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -7467,7 +7469,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_14, __pyx_t_11); __pyx_t_15 = 0; __pyx_t_11 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -7475,16 +7477,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - /* "gedlibpy.pyx":752 + /* "gedlibpy.pyx":760 * for i in range(len(source_map)): * node_map.add_assignment(source_map[i], target_map[i]) * node_map.set_induced_cost(induced_cost) # <<<<<<<<<<<<<< * * return node_map */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_set_induced_cost); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_set_induced_cost); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = PyFloat_FromDouble(__pyx_v_induced_cost); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_13 = PyFloat_FromDouble(__pyx_v_induced_cost); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -7499,12 +7501,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged __pyx_t_5 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_11, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_13); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 752, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":754 + /* "gedlibpy.pyx":762 * node_map.set_induced_cost(induced_cost) * * return node_map # <<<<<<<<<<<<<< @@ -7516,7 +7518,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged __pyx_r = __pyx_v_node_map; goto __pyx_L0; - /* "gedlibpy.pyx":722 + /* "gedlibpy.pyx":730 * * * def get_node_map(self, g, h) : # <<<<<<<<<<<<<< @@ -7545,7 +7547,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_70get_node_map(struct __pyx_obj_8ged return __pyx_r; } -/* "gedlibpy.pyx":757 +/* "gedlibpy.pyx":765 * * * def get_assignment_matrix(self, g, h) : # <<<<<<<<<<<<<< @@ -7585,11 +7587,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_73get_assignment_matrix(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_assignment_matrix", 1, 2, 2, 1); __PYX_ERR(0, 757, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_assignment_matrix", 1, 2, 2, 1); __PYX_ERR(0, 765, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_assignment_matrix") < 0)) __PYX_ERR(0, 757, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_assignment_matrix") < 0)) __PYX_ERR(0, 765, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7602,7 +7604,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_73get_assignment_matrix(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_assignment_matrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 757, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_assignment_matrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 765, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_assignment_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7624,7 +7626,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_72get_assignment_matrix(struct __pyx PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_assignment_matrix", 0); - /* "gedlibpy.pyx":772 + /* "gedlibpy.pyx":780 * .. note:: This function creates datas so use it if necessary. * """ * return self.c_env.getAssignmentMatrix(g, h) # <<<<<<<<<<<<<< @@ -7632,21 +7634,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_72get_assignment_matrix(struct __pyx * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getAssignmentMatrix(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 772, __pyx_L1_error) + __PYX_ERR(0, 780, __pyx_L1_error) } - __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_int_3e___(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_int_3e___(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":757 + /* "gedlibpy.pyx":765 * * * def get_assignment_matrix(self, g, h) : # <<<<<<<<<<<<<< @@ -7665,7 +7667,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_72get_assignment_matrix(struct __pyx return __pyx_r; } -/* "gedlibpy.pyx":775 +/* "gedlibpy.pyx":783 * * * def get_all_map(self, g, h) : # <<<<<<<<<<<<<< @@ -7705,11 +7707,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_75get_all_map(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_map", 1, 2, 2, 1); __PYX_ERR(0, 775, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_all_map", 1, 2, 2, 1); __PYX_ERR(0, 783, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_all_map") < 0)) __PYX_ERR(0, 775, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_all_map") < 0)) __PYX_ERR(0, 783, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7722,7 +7724,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_75get_all_map(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_all_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 775, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_all_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 783, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_all_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7744,7 +7746,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_74get_all_map(struct __pyx_obj_8gedl PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_all_map", 0); - /* "gedlibpy.pyx":790 + /* "gedlibpy.pyx":798 * .. note:: This function duplicates data so please don't use it. I also don't know how to connect the two map to reconstruct the adjacence matrix. Please come back when I know how it's work ! * """ * return self.c_env.getAllMap(g, h) # <<<<<<<<<<<<<< @@ -7752,21 +7754,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_74get_all_map(struct __pyx_obj_8gedl * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getAllMap(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 790, __pyx_L1_error) + __PYX_ERR(0, 798, __pyx_L1_error) } - __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_npy_uint64_3e___(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_npy_uint64_3e___(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":775 + /* "gedlibpy.pyx":783 * * * def get_all_map(self, g, h) : # <<<<<<<<<<<<<< @@ -7785,7 +7787,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_74get_all_map(struct __pyx_obj_8gedl return __pyx_r; } -/* "gedlibpy.pyx":793 +/* "gedlibpy.pyx":801 * * * def get_runtime(self, g, h) : # <<<<<<<<<<<<<< @@ -7825,11 +7827,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_77get_runtime(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_runtime", 1, 2, 2, 1); __PYX_ERR(0, 793, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_runtime", 1, 2, 2, 1); __PYX_ERR(0, 801, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_runtime") < 0)) __PYX_ERR(0, 793, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_runtime") < 0)) __PYX_ERR(0, 801, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7842,7 +7844,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_77get_runtime(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_runtime", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 793, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_runtime", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 801, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_runtime", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7864,7 +7866,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_76get_runtime(struct __pyx_obj_8gedl PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("get_runtime", 0); - /* "gedlibpy.pyx":808 + /* "gedlibpy.pyx":816 * .. note:: Python is a bit longer than C++ due to the functions's encapsulate. * """ * return self.c_env.getRuntime(g,h) # <<<<<<<<<<<<<< @@ -7872,21 +7874,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_76get_runtime(struct __pyx_obj_8gedl * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_g); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_h); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L1_error) try { __pyx_t_3 = __pyx_v_self->c_env->getRuntime(__pyx_t_1, __pyx_t_2); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 808, __pyx_L1_error) + __PYX_ERR(0, 816, __pyx_L1_error) } - __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":793 + /* "gedlibpy.pyx":801 * * * def get_runtime(self, g, h) : # <<<<<<<<<<<<<< @@ -7905,7 +7907,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_76get_runtime(struct __pyx_obj_8gedl return __pyx_r; } -/* "gedlibpy.pyx":811 +/* "gedlibpy.pyx":819 * * * def quasimetric_cost(self) : # <<<<<<<<<<<<<< @@ -7934,7 +7936,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_78quasimetric_cost(struct __pyx_obj_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("quasimetric_cost", 0); - /* "gedlibpy.pyx":825 + /* "gedlibpy.pyx":833 * .. warning:: run_method() between the same two graph must be called before this function. * """ * return self.c_env.quasimetricCosts() # <<<<<<<<<<<<<< @@ -7946,15 +7948,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_78quasimetric_cost(struct __pyx_obj_ __pyx_t_1 = __pyx_v_self->c_env->quasimetricCosts(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 825, __pyx_L1_error) + __PYX_ERR(0, 833, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":811 + /* "gedlibpy.pyx":819 * * * def quasimetric_cost(self) : # <<<<<<<<<<<<<< @@ -7973,7 +7975,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_78quasimetric_cost(struct __pyx_obj_ return __pyx_r; } -/* "gedlibpy.pyx":828 +/* "gedlibpy.pyx":836 * * * def hungarian_LSAP(self, matrix_cost) : # <<<<<<<<<<<<<< @@ -8003,7 +8005,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_80hungarian_LSAP(struct __pyx_obj_8g PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("hungarian_LSAP", 0); - /* "gedlibpy.pyx":839 + /* "gedlibpy.pyx":847 * .. seealso:: hungarian_LSAPE() * """ * return self.c_env.hungarianLSAP(matrix_cost) # <<<<<<<<<<<<<< @@ -8011,20 +8013,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_80hungarian_LSAP(struct __pyx_obj_8g * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_size_t_3e___(__pyx_v_matrix_cost); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_size_t_3e___(__pyx_v_matrix_cost); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->hungarianLSAP(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 839, __pyx_L1_error) + __PYX_ERR(0, 847, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_size_t_3e___(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_size_t_3e___(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":828 + /* "gedlibpy.pyx":836 * * * def hungarian_LSAP(self, matrix_cost) : # <<<<<<<<<<<<<< @@ -8043,7 +8045,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_80hungarian_LSAP(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":842 +/* "gedlibpy.pyx":850 * * * def hungarian_LSAPE(self, matrix_cost) : # <<<<<<<<<<<<<< @@ -8073,7 +8075,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_82hungarian_LSAPE(struct __pyx_obj_8 PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("hungarian_LSAPE", 0); - /* "gedlibpy.pyx":853 + /* "gedlibpy.pyx":861 * .. seealso:: hungarian_LSAP() * """ * return self.c_env.hungarianLSAPE(matrix_cost) # <<<<<<<<<<<<<< @@ -8081,20 +8083,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_82hungarian_LSAPE(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(__pyx_v_matrix_cost); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_1 = __pyx_convert_vector_from_py_std_3a__3a_vector_3c_double_3e___(__pyx_v_matrix_cost); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error) try { __pyx_t_2 = __pyx_v_self->c_env->hungarianLSAPE(__pyx_t_1); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 853, __pyx_L1_error) + __PYX_ERR(0, 861, __pyx_L1_error) } - __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_3 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_double_3e___(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":842 + /* "gedlibpy.pyx":850 * * * def hungarian_LSAPE(self, matrix_cost) : # <<<<<<<<<<<<<< @@ -8113,7 +8115,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_82hungarian_LSAPE(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":856 +/* "gedlibpy.pyx":864 * * * def add_random_graph(self, name, classe, list_of_nodes, list_of_edges, ignore_duplicates=True) : # <<<<<<<<<<<<<< @@ -8163,19 +8165,19 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_85add_random_graph(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classe)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, 1); __PYX_ERR(0, 856, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, 1); __PYX_ERR(0, 864, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_list_of_nodes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, 2); __PYX_ERR(0, 856, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, 2); __PYX_ERR(0, 864, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_list_of_edges)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, 3); __PYX_ERR(0, 856, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, 3); __PYX_ERR(0, 864, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -8185,7 +8187,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_85add_random_graph(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_random_graph") < 0)) __PYX_ERR(0, 856, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_random_graph") < 0)) __PYX_ERR(0, 864, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8207,7 +8209,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_85add_random_graph(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 856, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_random_graph", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 864, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.add_random_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8239,14 +8241,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("add_random_graph", 0); - /* "gedlibpy.pyx":876 + /* "gedlibpy.pyx":884 * * """ * id = self.add_graph(name, classe) # <<<<<<<<<<<<<< * for node in list_of_nodes: * self.add_node(id, node[0], node[1]) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8263,7 +8265,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_classe}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8271,13 +8273,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_classe}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -8288,7 +8290,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __Pyx_INCREF(__pyx_v_classe); __Pyx_GIVEREF(__pyx_v_classe); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_classe); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -8296,7 +8298,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __pyx_v_id = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":877 + /* "gedlibpy.pyx":885 * """ * id = self.add_graph(name, classe) * for node in list_of_nodes: # <<<<<<<<<<<<<< @@ -8307,26 +8309,26 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __pyx_t_1 = __pyx_v_list_of_nodes; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_list_of_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_list_of_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 885, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 885, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 885, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -8336,7 +8338,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 877, __pyx_L1_error) + else __PYX_ERR(0, 885, __pyx_L1_error) } break; } @@ -8345,18 +8347,18 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":878 + /* "gedlibpy.pyx":886 * id = self.add_graph(name, classe) * for node in list_of_nodes: * self.add_node(id, node[0], node[1]) # <<<<<<<<<<<<<< * for edge in list_of_edges: * self.add_edge(id, edge[0], edge[1], edge[2], ignore_duplicates) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_node); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_node); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_node, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_node, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_4 = 0; @@ -8373,7 +8375,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_id, __pyx_t_3, __pyx_t_8}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8383,7 +8385,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_id, __pyx_t_3, __pyx_t_8}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8391,7 +8393,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ } else #endif { - __pyx_t_10 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -8405,14 +8407,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_4, __pyx_t_8); __pyx_t_3 = 0; __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":877 + /* "gedlibpy.pyx":885 * """ * id = self.add_graph(name, classe) * for node in list_of_nodes: # <<<<<<<<<<<<<< @@ -8422,7 +8424,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":879 + /* "gedlibpy.pyx":887 * for node in list_of_nodes: * self.add_node(id, node[0], node[1]) * for edge in list_of_edges: # <<<<<<<<<<<<<< @@ -8433,26 +8435,26 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __pyx_t_1 = __pyx_v_list_of_edges; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_list_of_edges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_list_of_edges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 887, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 887, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 887, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -8462,7 +8464,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 879, __pyx_L1_error) + else __PYX_ERR(0, 887, __pyx_L1_error) } break; } @@ -8471,20 +8473,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_edge, __pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":880 + /* "gedlibpy.pyx":888 * self.add_node(id, node[0], node[1]) * for edge in list_of_edges: * self.add_edge(id, edge[0], edge[1], edge[2], ignore_duplicates) # <<<<<<<<<<<<<< * return id * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_edge); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_edge); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_edge, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_edge, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; __pyx_t_4 = 0; @@ -8501,7 +8503,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_9, __pyx_v_id, __pyx_t_10, __pyx_t_8, __pyx_t_3, __pyx_v_ignore_duplicates}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -8512,7 +8514,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_9, __pyx_v_id, __pyx_t_10, __pyx_t_8, __pyx_t_3, __pyx_v_ignore_duplicates}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 5+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -8521,7 +8523,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ } else #endif { - __pyx_t_11 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(5+__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -8541,14 +8543,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":879 + /* "gedlibpy.pyx":887 * for node in list_of_nodes: * self.add_node(id, node[0], node[1]) * for edge in list_of_edges: # <<<<<<<<<<<<<< @@ -8558,7 +8560,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":881 + /* "gedlibpy.pyx":889 * for edge in list_of_edges: * self.add_edge(id, edge[0], edge[1], edge[2], ignore_duplicates) * return id # <<<<<<<<<<<<<< @@ -8570,7 +8572,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ __pyx_r = __pyx_v_id; goto __pyx_L0; - /* "gedlibpy.pyx":856 + /* "gedlibpy.pyx":864 * * * def add_random_graph(self, name, classe, list_of_nodes, list_of_edges, ignore_duplicates=True) : # <<<<<<<<<<<<<< @@ -8599,7 +8601,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_84add_random_graph(struct __pyx_obj_ return __pyx_r; } -/* "gedlibpy.pyx":884 +/* "gedlibpy.pyx":892 * * * def add_nx_graph(self, g, classe, ignore_duplicates=True) : # <<<<<<<<<<<<<< @@ -8643,7 +8645,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_87add_nx_graph(PyObject *__pyx_v_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classe)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_nx_graph", 0, 2, 3, 1); __PYX_ERR(0, 884, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_nx_graph", 0, 2, 3, 1); __PYX_ERR(0, 892, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -8653,7 +8655,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_87add_nx_graph(PyObject *__pyx_v_sel } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_nx_graph") < 0)) __PYX_ERR(0, 884, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_nx_graph") < 0)) __PYX_ERR(0, 892, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8671,7 +8673,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_87add_nx_graph(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_nx_graph", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 884, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_nx_graph", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 892, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.add_nx_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -8706,16 +8708,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("add_nx_graph", 0); - /* "gedlibpy.pyx":898 + /* "gedlibpy.pyx":906 * * """ * id = self.add_graph(g.name, classe) # <<<<<<<<<<<<<< * for node in g.nodes: * self.add_node(id, str(node), g.nodes[node]) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -8732,7 +8734,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_classe}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8741,14 +8743,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_classe}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -8759,7 +8761,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged __Pyx_GIVEREF(__pyx_v_classe); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_classe); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -8767,22 +8769,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged __pyx_v_id = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":899 + /* "gedlibpy.pyx":907 * """ * id = self.add_graph(g.name, classe) * for node in g.nodes: # <<<<<<<<<<<<<< * self.add_node(id, str(node), g.nodes[node]) * for edge in g.edges: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8790,17 +8792,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 907, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 907, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -8810,7 +8812,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 899, __pyx_L1_error) + else __PYX_ERR(0, 907, __pyx_L1_error) } break; } @@ -8819,20 +8821,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":900 + /* "gedlibpy.pyx":908 * id = self.add_graph(g.name, classe) * for node in g.nodes: * self.add_node(id, str(node), g.nodes[node]) # <<<<<<<<<<<<<< * for edge in g.edges: * self.add_edge(id, str(edge[0]), str(edge[1]), g.get_edge_data(edge[0], edge[1]), ignore_duplicates) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -8850,7 +8852,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_id, __pyx_t_3, __pyx_t_9}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8860,7 +8862,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_id, __pyx_t_3, __pyx_t_9}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8868,7 +8870,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged } else #endif { - __pyx_t_10 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -8882,14 +8884,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_5, __pyx_t_9); __pyx_t_3 = 0; __pyx_t_9 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":899 + /* "gedlibpy.pyx":907 * """ * id = self.add_graph(g.name, classe) * for node in g.nodes: # <<<<<<<<<<<<<< @@ -8899,22 +8901,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":901 + /* "gedlibpy.pyx":909 * for node in g.nodes: * self.add_node(id, str(node), g.nodes[node]) * for edge in g.edges: # <<<<<<<<<<<<<< * self.add_edge(id, str(edge[0]), str(edge[1]), g.get_edge_data(edge[0], edge[1]), ignore_duplicates) * return id */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_edges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_edges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -8922,17 +8924,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 909, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 909, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -8942,7 +8944,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 901, __pyx_L1_error) + else __PYX_ERR(0, 909, __pyx_L1_error) } break; } @@ -8951,30 +8953,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged __Pyx_XDECREF_SET(__pyx_v_edge, __pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":902 + /* "gedlibpy.pyx":910 * self.add_node(id, str(node), g.nodes[node]) * for edge in g.edges: * self.add_edge(id, str(edge[0]), str(edge[1]), g.get_edge_data(edge[0], edge[1]), ignore_duplicates) # <<<<<<<<<<<<<< * return id * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_edge); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_edge); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_get_edge_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_get_edge_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; __pyx_t_5 = 0; @@ -8991,7 +8993,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_11, __pyx_t_12}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -9001,7 +9003,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_t_11, __pyx_t_12}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -9009,7 +9011,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged } else #endif { - __pyx_t_14 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; @@ -9020,7 +9022,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_5, __pyx_t_12); __pyx_t_11 = 0; __pyx_t_12 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } @@ -9040,7 +9042,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_id, __pyx_t_9, __pyx_t_3, __pyx_t_10, __pyx_v_ignore_duplicates}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -9051,7 +9053,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[6] = {__pyx_t_4, __pyx_v_id, __pyx_t_9, __pyx_t_3, __pyx_t_10, __pyx_v_ignore_duplicates}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 5+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -9060,7 +9062,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged } else #endif { - __pyx_t_14 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(5+__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -9080,14 +9082,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":901 + /* "gedlibpy.pyx":909 * for node in g.nodes: * self.add_node(id, str(node), g.nodes[node]) * for edge in g.edges: # <<<<<<<<<<<<<< @@ -9097,7 +9099,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":903 + /* "gedlibpy.pyx":911 * for edge in g.edges: * self.add_edge(id, str(edge[0]), str(edge[1]), g.get_edge_data(edge[0], edge[1]), ignore_duplicates) * return id # <<<<<<<<<<<<<< @@ -9109,7 +9111,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged __pyx_r = __pyx_v_id; goto __pyx_L0; - /* "gedlibpy.pyx":884 + /* "gedlibpy.pyx":892 * * * def add_nx_graph(self, g, classe, ignore_duplicates=True) : # <<<<<<<<<<<<<< @@ -9141,7 +9143,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_86add_nx_graph(struct __pyx_obj_8ged return __pyx_r; } -/* "gedlibpy.pyx":906 +/* "gedlibpy.pyx":914 * * * def compute_ged_on_two_graphs(self, g1, g2, edit_cost, method, options, init_option="EAGER_WITHOUT_SHUFFLED_COPIES") : # <<<<<<<<<<<<<< @@ -9194,25 +9196,25 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_89compute_ged_on_two_graphs(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 1); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 1); __PYX_ERR(0, 914, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edit_cost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 2); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 2); __PYX_ERR(0, 914, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 3); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 3); __PYX_ERR(0, 914, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 4); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, 4); __PYX_ERR(0, 914, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: @@ -9222,7 +9224,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_89compute_ged_on_two_graphs(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_ged_on_two_graphs") < 0)) __PYX_ERR(0, 906, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_ged_on_two_graphs") < 0)) __PYX_ERR(0, 914, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9246,7 +9248,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_89compute_ged_on_two_graphs(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 906, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_ged_on_two_graphs", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 914, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.compute_ged_on_two_graphs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9274,14 +9276,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("compute_ged_on_two_graphs", 0); - /* "gedlibpy.pyx":929 + /* "gedlibpy.pyx":937 * * """ * if self.is_initialized() : # <<<<<<<<<<<<<< * self.restart_env() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9295,21 +9297,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "gedlibpy.pyx":930 + /* "gedlibpy.pyx":938 * """ * if self.is_initialized() : * self.restart_env() # <<<<<<<<<<<<<< * * g = self.add_nx_graph(g1, "") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_restart_env); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_restart_env); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9323,12 +9325,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":929 + /* "gedlibpy.pyx":937 * * """ * if self.is_initialized() : # <<<<<<<<<<<<<< @@ -9337,14 +9339,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ */ } - /* "gedlibpy.pyx":932 + /* "gedlibpy.pyx":940 * self.restart_env() * * g = self.add_nx_graph(g1, "") # <<<<<<<<<<<<<< * h = self.add_nx_graph(g2, "") * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_nx_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_nx_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -9361,7 +9363,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_g1, __pyx_kp_u_}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9369,13 +9371,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_g1, __pyx_kp_u_}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -9386,7 +9388,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_kp_u_); __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_kp_u_); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -9394,14 +9396,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __pyx_v_g = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":933 + /* "gedlibpy.pyx":941 * * g = self.add_nx_graph(g1, "") * h = self.add_nx_graph(g2, "") # <<<<<<<<<<<<<< * * self.set_edit_cost(edit_cost) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_nx_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_nx_graph); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_5 = 0; @@ -9418,7 +9420,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_g2, __pyx_kp_u_}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9426,13 +9428,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_g2, __pyx_kp_u_}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -9443,7 +9445,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_kp_u_); __Pyx_GIVEREF(__pyx_kp_u_); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_kp_u_); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -9451,14 +9453,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __pyx_v_h = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":935 + /* "gedlibpy.pyx":943 * h = self.add_nx_graph(g2, "") * * self.set_edit_cost(edit_cost) # <<<<<<<<<<<<<< * self.init(init_option) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_edit_cost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_edit_cost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9472,19 +9474,19 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_edit_cost) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_edit_cost); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":936 + /* "gedlibpy.pyx":944 * * self.set_edit_cost(edit_cost) * self.init(init_option) # <<<<<<<<<<<<<< * * self.set_method(method, options) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9498,19 +9500,19 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_init_option) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_init_option); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":938 + /* "gedlibpy.pyx":946 * self.init(init_option) * * self.set_method(method, options) # <<<<<<<<<<<<<< * self.init_method() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -9527,7 +9529,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_method, __pyx_v_options}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9535,13 +9537,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_method, __pyx_v_options}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -9552,21 +9554,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_options); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":939 + /* "gedlibpy.pyx":947 * * self.set_method(method, options) * self.init_method() # <<<<<<<<<<<<<< * * resDistance = 0 */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9580,12 +9582,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":941 + /* "gedlibpy.pyx":949 * self.init_method() * * resDistance = 0 # <<<<<<<<<<<<<< @@ -9595,26 +9597,26 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_int_0); __pyx_v_resDistance = __pyx_int_0; - /* "gedlibpy.pyx":942 + /* "gedlibpy.pyx":950 * * resDistance = 0 * resMapping = [] # <<<<<<<<<<<<<< * self.run_method(g, h) * resDistance = self.get_upper_bound(g, h) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_resMapping = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":943 + /* "gedlibpy.pyx":951 * resDistance = 0 * resMapping = [] * self.run_method(g, h) # <<<<<<<<<<<<<< * resDistance = self.get_upper_bound(g, h) * resMapping = self.get_node_map(g, h) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_5 = 0; @@ -9631,7 +9633,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9639,13 +9641,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -9656,21 +9658,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":944 + /* "gedlibpy.pyx":952 * resMapping = [] * self.run_method(g, h) * resDistance = self.get_upper_bound(g, h) # <<<<<<<<<<<<<< * resMapping = self.get_node_map(g, h) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_upper_bound); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_upper_bound); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -9687,7 +9689,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9695,13 +9697,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -9712,7 +9714,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -9720,14 +9722,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_DECREF_SET(__pyx_v_resDistance, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":945 + /* "gedlibpy.pyx":953 * self.run_method(g, h) * resDistance = self.get_upper_bound(g, h) * resMapping = self.get_node_map(g, h) # <<<<<<<<<<<<<< * * return resDistance, resMapping */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_node_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_node_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; __pyx_t_5 = 0; @@ -9744,7 +9746,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -9752,13 +9754,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -9769,7 +9771,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -9777,7 +9779,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __Pyx_DECREF_SET(__pyx_v_resMapping, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":947 + /* "gedlibpy.pyx":955 * resMapping = self.get_node_map(g, h) * * return resDistance, resMapping # <<<<<<<<<<<<<< @@ -9785,7 +9787,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_resDistance); __Pyx_GIVEREF(__pyx_v_resDistance); @@ -9797,7 +9799,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":906 + /* "gedlibpy.pyx":914 * * * def compute_ged_on_two_graphs(self, g1, g2, edit_cost, method, options, init_option="EAGER_WITHOUT_SHUFFLED_COPIES") : # <<<<<<<<<<<<<< @@ -9823,7 +9825,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_88compute_ged_on_two_graphs(struct _ return __pyx_r; } -/* "gedlibpy.pyx":950 +/* "gedlibpy.pyx":958 * * * def compute_edit_distance_on_nx_graphs(self, dataset, classes, edit_cost, method, options, init_option="EAGER_WITHOUT_SHUFFLED_COPIES") : # <<<<<<<<<<<<<< @@ -9876,25 +9878,25 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_91compute_edit_distance_on_nx_graphs case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_classes)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 1); __PYX_ERR(0, 950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 1); __PYX_ERR(0, 958, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edit_cost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 2); __PYX_ERR(0, 950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 2); __PYX_ERR(0, 958, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 3); __PYX_ERR(0, 950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 3); __PYX_ERR(0, 958, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_options)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 4); __PYX_ERR(0, 950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, 4); __PYX_ERR(0, 958, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: @@ -9904,7 +9906,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_91compute_edit_distance_on_nx_graphs } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_edit_distance_on_nx_graphs") < 0)) __PYX_ERR(0, 950, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_edit_distance_on_nx_graphs") < 0)) __PYX_ERR(0, 958, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9928,7 +9930,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_91compute_edit_distance_on_nx_graphs } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_nx_graphs", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 958, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.compute_edit_distance_on_nx_graphs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -9964,14 +9966,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("compute_edit_distance_on_nx_graphs", 0); - /* "gedlibpy.pyx":974 + /* "gedlibpy.pyx":982 * * """ * if self.is_initialized() : # <<<<<<<<<<<<<< * self.restart_env() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9985,21 +9987,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "gedlibpy.pyx":975 + /* "gedlibpy.pyx":983 * """ * if self.is_initialized() : * self.restart_env() # <<<<<<<<<<<<<< * * print("Loading graphs in progress...") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_restart_env); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_restart_env); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10013,12 +10015,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":974 + /* "gedlibpy.pyx":982 * * """ * if self.is_initialized() : # <<<<<<<<<<<<<< @@ -10027,18 +10029,18 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs */ } - /* "gedlibpy.pyx":977 + /* "gedlibpy.pyx":985 * self.restart_env() * * print("Loading graphs in progress...") # <<<<<<<<<<<<<< * for graph in dataset : * self.add_nx_graph(graph, classes) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":978 + /* "gedlibpy.pyx":986 * * print("Loading graphs in progress...") * for graph in dataset : # <<<<<<<<<<<<<< @@ -10049,26 +10051,26 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __pyx_t_1 = __pyx_v_dataset; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 986, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 986, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 986, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -10078,7 +10080,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 978, __pyx_L1_error) + else __PYX_ERR(0, 986, __pyx_L1_error) } break; } @@ -10087,14 +10089,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_XDECREF_SET(__pyx_v_graph, __pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":979 + /* "gedlibpy.pyx":987 * print("Loading graphs in progress...") * for graph in dataset : * self.add_nx_graph(graph, classes) # <<<<<<<<<<<<<< * listID = self.graph_ids() * print("Graphs loaded ! ") */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_nx_graph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_nx_graph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -10111,7 +10113,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_graph, __pyx_v_classes}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -10119,13 +10121,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_graph, __pyx_v_classes}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -10136,14 +10138,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_INCREF(__pyx_v_classes); __Pyx_GIVEREF(__pyx_v_classes); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_classes); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":978 + /* "gedlibpy.pyx":986 * * print("Loading graphs in progress...") * for graph in dataset : # <<<<<<<<<<<<<< @@ -10153,14 +10155,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":980 + /* "gedlibpy.pyx":988 * for graph in dataset : * self.add_nx_graph(graph, classes) * listID = self.graph_ids() # <<<<<<<<<<<<<< * print("Graphs loaded ! ") * print("Number of graphs = " + str(listID[1])) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_graph_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_graph_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10174,51 +10176,51 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_listID = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":981 + /* "gedlibpy.pyx":989 * self.add_nx_graph(graph, classes) * listID = self.graph_ids() * print("Graphs loaded ! ") # <<<<<<<<<<<<<< * print("Number of graphs = " + str(listID[1])) * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":982 + /* "gedlibpy.pyx":990 * listID = self.graph_ids() * print("Graphs loaded ! ") * print("Number of graphs = " + str(listID[1])) # <<<<<<<<<<<<<< * * self.set_edit_cost(edit_cost) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Number_of_graphs, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Number_of_graphs, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":984 + /* "gedlibpy.pyx":992 * print("Number of graphs = " + str(listID[1])) * * self.set_edit_cost(edit_cost) # <<<<<<<<<<<<<< * print("Initialization in progress...") * self.init(init_option) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_edit_cost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_edit_cost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -10232,30 +10234,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_edit_cost) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_edit_cost); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":985 + /* "gedlibpy.pyx":993 * * self.set_edit_cost(edit_cost) * print("Initialization in progress...") # <<<<<<<<<<<<<< * self.init(init_option) * print("Initialization terminated !") */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":986 + /* "gedlibpy.pyx":994 * self.set_edit_cost(edit_cost) * print("Initialization in progress...") * self.init(init_option) # <<<<<<<<<<<<<< * print("Initialization terminated !") * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -10269,30 +10271,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_init_option) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_init_option); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":987 + /* "gedlibpy.pyx":995 * print("Initialization in progress...") * self.init(init_option) * print("Initialization terminated !") # <<<<<<<<<<<<<< * * self.set_method(method, options) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":989 + /* "gedlibpy.pyx":997 * print("Initialization terminated !") * * self.set_method(method, options) # <<<<<<<<<<<<<< * self.init_method() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_8 = 0; @@ -10309,7 +10311,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_method, __pyx_v_options}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -10317,13 +10319,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_method, __pyx_v_options}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -10334,21 +10336,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_INCREF(__pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_options); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":990 + /* "gedlibpy.pyx":998 * * self.set_method(method, options) * self.init_method() # <<<<<<<<<<<<<< * * resDistance = [[]] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -10362,21 +10364,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":992 + /* "gedlibpy.pyx":1000 * self.init_method() * * resDistance = [[]] # <<<<<<<<<<<<<< * resMapping = [[]] * for g in range(listID[0], listID[1]) : */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); @@ -10384,16 +10386,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __pyx_v_resDistance = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":993 + /* "gedlibpy.pyx":1001 * * resDistance = [[]] * resMapping = [[]] # <<<<<<<<<<<<<< * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -10401,18 +10403,18 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __pyx_v_resMapping = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":994 + /* "gedlibpy.pyx":1002 * resDistance = [[]] * resMapping = [[]] * for g in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< * print("Computation between graph " + str(g) + " with all the others including himself.") * for h in range(listID[0], listID[1]) : */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); @@ -10420,16 +10422,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1002, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -10437,17 +10439,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs if (likely(PyList_CheckExact(__pyx_t_9))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1002, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1002, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -10457,7 +10459,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 994, __pyx_L1_error) + else __PYX_ERR(0, 1002, __pyx_L1_error) } break; } @@ -10466,38 +10468,38 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":995 + /* "gedlibpy.pyx":1003 * resMapping = [[]] * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") # <<<<<<<<<<<<<< * for h in range(listID[0], listID[1]) : * #print("Computation between graph " + str(g) + " and graph " + str(h)) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Computation_between_graph, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Computation_between_graph, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_with_all_the_others_including_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_with_all_the_others_including_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":996 + /* "gedlibpy.pyx":1004 * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") * for h in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< * #print("Computation between graph " + str(g) + " and graph " + str(h)) * self.run_method(g, h) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -10505,16 +10507,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1004, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -10522,17 +10524,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1004, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1004, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -10542,7 +10544,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 996, __pyx_L1_error) + else __PYX_ERR(0, 1004, __pyx_L1_error) } break; } @@ -10551,14 +10553,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":998 + /* "gedlibpy.pyx":1006 * for h in range(listID[0], listID[1]) : * #print("Computation between graph " + str(g) + " and graph " + str(h)) * self.run_method(g, h) # <<<<<<<<<<<<<< * resDistance[g][h] = self.get_upper_bound(g, h) * resMapping[g][h] = self.get_node_map(g, h) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -10575,7 +10577,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10583,13 +10585,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -10600,21 +10602,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":999 + /* "gedlibpy.pyx":1007 * #print("Computation between graph " + str(g) + " and graph " + str(h)) * self.run_method(g, h) * resDistance[g][h] = self.get_upper_bound(g, h) # <<<<<<<<<<<<<< * resMapping[g][h] = self.get_node_map(g, h) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_upper_bound); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_upper_bound); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = NULL; __pyx_t_8 = 0; @@ -10631,7 +10633,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10639,13 +10641,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_12); __pyx_t_12 = NULL; @@ -10656,25 +10658,25 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_resDistance, __pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_resDistance, __pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_h, __pyx_t_1) < 0)) __PYX_ERR(0, 999, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_h, __pyx_t_1) < 0)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1000 + /* "gedlibpy.pyx":1008 * self.run_method(g, h) * resDistance[g][h] = self.get_upper_bound(g, h) * resMapping[g][h] = self.get_node_map(g, h) # <<<<<<<<<<<<<< * * print("Finish ! The return contains edit distances and NodeMap but you can check the result with graphs'ID until you restart the environment") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_node_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_node_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; @@ -10691,7 +10693,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -10699,13 +10701,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -10716,18 +10718,18 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_resMapping, __pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_resMapping, __pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_h, __pyx_t_1) < 0)) __PYX_ERR(0, 1000, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_h, __pyx_t_1) < 0)) __PYX_ERR(0, 1008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":996 + /* "gedlibpy.pyx":1004 * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") * for h in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< @@ -10737,7 +10739,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":994 + /* "gedlibpy.pyx":1002 * resDistance = [[]] * resMapping = [[]] * for g in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< @@ -10747,18 +10749,18 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "gedlibpy.pyx":1002 + /* "gedlibpy.pyx":1010 * resMapping[g][h] = self.get_node_map(g, h) * * print("Finish ! The return contains edit distances and NodeMap but you can check the result with graphs'ID until you restart the environment") # <<<<<<<<<<<<<< * return resDistance, resMapping * */ - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "gedlibpy.pyx":1003 + /* "gedlibpy.pyx":1011 * * print("Finish ! The return contains edit distances and NodeMap but you can check the result with graphs'ID until you restart the environment") * return resDistance, resMapping # <<<<<<<<<<<<<< @@ -10766,7 +10768,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1003, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_resDistance); __Pyx_GIVEREF(__pyx_v_resDistance); @@ -10778,7 +10780,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs __pyx_t_9 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":950 + /* "gedlibpy.pyx":958 * * * def compute_edit_distance_on_nx_graphs(self, dataset, classes, edit_cost, method, options, init_option="EAGER_WITHOUT_SHUFFLED_COPIES") : # <<<<<<<<<<<<<< @@ -10808,7 +10810,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_90compute_edit_distance_on_nx_graphs return __pyx_r; } -/* "gedlibpy.pyx":1006 +/* "gedlibpy.pyx":1014 * * * def compute_edit_distance_on_GXl_graphs(self, path_folder, path_XML, edit_cost, method, options="", init_option="EAGER_WITHOUT_SHUFFLED_COPIES") : # <<<<<<<<<<<<<< @@ -10862,19 +10864,19 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_93compute_edit_distance_on_GXl_graph case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path_XML)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, 1); __PYX_ERR(0, 1006, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, 1); __PYX_ERR(0, 1014, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edit_cost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, 2); __PYX_ERR(0, 1006, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, 2); __PYX_ERR(0, 1014, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, 3); __PYX_ERR(0, 1006, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, 3); __PYX_ERR(0, 1014, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -10890,7 +10892,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_93compute_edit_distance_on_GXl_graph } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_edit_distance_on_GXl_graphs") < 0)) __PYX_ERR(0, 1006, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_edit_distance_on_GXl_graphs") < 0)) __PYX_ERR(0, 1014, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -10915,7 +10917,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_93compute_edit_distance_on_GXl_graph } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1006, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_edit_distance_on_GXl_graphs", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1014, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.compute_edit_distance_on_GXl_graphs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10948,14 +10950,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("compute_edit_distance_on_GXl_graphs", 0); - /* "gedlibpy.pyx":1030 + /* "gedlibpy.pyx":1038 * """ * * if self.is_initialized() : # <<<<<<<<<<<<<< * self.restart_env() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_initialized); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10969,21 +10971,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "gedlibpy.pyx":1031 + /* "gedlibpy.pyx":1039 * * if self.is_initialized() : * self.restart_env() # <<<<<<<<<<<<<< * * print("Loading graphs in progress...") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_restart_env); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_restart_env); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10997,12 +10999,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1030 + /* "gedlibpy.pyx":1038 * """ * * if self.is_initialized() : # <<<<<<<<<<<<<< @@ -11011,25 +11013,25 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph */ } - /* "gedlibpy.pyx":1033 + /* "gedlibpy.pyx":1041 * self.restart_env() * * print("Loading graphs in progress...") # <<<<<<<<<<<<<< * self.load_GXL_graphs(path_folder, path_XML) * listID = self.graph_ids() */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1034 + /* "gedlibpy.pyx":1042 * * print("Loading graphs in progress...") * self.load_GXL_graphs(path_folder, path_XML) # <<<<<<<<<<<<<< * listID = self.graph_ids() * print("Graphs loaded ! ") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_load_GXL_graphs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_load_GXL_graphs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; @@ -11046,7 +11048,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_path_folder, __pyx_v_path_XML}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -11054,13 +11056,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_path_folder, __pyx_v_path_XML}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -11071,21 +11073,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph __Pyx_INCREF(__pyx_v_path_XML); __Pyx_GIVEREF(__pyx_v_path_XML); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_path_XML); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1035 + /* "gedlibpy.pyx":1043 * print("Loading graphs in progress...") * self.load_GXL_graphs(path_folder, path_XML) * listID = self.graph_ids() # <<<<<<<<<<<<<< * print("Graphs loaded ! ") * print("Number of graphs = " + str(listID[1])) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_graph_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_graph_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -11099,51 +11101,51 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_listID = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1036 + /* "gedlibpy.pyx":1044 * self.load_GXL_graphs(path_folder, path_XML) * listID = self.graph_ids() * print("Graphs loaded ! ") # <<<<<<<<<<<<<< * print("Number of graphs = " + str(listID[1])) * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1037 + /* "gedlibpy.pyx":1045 * listID = self.graph_ids() * print("Graphs loaded ! ") * print("Number of graphs = " + str(listID[1])) # <<<<<<<<<<<<<< * * self.set_edit_cost(edit_cost) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Number_of_graphs, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Number_of_graphs, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1039 + /* "gedlibpy.pyx":1047 * print("Number of graphs = " + str(listID[1])) * * self.set_edit_cost(edit_cost) # <<<<<<<<<<<<<< * print("Initialization in progress...") * self.init(init_option) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_edit_cost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_edit_cost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -11157,30 +11159,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_edit_cost) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_edit_cost); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1040 + /* "gedlibpy.pyx":1048 * * self.set_edit_cost(edit_cost) * print("Initialization in progress...") # <<<<<<<<<<<<<< * self.init(init_option) * print("Initialization terminated !") */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1041 + /* "gedlibpy.pyx":1049 * self.set_edit_cost(edit_cost) * print("Initialization in progress...") * self.init(init_option) # <<<<<<<<<<<<<< * print("Initialization terminated !") * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -11194,30 +11196,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_init_option) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_init_option); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1042 + /* "gedlibpy.pyx":1050 * print("Initialization in progress...") * self.init(init_option) * print("Initialization terminated !") # <<<<<<<<<<<<<< * * self.set_method(method, options) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1044 + /* "gedlibpy.pyx":1052 * print("Initialization terminated !") * * self.set_method(method, options) # <<<<<<<<<<<<<< * self.init_method() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; __pyx_t_5 = 0; @@ -11234,7 +11236,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_method, __pyx_v_options}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -11242,13 +11244,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_method, __pyx_v_options}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -11259,21 +11261,21 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph __Pyx_INCREF(__pyx_v_options); __Pyx_GIVEREF(__pyx_v_options); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_options); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1045 + /* "gedlibpy.pyx":1053 * * self.set_method(method, options) * self.init_method() # <<<<<<<<<<<<<< * * #res = [] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -11287,23 +11289,23 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1048 + /* "gedlibpy.pyx":1056 * * #res = [] * for g in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< * print("Computation between graph " + str(g) + " with all the others including himself.") * for h in range(listID[0], listID[1]) : */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -11311,16 +11313,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1056, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -11328,17 +11330,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -11348,7 +11350,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1048, __pyx_L1_error) + else __PYX_ERR(0, 1056, __pyx_L1_error) } break; } @@ -11357,38 +11359,38 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1049 + /* "gedlibpy.pyx":1057 * #res = [] * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") # <<<<<<<<<<<<<< * for h in range(listID[0], listID[1]) : * #print("Computation between graph " + str(g) + " and graph " + str(h)) */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Computation_between_graph, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Computation_between_graph, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_with_all_the_others_including_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u_with_all_the_others_including_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":1050 + /* "gedlibpy.pyx":1058 * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") * for h in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< * #print("Computation between graph " + str(g) + " and graph " + str(h)) * self.run_method(g,h) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_listID, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_listID, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); @@ -11396,16 +11398,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1058, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -11413,17 +11415,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -11433,7 +11435,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1050, __pyx_L1_error) + else __PYX_ERR(0, 1058, __pyx_L1_error) } break; } @@ -11442,14 +11444,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1052 + /* "gedlibpy.pyx":1060 * for h in range(listID[0], listID[1]) : * #print("Computation between graph " + str(g) + " and graph " + str(h)) * self.run_method(g,h) # <<<<<<<<<<<<<< * #res.append((get_upper_bound(g,h), get_node_map(g,h), get_runtime(g,h))) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_method); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = NULL; __pyx_t_5 = 0; @@ -11466,7 +11468,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -11474,13 +11476,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_g, __pyx_v_h}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -11491,14 +11493,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_5, __pyx_v_h); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1050 + /* "gedlibpy.pyx":1058 * for g in range(listID[0], listID[1]) : * print("Computation between graph " + str(g) + " with all the others including himself.") * for h in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< @@ -11508,7 +11510,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "gedlibpy.pyx":1048 + /* "gedlibpy.pyx":1056 * * #res = [] * for g in range(listID[0], listID[1]) : # <<<<<<<<<<<<<< @@ -11518,29 +11520,29 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1057 + /* "gedlibpy.pyx":1065 * #return res * * print ("Finish ! You can check the result with each ID of graphs ! There are in the return") # <<<<<<<<<<<<<< * print ("Please don't restart the environment or recall this function, you will lose your results !") * return listID */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1058 + /* "gedlibpy.pyx":1066 * * print ("Finish ! You can check the result with each ID of graphs ! There are in the return") * print ("Please don't restart the environment or recall this function, you will lose your results !") # <<<<<<<<<<<<<< * return listID * */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1059 + /* "gedlibpy.pyx":1067 * print ("Finish ! You can check the result with each ID of graphs ! There are in the return") * print ("Please don't restart the environment or recall this function, you will lose your results !") * return listID # <<<<<<<<<<<<<< @@ -11552,7 +11554,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph __pyx_r = __pyx_v_listID; goto __pyx_L0; - /* "gedlibpy.pyx":1006 + /* "gedlibpy.pyx":1014 * * * def compute_edit_distance_on_GXl_graphs(self, path_folder, path_XML, edit_cost, method, options="", init_option="EAGER_WITHOUT_SHUFFLED_COPIES") : # <<<<<<<<<<<<<< @@ -11579,7 +11581,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_92compute_edit_distance_on_GXl_graph return __pyx_r; } -/* "gedlibpy.pyx":1062 +/* "gedlibpy.pyx":1070 * * * def get_num_node_labels(self): # <<<<<<<<<<<<<< @@ -11608,7 +11610,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_94get_num_node_labels(struct __pyx_o PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_num_node_labels", 0); - /* "gedlibpy.pyx":1071 + /* "gedlibpy.pyx":1079 * .. note:: If 1 is returned, the nodes are unlabeled. * """ * return self.c_env.getNumNodeLabels() # <<<<<<<<<<<<<< @@ -11620,15 +11622,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_94get_num_node_labels(struct __pyx_o __pyx_t_1 = __pyx_v_self->c_env->getNumNodeLabels(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1071, __pyx_L1_error) + __PYX_ERR(0, 1079, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1062 + /* "gedlibpy.pyx":1070 * * * def get_num_node_labels(self): # <<<<<<<<<<<<<< @@ -11647,7 +11649,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_94get_num_node_labels(struct __pyx_o return __pyx_r; } -/* "gedlibpy.pyx":1074 +/* "gedlibpy.pyx":1082 * * * def get_node_label(self, label_id): # <<<<<<<<<<<<<< @@ -11680,7 +11682,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_96get_node_label(struct __pyx_obj_8g PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_node_label", 0); - /* "gedlibpy.pyx":1083 + /* "gedlibpy.pyx":1091 * :rtype: dict{string : string} * """ * return decode_your_map(self.c_env.getNodeLabel(label_id)) # <<<<<<<<<<<<<< @@ -11688,16 +11690,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_96get_node_label(struct __pyx_obj_8g * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_label_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_label_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error) try { __pyx_t_4 = __pyx_v_self->c_env->getNodeLabel(__pyx_t_3); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1083, __pyx_L1_error) + __PYX_ERR(0, 1091, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -11712,14 +11714,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_96get_node_label(struct __pyx_obj_8g __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1074 + /* "gedlibpy.pyx":1082 * * * def get_node_label(self, label_id): # <<<<<<<<<<<<<< @@ -11741,7 +11743,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_96get_node_label(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":1086 +/* "gedlibpy.pyx":1094 * * * def get_num_edge_labels(self): # <<<<<<<<<<<<<< @@ -11770,7 +11772,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_98get_num_edge_labels(struct __pyx_o PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_num_edge_labels", 0); - /* "gedlibpy.pyx":1095 + /* "gedlibpy.pyx":1103 * .. note:: If 1 is returned, the edges are unlabeled. * """ * return self.c_env.getNumEdgeLabels() # <<<<<<<<<<<<<< @@ -11782,15 +11784,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_98get_num_edge_labels(struct __pyx_o __pyx_t_1 = __pyx_v_self->c_env->getNumEdgeLabels(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1095, __pyx_L1_error) + __PYX_ERR(0, 1103, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1086 + /* "gedlibpy.pyx":1094 * * * def get_num_edge_labels(self): # <<<<<<<<<<<<<< @@ -11809,7 +11811,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_98get_num_edge_labels(struct __pyx_o return __pyx_r; } -/* "gedlibpy.pyx":1098 +/* "gedlibpy.pyx":1106 * * * def get_edge_label(self, label_id): # <<<<<<<<<<<<<< @@ -11842,7 +11844,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_100get_edge_label(struct __pyx_obj_8 PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_edge_label", 0); - /* "gedlibpy.pyx":1107 + /* "gedlibpy.pyx":1115 * :rtype: dict{string : string} * """ * return decode_your_map(self.c_env.getEdgeLabel(label_id)) # <<<<<<<<<<<<<< @@ -11850,16 +11852,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_100get_edge_label(struct __pyx_obj_8 * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_label_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_label_id); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1115, __pyx_L1_error) try { __pyx_t_4 = __pyx_v_self->c_env->getEdgeLabel(__pyx_t_3); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1107, __pyx_L1_error) + __PYX_ERR(0, 1115, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1107, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -11874,14 +11876,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_100get_edge_label(struct __pyx_obj_8 __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1098 + /* "gedlibpy.pyx":1106 * * * def get_edge_label(self, label_id): # <<<<<<<<<<<<<< @@ -11903,7 +11905,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_100get_edge_label(struct __pyx_obj_8 return __pyx_r; } -/* "gedlibpy.pyx":1121 +/* "gedlibpy.pyx":1129 * # return self.c_env.getNumNodes(graph_id) * * def get_avg_num_nodes(self): # <<<<<<<<<<<<<< @@ -11932,7 +11934,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_102get_avg_num_nodes(struct __pyx_ob PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_avg_num_nodes", 0); - /* "gedlibpy.pyx":1128 + /* "gedlibpy.pyx":1136 * :rtype: double * """ * return self.c_env.getAvgNumNodes() # <<<<<<<<<<<<<< @@ -11944,15 +11946,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_102get_avg_num_nodes(struct __pyx_ob __pyx_t_1 = __pyx_v_self->c_env->getAvgNumNodes(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1128, __pyx_L1_error) + __PYX_ERR(0, 1136, __pyx_L1_error) } - __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1121 + /* "gedlibpy.pyx":1129 * # return self.c_env.getNumNodes(graph_id) * * def get_avg_num_nodes(self): # <<<<<<<<<<<<<< @@ -11971,7 +11973,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_102get_avg_num_nodes(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1130 +/* "gedlibpy.pyx":1138 * return self.c_env.getAvgNumNodes() * * def get_node_rel_cost(self, node_label_1, node_label_2): # <<<<<<<<<<<<<< @@ -12011,11 +12013,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_105get_node_rel_cost(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_label_2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_node_rel_cost", 1, 2, 2, 1); __PYX_ERR(0, 1130, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_rel_cost", 1, 2, 2, 1); __PYX_ERR(0, 1138, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_rel_cost") < 0)) __PYX_ERR(0, 1130, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_rel_cost") < 0)) __PYX_ERR(0, 1138, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12028,7 +12030,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_105get_node_rel_cost(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_node_rel_cost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1130, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_rel_cost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1138, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_node_rel_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12052,7 +12054,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_104get_node_rel_cost(struct __pyx_ob double __pyx_t_6; __Pyx_RefNannySetupContext("get_node_rel_cost", 0); - /* "gedlibpy.pyx":1141 + /* "gedlibpy.pyx":1149 * :rtype: double * """ * return self.c_env.getNodeRelCost(encode_your_map(node_label_1), encode_your_map(node_label_2)) # <<<<<<<<<<<<<< @@ -12060,7 +12062,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_104get_node_rel_cost(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12074,12 +12076,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_104get_node_rel_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_node_label_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node_label_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12093,24 +12095,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_104get_node_rel_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_node_label_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node_label_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_6 = __pyx_v_self->c_env->getNodeRelCost(__pyx_t_4, __pyx_t_5); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1141, __pyx_L1_error) + __PYX_ERR(0, 1149, __pyx_L1_error) } - __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1130 + /* "gedlibpy.pyx":1138 * return self.c_env.getAvgNumNodes() * * def get_node_rel_cost(self, node_label_1, node_label_2): # <<<<<<<<<<<<<< @@ -12131,7 +12133,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_104get_node_rel_cost(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1144 +/* "gedlibpy.pyx":1152 * * * def get_node_del_cost(self, node_label): # <<<<<<<<<<<<<< @@ -12163,7 +12165,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_106get_node_del_cost(struct __pyx_ob double __pyx_t_5; __Pyx_RefNannySetupContext("get_node_del_cost", 0); - /* "gedlibpy.pyx":1153 + /* "gedlibpy.pyx":1161 * :rtype: double * """ * return self.c_env.getNodeDelCost(encode_your_map(node_label)) # <<<<<<<<<<<<<< @@ -12171,7 +12173,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_106get_node_del_cost(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12185,24 +12187,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_106get_node_del_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_node_label) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node_label); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_5 = __pyx_v_self->c_env->getNodeDelCost(__pyx_t_4); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1153, __pyx_L1_error) + __PYX_ERR(0, 1161, __pyx_L1_error) } - __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1144 + /* "gedlibpy.pyx":1152 * * * def get_node_del_cost(self, node_label): # <<<<<<<<<<<<<< @@ -12223,7 +12225,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_106get_node_del_cost(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1156 +/* "gedlibpy.pyx":1164 * * * def get_node_ins_cost(self, node_label): # <<<<<<<<<<<<<< @@ -12255,7 +12257,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_108get_node_ins_cost(struct __pyx_ob double __pyx_t_5; __Pyx_RefNannySetupContext("get_node_ins_cost", 0); - /* "gedlibpy.pyx":1165 + /* "gedlibpy.pyx":1173 * :rtype: double * """ * return self.c_env.getNodeInsCost(encode_your_map(node_label)) # <<<<<<<<<<<<<< @@ -12263,7 +12265,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_108get_node_ins_cost(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12277,24 +12279,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_108get_node_ins_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_node_label) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node_label); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_5 = __pyx_v_self->c_env->getNodeInsCost(__pyx_t_4); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1165, __pyx_L1_error) + __PYX_ERR(0, 1173, __pyx_L1_error) } - __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1156 + /* "gedlibpy.pyx":1164 * * * def get_node_ins_cost(self, node_label): # <<<<<<<<<<<<<< @@ -12315,7 +12317,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_108get_node_ins_cost(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1168 +/* "gedlibpy.pyx":1176 * * * def get_median_node_label(self, node_labels): # <<<<<<<<<<<<<< @@ -12353,7 +12355,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py std::map __pyx_t_9; __Pyx_RefNannySetupContext("get_median_node_label", 0); - /* "gedlibpy.pyx":1177 + /* "gedlibpy.pyx":1185 * :rtype: dict{string : string} * """ * node_labels_b = [encode_your_map(node_label) for node_label in node_labels] # <<<<<<<<<<<<<< @@ -12361,32 +12363,32 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py * */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_node_labels)) || PyTuple_CheckExact(__pyx_v_node_labels)) { __pyx_t_2 = __pyx_v_node_labels; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_node_labels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_node_labels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1185, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1185, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1185, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -12396,7 +12398,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1177, __pyx_L5_error) + else __PYX_ERR(0, 1185, __pyx_L5_error) } break; } @@ -12404,7 +12406,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py } __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_node_label, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1177, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -12418,10 +12420,10 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_8genexpr9__pyx_v_node_label) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_8genexpr9__pyx_v_node_label); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L5_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1177, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1185, __pyx_L5_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -12435,7 +12437,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py __pyx_v_node_labels_b = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1178 + /* "gedlibpy.pyx":1186 * """ * node_labels_b = [encode_your_map(node_label) for node_label in node_labels] * return decode_your_map(self.c_env.getMedianNodeLabel(node_labels_b)) # <<<<<<<<<<<<<< @@ -12443,16 +12445,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __pyx_convert_vector_from_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_string_3e___(__pyx_v_node_labels_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_8 = __pyx_convert_vector_from_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_string_3e___(__pyx_v_node_labels_b); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error) try { __pyx_t_9 = __pyx_v_self->c_env->getMedianNodeLabel(__pyx_t_8); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1178, __pyx_L1_error) + __PYX_ERR(0, 1186, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12467,14 +12469,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1168 + /* "gedlibpy.pyx":1176 * * * def get_median_node_label(self, node_labels): # <<<<<<<<<<<<<< @@ -12499,7 +12501,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_110get_median_node_label(struct __py return __pyx_r; } -/* "gedlibpy.pyx":1181 +/* "gedlibpy.pyx":1189 * * * def get_edge_rel_cost(self, edge_label_1, edge_label_2): # <<<<<<<<<<<<<< @@ -12539,11 +12541,11 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_113get_edge_rel_cost(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edge_label_2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_edge_rel_cost", 1, 2, 2, 1); __PYX_ERR(0, 1181, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_edge_rel_cost", 1, 2, 2, 1); __PYX_ERR(0, 1189, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_edge_rel_cost") < 0)) __PYX_ERR(0, 1181, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_edge_rel_cost") < 0)) __PYX_ERR(0, 1189, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -12556,7 +12558,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_113get_edge_rel_cost(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_edge_rel_cost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1181, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_edge_rel_cost", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1189, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_edge_rel_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12580,7 +12582,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_112get_edge_rel_cost(struct __pyx_ob double __pyx_t_6; __Pyx_RefNannySetupContext("get_edge_rel_cost", 0); - /* "gedlibpy.pyx":1192 + /* "gedlibpy.pyx":1200 * :rtype: double * """ * return self.c_env.getEdgeRelCost(encode_your_map(edge_label_1), encode_your_map(edge_label_2)) # <<<<<<<<<<<<<< @@ -12588,7 +12590,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_112get_edge_rel_cost(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12602,12 +12604,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_112get_edge_rel_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_edge_label_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_edge_label_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12621,24 +12623,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_112get_edge_rel_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_edge_label_2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_edge_label_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1192, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_6 = __pyx_v_self->c_env->getEdgeRelCost(__pyx_t_4, __pyx_t_5); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1192, __pyx_L1_error) + __PYX_ERR(0, 1200, __pyx_L1_error) } - __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1181 + /* "gedlibpy.pyx":1189 * * * def get_edge_rel_cost(self, edge_label_1, edge_label_2): # <<<<<<<<<<<<<< @@ -12659,7 +12661,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_112get_edge_rel_cost(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1195 +/* "gedlibpy.pyx":1203 * * * def get_edge_del_cost(self, edge_label): # <<<<<<<<<<<<<< @@ -12691,7 +12693,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_114get_edge_del_cost(struct __pyx_ob double __pyx_t_5; __Pyx_RefNannySetupContext("get_edge_del_cost", 0); - /* "gedlibpy.pyx":1204 + /* "gedlibpy.pyx":1212 * :rtype: double * """ * return self.c_env.getEdgeDelCost(encode_your_map(edge_label)) # <<<<<<<<<<<<<< @@ -12699,7 +12701,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_114get_edge_del_cost(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1204, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12713,24 +12715,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_114get_edge_del_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_edge_label) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_edge_label); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_5 = __pyx_v_self->c_env->getEdgeDelCost(__pyx_t_4); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1204, __pyx_L1_error) + __PYX_ERR(0, 1212, __pyx_L1_error) } - __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1195 + /* "gedlibpy.pyx":1203 * * * def get_edge_del_cost(self, edge_label): # <<<<<<<<<<<<<< @@ -12751,7 +12753,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_114get_edge_del_cost(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1207 +/* "gedlibpy.pyx":1215 * * * def get_edge_ins_cost(self, edge_label): # <<<<<<<<<<<<<< @@ -12783,7 +12785,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_116get_edge_ins_cost(struct __pyx_ob double __pyx_t_5; __Pyx_RefNannySetupContext("get_edge_ins_cost", 0); - /* "gedlibpy.pyx":1216 + /* "gedlibpy.pyx":1224 * :rtype: double * """ * return self.c_env.getEdgeInsCost(encode_your_map(edge_label)) # <<<<<<<<<<<<<< @@ -12791,7 +12793,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_116get_edge_ins_cost(struct __pyx_ob * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12805,24 +12807,24 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_116get_edge_ins_cost(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_edge_label) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_edge_label); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_4 = __pyx_convert_map_from_py_std_3a__3a_string__and_std_3a__3a_string(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; try { __pyx_t_5 = __pyx_v_self->c_env->getEdgeInsCost(__pyx_t_4); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1216, __pyx_L1_error) + __PYX_ERR(0, 1224, __pyx_L1_error) } - __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1207 + /* "gedlibpy.pyx":1215 * * * def get_edge_ins_cost(self, edge_label): # <<<<<<<<<<<<<< @@ -12843,7 +12845,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_116get_edge_ins_cost(struct __pyx_ob return __pyx_r; } -/* "gedlibpy.pyx":1219 +/* "gedlibpy.pyx":1227 * * * def get_median_edge_label(self, edge_labels): # <<<<<<<<<<<<<< @@ -12881,7 +12883,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py std::map __pyx_t_9; __Pyx_RefNannySetupContext("get_median_edge_label", 0); - /* "gedlibpy.pyx":1228 + /* "gedlibpy.pyx":1236 * :rtype: dict{string : string} * """ * edge_labels_b = [encode_your_map(edge_label) for edge_label in edge_labels] # <<<<<<<<<<<<<< @@ -12889,32 +12891,32 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py * */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_edge_labels)) || PyTuple_CheckExact(__pyx_v_edge_labels)) { __pyx_t_2 = __pyx_v_edge_labels; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_edge_labels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_edge_labels); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1236, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1236, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -12924,7 +12926,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1228, __pyx_L5_error) + else __PYX_ERR(0, 1236, __pyx_L5_error) } break; } @@ -12932,7 +12934,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py } __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_edge_label, __pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1228, __pyx_L5_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_encode_your_map); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -12946,10 +12948,10 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_9genexpr10__pyx_v_edge_label) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_9genexpr10__pyx_v_edge_label); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L5_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1228, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1236, __pyx_L5_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -12963,7 +12965,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py __pyx_v_edge_labels_b = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1229 + /* "gedlibpy.pyx":1237 * """ * edge_labels_b = [encode_your_map(edge_label) for edge_label in edge_labels] * return decode_your_map(self.c_env.getMedianEdgeLabel(edge_label_b)) # <<<<<<<<<<<<<< @@ -12971,19 +12973,19 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1229, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_edge_label_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_edge_label_b); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __pyx_convert_vector_from_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_string_3e___(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1229, __pyx_L1_error) + __pyx_t_8 = __pyx_convert_vector_from_py_std_3a__3a_map_3c_std_3a__3a_string_2c_std_3a__3a_string_3e___(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; try { __pyx_t_9 = __pyx_v_self->c_env->getMedianEdgeLabel(__pyx_t_8); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1229, __pyx_L1_error) + __PYX_ERR(0, 1237, __pyx_L1_error) } - __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L1_error) + __pyx_t_5 = __pyx_convert_map_to_py_std_3a__3a_string____std_3a__3a_string(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12998,14 +13000,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1219 + /* "gedlibpy.pyx":1227 * * * def get_median_edge_label(self, edge_labels): # <<<<<<<<<<<<<< @@ -13030,7 +13032,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_118get_median_edge_label(struct __py return __pyx_r; } -/* "gedlibpy.pyx":1232 +/* "gedlibpy.pyx":1240 * * * def get_nx_graph(self, graph_id, adj_matrix=True, adj_lists=False, edge_list=False): # @todo # <<<<<<<<<<<<<< @@ -13095,7 +13097,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_121get_nx_graph(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_nx_graph") < 0)) __PYX_ERR(0, 1232, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_nx_graph") < 0)) __PYX_ERR(0, 1240, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -13117,7 +13119,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_121get_nx_graph(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_nx_graph", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1232, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_nx_graph", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.get_nx_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13156,16 +13158,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge PyObject *(*__pyx_t_12)(PyObject *); __Pyx_RefNannySetupContext("get_nx_graph", 0); - /* "gedlibpy.pyx":1255 + /* "gedlibpy.pyx":1263 * The obtained graph. * """ * graph = nx.Graph() # <<<<<<<<<<<<<< * graph.graph['id'] = graph_id * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_nx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_nx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Graph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Graph); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -13180,32 +13182,32 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_graph = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1256 + /* "gedlibpy.pyx":1264 * """ * graph = nx.Graph() * graph.graph['id'] = graph_id # <<<<<<<<<<<<<< * * nb_nodes = self.get_graph_num_nodes(graph_id) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_graph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_graph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_id, __pyx_v_graph_id) < 0)) __PYX_ERR(0, 1256, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_id, __pyx_v_graph_id) < 0)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1258 + /* "gedlibpy.pyx":1266 * graph.graph['id'] = graph_id * * nb_nodes = self.get_graph_num_nodes(graph_id) # <<<<<<<<<<<<<< * original_node_ids = self.get_original_node_ids(graph_id) * node_labels = self.get_graph_node_labels(graph_id) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_graph_num_nodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_graph_num_nodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -13219,20 +13221,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_graph_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_graph_id); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nb_nodes = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1259 + /* "gedlibpy.pyx":1267 * * nb_nodes = self.get_graph_num_nodes(graph_id) * original_node_ids = self.get_original_node_ids(graph_id) # <<<<<<<<<<<<<< * node_labels = self.get_graph_node_labels(graph_id) * # print(original_node_ids) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_original_node_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_original_node_ids); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -13246,20 +13248,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_graph_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_graph_id); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_original_node_ids = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1260 + /* "gedlibpy.pyx":1268 * nb_nodes = self.get_graph_num_nodes(graph_id) * original_node_ids = self.get_original_node_ids(graph_id) * node_labels = self.get_graph_node_labels(graph_id) # <<<<<<<<<<<<<< * # print(original_node_ids) * # print(node_labels) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_graph_node_labels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_graph_node_labels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -13273,32 +13275,32 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_graph_id) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_graph_id); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_node_labels = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1263 + /* "gedlibpy.pyx":1271 * # print(original_node_ids) * # print(node_labels) * graph.graph['original_node_ids'] = original_node_ids # <<<<<<<<<<<<<< * * for node_id in range(0, nb_nodes): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_graph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_graph); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_original_node_ids, __pyx_v_original_node_ids) < 0)) __PYX_ERR(0, 1263, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_original_node_ids, __pyx_v_original_node_ids) < 0)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1265 + /* "gedlibpy.pyx":1273 * graph.graph['original_node_ids'] = original_node_ids * * for node_id in range(0, nb_nodes): # <<<<<<<<<<<<<< * graph.add_node(node_id, **node_labels[node_id]) * # graph.nodes[node_id]['original_node_id'] = original_node_ids[node_id] */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -13306,16 +13308,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __Pyx_INCREF(__pyx_v_nb_nodes); __Pyx_GIVEREF(__pyx_v_nb_nodes); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_nb_nodes); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -13323,17 +13325,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1273, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1273, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -13343,7 +13345,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1265, __pyx_L1_error) + else __PYX_ERR(0, 1273, __pyx_L1_error) } break; } @@ -13352,43 +13354,43 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __Pyx_XDECREF_SET(__pyx_v_node_id, __pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1266 + /* "gedlibpy.pyx":1274 * * for node_id in range(0, nb_nodes): * graph.add_node(node_id, **node_labels[node_id]) # <<<<<<<<<<<<<< * # graph.nodes[node_id]['original_node_id'] = original_node_ids[node_id] * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_add_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_add_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_node_id); __Pyx_GIVEREF(__pyx_v_node_id); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_node_id); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_node_labels, __pyx_v_node_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_node_labels, __pyx_v_node_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 1266, __pyx_L1_error) + __PYX_ERR(0, 1274, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_7))) { - __pyx_t_6 = PyDict_Copy(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_6 = PyDict_Copy(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_6 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "gedlibpy.pyx":1265 + /* "gedlibpy.pyx":1273 * graph.graph['original_node_ids'] = original_node_ids * * for node_id in range(0, nb_nodes): # <<<<<<<<<<<<<< @@ -13398,14 +13400,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1269 + /* "gedlibpy.pyx":1277 * # graph.nodes[node_id]['original_node_id'] = original_node_ids[node_id] * * edges = self.get_graph_edges(graph_id) # <<<<<<<<<<<<<< * for (head, tail), labels in edges.items(): * graph.add_edge(head, tail, **labels) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_graph_edges); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1269, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_graph_edges); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -13419,13 +13421,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_graph_id) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_graph_id); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_edges = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1270 + /* "gedlibpy.pyx":1278 * * edges = self.get_graph_edges(graph_id) * for (head, tail), labels in edges.items(): # <<<<<<<<<<<<<< @@ -13435,9 +13437,9 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __pyx_t_4 = 0; if (unlikely(__pyx_v_edges == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1270, __pyx_L1_error) + __PYX_ERR(0, 1278, __pyx_L1_error) } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_edges, 0, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_edges, 0, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_7; @@ -13445,7 +13447,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_4, &__pyx_t_7, &__pyx_t_6, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1270, __pyx_L1_error) + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { @@ -13454,7 +13456,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1270, __pyx_L1_error) + __PYX_ERR(0, 1278, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -13467,15 +13469,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -13483,7 +13485,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L8_unpacking_done; @@ -13491,7 +13493,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1270, __pyx_L1_error) + __PYX_ERR(0, 1278, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_head, __pyx_t_2); @@ -13501,16 +13503,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __Pyx_XDECREF_SET(__pyx_v_labels, __pyx_t_6); __pyx_t_6 = 0; - /* "gedlibpy.pyx":1271 + /* "gedlibpy.pyx":1279 * edges = self.get_graph_edges(graph_id) * for (head, tail), labels in edges.items(): * graph.add_edge(head, tail, **labels) # <<<<<<<<<<<<<< * # print(edges) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_add_edge); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph, __pyx_n_s_add_edge); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_head); __Pyx_GIVEREF(__pyx_v_head); @@ -13520,16 +13522,16 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_tail); if (unlikely(__pyx_v_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 1271, __pyx_L1_error) + __PYX_ERR(0, 1279, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_labels))) { - __pyx_t_3 = PyDict_Copy(__pyx_v_labels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_3 = PyDict_Copy(__pyx_v_labels); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_labels, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_3 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_labels, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -13538,7 +13540,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1274 + /* "gedlibpy.pyx":1282 * # print(edges) * * return graph # <<<<<<<<<<<<<< @@ -13550,7 +13552,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge __pyx_r = __pyx_v_graph; goto __pyx_L0; - /* "gedlibpy.pyx":1232 + /* "gedlibpy.pyx":1240 * * * def get_nx_graph(self, graph_id, adj_matrix=True, adj_lists=False, edge_list=False): # @todo # <<<<<<<<<<<<<< @@ -13583,7 +13585,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_120get_nx_graph(struct __pyx_obj_8ge return __pyx_r; } -/* "gedlibpy.pyx":1277 +/* "gedlibpy.pyx":1285 * * * def get_init_type(self): # <<<<<<<<<<<<<< @@ -13612,7 +13614,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_122get_init_type(struct __pyx_obj_8g PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("get_init_type", 0); - /* "gedlibpy.pyx":1286 + /* "gedlibpy.pyx":1294 * Initialization type in string. * """ * return self.c_env.getInitType().decode('utf-8') # <<<<<<<<<<<<<< @@ -13624,15 +13626,15 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_122get_init_type(struct __pyx_obj_8g __pyx_t_1 = __pyx_v_self->c_env->getInitType(); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1286, __pyx_L1_error) + __PYX_ERR(0, 1294, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_t_1, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "gedlibpy.pyx":1277 + /* "gedlibpy.pyx":1285 * * * def get_init_type(self): # <<<<<<<<<<<<<< @@ -13651,7 +13653,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_122get_init_type(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":1308 +/* "gedlibpy.pyx":1316 * * * def load_nx_graph(self, nx_graph, graph_id, graph_name='', graph_class=''): # <<<<<<<<<<<<<< @@ -13699,7 +13701,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_125load_nx_graph(PyObject *__pyx_v_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_graph_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("load_nx_graph", 0, 2, 4, 1); __PYX_ERR(0, 1308, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("load_nx_graph", 0, 2, 4, 1); __PYX_ERR(0, 1316, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -13715,7 +13717,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_125load_nx_graph(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_nx_graph") < 0)) __PYX_ERR(0, 1308, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_nx_graph") < 0)) __PYX_ERR(0, 1316, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -13736,7 +13738,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_125load_nx_graph(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("load_nx_graph", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1308, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("load_nx_graph", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1316, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.load_nx_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13773,7 +13775,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __Pyx_RefNannySetupContext("load_nx_graph", 0); __Pyx_INCREF(__pyx_v_graph_id); - /* "gedlibpy.pyx":1331 + /* "gedlibpy.pyx":1339 * The ID of the newly loaded graph. * """ * if graph_id is None: # <<<<<<<<<<<<<< @@ -13784,14 +13786,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "gedlibpy.pyx":1332 + /* "gedlibpy.pyx":1340 * """ * if graph_id is None: * graph_id = self.add_graph(graph_name, graph_class) # <<<<<<<<<<<<<< * else: * self.clear_graph(graph_id) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_graph); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_graph); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -13808,7 +13810,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_graph_name, __pyx_v_graph_class}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -13816,13 +13818,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_graph_name, __pyx_v_graph_class}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -13833,7 +13835,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __Pyx_INCREF(__pyx_v_graph_class); __Pyx_GIVEREF(__pyx_v_graph_class); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_graph_class); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -13841,7 +13843,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __Pyx_DECREF_SET(__pyx_v_graph_id, __pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1331 + /* "gedlibpy.pyx":1339 * The ID of the newly loaded graph. * """ * if graph_id is None: # <<<<<<<<<<<<<< @@ -13851,7 +13853,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g goto __pyx_L3; } - /* "gedlibpy.pyx":1334 + /* "gedlibpy.pyx":1342 * graph_id = self.add_graph(graph_name, graph_class) * else: * self.clear_graph(graph_id) # <<<<<<<<<<<<<< @@ -13859,7 +13861,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g * self.add_node(graph_id, str(node), nx_graph.nodes[node]) */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear_graph); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear_graph); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -13873,29 +13875,29 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_graph_id) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_graph_id); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; - /* "gedlibpy.pyx":1335 + /* "gedlibpy.pyx":1343 * else: * self.clear_graph(graph_id) * for node in nx_graph.nodes: # <<<<<<<<<<<<<< * self.add_node(graph_id, str(node), nx_graph.nodes[node]) * for edge in nx_graph.edges: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_nodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_nodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1343, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -13903,17 +13905,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1343, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1343, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -13923,7 +13925,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1335, __pyx_L1_error) + else __PYX_ERR(0, 1343, __pyx_L1_error) } break; } @@ -13932,20 +13934,20 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1336 + /* "gedlibpy.pyx":1344 * self.clear_graph(graph_id) * for node in nx_graph.nodes: * self.add_node(graph_id, str(node), nx_graph.nodes[node]) # <<<<<<<<<<<<<< * for edge in nx_graph.edges: * self.add_edge(graph_id, str(edge[0]), str(edge[1]), nx_graph.get_edge_data(edge[0], edge[1])) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_node); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_node); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_node); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_node); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_nodes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_nodes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -13963,7 +13965,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_graph_id, __pyx_t_5, __pyx_t_11}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -13973,7 +13975,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_graph_id, __pyx_t_5, __pyx_t_11}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -13981,7 +13983,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g } else #endif { - __pyx_t_12 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -13995,14 +13997,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_6, __pyx_t_11); __pyx_t_5 = 0; __pyx_t_11 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1335 + /* "gedlibpy.pyx":1343 * else: * self.clear_graph(graph_id) * for node in nx_graph.nodes: # <<<<<<<<<<<<<< @@ -14012,22 +14014,22 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":1337 + /* "gedlibpy.pyx":1345 * for node in nx_graph.nodes: * self.add_node(graph_id, str(node), nx_graph.nodes[node]) * for edge in nx_graph.edges: # <<<<<<<<<<<<<< * self.add_edge(graph_id, str(edge[0]), str(edge[1]), nx_graph.get_edge_data(edge[0], edge[1])) * return graph_id */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_edges); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_edges); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1345, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -14035,17 +14037,17 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1345, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1345, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -14055,7 +14057,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1337, __pyx_L1_error) + else __PYX_ERR(0, 1345, __pyx_L1_error) } break; } @@ -14064,30 +14066,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __Pyx_XDECREF_SET(__pyx_v_edge, __pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":1338 + /* "gedlibpy.pyx":1346 * self.add_node(graph_id, str(node), nx_graph.nodes[node]) * for edge in nx_graph.edges: * self.add_edge(graph_id, str(edge[0]), str(edge[1]), nx_graph.get_edge_data(edge[0], edge[1])) # <<<<<<<<<<<<<< * return graph_id * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_edge); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_edge); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_get_edge_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_nx_graph, __pyx_n_s_get_edge_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_edge, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_edge, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; __pyx_t_6 = 0; @@ -14104,7 +14106,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_13, __pyx_t_14}; - __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -14114,7 +14116,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_13, __pyx_t_14}; - __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -14122,7 +14124,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g } else #endif { - __pyx_t_16 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL; @@ -14133,7 +14135,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_6, __pyx_t_14); __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_16, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_16, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } @@ -14153,7 +14155,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_graph_id, __pyx_t_11, __pyx_t_5, __pyx_t_12}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -14164,7 +14166,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_v_graph_id, __pyx_t_11, __pyx_t_5, __pyx_t_12}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -14173,7 +14175,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g } else #endif { - __pyx_t_16 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -14190,14 +14192,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __pyx_t_11 = 0; __pyx_t_5 = 0; __pyx_t_12 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":1337 + /* "gedlibpy.pyx":1345 * for node in nx_graph.nodes: * self.add_node(graph_id, str(node), nx_graph.nodes[node]) * for edge in nx_graph.edges: # <<<<<<<<<<<<<< @@ -14207,7 +14209,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1339 + /* "gedlibpy.pyx":1347 * for edge in nx_graph.edges: * self.add_edge(graph_id, str(edge[0]), str(edge[1]), nx_graph.get_edge_data(edge[0], edge[1])) * return graph_id # <<<<<<<<<<<<<< @@ -14219,7 +14221,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g __pyx_r = __pyx_v_graph_id; goto __pyx_L0; - /* "gedlibpy.pyx":1308 + /* "gedlibpy.pyx":1316 * * * def load_nx_graph(self, nx_graph, graph_id, graph_name='', graph_class=''): # <<<<<<<<<<<<<< @@ -14251,7 +14253,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_124load_nx_graph(struct __pyx_obj_8g return __pyx_r; } -/* "gedlibpy.pyx":1342 +/* "gedlibpy.pyx":1350 * * * def compute_induced_cost(self, g_id, h_id, node_map): # <<<<<<<<<<<<<< @@ -14294,17 +14296,17 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_127compute_induced_cost(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h_id)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_induced_cost", 1, 3, 3, 1); __PYX_ERR(0, 1342, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_induced_cost", 1, 3, 3, 1); __PYX_ERR(0, 1350, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_map)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("compute_induced_cost", 1, 3, 3, 2); __PYX_ERR(0, 1342, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_induced_cost", 1, 3, 3, 2); __PYX_ERR(0, 1350, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_induced_cost") < 0)) __PYX_ERR(0, 1342, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_induced_cost") < 0)) __PYX_ERR(0, 1350, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -14319,7 +14321,7 @@ static PyObject *__pyx_pw_8gedlibpy_6GEDEnv_127compute_induced_cost(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compute_induced_cost", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1342, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compute_induced_cost", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1350, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.GEDEnv.compute_induced_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14356,26 +14358,26 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx double __pyx_t_12; __Pyx_RefNannySetupContext("compute_induced_cost", 0); - /* "gedlibpy.pyx":1359 + /* "gedlibpy.pyx":1367 * None. * """ * relation = [] # <<<<<<<<<<<<<< * node_map.as_relation(relation) * # print(relation) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_relation = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1360 + /* "gedlibpy.pyx":1368 * """ * relation = [] * node_map.as_relation(relation) # <<<<<<<<<<<<<< * # print(relation) * dummy_node = get_dummy_node() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_as_relation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_as_relation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14389,19 +14391,19 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_relation) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_relation); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1362 + /* "gedlibpy.pyx":1370 * node_map.as_relation(relation) * # print(relation) * dummy_node = get_dummy_node() # <<<<<<<<<<<<<< * # print(dummy_node) * for i, val in enumerate(relation): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_dummy_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_dummy_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -14415,13 +14417,13 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_dummy_node = __pyx_t_1; __pyx_t_1 = 0; - /* "gedlibpy.pyx":1364 + /* "gedlibpy.pyx":1372 * dummy_node = get_dummy_node() * # print(dummy_node) * for i, val in enumerate(relation): # <<<<<<<<<<<<<< @@ -14434,45 +14436,45 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1372, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; - /* "gedlibpy.pyx":1365 + /* "gedlibpy.pyx":1373 * # print(dummy_node) * for i, val in enumerate(relation): * val1 = dummy_node if val[0] == np.inf else val[0] # <<<<<<<<<<<<<< * val2 = dummy_node if val[1] == np.inf else val[1] * relation[i] = tuple((val1, val2)) */ - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_inf); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { __Pyx_INCREF(__pyx_v_dummy_node); __pyx_t_3 = __pyx_v_dummy_node; } else { - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; @@ -14480,30 +14482,30 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx __Pyx_XDECREF_SET(__pyx_v_val1, __pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1366 + /* "gedlibpy.pyx":1374 * for i, val in enumerate(relation): * val1 = dummy_node if val[0] == np.inf else val[0] * val2 = dummy_node if val[1] == np.inf else val[1] # <<<<<<<<<<<<<< * relation[i] = tuple((val1, val2)) * # print(relation) */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_inf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_inf); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_8) { __Pyx_INCREF(__pyx_v_dummy_node); __pyx_t_3 = __pyx_v_dummy_node; } else { - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_t_7; __pyx_t_7 = 0; @@ -14511,14 +14513,14 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx __Pyx_XDECREF_SET(__pyx_v_val2, __pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1367 + /* "gedlibpy.pyx":1375 * val1 = dummy_node if val[0] == np.inf else val[0] * val2 = dummy_node if val[1] == np.inf else val[1] * relation[i] = tuple((val1, val2)) # <<<<<<<<<<<<<< * # print(relation) * induced_cost = self.c_env.computeInducedCost(g_id, h_id, relation) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val1); __Pyx_GIVEREF(__pyx_v_val1); @@ -14526,10 +14528,10 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx __Pyx_INCREF(__pyx_v_val2); __Pyx_GIVEREF(__pyx_v_val2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_val2); - if (unlikely(PyObject_SetItem(__pyx_v_relation, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 1367, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v_relation, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "gedlibpy.pyx":1364 + /* "gedlibpy.pyx":1372 * dummy_node = get_dummy_node() * # print(dummy_node) * for i, val in enumerate(relation): # <<<<<<<<<<<<<< @@ -14540,34 +14542,34 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1369 + /* "gedlibpy.pyx":1377 * relation[i] = tuple((val1, val2)) * # print(relation) * induced_cost = self.c_env.computeInducedCost(g_id, h_id, relation) # <<<<<<<<<<<<<< * node_map.set_induced_cost(induced_cost) * */ - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_g_id); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_h_id); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error) - __pyx_t_11 = __pyx_convert_vector_from_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e___(__pyx_v_relation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_v_g_id); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_size_t(__pyx_v_h_id); if (unlikely((__pyx_t_10 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_11 = __pyx_convert_vector_from_py_std_3a__3a_pair_3c_size_t_2c_size_t_3e___(__pyx_v_relation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L1_error) try { __pyx_t_12 = __pyx_v_self->c_env->computeInducedCost(__pyx_t_9, __pyx_t_10, __pyx_t_11); } catch(...) { __Pyx_CppExn2PyErr(); - __PYX_ERR(0, 1369, __pyx_L1_error) + __PYX_ERR(0, 1377, __pyx_L1_error) } __pyx_v_induced_cost = __pyx_t_12; - /* "gedlibpy.pyx":1370 + /* "gedlibpy.pyx":1378 * # print(relation) * induced_cost = self.c_env.computeInducedCost(g_id, h_id, relation) * node_map.set_induced_cost(induced_cost) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_set_induced_cost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node_map, __pyx_n_s_set_induced_cost); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_induced_cost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_induced_cost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14582,12 +14584,12 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_126compute_induced_cost(struct __pyx __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1342 + /* "gedlibpy.pyx":1350 * * * def compute_induced_cost(self, g_id, h_id, node_map): # <<<<<<<<<<<<<< @@ -14726,7 +14728,7 @@ static PyObject *__pyx_pf_8gedlibpy_6GEDEnv_130__setstate_cython__(CYTHON_UNUSED return __pyx_r; } -/* "gedlibpy.pyx":1400 +/* "gedlibpy.pyx":1408 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< @@ -14767,11 +14769,11 @@ static PyObject *__pyx_pw_8gedlibpy_13EditCostError_1__init__(PyObject *__pyx_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1400, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1408, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1400, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1408, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14784,7 +14786,7 @@ static PyObject *__pyx_pw_8gedlibpy_13EditCostError_1__init__(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1400, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1408, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.EditCostError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14802,16 +14804,16 @@ static PyObject *__pyx_pf_8gedlibpy_13EditCostError___init__(CYTHON_UNUSED PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "gedlibpy.pyx":1407 + /* "gedlibpy.pyx":1415 * :type message: string * """ * self.message = message # <<<<<<<<<<<<<< * * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 1415, __pyx_L1_error) - /* "gedlibpy.pyx":1400 + /* "gedlibpy.pyx":1408 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< @@ -14831,7 +14833,7 @@ static PyObject *__pyx_pf_8gedlibpy_13EditCostError___init__(CYTHON_UNUSED PyObj return __pyx_r; } -/* "gedlibpy.pyx":1417 +/* "gedlibpy.pyx":1425 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< @@ -14872,11 +14874,11 @@ static PyObject *__pyx_pw_8gedlibpy_11MethodError_1__init__(PyObject *__pyx_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1417, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1425, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1417, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1425, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14889,7 +14891,7 @@ static PyObject *__pyx_pw_8gedlibpy_11MethodError_1__init__(PyObject *__pyx_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1417, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1425, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.MethodError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14907,16 +14909,16 @@ static PyObject *__pyx_pf_8gedlibpy_11MethodError___init__(CYTHON_UNUSED PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "gedlibpy.pyx":1424 + /* "gedlibpy.pyx":1432 * :type message: string * """ * self.message = message # <<<<<<<<<<<<<< * * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 1432, __pyx_L1_error) - /* "gedlibpy.pyx":1417 + /* "gedlibpy.pyx":1425 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< @@ -14936,7 +14938,7 @@ static PyObject *__pyx_pf_8gedlibpy_11MethodError___init__(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "gedlibpy.pyx":1434 +/* "gedlibpy.pyx":1442 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< @@ -14977,11 +14979,11 @@ static PyObject *__pyx_pw_8gedlibpy_9InitError_1__init__(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1434, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1442, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1434, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1442, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14994,7 +14996,7 @@ static PyObject *__pyx_pw_8gedlibpy_9InitError_1__init__(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1434, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1442, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("gedlibpy.InitError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15012,16 +15014,16 @@ static PyObject *__pyx_pf_8gedlibpy_9InitError___init__(CYTHON_UNUSED PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "gedlibpy.pyx":1441 + /* "gedlibpy.pyx":1449 * :type message: string * """ * self.message = message # <<<<<<<<<<<<<< * * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 1441, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_message, __pyx_v_message) < 0) __PYX_ERR(0, 1449, __pyx_L1_error) - /* "gedlibpy.pyx":1434 + /* "gedlibpy.pyx":1442 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< @@ -15041,7 +15043,7 @@ static PyObject *__pyx_pf_8gedlibpy_9InitError___init__(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "gedlibpy.pyx":1448 +/* "gedlibpy.pyx":1456 * ######################################### * * def encode_your_map(map_u): # <<<<<<<<<<<<<< @@ -15081,19 +15083,19 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("encode_your_map", 0); - /* "gedlibpy.pyx":1460 + /* "gedlibpy.pyx":1468 * * """ * res = {} # <<<<<<<<<<<<<< * for key, value in map_u.items(): * res[key.encode('utf-8')] = value.encode('utf-8') */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1461 + /* "gedlibpy.pyx":1469 * """ * res = {} * for key, value in map_u.items(): # <<<<<<<<<<<<<< @@ -15103,9 +15105,9 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p __pyx_t_2 = 0; if (unlikely(__pyx_v_map_u == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1461, __pyx_L1_error) + __PYX_ERR(0, 1469, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_map_u, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_map_u, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -15113,7 +15115,7 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1461, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -15121,14 +15123,14 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "gedlibpy.pyx":1462 + /* "gedlibpy.pyx":1470 * res = {} * for key, value in map_u.items(): * res[key.encode('utf-8')] = value.encode('utf-8') # <<<<<<<<<<<<<< * return res * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -15142,10 +15144,10 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1462, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_encode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -15159,16 +15161,16 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p } __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1462, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_5, __pyx_t_6) < 0)) __PYX_ERR(0, 1462, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_5, __pyx_t_6) < 0)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1463 + /* "gedlibpy.pyx":1471 * for key, value in map_u.items(): * res[key.encode('utf-8')] = value.encode('utf-8') * return res # <<<<<<<<<<<<<< @@ -15180,7 +15182,7 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "gedlibpy.pyx":1448 + /* "gedlibpy.pyx":1456 * ######################################### * * def encode_your_map(map_u): # <<<<<<<<<<<<<< @@ -15206,7 +15208,7 @@ static PyObject *__pyx_pf_8gedlibpy_8encode_your_map(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "gedlibpy.pyx":1466 +/* "gedlibpy.pyx":1474 * * * def decode_your_map(map_b): # <<<<<<<<<<<<<< @@ -15246,19 +15248,19 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("decode_your_map", 0); - /* "gedlibpy.pyx":1478 + /* "gedlibpy.pyx":1486 * * """ * res = {} # <<<<<<<<<<<<<< * for key, value in map_b.items(): * res[key.decode('utf-8')] = value.decode('utf-8') */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1479 + /* "gedlibpy.pyx":1487 * """ * res = {} * for key, value in map_b.items(): # <<<<<<<<<<<<<< @@ -15268,9 +15270,9 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ __pyx_t_2 = 0; if (unlikely(__pyx_v_map_b == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1479, __pyx_L1_error) + __PYX_ERR(0, 1487, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_map_b, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1479, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_map_b, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -15278,7 +15280,7 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1479, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -15286,14 +15288,14 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "gedlibpy.pyx":1480 + /* "gedlibpy.pyx":1488 * res = {} * for key, value in map_b.items(): * res[key.decode('utf-8')] = value.decode('utf-8') # <<<<<<<<<<<<<< * return res * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1480, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -15307,10 +15309,10 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1480, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_decode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -15324,16 +15326,16 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ } __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_5, __pyx_t_6) < 0)) __PYX_ERR(0, 1480, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_res, __pyx_t_5, __pyx_t_6) < 0)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1481 + /* "gedlibpy.pyx":1489 * for key, value in map_b.items(): * res[key.decode('utf-8')] = value.decode('utf-8') * return res # <<<<<<<<<<<<<< @@ -15345,7 +15347,7 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "gedlibpy.pyx":1466 + /* "gedlibpy.pyx":1474 * * * def decode_your_map(map_b): # <<<<<<<<<<<<<< @@ -15371,7 +15373,7 @@ static PyObject *__pyx_pf_8gedlibpy_10decode_your_map(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "gedlibpy.pyx":1484 +/* "gedlibpy.pyx":1492 * * * def decode_graph_edges(map_edge_b): # <<<<<<<<<<<<<< @@ -15410,19 +15412,19 @@ static PyObject *__pyx_pf_8gedlibpy_12decode_graph_edges(CYTHON_UNUSED PyObject PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("decode_graph_edges", 0); - /* "gedlibpy.pyx":1502 + /* "gedlibpy.pyx":1510 * This is a helper function for function `GEDEnv.get_graph_edges()`. * """ * map_edges = {} # <<<<<<<<<<<<<< * for key, value in map_edge_b.items(): * map_edges[key] = decode_your_map(value) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_map_edges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1503 + /* "gedlibpy.pyx":1511 * """ * map_edges = {} * for key, value in map_edge_b.items(): # <<<<<<<<<<<<<< @@ -15432,9 +15434,9 @@ static PyObject *__pyx_pf_8gedlibpy_12decode_graph_edges(CYTHON_UNUSED PyObject __pyx_t_2 = 0; if (unlikely(__pyx_v_map_edge_b == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1503, __pyx_L1_error) + __PYX_ERR(0, 1511, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_map_edge_b, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_map_edge_b, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -15442,7 +15444,7 @@ static PyObject *__pyx_pf_8gedlibpy_12decode_graph_edges(CYTHON_UNUSED PyObject while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1503, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -15450,14 +15452,14 @@ static PyObject *__pyx_pf_8gedlibpy_12decode_graph_edges(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "gedlibpy.pyx":1504 + /* "gedlibpy.pyx":1512 * map_edges = {} * for key, value in map_edge_b.items(): * map_edges[key] = decode_your_map(value) # <<<<<<<<<<<<<< * return map_edges * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1504, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_decode_your_map); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -15471,15 +15473,15 @@ static PyObject *__pyx_pf_8gedlibpy_12decode_graph_edges(CYTHON_UNUSED PyObject } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1504, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_map_edges, __pyx_v_key, __pyx_t_6) < 0)) __PYX_ERR(0, 1504, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_map_edges, __pyx_v_key, __pyx_t_6) < 0)) __PYX_ERR(0, 1512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1505 + /* "gedlibpy.pyx":1513 * for key, value in map_edge_b.items(): * map_edges[key] = decode_your_map(value) * return map_edges # <<<<<<<<<<<<<< @@ -15491,7 +15493,7 @@ static PyObject *__pyx_pf_8gedlibpy_12decode_graph_edges(CYTHON_UNUSED PyObject __pyx_r = __pyx_v_map_edges; goto __pyx_L0; - /* "gedlibpy.pyx":1484 + /* "gedlibpy.pyx":1492 * * * def decode_graph_edges(map_edge_b): # <<<<<<<<<<<<<< @@ -20776,12 +20778,12 @@ static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) { "UINT32_t", "X", "Y", + "__pyx_ctuple_2ae87__58ae9__std__in_map__lAngstd__in_pair__lAngsize_t__comma_size_t__rAng__comma_std__in_map__lAngstd__in_string__comma_std__in_string__rAng__rAng__etc__etc", + "__pyx_ctuple_2ae87__58ae9__std__in_map__lAngstd__in_pair__lAngsize_t__comma_size_t__rAng__comma_std__in_map__lAngstd__in_string__comma_std__in_string__rAng__rAng__etc__etc_struct", "__pyx_ctuple_Py_ssize_t", "__pyx_ctuple_Py_ssize_t__and_Py_ssize_t", "__pyx_ctuple_Py_ssize_t__and_Py_ssize_t_struct", "__pyx_ctuple_Py_ssize_t_struct", - "__pyx_ctuple_bfa21__6a9b6__std__in_map__lAngstd__in_pair__lAngsize_t__comma_size_t__rAng__comma_std__in_map__lAngstd__in_string__comma_std__in_string__rAng__rAng__etc__etc", - "__pyx_ctuple_bfa21__6a9b6__std__in_map__lAngstd__in_pair__lAngsize_t__comma_size_t__rAng__comma_std__in_map__lAngstd__in_string__comma_std__in_string__rAng__rAng__etc__etc_struct", "__pyx_ctuple_double", "__pyx_ctuple_double_struct", "__pyx_ctuple_size_t", @@ -21149,9 +21151,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 750, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 977, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 758, __pyx_L1_error) + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1372, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) @@ -21166,80 +21168,80 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "gedlibpy.pyx":977 + /* "gedlibpy.pyx":985 * self.restart_env() * * print("Loading graphs in progress...") # <<<<<<<<<<<<<< * for graph in dataset : * self.add_nx_graph(graph, classes) */ - __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Loading_graphs_in_progress); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 977, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Loading_graphs_in_progress); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "gedlibpy.pyx":981 + /* "gedlibpy.pyx":989 * self.add_nx_graph(graph, classes) * listID = self.graph_ids() * print("Graphs loaded ! ") # <<<<<<<<<<<<<< * print("Number of graphs = " + str(listID[1])) * */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Graphs_loaded); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Graphs_loaded); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 989, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "gedlibpy.pyx":985 + /* "gedlibpy.pyx":993 * * self.set_edit_cost(edit_cost) * print("Initialization in progress...") # <<<<<<<<<<<<<< * self.init(init_option) * print("Initialization terminated !") */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Initialization_in_progress); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Initialization_in_progress); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 993, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "gedlibpy.pyx":987 + /* "gedlibpy.pyx":995 * print("Initialization in progress...") * self.init(init_option) * print("Initialization terminated !") # <<<<<<<<<<<<<< * * self.set_method(method, options) */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Initialization_terminated); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Initialization_terminated); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 995, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "gedlibpy.pyx":1002 + /* "gedlibpy.pyx":1010 * resMapping[g][h] = self.get_node_map(g, h) * * print("Finish ! The return contains edit distances and NodeMap but you can check the result with graphs'ID until you restart the environment") # <<<<<<<<<<<<<< * return resDistance, resMapping * */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Finish_The_return_contains_edit); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Finish_The_return_contains_edit); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "gedlibpy.pyx":1057 + /* "gedlibpy.pyx":1065 * #return res * * print ("Finish ! You can check the result with each ID of graphs ! There are in the return") # <<<<<<<<<<<<<< * print ("Please don't restart the environment or recall this function, you will lose your results !") * return listID */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Finish_You_can_check_the_result); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Finish_You_can_check_the_result); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "gedlibpy.pyx":1058 + /* "gedlibpy.pyx":1066 * * print ("Finish ! You can check the result with each ID of graphs ! There are in the return") * print ("Please don't restart the environment or recall this function, you will lose your results !") # <<<<<<<<<<<<<< * return listID * */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Please_don_t_restart_the_environ); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Please_don_t_restart_the_environ); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); @@ -21339,122 +21341,122 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - /* "gedlibpy.pyx":128 + /* "gedlibpy.pyx":129 * * * def get_edit_cost_options() : # <<<<<<<<<<<<<< * """ * Searchs the differents edit cost functions and returns the result. */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_option); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_option); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_edit_cost_options, 128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_edit_cost_options, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 129, __pyx_L1_error) - /* "gedlibpy.pyx":142 + /* "gedlibpy.pyx":143 * * * def get_method_options() : # <<<<<<<<<<<<<< * """ * Searchs the differents method for edit distance computation between graphs and returns the result. */ - __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_option); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_option); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); - __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_method_options, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_method_options, 143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 143, __pyx_L1_error) - /* "gedlibpy.pyx":155 + /* "gedlibpy.pyx":156 * * * def get_init_options() : # <<<<<<<<<<<<<< * """ * Searchs the differents initialization parameters for the environment computation for graphs and returns the result. */ - __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_option); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_option); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_init_options, 155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_init_options, 156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 156, __pyx_L1_error) - /* "gedlibpy.pyx":168 + /* "gedlibpy.pyx":169 * * * def get_dummy_node() : # <<<<<<<<<<<<<< * """ * Returns the ID of a dummy node. */ - __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_dummy_node, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_get_dummy_node, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 169, __pyx_L1_error) - /* "gedlibpy.pyx":1400 + /* "gedlibpy.pyx":1408 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< * """ * Inits the error with its message. */ - __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1400, __pyx_L1_error) + __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); - __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_init_2, 1400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 1400, __pyx_L1_error) + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_init_2, 1408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 1408, __pyx_L1_error) - /* "gedlibpy.pyx":1417 + /* "gedlibpy.pyx":1425 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< * """ * Inits the error with its message. */ - __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); - __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_init_2, 1417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_init_2, 1425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 1425, __pyx_L1_error) - /* "gedlibpy.pyx":1434 + /* "gedlibpy.pyx":1442 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< * """ * Inits the error with its message. */ - __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_init_2, 1434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_init_2, 1442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 1442, __pyx_L1_error) - /* "gedlibpy.pyx":1448 + /* "gedlibpy.pyx":1456 * ######################################### * * def encode_your_map(map_u): # <<<<<<<<<<<<<< * """ * Encodes Python unicode strings in dictionnary `map` to utf-8 byte strings for C++ functions. */ - __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_map_u, __pyx_n_s_res, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_map_u, __pyx_n_s_res, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_encode_your_map, 1448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_encode_your_map, 1456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1456, __pyx_L1_error) - /* "gedlibpy.pyx":1466 + /* "gedlibpy.pyx":1474 * * * def decode_your_map(map_b): # <<<<<<<<<<<<<< * """ * Decodes utf-8 byte strings in `map` from C++ functions to Python unicode strings. */ - __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_s_map_b, __pyx_n_s_res, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_s_map_b, __pyx_n_s_res, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_decode_your_map, 1466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_decode_your_map, 1474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1474, __pyx_L1_error) - /* "gedlibpy.pyx":1484 + /* "gedlibpy.pyx":1492 * * * def decode_graph_edges(map_edge_b): # <<<<<<<<<<<<<< * """ * Decode utf-8 byte strings in graph edges `map` from C++ functions to Python unicode strings. */ - __pyx_tuple__38 = PyTuple_Pack(4, __pyx_n_s_map_edge_b, __pyx_n_s_map_edges, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1484, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(4, __pyx_n_s_map_edge_b, __pyx_n_s_map_edges, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_decode_graph_edges, 1484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1484, __pyx_L1_error) + __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_gedlibpy_pyx, __pyx_n_s_decode_graph_edges, 1492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1492, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -21507,15 +21509,15 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_8gedlibpy_GEDEnv) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_8gedlibpy_GEDEnv) < 0) __PYX_ERR(0, 182, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_8gedlibpy_GEDEnv.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8gedlibpy_GEDEnv.tp_dictoffset && __pyx_type_8gedlibpy_GEDEnv.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_8gedlibpy_GEDEnv.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GEDEnv, (PyObject *)&__pyx_type_8gedlibpy_GEDEnv) < 0) __PYX_ERR(0, 180, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8gedlibpy_GEDEnv) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GEDEnv, (PyObject *)&__pyx_type_8gedlibpy_GEDEnv) < 0) __PYX_ERR(0, 182, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8gedlibpy_GEDEnv) < 0) __PYX_ERR(0, 182, __pyx_L1_error) __pyx_ptype_8gedlibpy_GEDEnv = &__pyx_type_8gedlibpy_GEDEnv; __Pyx_RefNannyFinishContext(); return 0; @@ -21793,588 +21795,588 @@ if (!__Pyx_RefNanny) { if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - /* "gedlibpy.pyx":115 - * ############################# + /* "gedlibpy.pyx":116 * + * import cython * import numpy as np # <<<<<<<<<<<<<< * import networkx as nx * from gklearn.ged.env import NodeMap */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 115, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":116 - * + /* "gedlibpy.pyx":117 + * import cython * import numpy as np * import networkx as nx # <<<<<<<<<<<<<< * from gklearn.ged.env import NodeMap * */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_networkx, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_networkx, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_nx, __pyx_t_1) < 0) __PYX_ERR(0, 116, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_nx, __pyx_t_1) < 0) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":117 + /* "gedlibpy.pyx":118 * import numpy as np * import networkx as nx * from gklearn.ged.env import NodeMap # <<<<<<<<<<<<<< * * # import librariesImport */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_NodeMap); __Pyx_GIVEREF(__pyx_n_s_NodeMap); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NodeMap); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_gklearn_ged_env, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_gklearn_ged_env, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NodeMap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NodeMap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NodeMap, __pyx_t_1) < 0) __PYX_ERR(0, 117, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NodeMap, __pyx_t_1) < 0) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "gedlibpy.pyx":120 + /* "gedlibpy.pyx":121 * * # import librariesImport * from ctypes import * # <<<<<<<<<<<<<< * import os * lib1 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/fann/libdoublefann.so') */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s__20); __Pyx_GIVEREF(__pyx_n_s__20); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__20); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_ctypes, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_import_star(__pyx_t_1) < 0) __PYX_ERR(0, 120, __pyx_L1_error); + if (__pyx_import_star(__pyx_t_1) < 0) __PYX_ERR(0, 121, __pyx_L1_error); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":121 + /* "gedlibpy.pyx":122 * # import librariesImport * from ctypes import * * import os # <<<<<<<<<<<<<< * lib1 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/fann/libdoublefann.so') * lib2 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/libsvm.3.22/libsvm.so') */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 121, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":122 + /* "gedlibpy.pyx":123 * from ctypes import * * import os * lib1 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/fann/libdoublefann.so') # <<<<<<<<<<<<<< * lib2 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/libsvm.3.22/libsvm.so') * lib3 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libnomad.so') */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cdll); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cdll); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_realpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_realpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_lib_fann_libdoublefann_so); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_lib_fann_libdoublefann_so); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib1, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib1, __pyx_t_4) < 0) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":123 + /* "gedlibpy.pyx":124 * import os * lib1 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/fann/libdoublefann.so') * lib2 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/libsvm.3.22/libsvm.so') # <<<<<<<<<<<<<< * lib3 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libnomad.so') * lib4 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libsgtelib.so') */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cdll); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cdll); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_realpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_realpath); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_u_lib_libsvm_3_22_libsvm_so); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_u_lib_libsvm_3_22_libsvm_so); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib2, __pyx_t_1) < 0) __PYX_ERR(0, 123, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib2, __pyx_t_1) < 0) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":124 + /* "gedlibpy.pyx":125 * lib1 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/fann/libdoublefann.so') * lib2 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/libsvm.3.22/libsvm.so') * lib3 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libnomad.so') # <<<<<<<<<<<<<< * lib4 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libsgtelib.so') * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cdll); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cdll); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dirname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_realpath); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_realpath); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_file); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_lib_nomad_libnomad_so); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_kp_u_lib_nomad_libnomad_so); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib3, __pyx_t_4) < 0) __PYX_ERR(0, 124, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib3, __pyx_t_4) < 0) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":125 + /* "gedlibpy.pyx":126 * lib2 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/libsvm.3.22/libsvm.so') * lib3 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libnomad.so') * lib4 = cdll.LoadLibrary(os.path.dirname(os.path.realpath(__file__)) + '/lib/nomad/libsgtelib.so') # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cdll); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cdll); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_LoadLibrary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_realpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_realpath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_kp_u_lib_nomad_libsgtelib_so); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_kp_u_lib_nomad_libsgtelib_so); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib4, __pyx_t_1) < 0) __PYX_ERR(0, 125, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_lib4, __pyx_t_1) < 0) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":128 + /* "gedlibpy.pyx":129 * * * def get_edit_cost_options() : # <<<<<<<<<<<<<< * """ * Searchs the differents edit cost functions and returns the result. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_1get_edit_cost_options, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_1get_edit_cost_options, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_edit_cost_options, __pyx_t_1) < 0) __PYX_ERR(0, 128, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_edit_cost_options, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":142 + /* "gedlibpy.pyx":143 * * * def get_method_options() : # <<<<<<<<<<<<<< * """ * Searchs the differents method for edit distance computation between graphs and returns the result. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_3get_method_options, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_3get_method_options, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_method_options, __pyx_t_1) < 0) __PYX_ERR(0, 142, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_method_options, __pyx_t_1) < 0) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":155 + /* "gedlibpy.pyx":156 * * * def get_init_options() : # <<<<<<<<<<<<<< * """ * Searchs the differents initialization parameters for the environment computation for graphs and returns the result. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_5get_init_options, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_5get_init_options, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_init_options, __pyx_t_1) < 0) __PYX_ERR(0, 155, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_init_options, __pyx_t_1) < 0) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":168 + /* "gedlibpy.pyx":169 * * * def get_dummy_node() : # <<<<<<<<<<<<<< * """ * Returns the ID of a dummy node. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_7get_dummy_node, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_7get_dummy_node, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_dummy_node, __pyx_t_1) < 0) __PYX_ERR(0, 168, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_dummy_node, __pyx_t_1) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":485 + /* "gedlibpy.pyx":493 * * * def set_edit_cost(self, edit_cost, edit_cost_constant = []) : # <<<<<<<<<<<<<< * """ * Sets an edit cost function to the environment, if it exists. */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__2 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":504 + /* "gedlibpy.pyx":512 * * * def set_personal_edit_cost(self, edit_cost_constant = []) : # <<<<<<<<<<<<<< * """ * Sets an personal edit cost function to the environment. */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__3 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1377 + /* "gedlibpy.pyx":1385 * ##################################################################### * * list_of_edit_cost_options = get_edit_cost_options() # <<<<<<<<<<<<<< * list_of_method_options = get_method_options() * list_of_init_options = get_init_options() */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_edit_cost_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_edit_cost_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_of_edit_cost_options, __pyx_t_5) < 0) __PYX_ERR(0, 1377, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_of_edit_cost_options, __pyx_t_5) < 0) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":1378 + /* "gedlibpy.pyx":1386 * * list_of_edit_cost_options = get_edit_cost_options() * list_of_method_options = get_method_options() # <<<<<<<<<<<<<< * list_of_init_options = get_init_options() * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_method_options); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_method_options); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_of_method_options, __pyx_t_1) < 0) __PYX_ERR(0, 1378, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_of_method_options, __pyx_t_1) < 0) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1379 + /* "gedlibpy.pyx":1387 * list_of_edit_cost_options = get_edit_cost_options() * list_of_method_options = get_method_options() * list_of_init_options = get_init_options() # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_init_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_init_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_of_init_options, __pyx_t_5) < 0) __PYX_ERR(0, 1379, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_of_init_options, __pyx_t_5) < 0) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":1386 + /* "gedlibpy.pyx":1394 * ##################### * * class Error(Exception): # <<<<<<<<<<<<<< * """ * Class for error's management. This one is general. */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_error_s_management_Th); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_Error, __pyx_n_s_Error, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_error_s_management_Th); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Error, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Error, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_4) < 0) __PYX_ERR(0, 1386, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Error, __pyx_t_4) < 0) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":1393 + /* "gedlibpy.pyx":1401 * * * class EditCostError(Error) : # <<<<<<<<<<<<<< * """ * Class for Edit Cost Error. Raise an error if an edit cost function doesn't exist in the library (not in list_of_edit_cost_options). */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_EditCostError, __pyx_n_s_EditCostError, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_Edit_Cost_Error_Raise); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_EditCostError, __pyx_n_s_EditCostError, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_Edit_Cost_Error_Raise); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "gedlibpy.pyx":1400 + /* "gedlibpy.pyx":1408 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< * """ * Inits the error with its message. */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8gedlibpy_13EditCostError_1__init__, 0, __pyx_n_s_EditCostError___init, NULL, __pyx_n_s_gedlibpy, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8gedlibpy_13EditCostError_1__init__, 0, __pyx_n_s_EditCostError___init, NULL, __pyx_n_s_gedlibpy, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_4) < 0) __PYX_ERR(0, 1400, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_4) < 0) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":1393 + /* "gedlibpy.pyx":1401 * * * class EditCostError(Error) : # <<<<<<<<<<<<<< * """ * Class for Edit Cost Error. Raise an error if an edit cost function doesn't exist in the library (not in list_of_edit_cost_options). */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_EditCostError, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_EditCostError, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_EditCostError, __pyx_t_4) < 0) __PYX_ERR(0, 1393, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_EditCostError, __pyx_t_4) < 0) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1410 + /* "gedlibpy.pyx":1418 * * * class MethodError(Error) : # <<<<<<<<<<<<<< * """ * Class for Method Error. Raise an error if a computation method doesn't exist in the library (not in list_of_method_options). */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_MethodError, __pyx_n_s_MethodError, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_Method_Error_Raise_an); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_MethodError, __pyx_n_s_MethodError, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_Method_Error_Raise_an); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "gedlibpy.pyx":1417 + /* "gedlibpy.pyx":1425 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< * """ * Inits the error with its message. */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8gedlibpy_11MethodError_1__init__, 0, __pyx_n_s_MethodError___init, NULL, __pyx_n_s_gedlibpy, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8gedlibpy_11MethodError_1__init__, 0, __pyx_n_s_MethodError___init, NULL, __pyx_n_s_gedlibpy, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_4) < 0) __PYX_ERR(0, 1417, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_4) < 0) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":1410 + /* "gedlibpy.pyx":1418 * * * class MethodError(Error) : # <<<<<<<<<<<<<< * """ * Class for Method Error. Raise an error if a computation method doesn't exist in the library (not in list_of_method_options). */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MethodError, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MethodError, __pyx_t_5, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MethodError, __pyx_t_4) < 0) __PYX_ERR(0, 1410, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_MethodError, __pyx_t_4) < 0) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "gedlibpy.pyx":1427 + /* "gedlibpy.pyx":1435 * * * class InitError(Error) : # <<<<<<<<<<<<<< * """ * Class for Init Error. Raise an error if an init option doesn't exist in the library (not in list_of_init_options). */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1427, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_InitError, __pyx_n_s_InitError, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_Init_Error_Raise_an_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_InitError, __pyx_n_s_InitError, (PyObject *) NULL, __pyx_n_s_gedlibpy, __pyx_kp_s_Class_for_Init_Error_Raise_an_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "gedlibpy.pyx":1434 + /* "gedlibpy.pyx":1442 * :type message: string * """ * def __init__(self, message): # <<<<<<<<<<<<<< * """ * Inits the error with its message. */ - __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8gedlibpy_9InitError_1__init__, 0, __pyx_n_s_InitError___init, NULL, __pyx_n_s_gedlibpy, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8gedlibpy_9InitError_1__init__, 0, __pyx_n_s_InitError___init, NULL, __pyx_n_s_gedlibpy, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_4) < 0) __PYX_ERR(0, 1434, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init_2, __pyx_t_4) < 0) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "gedlibpy.pyx":1427 + /* "gedlibpy.pyx":1435 * * * class InitError(Error) : # <<<<<<<<<<<<<< * """ * Class for Init Error. Raise an error if an init option doesn't exist in the library (not in list_of_init_options). */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_InitError, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_InitError, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_InitError, __pyx_t_4) < 0) __PYX_ERR(0, 1427, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_InitError, __pyx_t_4) < 0) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1448 + /* "gedlibpy.pyx":1456 * ######################################### * * def encode_your_map(map_u): # <<<<<<<<<<<<<< * """ * Encodes Python unicode strings in dictionnary `map` to utf-8 byte strings for C++ functions. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_9encode_your_map, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_9encode_your_map, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode_your_map, __pyx_t_1) < 0) __PYX_ERR(0, 1448, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode_your_map, __pyx_t_1) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1466 + /* "gedlibpy.pyx":1474 * * * def decode_your_map(map_b): # <<<<<<<<<<<<<< * """ * Decodes utf-8 byte strings in `map` from C++ functions to Python unicode strings. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_11decode_your_map, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_11decode_your_map, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode_your_map, __pyx_t_1) < 0) __PYX_ERR(0, 1466, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode_your_map, __pyx_t_1) < 0) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "gedlibpy.pyx":1484 + /* "gedlibpy.pyx":1492 * * * def decode_graph_edges(map_edge_b): # <<<<<<<<<<<<<< * """ * Decode utf-8 byte strings in graph edges `map` from C++ functions to Python unicode strings. */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_13decode_graph_edges, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8gedlibpy_13decode_graph_edges, NULL, __pyx_n_s_gedlibpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode_graph_edges, __pyx_t_1) < 0) __PYX_ERR(0, 1484, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode_graph_edges, __pyx_t_1) < 0) __PYX_ERR(0, 1492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "gedlibpy.pyx":1 diff --git a/gklearn/gedlib/gedlibpy.cpython-36m-x86_64-linux-gnu.so b/gklearn/gedlib/gedlibpy.cpython-36m-x86_64-linux-gnu.so index 94b9401a92d6d6d3fa7ba03c3b42d0924d074018..9d24796d0afff95aaaad76f57ff8c9a29bc1b9e1 100644 GIT binary patch delta 118767 zcmZsk2Y3{>_V%@gnVn^E8Ngt`rkG~H-eNGlm|l&k!KRoFrW-=9rsL2<;LrmkgkA$I zEO;q_m>LL|7FwvmCiLF40KEV{(r*pX3o7MrghL>8 zZv;OJ&^mr7K@a)CMXts;RHY&OP@nejLks%I4;?7B37S3umn}otJ~o>5qRCB^ik1nq zzX^Ik@M_?F=p8qlV;H_26V1M+>P=xdhlVzVq2QCihtZCvFkEIB)&v+&uesqea>T(< z@Drn>*+l9ar<6y(t>k>YVV?j#gRaM+iK#~C`vZJO5zUk;mQ?E23Z(FXiH1QVc%_ZLo)!4?zdD1N^pK?Gz;`}X{8+WD^sX7WA3XB z(-gn2qgmGV7{(gTQuK2HxPWg5M>A2v1Ehke$yZ7y2sBVseD_UIcR)a zoVn>YepZh1C*Z6CB_}9NEtO~&KU5*VL>#J7JU`T+Wr?tirTaJp)PWE1;N<{#(9Dl& zwN-Lc%XUh*eTd=zZty4?-%hC_!5{!99ciaDvJW*Z!T>5$NPAcaaJhdpt4bZ)EA{Nd z42$Ui^=NZ@rJ)2d0F4)RP(1Sd>weKJjt+Ogtt@gx0mPHmQE6!(X%um`Z!~L1JvyRR z0mcAy^6c%X6wM|{^W=6VXBTCreY9cmpl382 zK~1_Ul_XdTFp6e(Rc1(_1B|8O-Ttxotp~pidUb;%qKr`h6KP+!f3n=|9?hmui|%NQ zuvh^wji@{NLx5%g-_ZT;$~O}1?H0{u(U=}ed9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-$ zB*9`>0!v{TxF8u)AQhIw3RnrNU^S${8dwYKU_ESrjj#zeLpo%@7T5~gU^`^O4%i91 zAPcf#H|&8N*bDn$KOBIAkPC<4Fyz4zI10xg9}3_&oPd*X3QofrI1A_CJY0Z_a0xEM b6}Sr5pb)OZ4Y&!n;5OW`t=75ER Date: Fri, 8 May 2020 16:43:28 +0200 Subject: [PATCH 08/17] Allow zero costs and no triangle rule when updating edit costs in MPG. --- gklearn/preimage/median_preimage_generator.py | 261 ++++++++++++++++-- 1 file changed, 236 insertions(+), 25 deletions(-) diff --git a/gklearn/preimage/median_preimage_generator.py b/gklearn/preimage/median_preimage_generator.py index 8753292..20fbec6 100644 --- a/gklearn/preimage/median_preimage_generator.py +++ b/gklearn/preimage/median_preimage_generator.py @@ -39,6 +39,8 @@ class MedianPreimageGenerator(PreimageGenerator): self.__max_itrs_without_update = 3 self.__epsilon_residual = 0.01 self.__epsilon_ec = 0.1 + self.__allow_zeros = False + self.__triangle_rule = True # values to compute. self.__runtime_optimize_ec = None self.__runtime_generate_preimage = None @@ -79,6 +81,8 @@ class MedianPreimageGenerator(PreimageGenerator): self.__epsilon_ec = kwargs.get('epsilon_ec', 0.1) self.__gram_matrix_unnorm = kwargs.get('gram_matrix_unnorm', None) self.__runtime_precompute_gm = kwargs.get('runtime_precompute_gm', None) + self.__allow_zeros = kwargs.get('allow_zeros', False) + self.__triangle_rule = kwargs.get('triangle_rule', True) def run(self): @@ -382,7 +386,8 @@ class MedianPreimageGenerator(PreimageGenerator): def __update_ecc(self, nb_cost_mat, dis_k_vec, rw_constraints='inequality'): # if self.__ds_name == 'Letter-high': - if self.__ged_options['edit_cost'] == 'LETTER': + if self.__ged_options['edit_cost'] == 'LETTER': + raise Exception('Cannot compute for cost "LETTER".') pass # # method 1: set alpha automatically, just tune c_vir and c_eir by # # LMS using cvxpy. @@ -461,32 +466,34 @@ class MedianPreimageGenerator(PreimageGenerator): # edit_costs_new = [x.value[0], x.value[0], x.value[1], x.value[2], x.value[2]] # edit_costs_new = np.array(edit_costs_new) # residual = np.sqrt(prob.value) - if rw_constraints == 'inequality': - # c_vs <= c_vi + c_vr. + if not self.__triangle_rule and self.__allow_zeros: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) - constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], - np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0]).T@x >= 0.01] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) edit_costs_new = x.value residual = np.sqrt(prob.value) - elif rw_constraints == '2constraints': - # c_vs <= c_vi + c_vr and c_vi == c_vr, c_ei == c_er. + elif self.__triangle_rule and self.__allow_zeros: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) - constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], - np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0, - np.array([1.0, -1.0, 0.0, 0.0, 0.0]).T@x == 0.0, - np.array([0.0, 0.0, 0.0, 1.0, -1.0]).T@x == 0.0] + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0]).T@x >= 0.01, + np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] prob = cp.Problem(cp.Minimize(cost_fun), constraints) - prob.solve() + self.__execute_cvx(prob) edit_costs_new = x.value residual = np.sqrt(prob.value) - elif rw_constraints == 'no-constraint': - # no constraint. + elif not self.__triangle_rule and not self.__allow_zeros: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) @@ -508,11 +515,36 @@ class MedianPreimageGenerator(PreimageGenerator): # edit_costs_new = [x.value[0], x.value[0], x.value[1], x.value[2], x.value[2]] # edit_costs_new = np.array(edit_costs_new) # residual = np.sqrt(prob.value) + elif self.__triangle_rule and not self.__allow_zeros: + # c_vs <= c_vi + c_vr. + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif rw_constraints == '2constraints': # @todo: rearrange it later. + # c_vs <= c_vi + c_vr and c_vi == c_vr, c_ei == c_er. + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0, + np.array([1.0, -1.0, 0.0, 0.0, 0.0]).T@x == 0.0, + np.array([0.0, 0.0, 0.0, 1.0, -1.0]).T@x == 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + prob.solve() + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif self.__ged_options['edit_cost'] == 'NON_SYMBOLIC': is_n_attr = np.count_nonzero(nb_cost_mat[:,2]) is_e_attr = np.count_nonzero(nb_cost_mat[:,5]) - if self.__ds_name == 'SYNTHETICnew': + if self.__ds_name == 'SYNTHETICnew': # @todo: rearrenge this later. # nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] nb_cost_mat_new = nb_cost_mat[:,[2,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) @@ -529,7 +561,149 @@ class MedianPreimageGenerator(PreimageGenerator): np.array([0.0]))) residual = np.sqrt(prob.value) - elif rw_constraints == 'inequality': + elif not self.__triangle_rule and self.__allow_zeros: + if is_n_attr and is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif is_n_attr and not is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0]).T@x >= 0.01] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value, np.array([0.0]))) + residual = np.sqrt(prob.value) + elif not is_n_attr and is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 1.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), x.value[2:])) + residual = np.sqrt(prob.value) + else: + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), + x.value[2:], np.array([0.0]))) + residual = np.sqrt(prob.value) + elif self.__triangle_rule and self.__allow_zeros: + if is_n_attr and is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, + np.array([0.0, 0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif is_n_attr and not is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0]).T@x >= 0.01, + np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value, np.array([0.0]))) + residual = np.sqrt(prob.value) + elif not is_n_attr and is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 1.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), x.value[2:])) + residual = np.sqrt(prob.value) + else: + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), + x.value[2:], np.array([0.0]))) + residual = np.sqrt(prob.value) + elif not self.__triangle_rule and not self.__allow_zeros: + if is_n_attr and is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif is_n_attr and not is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value, np.array([0.0]))) + residual = np.sqrt(prob.value) + elif not is_n_attr and is_e_attr: + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), x.value[2:])) + residual = np.sqrt(prob.value) + else: + nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] + x = cp.Variable(nb_cost_mat_new.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), + x.value[2:], np.array([0.0]))) + residual = np.sqrt(prob.value) + elif self.__triangle_rule and not self.__allow_zeros: # c_vs <= c_vi + c_vr. if is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] @@ -572,17 +746,54 @@ class MedianPreimageGenerator(PreimageGenerator): edit_costs_new = np.concatenate((x.value[0:2], np.array([0.0]), x.value[2:], np.array([0.0]))) residual = np.sqrt(prob.value) + elif self.__ged_options['edit_cost'] == 'CONSTANT': # @todo: node/edge may not labeled. - x = cp.Variable(nb_cost_mat.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) - constraints = [x >= [0.01 for i in range(nb_cost_mat.shape[1])], - np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, - np.array([0.0, 0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] - prob = cp.Problem(cp.Minimize(cost_fun), constraints) - self.__execute_cvx(prob) - edit_costs_new = x.value - residual = np.sqrt(prob.value) + if not self.__triangle_rule and self.__allow_zeros: + x = cp.Variable(nb_cost_mat.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif self.__triangle_rule and self.__allow_zeros: + x = cp.Variable(nb_cost_mat.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + constraints = [x >= [0.0 for i in range(nb_cost_mat.shape[1])], + np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 1.0, 0.0, 0.0]).T@x >= 0.01, + np.array([0.0, 0.0, 0.0, 0.0, 1.0, 0.0]).T@x >= 0.01, + np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, + np.array([0.0, 0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif not self.__triangle_rule and not self.__allow_zeros: + x = cp.Variable(nb_cost_mat.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat.shape[1])]] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) + elif self.__triangle_rule and not self.__allow_zeros: + x = cp.Variable(nb_cost_mat.shape[1]) + cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + constraints = [x >= [0.01 for i in range(nb_cost_mat.shape[1])], + np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, + np.array([0.0, 0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] + prob = cp.Problem(cp.Minimize(cost_fun), constraints) + self.__execute_cvx(prob) + edit_costs_new = x.value + residual = np.sqrt(prob.value) else: + raise Exception('The edit cost "', self.__ged_options['edit_cost'], '" is not supported for update progress.') # # method 1: simple least square method. # edit_costs_new, residual, _, _ = np.linalg.lstsq(nb_cost_mat, dis_k_vec, # rcond=None) From 7e94ecaf31f35a07fb006c794c147c2a6f044669 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Wed, 13 May 2020 16:31:37 +0200 Subject: [PATCH 09/17] Add k-nn test. --- gklearn/__init__.py | 2 +- gklearn/ged/util/util.py | 13 +- gklearn/kernels/graph_kernel.py | 3 + gklearn/preimage/__init__.py | 1 + gklearn/preimage/experiments/xp_1nn.py | 103 +++++ gklearn/preimage/kernel_knn_cv.py | 418 ++++++++++++++++++ gklearn/preimage/median_preimage_generator.py | 4 +- gklearn/preimage/utils.py | 52 +-- gklearn/utils/__init__.py | 2 + gklearn/utils/dataset.py | 20 +- gklearn/utils/knn.py | 141 ++++++ gklearn/utils/utils.py | 30 +- 12 files changed, 756 insertions(+), 33 deletions(-) create mode 100644 gklearn/preimage/experiments/xp_1nn.py create mode 100644 gklearn/preimage/kernel_knn_cv.py create mode 100644 gklearn/utils/knn.py diff --git a/gklearn/__init__.py b/gklearn/__init__.py index c607b26..08ca4ed 100644 --- a/gklearn/__init__.py +++ b/gklearn/__init__.py @@ -18,4 +18,4 @@ __date__ = "November 2017" # import sub modules # from gklearn import c_ext # from gklearn import ged -from gklearn import utils +# from gklearn import utils diff --git a/gklearn/ged/util/util.py b/gklearn/ged/util/util.py index d72c2e6..c41ca86 100644 --- a/gklearn/ged/util/util.py +++ b/gklearn/ged/util/util.py @@ -46,7 +46,7 @@ def compute_ged(g1, g2, options): return dis, pi_forward, pi_backward -def compute_geds(graphs, options={}, parallel=False): +def compute_geds(graphs, options={}, parallel=False, verbose=True): # initialize ged env. ged_env = gedlibpy.GEDEnv() ged_env.set_edit_cost(options['edit_cost'], edit_cost_constant=options['edit_cost_constants']) @@ -81,8 +81,11 @@ def compute_geds(graphs, options={}, parallel=False): G_listID = listID_toshare do_partial = partial(_wrapper_compute_ged_parallel, neo_options) pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(graphs, ged_env, listID)) - iterator = tqdm(pool.imap_unordered(do_partial, itr, chunksize), + if verbose: + iterator = tqdm(pool.imap_unordered(do_partial, itr, chunksize), desc='computing GEDs', file=sys.stdout) + else: + iterator = pool.imap_unordered(do_partial, itr, chunksize) # iterator = pool.imap_unordered(do_partial, itr, chunksize) for i, j, dis, n_eo_tmp in iterator: idx_itr = int(len(graphs) * i + j - (i + 1) * (i + 2) / 2) @@ -98,7 +101,11 @@ def compute_geds(graphs, options={}, parallel=False): else: ged_vec = [] n_edit_operations = [] - for i in tqdm(range(len(graphs)), desc='computing GEDs', file=sys.stdout): + if verbose: + iterator = tqdm(range(len(graphs)), desc='computing GEDs', file=sys.stdout) + else: + iterator = range(len(graphs)) + for i in iterator: # for i in range(len(graphs)): for j in range(i + 1, len(graphs)): dis, pi_forward, pi_backward = _compute_ged(ged_env, listID[i], listID[j], graphs[i], graphs[j]) diff --git a/gklearn/kernels/graph_kernel.py b/gklearn/kernels/graph_kernel.py index 6f667e1..db4abf8 100644 --- a/gklearn/kernels/graph_kernel.py +++ b/gklearn/kernels/graph_kernel.py @@ -67,6 +67,9 @@ class GraphKernel(object): def normalize_gm(self, gram_matrix): + import warnings + warnings.warn('gklearn.kernels.graph_kernel.normalize_gm will be deprecated, use gklearn.utils.normalize_gram_matrix instead', DeprecationWarning) + diag = gram_matrix.diagonal().copy() for i in range(len(gram_matrix)): for j in range(i, len(gram_matrix)): diff --git a/gklearn/preimage/__init__.py b/gklearn/preimage/__init__.py index f04b5cc..21e688e 100644 --- a/gklearn/preimage/__init__.py +++ b/gklearn/preimage/__init__.py @@ -12,3 +12,4 @@ __date__ = "March 2020" from gklearn.preimage.preimage_generator import PreimageGenerator from gklearn.preimage.median_preimage_generator import MedianPreimageGenerator +from gklearn.preimage.kernel_knn_cv import kernel_knn_cv diff --git a/gklearn/preimage/experiments/xp_1nn.py b/gklearn/preimage/experiments/xp_1nn.py new file mode 100644 index 0000000..872be03 --- /dev/null +++ b/gklearn/preimage/experiments/xp_1nn.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Mon May 11 14:15:11 2020 + +@author: ljia +""" +import functools +import multiprocessing +import os +import sys +import logging +from gklearn.utils.kernels import deltakernel, gaussiankernel, kernelproduct +from gklearn.preimage import kernel_knn_cv + +dir_root = '../results/xp_1nn.init1.no_triangle_rule.allow_zeros/' +num_random = 10 +initial_solutions = 1 +triangle_rule = False +allow_zeros = True +update_order = False +test_sizes = [0.9, 0.7] # , 0.5, 0.3, 0.1] + +def xp_knn_1_1(): + for test_size in test_sizes: + ds_name = 'Letter-high' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') +# sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: +# for train_examples in ['expert']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples +# try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=None, edge_required=False, cut_range=None) +# except Exception as exp: +# print('An exception occured when running this experiment:') +# LOG_FILENAME = dir_save + 'error.txt' +# logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) +# logging.exception('') +# print(repr(exp)) + + +if __name__ == '__main__': + xp_knn_1_1() \ No newline at end of file diff --git a/gklearn/preimage/kernel_knn_cv.py b/gklearn/preimage/kernel_knn_cv.py new file mode 100644 index 0000000..ce822aa --- /dev/null +++ b/gklearn/preimage/kernel_knn_cv.py @@ -0,0 +1,418 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Tue May 12 12:52:15 2020 + +@author: ljia +""" +import numpy as np +import csv +import os +import os.path +from gklearn.utils import Dataset +from sklearn.model_selection import ShuffleSplit +from gklearn.preimage import MedianPreimageGenerator +from gklearn.utils import normalize_gram_matrix, compute_distance_matrix +from gklearn.preimage.utils import get_same_item_indices +from gklearn.utils.knn import knn_classification +from gklearn.preimage.utils import compute_k_dis + + +def kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=True, load_gm='auto', dir_save='', irrelevant_labels=None, edge_required=False, cut_range=None): + + # 1. get dataset. + print('1. getting dataset...') + dataset_all = Dataset() + dataset_all.load_predefined_dataset(ds_name) + dataset_all.trim_dataset(edge_required=edge_required) + if irrelevant_labels is not None: + dataset_all.remove_labels(**irrelevant_labels) + if cut_range is not None: + dataset_all.cut_graphs(cut_range) +# datasets = split_dataset_by_target(dataset_all) + + if save_results: + # create result files. + print('creating output files...') + fn_output_detail, fn_output_summary = __init_output_file_knn(ds_name, kernel_options['name'], mpg_options['fit_method'], dir_save) + else: + fn_output_detail, fn_output_summary = None, None + + # 2. compute/load Gram matrix a priori. + print('2. computing/loading Gram matrix...') + gram_matrix_unnorm, time_precompute_gm = __get_gram_matrix(load_gm, dir_save, ds_name, kernel_options, dataset_all) + + # 3. perform k-nn CV. + print('3. performing k-nn CV...') + if train_examples == 'k-graphs' or train_examples == 'expert' or train_examples == 'random': + __kernel_knn_cv_median(dataset_all, ds_name, knn_options, mpg_options, kernel_options, mge_options, ged_options, gram_matrix_unnorm, time_precompute_gm, train_examples, save_results, dir_save, fn_output_detail, fn_output_summary) + + elif train_examples == 'best-dataset': + __kernel_knn_cv_best_ds(dataset_all, ds_name, knn_options, kernel_options, gram_matrix_unnorm, time_precompute_gm, train_examples, save_results, dir_save, fn_output_detail, fn_output_summary) + + elif train_examples == 'trainset': + __kernel_knn_cv_trainset(dataset_all, ds_name, knn_options, kernel_options, gram_matrix_unnorm, time_precompute_gm, train_examples, save_results, dir_save, fn_output_detail, fn_output_summary) + + print('\ncomplete.\n') + + +def __kernel_knn_cv_median(dataset_all, ds_name, knn_options, mpg_options, kernel_options, mge_options, ged_options, gram_matrix_unnorm, time_precompute_gm, train_examples, save_results, dir_save, fn_output_detail, fn_output_summary): + Gn = dataset_all.graphs + y_all = dataset_all.targets + n_neighbors, n_splits, test_size = knn_options['n_neighbors'], knn_options['n_splits'], knn_options['test_size'] + + # get shuffles. + train_indices, test_indices, train_nums, y_app = __get_shuffles(y_all, n_splits, test_size) + + accuracies = [[], [], []] + for trial in range(len(train_indices)): + print('\ntrial =', trial) + + train_index = train_indices[trial] + test_index = test_indices[trial] + G_app = [Gn[i] for i in train_index] + G_test = [Gn[i] for i in test_index] + y_test = [y_all[i] for i in test_index] + gm_unnorm_trial = gram_matrix_unnorm[train_index,:][:,train_index].copy() + + # compute pre-images for each class. + medians = [[], [], []] + train_nums_tmp = [0] + train_nums + print('\ncomputing pre-image for each class...\n') + for i_class in range(len(train_nums_tmp) - 1): + print(i_class + 1, 'of', len(train_nums_tmp) - 1, 'classes:') + i_start = int(np.sum(train_nums_tmp[0:i_class + 1])) + i_end = i_start + train_nums_tmp[i_class + 1] + median_set = G_app[i_start:i_end] + + dataset = dataset_all.copy() + dataset.load_graphs(median_set.copy(), targets=None) + mge_options['update_order'] = True + mpg_options['gram_matrix_unnorm'] = gm_unnorm_trial[i_start:i_end,i_start:i_end].copy() + mpg_options['runtime_precompute_gm'] = 0 + set_median, gen_median_uo = __generate_median_preimages(dataset, mpg_options, kernel_options, ged_options, mge_options) + mge_options['update_order'] = False + mpg_options['gram_matrix_unnorm'] = gm_unnorm_trial[i_start:i_end,i_start:i_end].copy() + mpg_options['runtime_precompute_gm'] = 0 + _, gen_median = __generate_median_preimages(dataset, mpg_options, kernel_options, ged_options, mge_options) + medians[0].append(set_median) + medians[1].append(gen_median) + medians[2].append(gen_median_uo) + + # for each set of medians. + print('\nperforming k-nn...') + for i_app, G_app in enumerate(medians): + # compute dis_mat between medians. + dataset = dataset_all.copy() + dataset.load_graphs(G_app.copy(), targets=None) + gm_app_unnorm, _ = __compute_gram_matrix_unnorm(dataset, kernel_options.copy()) + + # compute the entire Gram matrix. + graph_kernel = __get_graph_kernel(dataset.copy(), kernel_options.copy()) + kernels_to_medians = [] + for g in G_app: + kernels_to_median, _ = graph_kernel.compute(g, G_test, **kernel_options.copy()) + kernels_to_medians.append(kernels_to_median) + kernels_to_medians = np.array(kernels_to_medians) + gm_all = np.concatenate((gm_app_unnorm, kernels_to_medians), axis=1) + gm_all = np.concatenate((gm_all, np.concatenate((kernels_to_medians.T, gram_matrix_unnorm[test_index,:][:,test_index].copy()), axis=1)), axis=0) + + gm_all = normalize_gram_matrix(gm_all.copy()) + dis_mat, _, _, _ = compute_distance_matrix(gm_all) + + N = len(G_app) + + d_app = dis_mat[range(N),:][:,range(N)].copy() + + d_test = np.zeros((N, len(test_index))) + for i in range(N): + for j in range(len(test_index)): + d_test[i, j] = dis_mat[i, j] + + accuracies[i_app].append(knn_classification(d_app, d_test, y_app, y_test, n_neighbors, verbose=True, text=train_examples)) + + # write result detail. + if save_results: + f_detail = open(dir_save + fn_output_detail, 'a') + print('writing results to files...') + for i, median_type in enumerate(['set-median', 'gen median', 'gen median uo']): + csv.writer(f_detail).writerow([ds_name, kernel_options['name'], + train_examples + ': ' + median_type, trial, + knn_options['n_neighbors'], + len(gm_all), knn_options['test_size'], + accuracies[i][-1][0], accuracies[i][-1][1]]) + f_detail.close() + + results = {} + results['ave_perf_train'] = [np.mean([i[0] for i in j], axis=0) for j in accuracies] + results['std_perf_train'] = [np.std([i[0] for i in j], axis=0, ddof=1) for j in accuracies] + results['ave_perf_test'] = [np.mean([i[1] for i in j], axis=0) for j in accuracies] + results['std_perf_test'] = [np.std([i[1] for i in j], axis=0, ddof=1) for j in accuracies] + + # write result summary for each letter. + if save_results: + f_summary = open(dir_save + fn_output_summary, 'a') + for i, median_type in enumerate('set-median', 'gen median', 'gen median uo'): + csv.writer(f_summary).writerow([ds_name, kernel_options['name'], + train_examples + ': ' + median_type, + knn_options['n_neighbors'], + knn_options['test_size'], results['ave_perf_train'][i], + results['ave_perf_test'][i], results['std_perf_train'][i], + results['std_perf_test'][i], time_precompute_gm]) + f_summary.close() + + +def __kernel_knn_cv_best_ds(dataset_all, ds_name, knn_options, kernel_options, gram_matrix_unnorm, time_precompute_gm, train_examples, save_results, dir_save, fn_output_detail, fn_output_summary): + Gn = dataset_all.graphs + y_all = dataset_all.targets + n_neighbors, n_splits, test_size = knn_options['n_neighbors'], knn_options['n_splits'], knn_options['test_size'] + + # get shuffles. + train_indices, test_indices, train_nums, y_app = __get_shuffles(y_all, n_splits, test_size) + + accuracies = [] + for trial in range(len(train_indices)): + print('\ntrial =', trial) + + train_index = train_indices[trial] + test_index = test_indices[trial] + G_app = [Gn[i] for i in train_index] + G_test = [Gn[i] for i in test_index] + y_test = [y_all[i] for i in test_index] + gm_unnorm_trial = gram_matrix_unnorm[train_index,:][:,train_index].copy() + + # get best graph from trainset according to distance in kernel space for each class. + best_graphs = [] + train_nums_tmp = [0] + train_nums + print('\ngetting best graph from trainset for each class...') + for i_class in range(len(train_nums_tmp) - 1): + print(i_class + 1, 'of', len(train_nums_tmp) - 1, 'classes.') + i_start = int(np.sum(train_nums_tmp[0:i_class + 1])) + i_end = i_start + train_nums_tmp[i_class + 1] + G_class = G_app[i_start:i_end] + gm_unnorm_class = gm_unnorm_trial[i_start:i_end,i_start:i_end] + gm_class = normalize_gram_matrix(gm_unnorm_class.copy()) + + k_dis_list = [] + for idx in range(len(G_class)): + k_dis_list.append(compute_k_dis(idx, range(0, len(G_class)), [1 / len(G_class)] * len(G_class), gm_class, withterm3=False)) + idx_k_dis_min = np.argmin(k_dis_list) + best_graphs.append(G_class[idx_k_dis_min].copy()) + + + # perform k-nn. + print('\nperforming k-nn...') + # compute dis_mat between medians. + dataset = dataset_all.copy() + dataset.load_graphs(best_graphs.copy(), targets=None) + gm_app_unnorm, _ = __compute_gram_matrix_unnorm(dataset, kernel_options.copy()) + + # compute the entire Gram matrix. + graph_kernel = __get_graph_kernel(dataset.copy(), kernel_options.copy()) + kernels_to_best_graphs = [] + for g in best_graphs: + kernels_to_best_graph, _ = graph_kernel.compute(g, G_test, **kernel_options.copy()) + kernels_to_best_graphs.append(kernels_to_best_graph) + kernels_to_best_graphs = np.array(kernels_to_best_graphs) + gm_all = np.concatenate((gm_app_unnorm, kernels_to_best_graphs), axis=1) + gm_all = np.concatenate((gm_all, np.concatenate((kernels_to_best_graphs.T, gram_matrix_unnorm[test_index,:][:,test_index].copy()), axis=1)), axis=0) + + gm_all = normalize_gram_matrix(gm_all.copy()) + dis_mat, _, _, _ = compute_distance_matrix(gm_all) + + N = len(best_graphs) + + d_app = dis_mat[range(N),:][:,range(N)].copy() + + d_test = np.zeros((N, len(test_index))) + for i in range(N): + for j in range(len(test_index)): + d_test[i, j] = dis_mat[i, j] + + accuracies.append(knn_classification(d_app, d_test, y_app, y_test, n_neighbors, verbose=True, text=train_examples)) + + # write result detail. + if save_results: + f_detail = open(dir_save + fn_output_detail, 'a') + print('writing results to files...') + csv.writer(f_detail).writerow([ds_name, kernel_options['name'], + train_examples, trial, + knn_options['n_neighbors'], + len(gm_all), knn_options['test_size'], + accuracies[-1][0], accuracies[-1][1]]) + f_detail.close() + + results = {} + results['ave_perf_train'] = np.mean([i[0] for i in accuracies], axis=0) + results['std_perf_train'] = np.std([i[0] for i in accuracies], axis=0, ddof=1) + results['ave_perf_test'] = np.mean([i[1] for i in accuracies], axis=0) + results['std_perf_test'] = np.std([i[1] for i in accuracies], axis=0, ddof=1) + + # write result summary for each letter. + if save_results: + f_summary = open(dir_save + fn_output_summary, 'a') + csv.writer(f_summary).writerow([ds_name, kernel_options['name'], + train_examples, + knn_options['n_neighbors'], + knn_options['test_size'], results['ave_perf_train'], + results['ave_perf_test'], results['std_perf_train'], + results['std_perf_test'], time_precompute_gm]) + f_summary.close() + + +def __kernel_knn_cv_trainset(dataset_all, ds_name, knn_options, kernel_options, gram_matrix_unnorm, time_precompute_gm, train_examples, save_results, dir_save, fn_output_detail, fn_output_summary): + y_all = dataset_all.targets + n_neighbors, n_splits, test_size = knn_options['n_neighbors'], knn_options['n_splits'], knn_options['test_size'] + + # compute distance matrix. + gram_matrix = normalize_gram_matrix(gram_matrix_unnorm.copy()) + dis_mat, _, _, _ = compute_distance_matrix(gram_matrix) + + # get shuffles. + train_indices, test_indices, _, _ = __get_shuffles(y_all, n_splits, test_size) + + accuracies = [] + for trial in range(len(train_indices)): + print('\ntrial =', trial) + + train_index = train_indices[trial] + test_index = test_indices[trial] + y_app = [y_all[i] for i in train_index] + y_test = [y_all[i] for i in test_index] + + N = len(train_index) + + d_app = dis_mat[train_index,:][:,train_index].copy() + + d_test = np.zeros((N, len(test_index))) + for i in range(N): + for j in range(len(test_index)): + d_test[i, j] = dis_mat[train_index[i], test_index[j]] + + accuracies.append(knn_classification(d_app, d_test, y_app, y_test, n_neighbors, verbose=True, text=train_examples)) + + # write result detail. + if save_results: + print('writing results to files...') + f_detail = open(dir_save + fn_output_detail, 'a') + csv.writer(f_detail).writerow([ds_name, kernel_options['name'], + train_examples, trial, knn_options['n_neighbors'], + len(gram_matrix), knn_options['test_size'], + accuracies[-1][0], accuracies[-1][1]]) + f_detail.close() + + results = {} + results['ave_perf_train'] = np.mean([i[0] for i in accuracies], axis=0) + results['std_perf_train'] = np.std([i[0] for i in accuracies], axis=0, ddof=1) + results['ave_perf_test'] = np.mean([i[1] for i in accuracies], axis=0) + results['std_perf_test'] = np.std([i[1] for i in accuracies], axis=0, ddof=1) + + # write result summary for each letter. + if save_results: + f_summary = open(dir_save + fn_output_summary, 'a') + csv.writer(f_summary).writerow([ds_name, kernel_options['name'], + train_examples, knn_options['n_neighbors'], + knn_options['test_size'], results['ave_perf_train'], + results['ave_perf_test'], results['std_perf_train'], + results['std_perf_test'], time_precompute_gm]) + f_summary.close() + + +def __get_shuffles(y_all, n_splits, test_size): + rs = ShuffleSplit(n_splits=n_splits, test_size=test_size, random_state=0) + train_indices = [[] for _ in range(n_splits)] + test_indices = [[] for _ in range(n_splits)] + idx_targets = get_same_item_indices(y_all) + train_nums = [] + keys = [] + for key, item in idx_targets.items(): + i = 0 + for train_i, test_i in rs.split(item): # @todo: careful when parallel. + train_indices[i] += [item[idx] for idx in train_i] + test_indices[i] += [item[idx] for idx in test_i] + i += 1 + train_nums.append(len(train_i)) + keys.append(key) + return train_indices, test_indices, train_nums, keys + + +def __generate_median_preimages(dataset, mpg_options, kernel_options, ged_options, mge_options): + mpg = MedianPreimageGenerator() + mpg.dataset = dataset.copy() + mpg.set_options(**mpg_options.copy()) + mpg.kernel_options = kernel_options.copy() + mpg.ged_options = ged_options.copy() + mpg.mge_options = mge_options.copy() + mpg.run() + return mpg.set_median, mpg.gen_median + + +def __get_gram_matrix(load_gm, dir_save, ds_name, kernel_options, dataset_all): + if load_gm == 'auto': + gm_fname = dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm.npz' + gmfile_exist = os.path.isfile(os.path.abspath(gm_fname)) + if gmfile_exist: + gmfile = np.load(gm_fname, allow_pickle=True) # @todo: may not be safe. + gram_matrix_unnorm = gmfile['gram_matrix_unnorm'] + time_precompute_gm = float(gmfile['run_time']) + else: + gram_matrix_unnorm, time_precompute_gm = __compute_gram_matrix_unnorm(dataset_all, kernel_options) + np.savez(dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm', gram_matrix_unnorm=gram_matrix_unnorm, run_time=time_precompute_gm) + elif not load_gm: + gram_matrix_unnorm, time_precompute_gm = __compute_gram_matrix_unnorm(dataset_all, kernel_options) + np.savez(dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm', gram_matrix_unnorm=gram_matrix_unnorm, run_time=time_precompute_gm) + else: + gmfile = np.load() + gram_matrix_unnorm = gmfile['gram_matrix_unnorm'] + time_precompute_gm = float(gmfile['run_time']) + + return gram_matrix_unnorm, time_precompute_gm + + +def __get_graph_kernel(dataset, kernel_options): + from gklearn.utils.utils import get_graph_kernel_by_name + graph_kernel = get_graph_kernel_by_name(kernel_options['name'], + node_labels=dataset.node_labels, + edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, + edge_attrs=dataset.edge_attrs, + ds_infos=dataset.get_dataset_infos(keys=['directed']), + kernel_options=kernel_options) + return graph_kernel + + +def __compute_gram_matrix_unnorm(dataset, kernel_options): + from gklearn.utils.utils import get_graph_kernel_by_name + graph_kernel = get_graph_kernel_by_name(kernel_options['name'], + node_labels=dataset.node_labels, + edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, + edge_attrs=dataset.edge_attrs, + ds_infos=dataset.get_dataset_infos(keys=['directed']), + kernel_options=kernel_options) + + gram_matrix, run_time = graph_kernel.compute(dataset.graphs, **kernel_options) + gram_matrix_unnorm = graph_kernel.gram_matrix_unnorm + + return gram_matrix_unnorm, run_time + + +def __init_output_file_knn(ds_name, gkernel, fit_method, dir_output): + if not os.path.exists(dir_output): + os.makedirs(dir_output) + fn_output_detail = 'results_detail_knn.' + ds_name + '.' + gkernel + '.csv' + f_detail = open(dir_output + fn_output_detail, 'a') + csv.writer(f_detail).writerow(['dataset', 'graph kernel', + 'train examples', 'trial', 'num neighbors', 'num graphs', 'test size', + 'perf train', 'perf test']) + f_detail.close() + + fn_output_summary = 'results_summary_knn.' + ds_name + '.' + gkernel + '.csv' + f_summary = open(dir_output + fn_output_summary, 'a') + csv.writer(f_summary).writerow(['dataset', 'graph kernel', + 'train examples', 'num neighbors', 'test size', + 'ave perf train', 'ave perf test', + 'std perf train', 'std perf test', 'time precompute gm']) + f_summary.close() + + return fn_output_detail, fn_output_summary \ No newline at end of file diff --git a/gklearn/preimage/median_preimage_generator.py b/gklearn/preimage/median_preimage_generator.py index 20fbec6..6c66de0 100644 --- a/gklearn/preimage/median_preimage_generator.py +++ b/gklearn/preimage/median_preimage_generator.py @@ -281,7 +281,7 @@ class MedianPreimageGenerator(PreimageGenerator): options['edge_labels'] = self._dataset.edge_labels options['node_attrs'] = self._dataset.node_attrs options['edge_attrs'] = self._dataset.edge_attrs - ged_vec_init, ged_mat, n_edit_operations = compute_geds(graphs, options=options, parallel=self.__parallel) + ged_vec_init, ged_mat, n_edit_operations = compute_geds(graphs, options=options, parallel=self.__parallel, verbose=(self._verbose > 1)) residual_list = [np.sqrt(np.sum(np.square(np.array(ged_vec_init) - dis_k_vec)))] time_list = [time.time() - time0] edit_cost_list = [self.__init_ecc] @@ -323,7 +323,7 @@ class MedianPreimageGenerator(PreimageGenerator): options['edge_labels'] = self._dataset.edge_labels options['node_attrs'] = self._dataset.node_attrs options['edge_attrs'] = self._dataset.edge_attrs - ged_vec, ged_mat, n_edit_operations = compute_geds(graphs, options=options, parallel=self.__parallel) + ged_vec, ged_mat, n_edit_operations = compute_geds(graphs, options=options, parallel=self.__parallel, verbose=(self._verbose > 1)) residual_list.append(np.sqrt(np.sum(np.square(np.array(ged_vec) - dis_k_vec)))) time_list.append(time.time() - time0) edit_cost_list.append(self.__edit_cost_constants) diff --git a/gklearn/preimage/utils.py b/gklearn/preimage/utils.py index f99ab8a..55e1e9e 100644 --- a/gklearn/preimage/utils.py +++ b/gklearn/preimage/utils.py @@ -45,7 +45,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged if save_results: # create result files. print('creating output files...') - fn_output_detail, fn_output_summary = __init_output_file(ds_name, kernel_options['name'], mpg_options['fit_method'], dir_save) + fn_output_detail, fn_output_summary = __init_output_file_preimage(ds_name, kernel_options['name'], mpg_options['fit_method'], dir_save) sod_sm_list = [] sod_gm_list = [] @@ -82,22 +82,22 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged gram_matrix_unnorm_list = [] time_precompute_gm_list = [] else: - gmfile = np.load() - gram_matrix_unnorm_list = gmfile['gram_matrix_unnorm_list'] - time_precompute_gm_list = gmfile['run_time_list'] -# repeats_better_sod_sm2gm = [] -# repeats_better_dis_k_sm2gm = [] -# repeats_better_dis_k_gi2sm = [] -# repeats_better_dis_k_gi2gm = [] + gmfile = np.load(gm_fname, allow_pickle=True) # @todo: may not be safe. + gram_matrix_unnorm_list = [item for item in gmfile['gram_matrix_unnorm_list']] + time_precompute_gm_list = gmfile['run_time_list'].tolist() +# repeats_better_sod_sm2gm = [] +# repeats_better_dis_k_sm2gm = [] +# repeats_better_dis_k_gi2sm = [] +# repeats_better_dis_k_gi2gm = [] - print('start generating preimage for each class of target...') + print('starting generating preimage for each class of target...') idx_offset = 0 for idx, dataset in enumerate(datasets): target = dataset.targets[0] print('\ntarget =', target, '\n') -# if target != 1: -# continue +# if target != 1: +# continue num_graphs = len(dataset.graphs) if num_graphs < 2: @@ -148,7 +148,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged results['sod_set_median'], results['sod_gen_median'], results['k_dis_set_median'], results['k_dis_gen_median'], results['k_dis_dataset'], sod_sm2gm, dis_k_sm2gm, - dis_k_gi2sm, dis_k_gi2gm, results['edit_cost_constants'], + dis_k_gi2sm, dis_k_gi2gm, results['edit_cost_constants'], results['runtime_precompute_gm'], results['runtime_optimize_ec'], results['runtime_generate_preimage'], results['runtime_total'], results['itrs'], results['converged'], @@ -177,7 +177,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged # # SOD SM -> GM if results['sod_set_median'] > results['sod_gen_median']: nb_sod_sm2gm[0] += 1 - # repeats_better_sod_sm2gm.append(1) + # repeats_better_sod_sm2gm.append(1) elif results['sod_set_median'] == results['sod_gen_median']: nb_sod_sm2gm[1] += 1 elif results['sod_set_median'] < results['sod_gen_median']: @@ -185,7 +185,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged # # dis_k SM -> GM if results['k_dis_set_median'] > results['k_dis_gen_median']: nb_dis_k_sm2gm[0] += 1 - # repeats_better_dis_k_sm2gm.append(1) + # repeats_better_dis_k_sm2gm.append(1) elif results['k_dis_set_median'] == results['k_dis_gen_median']: nb_dis_k_sm2gm[1] += 1 elif results['k_dis_set_median'] < results['k_dis_gen_median']: @@ -193,7 +193,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged # # dis_k gi -> SM if results['k_dis_dataset'] > results['k_dis_set_median']: nb_dis_k_gi2sm[0] += 1 - # repeats_better_dis_k_gi2sm.append(1) + # repeats_better_dis_k_gi2sm.append(1) elif results['k_dis_dataset'] == results['k_dis_set_median']: nb_dis_k_gi2sm[1] += 1 elif results['k_dis_dataset'] < results['k_dis_set_median']: @@ -201,7 +201,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged # # dis_k gi -> GM if results['k_dis_dataset'] > results['k_dis_gen_median']: nb_dis_k_gi2gm[0] += 1 - # repeats_better_dis_k_gi2gm.append(1) + # repeats_better_dis_k_gi2gm.append(1) elif results['k_dis_dataset'] == results['k_dis_gen_median']: nb_dis_k_gi2gm[1] += 1 elif results['k_dis_dataset'] < results['k_dis_gen_median']: @@ -225,7 +225,7 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged results['mge']['num_increase_order'] > 0, results['mge']['num_converged_descents'] > 0, nb_sod_sm2gm, - nb_dis_k_sm2gm, nb_dis_k_gi2sm, nb_dis_k_gi2gm]) + nb_dis_k_sm2gm, nb_dis_k_gi2sm, nb_dis_k_gi2gm]) f_summary.close() # save median graphs. @@ -235,15 +235,15 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged print('Saving median graphs to files...') fn_pre_sm = dir_save + 'medians/set_median.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) saveGXL(mpg.set_median, fn_pre_sm + '.gxl', method='default', - node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) fn_pre_gm = dir_save + 'medians/gen_median.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) saveGXL(mpg.gen_median, fn_pre_gm + '.gxl', method='default', - node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) fn_best_dataset = dir_save + 'medians/g_best_dataset.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) saveGXL(mpg.best_from_dataset, fn_best_dataset + '.gxl', method='default', - node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) # plot median graphs. @@ -304,10 +304,10 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged if (load_gm == 'auto' and not gmfile_exist) or not load_gm: np.savez(dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm', gram_matrix_unnorm_list=gram_matrix_unnorm_list, run_time_list=time_precompute_gm_list) - print('\ncomplete.') + print('\ncomplete.\n') -def __init_output_file(ds_name, gkernel, fit_method, dir_output): +def __init_output_file_preimage(ds_name, gkernel, fit_method, dir_output): if not os.path.exists(dir_output): os.makedirs(dir_output) # fn_output_detail = 'results_detail.' + ds_name + '.' + gkernel + '.' + fit_method + '.csv' @@ -335,9 +335,9 @@ def __init_output_file(ds_name, gkernel, fit_method, dir_output): 'num updates ecc', 'mge num decrease order', 'mge num increase order', 'mge num converged', '# SOD SM -> GM', '# dis_k SM -> GM', '# dis_k gi -> SM', '# dis_k gi -> GM']) -# 'repeats better SOD SM -> GM', -# 'repeats better dis_k SM -> GM', 'repeats better dis_k gi -> SM', -# 'repeats better dis_k gi -> GM']) +# 'repeats better SOD SM -> GM', +# 'repeats better dis_k SM -> GM', 'repeats better dis_k gi -> SM', +# 'repeats better dis_k gi -> GM']) f_summary.close() return fn_output_detail, fn_output_summary @@ -462,6 +462,8 @@ def gram2distances(Kmatrix): def kernel_distance_matrix(Gn, node_label, edge_label, Kmatrix=None, gkernel=None, verbose=True): + import warnings + warnings.warn('gklearn.preimage.utils.kernel_distance_matrix is deprecated, use gklearn.kernels.graph_kernel.compute_distance_matrix or gklearn.utils.compute_distance_matrix instead', DeprecationWarning) dis_mat = np.empty((len(Gn), len(Gn))) if Kmatrix is None: Kmatrix = compute_kernel(Gn, gkernel, node_label, edge_label, verbose) diff --git a/gklearn/utils/__init__.py b/gklearn/utils/__init__.py index 198bf75..af9c751 100644 --- a/gklearn/utils/__init__.py +++ b/gklearn/utils/__init__.py @@ -21,4 +21,6 @@ from gklearn.utils.timer import Timer from gklearn.utils.utils import get_graph_kernel_by_name from gklearn.utils.utils import compute_gram_matrices_by_class from gklearn.utils.utils import SpecialLabel +from gklearn.utils.utils import normalize_gram_matrix, compute_distance_matrix from gklearn.utils.trie import Trie +from gklearn.utils.knn import knn_cv, knn_classification diff --git a/gklearn/utils/dataset.py b/gklearn/utils/dataset.py index c499ce2..78d8841 100644 --- a/gklearn/utils/dataset.py +++ b/gklearn/utils/dataset.py @@ -522,6 +522,20 @@ class Dataset(object): self.__targets = [self.__targets[i] for i in idx] self.clean_labels() + + def copy(self): + dataset = Dataset() + graphs = self.__graphs.copy() if self.__graphs is not None else None + target = self.__targets.copy() if self.__targets is not None else None + node_labels = self.__node_labels.copy() if self.__node_labels is not None else None + node_attrs = self.__node_attrs.copy() if self.__node_attrs is not None else None + edge_labels = self.__edge_labels.copy() if self.__edge_labels is not None else None + edge_attrs = self.__edge_attrs.copy() if self.__edge_attrs is not None else None + dataset.load_graphs(graphs, target) + dataset.set_labels(node_labels=node_labels, node_attrs=node_attrs, edge_labels=edge_labels, edge_attrs=edge_attrs) + # @todo: clean_labels and add other class members? + return dataset + def __get_dataset_size(self): return len(self.__graphs) @@ -721,7 +735,11 @@ def split_dataset_by_target(dataset): sub_graphs = [graphs[i] for i in val] sub_dataset = Dataset() sub_dataset.load_graphs(sub_graphs, [key] * len(val)) - sub_dataset.set_labels(node_labels=dataset.node_labels, node_attrs=dataset.node_attrs, edge_labels=dataset.edge_labels, edge_attrs=dataset.edge_attrs) + node_labels = dataset.node_labels.copy() if dataset.node_labels is not None else None + node_attrs = dataset.node_attrs.copy() if dataset.node_attrs is not None else None + edge_labels = dataset.edge_labels.copy() if dataset.edge_labels is not None else None + edge_attrs = dataset.edge_attrs.copy() if dataset.edge_attrs is not None else None + sub_dataset.set_labels(node_labels=node_labels, node_attrs=node_attrs, edge_labels=edge_labels, edge_attrs=edge_attrs) datasets.append(sub_dataset) # @todo: clean_labels? return datasets \ No newline at end of file diff --git a/gklearn/utils/knn.py b/gklearn/utils/knn.py new file mode 100644 index 0000000..81419be --- /dev/null +++ b/gklearn/utils/knn.py @@ -0,0 +1,141 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Mon May 11 11:03:01 2020 + +@author: ljia +""" +import numpy as np +from sklearn.model_selection import ShuffleSplit +from sklearn.neighbors import KNeighborsClassifier +from sklearn.metrics import accuracy_score +from gklearn.utils.utils import get_graph_kernel_by_name +# from gklearn.preimage.utils import get_same_item_indices + +def sum_squares(a, b): + """ + Return the sum of squares of the difference between a and b, aka MSE + """ + return np.sum([(a[i] - b[i])**2 for i in range(len(a))]) + + +def euclid_d(x, y): + """ + 1D euclidean distance + """ + return np.sqrt((x-y)**2) + + +def man_d(x, y): + """ + 1D manhattan distance + """ + return np.abs((x-y)) + + +def knn_regression(D_app, D_test, y_app, y_test, n_neighbors, verbose=True, text=None): + + from sklearn.neighbors import KNeighborsRegressor + knn = KNeighborsRegressor(n_neighbors=n_neighbors, metric='precomputed') + knn.fit(D_app, y_app) + y_pred = knn.predict(D_app) + y_pred_test = knn.predict(D_test.T) + perf_app = np.sqrt(sum_squares(y_pred, y_app)/len(y_app)) + perf_test = np.sqrt(sum_squares(y_pred_test, y_test)/len(y_test)) + + if (verbose): + print("Learning error with {} train examples : {}".format(text, perf_app)) + print("Test error with {} train examples : {}".format(text, perf_test)) + + return perf_app, perf_test + + +def knn_classification(d_app, d_test, y_app, y_test, n_neighbors, verbose=True, text=None): + knn = KNeighborsClassifier(n_neighbors=n_neighbors, metric='precomputed') + knn.fit(d_app, y_app) + y_pred = knn.predict(d_app) + y_pred_test = knn.predict(d_test.T) + perf_app = accuracy_score(y_app, y_pred) + perf_test = accuracy_score(y_test, y_pred_test) + + if (verbose): + print("Learning accuracy with {} costs : {}".format(text, perf_app)) + print("Test accuracy with {} costs : {}".format(text, perf_test)) + + return perf_app, perf_test + + +def knn_cv(dataset, kernel_options, trainset=None, n_neighbors=1, n_splits=50, test_size=0.9, verbose=True): + ''' + Perform a knn classification cross-validation on given dataset. + ''' +# Gn = dataset.graphs + y_all = dataset.targets + + # compute kernel distances. + dis_mat = __compute_kernel_distances(dataset, kernel_options, trainset=trainset) + + + rs = ShuffleSplit(n_splits=n_splits, test_size=test_size, random_state=0) +# train_indices = [[] for _ in range(n_splits)] +# test_indices = [[] for _ in range(n_splits)] +# idx_targets = get_same_item_indices(y_all) +# for key, item in idx_targets.items(): +# i = 0 +# for train_i, test_i in rs.split(item): # @todo: careful when parallel. +# train_indices[i] += [item[idx] for idx in train_i] +# test_indices[i] += [item[idx] for idx in test_i] +# i += 1 + + accuracies = [] +# for trial in range(len(train_indices)): +# train_index = train_indices[trial] +# test_index = test_indices[trial] + for train_index, test_index in rs.split(y_all): +# print(train_index, test_index) +# G_app = [Gn[i] for i in train_index] +# G_test = [Gn[i] for i in test_index] + y_app = [y_all[i] for i in train_index] + y_test = [y_all[i] for i in test_index] + + N = len(train_index) + + d_app = dis_mat.copy() + d_app = d_app[train_index,:] + d_app = d_app[:,train_index] + + d_test = np.zeros((N, len(test_index))) + + for i in range(N): + for j in range(len(test_index)): + d_test[i, j] = dis_mat[train_index[i], test_index[j]] + + accuracies.append(knn_classification(d_app, d_test, y_app, y_test, n_neighbors, verbose=verbose, text='')) + + results = {} + results['ave_perf_train'] = np.mean([i[0] for i in accuracies], axis=0) + results['std_perf_train'] = np.std([i[0] for i in accuracies], axis=0, ddof=1) + results['ave_perf_test'] = np.mean([i[1] for i in accuracies], axis=0) + results['std_perf_test'] = np.std([i[1] for i in accuracies], axis=0, ddof=1) + + return results + + +def __compute_kernel_distances(dataset, kernel_options, trainset=None): + graph_kernel = get_graph_kernel_by_name(kernel_options['name'], + node_labels=dataset.node_labels, + edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, + edge_attrs=dataset.edge_attrs, + ds_infos=dataset.get_dataset_infos(keys=['directed']), + kernel_options=kernel_options) + + gram_matrix, run_time = graph_kernel.compute(dataset.graphs, **kernel_options) + + dis_mat, _, _, _ = graph_kernel.compute_distance_matrix() + + if trainset is not None: + gram_matrix_unnorm = graph_kernel.gram_matrix_unnorm + + + return dis_mat \ No newline at end of file diff --git a/gklearn/utils/utils.py b/gklearn/utils/utils.py index 14dc7c1..868f0f6 100644 --- a/gklearn/utils/utils.py +++ b/gklearn/utils/utils.py @@ -467,9 +467,37 @@ def get_mlti_dim_edge_attrs(G, attr_names): attributes.append(tuple(attrs[aname] for aname in attr_names)) return attributes + @unique class SpecialLabel(Enum): """can be used to define special labels. """ DUMMY = 1 # The dummy label. - # DUMMY = auto # enum.auto does not exist in Python 3.5. \ No newline at end of file + # DUMMY = auto # enum.auto does not exist in Python 3.5. + + +def normalize_gram_matrix(gram_matrix): + diag = gram_matrix.diagonal().copy() + for i in range(len(gram_matrix)): + for j in range(i, len(gram_matrix)): + gram_matrix[i][j] /= np.sqrt(diag[i] * diag[j]) + gram_matrix[j][i] = gram_matrix[i][j] + return gram_matrix + + +def compute_distance_matrix(gram_matrix): + dis_mat = np.empty((len(gram_matrix), len(gram_matrix))) + for i in range(len(gram_matrix)): + for j in range(i, len(gram_matrix)): + dis = gram_matrix[i, i] + gram_matrix[j, j] - 2 * gram_matrix[i, j] + if dis < 0: + if dis > -1e-10: + dis = 0 + else: + raise ValueError('The distance is negative.') + dis_mat[i, j] = np.sqrt(dis) + dis_mat[j, i] = dis_mat[i, j] + dis_max = np.max(np.max(dis_mat)) + dis_min = np.min(np.min(dis_mat[dis_mat != 0])) + dis_mean = np.mean(np.mean(dis_mat)) + return dis_mat, dis_max, dis_min, dis_mean \ No newline at end of file From 7293234d6c48d24ab0be0ce8d31a496867ab2edb Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Thu, 14 May 2020 18:39:49 +0200 Subject: [PATCH 10/17] Update and fix bugs in MGE: 1. avoid decreasing all median nodes. 2. in __compute_initial_node_labels(), stop appending elements to median_labels when all node_labels are already selected. 3. return False directly in __update_node_label() when node_labels is empty. 4. solve the bug that median is not modified in place in __delete_node_from_median(). --- gklearn/ged/median/median_graph_estimator.py | 104 ++++++++---------- gklearn/preimage/experiments/xp_1nn.py | 10 +- gklearn/preimage/kernel_knn_cv.py | 7 +- gklearn/preimage/median_preimage_generator.py | 4 +- gklearn/utils/dataset.py | 2 +- 5 files changed, 59 insertions(+), 68 deletions(-) diff --git a/gklearn/ged/median/median_graph_estimator.py b/gklearn/ged/median/median_graph_estimator.py index 9e0db71..c4291ce 100644 --- a/gklearn/ged/median/median_graph_estimator.py +++ b/gklearn/ged/median/median_graph_estimator.py @@ -370,7 +370,9 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__ged_env.init(self.__ged_env.get_init_type()) # Compute node maps and sum of distances for initial median. +# xxx = self.__node_maps_from_median self.__compute_init_node_maps(graph_ids, gen_median_id) +# yyy = self.__node_maps_from_median self.__best_init_sum_of_distances = min(self.__best_init_sum_of_distances, self.__sum_of_distances) self.__ged_env.load_nx_graph(median, set_median_id) @@ -557,7 +559,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __median_available(self): - return self.__gen_median_id != np.inf + return self.__median_id != np.inf def get_state(self): @@ -827,6 +829,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __update_node_labels(self, graphs, median): +# print('----------------------------') # Print information about current iteration. if self.__print_to_stdout == 2: @@ -834,14 +837,15 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # Iterate through all nodes of the median. for i in range(0, nx.number_of_nodes(median)): -# print('i: ', i) +# print('i: ', i) # Collect the labels of the substituted nodes. node_labels = [] for graph_id, graph in graphs.items(): -# print('graph_id: ', graph_id) -# print(self.__node_maps_from_median[graph_id]) +# print('graph_id: ', graph_id) +# print(self.__node_maps_from_median[graph_id]) +# print(self.__node_maps_from_median[graph_id].get_forward_map(), self.__node_maps_from_median[graph_id].get_backward_map()) k = self.__node_maps_from_median[graph_id].image(i) -# print('k: ', k) +# print('k: ', k) if k != np.inf: node_labels.append(graph.nodes[k]) @@ -961,6 +965,11 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no if self.__print_to_stdout == 2: print('Trying to decrease order: ... ', end='') + if nx.number_of_nodes(median) <= 1: + if self.__print_to_stdout == 2: + print('median graph has only 1 node, skip decrease.') + return False + # Initialize ID of the node that is to be deleted. id_deleted_node = [None] # @todo: or np.inf decreased_order = False @@ -968,7 +977,11 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # Decrease the order as long as the best deletion delta is negative. while self.__compute_best_deletion_delta(graphs, median, id_deleted_node) < -self.__epsilon: decreased_order = True - median = self.__delete_node_from_median(id_deleted_node[0], median) + self.__delete_node_from_median(id_deleted_node[0], median) + if nx.number_of_nodes(median) <= 1: + if self.__print_to_stdout == 2: + print('decrease stopped because median graph remains only 1 node. ', end='') + break # Print information about current iteration. if self.__print_to_stdout == 2: @@ -1011,16 +1024,22 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __delete_node_from_median(self, id_deleted_node, median): # Update the median. + mapping = {} + for i in range(0, nx.number_of_nodes(median)): + if i != id_deleted_node: + new_i = (i if i < id_deleted_node else (i - 1)) + mapping[i] = new_i median.remove_node(id_deleted_node) - median = nx.convert_node_labels_to_integers(median, first_label=0, ordering='default', label_attribute=None) # @todo: This doesn't guarantee that the order is the same as in G. + nx.relabel_nodes(median, mapping, copy=False) # Update the node maps. +# xxx = self.__node_maps_from_median for key, node_map in self.__node_maps_from_median.items(): new_node_map = NodeMap(nx.number_of_nodes(median), node_map.num_target_nodes()) is_unassigned_target_node = [True] * node_map.num_target_nodes() for i in range(0, nx.number_of_nodes(median) + 1): if i != id_deleted_node: - new_i = (i if i < id_deleted_node else i - 1) + new_i = (i if i < id_deleted_node else (i - 1)) k = node_map.image(i) new_node_map.add_assignment(new_i, k) if k != np.inf: @@ -1028,13 +1047,12 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no for k in range(0, node_map.num_target_nodes()): if is_unassigned_target_node[k]: new_node_map.add_assignment(np.inf, k) +# print(self.__node_maps_from_median[key].get_forward_map(), self.__node_maps_from_median[key].get_backward_map()) # print(new_node_map.get_forward_map(), new_node_map.get_backward_map()) self.__node_maps_from_median[key] = new_node_map # Increase overall number of decreases. self.__num_decrease_order += 1 - - return median def __increase_order(self, graphs, median): @@ -1230,15 +1248,22 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no continue for label in median_labels: weights[label_id] = min(weights[label_id], self.__ged_env.get_node_rel_cost(dict(label), dict(node_labels[label_id]))) - sum_weight = np.sum(weights) - if sum_weight == 0: - p = np.array([1 / len(weights)] * len(weights)) - else: - p = np.array(weights) / np.sum(weights) - selected_label_id = urng.choice(range(0, len(weights)), size=1, p=p)[0] # for c++ test: xxx[iii] + + # get non-zero weights. + weights_p, idx_p = [], [] + for i, w in enumerate(weights): + if w != 0: + weights_p.append(w) + idx_p.append(i) + if len(weights_p) > 0: + p = np.array(weights_p) / np.sum(weights_p) + selected_label_id = urng.choice(range(0, len(weights_p)), size=1, p=p)[0] # for c++ test: xxx[iii] + selected_label_id = idx_p[selected_label_id] # iii += 1 for c++ test - median_labels.append(node_labels[selected_label_id]) - already_selected[selected_label_id] = True + median_labels.append(node_labels[selected_label_id]) + already_selected[selected_label_id] = True + else: # skip the loop when all node_labels are selected. This happens when len(node_labels) <= self.__num_inits_increase_order. + break else: # Compute the initial node medians as the medians of randomly generated clusters of (roughly) equal size. # @todo: go through and test. @@ -1315,6 +1340,8 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def __update_node_label(self, node_labels, node_label): + if len(node_labels) == 0: # @todo: check if this is the correct solution. Especially after calling __update_config(). + return False new_node_label = self.__get_median_node_label(node_labels) if self.__ged_env.get_node_rel_cost(new_node_label, node_label) > self.__epsilon: node_label.clear() @@ -1360,47 +1387,6 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # Increase overall number of increases. self.__num_increase_order += 1 - - - def __improve_sum_of_distances(self, timer): - pass - - - def __median_available(self): - return self.__median_id != np.inf - - -# def __get_node_image_from_map(self, node_map, node): -# """ -# Return ID of the node mapping of `node` in `node_map`. - -# Parameters -# ---------- -# node_map : list[tuple(int, int)] -# List of node maps where the mapping node is found. -# -# node : int -# The mapping node of this node is returned - -# Raises -# ------ -# Exception -# If the node with ID `node` is not contained in the source nodes of the node map. - -# Returns -# ------- -# int -# ID of the mapping of `node`. -# -# Notes -# ----- -# This function is not implemented in the `ged::MedianGraphEstimator` class of the `GEDLIB` library. Instead it is a Python implementation of the `ged::NodeMap::image` function. -# """ -# if node < len(node_map): -# return node_map[node][1] if node_map[node][1] < len(node_map) else np.inf -# else: -# raise Exception('The node with ID ', str(node), ' is not contained in the source nodes of the node map.') -# return np.inf def __are_graphs_equal(self, g1, g2): diff --git a/gklearn/preimage/experiments/xp_1nn.py b/gklearn/preimage/experiments/xp_1nn.py index 872be03..a45a9c3 100644 --- a/gklearn/preimage/experiments/xp_1nn.py +++ b/gklearn/preimage/experiments/xp_1nn.py @@ -31,7 +31,7 @@ def xp_knn_1_1(): mpg_options = {'fit_method': 'k-graphs', 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], 'ds_name': ds_name, - 'parallel': True, # False + 'parallel': False, # False 'time_limit_in_sec': 0, 'max_itrs': 100, 'max_itrs_without_update': 3, @@ -100,4 +100,10 @@ def xp_knn_1_1(): if __name__ == '__main__': - xp_knn_1_1() \ No newline at end of file + import pdb, traceback + try: + xp_knn_1_1() + except: + extype, value, tb = sys.exc_info() + traceback.print_exc() + pdb.post_mortem(tb) \ No newline at end of file diff --git a/gklearn/preimage/kernel_knn_cv.py b/gklearn/preimage/kernel_knn_cv.py index ce822aa..2faf4ba 100644 --- a/gklearn/preimage/kernel_knn_cv.py +++ b/gklearn/preimage/kernel_knn_cv.py @@ -29,7 +29,6 @@ def kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_opti dataset_all.remove_labels(**irrelevant_labels) if cut_range is not None: dataset_all.cut_graphs(cut_range) -# datasets = split_dataset_by_target(dataset_all) if save_results: # create result files. @@ -86,7 +85,7 @@ def __kernel_knn_cv_median(dataset_all, ds_name, knn_options, mpg_options, kerne median_set = G_app[i_start:i_end] dataset = dataset_all.copy() - dataset.load_graphs(median_set.copy(), targets=None) + dataset.load_graphs([g.copy() for g in median_set], targets=None) mge_options['update_order'] = True mpg_options['gram_matrix_unnorm'] = gm_unnorm_trial[i_start:i_end,i_start:i_end].copy() mpg_options['runtime_precompute_gm'] = 0 @@ -104,7 +103,7 @@ def __kernel_knn_cv_median(dataset_all, ds_name, knn_options, mpg_options, kerne for i_app, G_app in enumerate(medians): # compute dis_mat between medians. dataset = dataset_all.copy() - dataset.load_graphs(G_app.copy(), targets=None) + dataset.load_graphs([g.copy() for g in G_app], targets=None) gm_app_unnorm, _ = __compute_gram_matrix_unnorm(dataset, kernel_options.copy()) # compute the entire Gram matrix. @@ -204,7 +203,7 @@ def __kernel_knn_cv_best_ds(dataset_all, ds_name, knn_options, kernel_options, g print('\nperforming k-nn...') # compute dis_mat between medians. dataset = dataset_all.copy() - dataset.load_graphs(best_graphs.copy(), targets=None) + dataset.load_graphs([g.copy() for g in best_graphs], targets=None) gm_app_unnorm, _ = __compute_gram_matrix_unnorm(dataset, kernel_options.copy()) # compute the entire Gram matrix. diff --git a/gklearn/preimage/median_preimage_generator.py b/gklearn/preimage/median_preimage_generator.py index 6c66de0..9aaa88a 100644 --- a/gklearn/preimage/median_preimage_generator.py +++ b/gklearn/preimage/median_preimage_generator.py @@ -891,8 +891,8 @@ class MedianPreimageGenerator(PreimageGenerator): ged_options = self.__ged_options.copy() if self.__parallel: ged_options['threads'] = 1 - self.__mge.set_init_method(self.__ged_options['method'], ged_options_to_string(ged_options)) - self.__mge.set_descent_method(self.__ged_options['method'], ged_options_to_string(ged_options)) + self.__mge.set_init_method(ged_options['method'], ged_options_to_string(ged_options)) + self.__mge.set_descent_method(ged_options['method'], ged_options_to_string(ged_options)) # Run the estimator. self.__mge.run(graph_ids, set_median_id, gen_median_id) diff --git a/gklearn/utils/dataset.py b/gklearn/utils/dataset.py index 78d8841..90bb886 100644 --- a/gklearn/utils/dataset.py +++ b/gklearn/utils/dataset.py @@ -525,7 +525,7 @@ class Dataset(object): def copy(self): dataset = Dataset() - graphs = self.__graphs.copy() if self.__graphs is not None else None + graphs = [g.copy() for g in self.__graphs] if self.__graphs is not None else None target = self.__targets.copy() if self.__targets is not None else None node_labels = self.__node_labels.copy() if self.__node_labels is not None else None node_attrs = self.__node_attrs.copy() if self.__node_attrs is not None else None From 34506302ce7365292b9254272ffd87307ab8f66a Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Fri, 15 May 2020 12:18:38 +0200 Subject: [PATCH 11/17] 1. Solve uncolsed file warning in graph_file.py. 2. Solve CXVPY * and @ warning in MPG. --- gklearn/preimage/experiments/xp_1nn.py | 109 - .../experiments/xp_1nn_init10_trianglerule.py | 3022 +++++++++++++++++ gklearn/preimage/median_preimage_generator.py | 60 +- gklearn/utils/graph_files.py | 37 +- 4 files changed, 3076 insertions(+), 152 deletions(-) delete mode 100644 gklearn/preimage/experiments/xp_1nn.py create mode 100644 gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py diff --git a/gklearn/preimage/experiments/xp_1nn.py b/gklearn/preimage/experiments/xp_1nn.py deleted file mode 100644 index a45a9c3..0000000 --- a/gklearn/preimage/experiments/xp_1nn.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -Created on Mon May 11 14:15:11 2020 - -@author: ljia -""" -import functools -import multiprocessing -import os -import sys -import logging -from gklearn.utils.kernels import deltakernel, gaussiankernel, kernelproduct -from gklearn.preimage import kernel_knn_cv - -dir_root = '../results/xp_1nn.init1.no_triangle_rule.allow_zeros/' -num_random = 10 -initial_solutions = 1 -triangle_rule = False -allow_zeros = True -update_order = False -test_sizes = [0.9, 0.7] # , 0.5, 0.3, 0.1] - -def xp_knn_1_1(): - for test_size in test_sizes: - ds_name = 'Letter-high' - knn_options = {'n_neighbors': 1, - 'n_splits': 30, - 'test_size': test_size, - 'verbose': True} - mpg_options = {'fit_method': 'k-graphs', - 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], - 'ds_name': ds_name, - 'parallel': False, # False - 'time_limit_in_sec': 0, - 'max_itrs': 100, - 'max_itrs_without_update': 3, - 'epsilon_residual': 0.01, - 'epsilon_ec': 0.1, - 'allow_zeros': allow_zeros, - 'triangle_rule': triangle_rule, - 'verbose': 1} - mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) - sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} - kernel_options = {'name': 'StructuralSP', - 'edge_weight': None, - 'node_kernels': sub_kernels, - 'edge_kernels': sub_kernels, - 'compute_method': 'naive', - 'parallel': 'imap_unordered', -# 'parallel': None, - 'n_jobs': multiprocessing.cpu_count(), - 'normalize': True, - 'verbose': 0} - ged_options = {'method': 'IPFP', - 'initialization_method': 'RANDOM', # 'NODE' - 'initial_solutions': initial_solutions, # 1 - 'edit_cost': 'LETTER2', - 'attr_distance': 'euclidean', - 'ratio_runs_from_initial_solutions': 1, - 'threads': multiprocessing.cpu_count(), - 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} - mge_options = {'init_type': 'MEDOID', - 'random_inits': 10, - 'time_limit': 0, - 'verbose': 1, - 'update_order': update_order, - 'randomness': 'REAL', - 'refine': False} - save_results = True - dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') - - if not os.path.exists(dir_save): - os.makedirs(dir_save) - file_output = open(dir_save + 'output.txt', 'a') -# sys.stdout = file_output - - # print settings. - print('parameters:') - print('dataset name:', ds_name) - print('mpg_options:', mpg_options) - print('kernel_options:', kernel_options) - print('ged_options:', ged_options) - print('mge_options:', mge_options) - print('save_results:', save_results) - - for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: -# for train_examples in ['expert']: - print('\n-------------------------------------') - print('train examples used:', train_examples, '\n') - mpg_options['fit_method'] = train_examples -# try: - kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=None, edge_required=False, cut_range=None) -# except Exception as exp: -# print('An exception occured when running this experiment:') -# LOG_FILENAME = dir_save + 'error.txt' -# logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) -# logging.exception('') -# print(repr(exp)) - - -if __name__ == '__main__': - import pdb, traceback - try: - xp_knn_1_1() - except: - extype, value, tb = sys.exc_info() - traceback.print_exc() - pdb.post_mortem(tb) \ No newline at end of file diff --git a/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py b/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py new file mode 100644 index 0000000..9af5828 --- /dev/null +++ b/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py @@ -0,0 +1,3022 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Fri May 15 10:50:46 2020 + +@author: ljia +""" +import multiprocessing +import functools +import sys +import os +import logging +from gklearn.utils.kernels import deltakernel, gaussiankernel, kernelproduct +from gklearn.preimage import kernel_knn_cv +from gklearn.utils import compute_gram_matrices_by_class + + +dir_root = '../results/xp_1nn.init10.triangle_rule/' +initial_solutions = 10 +triangle_rule = True +allow_zeros = False +update_order = False +test_sizes = [0.9, 0.7] # , 0.5, 0.3, 0.1] + + +def xp_median_preimage_14_1(): + """xp 14_1: DD, PathUpToH, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'DD' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'PathUpToH', + 'depth': 2, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # # compute gram matrices for each class a priori. + # print('Compute gram matrices for each class a priori.') + # compute_gram_matrices_by_class(ds_name, kernel_options, save_results=save_results, dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_13_1(): + """xp 13_1: PAH, StructuralSP, using NON_SYMBOLIC. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_13_2(): + """xp 13_2: PAH, ShortestPath, using NON_SYMBOLIC. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') # + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: # + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_1(): + """xp 12_1: PAH, StructuralSP, using NON_SYMBOLIC, unlabeled. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 0, 1, 1, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_2(): + """xp 12_2: PAH, PathUpToH, using CONSTANT, unlabeled. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'PathUpToH', + 'depth': 1, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_3(): + """xp 12_3: PAH, Treelet, using CONSTANT, unlabeled. + """ + from gklearn.utils.kernels import gaussiankernel + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + pkernel = functools.partial(gaussiankernel, gamma=None) # @todo + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_4(): + """xp 12_4: PAH, WeisfeilerLehman, using CONSTANT, unlabeled. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 14, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # # compute gram matrices for each class a priori. + # print('Compute gram matrices for each class a priori.') + # compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_5(): + """xp 12_5: PAH, ShortestPath, using NON_SYMBOLIC, unlabeled. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'PAH' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 0, 1, 1, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' # + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: # + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_1(): + """xp 9_1: MAO, StructuralSP, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'MAO' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_2(): + """xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'MAO' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'PathUpToH', + 'depth': 9, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_3(): + """xp 9_3: MAO, Treelet, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'MAO' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + pkernel = functools.partial(polynomialkernel, d=4, c=1e+7) + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_4(): + """xp 9_4: MAO, WeisfeilerLehman, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'MAO' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 6, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + +# # compute gram matrices for each class a priori. +# print('Compute gram matrices for each class a priori.') +# compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_1(): + """xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Monoterpenoides' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_2(): + """xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Monoterpenoides' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'PathUpToH', + 'depth': 7, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_3(): + """xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + """ + for test_size in test_sizes: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'Monoterpenoides' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + pkernel = functools.partial(polynomialkernel, d=2, c=1e+5) + kernel_options = {'name': 'Treelet', + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_4(): + """xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Monoterpenoides' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 4, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_1(): + """xp 7_1: MUTAG, StructuralSP, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'MUTAG' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_2(): + """xp 7_2: MUTAG, PathUpToH, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'MUTAG' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'PathUpToH', + 'depth': 2, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_7_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_3(): + """xp 7_3: MUTAG, Treelet, using CONSTANT. + """ + for test_size in test_sizes: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'MUTAG' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + pkernel = functools.partial(polynomialkernel, d=3, c=1e+8) + kernel_options = {'name': 'Treelet', + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_4(): + """xp 7_4: MUTAG, WeisfeilerLehman, using CONSTANT. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'MUTAG' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 1, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_6_1(): + """xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'COIL-RAG' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_6_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_6_2(): + """xp 6_2: COIL-RAG, ShortestPath, using NON_SYMBOLIC. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'COIL-RAG' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_6_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_5_1(): + """xp 5_1: FRANKENSTEIN, StructuralSP, using NON_SYMBOLIC. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'FRANKENSTEIN' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_4_1(): + """xp 4_1: COLORS-3, StructuralSP, using NON_SYMBOLIC. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'COLORS-3' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_3_2(): + """xp 3_2: Fingerprint, ShortestPath, using LETTER2, only node attrs. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Fingerprint' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.01, 0.125, 0.125], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = {'edge_attrs': ['orient', 'angle']} # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_3_1(): + """xp 3_1: Fingerprint, StructuralSP, using LETTER2, only node attrs. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Fingerprint' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.01, 0.125, 0.125], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = {'edge_attrs': ['orient', 'angle']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_2_1(): + """xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'COIL-DEL' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.node_attrs/' + irrelevant_labels = {'edge_labels': ['valence']} + edge_required = False + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + +# # compute gram matrices for each class a priori. +# print('Compute gram matrices for each class a priori.') +# compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for train_examples in ['k-graphs', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_1_1(): + """xp 1_1: Letter-high, StructuralSP. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Letter-high' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None + edge_required = False + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_1_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_1_2(): + """xp 1_2: Letter-high, ShortestPath. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Letter-high' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_1_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_10_1(): + """xp 10_1: Letter-med, StructuralSP. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Letter-med' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.75, 0.475, 0.475], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None + edge_required = False + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_10_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_10_2(): + """xp 10_2: Letter-med, ShortestPath. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Letter-med' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.75, 0.475, 0.475], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_10_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_11_1(): + """xp 11_1: Letter-low, StructuralSP. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Letter-low' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.075, 0.075, 0.25, 0.075, 0.075], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None + edge_required = False + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_11_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_11_2(): + """xp 11_2: Letter-low, ShortestPath. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'Letter-low' + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.075, 0.075, 0.25, 0.075, 0.075], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_11_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +if __name__ == "__main__": + +# #### xp 1_1: Letter-high, StructuralSP. + # xp_median_preimage_1_1() + +# #### xp 1_2: Letter-high, ShortestPath. + # xp_median_preimage_1_2() + +# #### xp 10_1: Letter-med, StructuralSP. + # xp_median_preimage_10_1() + +# #### xp 10_2: Letter-med, ShortestPath. + # xp_median_preimage_10_2() + +# #### xp 11_1: Letter-low, StructuralSP. + # xp_median_preimage_11_1() + +# #### xp 11_2: Letter-low, ShortestPath. + # xp_median_preimage_11_2() +# +# #### xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. +# # xp_median_preimage_2_1() +# +# #### xp 3_1: Fingerprint, StructuralSP, using LETTER2, only node attrs. +# # xp_median_preimage_3_1() + +# #### xp 3_2: Fingerprint, ShortestPath, using LETTER2, only node attrs. + # xp_median_preimage_3_2() + +# #### xp 4_1: COLORS-3, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_4_1() +# +# #### xp 5_1: FRANKENSTEIN, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_5_1() +# +# #### xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. + # xp_median_preimage_6_1() + +# #### xp 6_2: COIL-RAG, ShortestPath, using NON_SYMBOLIC. + # xp_median_preimage_6_2() + +# #### xp 7_1: MUTAG, StructuralSP, using CONSTANT. + # xp_median_preimage_7_1() + +# #### xp 7_2: MUTAG, PathUpToH, using CONSTANT. + # xp_median_preimage_7_2() + +# #### xp 7_3: MUTAG, Treelet, using CONSTANT. + # xp_median_preimage_7_3() + +# #### xp 7_4: MUTAG, WeisfeilerLehman, using CONSTANT. + # xp_median_preimage_7_4() +# +# #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + # xp_median_preimage_8_1() + +# #### xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + # xp_median_preimage_8_2() + +# #### xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + # xp_median_preimage_8_3() + +# #### xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + # xp_median_preimage_8_4() + +# #### xp 9_1: MAO, StructuralSP, using CONSTANT, symbolic only. + # xp_median_preimage_9_1() + +# #### xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. + # xp_median_preimage_9_2() + +# #### xp 9_3: MAO, Treelet, using CONSTANT, symbolic only. + # xp_median_preimage_9_3() + +# #### xp 9_4: MAO, WeisfeilerLehman, using CONSTANT, symbolic only. + # xp_median_preimage_9_4() + + #### xp 12_1: PAH, StructuralSP, using NON_SYMBOLIC, unlabeled. + # xp_median_preimage_12_1() + + #### xp 12_2: PAH, PathUpToH, using CONSTANT, unlabeled. + # xp_median_preimage_12_2() + + #### xp 12_3: PAH, Treelet, using CONSTANT, unlabeled. + # xp_median_preimage_12_3() + + #### xp 12_4: PAH, WeisfeilerLehman, using CONSTANT, unlabeled. + # xp_median_preimage_12_4() + + #### xp 12_5: PAH, ShortestPath, using NON_SYMBOLIC, unlabeled. + # xp_median_preimage_12_5() + + #### xp 13_1: PAH, StructuralSP, using NON_SYMBOLIC. + # xp_median_preimage_13_1() + + #### xp 13_2: PAH, ShortestPath, using NON_SYMBOLIC. +# xp_median_preimage_13_2() + + #### xp 14_1: DD, PathUpToH, using CONSTANT. +# xp_median_preimage_14_1() + + + + + + + + +# #### xp 1_1: Letter-high, StructuralSP. + xp_median_preimage_1_1() + +# #### xp 1_2: Letter-high, ShortestPath. + xp_median_preimage_1_2() + +# #### xp 10_1: Letter-med, StructuralSP. + xp_median_preimage_10_1() + +# #### xp 10_2: Letter-med, ShortestPath. + xp_median_preimage_10_2() + +# #### xp 11_1: Letter-low, StructuralSP. + xp_median_preimage_11_1() + +# #### xp 11_2: Letter-low, ShortestPath. + xp_median_preimage_11_2() + + #### xp 13_1: PAH, StructuralSP, using NON_SYMBOLIC. + xp_median_preimage_13_1() + + #### xp 13_2: PAH, ShortestPath, using NON_SYMBOLIC. + xp_median_preimage_13_2() + +# #### xp 7_2: MUTAG, PathUpToH, using CONSTANT. + xp_median_preimage_7_2() + +# #### xp 7_3: MUTAG, Treelet, using CONSTANT. + xp_median_preimage_7_3() + +# #### xp 7_4: MUTAG, WeisfeilerLehman, using CONSTANT. + xp_median_preimage_7_4() +# +# #### xp 7_1: MUTAG, StructuralSP, using CONSTANT. + xp_median_preimage_7_1() + +# #### xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + xp_median_preimage_8_2() + +# #### xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + xp_median_preimage_8_3() + +# #### xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + xp_median_preimage_8_4() + +# #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + xp_median_preimage_8_1() + +# #### xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. + xp_median_preimage_9_2() + +# #### xp 9_3: MAO, Treelet, using CONSTANT, symbolic only. + xp_median_preimage_9_3() + +# #### xp 9_4: MAO, WeisfeilerLehman, using CONSTANT, symbolic only. + xp_median_preimage_9_4() + +# #### xp 9_1: MAO, StructuralSP, using CONSTANT, symbolic only. + xp_median_preimage_9_1() + + #### xp 12_1: PAH, StructuralSP, using NON_SYMBOLIC, unlabeled. + xp_median_preimage_12_1() + + #### xp 12_2: PAH, PathUpToH, using CONSTANT, unlabeled. + xp_median_preimage_12_2() + + #### xp 12_3: PAH, Treelet, using CONSTANT, unlabeled. + xp_median_preimage_12_3() + + #### xp 12_4: PAH, WeisfeilerLehman, using CONSTANT, unlabeled. + xp_median_preimage_12_4() + + #### xp 12_5: PAH, ShortestPath, using NON_SYMBOLIC, unlabeled. + xp_median_preimage_12_5() + +# #### xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. + xp_median_preimage_6_1() +# +# #### xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. + xp_median_preimage_2_1() +# +# #### xp 3_1: Fingerprint, StructuralSP, using LETTER2, only node attrs. +# # xp_median_preimage_3_1() + +# #### xp 3_2: Fingerprint, ShortestPath, using LETTER2, only node attrs. + # xp_median_preimage_3_2() + +# #### xp 4_1: COLORS-3, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_4_1() +# +# #### xp 5_1: FRANKENSTEIN, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_5_1() +# +# #### xp 6_2: COIL-RAG, ShortestPath, using NON_SYMBOLIC. + # xp_median_preimage_6_2() + + #### xp 14_1: DD, PathUpToH, using CONSTANT. +# xp_median_preimage_14_1() \ No newline at end of file diff --git a/gklearn/preimage/median_preimage_generator.py b/gklearn/preimage/median_preimage_generator.py index 9aaa88a..9deabe0 100644 --- a/gklearn/preimage/median_preimage_generator.py +++ b/gklearn/preimage/median_preimage_generator.py @@ -443,7 +443,7 @@ class MedianPreimageGenerator(PreimageGenerator): # # 1. if c_vi != c_vr, c_ei != c_er. # nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] # x = cp.Variable(nb_cost_mat_new.shape[1]) - # cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + # cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) ## # 1.1 no constraints. ## constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])]] # # 1.2 c_vs <= c_vi + c_vr. @@ -454,7 +454,7 @@ class MedianPreimageGenerator(PreimageGenerator): ## nb_cost_mat_new[:,0] += nb_cost_mat[:,1] ## nb_cost_mat_new[:,2] += nb_cost_mat[:,5] ## x = cp.Variable(nb_cost_mat_new.shape[1]) - ## cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + ## cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) ## # 2.1 no constraints. ## constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])]] ### # 2.2 c_vs <= c_vi + c_vr. @@ -469,7 +469,7 @@ class MedianPreimageGenerator(PreimageGenerator): if not self.__triangle_rule and self.__allow_zeros: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -482,7 +482,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif self.__triangle_rule and self.__allow_zeros: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -496,7 +496,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif not self.__triangle_rule and not self.__allow_zeros: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) prob.solve() @@ -506,7 +506,7 @@ class MedianPreimageGenerator(PreimageGenerator): # # c_vs <= c_vi + c_vr. # nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] # x = cp.Variable(nb_cost_mat_new.shape[1]) - # cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + # cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) # constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], # np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] # prob = cp.Problem(cp.Minimize(cost_fun), constraints) @@ -519,7 +519,7 @@ class MedianPreimageGenerator(PreimageGenerator): # c_vs <= c_vi + c_vr. nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] prob = cp.Problem(cp.Minimize(cost_fun), constraints) @@ -530,7 +530,7 @@ class MedianPreimageGenerator(PreimageGenerator): # c_vs <= c_vi + c_vr and c_vi == c_vr, c_ei == c_er. nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0, np.array([1.0, -1.0, 0.0, 0.0, 0.0]).T@x == 0.0, @@ -548,7 +548,7 @@ class MedianPreimageGenerator(PreimageGenerator): # nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] nb_cost_mat_new = nb_cost_mat[:,[2,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) # constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], # np.array([0.0, 0.0, 0.0, 1.0, -1.0]).T@x == 0.0] # constraints = [x >= [0.0001 for i in range(nb_cost_mat_new.shape[1])]] @@ -565,7 +565,7 @@ class MedianPreimageGenerator(PreimageGenerator): if is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -578,7 +578,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif is_n_attr and not is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -591,7 +591,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif not is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -604,7 +604,7 @@ class MedianPreimageGenerator(PreimageGenerator): else: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -615,7 +615,7 @@ class MedianPreimageGenerator(PreimageGenerator): if is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -630,7 +630,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif is_n_attr and not is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -644,7 +644,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif not is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -658,7 +658,7 @@ class MedianPreimageGenerator(PreimageGenerator): else: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -669,7 +669,7 @@ class MedianPreimageGenerator(PreimageGenerator): if is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -678,7 +678,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif is_n_attr and not is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -687,7 +687,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif not is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -696,7 +696,7 @@ class MedianPreimageGenerator(PreimageGenerator): else: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -708,7 +708,7 @@ class MedianPreimageGenerator(PreimageGenerator): if is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, np.array([0.0, 0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] @@ -719,7 +719,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif is_n_attr and not is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,2,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] prob = cp.Problem(cp.Minimize(cost_fun), constraints) @@ -729,7 +729,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif not is_n_attr and is_e_attr: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4,5]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])], np.array([0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] prob = cp.Problem(cp.Minimize(cost_fun), constraints) @@ -739,7 +739,7 @@ class MedianPreimageGenerator(PreimageGenerator): else: nb_cost_mat_new = nb_cost_mat[:,[0,1,3,4]] x = cp.Variable(nb_cost_mat_new.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat_new * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat_new @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat_new.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -750,7 +750,7 @@ class MedianPreimageGenerator(PreimageGenerator): elif self.__ged_options['edit_cost'] == 'CONSTANT': # @todo: node/edge may not labeled. if not self.__triangle_rule and self.__allow_zeros: x = cp.Variable(nb_cost_mat.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -762,7 +762,7 @@ class MedianPreimageGenerator(PreimageGenerator): residual = np.sqrt(prob.value) elif self.__triangle_rule and self.__allow_zeros: x = cp.Variable(nb_cost_mat.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat.shape[1])], np.array([1.0, 0.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, np.array([0.0, 1.0, 0.0, 0.0, 0.0, 0.0]).T@x >= 0.01, @@ -776,7 +776,7 @@ class MedianPreimageGenerator(PreimageGenerator): residual = np.sqrt(prob.value) elif not self.__triangle_rule and not self.__allow_zeros: x = cp.Variable(nb_cost_mat.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat.shape[1])]] prob = cp.Problem(cp.Minimize(cost_fun), constraints) self.__execute_cvx(prob) @@ -784,7 +784,7 @@ class MedianPreimageGenerator(PreimageGenerator): residual = np.sqrt(prob.value) elif self.__triangle_rule and not self.__allow_zeros: x = cp.Variable(nb_cost_mat.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat @ x - dis_k_vec) constraints = [x >= [0.01 for i in range(nb_cost_mat.shape[1])], np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, np.array([0.0, 0.0, 0.0, 1.0, 1.0, -1.0]).T@x >= 0.0] @@ -818,7 +818,7 @@ class MedianPreimageGenerator(PreimageGenerator): # G = -1 * np.identity(nb_cost_mat.shape[1]) # h = np.array([0 for i in range(nb_cost_mat.shape[1])]) x = cp.Variable(nb_cost_mat.shape[1]) - cost_fun = cp.sum_squares(nb_cost_mat * x - dis_k_vec) + cost_fun = cp.sum_squares(nb_cost_mat @ x - dis_k_vec) constraints = [x >= [0.0 for i in range(nb_cost_mat.shape[1])], # np.array([1.0, 1.0, -1.0, 0.0, 0.0]).T@x >= 0.0] np.array([1.0, 1.0, -1.0, 0.0, 0.0, 0.0]).T@x >= 0.0, diff --git a/gklearn/utils/graph_files.py b/gklearn/utils/graph_files.py index d977b73..7de4ba0 100644 --- a/gklearn/utils/graph_files.py +++ b/gklearn/utils/graph_files.py @@ -494,7 +494,8 @@ def load_tud(filename): 'edge_labels': [], 'edge_attrs': []} class_label_map = None class_label_map_strings = [] - content_rm = open(frm).read().splitlines() + with open(frm) as rm: + content_rm = rm.read().splitlines() i = 0 while i < len(content_rm): line = content_rm[i].strip() @@ -558,16 +559,20 @@ def load_tud(filename): label_names = {'node_labels': [], 'node_attrs': [], 'edge_labels': [], 'edge_attrs': []} class_label_map = None - - content_gi = open(fgi).read().splitlines() # graph indicator - content_am = open(fam).read().splitlines() # adjacency matrix + + with open(fgi) as gi: + content_gi = gi.read().splitlines() # graph indicator + with open(fam) as am: + content_am = am.read().splitlines() # adjacency matrix # load targets. if 'fgl' in locals(): - content_targets = open(fgl).read().splitlines() # targets (classification) + with open(fgl) as gl: + content_targets = gl.read().splitlines() # targets (classification) targets = [float(i) for i in content_targets] elif 'fga' in locals(): - content_targets = open(fga).read().splitlines() # targets (regression) + with open(fga) as ga: + content_targets = ga.read().splitlines() # targets (regression) targets = [int(i) for i in content_targets] else: raise Exception('Can not find targets file. Please make sure there is a "', ds_name, '_graph_labels.txt" or "', ds_name, '_graph_attributes.txt"', 'file in your dataset folder.') @@ -577,7 +582,8 @@ def load_tud(filename): # create graphs and add nodes data = [nx.Graph(name=str(i)) for i in range(0, len(content_targets))] if 'fnl' in locals(): - content_nl = open(fnl).read().splitlines() # node labels + with open(fnl) as nl: + content_nl = nl.read().splitlines() # node labels for idx, line in enumerate(content_gi): # transfer to int first in case of unexpected blanks data[int(line) - 1].add_node(idx) @@ -605,7 +611,8 @@ def load_tud(filename): # add edge labels if 'fel' in locals(): - content_el = open(fel).read().splitlines() + with open(fel) as el: + content_el = el.read().splitlines() for idx, line in enumerate(content_el): labels = [l.strip() for l in line.split(',')] n = [int(i) - 1 for i in content_am[idx].split(',')] @@ -621,7 +628,8 @@ def load_tud(filename): # add node attributes if 'fna' in locals(): - content_na = open(fna).read().splitlines() + with open(fna) as na: + content_na = na.read().splitlines() for idx, line in enumerate(content_na): attrs = [a.strip() for a in line.split(',')] g = int(content_gi[idx]) - 1 @@ -636,7 +644,8 @@ def load_tud(filename): # add edge attributes if 'fea' in locals(): - content_ea = open(fea).read().splitlines() + with open(fea) as ea: + content_ea = ea.read().splitlines() for idx, line in enumerate(content_ea): attrs = [a.strip() for a in line.split(',')] n = [int(i) - 1 for i in content_am[idx].split(',')] @@ -669,7 +678,8 @@ def load_from_ds(filename, filename_targets): data = [] y = [] label_names = {'node_labels': [], 'edge_labels': [], 'node_attrs': [], 'edge_attrs': []} - content = open(filename).read().splitlines() + with open(filename) as fn: + content = fn.read().splitlines() extension = splitext(content[0].split(' ')[0])[1][1:] if extension == 'ct': load_file_fun = load_ct @@ -691,8 +701,9 @@ def load_from_ds(filename, filename_targets): g, l_names = load_file_fun(dirname_dataset + '/' + tmp.replace('#', '', 1)) data.append(g) __append_label_names(label_names, l_names) - - content_y = open(filename_targets).read().splitlines() + + with open(filename_targets) as fnt: + content_y = fnt.read().splitlines() # assume entries in filename and filename_targets have the same order. for item in content_y: tmp = item.split(' ') From cac0cfa114000ba3becb53bcae7715a299dc7acf Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Tue, 19 May 2020 10:00:42 +0200 Subject: [PATCH 12/17] Add tools to analyze preimage results. --- .gitignore | 1 + .../analyze_results_of_random_edit_costs.py | 86 +++++++ .../tools/preimage_results_to_latex_tables.py | 228 ++++++++++++++++++ 3 files changed, 315 insertions(+) create mode 100644 gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py create mode 100644 gklearn/preimage/experiments/tools/preimage_results_to_latex_tables.py diff --git a/.gitignore b/.gitignore index 0146aaf..13141a3 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ gklearn/kernels/*_sym.py gklearn/preimage/* !gklearn/preimage/*.py !gklearn/preimage/experiments/*.py +!gklearn/preimage/experiments/tools/*.py __pycache__ ##*# diff --git a/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py b/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py new file mode 100644 index 0000000..4dc20d3 --- /dev/null +++ b/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Tue Apr 14 16:57:18 2020 + +@author: ljia +""" +import pandas as pd +import numpy as np +import os +import math + +def summarize_results_of_random_edit_costs(data_dir, ds_name, gkernel): + sod_sm_list = [] + sod_gm_list = [] + dis_k_sm_list = [] + dis_k_gm_list = [] + dis_k_min_gi = [] + time_total_list = [] + mge_dec_order_list = [] + mge_inc_order_list = [] + + # get results from .csv. + file_name = data_dir + 'results_summary.' + ds_name + '.' + gkernel + '.csv' + try: + df = pd.read_csv(file_name) + except FileNotFoundError: + return + for index, row in df.iterrows(): + if row['target'] == 'all' and row['fit method'] == 'random': + if not math.isnan(float(row['SOD SM'])): + sod_sm_list.append(float(row['SOD SM'])) + if not math.isnan(float(row['SOD GM'])): + sod_gm_list.append(float(row['SOD GM'])) + if not math.isnan(float(row['dis_k SM'])): + dis_k_sm_list.append(float(row['dis_k SM'])) + if not math.isnan(float(row['dis_k GM'])): + dis_k_gm_list.append(float(row['dis_k GM'])) + if not math.isnan(float(row['min dis_k gi'])): + dis_k_min_gi.append(float(row['min dis_k gi'])) + if not math.isnan(float(row['time total'])): + time_total_list.append(float(row['time total'])) + if 'mge num decrease order' in row: + mge_dec_order_list.append(int(row['mge num decrease order'])) + if 'mge num increase order' in row: + mge_inc_order_list.append(int(row['mge num increase order'])) + # return if no results. + if len(sod_sm_list) == 0: + return + + # construct output results. + op = {} + op['measure'] = ['max', 'min', 'mean'] + op['SOD SM'] = [np.max(sod_sm_list), np.min(sod_sm_list), np.mean(sod_sm_list)] + op['SOD GM'] = [np.max(sod_gm_list), np.min(sod_gm_list), np.mean(sod_gm_list)] + op['dis_k SM'] = [np.max(dis_k_sm_list), np.min(dis_k_sm_list), np.mean(dis_k_sm_list)] + op['dis_k GM'] = [np.max(dis_k_gm_list), np.min(dis_k_gm_list), np.mean(dis_k_gm_list)] + op['min dis_k gi'] = [np.max(dis_k_min_gi), np.min(dis_k_min_gi), np.mean(dis_k_min_gi)] + op['time total'] = [np.max(time_total_list), np.min(time_total_list), np.mean(time_total_list)] + if len(mge_dec_order_list) > 0: + op['mge num decrease order'] = [np.max(mge_dec_order_list), np.min(mge_dec_order_list), np.mean(mge_dec_order_list)] + if len(mge_inc_order_list) > 0: + op['mge num increase order'] = [np.max(mge_inc_order_list), np.min(mge_inc_order_list), np.mean(mge_inc_order_list)] + df = pd.DataFrame(data=op) + + # write results to .csv + df.to_csv(data_dir + 'summary_for_random_edit_costs.csv', index=False, header=True) + + +def compute_for_all_experiments(data_dir): + dir_list = [i for i in os.listdir(data_dir) if os.path.isdir(data_dir + i)] + for dir_name in dir_list: + sp_tmp = dir_name.split('.') + ds_name = sp_tmp[0].strip('[error]') + gkernel = sp_tmp[1] + summarize_results_of_random_edit_costs(data_dir + dir_name + '/', + ds_name, gkernel) + if os.path.exists(data_dir + dir_name + '/update_order/'): + summarize_results_of_random_edit_costs(data_dir + dir_name + '/update_order/', + ds_name, gkernel) + + +if __name__ == '__main__': +# data_dir = '../results/xp_median_preimage.update_order/' + data_dir = '../../results/CRIANN/xp_median_preimage.init10/' + compute_for_all_experiments(data_dir) \ No newline at end of file diff --git a/gklearn/preimage/experiments/tools/preimage_results_to_latex_tables.py b/gklearn/preimage/experiments/tools/preimage_results_to_latex_tables.py new file mode 100644 index 0000000..301f87f --- /dev/null +++ b/gklearn/preimage/experiments/tools/preimage_results_to_latex_tables.py @@ -0,0 +1,228 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Thu Apr 30 10:16:33 2020 + +@author: ljia +""" +import pandas as pd +import numpy as np +import os + + +DS_SYMB = ['MUTAG', 'Monoterpenoides', 'MAO_symb'] +DS_NON_SYMB = ['Letter-high', 'Letter-med', 'Letter-low', 'COIL-RAG', 'PAH'] +DS_UNLABELED = ['PAH_unlabeled'] + + +def rounder(x, decimals): + x_strs = str(x).split('.') + if len(x_strs) == 2: + before = x_strs[0] + after = x_strs[1] + if len(after) > decimals: + if int(after[decimals]) >= 5: + after0s = '' + for c in after: + if c == '0': + after0s += '0' + elif c != '0': + break + after = after0s + str(int(after[0:decimals]) + 1)[-decimals:] + else: + after = after[0:decimals] + elif len(after) < decimals: + after += '0' * (decimals - len(after)) + return before + '.' + after + + elif len(x_strs) == 1: + return x_strs[0] + + +def replace_nth(string, sub, wanted, n): + import re + where = [m.start() for m in re.finditer(sub, string)][n-1] + before = string[:where] + after = string[where:] + after = after.replace(sub, wanted, 1) + newString = before + after + return newString + + +def df_to_latex_table(df): + ltx = df.to_latex(index=True, escape=False, multirow=True) + + # modify middle lines. + ltx = ltx.replace('\\cline{1-9}\n\\cline{2-9}', '\\toprule') + ltx = ltx.replace('\\cline{2-9}', '\\cmidrule(l){2-9}') + + # modify first row. + i_start = ltx.find('\n\\toprule\n') + i_end = ltx.find('\\\\\n\\midrule\n') + ltx = ltx.replace(ltx[i_start:i_end+12], '\n\\toprule\nDatasets & Graph Kernels & Algorithms & $d_\\mathcal{F}$ SM & $d_\\mathcal{F}$ SM (UO) & $d_\\mathcal{F}$ GM & $d_\\mathcal{F}$ GM (UO) & Runtime & Runtime (UO) \\\\\n\\midrule\n', 1) + + # add row numbers. + ltx = ltx.replace('lllllllll', 'lllllllll|@{\\makebox[2em][r]{\\textit{\\rownumber\\space}}}', 1) + ltx = replace_nth(ltx, '\\\\\n', '\\gdef\\rownumber{\\stepcounter{magicrownumbers}\\arabic{magicrownumbers}} \\\\\n', 1) + + return ltx + + +def beautify_df(df): + df = df.sort_values(by=['Datasets', 'Graph Kernels']) + df = df.set_index(['Datasets', 'Graph Kernels', 'Algorithms']) +# index = pd.MultiIndex.from_frame(df[['Datasets', 'Graph Kernels', 'Algorithms']]) + + # bold the best results. + for ds in df.index.get_level_values('Datasets').unique(): + for gk in df.loc[ds].index.get_level_values('Graph Kernels').unique(): + min_val = np.inf + min_indices = [] + min_labels = [] + for index, row in df.loc[(ds, gk)].iterrows(): + for label in ['$d_\mathcal{F}$ SM', '$d_\mathcal{F}$ GM', '$d_\mathcal{F}$ GM (UO)']: + value = row[label] + if value != '-': + value = float(value.strip('/same')) + if value < min_val: + min_val = value + min_indices = [index] + min_labels = [label] + elif value == min_val: + min_indices.append(index) + min_labels.append(label) + for idx, index in enumerate(min_indices): + df.loc[(ds, gk, index), min_labels[idx]] = '\\textbf{' + df.loc[(ds, gk, index), min_labels[idx]] + '}' + + return df + + +def get_results(data_dir, ds_name, gkernel): + # get results from .csv. + file_name = data_dir + 'results_summary.' + ds_name + '.' + gkernel + '.csv' + try: + df_summary = pd.read_csv(file_name) + except FileNotFoundError: + return None + + df_results = pd.DataFrame(index=None, columns=['d_F SM', 'd_F GM', 'runtime']) + for index, row in df_summary.iterrows(): + if row['target'] == 'all' and row['fit method'] == 'k-graphs': + df_results.loc['From median set'] = ['-', rounder(row['min dis_k gi'], 3), '-'] + if_uo = (int(row['mge num decrease order']) > 0 or int(row['mge num increase order']) > 0) + df_results.loc['Optimized'] = [rounder(row['dis_k SM'], 3), + rounder(row['dis_k GM'], 3) if if_uo else (rounder(row['dis_k GM'], 3) + '/same'), + rounder(row['time total'], 2)] + if row['target'] == 'all' and row['fit method'] == 'expert': + if_uo = (int(row['mge num decrease order']) > 0 or int(row['mge num increase order']) > 0) + df_results.loc['IAM: expert costs'] = [rounder(row['dis_k SM'], 3), + rounder(row['dis_k GM'], 3) if if_uo else (rounder(row['dis_k GM'], 3) + '/same'), + rounder(row['time total'], 2)] + + # get results from random summary .csv. + random_fini = True + file_name = data_dir + 'summary_for_random_edit_costs.csv' + try: + df_random = pd.read_csv(file_name) + except FileNotFoundError: + random_fini = False + + if random_fini: + for index, row in df_random.iterrows(): + if row['measure'] == 'mean': + if_uo = (float(row['mge num decrease order']) > 0 or float(row['mge num increase order']) > 0) + df_results.loc['IAM: random costs'] = [rounder(row['dis_k SM'], 3), + rounder(row['dis_k GM'], 3) if if_uo else (rounder(row['dis_k GM'], 3) + '/same'), + rounder(row['time total'], 2)] + + # sort index. + df_results = df_results.reindex([item for item in ['From median set', 'IAM: random costs', 'IAM: expert costs', 'Optimized'] if item in df_results.index]) + + return df_results + + +def get_results_of_one_xp(data_dir, ds_name, gkernel): + df_results = pd.DataFrame() + + df_tmp_uo = None + if not os.path.isfile(data_dir + 'update_order/error.txt'): + df_tmp_uo = get_results(data_dir + 'update_order/', ds_name, gkernel) + + df_tmp = None + if not os.path.isfile(data_dir + 'error.txt'): + df_tmp = get_results(data_dir, ds_name, gkernel) + + if (df_tmp_uo is not None and not df_tmp_uo.empty) or (df_tmp is not None and not df_tmp.empty): + df_results = pd.DataFrame(index=['From median set', 'IAM: random costs', 'IAM: expert costs', 'Optimized'], columns=['$d_\mathcal{F}$ SM', '$d_\mathcal{F}$ SM (UO)', '$d_\mathcal{F}$ GM', '$d_\mathcal{F}$ GM (UO)', 'Runtime', 'Runtime (UO)']) + if df_tmp_uo is not None and not df_tmp_uo.empty: + for index, row in df_tmp_uo.iterrows(): + for algo in df_results.index: + if index == algo: + df_results.at[algo, '$d_\mathcal{F}$ SM (UO)'] = row['d_F SM'] + df_results.at[algo, '$d_\mathcal{F}$ GM (UO)'] = row['d_F GM'] + df_results.at[algo, 'Runtime (UO)'] = row['runtime'] + if df_tmp is not None and not df_tmp.empty: + for index, row in df_tmp.iterrows(): + for algo in df_results.index: + if index == algo: + df_results.at[algo, '$d_\mathcal{F}$ SM'] = row['d_F SM'] + df_results.at[algo, '$d_\mathcal{F}$ GM'] = row['d_F GM'].strip('/same') + df_results.at[algo, 'Runtime'] = row['runtime'] + + df_results = df_results.dropna(axis=0, how='all') + df_results = df_results.fillna(value='-') + df_results = df_results.reset_index().rename(columns={'index': 'Algorithms'}) + + return df_results + + +def get_results_for_all_experiments(root_dir): + columns=['Datasets', 'Graph Kernels', 'Algorithms', '$d_\mathcal{F}$ SM', '$d_\mathcal{F}$ SM (UO)', '$d_\mathcal{F}$ GM', '$d_\mathcal{F}$ GM (UO)', 'Runtime', 'Runtime (UO)'] + df_symb = pd.DataFrame(columns=columns) + df_nonsymb = pd.DataFrame(columns=columns) + df_unlabeled = pd.DataFrame(columns=columns) + + dir_list = [i for i in os.listdir(root_dir) if os.path.isdir(root_dir + i)] + for dir_name in dir_list: + sp_tmp = dir_name.split('.') + gkernel = sp_tmp[1] + ds_name = sp_tmp[0].strip('[error]') + suffix = '' + if sp_tmp[-1] == 'unlabeled': + suffix = '_unlabeled' + elif sp_tmp[-1] == 'symb': + suffix = '_symb' + + df_results = get_results_of_one_xp(root_dir + dir_name + '/', ds_name, gkernel) + + if not df_results.empty: + ds_name += suffix + if ds_name in DS_SYMB: + for index, row in df_results.iterrows(): + df_symb.loc[len(df_symb)] = [ds_name.replace('_', '\_'), gkernel] + row.tolist() + elif ds_name in DS_NON_SYMB: + for index, row in df_results.iterrows(): + df_nonsymb.loc[len(df_nonsymb)] = [ds_name.replace('_', '\_'), gkernel] + row.tolist() + elif ds_name in DS_UNLABELED: + for index, row in df_results.iterrows(): + df_unlabeled.loc[len(df_unlabeled)] = [ds_name.replace('_', '\_'), gkernel] + row.tolist() + else: + raise Exception('dataset' + ds_name + 'is not pre-defined.') + + # sort. + df_symb = beautify_df(df_symb) + df_nonsymb = beautify_df(df_nonsymb) + df_unlabeled = beautify_df(df_unlabeled) + + # convert dfs to latex strings. + ltx_symb = df_to_latex_table(df_symb) + ltx_nonsymb = df_to_latex_table(df_nonsymb) + ltx_unlabeled = df_to_latex_table(df_unlabeled) + + return ltx_symb, ltx_nonsymb, ltx_unlabeled + + +if __name__ == '__main__': +# root_dir = '../results/xp_median_preimage.init20/' + root_dir = '../../results/CRIANN/xp_median_preimage.init10/' + ltx_symb, ltx_nonsymb, ltx_unlabeled = get_results_for_all_experiments(root_dir) From 06c35201b264218baac2cb05dc058e2314a45858 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Tue, 26 May 2020 15:55:58 +0200 Subject: [PATCH 13/17] Add option to sort graphs by size when computing GEDs for the sake of the stability. --- gklearn/ged/env/node_map.py | 28 ++-- gklearn/ged/median/median_graph_estimator.py | 146 +++++++++++++----- gklearn/ged/median/utils.py | 2 + gklearn/ged/util/util.py | 24 +-- .../analyze_results_of_random_edit_costs.py | 9 +- .../experiments/xp_1nn_init10_trianglerule.py | 24 +-- gklearn/preimage/kernel_knn_cv.py | 2 +- 7 files changed, 166 insertions(+), 69 deletions(-) diff --git a/gklearn/ged/env/node_map.py b/gklearn/ged/env/node_map.py index 4812486..dc3e3bf 100644 --- a/gklearn/ged/env/node_map.py +++ b/gklearn/ged/env/node_map.py @@ -39,14 +39,6 @@ class NodeMap(object): return np.inf - def get_forward_map(self): - return self.__forward_map - - - def get_backward_map(self): - return self.__backward_map - - def as_relation(self, relation): relation.clear() for i in range(0, len(self.__forward_map)): @@ -77,4 +69,22 @@ class NodeMap(object): def induced_cost(self): - return self.__induced_cost \ No newline at end of file + return self.__induced_cost + + + @property + def forward_map(self): + return self.__forward_map + + @forward_map.setter + def forward_map(self, value): + self.__forward_map = value + + + @property + def backward_map(self): + return self.__backward_map + + @backward_map.setter + def backward_map(self, value): + self.__backward_map = value \ No newline at end of file diff --git a/gklearn/ged/median/median_graph_estimator.py b/gklearn/ged/median/median_graph_estimator.py index c4291ce..03c7892 100644 --- a/gklearn/ged/median/median_graph_estimator.py +++ b/gklearn/ged/median/median_graph_estimator.py @@ -52,6 +52,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__seed = 0 self.__parallel = True self.__update_order = True + self.__sort_graphs = True # sort graphs by size when computing GEDs. self.__refine = True self.__time_limit_in_sec = 0 self.__epsilon = 0.0001 @@ -150,6 +151,16 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no else: raise Exception('Invalid argument "' + opt_val + '" for option update-order. Usage: options = "[--update-order TRUE|FALSE] [...]"') + elif opt_name == 'sort-graphs': + if opt_val == 'TRUE': + self.__sort_graphs = True + + elif opt_val == 'FALSE': + self.__sort_graphs = False + + else: + raise Exception('Invalid argument "' + opt_val + '" for option sort-graphs. Usage: options = "[--sort-graphs TRUE|FALSE] [...]"') + elif opt_name == 'refine': if opt_val == 'TRUE': self.__refine = True @@ -537,18 +548,31 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no progress.update(1) # Improving the node maps. + nb_nodes_median = self.__ged_env.get_graph_num_nodes(self.__gen_median_id) for graph_id, node_map in self.__node_maps_from_median.items(): if time.expired(): if self.__state == AlgorithmState.TERMINATED: self.__state = AlgorithmState.CONVERGED break - self.__ged_env.run_method(self.__gen_median_id, graph_id) - if self.__ged_env.get_upper_bound(self.__gen_median_id, graph_id) < node_map.induced_cost(): - self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(self.__gen_median_id, graph_id) - self.__sum_of_distances += self.__node_maps_from_median[graph_id].induced_cost() + + nb_nodes_g = self.__ged_env.get_graph_num_nodes(graph_id) + if nb_nodes_median <= nb_nodes_g or not self.__sort_graphs: + self.__ged_env.run_method(self.__gen_median_id, graph_id) + if self.__ged_env.get_upper_bound(self.__gen_median_id, graph_id) < node_map.induced_cost(): + self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(self.__gen_median_id, graph_id) + else: + self.__ged_env.run_method(graph_id, self.__gen_median_id) + if self.__ged_env.get_upper_bound(graph_id, self.__gen_median_id) < node_map.induced_cost(): + node_map_tmp = self.__ged_env.get_node_map(graph_id, self.__gen_median_id) + node_map_tmp.forward_map, node_map_tmp.backward_map = node_map_tmp.backward_map, node_map_tmp.forward_map + self.__node_maps_from_median[graph_id] = node_map_tmp + + self.__sum_of_distances += self.__node_maps_from_median[graph_id].induced_cost() + # Print information. if self.__print_to_stdout == 2: progress.update(1) + self.__sum_of_distances = 0.0 for key, val in self.__node_maps_from_median.items(): self.__sum_of_distances += val.induced_cost() @@ -636,6 +660,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__seed = 0 self.__parallel = True self.__update_order = True + self.__sort_graphs = True self.__refine = True self.__time_limit_in_sec = 0 self.__epsilon = 0.0001 @@ -695,7 +720,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def init_worker(ged_env_toshare): global G_ged_env G_ged_env = ged_env_toshare - do_fun = partial(_compute_medoid_parallel, graph_ids) + do_fun = partial(_compute_medoid_parallel, graph_ids, self.__sort_graphs) pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(self.__ged_env,)) if self.__print_to_stdout == 2: iterator = tqdm(pool.imap_unordered(do_fun, itr, chunksize), @@ -723,10 +748,16 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no if timer.expired(): self.__state = AlgorithmState.CALLED break + nb_nodes_g = self.__ged_env.get_graph_num_nodes(g_id) sum_of_distances = 0 - for h_id in graph_ids: - self.__ged_env.run_method(g_id, h_id) - sum_of_distances += self.__ged_env.get_upper_bound(g_id, h_id) + for h_id in graph_ids: + nb_nodes_h = self.__ged_env.get_graph_num_nodes(h_id) + if nb_nodes_g <= nb_nodes_h or not self.__sort_graphs: + self.__ged_env.run_method(g_id, h_id) + sum_of_distances += self.__ged_env.get_upper_bound(g_id, h_id) + else: + self.__ged_env.run_method(h_id, g_id) + sum_of_distances += self.__ged_env.get_upper_bound(h_id, g_id) if sum_of_distances < best_sum_of_distances: best_sum_of_distances = sum_of_distances medoid_id = g_id @@ -760,7 +791,8 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def init_worker(ged_env_toshare): global G_ged_env G_ged_env = ged_env_toshare - do_fun = partial(_compute_init_node_maps_parallel, gen_median_id) + nb_nodes_median = self.__ged_env.get_graph_num_nodes(gen_median_id) + do_fun = partial(_compute_init_node_maps_parallel, gen_median_id, self.__sort_graphs, nb_nodes_median) pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(self.__ged_env,)) if self.__print_to_stdout == 2: iterator = tqdm(pool.imap_unordered(do_fun, itr, chunksize), @@ -783,9 +815,17 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no self.__sum_of_distances = 0 self.__node_maps_from_median.clear() + nb_nodes_median = self.__ged_env.get_graph_num_nodes(gen_median_id) for graph_id in graph_ids: - self.__ged_env.run_method(gen_median_id, graph_id) - self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(gen_median_id, graph_id) + nb_nodes_g = self.__ged_env.get_graph_num_nodes(graph_id) + if nb_nodes_median <= nb_nodes_g or not self.__sort_graphs: + self.__ged_env.run_method(gen_median_id, graph_id) + self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(gen_median_id, graph_id) + else: + self.__ged_env.run_method(graph_id, gen_median_id) + node_map_tmp = self.__ged_env.get_node_map(graph_id, gen_median_id) + node_map_tmp.forward_map, node_map_tmp.backward_map = node_map_tmp.backward_map, node_map_tmp.forward_map + self.__node_maps_from_median[graph_id] = node_map_tmp # print(self.__node_maps_from_median[graph_id]) self.__sum_of_distances += self.__node_maps_from_median[graph_id].induced_cost() # print(self.__sum_of_distances) @@ -843,7 +883,7 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no for graph_id, graph in graphs.items(): # print('graph_id: ', graph_id) # print(self.__node_maps_from_median[graph_id]) -# print(self.__node_maps_from_median[graph_id].get_forward_map(), self.__node_maps_from_median[graph_id].get_backward_map()) +# print(self.__node_maps_from_median[graph_id].forward_map, self.__node_maps_from_median[graph_id].backward_map) k = self.__node_maps_from_median[graph_id].image(i) # print('k: ', k) if k != np.inf: @@ -920,7 +960,8 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no def init_worker(ged_env_toshare): global G_ged_env G_ged_env = ged_env_toshare - do_fun = partial(_update_node_maps_parallel, self.__median_id, self.__epsilon) + nb_nodes_median = self.__ged_env.get_graph_num_nodes(self.__median_id) + do_fun = partial(_update_node_maps_parallel, self.__median_id, self.__epsilon, self.__sort_graphs, nb_nodes_median) pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(self.__ged_env,)) if self.__print_to_stdout == 2: iterator = tqdm(pool.imap_unordered(do_fun, itr, chunksize), @@ -941,13 +982,25 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no progress = tqdm(desc='Updating node maps', total=len(self.__node_maps_from_median), file=sys.stdout) node_maps_were_modified = False + nb_nodes_median = self.__ged_env.get_graph_num_nodes(self.__median_id) for graph_id, node_map in self.__node_maps_from_median.items(): - self.__ged_env.run_method(self.__median_id, graph_id) - if self.__ged_env.get_upper_bound(self.__median_id, graph_id) < node_map.induced_cost() - self.__epsilon: - # xxx = self.__node_maps_from_median[graph_id] - self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(self.__median_id, graph_id) - # yyy = self.__node_maps_from_median[graph_id] - node_maps_were_modified = True + nb_nodes_g = self.__ged_env.get_graph_num_nodes(graph_id) + + if nb_nodes_median <= nb_nodes_g or not self.__sort_graphs: + self.__ged_env.run_method(self.__median_id, graph_id) + if self.__ged_env.get_upper_bound(self.__median_id, graph_id) < node_map.induced_cost() - self.__epsilon: + # xxx = self.__node_maps_from_median[graph_id] + self.__node_maps_from_median[graph_id] = self.__ged_env.get_node_map(self.__median_id, graph_id) + node_maps_were_modified = True + + else: + self.__ged_env.run_method(graph_id, self.__median_id) + if self.__ged_env.get_upper_bound(graph_id, self.__median_id) < node_map.induced_cost() - self.__epsilon: + node_map_tmp = self.__ged_env.get_node_map(graph_id, self.__median_id) + node_map_tmp.forward_map, node_map_tmp.backward_map = node_map_tmp.backward_map, node_map_tmp.forward_map + self.__node_maps_from_median[graph_id] = node_map_tmp + node_maps_were_modified = True + # Print information about current iteration. if self.__print_to_stdout == 2: progress.update(1) @@ -1047,8 +1100,8 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no for k in range(0, node_map.num_target_nodes()): if is_unassigned_target_node[k]: new_node_map.add_assignment(np.inf, k) -# print(self.__node_maps_from_median[key].get_forward_map(), self.__node_maps_from_median[key].get_backward_map()) -# print(new_node_map.get_forward_map(), new_node_map.get_backward_map()) +# print(self.__node_maps_from_median[key].forward_map, self.__node_maps_from_median[key].backward_map) +# print(new_node_map.forward_map, new_node_map.backward_map self.__node_maps_from_median[key] = new_node_map # Increase overall number of decreases. @@ -1599,37 +1652,58 @@ class MedianGraphEstimator(object): # @todo: differ dummy_node from undifined no # return median_label -def _compute_medoid_parallel(graph_ids, itr): +def _compute_medoid_parallel(graph_ids, sort, itr): g_id = itr[0] i = itr[1] # @todo: timer not considered here. # if timer.expired(): # self.__state = AlgorithmState.CALLED # break + nb_nodes_g = G_ged_env.get_graph_num_nodes(g_id) sum_of_distances = 0 for h_id in graph_ids: - G_ged_env.run_method(g_id, h_id) - sum_of_distances += G_ged_env.get_upper_bound(g_id, h_id) + nb_nodes_h = G_ged_env.get_graph_num_nodes(h_id) + if nb_nodes_g <= nb_nodes_h or not sort: + G_ged_env.run_method(g_id, h_id) + sum_of_distances += G_ged_env.get_upper_bound(g_id, h_id) + else: + G_ged_env.run_method(h_id, g_id) + sum_of_distances += G_ged_env.get_upper_bound(h_id, g_id) return i, sum_of_distances + - -def _compute_init_node_maps_parallel(gen_median_id, itr): +def _compute_init_node_maps_parallel(gen_median_id, sort, nb_nodes_median, itr): graph_id = itr - G_ged_env.run_method(gen_median_id, graph_id) - node_maps_from_median = G_ged_env.get_node_map(gen_median_id, graph_id) + nb_nodes_g = G_ged_env.get_graph_num_nodes(graph_id) + if nb_nodes_median <= nb_nodes_g or not sort: + G_ged_env.run_method(gen_median_id, graph_id) + node_map = G_ged_env.get_node_map(gen_median_id, graph_id) # print(self.__node_maps_from_median[graph_id]) - sum_of_distance = node_maps_from_median.induced_cost() + else: + G_ged_env.run_method(graph_id, gen_median_id) + node_map = G_ged_env.get_node_map(graph_id, gen_median_id) + node_map.forward_map, node_map.backward_map = node_map.backward_map, node_map.forward_map + sum_of_distance = node_map.induced_cost() # print(self.__sum_of_distances) - return graph_id, sum_of_distance, node_maps_from_median - + return graph_id, sum_of_distance, node_map + -def _update_node_maps_parallel(median_id, epsilon, itr): +def _update_node_maps_parallel(median_id, epsilon, sort, nb_nodes_median, itr): graph_id = itr[0] node_map = itr[1] node_maps_were_modified = False - G_ged_env.run_method(median_id, graph_id) - if G_ged_env.get_upper_bound(median_id, graph_id) < node_map.induced_cost() - epsilon: - node_map = G_ged_env.get_node_map(median_id, graph_id) - node_maps_were_modified = True + nb_nodes_g = G_ged_env.get_graph_num_nodes(graph_id) + if nb_nodes_median <= nb_nodes_g or not sort: + G_ged_env.run_method(median_id, graph_id) + if G_ged_env.get_upper_bound(median_id, graph_id) < node_map.induced_cost() - epsilon: + node_map = G_ged_env.get_node_map(median_id, graph_id) + node_maps_were_modified = True + else: + G_ged_env.run_method(graph_id, median_id) + if G_ged_env.get_upper_bound(graph_id, median_id) < node_map.induced_cost() - epsilon: + node_map = G_ged_env.get_node_map(graph_id, median_id) + node_map.forward_map, node_map.backward_map = node_map.backward_map, node_map.forward_map + node_maps_were_modified = True + return graph_id, node_map, node_maps_were_modified \ No newline at end of file diff --git a/gklearn/ged/median/utils.py b/gklearn/ged/median/utils.py index 5c4c52f..d27c86d 100644 --- a/gklearn/ged/median/utils.py +++ b/gklearn/ged/median/utils.py @@ -34,6 +34,8 @@ def mge_options_to_string(options): opt_str += '--parallel ' + ('TRUE' if val else 'FALSE') + ' ' elif key == 'update_order': opt_str += '--update-order ' + ('TRUE' if val else 'FALSE') + ' ' + elif key == 'sort_graphs': + opt_str += '--sort-graphs ' + ('TRUE' if val else 'FALSE') + ' ' elif key == 'refine': opt_str += '--refine ' + ('TRUE' if val else 'FALSE') + ' ' elif key == 'time_limit': diff --git a/gklearn/ged/util/util.py b/gklearn/ged/util/util.py index c41ca86..7032345 100644 --- a/gklearn/ged/util/util.py +++ b/gklearn/ged/util/util.py @@ -46,7 +46,7 @@ def compute_ged(g1, g2, options): return dis, pi_forward, pi_backward -def compute_geds(graphs, options={}, parallel=False, verbose=True): +def compute_geds(graphs, options={}, sort=True, parallel=False, verbose=True): # initialize ged env. ged_env = gedlibpy.GEDEnv() ged_env.set_edit_cost(options['edit_cost'], edit_cost_constant=options['edit_cost_constants']) @@ -79,7 +79,7 @@ def compute_geds(graphs, options={}, parallel=False, verbose=True): G_graphs = graphs_toshare G_ged_env = ged_env_toshare G_listID = listID_toshare - do_partial = partial(_wrapper_compute_ged_parallel, neo_options) + do_partial = partial(_wrapper_compute_ged_parallel, neo_options, sort) pool = Pool(processes=n_jobs, initializer=init_worker, initargs=(graphs, ged_env, listID)) if verbose: iterator = tqdm(pool.imap_unordered(do_partial, itr, chunksize), @@ -108,25 +108,31 @@ def compute_geds(graphs, options={}, parallel=False, verbose=True): for i in iterator: # for i in range(len(graphs)): for j in range(i + 1, len(graphs)): - dis, pi_forward, pi_backward = _compute_ged(ged_env, listID[i], listID[j], graphs[i], graphs[j]) + if nx.number_of_nodes(graphs[i]) <= nx.number_of_nodes(graphs[j]) or not sort: + dis, pi_forward, pi_backward = _compute_ged(ged_env, listID[i], listID[j], graphs[i], graphs[j]) + else: + dis, pi_backward, pi_forward = _compute_ged(ged_env, listID[j], listID[i], graphs[j], graphs[i]) ged_vec.append(dis) ged_mat[i][j] = dis ged_mat[j][i] = dis - n_eo_tmp = get_nb_edit_operations(graphs[i], graphs[j], pi_forward, pi_backward, **neo_options) + n_eo_tmp = get_nb_edit_operations(graphs[i], graphs[j], pi_forward, pi_backward, **neo_options) n_edit_operations.append(n_eo_tmp) - + return ged_vec, ged_mat, n_edit_operations -def _wrapper_compute_ged_parallel(options, itr): +def _wrapper_compute_ged_parallel(options, sort, itr): i = itr[0] j = itr[1] - dis, n_eo_tmp = _compute_ged_parallel(G_ged_env, G_listID[i], G_listID[j], G_graphs[i], G_graphs[j], options) + dis, n_eo_tmp = _compute_ged_parallel(G_ged_env, G_listID[i], G_listID[j], G_graphs[i], G_graphs[j], options, sort) return i, j, dis, n_eo_tmp -def _compute_ged_parallel(env, gid1, gid2, g1, g2, options): - dis, pi_forward, pi_backward = _compute_ged(env, gid1, gid2, g1, g2) +def _compute_ged_parallel(env, gid1, gid2, g1, g2, options, sort): + if nx.number_of_nodes(g1) <= nx.number_of_nodes(g2) or not sort: + dis, pi_forward, pi_backward = _compute_ged(env, gid1, gid2, g1, g2) + else: + dis, pi_backward, pi_forward = _compute_ged(env, gid2, gid1, g2, g1) n_eo_tmp = get_nb_edit_operations(g1, g2, pi_forward, pi_backward, **options) # [0,0,0,0,0,0] return dis, n_eo_tmp diff --git a/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py b/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py index 4dc20d3..bbde39e 100644 --- a/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py +++ b/gklearn/preimage/experiments/tools/analyze_results_of_random_edit_costs.py @@ -82,5 +82,10 @@ def compute_for_all_experiments(data_dir): if __name__ == '__main__': # data_dir = '../results/xp_median_preimage.update_order/' - data_dir = '../../results/CRIANN/xp_median_preimage.init10/' - compute_for_all_experiments(data_dir) \ No newline at end of file + root_dir_tnz = '../../results/CRIANN/xp_median_preimage.init10/' + root_dir_ntnz = '../../results/CRIANN/xp_median_preimage.init10.no_triangle_rule/' + root_dir_tz = '../../results/CRIANN/xp_median_preimage.init10.triangle_rule.allow_zeros/' + root_dir_ntz = '../../results/CRIANN/xp_median_preimage.init10.no_triangle_rule.allow_zeros/' + data_dirs = [root_dir_tnz, root_dir_ntnz, root_dir_tz, root_dir_ntz] + for data_dir in data_dirs: + compute_for_all_experiments(data_dir) \ No newline at end of file diff --git a/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py b/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py index 9af5828..9d7809d 100644 --- a/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py +++ b/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py @@ -2958,18 +2958,6 @@ if __name__ == "__main__": # #### xp 7_1: MUTAG, StructuralSP, using CONSTANT. xp_median_preimage_7_1() -# #### xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. - xp_median_preimage_8_2() - -# #### xp 8_3: Monoterpenoides, Treelet, using CONSTANT. - xp_median_preimage_8_3() - -# #### xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. - xp_median_preimage_8_4() - -# #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. - xp_median_preimage_8_1() - # #### xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. xp_median_preimage_9_2() @@ -2999,6 +2987,18 @@ if __name__ == "__main__": # #### xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. xp_median_preimage_6_1() + +# #### xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + xp_median_preimage_8_2() + +# #### xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + xp_median_preimage_8_3() + +# #### xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + xp_median_preimage_8_4() + +# #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + xp_median_preimage_8_1() # # #### xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. xp_median_preimage_2_1() diff --git a/gklearn/preimage/kernel_knn_cv.py b/gklearn/preimage/kernel_knn_cv.py index 2faf4ba..3e5e88b 100644 --- a/gklearn/preimage/kernel_knn_cv.py +++ b/gklearn/preimage/kernel_knn_cv.py @@ -151,7 +151,7 @@ def __kernel_knn_cv_median(dataset_all, ds_name, knn_options, mpg_options, kerne # write result summary for each letter. if save_results: f_summary = open(dir_save + fn_output_summary, 'a') - for i, median_type in enumerate('set-median', 'gen median', 'gen median uo'): + for i, median_type in enumerate(['set-median', 'gen median', 'gen median uo']): csv.writer(f_summary).writerow([ds_name, kernel_options['name'], train_examples + ': ' + median_type, knn_options['n_neighbors'], From dff2c8449e805117c4038f0721edb0a31dcbcfd2 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Tue, 26 May 2020 15:57:28 +0200 Subject: [PATCH 14/17] Update setup.py. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0d7fbba..932002c 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setuptools.setup( version="0.2b1", author="Linlin Jia", author_email="linlin.jia@insa-rouen.fr", - description="A Python library for graph kernels based on linear patterns", + description="A Python library for graph kernels, graph edit distances, and graph pre-images", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/jajupmochi/graphkit-learn", From 3bbab5506986cafb16770a2357d199a44306e93d Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Wed, 27 May 2020 17:13:03 +0200 Subject: [PATCH 15/17] Package cvxpy cannot be installed from wheel, remove it from PyPI setup temporally. --- requirements.txt | 3 ++- requirements_pypi.txt | 11 +++++++++++ setup.py | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 requirements_pypi.txt diff --git a/requirements.txt b/requirements.txt index 47a91a1..24d6efe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,7 @@ networkx>=2.2 scikit-learn>=0.20.0 tabulate>=0.8.2 tqdm>=4.26.0 -cvxpy>=1.0.31 # for preimage. +cvxpy>=1.0.31 # for preimage. Does not work for "pip install graphkit-learn". +# -e https://files.pythonhosted.org/packages/11/d0/d900870dc2d02ea74961b90c353666c6528a33ea61a10aa59a0d5574ae59/cvxpy-1.0.31.tar.gz # for preimage. cvxopt>=1.2.5 # for preimage. mosek>=9.2.5; python_version >= '3.6' # for preimage. diff --git a/requirements_pypi.txt b/requirements_pypi.txt new file mode 100644 index 0000000..f4854fc --- /dev/null +++ b/requirements_pypi.txt @@ -0,0 +1,11 @@ +numpy>=1.16.2 +scipy>=1.1.0 +matplotlib>=3.0.0 +networkx>=2.2 +scikit-learn>=0.20.0 +tabulate>=0.8.2 +tqdm>=4.26.0 +# cvxpy>=1.0.31 # for preimage. Does not work for "pip install graphkit-learn". +# -e https://files.pythonhosted.org/packages/11/d0/d900870dc2d02ea74961b90c353666c6528a33ea61a10aa59a0d5574ae59/cvxpy-1.0.31.tar.gz # for preimage. +cvxopt>=1.2.5 # for preimage. +mosek>=9.2.5; python_version >= '3.6' # for preimage. diff --git a/setup.py b/setup.py index 932002c..a84679e 100644 --- a/setup.py +++ b/setup.py @@ -3,12 +3,12 @@ import setuptools with open("README.md", "r") as fh: long_description = fh.read() -with open('requirements.txt') as fp: +with open('requirements_pypi.txt') as fp: install_requires = fp.read() setuptools.setup( name="graphkit-learn", - version="0.2b1", + version="0.2b2", author="Linlin Jia", author_email="linlin.jia@insa-rouen.fr", description="A Python library for graph kernels, graph edit distances, and graph pre-images", From 9adaebb680837c2e2f4cd746886db93a47a650ae Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Wed, 27 May 2020 17:14:33 +0200 Subject: [PATCH 16/17] Add xp: remove the best graph from median set. --- .../experiments/xp_1nn_init10_trianglerule.py | 360 +++++++++++++++ gklearn/preimage/kernel_knn_cv.py | 3 +- gklearn/preimage/remove_best_graph.py | 423 ++++++++++++++++++ gklearn/preimage/utils.py | 4 +- 4 files changed, 787 insertions(+), 3 deletions(-) create mode 100644 gklearn/preimage/remove_best_graph.py diff --git a/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py b/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py index 9d7809d..d23e119 100644 --- a/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py +++ b/gklearn/preimage/experiments/xp_1nn_init10_trianglerule.py @@ -23,6 +23,344 @@ update_order = False test_sizes = [0.9, 0.7] # , 0.5, 0.3, 0.1] +def xp_median_preimage_15_1(): + """xp 15_1: AIDS, StructuralSP, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'AIDS' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_15_2(): + """xp 15_2: AIDS, PathUpToH, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'AIDS' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'PathUpToH', + 'depth': 1, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_15_3(): + """xp 15_3: AIDS, Treelet, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'AIDS' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + pkernel = functools.partial(polynomialkernel, d=1, c=1e+2) + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_15_4(): + """xp 15_4: AIDS, WeisfeilerLehman, using CONSTANT, symbolic only. + """ + for test_size in test_sizes: + # set parameters. + ds_name = 'AIDS' # + knn_options = {'n_neighbors': 1, + 'n_splits': 30, + 'test_size': test_size, + 'verbose': True} + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'allow_zeros': allow_zeros, + 'triangle_rule': triangle_rule, + 'verbose': 1} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 10, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 0} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 1, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('knn_options:', knn_options) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + +# # compute gram matrices for each class a priori. +# print('Compute gram matrices for each class a priori.') +# compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for train_examples in ['k-graphs', 'expert', 'random', 'best-dataset', 'trainset']: + print('\n-------------------------------------') + print('train examples used:', train_examples, '\n') + mpg_options['fit_method'] = train_examples + try: + kernel_knn_cv(ds_name, train_examples, knn_options, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + def xp_median_preimage_14_1(): """xp 14_1: DD, PathUpToH, using CONSTANT. """ @@ -2915,7 +3253,17 @@ if __name__ == "__main__": #### xp 14_1: DD, PathUpToH, using CONSTANT. # xp_median_preimage_14_1() +# #### xp 15_1: AIDS, StructuralSP, using CONSTANT, symbolic only. + # xp_median_preimage_15_1() + +# #### xp 15_2: AIDS, PathUpToH, using CONSTANT, symbolic only. + # xp_median_preimage_15_2() +# #### xp 15_3: AIDS, Treelet, using CONSTANT, symbolic only. + # xp_median_preimage_15_3() + +# #### xp 15_4: AIDS, WeisfeilerLehman, using CONSTANT, symbolic only. + # xp_median_preimage_15_4() @@ -2999,6 +3347,18 @@ if __name__ == "__main__": # #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. xp_median_preimage_8_1() + + # #### xp 15_1: AIDS, StructuralSP, using CONSTANT, symbolic only. + xp_median_preimage_15_1() + +# #### xp 15_2: AIDS, PathUpToH, using CONSTANT, symbolic only. + xp_median_preimage_15_2() + +# #### xp 15_3: AIDS, Treelet, using CONSTANT, symbolic only. + xp_median_preimage_15_3() + +# #### xp 15_4: AIDS, WeisfeilerLehman, using CONSTANT, symbolic only. + xp_median_preimage_15_4() # # #### xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. xp_median_preimage_2_1() diff --git a/gklearn/preimage/kernel_knn_cv.py b/gklearn/preimage/kernel_knn_cv.py index 3e5e88b..073fa31 100644 --- a/gklearn/preimage/kernel_knn_cv.py +++ b/gklearn/preimage/kernel_knn_cv.py @@ -361,7 +361,8 @@ def __get_gram_matrix(load_gm, dir_save, ds_name, kernel_options, dataset_all): gram_matrix_unnorm, time_precompute_gm = __compute_gram_matrix_unnorm(dataset_all, kernel_options) np.savez(dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm', gram_matrix_unnorm=gram_matrix_unnorm, run_time=time_precompute_gm) else: - gmfile = np.load() + gm_fname = dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm.npz' + gmfile = np.load(gm_fname, allow_pickle=True) gram_matrix_unnorm = gmfile['gram_matrix_unnorm'] time_precompute_gm = float(gmfile['run_time']) diff --git a/gklearn/preimage/remove_best_graph.py b/gklearn/preimage/remove_best_graph.py new file mode 100644 index 0000000..d6be2a6 --- /dev/null +++ b/gklearn/preimage/remove_best_graph.py @@ -0,0 +1,423 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Wen May 27 14:27:15 2020 + +@author: ljia +""" +import numpy as np +import csv +import os +import os.path +from gklearn.utils import Dataset +from gklearn.preimage import MedianPreimageGenerator +from gklearn.utils import normalize_gram_matrix +from gklearn.utils import split_dataset_by_target +from gklearn.preimage.utils import compute_k_dis +from gklearn.utils.graphfiles import saveGXL +import networkx as nx + + +def remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=True, save_medians=True, plot_medians=True, load_gm='auto', dir_save='', irrelevant_labels=None, edge_required=False, cut_range=None): + """Remove the best graph from the median set w.r.t. distance in kernel space, and to see if it is possible to generate the removed graph using the graphs left in the median set. + """ + # 1. get dataset. + print('1. getting dataset...') + dataset_all = Dataset() + dataset_all.load_predefined_dataset(ds_name) + dataset_all.trim_dataset(edge_required=edge_required) + if irrelevant_labels is not None: + dataset_all.remove_labels(**irrelevant_labels) + if cut_range is not None: + dataset_all.cut_graphs(cut_range) + datasets = split_dataset_by_target(dataset_all) + + if save_results: + # create result files. + print('creating output files...') + fn_output_detail, fn_output_summary = __init_output_file(ds_name, kernel_options['name'], mpg_options['fit_method'], dir_save) + else: + fn_output_detail, fn_output_summary = None, None + + # 2. compute/load Gram matrix a priori. + print('2. computing/loading Gram matrix...') + gram_matrix_unnorm_list, time_precompute_gm_list = __get_gram_matrix(load_gm, dir_save, ds_name, kernel_options, datasets) + + sod_sm_list = [] + sod_gm_list = [] + dis_k_sm_list = [] + dis_k_gm_list = [] + dis_k_gi_min_list = [] + time_optimize_ec_list = [] + time_generate_list = [] + time_total_list = [] + itrs_list = [] + converged_list = [] + num_updates_ecc_list = [] + mge_decrease_order_list = [] + mge_increase_order_list = [] + mge_converged_order_list = [] + nb_sod_sm2gm = [0, 0, 0] + nb_dis_k_sm2gm = [0, 0, 0] + nb_dis_k_gi2sm = [0, 0, 0] + nb_dis_k_gi2gm = [0, 0, 0] + dis_k_max_list = [] + dis_k_min_list = [] + dis_k_mean_list = [] + best_dis_list = [] + print('starting experiment for each class of target...') + idx_offset = 0 + for idx, dataset in enumerate(datasets): + target = dataset.targets[0] + print('\ntarget =', target, '\n') +# if target != 1: +# continue + + num_graphs = len(dataset.graphs) + if num_graphs < 2: + print('\nnumber of graphs = ', num_graphs, ', skip.\n') + idx_offset += 1 + continue + + # 3. get the best graph and remove it from median set. + print('3. getting and removing the best graph...') + gram_matrix_unnorm = gram_matrix_unnorm_list[idx - idx_offset] + best_index, best_dis, best_graph = __get_best_graph([g.copy() for g in dataset.graphs], normalize_gram_matrix(gram_matrix_unnorm.copy())) + median_set_new = [dataset.graphs[i] for i in range(len(dataset.graphs)) if i != best_index] + num_graphs -= 1 + if num_graphs == 1: + continue + best_dis_list.append(best_dis) + + dataset.load_graphs(median_set_new, targets=None) + gram_matrix_unnorm_new = np.delete(gram_matrix_unnorm, best_index, axis=0) + gram_matrix_unnorm_new = np.delete(gram_matrix_unnorm_new, best_index, axis=1) + + # 4. set parameters. + print('4. initializing mpg and setting parameters...') + mpg_options['gram_matrix_unnorm'] = gram_matrix_unnorm_new + mpg_options['runtime_precompute_gm'] = time_precompute_gm_list[idx - idx_offset] + mpg = MedianPreimageGenerator() + mpg.dataset = dataset + mpg.set_options(**mpg_options.copy()) + mpg.kernel_options = kernel_options.copy() + mpg.ged_options = ged_options.copy() + mpg.mge_options = mge_options.copy() + + # 5. compute median preimage. + print('5. computing median preimage...') + mpg.run() + results = mpg.get_results() + + # 6. compute pairwise kernel distances. + print('6. computing pairwise kernel distances...') + _, dis_k_max, dis_k_min, dis_k_mean = mpg.graph_kernel.compute_distance_matrix() + dis_k_max_list.append(dis_k_max) + dis_k_min_list.append(dis_k_min) + dis_k_mean_list.append(dis_k_mean) + + # 7. save results (and median graphs). + print('7. saving results (and median graphs)...') + # write result detail. + if save_results: + print('writing results to files...') + sod_sm2gm = get_relations(np.sign(results['sod_gen_median'] - results['sod_set_median'])) + dis_k_sm2gm = get_relations(np.sign(results['k_dis_gen_median'] - results['k_dis_set_median'])) + dis_k_gi2sm = get_relations(np.sign(results['k_dis_set_median'] - results['k_dis_dataset'])) + dis_k_gi2gm = get_relations(np.sign(results['k_dis_gen_median'] - results['k_dis_dataset'])) + + f_detail = open(dir_save + fn_output_detail, 'a') + csv.writer(f_detail).writerow([ds_name, kernel_options['name'], + ged_options['edit_cost'], ged_options['method'], + ged_options['attr_distance'], mpg_options['fit_method'], + num_graphs, target, 1, + results['sod_set_median'], results['sod_gen_median'], + results['k_dis_set_median'], results['k_dis_gen_median'], + results['k_dis_dataset'], best_dis, best_index, + sod_sm2gm, dis_k_sm2gm, + dis_k_gi2sm, dis_k_gi2gm, results['edit_cost_constants'], + results['runtime_precompute_gm'], results['runtime_optimize_ec'], + results['runtime_generate_preimage'], results['runtime_total'], + results['itrs'], results['converged'], + results['num_updates_ecc'], + results['mge']['num_decrease_order'] > 0, # @todo: not suitable for multi-start mge + results['mge']['num_increase_order'] > 0, + results['mge']['num_converged_descents'] > 0]) + f_detail.close() + + # compute result summary. + sod_sm_list.append(results['sod_set_median']) + sod_gm_list.append(results['sod_gen_median']) + dis_k_sm_list.append(results['k_dis_set_median']) + dis_k_gm_list.append(results['k_dis_gen_median']) + dis_k_gi_min_list.append(results['k_dis_dataset']) + time_precompute_gm_list.append(results['runtime_precompute_gm']) + time_optimize_ec_list.append(results['runtime_optimize_ec']) + time_generate_list.append(results['runtime_generate_preimage']) + time_total_list.append(results['runtime_total']) + itrs_list.append(results['itrs']) + converged_list.append(results['converged']) + num_updates_ecc_list.append(results['num_updates_ecc']) + mge_decrease_order_list.append(results['mge']['num_decrease_order'] > 0) + mge_increase_order_list.append(results['mge']['num_increase_order'] > 0) + mge_converged_order_list.append(results['mge']['num_converged_descents'] > 0) + # # SOD SM -> GM + if results['sod_set_median'] > results['sod_gen_median']: + nb_sod_sm2gm[0] += 1 + # repeats_better_sod_sm2gm.append(1) + elif results['sod_set_median'] == results['sod_gen_median']: + nb_sod_sm2gm[1] += 1 + elif results['sod_set_median'] < results['sod_gen_median']: + nb_sod_sm2gm[2] += 1 + # # dis_k SM -> GM + if results['k_dis_set_median'] > results['k_dis_gen_median']: + nb_dis_k_sm2gm[0] += 1 + # repeats_better_dis_k_sm2gm.append(1) + elif results['k_dis_set_median'] == results['k_dis_gen_median']: + nb_dis_k_sm2gm[1] += 1 + elif results['k_dis_set_median'] < results['k_dis_gen_median']: + nb_dis_k_sm2gm[2] += 1 + # # dis_k gi -> SM + if results['k_dis_dataset'] > results['k_dis_set_median']: + nb_dis_k_gi2sm[0] += 1 + # repeats_better_dis_k_gi2sm.append(1) + elif results['k_dis_dataset'] == results['k_dis_set_median']: + nb_dis_k_gi2sm[1] += 1 + elif results['k_dis_dataset'] < results['k_dis_set_median']: + nb_dis_k_gi2sm[2] += 1 + # # dis_k gi -> GM + if results['k_dis_dataset'] > results['k_dis_gen_median']: + nb_dis_k_gi2gm[0] += 1 + # repeats_better_dis_k_gi2gm.append(1) + elif results['k_dis_dataset'] == results['k_dis_gen_median']: + nb_dis_k_gi2gm[1] += 1 + elif results['k_dis_dataset'] < results['k_dis_gen_median']: + nb_dis_k_gi2gm[2] += 1 + + # write result summary for each letter. + f_summary = open(dir_save + fn_output_summary, 'a') + csv.writer(f_summary).writerow([ds_name, kernel_options['name'], + ged_options['edit_cost'], ged_options['method'], + ged_options['attr_distance'], mpg_options['fit_method'], + num_graphs, target, + results['sod_set_median'], results['sod_gen_median'], + results['k_dis_set_median'], results['k_dis_gen_median'], + results['k_dis_dataset'], best_dis, best_index, + sod_sm2gm, dis_k_sm2gm, + dis_k_gi2sm, dis_k_gi2gm, + results['runtime_precompute_gm'], results['runtime_optimize_ec'], + results['runtime_generate_preimage'], results['runtime_total'], + results['itrs'], results['converged'], + results['num_updates_ecc'], + results['mge']['num_decrease_order'] > 0, # @todo: not suitable for multi-start mge + results['mge']['num_increase_order'] > 0, + results['mge']['num_converged_descents'] > 0, + nb_sod_sm2gm, + nb_dis_k_sm2gm, nb_dis_k_gi2sm, nb_dis_k_gi2gm]) + f_summary.close() + + # save median graphs. + if save_medians: + if not os.path.exists(dir_save + 'medians/'): + os.makedirs(dir_save + 'medians/') + print('Saving median graphs to files...') + fn_pre_sm = dir_save + 'medians/set_median.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) + saveGXL(mpg.set_median, fn_pre_sm + '.gxl', method='default', + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) + fn_pre_gm = dir_save + 'medians/gen_median.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) + saveGXL(mpg.gen_median, fn_pre_gm + '.gxl', method='default', + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) + fn_best_dataset = dir_save + 'medians/g_best_dataset.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) + saveGXL(best_graph, fn_best_dataset + '.gxl', method='default', + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) + fn_best_median_set = dir_save + 'medians/g_best_median_set.' + mpg_options['fit_method'] + '.nbg' + str(num_graphs) + '.y' + str(target) + '.repeat' + str(1) + saveGXL(mpg.best_from_dataset, fn_best_median_set + '.gxl', method='default', + node_labels=dataset.node_labels, edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, edge_attrs=dataset.edge_attrs) + + # plot median graphs. + if plot_medians and save_medians: + if ged_options['edit_cost'] == 'LETTER2' or ged_options['edit_cost'] == 'LETTER' or ds_name == 'Letter-high' or ds_name == 'Letter-med' or ds_name == 'Letter-low': + draw_Letter_graph(mpg.set_median, fn_pre_sm) + draw_Letter_graph(mpg.gen_median, fn_pre_gm) + draw_Letter_graph(mpg.best_from_dataset, fn_best_dataset) + + # write result summary for each letter. + if save_results: + sod_sm_mean = np.mean(sod_sm_list) + sod_gm_mean = np.mean(sod_gm_list) + dis_k_sm_mean = np.mean(dis_k_sm_list) + dis_k_gm_mean = np.mean(dis_k_gm_list) + dis_k_gi_min_mean = np.mean(dis_k_gi_min_list) + best_dis_mean = np.mean(best_dis_list) + time_precompute_gm_mean = np.mean(time_precompute_gm_list) + time_optimize_ec_mean = np.mean(time_optimize_ec_list) + time_generate_mean = np.mean(time_generate_list) + time_total_mean = np.mean(time_total_list) + itrs_mean = np.mean(itrs_list) + num_converged = np.sum(converged_list) + num_updates_ecc_mean = np.mean(num_updates_ecc_list) + num_mge_decrease_order = np.sum(mge_decrease_order_list) + num_mge_increase_order = np.sum(mge_increase_order_list) + num_mge_converged = np.sum(mge_converged_order_list) + sod_sm2gm_mean = get_relations(np.sign(sod_gm_mean - sod_sm_mean)) + dis_k_sm2gm_mean = get_relations(np.sign(dis_k_gm_mean - dis_k_sm_mean)) + dis_k_gi2sm_mean = get_relations(np.sign(dis_k_sm_mean - dis_k_gi_min_mean)) + dis_k_gi2gm_mean = get_relations(np.sign(dis_k_gm_mean - dis_k_gi_min_mean)) + f_summary = open(dir_save + fn_output_summary, 'a') + csv.writer(f_summary).writerow([ds_name, kernel_options['name'], + ged_options['edit_cost'], ged_options['method'], + ged_options['attr_distance'], mpg_options['fit_method'], + num_graphs, 'all', + sod_sm_mean, sod_gm_mean, dis_k_sm_mean, dis_k_gm_mean, + dis_k_gi_min_mean, best_dis_mean, '-', + sod_sm2gm_mean, dis_k_sm2gm_mean, + dis_k_gi2sm_mean, dis_k_gi2gm_mean, + time_precompute_gm_mean, time_optimize_ec_mean, + time_generate_mean, time_total_mean, itrs_mean, + num_converged, num_updates_ecc_mean, + num_mge_decrease_order, num_mge_increase_order, + num_mge_converged]) + f_summary.close() + + # save total pairwise kernel distances. + dis_k_max = np.max(dis_k_max_list) + dis_k_min = np.min(dis_k_min_list) + dis_k_mean = np.mean(dis_k_mean_list) + print('The maximum pairwise distance in kernel space:', dis_k_max) + print('The minimum pairwise distance in kernel space:', dis_k_min) + print('The average pairwise distance in kernel space:', dis_k_mean) + + print('\ncomplete.\n') + + +def __get_best_graph(Gn, gram_matrix): + k_dis_list = [] + for idx in range(len(Gn)): + k_dis_list.append(compute_k_dis(idx, range(0, len(Gn)), [1 / len(Gn)] * len(Gn), gram_matrix, withterm3=False)) + best_index = np.argmin(k_dis_list) + best_dis = k_dis_list[best_index] + best_graph = Gn[best_index].copy() + return best_index, best_dis, best_graph + + +def get_relations(sign): + if sign == -1: + return 'better' + elif sign == 0: + return 'same' + elif sign == 1: + return 'worse' + + +def __get_gram_matrix(load_gm, dir_save, ds_name, kernel_options, datasets): + if load_gm == 'auto': + gm_fname = dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm.npz' + gmfile_exist = os.path.isfile(os.path.abspath(gm_fname)) + if gmfile_exist: + gmfile = np.load(gm_fname, allow_pickle=True) # @todo: may not be safe. + gram_matrix_unnorm_list = [item for item in gmfile['gram_matrix_unnorm_list']] + time_precompute_gm_list = gmfile['run_time_list'].tolist() + else: + gram_matrix_unnorm_list = [] + time_precompute_gm_list = [] + for dataset in datasets: + gram_matrix_unnorm, time_precompute_gm = __compute_gram_matrix_unnorm(dataset, kernel_options) + gram_matrix_unnorm_list.append(gram_matrix_unnorm) + time_precompute_gm_list.append(time_precompute_gm) + np.savez(dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm', gram_matrix_unnorm_list=gram_matrix_unnorm_list, run_time_list=time_precompute_gm_list) + elif not load_gm: + gram_matrix_unnorm_list = [] + time_precompute_gm_list = [] + for dataset in datasets: + gram_matrix_unnorm, time_precompute_gm = __compute_gram_matrix_unnorm(dataset, kernel_options) + gram_matrix_unnorm_list.append(gram_matrix_unnorm) + time_precompute_gm_list.append(time_precompute_gm) + np.savez(dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm', gram_matrix_unnorm_list=gram_matrix_unnorm_list, run_time_list=time_precompute_gm_list) + else: + gm_fname = dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm.npz' + gmfile = np.load(gm_fname, allow_pickle=True) # @todo: may not be safe. + gram_matrix_unnorm_list = [item for item in gmfile['gram_matrix_unnorm_list']] + time_precompute_gm_list = gmfile['run_time_list'].tolist() + + return gram_matrix_unnorm_list, time_precompute_gm_list + + +def __get_graph_kernel(dataset, kernel_options): + from gklearn.utils.utils import get_graph_kernel_by_name + graph_kernel = get_graph_kernel_by_name(kernel_options['name'], + node_labels=dataset.node_labels, + edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, + edge_attrs=dataset.edge_attrs, + ds_infos=dataset.get_dataset_infos(keys=['directed']), + kernel_options=kernel_options) + return graph_kernel + + +def __compute_gram_matrix_unnorm(dataset, kernel_options): + from gklearn.utils.utils import get_graph_kernel_by_name + graph_kernel = get_graph_kernel_by_name(kernel_options['name'], + node_labels=dataset.node_labels, + edge_labels=dataset.edge_labels, + node_attrs=dataset.node_attrs, + edge_attrs=dataset.edge_attrs, + ds_infos=dataset.get_dataset_infos(keys=['directed']), + kernel_options=kernel_options) + + gram_matrix, run_time = graph_kernel.compute(dataset.graphs, **kernel_options) + gram_matrix_unnorm = graph_kernel.gram_matrix_unnorm + + return gram_matrix_unnorm, run_time + + +def __init_output_file(ds_name, gkernel, fit_method, dir_output): + if not os.path.exists(dir_output): + os.makedirs(dir_output) + fn_output_detail = 'results_detail.' + ds_name + '.' + gkernel + '.csv' + f_detail = open(dir_output + fn_output_detail, 'a') + csv.writer(f_detail).writerow(['dataset', 'graph kernel', 'edit cost', + 'GED method', 'attr distance', 'fit method', 'num graphs', + 'target', 'repeat', 'SOD SM', 'SOD GM', 'dis_k SM', 'dis_k GM', + 'min dis_k gi', 'best kernel dis', 'best graph index', + 'SOD SM -> GM', 'dis_k SM -> GM', 'dis_k gi -> SM', + 'dis_k gi -> GM', 'edit cost constants', 'time precompute gm', + 'time optimize ec', 'time generate preimage', 'time total', + 'itrs', 'converged', 'num updates ecc', 'mge decrease order', + 'mge increase order', 'mge converged']) + f_detail.close() + + fn_output_summary = 'results_summary.' + ds_name + '.' + gkernel + '.csv' + f_summary = open(dir_output + fn_output_summary, 'a') + csv.writer(f_summary).writerow(['dataset', 'graph kernel', 'edit cost', + 'GED method', 'attr distance', 'fit method', 'num graphs', + 'target', 'SOD SM', 'SOD GM', 'dis_k SM', 'dis_k GM', + 'min dis_k gi', 'best kernel dis', 'best graph index', + 'SOD SM -> GM', 'dis_k SM -> GM', 'dis_k gi -> SM', + 'dis_k gi -> GM', 'time precompute gm', 'time optimize ec', + 'time generate preimage', 'time total', 'itrs', 'num converged', + 'num updates ecc', 'mge num decrease order', 'mge num increase order', + 'mge num converged', '# SOD SM -> GM', '# dis_k SM -> GM', + '# dis_k gi -> SM', '# dis_k gi -> GM']) + f_summary.close() + + return fn_output_detail, fn_output_summary + + +#Dessin median courrant +def draw_Letter_graph(graph, file_prefix): + import matplotlib + matplotlib.use('agg') + import matplotlib.pyplot as plt + plt.figure() + pos = {} + for n in graph.nodes: + pos[n] = np.array([float(graph.nodes[n]['x']),float(graph.nodes[n]['y'])]) + nx.draw_networkx(graph, pos) + plt.savefig(file_prefix + '.eps', format='eps', dpi=300) +# plt.show() + plt.clf() + plt.close() \ No newline at end of file diff --git a/gklearn/preimage/utils.py b/gklearn/preimage/utils.py index 55e1e9e..5ca0c1e 100644 --- a/gklearn/preimage/utils.py +++ b/gklearn/preimage/utils.py @@ -82,14 +82,14 @@ def generate_median_preimages_by_class(ds_name, mpg_options, kernel_options, ged gram_matrix_unnorm_list = [] time_precompute_gm_list = [] else: + gm_fname = dir_save + 'gram_matrix_unnorm.' + ds_name + '.' + kernel_options['name'] + '.gm.npz' gmfile = np.load(gm_fname, allow_pickle=True) # @todo: may not be safe. gram_matrix_unnorm_list = [item for item in gmfile['gram_matrix_unnorm_list']] time_precompute_gm_list = gmfile['run_time_list'].tolist() # repeats_better_sod_sm2gm = [] # repeats_better_dis_k_sm2gm = [] # repeats_better_dis_k_gi2sm = [] -# repeats_better_dis_k_gi2gm = [] - +# repeats_better_dis_k_gi2gm = [] print('starting generating preimage for each class of target...') idx_offset = 0 From 7e3da6b0bc97a800f20c587748d689c5836e32b4 Mon Sep 17 00:00:00 2001 From: jajupmochi Date: Wed, 27 May 2020 17:19:11 +0200 Subject: [PATCH 17/17] Add xp script: remove the best graph from median set. --- .../xp_remove_best_graph_init10.py | 3085 +++++++++++++++++ 1 file changed, 3085 insertions(+) create mode 100644 gklearn/preimage/experiments/xp_remove_best_graph_init10.py diff --git a/gklearn/preimage/experiments/xp_remove_best_graph_init10.py b/gklearn/preimage/experiments/xp_remove_best_graph_init10.py new file mode 100644 index 0000000..8b722ae --- /dev/null +++ b/gklearn/preimage/experiments/xp_remove_best_graph_init10.py @@ -0,0 +1,3085 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Tue Jan 14 15:39:29 2020 + +@author: ljia +""" +import multiprocessing +import functools +import sys +import os +import logging +from gklearn.utils.kernels import deltakernel, gaussiankernel, kernelproduct +from gklearn.preimage.remove_best_graph import remove_best_graph +from gklearn.utils import compute_gram_matrices_by_class + + +dir_root = '../results/xp_remove_best_graph.init10/' +num_random = 10 +initial_solutions = 10 + + +def xp_median_preimage_15_1(): + """xp 15_1: AIDS, StructuralSP, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'AIDS' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_15_2(): + """xp 15_2: AIDS, PathUpToH, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'AIDS' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'PathUpToH', + 'depth': 1, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_15_3(): + """xp 15_3: AIDS, Treelet, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'AIDS' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + pkernel = functools.partial(polynomialkernel, d=1, c=1e+2) + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_15_4(): + """xp 15_4: AIDS, WeisfeilerLehman, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'AIDS' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 10, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['chem', 'charge', 'x', 'y']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + +# # compute gram matrices for each class a priori. +# print('Compute gram matrices for each class a priori.') +# compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_14_1(): + """xp 14_1: DD, PathUpToH, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'DD' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'PathUpToH', + 'depth': 2, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # # compute gram matrices for each class a priori. + # print('Compute gram matrices for each class a priori.') + # compute_gram_matrices_by_class(ds_name, kernel_options, save_results=save_results, dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_13_1(): + """xp 13_1: PAH, StructuralSP, using NON_SYMBOLIC. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_13_2(): + """xp 13_2: PAH, ShortestPath, using NON_SYMBOLIC. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') # + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: # + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_1(): + """xp 12_1: PAH, StructuralSP, using NON_SYMBOLIC, unlabeled. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 0, 1, 1, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_2(): + """xp 12_2: PAH, PathUpToH, using CONSTANT, unlabeled. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'PathUpToH', + 'depth': 1, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_3(): + """xp 12_3: PAH, Treelet, using CONSTANT, unlabeled. + """ + from gklearn.utils.kernels import gaussiankernel + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + pkernel = functools.partial(gaussiankernel, gamma=None) # @todo + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_4(): + """xp 12_4: PAH, WeisfeilerLehman, using CONSTANT, unlabeled. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 14, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # # compute gram matrices for each class a priori. + # print('Compute gram matrices for each class a priori.') + # compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_12_5(): + """xp 12_5: PAH, ShortestPath, using NON_SYMBOLIC, unlabeled. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'PAH' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 0, 1, 1, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.unlabeled/' + ('update_order/' if update_order else '') # + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: # + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_1(): + """xp 9_1: MAO, StructuralSP, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'MAO' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_2(): + """xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'MAO' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'PathUpToH', + 'depth': 9, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_3(): + """xp 9_3: MAO, Treelet, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'MAO' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + pkernel = functools.partial(polynomialkernel, d=4, c=1e+7) + kernel_options = {'name': 'Treelet', # + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_9_4(): + """xp 9_4: MAO, WeisfeilerLehman, using CONSTANT, symbolic only. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'MAO' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 6, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.symb/' + ('update_order/' if update_order else '') + irrelevant_labels = {'node_attrs': ['x', 'y', 'z'], 'edge_labels': ['bond_stereo']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + +# # compute gram matrices for each class a priori. +# print('Compute gram matrices for each class a priori.') +# compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_1(): + """xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Monoterpenoides' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_2(): + """xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Monoterpenoides' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'PathUpToH', + 'depth': 7, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_3(): + """xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + """ + for update_order in [True, False]: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'Monoterpenoides' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + pkernel = functools.partial(polynomialkernel, d=2, c=1e+5) + kernel_options = {'name': 'Treelet', + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_8_4(): + """xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Monoterpenoides' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 4, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_1(): + """xp 7_1: MUTAG, StructuralSP, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'MUTAG' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_2(): + """xp 7_2: MUTAG, PathUpToH, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'MUTAG' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'PathUpToH', + 'depth': 2, # + 'k_func': 'MinMax', # + 'compute_method': 'trie', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required, cut_range=None) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_7_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_3(): + """xp 7_3: MUTAG, Treelet, using CONSTANT. + """ + for update_order in [True, False]: + from gklearn.utils.kernels import polynomialkernel + # set parameters. + ds_name = 'MUTAG' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + pkernel = functools.partial(polynomialkernel, d=3, c=1e+8) + kernel_options = {'name': 'Treelet', + 'sub_kernel': pkernel, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_7_4(): + """xp 7_4: MUTAG, WeisfeilerLehman, using CONSTANT. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'MUTAG' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [4, 4, 2, 1, 1, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, # + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + kernel_options = {'name': 'WeisfeilerLehman', + 'height': 1, + 'base_kernel': 'subtree', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'CONSTANT', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_6_1(): + """xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'COIL-RAG' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_6_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_6_2(): + """xp 6_2: COIL-RAG, ShortestPath, using NON_SYMBOLIC. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'COIL-RAG' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 1], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', # + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_6_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_5_1(): + """xp 5_1: FRANKENSTEIN, StructuralSP, using NON_SYMBOLIC. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'FRANKENSTEIN' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_4_1(): + """xp 4_1: COLORS-3, StructuralSP, using NON_SYMBOLIC. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'COLORS-3' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3, 0], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'NON_SYMBOLIC', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_3_2(): + """xp 3_2: Fingerprint, ShortestPath, using LETTER2, only node attrs. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Fingerprint' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.01, 0.125, 0.125], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = {'edge_attrs': ['orient', 'angle']} # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_3_1(): + """xp 3_1: Fingerprint, StructuralSP, using LETTER2, only node attrs. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Fingerprint' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.01, 0.125, 0.125], # + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = {'edge_attrs': ['orient', 'angle']} # + edge_required = False # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_2_1(): + """xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'COIL-DEL' # + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [3, 3, 1, 3, 3], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', + # 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '.node_attrs/' + ('update_order/' if update_order else '') + irrelevant_labels = {'edge_labels': ['valence']} + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + +# # compute gram matrices for each class a priori. +# print('Compute gram matrices for each class a priori.') +# compute_gram_matrices_by_class(ds_name, kernel_options, save_results=True, dir_save=dir_save, irrelevant_labels=irrelevant_labels) + + # generate preimages. + for fit_method in ['k-graphs'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels) + except Exception as exp: + print('An exception occured when running this experiment:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_1_1(): + """xp 1_1: Letter-high, StructuralSP. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Letter-high' + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_1_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_1_2(): + """xp 1_2: Letter-high, ShortestPath. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Letter-high' + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.675, 0.675, 0.75, 0.425, 0.425], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_1_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_10_1(): + """xp 10_1: Letter-med, StructuralSP. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Letter-med' + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.75, 0.475, 0.475], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_10_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_10_2(): + """xp 10_2: Letter-med, ShortestPath. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Letter-med' + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.525, 0.525, 0.75, 0.475, 0.475], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_10_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_11_1(): + """xp 11_1: Letter-low, StructuralSP. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Letter-low' + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.075, 0.075, 0.25, 0.075, 0.075], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'StructuralSP', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'edge_kernels': sub_kernels, + 'compute_method': 'naive', + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_11_1:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +def xp_median_preimage_11_2(): + """xp 11_2: Letter-low, ShortestPath. + """ + for update_order in [True, False]: + # set parameters. + ds_name = 'Letter-low' + mpg_options = {'fit_method': 'k-graphs', + 'init_ecc': [0.075, 0.075, 0.25, 0.075, 0.075], + 'ds_name': ds_name, + 'parallel': True, # False + 'time_limit_in_sec': 0, + 'max_itrs': 100, + 'max_itrs_without_update': 3, + 'epsilon_residual': 0.01, + 'epsilon_ec': 0.1, + 'verbose': 2} + mixkernel = functools.partial(kernelproduct, deltakernel, gaussiankernel) + sub_kernels = {'symb': deltakernel, 'nsymb': gaussiankernel, 'mix': mixkernel} + kernel_options = {'name': 'ShortestPath', + 'edge_weight': None, + 'node_kernels': sub_kernels, + 'parallel': 'imap_unordered', +# 'parallel': None, + 'n_jobs': multiprocessing.cpu_count(), + 'normalize': True, + 'verbose': 2} + ged_options = {'method': 'IPFP', + 'initialization_method': 'RANDOM', # 'NODE' + 'initial_solutions': initial_solutions, # 1 + 'edit_cost': 'LETTER2', + 'attr_distance': 'euclidean', + 'ratio_runs_from_initial_solutions': 1, + 'threads': multiprocessing.cpu_count(), + 'init_option': 'EAGER_WITHOUT_SHUFFLED_COPIES'} + mge_options = {'init_type': 'MEDOID', + 'random_inits': 10, + 'time_limit': 0, + 'verbose': 2, + 'update_order': update_order, + 'randomness': 'REAL', + 'refine': False} + save_results = True + dir_save = dir_root + ds_name + '.' + kernel_options['name'] + '/' + ('update_order/' if update_order else '') + irrelevant_labels = None # + edge_required = True # + + if not os.path.exists(dir_save): + os.makedirs(dir_save) + file_output = open(dir_save + 'output.txt', 'a') + sys.stdout = file_output + + # print settings. + print('parameters:') + print('dataset name:', ds_name) + print('mpg_options:', mpg_options) + print('kernel_options:', kernel_options) + print('ged_options:', ged_options) + print('mge_options:', mge_options) + print('save_results:', save_results) + print('irrelevant_labels:', irrelevant_labels) + print() + + # generate preimages. + for fit_method in ['k-graphs', 'expert'] + ['random'] * num_random: + print('\n-------------------------------------') + print('fit method:', fit_method, '\n') + mpg_options['fit_method'] = fit_method + try: + remove_best_graph(ds_name, mpg_options, kernel_options, ged_options, mge_options, save_results=save_results, save_medians=True, plot_medians=True, load_gm='auto', dir_save=dir_save, irrelevant_labels=irrelevant_labels, edge_required=edge_required) + except Exception as exp: + print('An exception occured when running experiment on xp_median_preimage_11_2:') + LOG_FILENAME = dir_save + 'error.txt' + logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) + logging.exception('') + print(repr(exp)) + + +if __name__ == "__main__": + +# #### xp 1_1: Letter-high, StructuralSP. + # xp_median_preimage_1_1() + +# #### xp 1_2: Letter-high, ShortestPath. + # xp_median_preimage_1_2() + +# #### xp 10_1: Letter-med, StructuralSP. + # xp_median_preimage_10_1() + +# #### xp 10_2: Letter-med, ShortestPath. + # xp_median_preimage_10_2() + +# #### xp 11_1: Letter-low, StructuralSP. + # xp_median_preimage_11_1() + +# #### xp 11_2: Letter-low, ShortestPath. + # xp_median_preimage_11_2() +# +# #### xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. +# # xp_median_preimage_2_1() +# +# #### xp 3_1: Fingerprint, StructuralSP, using LETTER2, only node attrs. +# # xp_median_preimage_3_1() + +# #### xp 3_2: Fingerprint, ShortestPath, using LETTER2, only node attrs. + # xp_median_preimage_3_2() + +# #### xp 4_1: COLORS-3, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_4_1() +# +# #### xp 5_1: FRANKENSTEIN, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_5_1() +# +# #### xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. + # xp_median_preimage_6_1() + +# #### xp 6_2: COIL-RAG, ShortestPath, using NON_SYMBOLIC. + # xp_median_preimage_6_2() + +# #### xp 7_1: MUTAG, StructuralSP, using CONSTANT. + # xp_median_preimage_7_1() + +# #### xp 7_2: MUTAG, PathUpToH, using CONSTANT. + # xp_median_preimage_7_2() + +# #### xp 7_3: MUTAG, Treelet, using CONSTANT. + # xp_median_preimage_7_3() + +# #### xp 7_4: MUTAG, WeisfeilerLehman, using CONSTANT. + # xp_median_preimage_7_4() +# +# #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + # xp_median_preimage_8_1() + +# #### xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + # xp_median_preimage_8_2() + +# #### xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + # xp_median_preimage_8_3() + +# #### xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + # xp_median_preimage_8_4() + +# #### xp 9_1: MAO, StructuralSP, using CONSTANT, symbolic only. + # xp_median_preimage_9_1() + +# #### xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. + # xp_median_preimage_9_2() + +# #### xp 9_3: MAO, Treelet, using CONSTANT, symbolic only. + # xp_median_preimage_9_3() + +# #### xp 9_4: MAO, WeisfeilerLehman, using CONSTANT, symbolic only. + # xp_median_preimage_9_4() + + #### xp 12_1: PAH, StructuralSP, using NON_SYMBOLIC, unlabeled. + # xp_median_preimage_12_1() + + #### xp 12_2: PAH, PathUpToH, using CONSTANT, unlabeled. + # xp_median_preimage_12_2() + + #### xp 12_3: PAH, Treelet, using CONSTANT, unlabeled. + # xp_median_preimage_12_3() + + #### xp 12_4: PAH, WeisfeilerLehman, using CONSTANT, unlabeled. + # xp_median_preimage_12_4() + + #### xp 12_5: PAH, ShortestPath, using NON_SYMBOLIC, unlabeled. + # xp_median_preimage_12_5() + + #### xp 13_1: PAH, StructuralSP, using NON_SYMBOLIC. + # xp_median_preimage_13_1() + + #### xp 13_2: PAH, ShortestPath, using NON_SYMBOLIC. +# xp_median_preimage_13_2() + + #### xp 14_1: DD, PathUpToH, using CONSTANT. +# xp_median_preimage_14_1() + +# #### xp 15_1: AIDS, StructuralSP, using CONSTANT, symbolic only. + # xp_median_preimage_15_1() + +# #### xp 15_2: AIDS, PathUpToH, using CONSTANT, symbolic only. + # xp_median_preimage_15_2() + +# #### xp 15_3: AIDS, Treelet, using CONSTANT, symbolic only. + # xp_median_preimage_15_3() + +# #### xp 15_4: AIDS, WeisfeilerLehman, using CONSTANT, symbolic only. + # xp_median_preimage_15_4() + + + + + + + +# #### xp 7_2: MUTAG, PathUpToH, using CONSTANT. + xp_median_preimage_7_2() + +# #### xp 7_3: MUTAG, Treelet, using CONSTANT. + xp_median_preimage_7_3() + +# #### xp 7_4: MUTAG, WeisfeilerLehman, using CONSTANT. + xp_median_preimage_7_4() +# +# #### xp 7_1: MUTAG, StructuralSP, using CONSTANT. + xp_median_preimage_7_1() + +# #### xp 8_2: Monoterpenoides, PathUpToH, using CONSTANT. + xp_median_preimage_8_2() + +# #### xp 8_3: Monoterpenoides, Treelet, using CONSTANT. + xp_median_preimage_8_3() + +# #### xp 8_4: Monoterpenoides, WeisfeilerLehman, using CONSTANT. + xp_median_preimage_8_4() + +# #### xp 8_1: Monoterpenoides, StructuralSP, using CONSTANT. + xp_median_preimage_8_1() + +# #### xp 9_2: MAO, PathUpToH, using CONSTANT, symbolic only. + xp_median_preimage_9_2() + +# #### xp 9_3: MAO, Treelet, using CONSTANT, symbolic only. + xp_median_preimage_9_3() + +# #### xp 9_4: MAO, WeisfeilerLehman, using CONSTANT, symbolic only. + xp_median_preimage_9_4() + +# #### xp 9_1: MAO, StructuralSP, using CONSTANT, symbolic only. + xp_median_preimage_9_1() + + #### xp 12_1: PAH, StructuralSP, using NON_SYMBOLIC, unlabeled. + xp_median_preimage_12_1() + + #### xp 12_2: PAH, PathUpToH, using CONSTANT, unlabeled. + xp_median_preimage_12_2() + + #### xp 12_3: PAH, Treelet, using CONSTANT, unlabeled. + xp_median_preimage_12_3() + + #### xp 12_4: PAH, WeisfeilerLehman, using CONSTANT, unlabeled. + xp_median_preimage_12_4() + + #### xp 12_5: PAH, ShortestPath, using NON_SYMBOLIC, unlabeled. + xp_median_preimage_12_5() + +# #### xp 1_1: Letter-high, StructuralSP. + xp_median_preimage_1_1() + +# #### xp 1_2: Letter-high, ShortestPath. + xp_median_preimage_1_2() + +# #### xp 10_1: Letter-med, StructuralSP. + xp_median_preimage_10_1() + +# #### xp 10_2: Letter-med, ShortestPath. + xp_median_preimage_10_2() + +# #### xp 11_1: Letter-low, StructuralSP. + xp_median_preimage_11_1() + +# #### xp 11_2: Letter-low, ShortestPath. + xp_median_preimage_11_2() + + #### xp 13_1: PAH, StructuralSP, using NON_SYMBOLIC. + xp_median_preimage_13_1() + + #### xp 13_2: PAH, ShortestPath, using NON_SYMBOLIC. + xp_median_preimage_13_2() + +# #### xp 6_1: COIL-RAG, StructuralSP, using NON_SYMBOLIC. + xp_median_preimage_6_1() + + # #### xp 15_1: AIDS, StructuralSP, using CONSTANT, symbolic only. + xp_median_preimage_15_1() + +# #### xp 15_2: AIDS, PathUpToH, using CONSTANT, symbolic only. + xp_median_preimage_15_2() + +# #### xp 15_3: AIDS, Treelet, using CONSTANT, symbolic only. + xp_median_preimage_15_3() + +# #### xp 15_4: AIDS, WeisfeilerLehman, using CONSTANT, symbolic only. + xp_median_preimage_15_4() +# +# #### xp 2_1: COIL-DEL, StructuralSP, using LETTER2, only node attrs. + xp_median_preimage_2_1() +# +# #### xp 3_1: Fingerprint, StructuralSP, using LETTER2, only node attrs. +# # xp_median_preimage_3_1() + +# #### xp 3_2: Fingerprint, ShortestPath, using LETTER2, only node attrs. + # xp_median_preimage_3_2() + +# #### xp 4_1: COLORS-3, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_4_1() +# +# #### xp 5_1: FRANKENSTEIN, StructuralSP, using NON_SYMBOLIC. +# # xp_median_preimage_5_1() +# +# #### xp 6_2: COIL-RAG, ShortestPath, using NON_SYMBOLIC. + # xp_median_preimage_6_2() + + #### xp 14_1: DD, PathUpToH, using CONSTANT. +# xp_median_preimage_14_1()