From b88288f8db98aeaf5f63f82451d9d8b348a9fd1d Mon Sep 17 00:00:00 2001 From: Filippo Martini Date: Sat, 19 Dec 2020 15:53:43 +0100 Subject: [PATCH] Change one_iteration_ctpc_algo method signature --- PyCTBN/classes/structure_estimator.py | 8 +- docs/_sources/examples.rst.txt | 4 +- docs/classes.html | 9 +- docs/examples.html | 4 +- docs/genindex.html | 2 +- docs/index.html | 4 +- docs/modules.html | 2 +- docs/py-modindex.html | 2 +- docs/search.html | 2 +- sphinx_output/Makefile | 20 + sphinx_output/_build/doctrees/classes.doctree | Bin 0 -> 373216 bytes .../_build/doctrees/environment.pickle | Bin 0 -> 45735 bytes .../_build/doctrees/examples.doctree | Bin 0 -> 11359 bytes sphinx_output/_build/doctrees/index.doctree | Bin 0 -> 4864 bytes sphinx_output/_build/doctrees/modules.doctree | Bin 0 -> 2594 bytes sphinx_output/_build/html/.buildinfo | 4 + .../_build/html/_sources/classes.rst.txt | 101 + .../_build/html/_sources/examples.rst.txt | 121 + .../_build/html/_sources/index.rst.txt | 21 + .../_build/html/_sources/modules.rst.txt | 7 + sphinx_output/_build/html/_static/basic.css | 856 ++ .../_build/html/_static/css/badge_only.css | 2 + .../_build/html/_static/css/darker.css | 93 + sphinx_output/_build/html/_static/css/pdj.css | 494 + .../_build/html/_static/css/theme.css | 5 + sphinx_output/_build/html/_static/doctools.js | 316 + .../html/_static/documentation_options.js | 12 + sphinx_output/_build/html/_static/file.png | Bin 0 -> 286 bytes .../_static/fonts/fontawesome-webfont.eot | Bin 0 -> 38205 bytes .../_static/fonts/fontawesome-webfont.svg | 414 + .../_static/fonts/fontawesome-webfont.ttf | Bin 0 -> 80652 bytes .../_static/fonts/fontawesome-webfont.woff | Bin 0 -> 44432 bytes .../_build/html/_static/img/porao-branco.png | Bin 0 -> 1127 bytes .../_build/html/_static/jquery-3.5.1.js | 10872 ++++++++++++++++ sphinx_output/_build/html/_static/jquery.js | 2 + sphinx_output/_build/html/_static/js/pdj.js | 13 + sphinx_output/_build/html/_static/js/theme.js | 47 + .../_build/html/_static/language_data.js | 297 + sphinx_output/_build/html/_static/minus.png | Bin 0 -> 90 bytes sphinx_output/_build/html/_static/plus.png | Bin 0 -> 90 bytes .../_build/html/_static/pygments.css | 7 + .../_build/html/_static/searchtools.js | 514 + .../_build/html/_static/underscore-1.3.1.js | 999 ++ .../_build/html/_static/underscore.js | 31 + sphinx_output/_build/html/classes.html | 1475 +++ sphinx_output/_build/html/examples.html | 314 + sphinx_output/_build/html/genindex.html | 675 + sphinx_output/_build/html/index.html | 234 + sphinx_output/_build/html/modules.html | 210 + sphinx_output/_build/html/objects.inv | Bin 0 -> 1322 bytes sphinx_output/_build/html/py-modindex.html | 263 + sphinx_output/_build/html/search.html | 206 + sphinx_output/_build/html/searchindex.js | 1 + sphinx_output/classes.rst | 101 + sphinx_output/conf.py | 58 + sphinx_output/examples.rst | 121 + sphinx_output/index.rst | 21 + sphinx_output/make.bat | 35 + sphinx_output/modules.rst | 7 + 59 files changed, 18985 insertions(+), 21 deletions(-) create mode 100644 sphinx_output/Makefile create mode 100644 sphinx_output/_build/doctrees/classes.doctree create mode 100644 sphinx_output/_build/doctrees/environment.pickle create mode 100644 sphinx_output/_build/doctrees/examples.doctree create mode 100644 sphinx_output/_build/doctrees/index.doctree create mode 100644 sphinx_output/_build/doctrees/modules.doctree create mode 100644 sphinx_output/_build/html/.buildinfo create mode 100644 sphinx_output/_build/html/_sources/classes.rst.txt create mode 100644 sphinx_output/_build/html/_sources/examples.rst.txt create mode 100644 sphinx_output/_build/html/_sources/index.rst.txt create mode 100644 sphinx_output/_build/html/_sources/modules.rst.txt create mode 100644 sphinx_output/_build/html/_static/basic.css create mode 100644 sphinx_output/_build/html/_static/css/badge_only.css create mode 100644 sphinx_output/_build/html/_static/css/darker.css create mode 100644 sphinx_output/_build/html/_static/css/pdj.css create mode 100644 sphinx_output/_build/html/_static/css/theme.css create mode 100644 sphinx_output/_build/html/_static/doctools.js create mode 100644 sphinx_output/_build/html/_static/documentation_options.js create mode 100644 sphinx_output/_build/html/_static/file.png create mode 100644 sphinx_output/_build/html/_static/fonts/fontawesome-webfont.eot create mode 100644 sphinx_output/_build/html/_static/fonts/fontawesome-webfont.svg create mode 100644 sphinx_output/_build/html/_static/fonts/fontawesome-webfont.ttf create mode 100644 sphinx_output/_build/html/_static/fonts/fontawesome-webfont.woff create mode 100644 sphinx_output/_build/html/_static/img/porao-branco.png create mode 100644 sphinx_output/_build/html/_static/jquery-3.5.1.js create mode 100644 sphinx_output/_build/html/_static/jquery.js create mode 100644 sphinx_output/_build/html/_static/js/pdj.js create mode 100644 sphinx_output/_build/html/_static/js/theme.js create mode 100644 sphinx_output/_build/html/_static/language_data.js create mode 100644 sphinx_output/_build/html/_static/minus.png create mode 100644 sphinx_output/_build/html/_static/plus.png create mode 100644 sphinx_output/_build/html/_static/pygments.css create mode 100644 sphinx_output/_build/html/_static/searchtools.js create mode 100644 sphinx_output/_build/html/_static/underscore-1.3.1.js create mode 100644 sphinx_output/_build/html/_static/underscore.js create mode 100644 sphinx_output/_build/html/classes.html create mode 100644 sphinx_output/_build/html/examples.html create mode 100644 sphinx_output/_build/html/genindex.html create mode 100644 sphinx_output/_build/html/index.html create mode 100644 sphinx_output/_build/html/modules.html create mode 100644 sphinx_output/_build/html/objects.inv create mode 100644 sphinx_output/_build/html/py-modindex.html create mode 100644 sphinx_output/_build/html/search.html create mode 100644 sphinx_output/_build/html/searchindex.js create mode 100644 sphinx_output/classes.rst create mode 100644 sphinx_output/conf.py create mode 100644 sphinx_output/examples.rst create mode 100644 sphinx_output/index.rst create mode 100644 sphinx_output/make.bat create mode 100644 sphinx_output/modules.rst diff --git a/PyCTBN/classes/structure_estimator.py b/PyCTBN/classes/structure_estimator.py index e6812b5..0ade97b 100644 --- a/PyCTBN/classes/structure_estimator.py +++ b/PyCTBN/classes/structure_estimator.py @@ -163,16 +163,15 @@ class StructureEstimator(object): return False return True - def one_iteration_of_CTPC_algorithm(self, var_id: str, tot_vars_count: int) -> None: + def one_iteration_of_CTPC_algorithm(self, var_id: str) -> None: """Performs an iteration of the CTPC algorithm using the node ``var_id`` as ``test_child``. :param var_id: the node label of the test child :type var_id: string - :param tot_vars_count: the number of _nodes in the net - :type tot_vars_count: int """ u = list(self._complete_graph.predecessors(var_id)) child_states_numb = self._sample_path.structure.get_states_number(var_id) + tot_vars_count = self._sample_path.total_variables_count b = 0 while b < len(u): parent_indx = 0 @@ -214,8 +213,7 @@ class StructureEstimator(object): """Compute the CTPC algorithm over the entire net. """ ctpc_algo = self.one_iteration_of_CTPC_algorithm - total_vars_numb = self._sample_path.total_variables_count - [ctpc_algo(n, total_vars_numb) for n in tqdm(self._nodes)] + [ctpc_algo(n) for n in tqdm(self._nodes)] def save_results(self) -> None: """Save the estimated Structure to a .json file in the path where the data are loaded from. diff --git a/docs/_sources/examples.rst.txt b/docs/_sources/examples.rst.txt index 5fd4dbf..b1e07c5 100644 --- a/docs/_sources/examples.rst.txt +++ b/docs/_sources/examples.rst.txt @@ -1,8 +1,8 @@ Examples ======== -Installation/Usage: -******************* +Installation/Usage +****************** Download the release in .tar.gz or .whl format and simply use pip install to install it:: $pip install PyCTBN-1.0.tar.gz diff --git a/docs/classes.html b/docs/classes.html index 561c61f..5f7476b 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -79,7 +79,7 @@
  • Examples
  • Examples
  • Examples
  • Examples
  • Examples
  • Examples
  • Examples
  • Examples