diff --git a/archives/prospr_core.tar.gz b/archives/prospr_core.tar.gz index ac77c8a..bbdaa29 100644 Binary files a/archives/prospr_core.tar.gz and b/archives/prospr_core.tar.gz differ diff --git a/archives/prospr_core.zip b/archives/prospr_core.zip index 44c511e..ffe9392 100644 Binary files a/archives/prospr_core.zip and b/archives/prospr_core.zip differ diff --git a/prospr/_version.py b/prospr/_version.py index b87fc0c..bff3210 100644 --- a/prospr/_version.py +++ b/prospr/_version.py @@ -1 +1 @@ -__version__ = "1.2.9" +__version__ = "1.2.10" diff --git a/prospr/core/src/depth_first_bnb.cpp b/prospr/core/src/depth_first_bnb.cpp index 3ddbc5e..b80b5c9 100644 --- a/prospr/core/src/depth_first_bnb.cpp +++ b/prospr/core/src/depth_first_bnb.cpp @@ -104,7 +104,8 @@ bool reach_prune(Protein *protein, int move, int best_score, void try_store_checkpoint(const Protein &protein, const std::stack &dfs_stack, int move, bool placed_amino, int best_score, int score, - const std::vector &best_hash, int iterations) { + const std::vector &best_hash, + uint64_t iterations) { /* Return if cache not in use. */ auto cache_dir = get_cache_dir("depth_first_bnb", true); if (!cache_dir) { @@ -170,7 +171,7 @@ void try_store_checkpoint(const Protein &protein, void try_load_checkpoint(Protein &protein, std::stack &dfs_stack, int &move, bool &placed_amino, int &best_score, int &score, std::vector &best_hash, - int &iterations) { + uint64_t &iterations) { /* Return if cache not in use. */ auto cache_dir = get_cache_dir("depth_first_bnb"); if (!cache_dir) { @@ -250,7 +251,7 @@ void try_load_checkpoint(Protein &protein, std::stack &dfs_stack, best_hash.push_back(std::stoi(token)); } } else if (key == "iterations") - iterations = std::stoi(value) - 1; + iterations = std::stoull(value) - 1; } } @@ -333,7 +334,7 @@ void depth_first_bnb(Protein *protein, std::string prune_func) { std::vector best_hash; int signal = 0; - int iterations = 0; + uint64_t iterations = 0; /* Load intermediate solution from cache if present. */ try_load_checkpoint(*protein, dfs_stack, move, placed_amino, best_score, diff --git a/prospr/core/src/utils.cpp b/prospr/core/src/utils.cpp index b610ef0..e374fdf 100644 --- a/prospr/core/src/utils.cpp +++ b/prospr/core/src/utils.cpp @@ -181,8 +181,8 @@ void load_protein_state(Protein &protein, std::istream &in) { protein.place_amino(std::stoi(token)); } } else if (key == "aminos_placed") - protein._set_aminos_placed(std::stoi(value)); + protein._set_aminos_placed(std::stoull(value)); else if (key == "solutions_checked") - protein._set_solutions_checked(std::stoi(value)); + protein._set_solutions_checked(std::stoull(value)); } }