From 79d73373b9ecb607cc5058a81022963929994569 Mon Sep 17 00:00:00 2001 From: Xian Date: Thu, 18 Sep 2025 12:21:16 +0200 Subject: [PATCH 01/10] Change has_distances to has_distances_net because something doesn't like overloading the function --- bdsg/include/bdsg/snarl_distance_index.hpp | 2 +- bdsg/src/snarl_distance_index.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bdsg/include/bdsg/snarl_distance_index.hpp b/bdsg/include/bdsg/snarl_distance_index.hpp index 15b15f86..bf7f0f11 100644 --- a/bdsg/include/bdsg/snarl_distance_index.hpp +++ b/bdsg/include/bdsg/snarl_distance_index.hpp @@ -541,7 +541,7 @@ class SnarlDistanceIndex : public SnarlDecomposition, public TriviallySerializab net_handle_t get_snarl_child_from_rank(const net_handle_t& snarl, const size_t& rank) const; /// Does this net handle store distances? - bool has_distances(const net_handle_t& net) const; + bool has_distances_net(const net_handle_t& net) const; /// Does the distance index in general store distances? bool has_distances() const; diff --git a/bdsg/src/snarl_distance_index.cpp b/bdsg/src/snarl_distance_index.cpp index e14fab38..79ac9ca2 100644 --- a/bdsg/src/snarl_distance_index.cpp +++ b/bdsg/src/snarl_distance_index.cpp @@ -702,7 +702,7 @@ net_handle_t SnarlDistanceIndex::get_snarl_child_from_rank(const net_handle_t& s } } -bool SnarlDistanceIndex::has_distances(const net_handle_t& net) const { +bool SnarlDistanceIndex::has_distances_net(const net_handle_t& net) const { return has_distances(SnarlTreeRecord(net, &snarl_tree_records).get_record_type()); } From 457fa97f653798b4ed9f9b6689ecbe6ccfb94f20 Mon Sep 17 00:00:00 2001 From: Jean Monlong Date: Thu, 18 Sep 2025 14:30:33 +0200 Subject: [PATCH 02/10] rename has_distance to avoid overloading that breaks python bindings --- bdsg/include/bdsg/snarl_distance_index.hpp | 4 +- bdsg/src/snarl_distance_index.cpp | 80 +++++++++++----------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/bdsg/include/bdsg/snarl_distance_index.hpp b/bdsg/include/bdsg/snarl_distance_index.hpp index bf7f0f11..164fc3ac 100644 --- a/bdsg/include/bdsg/snarl_distance_index.hpp +++ b/bdsg/include/bdsg/snarl_distance_index.hpp @@ -541,7 +541,7 @@ class SnarlDistanceIndex : public SnarlDecomposition, public TriviallySerializab net_handle_t get_snarl_child_from_rank(const net_handle_t& snarl, const size_t& rank) const; /// Does this net handle store distances? - bool has_distances_net(const net_handle_t& net) const; + bool has_distances(const net_handle_t& net) const; /// Does the distance index in general store distances? bool has_distances() const; @@ -631,7 +631,7 @@ class SnarlDistanceIndex : public SnarlDecomposition, public TriviallySerializab ROOT_SNARL, DISTANCED_ROOT_SNARL, CHAIN, DISTANCED_CHAIN, MULTICOMPONENT_CHAIN, CHILDREN}; - const static bool has_distances(record_t type) { + const static bool record_has_distances(record_t type) { return type == DISTANCED_NODE || type == DISTANCED_TRIVIAL_SNARL || type == DISTANCED_SIMPLE_SNARL || type == DISTANCED_SNARL || type == OVERSIZED_SNARL || type == DISTANCED_ROOT_SNARL || type == DISTANCED_CHAIN || type == MULTICOMPONENT_CHAIN; diff --git a/bdsg/src/snarl_distance_index.cpp b/bdsg/src/snarl_distance_index.cpp index 79ac9ca2..6596a7d9 100644 --- a/bdsg/src/snarl_distance_index.cpp +++ b/bdsg/src/snarl_distance_index.cpp @@ -702,8 +702,8 @@ net_handle_t SnarlDistanceIndex::get_snarl_child_from_rank(const net_handle_t& s } } -bool SnarlDistanceIndex::has_distances_net(const net_handle_t& net) const { - return has_distances(SnarlTreeRecord(net, &snarl_tree_records).get_record_type()); +bool SnarlDistanceIndex::has_distances(const net_handle_t& net) const { + return record_has_distances(SnarlTreeRecord(net, &snarl_tree_records).get_record_type()); } bool SnarlDistanceIndex::has_distances() const { @@ -3246,7 +3246,7 @@ size_t SnarlDistanceIndex::node_length(const net_handle_t& net) const { size_t SnarlDistanceIndex::minimum_length(const net_handle_t& net) const { auto record_type = SnarlTreeRecord(net, &snarl_tree_records).get_record_type(); - if (!has_distances(record_type)) { + if (!record_has_distances(record_type)) { throw runtime_error("error: trying to access get distance in a distanceless index"); } else if (record_type == DISTANCED_TRIVIAL_SNARL) { return TrivialSnarlRecord(get_record_offset(net), &snarl_tree_records).get_node_length(get_node_record_offset(net)); @@ -3275,7 +3275,7 @@ size_t SnarlDistanceIndex::chain_minimum_length(const net_handle_t& net) const { } size_t SnarlDistanceIndex::maximum_length(const net_handle_t& net) const { auto record_type = SnarlTreeRecord(net, &snarl_tree_records).get_record_type(); - if (!has_distances(record_type)) { + if (!record_has_distances(record_type)) { throw runtime_error("error: trying to access get distance in a distanceless index"); } else if (record_type == DISTANCED_TRIVIAL_SNARL && get_node_record_offset(net) != 0) { @@ -4195,14 +4195,14 @@ size_t SnarlDistanceIndex::SnarlRecord::record_size() { } size_t SnarlDistanceIndex::SnarlRecord::get_distance_start_start() const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + SNARL_DISTANCE_START_START_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::SnarlRecord::get_distance_end_end() const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + SNARL_DISTANCE_END_END_OFFSET); @@ -4347,7 +4347,7 @@ void SnarlDistanceIndex::SnarlRecordWriter::set_distance(size_t rank1, bool righ } size_t SnarlDistanceIndex::SnarlRecord::get_distance(size_t rank1, bool right_side1, size_t rank2, bool right_side2) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } if (get_record_type() == OVERSIZED_SNARL) { @@ -4490,7 +4490,7 @@ nid_t SnarlDistanceIndex::SimpleSnarlRecord::get_node_id(size_t rank) const { return (*records)->at(record_offset + SIMPLE_SNARL_RECORD_SIZE + ((rank-2)*2)); } size_t SnarlDistanceIndex::SimpleSnarlRecord::get_node_length(size_t rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } rank = rank == std::numeric_limits::max() ? node_rank : rank; @@ -4505,7 +4505,7 @@ bool SnarlDistanceIndex::SimpleSnarlRecord::get_node_is_reversed(size_t rank) co return (*records)->at(record_offset + SIMPLE_SNARL_RECORD_SIZE + ((rank-2)*2) + 1) & 1; } size_t SnarlDistanceIndex::SimpleSnarlRecord::get_distance(size_t rank1, bool right_side1, size_t rank2, bool right_side2) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } if (rank1 > rank2) { @@ -4606,7 +4606,7 @@ nid_t SnarlDistanceIndex::NodeRecord::get_node_id() const { return (*records)->at(record_offset + NODE_ID_OFFSET); } size_t SnarlDistanceIndex::NodeRecord::get_node_length() const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } return get_min_length(); @@ -4622,28 +4622,28 @@ size_t SnarlDistanceIndex::NodeRecord::get_node_length() const { //} } size_t SnarlDistanceIndex::NodeRecord::get_distance_left_start() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + NODE_DISTANCE_LEFT_START_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::NodeRecord::get_distance_right_start() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + NODE_DISTANCE_RIGHT_START_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::NodeRecord::get_distance_left_end() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + NODE_DISTANCE_LEFT_END_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::NodeRecord::get_distance_right_end() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + NODE_DISTANCE_RIGHT_END_OFFSET); @@ -4667,7 +4667,7 @@ size_t SnarlDistanceIndex::TrivialSnarlRecord::get_node_count() const { } tuple SnarlDistanceIndex::TrivialSnarlRecord::get_chain_values(size_t node_rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distances @@ -4717,7 +4717,7 @@ tuple SnarlDistanceIndex::TrivialSnarlRecord::ge } size_t SnarlDistanceIndex::TrivialSnarlRecord::get_max_prefix_sum(size_t node_rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distances @@ -4736,7 +4736,7 @@ size_t SnarlDistanceIndex::TrivialSnarlRecord::get_max_prefix_sum(size_t node_ra } size_t SnarlDistanceIndex::TrivialSnarlRecord::get_prefix_sum(size_t node_rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distances @@ -4752,7 +4752,7 @@ size_t SnarlDistanceIndex::TrivialSnarlRecord::get_prefix_sum(size_t node_rank) } } size_t SnarlDistanceIndex::TrivialSnarlRecord::get_forward_loop(size_t node_rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distances @@ -4773,7 +4773,7 @@ size_t SnarlDistanceIndex::TrivialSnarlRecord::get_forward_loop(size_t node_rank return sum(forward_loop, right_offset*2); } size_t SnarlDistanceIndex::TrivialSnarlRecord::get_reverse_loop(size_t node_rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distances @@ -4789,7 +4789,7 @@ size_t SnarlDistanceIndex::TrivialSnarlRecord::get_reverse_loop(size_t node_rank return sum(reverse_loop, left_offset*2); } size_t SnarlDistanceIndex::TrivialSnarlRecord::get_chain_component(size_t node_rank, bool get_end) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } if (!get_end && node_rank == 0 && record_offset == ChainRecord(get_parent_record_offset(), records).get_first_node_offset()){ @@ -4800,7 +4800,7 @@ size_t SnarlDistanceIndex::TrivialSnarlRecord::get_chain_component(size_t node_r } size_t SnarlDistanceIndex::TrivialSnarlRecord::get_node_length(size_t node_rank) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } if (node_rank == 0) { @@ -4883,25 +4883,25 @@ void SnarlDistanceIndex::NodeRecordWriter::set_rank_in_parent(size_t value) { (*records)->at(record_offset + NODE_RANK_OFFSET) = value; } void SnarlDistanceIndex::NodeRecordWriter::set_distance_left_start(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + NODE_DISTANCE_LEFT_START_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); } void SnarlDistanceIndex::NodeRecordWriter::set_distance_right_start(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + NODE_DISTANCE_RIGHT_START_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); } void SnarlDistanceIndex::NodeRecordWriter::set_distance_left_end(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + NODE_DISTANCE_LEFT_END_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); } void SnarlDistanceIndex::NodeRecordWriter::set_distance_right_end(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + NODE_DISTANCE_RIGHT_END_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); @@ -4943,7 +4943,7 @@ void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_node_count(size_t value) (*records)->at(record_offset+TRIVIAL_SNARL_NODE_COUNT_OFFSET)=value; } void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_prefix_sum(size_t value) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distance_indexing @@ -4954,7 +4954,7 @@ void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_prefix_sum(size_t value) (*records)->at(record_offset + TRIVIAL_SNARL_PREFIX_SUM_OFFSET) = value; } void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_max_prefix_sum(size_t value) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distance_indexing @@ -4965,7 +4965,7 @@ void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_max_prefix_sum(size_t val (*records)->at(record_offset + TRIVIAL_SNARL_MAX_PREFIX_SUM_OFFSET) = value; } void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_forward_loop(size_t value) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distance_indexing @@ -4976,7 +4976,7 @@ void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_forward_loop(size_t value (*records)->at(record_offset + TRIVIAL_SNARL_FORWARD_LOOP_OFFSET) = value; } void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_reverse_loop(size_t value) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distance_indexing @@ -4990,7 +4990,7 @@ void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_reverse_loop(size_t value } void SnarlDistanceIndex::TrivialSnarlRecordWriter::set_chain_component(size_t value) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } #ifdef debug_distance_indexing @@ -5089,7 +5089,7 @@ size_t SnarlDistanceIndex::ChainRecord::get_distance(size_t rank1, bool left_sid size_t prefix_sum1, size_t forward_loop1, size_t reverse_loop1, size_t component1, size_t end_component1, size_t rank2, bool left_side2, size_t node_length2, size_t prefix_sum2, size_t forward_loop2, size_t reverse_loop2, size_t component2, size_t end_component2) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } @@ -5173,7 +5173,7 @@ size_t SnarlDistanceIndex::ChainRecord::get_distance_taking_chain_loop(size_t ra size_t prefix_sum1, size_t forward_loop1, size_t reverse_loop1, size_t component1, size_t rank2, bool left_side2, size_t node_length2, size_t prefix_sum2, size_t forward_loop2, size_t reverse_loop2, size_t component2) const { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } //This is only called by get_distance, so the nodes should be ordered @@ -5252,28 +5252,28 @@ size_t SnarlDistanceIndex::ChainRecord::get_distance_taking_chain_loop(size_t ra } size_t SnarlDistanceIndex::ChainRecord::get_distance_left_start() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + CHAIN_DISTANCE_LEFT_START_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::ChainRecord::get_distance_right_start() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + CHAIN_DISTANCE_RIGHT_START_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::ChainRecord::get_distance_left_end() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + CHAIN_DISTANCE_LEFT_END_OFFSET); return stored_value == 0 ? std::numeric_limits::max() : stored_value - 1; } size_t SnarlDistanceIndex::ChainRecord::get_distance_right_end() { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } size_t stored_value = (*records)->at(record_offset + CHAIN_DISTANCE_RIGHT_END_OFFSET); @@ -5513,25 +5513,25 @@ void SnarlDistanceIndex::ChainRecordWriter::set_last_child_offset(size_t offset, } void SnarlDistanceIndex::ChainRecordWriter::set_distance_left_start(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + CHAIN_DISTANCE_LEFT_START_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); } void SnarlDistanceIndex::ChainRecordWriter::set_distance_right_start(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + CHAIN_DISTANCE_RIGHT_START_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); } void SnarlDistanceIndex::ChainRecordWriter::set_distance_left_end(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + CHAIN_DISTANCE_LEFT_END_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); } void SnarlDistanceIndex::ChainRecordWriter::set_distance_right_end(size_t distance) { - if (!has_distances(get_record_type())) { + if (!record_has_distances(get_record_type())) { throw runtime_error("error: trying to access get distance in a distanceless index"); } (*records)->at(record_offset + CHAIN_DISTANCE_RIGHT_END_OFFSET) = (distance == std::numeric_limits::max() ? 0 : distance + 1); From b4d1caba60f98f8fae234f143fecdeb53ba69b36 Mon Sep 17 00:00:00 2001 From: Jean Monlong Date: Thu, 18 Sep 2025 14:34:05 +0200 Subject: [PATCH 03/10] fix python binding for packed overlay constructor --- bdsg/include/bdsg/internal/binder_hook_compile.hpp | 4 +++- config.cfg | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bdsg/include/bdsg/internal/binder_hook_compile.hpp b/bdsg/include/bdsg/internal/binder_hook_compile.hpp index 27d48bb8..3817eafc 100644 --- a/bdsg/include/bdsg/internal/binder_hook_compile.hpp +++ b/bdsg/include/bdsg/internal/binder_hook_compile.hpp @@ -5,6 +5,7 @@ // Forced to be included in every binding compilation unit. #include +#include // We need all the handle graph types that ever get used in vectors. #include @@ -25,5 +26,6 @@ PYBIND11_MAKE_OPAQUE(std::vector); PYBIND11_MAKE_OPAQUE(std::vector); PYBIND11_MAKE_OPAQUE(std::vector); PYBIND11_MAKE_OPAQUE(std::vector); - +PYBIND11_MAKE_OPAQUE(std::unordered_set); +PYBIND11_MAKE_OPAQUE(std::unordered_set); #endif diff --git a/config.cfg b/config.cfg index fdcdb48d..095f6daf 100644 --- a/config.cfg +++ b/config.cfg @@ -21,7 +21,6 @@ -class std::basic_istream -class std::istream -class std::streambuf --class std::unordered_set -class sdsl::int_vector -include <__ios/fpos.h> -include <__iterator/move_iterator.h> From b8477ce021bdaf907108360f8000f6dbcf18bdd8 Mon Sep 17 00:00:00 2001 From: Jean Monlong Date: Thu, 18 Sep 2025 15:15:31 +0200 Subject: [PATCH 04/10] update bindings --- bdsg/cmake_bindings/bdsg.cpp | 12 +- bdsg/cmake_bindings/bdsg.sources | 6 +- .../bdsg/internal/base_packed_graph.cpp | 1 + .../cmake_bindings/bdsg/internal/hash_map.cpp | 15 + .../overlays/packed_path_position_overlay.cpp | 38 +- ...cpp => packed_path_position_overlay_1.cpp} | 56 +- .../bdsg/overlays/path_position_overlays.cpp | 15 + .../bdsg/overlays/path_subgraph_overlay.cpp | 15 + .../bdsg/overlays/reference_path_overlay.cpp | 390 +------- .../bdsg/overlays/vectorizable_overlays.cpp | 633 +++---------- .../bdsg/overlays/vectorizable_overlays_1.cpp | 832 ++++++++++++++++++ bdsg/cmake_bindings/bdsg/packed_graph.cpp | 26 + .../bdsg/snarl_distance_index.cpp | 18 +- .../handlegraph/mutable_path_metadata.cpp | 28 + .../mutable_path_mutable_handle_graph.cpp | 28 + .../handlegraph/path_metadata.cpp | 28 + .../path_position_handle_graph.cpp | 15 + bdsg/cmake_bindings/std/basic_string.cpp | 37 + bdsg/cmake_bindings/std/stl_function.cpp | 51 ++ bdsg/cmake_bindings/std/unordered_set.cpp | 110 +++ 20 files changed, 1433 insertions(+), 921 deletions(-) rename bdsg/cmake_bindings/bdsg/overlays/{packed_reference_path_overlay.cpp => packed_path_position_overlay_1.cpp} (94%) create mode 100644 bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp create mode 100644 bdsg/cmake_bindings/std/basic_string.cpp create mode 100644 bdsg/cmake_bindings/std/stl_function.cpp create mode 100644 bdsg/cmake_bindings/std/unordered_set.cpp diff --git a/bdsg/cmake_bindings/bdsg.cpp b/bdsg/cmake_bindings/bdsg.cpp index 22943a41..860be4df 100644 --- a/bdsg/cmake_bindings/bdsg.cpp +++ b/bdsg/cmake_bindings/bdsg.cpp @@ -9,8 +9,11 @@ using ModuleGetter = std::function< pybind11::module & (std::string const &) >; +void bind_std_basic_string(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_stl_function(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_types(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_handle_graph(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_unordered_set(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_path_metadata(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_path_handle_graph(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_bdsg_internal_binder_hook_bind(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -29,11 +32,12 @@ void bind_bdsg_internal_eades_algorithm(std::function< pybind11::module &(std::s void bind_bdsg_internal_base_packed_graph(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_path_position_handle_graph(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_packed_path_position_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M); -void bind_bdsg_overlays_packed_reference_path_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_bdsg_overlays_packed_path_position_overlay_1(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_path_position_overlays(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_path_subgraph_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_reference_path_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_overlays_vectorizable_overlays(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_bdsg_overlays_vectorizable_overlays_1(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_handlegraph_trivially_serializable(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_packed_graph(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -70,8 +74,11 @@ PYBIND11_MODULE(bdsg, root_module) { //pybind11::class_>(M(""), "_encapsulated_data_"); + bind_std_basic_string(M); + bind_std_stl_function(M); bind_handlegraph_types(M); bind_handlegraph_handle_graph(M); + bind_std_unordered_set(M); bind_handlegraph_path_metadata(M); bind_handlegraph_path_handle_graph(M); bind_std_bdsg_internal_binder_hook_bind(M); @@ -90,11 +97,12 @@ PYBIND11_MODULE(bdsg, root_module) { bind_bdsg_internal_base_packed_graph(M); bind_handlegraph_path_position_handle_graph(M); bind_bdsg_overlays_packed_path_position_overlay(M); - bind_bdsg_overlays_packed_reference_path_overlay(M); + bind_bdsg_overlays_packed_path_position_overlay_1(M); bind_bdsg_overlays_path_position_overlays(M); bind_bdsg_overlays_path_subgraph_overlay(M); bind_bdsg_overlays_reference_path_overlay(M); bind_bdsg_overlays_vectorizable_overlays(M); + bind_bdsg_overlays_vectorizable_overlays_1(M); bind_handlegraph_trivially_serializable(M); bind_bdsg_packed_graph(M); bind_bdsg_snarl_distance_index(M); diff --git a/bdsg/cmake_bindings/bdsg.sources b/bdsg/cmake_bindings/bdsg.sources index 58189f3b..0f3bce37 100644 --- a/bdsg/cmake_bindings/bdsg.sources +++ b/bdsg/cmake_bindings/bdsg.sources @@ -1,6 +1,9 @@ bdsg.cpp +std/basic_string.cpp +std/stl_function.cpp handlegraph/types.cpp handlegraph/handle_graph.cpp +std/unordered_set.cpp handlegraph/path_metadata.cpp handlegraph/path_handle_graph.cpp std/bdsg/internal/binder_hook_bind.cpp @@ -19,11 +22,12 @@ bdsg/internal/eades_algorithm.cpp bdsg/internal/base_packed_graph.cpp handlegraph/path_position_handle_graph.cpp bdsg/overlays/packed_path_position_overlay.cpp -bdsg/overlays/packed_reference_path_overlay.cpp +bdsg/overlays/packed_path_position_overlay_1.cpp bdsg/overlays/path_position_overlays.cpp bdsg/overlays/path_subgraph_overlay.cpp bdsg/overlays/reference_path_overlay.cpp bdsg/overlays/vectorizable_overlays.cpp +bdsg/overlays/vectorizable_overlays_1.cpp handlegraph/trivially_serializable.cpp bdsg/packed_graph.cpp bdsg/snarl_distance_index.cpp diff --git a/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp b/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp index 6a4dddde..6092d7ef 100644 --- a/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/base_packed_graph.cpp @@ -115,6 +115,7 @@ void bind_bdsg_internal_base_packed_graph(std::function< pybind11::module &(std: cl.def("get_subrange", (struct std::pair (bdsg::BasePackedGraph::*)(const struct handlegraph::path_handle_t &) const) &bdsg::BasePackedGraph<>::get_subrange, "C++: bdsg::BasePackedGraph<>::get_subrange(const struct handlegraph::path_handle_t &) const --> struct std::pair", pybind11::arg("handle")); cl.def("create_path", [](bdsg::BasePackedGraph &o, const enum handlegraph::PathSense & a0, const std::string & a1, const std::string & a2, const unsigned long & a3, const unsigned long & a4, const struct std::pair & a5) -> handlegraph::path_handle_t { return o.create_path(a0, a1, a2, a3, a4, a5); }, "", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange")); cl.def("create_path", (struct handlegraph::path_handle_t (bdsg::BasePackedGraph::*)(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool)) &bdsg::BasePackedGraph<>::create_path, "C++: bdsg::BasePackedGraph<>::create_path(const enum handlegraph::PathSense &, const std::string &, const std::string &, const unsigned long &, const unsigned long &, const struct std::pair &, bool) --> struct handlegraph::path_handle_t", pybind11::arg("sense"), pybind11::arg("sample"), pybind11::arg("locus"), pybind11::arg("haplotype"), pybind11::arg("phase_block"), pybind11::arg("subrange"), pybind11::arg("is_circular")); + cl.def("for_each_path_matching", (bool (bdsg::BasePackedGraph::*)(const class std::unordered_set *, const class std::unordered_set *, const class std::unordered_set *, const class std::function &) const) &bdsg::BasePackedGraph<>::for_each_path_matching, "C++: bdsg::BasePackedGraph<>::for_each_path_matching(const class std::unordered_set *, const class std::unordered_set *, const class std::unordered_set *, const class std::function &) const --> bool", pybind11::arg("senses"), pybind11::arg("samples"), pybind11::arg("loci"), pybind11::arg("iteratee")); cl.def("for_each_step_of_sense", (bool (bdsg::BasePackedGraph::*)(const struct handlegraph::handle_t &, const enum handlegraph::PathSense &, const class std::function &) const) &bdsg::BasePackedGraph<>::for_each_step_of_sense, "C++: bdsg::BasePackedGraph<>::for_each_step_of_sense(const struct handlegraph::handle_t &, const enum handlegraph::PathSense &, const class std::function &) const --> bool", pybind11::arg("visited"), pybind11::arg("sense"), pybind11::arg("iteratee")); cl.def("get_magic_number", (unsigned int (bdsg::BasePackedGraph::*)() const) &bdsg::BasePackedGraph<>::get_magic_number, "C++: bdsg::BasePackedGraph<>::get_magic_number() const --> unsigned int"); cl.def("deserialize", (void (bdsg::BasePackedGraph::*)(const std::string &)) &bdsg::BasePackedGraph<>::deserialize, "C++: bdsg::BasePackedGraph<>::deserialize(const std::string &) --> void", pybind11::arg("filename")); diff --git a/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp b/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp index 5895a74d..bb6b5ffd 100644 --- a/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp +++ b/bdsg/cmake_bindings/bdsg/internal/hash_map.cpp @@ -18,6 +18,8 @@ #include // __str__ #include #include +#include +#include #include #include @@ -967,6 +969,19 @@ struct PyCallBack_bdsg_HashGraph : public bdsg::HashGraph { } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp index f1250fb5..00d2c785 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay.cpp @@ -425,6 +425,19 @@ struct PyCallBack_bdsg_PackedPositionOverlay : public bdsg::PackedPositionOverla } return PackedPositionOverlay::get_path_handle_of_step(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PackedPositionOverlay::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_path_handle_impl(const class std::function & a0) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); @@ -731,6 +744,10 @@ void bind_bdsg_overlays_packed_path_position_overlay(std::function< pybind11::mo { { // bdsg::PackedPositionOverlay file:bdsg/overlays/packed_path_position_overlay.hpp line:33 pybind11::class_, PyCallBack_bdsg_PackedPositionOverlay, handlegraph::PathPositionHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "PackedPositionOverlay", ""); + cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0){ return new bdsg::PackedPositionOverlay(a0); }, [](const class handlegraph::PathHandleGraph * a0){ return new PyCallBack_bdsg_PackedPositionOverlay(a0); } ), "doc"); + cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0, const class std::unordered_set & a1){ return new bdsg::PackedPositionOverlay(a0, a1); }, [](const class handlegraph::PathHandleGraph * a0, const class std::unordered_set & a1){ return new PyCallBack_bdsg_PackedPositionOverlay(a0, a1); } ), "doc"); + cl.def( pybind11::init &, unsigned long>(), pybind11::arg("graph"), pybind11::arg("extra_path_names"), pybind11::arg("steps_per_index") ); + cl.def( pybind11::init( [](PyCallBack_bdsg_PackedPositionOverlay const &o){ return new PyCallBack_bdsg_PackedPositionOverlay(o); } ) ); cl.def( pybind11::init( [](bdsg::PackedPositionOverlay const &o){ return new bdsg::PackedPositionOverlay(o); } ) ); cl.def("assign", (class bdsg::PackedPositionOverlay & (bdsg::PackedPositionOverlay::*)(const class bdsg::PackedPositionOverlay &)) &bdsg::PackedPositionOverlay::operator=, "C++: bdsg::PackedPositionOverlay::operator=(const class bdsg::PackedPositionOverlay &) --> class bdsg::PackedPositionOverlay &", pybind11::return_value_policy::automatic, pybind11::arg("other")); @@ -770,25 +787,4 @@ void bind_bdsg_overlays_packed_path_position_overlay(std::function< pybind11::mo cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::PackedPositionOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::PackedPositionOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::PackedPositionOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); cl.def("get_underlying_handle", (struct handlegraph::handle_t (bdsg::PackedPositionOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::PackedPositionOverlay::get_underlying_handle, "Returns the handle in the underlying graph that corresponds to a handle in the\n overlay\n\nC++: bdsg::PackedPositionOverlay::get_underlying_handle(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); } - { // bdsg::BBHashHelper file:bdsg/overlays/packed_path_position_overlay.hpp line:315 - pybind11::class_> cl(M("bdsg"), "BBHashHelper", ""); - cl.def( pybind11::init(), pybind11::arg("graph") ); - - cl.def( pybind11::init( [](bdsg::BBHashHelper const &o){ return new bdsg::BBHashHelper(o); } ) ); - cl.def("begin", (struct bdsg::BBHashHelper::iterator (bdsg::BBHashHelper::*)() const) &bdsg::BBHashHelper::begin, "C++ style range begin over steps\n\nC++: bdsg::BBHashHelper::begin() const --> struct bdsg::BBHashHelper::iterator"); - cl.def("end", (struct bdsg::BBHashHelper::iterator (bdsg::BBHashHelper::*)() const) &bdsg::BBHashHelper::end, "C++ style range end over steps\n\nC++: bdsg::BBHashHelper::end() const --> struct bdsg::BBHashHelper::iterator"); - cl.def("assign", (struct bdsg::BBHashHelper & (bdsg::BBHashHelper::*)(const struct bdsg::BBHashHelper &)) &bdsg::BBHashHelper::operator=, "C++: bdsg::BBHashHelper::operator=(const struct bdsg::BBHashHelper &) --> struct bdsg::BBHashHelper &", pybind11::return_value_policy::automatic, pybind11::arg("")); - - { // bdsg::BBHashHelper::iterator file:bdsg/overlays/packed_path_position_overlay.hpp line:325 - auto & enclosing_class = cl; - pybind11::class_> cl(enclosing_class, "iterator", ""); - cl.def( pybind11::init( [](bdsg::BBHashHelper::iterator const &o){ return new bdsg::BBHashHelper::iterator(o); } ) ); - cl.def("assign", (struct bdsg::BBHashHelper::iterator & (bdsg::BBHashHelper::iterator::*)(const struct bdsg::BBHashHelper::iterator &)) &bdsg::BBHashHelper::iterator::operator=, "C++: bdsg::BBHashHelper::iterator::operator=(const struct bdsg::BBHashHelper::iterator &) --> struct bdsg::BBHashHelper::iterator &", pybind11::return_value_policy::automatic, pybind11::arg("other")); - cl.def("pre_increment", (struct bdsg::BBHashHelper::iterator & (bdsg::BBHashHelper::iterator::*)()) &bdsg::BBHashHelper::iterator::operator++, "C++: bdsg::BBHashHelper::iterator::operator++() --> struct bdsg::BBHashHelper::iterator &", pybind11::return_value_policy::automatic); - cl.def("dereference", (struct handlegraph::step_handle_t (bdsg::BBHashHelper::iterator::*)() const) &bdsg::BBHashHelper::iterator::operator*, "C++: bdsg::BBHashHelper::iterator::operator*() const --> struct handlegraph::step_handle_t"); - cl.def("__eq__", (bool (bdsg::BBHashHelper::iterator::*)(const struct bdsg::BBHashHelper::iterator &) const) &bdsg::BBHashHelper::iterator::operator==, "C++: bdsg::BBHashHelper::iterator::operator==(const struct bdsg::BBHashHelper::iterator &) const --> bool", pybind11::arg("other")); - cl.def("__ne__", (bool (bdsg::BBHashHelper::iterator::*)(const struct bdsg::BBHashHelper::iterator &) const) &bdsg::BBHashHelper::iterator::operator!=, "C++: bdsg::BBHashHelper::iterator::operator!=(const struct bdsg::BBHashHelper::iterator &) const --> bool", pybind11::arg("other")); - } - - } } diff --git a/bdsg/cmake_bindings/bdsg/overlays/packed_reference_path_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp similarity index 94% rename from bdsg/cmake_bindings/bdsg/overlays/packed_reference_path_overlay.cpp rename to bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp index 2a60a1f7..4e32f0b8 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/packed_reference_path_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/packed_path_position_overlay_1.cpp @@ -467,6 +467,19 @@ struct PyCallBack_bdsg_PackedReferencePathOverlay : public bdsg::PackedReference } return PackedPositionOverlay::get_previous_step(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PackedPositionOverlay::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_path_handle_impl(const class std::function & a0) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); @@ -1638,6 +1651,19 @@ struct PyCallBack_bdsg_PositionOverlay : public bdsg::PositionOverlay { } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); @@ -1653,10 +1679,35 @@ struct PyCallBack_bdsg_PositionOverlay : public bdsg::PositionOverlay { } }; -void bind_bdsg_overlays_packed_reference_path_overlay(std::function< pybind11::module &(std::string const &namespace_) > &M) +void bind_bdsg_overlays_packed_path_position_overlay_1(std::function< pybind11::module &(std::string const &namespace_) > &M) { + { // bdsg::BBHashHelper file:bdsg/overlays/packed_path_position_overlay.hpp line:315 + pybind11::class_> cl(M("bdsg"), "BBHashHelper", ""); + cl.def( pybind11::init(), pybind11::arg("graph") ); + + cl.def( pybind11::init( [](bdsg::BBHashHelper const &o){ return new bdsg::BBHashHelper(o); } ) ); + cl.def("begin", (struct bdsg::BBHashHelper::iterator (bdsg::BBHashHelper::*)() const) &bdsg::BBHashHelper::begin, "C++ style range begin over steps\n\nC++: bdsg::BBHashHelper::begin() const --> struct bdsg::BBHashHelper::iterator"); + cl.def("end", (struct bdsg::BBHashHelper::iterator (bdsg::BBHashHelper::*)() const) &bdsg::BBHashHelper::end, "C++ style range end over steps\n\nC++: bdsg::BBHashHelper::end() const --> struct bdsg::BBHashHelper::iterator"); + cl.def("assign", (struct bdsg::BBHashHelper & (bdsg::BBHashHelper::*)(const struct bdsg::BBHashHelper &)) &bdsg::BBHashHelper::operator=, "C++: bdsg::BBHashHelper::operator=(const struct bdsg::BBHashHelper &) --> struct bdsg::BBHashHelper &", pybind11::return_value_policy::automatic, pybind11::arg("")); + + { // bdsg::BBHashHelper::iterator file:bdsg/overlays/packed_path_position_overlay.hpp line:325 + auto & enclosing_class = cl; + pybind11::class_> cl(enclosing_class, "iterator", ""); + cl.def( pybind11::init( [](bdsg::BBHashHelper::iterator const &o){ return new bdsg::BBHashHelper::iterator(o); } ) ); + cl.def("assign", (struct bdsg::BBHashHelper::iterator & (bdsg::BBHashHelper::iterator::*)(const struct bdsg::BBHashHelper::iterator &)) &bdsg::BBHashHelper::iterator::operator=, "C++: bdsg::BBHashHelper::iterator::operator=(const struct bdsg::BBHashHelper::iterator &) --> struct bdsg::BBHashHelper::iterator &", pybind11::return_value_policy::automatic, pybind11::arg("other")); + cl.def("pre_increment", (struct bdsg::BBHashHelper::iterator & (bdsg::BBHashHelper::iterator::*)()) &bdsg::BBHashHelper::iterator::operator++, "C++: bdsg::BBHashHelper::iterator::operator++() --> struct bdsg::BBHashHelper::iterator &", pybind11::return_value_policy::automatic); + cl.def("dereference", (struct handlegraph::step_handle_t (bdsg::BBHashHelper::iterator::*)() const) &bdsg::BBHashHelper::iterator::operator*, "C++: bdsg::BBHashHelper::iterator::operator*() const --> struct handlegraph::step_handle_t"); + cl.def("__eq__", (bool (bdsg::BBHashHelper::iterator::*)(const struct bdsg::BBHashHelper::iterator &) const) &bdsg::BBHashHelper::iterator::operator==, "C++: bdsg::BBHashHelper::iterator::operator==(const struct bdsg::BBHashHelper::iterator &) const --> bool", pybind11::arg("other")); + cl.def("__ne__", (bool (bdsg::BBHashHelper::iterator::*)(const struct bdsg::BBHashHelper::iterator &) const) &bdsg::BBHashHelper::iterator::operator!=, "C++: bdsg::BBHashHelper::iterator::operator!=(const struct bdsg::BBHashHelper::iterator &) const --> bool", pybind11::arg("other")); + } + + } { // bdsg::PackedReferencePathOverlay file:bdsg/overlays/packed_reference_path_overlay.hpp line:33 pybind11::class_, PyCallBack_bdsg_PackedReferencePathOverlay, bdsg::PackedPositionOverlay> cl(M("bdsg"), "PackedReferencePathOverlay", ""); + cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0){ return new bdsg::PackedReferencePathOverlay(a0); }, [](const class handlegraph::PathHandleGraph * a0){ return new PyCallBack_bdsg_PackedReferencePathOverlay(a0); } ), "doc"); + cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0, const class std::unordered_set & a1){ return new bdsg::PackedReferencePathOverlay(a0, a1); }, [](const class handlegraph::PathHandleGraph * a0, const class std::unordered_set & a1){ return new PyCallBack_bdsg_PackedReferencePathOverlay(a0, a1); } ), "doc"); + cl.def( pybind11::init &, unsigned long>(), pybind11::arg("graph"), pybind11::arg("extra_path_names"), pybind11::arg("steps_per_index") ); + cl.def( pybind11::init( [](PyCallBack_bdsg_PackedReferencePathOverlay const &o){ return new PyCallBack_bdsg_PackedReferencePathOverlay(o); } ) ); cl.def( pybind11::init( [](bdsg::PackedReferencePathOverlay const &o){ return new bdsg::PackedReferencePathOverlay(o); } ) ); cl.def("get_path_handle_of_step", (struct handlegraph::path_handle_t (bdsg::PackedReferencePathOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PackedReferencePathOverlay::get_path_handle_of_step, "overload this to use the cache \n\nC++: bdsg::PackedReferencePathOverlay::get_path_handle_of_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::path_handle_t", pybind11::arg("step_handle")); @@ -1689,6 +1740,9 @@ void bind_bdsg_overlays_packed_reference_path_overlay(std::function< pybind11::m } { // bdsg::PositionOverlay file:bdsg/overlays/path_position_overlays.hpp line:30 pybind11::class_, PyCallBack_bdsg_PositionOverlay, handlegraph::PathPositionHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "PositionOverlay", ""); + cl.def( pybind11::init( [](class handlegraph::PathHandleGraph * a0){ return new bdsg::PositionOverlay(a0); }, [](class handlegraph::PathHandleGraph * a0){ return new PyCallBack_bdsg_PositionOverlay(a0); } ), "doc"); + cl.def( pybind11::init &>(), pybind11::arg("graph"), pybind11::arg("extra_path_names") ); + cl.def( pybind11::init( [](){ return new bdsg::PositionOverlay(); }, [](){ return new PyCallBack_bdsg_PositionOverlay(); } ) ); cl.def( pybind11::init( [](PyCallBack_bdsg_PositionOverlay const &o){ return new PyCallBack_bdsg_PositionOverlay(o); } ) ); cl.def( pybind11::init( [](bdsg::PositionOverlay const &o){ return new bdsg::PositionOverlay(o); } ) ); diff --git a/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp b/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp index 5ed7906e..a8be3042 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/path_position_overlays.cpp @@ -15,6 +15,8 @@ #include #include // __str__ #include +#include +#include #include #include @@ -938,6 +940,19 @@ struct PyCallBack_bdsg_MutablePositionOverlay : public bdsg::MutablePositionOver } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp index 1a0108b9..a48c9f6e 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/path_subgraph_overlay.cpp @@ -9,6 +9,8 @@ #include #include // __str__ #include +#include +#include #include #include @@ -619,6 +621,19 @@ struct PyCallBack_bdsg_PathSubgraphOverlay : public bdsg::PathSubgraphOverlay { } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp b/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp index eb1c7e04..f917ef0c 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/reference_path_overlay.cpp @@ -1,7 +1,5 @@ #include -#include #include -#include #include #include #include @@ -674,353 +672,22 @@ struct PyCallBack_bdsg_ReferencePathOverlay : public bdsg::ReferencePathOverlay } return PathMetadata::get_subrange(a0); } - bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); - if (overload) { - auto o = overload.operator()(a0, a1, a2); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); - } -}; - -// bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 -struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { - using bdsg::VectorizableOverlay::VectorizableOverlay; - - bool has_node(long long a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::has_node(a0); - } - struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_handle(a0, a1); - } - long long get_id(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_id(a0); - } - bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_is_reverse(a0); - } - struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::flip(a0); - } - unsigned long get_length(const struct handlegraph::handle_t & a0) const override { + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_length(a0); - } - std::string get_sequence(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_sequence(a0); - } - unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_degree(a0, a1); - } - bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); - if (overload) { - auto o = overload.operator()(a0, a1); + auto o = overload.operator()(a0, a1, a2, a3); if (pybind11::detail::cast_is_temporary_value_reference::value) { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } return pybind11::detail::cast_safe(std::move(o)); } - return VectorizableOverlay::has_edge(a0, a1); - } - char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_base(a0, a1); - } - std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); - if (overload) { - auto o = overload.operator()(a0, a1, a2); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_subsequence(a0, a1, a2); - } - unsigned long get_node_count() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_node_count(); + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); } - long long min_node_id() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::min_node_id(); - } - long long max_node_id() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::max_node_id(); - } - unsigned long node_vector_offset(const long long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::node_vector_offset(a0); - } - long long node_at_vector_offset(const unsigned long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::node_at_vector_offset(a0); - } - unsigned long edge_index(const struct std::pair & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::edge_index(a0); - } - unsigned long id_to_rank(const long long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::id_to_rank(a0); - } - long long rank_to_id(const unsigned long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::rank_to_id(a0); - } - struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::get_underlying_handle(a0); - } - void index_nodes_and_edges() override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return VectorizableOverlay::index_nodes_and_edges(); - } - unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return RankedHandleGraph::handle_to_rank(a0); - } - struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return RankedHandleGraph::rank_to_handle(a0); - } - unsigned long get_edge_count() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return HandleGraph::get_edge_count(); - } - unsigned long get_total_length() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return HandleGraph::get_total_length(); - } - bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { + bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1029,20 +696,7 @@ struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { } return pybind11::detail::cast_safe(std::move(o)); } - pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::follow_edges_impl\""); - } - bool for_each_handle_impl(const class std::function & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::for_each_handle_impl\""); + return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); } }; @@ -1050,6 +704,9 @@ void bind_bdsg_overlays_reference_path_overlay(std::function< pybind11::module & { { // bdsg::ReferencePathOverlay file:bdsg/overlays/reference_path_overlay.hpp line:41 pybind11::class_, PyCallBack_bdsg_ReferencePathOverlay, handlegraph::PathPositionHandleGraph> cl(M("bdsg"), "ReferencePathOverlay", ""); + cl.def( pybind11::init( [](const class handlegraph::PathHandleGraph * a0){ return new bdsg::ReferencePathOverlay(a0); }, [](const class handlegraph::PathHandleGraph * a0){ return new PyCallBack_bdsg_ReferencePathOverlay(a0); } ), "doc"); + cl.def( pybind11::init &>(), pybind11::arg("graph"), pybind11::arg("extra_path_names") ); + cl.def( pybind11::init( [](){ return new bdsg::ReferencePathOverlay(); }, [](){ return new PyCallBack_bdsg_ReferencePathOverlay(); } ) ); cl.def( pybind11::init( [](PyCallBack_bdsg_ReferencePathOverlay const &o){ return new PyCallBack_bdsg_ReferencePathOverlay(o); } ) ); cl.def( pybind11::init( [](bdsg::ReferencePathOverlay const &o){ return new bdsg::ReferencePathOverlay(o); } ) ); @@ -1091,31 +748,4 @@ void bind_bdsg_overlays_reference_path_overlay(std::function< pybind11::module & cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::ReferencePathOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::ReferencePathOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::ReferencePathOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); cl.def("assign", (class bdsg::ReferencePathOverlay & (bdsg::ReferencePathOverlay::*)(const class bdsg::ReferencePathOverlay &)) &bdsg::ReferencePathOverlay::operator=, "C++: bdsg::ReferencePathOverlay::operator=(const class bdsg::ReferencePathOverlay &) --> class bdsg::ReferencePathOverlay &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 - pybind11::class_, PyCallBack_bdsg_VectorizableOverlay, handlegraph::VectorizableHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "VectorizableOverlay", ""); - cl.def( pybind11::init(), pybind11::arg("graph") ); - - cl.def( pybind11::init( [](){ return new bdsg::VectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_VectorizableOverlay(); } ) ); - cl.def("has_node", (bool (bdsg::VectorizableOverlay::*)(long long) const) &bdsg::VectorizableOverlay::has_node, "Method to check if a node exists by ID\n\nC++: bdsg::VectorizableOverlay::has_node(long long) const --> bool", pybind11::arg("node_id")); - cl.def("get_handle", [](bdsg::VectorizableOverlay const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); - cl.def("get_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const long long &, bool) const) &bdsg::VectorizableOverlay::get_handle, "Look up the handle for the node with the given ID in the given orientation\n\nC++: bdsg::VectorizableOverlay::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); - cl.def("get_id", (long long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_id, "Get the ID from a handle\n\nC++: bdsg::VectorizableOverlay::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); - cl.def("get_is_reverse", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_is_reverse, "Get the orientation of a handle\n\nC++: bdsg::VectorizableOverlay::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); - cl.def("flip", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::flip, "Invert the orientation of a handle (potentially without getting its ID)\n\nC++: bdsg::VectorizableOverlay::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - cl.def("get_length", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_length, "Get the length of a node\n\nC++: bdsg::VectorizableOverlay::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); - cl.def("get_sequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_sequence, "Get the sequence of a node, presented in the handle's local forward orientation.\n\nC++: bdsg::VectorizableOverlay::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); - cl.def("get_degree", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::VectorizableOverlay::get_degree, "Get the number of edges on the right (go_left = false) or left (go_left\n = true) side of the given handle. The default implementation is O(n) in\n the number of edges returned, but graph implementations that track this\n information more efficiently can override this method.\n\nC++: bdsg::VectorizableOverlay::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); - cl.def("has_edge", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::has_edge, "Returns true if there is an edge that allows traversal from the left\n handle to the right handle. By default O(n) in the number of edges\n on left, but can be overridden with more efficient implementations.\n\nC++: bdsg::VectorizableOverlay::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); - cl.def("get_base", (char (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::VectorizableOverlay::get_base, "Returns one base of a handle's sequence, in the orientation of the\n handle.\n\nC++: bdsg::VectorizableOverlay::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); - cl.def("get_subsequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::VectorizableOverlay::get_subsequence, "Returns a substring of a handle's sequence, in the orientation of the\n handle. If the indicated substring would extend beyond the end of the\n handle's sequence, the return value is truncated to the sequence's end.\n\nC++: bdsg::VectorizableOverlay::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); - cl.def("get_node_count", (unsigned long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::get_node_count, "Return the number of nodes in the graph\n\nC++: bdsg::VectorizableOverlay::get_node_count() const --> unsigned long"); - cl.def("min_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::min_node_id, "Return the smallest ID in the graph, or some smaller number if the\n smallest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::min_node_id() const --> long long"); - cl.def("max_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::max_node_id, "Return the largest ID in the graph, or some larger number if the\n largest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::max_node_id() const --> long long"); - cl.def("node_vector_offset", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::node_vector_offset, "Return the start position of the node in a (possibly implict) sorted array\n constructed from the concatenation of the node sequences\n\nC++: bdsg::VectorizableOverlay::node_vector_offset(const long long &) const --> unsigned long", pybind11::arg("node_id")); - cl.def("node_at_vector_offset", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::node_at_vector_offset, "Return the node overlapping the given offset in the implicit node vector\n\nC++: bdsg::VectorizableOverlay::node_at_vector_offset(const unsigned long &) const --> long long", pybind11::arg("offset")); - cl.def("edge_index", (unsigned long (bdsg::VectorizableOverlay::*)(const struct std::pair &) const) &bdsg::VectorizableOverlay::edge_index, "Return a unique index among edges in the graph\n\nC++: bdsg::VectorizableOverlay::edge_index(const struct std::pair &) const --> unsigned long", pybind11::arg("edge")); - cl.def("id_to_rank", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::id_to_rank, "Return the rank of a node (ranks start at 1)\n\nC++: bdsg::VectorizableOverlay::id_to_rank(const long long &) const --> unsigned long", pybind11::arg("node_id")); - cl.def("rank_to_id", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::rank_to_id, "Return the node with a given rank\n\nC++: bdsg::VectorizableOverlay::rank_to_id(const unsigned long &) const --> long long", pybind11::arg("rank")); - cl.def("get_underlying_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_underlying_handle, "Returns the handle in the underlying graph that corresponds to a handle in the\n overlay\n\nC++: bdsg::VectorizableOverlay::get_underlying_handle(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); - } } diff --git a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp index fb4fec44..9de6f66e 100644 --- a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp +++ b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays.cpp @@ -3,12 +3,13 @@ #include #include #include -#include #include #include #include #include // __str__ #include +#include +#include #include #include @@ -29,247 +30,13 @@ PYBIND11_MAKE_OPAQUE(std::shared_ptr) #endif -// bdsg::PathVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:197 -struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOverlay { - using bdsg::PathVectorizableOverlay::PathVectorizableOverlay; +// bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 +struct PyCallBack_bdsg_VectorizableOverlay : public bdsg::VectorizableOverlay { + using bdsg::VectorizableOverlay::VectorizableOverlay; - unsigned long get_path_count() const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); - if (overload) { - auto o = overload.operator()(); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_count(); - } - bool has_path(const std::string & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::has_path(a0); - } - struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_handle(a0); - } - std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_name(a0); - } - bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_is_circular(a0); - } - unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_step_count(a0); - } - struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_handle_of_step(a0); - } - struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_path_handle_of_step(a0); - } - struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_begin(a0); - } - struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_end(a0); - } - struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_back(a0); - } - struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::path_front_end(a0); - } - bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::has_next_step(a0); - } - bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::has_previous_step(a0); - } - struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_next_step(a0); - } - struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::get_previous_step(a0); - } - bool for_each_path_handle_impl(const class std::function & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::for_each_path_handle_impl(a0); - } - bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathVectorizableOverlay::for_each_step_on_handle_impl(a0, a1); - } bool has_node(long long a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -282,7 +49,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -295,7 +62,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long get_id(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -308,7 +75,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -321,7 +88,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -334,7 +101,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_length(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -347,7 +114,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_sequence(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -360,7 +127,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -373,7 +140,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -386,7 +153,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -399,7 +166,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -412,7 +179,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_node_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -425,7 +192,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long min_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -438,7 +205,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long max_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -451,7 +218,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long node_vector_offset(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -464,7 +231,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long node_at_vector_offset(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -477,7 +244,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long edge_index(const struct std::pair & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -490,7 +257,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long id_to_rank(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -503,7 +270,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } long long rank_to_id(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -516,7 +283,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -529,7 +296,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } void index_nodes_and_edges() override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -542,7 +309,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -555,7 +322,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -568,7 +335,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_edge_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -581,7 +348,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } unsigned long get_total_length() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -594,7 +361,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -607,7 +374,7 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } bool for_each_handle_impl(const class std::function & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -618,185 +385,15 @@ struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOv } pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::for_each_handle_impl\""); } - unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathHandleGraph::get_step_count(a0); - } - class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference>::value) { - static pybind11::detail::override_caster_t> caster; - return pybind11::detail::cast_ref>(std::move(o), caster); - } - return pybind11::detail::cast_safe>(std::move(o)); - } - return PathHandleGraph::steps_of_handle(a0, a1); - } - bool is_empty(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathHandleGraph::is_empty(a0); - } - enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_sense(a0); - } - std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_sample_name(a0); - } - std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_locus_name(a0); - } - unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_haplotype(a0); - } - unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::get_phase_block(a0); - } - using _binder_ret_0 = struct std::pair; - _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { - static pybind11::detail::override_caster_t<_binder_ret_0> caster; - return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); - } - return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); - } - return PathMetadata::get_subrange(a0); - } - bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); - if (overload) { - auto o = overload.operator()(a0, a1, a2); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); - } }; -// bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 -struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositionVectorizableOverlay { - using bdsg::PathPositionVectorizableOverlay::PathPositionVectorizableOverlay; +// bdsg::PathVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:197 +struct PyCallBack_bdsg_PathVectorizableOverlay : public bdsg::PathVectorizableOverlay { + using bdsg::PathVectorizableOverlay::PathVectorizableOverlay; - unsigned long get_path_length(const struct handlegraph::path_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_length"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionVectorizableOverlay::get_path_length(a0); - } - unsigned long get_position_of_step(const struct handlegraph::step_handle_t & a0) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_position_of_step"); - if (overload) { - auto o = overload.operator()(a0); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionVectorizableOverlay::get_position_of_step(a0); - } - struct handlegraph::step_handle_t get_step_at_position(const struct handlegraph::path_handle_t & a0, const unsigned long & a1) const override { - pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_at_position"); - if (overload) { - auto o = overload.operator()(a0, a1); - if (pybind11::detail::cast_is_temporary_value_reference::value) { - static pybind11::detail::override_caster_t caster; - return pybind11::detail::cast_ref(std::move(o), caster); - } - return pybind11::detail::cast_safe(std::move(o)); - } - return PathPositionVectorizableOverlay::get_step_at_position(a0, a1); - } unsigned long get_path_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -809,7 +406,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool has_path(const std::string & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -822,7 +419,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -835,7 +432,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -848,7 +445,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -861,7 +458,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -874,7 +471,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -887,7 +484,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -900,7 +497,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -913,7 +510,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -926,7 +523,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -939,7 +536,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -952,7 +549,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -965,7 +562,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -978,7 +575,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -991,7 +588,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1004,7 +601,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool for_each_path_handle_impl(const class std::function & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1017,7 +614,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1030,7 +627,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool has_node(long long a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1043,7 +640,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1056,7 +653,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } long long get_id(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1069,7 +666,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1082,7 +679,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1095,7 +692,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_length(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1108,7 +705,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } std::string get_sequence(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1121,7 +718,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1134,7 +731,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1147,7 +744,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1160,7 +757,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1173,7 +770,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_node_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1186,7 +783,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } long long min_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1199,7 +796,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } long long max_node_id() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1212,7 +809,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long node_vector_offset(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1225,7 +822,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } long long node_at_vector_offset(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1238,7 +835,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long edge_index(const struct std::pair & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1251,7 +848,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long id_to_rank(const long long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1264,7 +861,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } long long rank_to_id(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1277,7 +874,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1290,7 +887,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } void index_nodes_and_edges() override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1303,7 +900,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1316,7 +913,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1329,7 +926,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_edge_count() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1342,7 +939,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_total_length() const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); if (overload) { auto o = overload.operator()(); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1355,7 +952,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); if (overload) { auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1368,7 +965,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool for_each_handle_impl(const class std::function & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1381,7 +978,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1394,7 +991,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); if (overload) { auto o = overload.operator()(a0, a1); if (pybind11::detail::cast_is_temporary_value_reference>::value) { @@ -1407,7 +1004,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } bool is_empty(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1420,7 +1017,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1433,7 +1030,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1446,7 +1043,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1459,7 +1056,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1472,7 +1069,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference::value) { @@ -1486,7 +1083,7 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi using _binder_ret_0 = struct std::pair; _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); if (overload) { auto o = overload.operator()(a0); if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { @@ -1497,36 +1094,63 @@ struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositi } return PathMetadata::get_subrange(a0); } - bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); if (overload) { - auto o = overload.operator()(a0, a1, a2); + auto o = overload.operator()(a0, a1, a2, a3); if (pybind11::detail::cast_is_temporary_value_reference::value) { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } return pybind11::detail::cast_safe(std::move(o)); } - return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); } - bool for_each_step_position_on_handle(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; - pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_position_on_handle"); + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); if (overload) { - auto o = overload.operator()(a0, a1); + auto o = overload.operator()(a0, a1, a2); if (pybind11::detail::cast_is_temporary_value_reference::value) { static pybind11::detail::override_caster_t caster; return pybind11::detail::cast_ref(std::move(o), caster); } return pybind11::detail::cast_safe(std::move(o)); } - return PathPositionHandleGraph::for_each_step_position_on_handle(a0, a1); + return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); } }; void bind_bdsg_overlays_vectorizable_overlays(std::function< pybind11::module &(std::string const &namespace_) > &M) { + { // bdsg::VectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:34 + pybind11::class_, PyCallBack_bdsg_VectorizableOverlay, handlegraph::VectorizableHandleGraph, handlegraph::ExpandingOverlayGraph> cl(M("bdsg"), "VectorizableOverlay", ""); + cl.def( pybind11::init(), pybind11::arg("graph") ); + + cl.def( pybind11::init( [](){ return new bdsg::VectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_VectorizableOverlay(); } ) ); + cl.def("has_node", (bool (bdsg::VectorizableOverlay::*)(long long) const) &bdsg::VectorizableOverlay::has_node, "Method to check if a node exists by ID\n\nC++: bdsg::VectorizableOverlay::has_node(long long) const --> bool", pybind11::arg("node_id")); + cl.def("get_handle", [](bdsg::VectorizableOverlay const &o, const long long & a0) -> handlegraph::handle_t { return o.get_handle(a0); }, "", pybind11::arg("node_id")); + cl.def("get_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const long long &, bool) const) &bdsg::VectorizableOverlay::get_handle, "Look up the handle for the node with the given ID in the given orientation\n\nC++: bdsg::VectorizableOverlay::get_handle(const long long &, bool) const --> struct handlegraph::handle_t", pybind11::arg("node_id"), pybind11::arg("is_reverse")); + cl.def("get_id", (long long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_id, "Get the ID from a handle\n\nC++: bdsg::VectorizableOverlay::get_id(const struct handlegraph::handle_t &) const --> long long", pybind11::arg("handle")); + cl.def("get_is_reverse", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_is_reverse, "Get the orientation of a handle\n\nC++: bdsg::VectorizableOverlay::get_is_reverse(const struct handlegraph::handle_t &) const --> bool", pybind11::arg("handle")); + cl.def("flip", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::flip, "Invert the orientation of a handle (potentially without getting its ID)\n\nC++: bdsg::VectorizableOverlay::flip(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + cl.def("get_length", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_length, "Get the length of a node\n\nC++: bdsg::VectorizableOverlay::get_length(const struct handlegraph::handle_t &) const --> unsigned long", pybind11::arg("handle")); + cl.def("get_sequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_sequence, "Get the sequence of a node, presented in the handle's local forward orientation.\n\nC++: bdsg::VectorizableOverlay::get_sequence(const struct handlegraph::handle_t &) const --> std::string", pybind11::arg("handle")); + cl.def("get_degree", (unsigned long (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, bool) const) &bdsg::VectorizableOverlay::get_degree, "Get the number of edges on the right (go_left = false) or left (go_left\n = true) side of the given handle. The default implementation is O(n) in\n the number of edges returned, but graph implementations that track this\n information more efficiently can override this method.\n\nC++: bdsg::VectorizableOverlay::get_degree(const struct handlegraph::handle_t &, bool) const --> unsigned long", pybind11::arg("handle"), pybind11::arg("go_left")); + cl.def("has_edge", (bool (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::has_edge, "Returns true if there is an edge that allows traversal from the left\n handle to the right handle. By default O(n) in the number of edges\n on left, but can be overridden with more efficient implementations.\n\nC++: bdsg::VectorizableOverlay::has_edge(const struct handlegraph::handle_t &, const struct handlegraph::handle_t &) const --> bool", pybind11::arg("left"), pybind11::arg("right")); + cl.def("get_base", (char (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long) const) &bdsg::VectorizableOverlay::get_base, "Returns one base of a handle's sequence, in the orientation of the\n handle.\n\nC++: bdsg::VectorizableOverlay::get_base(const struct handlegraph::handle_t &, unsigned long) const --> char", pybind11::arg("handle"), pybind11::arg("index")); + cl.def("get_subsequence", (std::string (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &, unsigned long, unsigned long) const) &bdsg::VectorizableOverlay::get_subsequence, "Returns a substring of a handle's sequence, in the orientation of the\n handle. If the indicated substring would extend beyond the end of the\n handle's sequence, the return value is truncated to the sequence's end.\n\nC++: bdsg::VectorizableOverlay::get_subsequence(const struct handlegraph::handle_t &, unsigned long, unsigned long) const --> std::string", pybind11::arg("handle"), pybind11::arg("index"), pybind11::arg("size")); + cl.def("get_node_count", (unsigned long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::get_node_count, "Return the number of nodes in the graph\n\nC++: bdsg::VectorizableOverlay::get_node_count() const --> unsigned long"); + cl.def("min_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::min_node_id, "Return the smallest ID in the graph, or some smaller number if the\n smallest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::min_node_id() const --> long long"); + cl.def("max_node_id", (long long (bdsg::VectorizableOverlay::*)() const) &bdsg::VectorizableOverlay::max_node_id, "Return the largest ID in the graph, or some larger number if the\n largest ID is unavailable. Return value is unspecified if the graph is empty.\n\nC++: bdsg::VectorizableOverlay::max_node_id() const --> long long"); + cl.def("node_vector_offset", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::node_vector_offset, "Return the start position of the node in a (possibly implict) sorted array\n constructed from the concatenation of the node sequences\n\nC++: bdsg::VectorizableOverlay::node_vector_offset(const long long &) const --> unsigned long", pybind11::arg("node_id")); + cl.def("node_at_vector_offset", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::node_at_vector_offset, "Return the node overlapping the given offset in the implicit node vector\n\nC++: bdsg::VectorizableOverlay::node_at_vector_offset(const unsigned long &) const --> long long", pybind11::arg("offset")); + cl.def("edge_index", (unsigned long (bdsg::VectorizableOverlay::*)(const struct std::pair &) const) &bdsg::VectorizableOverlay::edge_index, "Return a unique index among edges in the graph\n\nC++: bdsg::VectorizableOverlay::edge_index(const struct std::pair &) const --> unsigned long", pybind11::arg("edge")); + cl.def("id_to_rank", (unsigned long (bdsg::VectorizableOverlay::*)(const long long &) const) &bdsg::VectorizableOverlay::id_to_rank, "Return the rank of a node (ranks start at 1)\n\nC++: bdsg::VectorizableOverlay::id_to_rank(const long long &) const --> unsigned long", pybind11::arg("node_id")); + cl.def("rank_to_id", (long long (bdsg::VectorizableOverlay::*)(const unsigned long &) const) &bdsg::VectorizableOverlay::rank_to_id, "Return the node with a given rank\n\nC++: bdsg::VectorizableOverlay::rank_to_id(const unsigned long &) const --> long long", pybind11::arg("rank")); + cl.def("get_underlying_handle", (struct handlegraph::handle_t (bdsg::VectorizableOverlay::*)(const struct handlegraph::handle_t &) const) &bdsg::VectorizableOverlay::get_underlying_handle, "Returns the handle in the underlying graph that corresponds to a handle in the\n overlay\n\nC++: bdsg::VectorizableOverlay::get_underlying_handle(const struct handlegraph::handle_t &) const --> struct handlegraph::handle_t", pybind11::arg("handle")); + } { // bdsg::PathVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:197 pybind11::class_, PyCallBack_bdsg_PathVectorizableOverlay, bdsg::VectorizableOverlay, handlegraph::PathHandleGraph> cl(M("bdsg"), "PathVectorizableOverlay", ""); cl.def( pybind11::init(), pybind11::arg("path_graph") ); @@ -1549,13 +1173,4 @@ void bind_bdsg_overlays_vectorizable_overlays(std::function< pybind11::module &( cl.def("get_next_step", (struct handlegraph::step_handle_t (bdsg::PathVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathVectorizableOverlay::get_next_step, "Returns a handle to the next step on the path. If the given step is the final step\n of a non-circular path, this method has undefined behavior. In a circular path,\n the \"last\" step will loop around to the \"first\" step.\n\nC++: bdsg::PathVectorizableOverlay::get_next_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); cl.def("get_previous_step", (struct handlegraph::step_handle_t (bdsg::PathVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathVectorizableOverlay::get_previous_step, "Returns a handle to the previous step on the path. If the given step is the first\n step of a non-circular path, this method has undefined behavior. In a circular path,\n it will loop around from the \"first\" step (i.e. the one returned by path_begin) to\n the \"last\" step.\n\nC++: bdsg::PathVectorizableOverlay::get_previous_step(const struct handlegraph::step_handle_t &) const --> struct handlegraph::step_handle_t", pybind11::arg("step_handle")); } - { // bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 - pybind11::class_, PyCallBack_bdsg_PathPositionVectorizableOverlay, bdsg::PathVectorizableOverlay, handlegraph::PathPositionHandleGraph> cl(M("bdsg"), "PathPositionVectorizableOverlay", ""); - cl.def( pybind11::init(), pybind11::arg("path_position_graph") ); - - cl.def( pybind11::init( [](){ return new bdsg::PathPositionVectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_PathPositionVectorizableOverlay(); } ) ); - cl.def("get_path_length", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_path_length, "Returns the length of a path measured in bases of sequence.\n\nC++: bdsg::PathPositionVectorizableOverlay::get_path_length(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); - cl.def("get_position_of_step", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_position_of_step, "Returns the position along the path of the beginning of this step measured in\n bases of sequence. In a circular path, positions start at the step returned by\n path_begin().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_position_of_step(const struct handlegraph::step_handle_t &) const --> unsigned long", pybind11::arg("step")); - cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::PathPositionVectorizableOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); - } } diff --git a/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp new file mode 100644 index 00000000..2367ea32 --- /dev/null +++ b/bdsg/cmake_bindings/bdsg/overlays/vectorizable_overlays_1.cpp @@ -0,0 +1,832 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // __str__ +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +// bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 +struct PyCallBack_bdsg_PathPositionVectorizableOverlay : public bdsg::PathPositionVectorizableOverlay { + using bdsg::PathPositionVectorizableOverlay::PathPositionVectorizableOverlay; + + unsigned long get_path_length(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_length"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionVectorizableOverlay::get_path_length(a0); + } + unsigned long get_position_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_position_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionVectorizableOverlay::get_position_of_step(a0); + } + struct handlegraph::step_handle_t get_step_at_position(const struct handlegraph::path_handle_t & a0, const unsigned long & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_at_position"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionVectorizableOverlay::get_step_at_position(a0, a1); + } + unsigned long get_path_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_count(); + } + bool has_path(const std::string & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_path"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::has_path(a0); + } + struct handlegraph::path_handle_t get_path_handle(const std::string & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_handle(a0); + } + std::string get_path_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_name(a0); + } + bool get_is_circular(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_circular"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_is_circular(a0); + } + unsigned long get_step_count(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_step_count(a0); + } + struct handlegraph::handle_t get_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_handle_of_step(a0); + } + struct handlegraph::path_handle_t get_path_handle_of_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_path_handle_of_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_path_handle_of_step(a0); + } + struct handlegraph::step_handle_t path_begin(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_begin"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_begin(a0); + } + struct handlegraph::step_handle_t path_end(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_end"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_end(a0); + } + struct handlegraph::step_handle_t path_back(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_back"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_back(a0); + } + struct handlegraph::step_handle_t path_front_end(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "path_front_end"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::path_front_end(a0); + } + bool has_next_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_next_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::has_next_step(a0); + } + bool has_previous_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_previous_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::has_previous_step(a0); + } + struct handlegraph::step_handle_t get_next_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_next_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_next_step(a0); + } + struct handlegraph::step_handle_t get_previous_step(const struct handlegraph::step_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_previous_step"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::get_previous_step(a0); + } + bool for_each_path_handle_impl(const class std::function & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_handle_impl"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::for_each_path_handle_impl(a0); + } + bool for_each_step_on_handle_impl(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_on_handle_impl"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathVectorizableOverlay::for_each_step_on_handle_impl(a0, a1); + } + bool has_node(long long a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_node"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::has_node(a0); + } + struct handlegraph::handle_t get_handle(const long long & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_handle(a0, a1); + } + long long get_id(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_id"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_id(a0); + } + bool get_is_reverse(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_is_reverse"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_is_reverse(a0); + } + struct handlegraph::handle_t flip(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "flip"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::flip(a0); + } + unsigned long get_length(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_length"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_length(a0); + } + std::string get_sequence(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sequence"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_sequence(a0); + } + unsigned long get_degree(const struct handlegraph::handle_t & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_degree"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_degree(a0, a1); + } + bool has_edge(const struct handlegraph::handle_t & a0, const struct handlegraph::handle_t & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "has_edge"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::has_edge(a0, a1); + } + char get_base(const struct handlegraph::handle_t & a0, unsigned long a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_base"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_base(a0, a1); + } + std::string get_subsequence(const struct handlegraph::handle_t & a0, unsigned long a1, unsigned long a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subsequence"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_subsequence(a0, a1, a2); + } + unsigned long get_node_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_node_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_node_count(); + } + long long min_node_id() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "min_node_id"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::min_node_id(); + } + long long max_node_id() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "max_node_id"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::max_node_id(); + } + unsigned long node_vector_offset(const long long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_vector_offset"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::node_vector_offset(a0); + } + long long node_at_vector_offset(const unsigned long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "node_at_vector_offset"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::node_at_vector_offset(a0); + } + unsigned long edge_index(const struct std::pair & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "edge_index"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::edge_index(a0); + } + unsigned long id_to_rank(const long long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "id_to_rank"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::id_to_rank(a0); + } + long long rank_to_id(const unsigned long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_id"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::rank_to_id(a0); + } + struct handlegraph::handle_t get_underlying_handle(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_underlying_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::get_underlying_handle(a0); + } + void index_nodes_and_edges() override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "index_nodes_and_edges"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return VectorizableOverlay::index_nodes_and_edges(); + } + unsigned long handle_to_rank(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "handle_to_rank"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return RankedHandleGraph::handle_to_rank(a0); + } + struct handlegraph::handle_t rank_to_handle(const unsigned long & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "rank_to_handle"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return RankedHandleGraph::rank_to_handle(a0); + } + unsigned long get_edge_count() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_edge_count"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return HandleGraph::get_edge_count(); + } + unsigned long get_total_length() const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_total_length"); + if (overload) { + auto o = overload.operator()(); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return HandleGraph::get_total_length(); + } + bool follow_edges_impl(const struct handlegraph::handle_t & a0, bool a1, const class std::function & a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "follow_edges_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::follow_edges_impl\""); + } + bool for_each_handle_impl(const class std::function & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_handle_impl"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + pybind11::pybind11_fail("Tried to call pure virtual function \"HandleGraph::for_each_handle_impl\""); + } + unsigned long get_step_count(const struct handlegraph::handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_step_count"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathHandleGraph::get_step_count(a0); + } + class std::vector steps_of_handle(const struct handlegraph::handle_t & a0, bool a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "steps_of_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference>::value) { + static pybind11::detail::override_caster_t> caster; + return pybind11::detail::cast_ref>(std::move(o), caster); + } + return pybind11::detail::cast_safe>(std::move(o)); + } + return PathHandleGraph::steps_of_handle(a0, a1); + } + bool is_empty(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "is_empty"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathHandleGraph::is_empty(a0); + } + enum handlegraph::PathSense get_sense(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sense"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_sense(a0); + } + std::string get_sample_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_sample_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_sample_name(a0); + } + std::string get_locus_name(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_locus_name"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_locus_name(a0); + } + unsigned long get_haplotype(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_haplotype"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_haplotype(a0); + } + unsigned long get_phase_block(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_phase_block"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::get_phase_block(a0); + } + using _binder_ret_0 = struct std::pair; + _binder_ret_0 get_subrange(const struct handlegraph::path_handle_t & a0) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "get_subrange"); + if (overload) { + auto o = overload.operator()(a0); + if (pybind11::detail::cast_is_temporary_value_reference<_binder_ret_0>::value) { + static pybind11::detail::override_caster_t<_binder_ret_0> caster; + return pybind11::detail::cast_ref<_binder_ret_0>(std::move(o), caster); + } + return pybind11::detail::cast_safe<_binder_ret_0>(std::move(o)); + } + return PathMetadata::get_subrange(a0); + } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } + bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_step_of_sense_impl(a0, a1, a2); + } + bool for_each_step_position_on_handle(const struct handlegraph::handle_t & a0, const class std::function & a1) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_position_on_handle"); + if (overload) { + auto o = overload.operator()(a0, a1); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathPositionHandleGraph::for_each_step_position_on_handle(a0, a1); + } +}; + +void bind_bdsg_overlays_vectorizable_overlays_1(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // bdsg::PathPositionVectorizableOverlay file:bdsg/overlays/vectorizable_overlays.hpp line:292 + pybind11::class_, PyCallBack_bdsg_PathPositionVectorizableOverlay, bdsg::PathVectorizableOverlay, handlegraph::PathPositionHandleGraph> cl(M("bdsg"), "PathPositionVectorizableOverlay", ""); + cl.def( pybind11::init(), pybind11::arg("path_position_graph") ); + + cl.def( pybind11::init( [](){ return new bdsg::PathPositionVectorizableOverlay(); }, [](){ return new PyCallBack_bdsg_PathPositionVectorizableOverlay(); } ) ); + cl.def("get_path_length", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_path_length, "Returns the length of a path measured in bases of sequence.\n\nC++: bdsg::PathPositionVectorizableOverlay::get_path_length(const struct handlegraph::path_handle_t &) const --> unsigned long", pybind11::arg("path_handle")); + cl.def("get_position_of_step", (unsigned long (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::step_handle_t &) const) &bdsg::PathPositionVectorizableOverlay::get_position_of_step, "Returns the position along the path of the beginning of this step measured in\n bases of sequence. In a circular path, positions start at the step returned by\n path_begin().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_position_of_step(const struct handlegraph::step_handle_t &) const --> unsigned long", pybind11::arg("step")); + cl.def("get_step_at_position", (struct handlegraph::step_handle_t (bdsg::PathPositionVectorizableOverlay::*)(const struct handlegraph::path_handle_t &, const unsigned long &) const) &bdsg::PathPositionVectorizableOverlay::get_step_at_position, "Returns the step at this position, measured in bases of sequence starting at\n the step returned by path_begin(). If the position is past the end of the\n path, returns path_end().\n\nC++: bdsg::PathPositionVectorizableOverlay::get_step_at_position(const struct handlegraph::path_handle_t &, const unsigned long &) const --> struct handlegraph::step_handle_t", pybind11::arg("path"), pybind11::arg("position")); + } +} diff --git a/bdsg/cmake_bindings/bdsg/packed_graph.cpp b/bdsg/cmake_bindings/bdsg/packed_graph.cpp index 5bc325a8..9558cf78 100644 --- a/bdsg/cmake_bindings/bdsg/packed_graph.cpp +++ b/bdsg/cmake_bindings/bdsg/packed_graph.cpp @@ -641,6 +641,19 @@ struct PyCallBack_bdsg_PackedGraph : public bdsg::PackedGraph { } return GraphProxy::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return GraphProxy::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); @@ -1702,6 +1715,19 @@ struct PyCallBack_bdsg_MappedPackedGraph : public bdsg::MappedPackedGraph { } return GraphProxy::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return GraphProxy::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp index 9f3aa143..b543525a 100644 --- a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp +++ b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp @@ -514,7 +514,9 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("is_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_snarl, "Returns true if the given net handle refers to (a traversal of) a snarl.\n\nC++: bdsg::SnarlDistanceIndex::is_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_dag", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_dag, "Return true if the given snarl is a DAG and false otherwise\nReturns true if the given net_handle_t is not a snarl\n\nC++: bdsg::SnarlDistanceIndex::is_dag(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("snarl")); cl.def("is_simple_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_simple_snarl, "Returns true if the given net handle refers to (a traversal of) a simple snarl\nA simple snarl is a bubble where each child node can only reach the boundary nodes,\nand each side of a node reaches a different boundary node\nThere may also be an edge connecting the two boundary nodes but no additional \nedges are allowed\n\nC++: bdsg::SnarlDistanceIndex::is_simple_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); - cl.def("is_regular_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_regular_snarl, "Returns true if the given net handle refers to (a traversal of) a regular snarl\nA regular snarl is the same as a simple snarl, except that the children may be\nnested chains, rather than being restricted to nodes \n\nC++: bdsg::SnarlDistanceIndex::is_regular_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); + cl.def("is_regular_snarl", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0) -> bool { return o.is_regular_snarl(a0); }, "", pybind11::arg("net")); + cl.def("is_regular_snarl", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, bool const & a1) -> bool { return o.is_regular_snarl(a0, a1); }, "", pybind11::arg("net"), pybind11::arg("allow_internal_loops")); + cl.def("is_regular_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, bool, const class handlegraph::HandleGraph *) const) &bdsg::SnarlDistanceIndex::is_regular_snarl, "Returns true if the given net handle refers to (a traversal of) a regular snarl\nA regular snarl is the same as a simple snarl, except that the children may be\nnested chains, rather than being restricted to nodes \n\nC++: bdsg::SnarlDistanceIndex::is_regular_snarl(const struct handlegraph::net_handle_t &, bool, const class handlegraph::HandleGraph *) const --> bool", pybind11::arg("net"), pybind11::arg("allow_internal_loops"), pybind11::arg("graph")); cl.def("is_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_chain, "Returns true if the given net handle refers to (a traversal of) a chain.\n\nC++: bdsg::SnarlDistanceIndex::is_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_multicomponent_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_multicomponent_chain, "Returns true if the given net handle refers to (a traversal of) a chain that is not start-end connected\n\nC++: bdsg::SnarlDistanceIndex::is_multicomponent_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_looping_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_looping_chain, "Returns true if the given net handle refers to (a traversal of) a chain that loops (a chain where the first and last node are the same).\n\nC++: bdsg::SnarlDistanceIndex::is_looping_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); @@ -534,8 +536,10 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_rank_in_parent", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_rank_in_parent, "For a child of a snarl, the rank is used to calculate the distance\n\nC++: bdsg::SnarlDistanceIndex::get_rank_in_parent(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); cl.def("connected_component_count", (unsigned long (bdsg::SnarlDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::connected_component_count, "How many connected components are in this graph?\nThis returns the number of topological connected components, not necessarily the \nnumber of nodes in the top-level snarl \n\nC++: bdsg::SnarlDistanceIndex::connected_component_count() const --> unsigned long"); cl.def("get_snarl_child_from_rank", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const unsigned long &) const) &bdsg::SnarlDistanceIndex::get_snarl_child_from_rank, "Get the child of a snarl from its rank. This shouldn't be exposed to the public interface but I need it\nPlease don't use it\nFor 0 or 1, returns the sentinel facing in. Otherwise return the child as a chain going START_END\n\nC++: bdsg::SnarlDistanceIndex::get_snarl_child_from_rank(const struct handlegraph::net_handle_t &, const unsigned long &) const --> struct handlegraph::net_handle_t", pybind11::arg("snarl"), pybind11::arg("rank")); + cl.def("has_distances", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::has_distances, "Does this net handle store distances?\n\nC++: bdsg::SnarlDistanceIndex::has_distances(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); + cl.def("has_distances", (bool (bdsg::SnarlDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::has_distances, "Does the distance index in general store distances?\n\nC++: bdsg::SnarlDistanceIndex::has_distances() const --> bool"); cl.def("get_parent_traversal", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_parent_traversal, "Get a net handle for traversals of a snarl or chain that contains\nthe given oriented bounding node traversals or sentinels. Given two\nsentinels for a snarl, produces a net handle to a start-to-end,\nend-to-end, end-to-start, or start-to-start traversal of that snarl.\nGiven handles to traversals of the bounding nodes of a chain, similarly\nproduces a net handle to a traversal of the chain.\n\nFor a chain, either or both handles can also be a snarl containing tips,\nfor a tip-to-start, tip-to-end, start-to-tip, end-to-tip, or tip-to-tip\ntraversal. Similarly, for a snarl, either or both handles can be a chain\nin the snarl that contains internal tips, or that has no edges on the\nappropriate end.\n\nMay only be called if a path actually exists between the given start\nand end.\n\nC++: bdsg::SnarlDistanceIndex::get_parent_traversal(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &) const --> struct handlegraph::net_handle_t", pybind11::arg("traversal_start"), pybind11::arg("traversal_end")); - cl.def_static("has_distances", (const bool (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::has_distances, "C++: bdsg::SnarlDistanceIndex::has_distances(enum bdsg::SnarlDistanceIndex::record_t) --> const bool", pybind11::arg("type")); + cl.def_static("record_has_distances", (const bool (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::record_has_distances, "C++: bdsg::SnarlDistanceIndex::record_has_distances(enum bdsg::SnarlDistanceIndex::record_t) --> const bool", pybind11::arg("type")); cl.def_static("get_record_handle_type", (const enum bdsg::SnarlDistanceIndex::net_handle_record_t (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::get_record_handle_type, "Given the type of the record, return the handle type. Some record types can represent multiple things,\nfor example a simple snarl record is used to represent a snarl, and the nodes/trivial chains in it.\nThis will return whatever is higher on the snarl tree. A simple snarl will be considered a snarl,\na root snarl will be considered a root, etc\n\nC++: bdsg::SnarlDistanceIndex::get_record_handle_type(enum bdsg::SnarlDistanceIndex::record_t) --> const enum bdsg::SnarlDistanceIndex::net_handle_record_t", pybind11::arg("type")); cl.def_static("get_record_offset", (const unsigned long (*)(const struct handlegraph::net_handle_t &)) &bdsg::SnarlDistanceIndex::get_record_offset, "The offset into records that this handle points to\n\nC++: bdsg::SnarlDistanceIndex::get_record_offset(const struct handlegraph::net_handle_t &) --> const unsigned long", pybind11::arg("net_handle")); cl.def_static("get_node_record_offset", (const unsigned long (*)(const struct handlegraph::net_handle_t &)) &bdsg::SnarlDistanceIndex::get_node_record_offset, "The offset of a node in a trivial snarl (0 if it isn't a node in a trivial snarl)\n\nC++: bdsg::SnarlDistanceIndex::get_node_record_offset(const struct handlegraph::net_handle_t &) --> const unsigned long", pybind11::arg("net_handle")); @@ -571,7 +575,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_static("bit_width", (unsigned long (*)(unsigned long)) &bdsg::SnarlDistanceIndex::bit_width, "C++: bdsg::SnarlDistanceIndex::bit_width(unsigned long) --> unsigned long", pybind11::arg("value")); cl.def("time_accesses", (void (bdsg::SnarlDistanceIndex::*)()) &bdsg::SnarlDistanceIndex::time_accesses, "C++: bdsg::SnarlDistanceIndex::time_accesses() --> void"); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1524 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1537 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryDistanceIndex", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex(); } ) ); @@ -592,7 +596,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length() const --> unsigned long"); cl.def("assign", (class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &) --> class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &", pybind11::return_value_policy::automatic, pybind11::arg("")); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1544 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1557 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryRecord", ""); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord(o); } ) ); @@ -600,7 +604,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1546 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1559 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryChainRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord(); } ) ); @@ -634,7 +638,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1588 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1601 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporarySnarlRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord(); } ) ); @@ -667,7 +671,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1621 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1634 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryNodeRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord(); } ) ); diff --git a/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp b/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp index a59d28c3..05eeef5d 100644 --- a/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp +++ b/bdsg/cmake_bindings/handlegraph/mutable_path_metadata.cpp @@ -10,6 +10,8 @@ #include #include // __str__ #include +#include +#include #include #include @@ -139,6 +141,19 @@ struct PyCallBack_handlegraph_MutablePathMetadata : public handlegraph::MutableP } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); @@ -927,6 +942,19 @@ struct PyCallBack_handlegraph_MutablePathHandleGraph : public handlegraph::Mutab } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp b/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp index 432bd94a..ff250531 100644 --- a/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/mutable_path_mutable_handle_graph.cpp @@ -19,6 +19,8 @@ #include // __str__ #include #include +#include +#include #include #include @@ -760,6 +762,19 @@ struct PyCallBack_handlegraph_MutablePathMutableHandleGraph : public handlegraph } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); @@ -2113,6 +2128,19 @@ struct PyCallBack_handlegraph_MutablePathDeletableHandleGraph : public handlegra } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/handlegraph/path_metadata.cpp b/bdsg/cmake_bindings/handlegraph/path_metadata.cpp index 69d7c0c4..75a19eef 100644 --- a/bdsg/cmake_bindings/handlegraph/path_metadata.cpp +++ b/bdsg/cmake_bindings/handlegraph/path_metadata.cpp @@ -7,6 +7,8 @@ #include #include // __str__ #include +#include +#include #include #include @@ -110,6 +112,19 @@ struct PyCallBack_handlegraph_PathMetadata : public handlegraph::PathMetadata { } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); @@ -767,6 +782,19 @@ struct PyCallBack_handlegraph_PathHandleGraph : public handlegraph::PathHandleGr } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp b/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp index 02289a4a..0e5bfda2 100644 --- a/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp +++ b/bdsg/cmake_bindings/handlegraph/path_position_handle_graph.cpp @@ -8,6 +8,8 @@ #include #include // __str__ #include +#include +#include #include #include @@ -670,6 +672,19 @@ struct PyCallBack_handlegraph_PathPositionHandleGraph : public handlegraph::Path } return PathMetadata::get_subrange(a0); } + bool for_each_path_matching_impl(const class std::unordered_set * a0, const class std::unordered_set * a1, const class std::unordered_set * a2, const class std::function & a3) const override { + pybind11::gil_scoped_acquire gil; + pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_path_matching_impl"); + if (overload) { + auto o = overload.operator()(a0, a1, a2, a3); + if (pybind11::detail::cast_is_temporary_value_reference::value) { + static pybind11::detail::override_caster_t caster; + return pybind11::detail::cast_ref(std::move(o), caster); + } + return pybind11::detail::cast_safe(std::move(o)); + } + return PathMetadata::for_each_path_matching_impl(a0, a1, a2, a3); + } bool for_each_step_of_sense_impl(const struct handlegraph::handle_t & a0, const enum handlegraph::PathSense & a1, const class std::function & a2) const override { pybind11::gil_scoped_acquire gil; pybind11::function overload = pybind11::get_overload(static_cast(this), "for_each_step_of_sense_impl"); diff --git a/bdsg/cmake_bindings/std/basic_string.cpp b/bdsg/cmake_bindings/std/basic_string.cpp new file mode 100644 index 00000000..c6d6e285 --- /dev/null +++ b/bdsg/cmake_bindings/std/basic_string.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include // __str__ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_basic_string(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::hash file:bits/basic_string.h line:4414 + pybind11::class_, std::shared_ptr>> cl(M("std"), "hash_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::hash(); } ) ); + cl.def( pybind11::init( [](std::hash const &o){ return new std::hash(o); } ) ); + } + { // std::hash file:bits/functional_hash.h line:102 + pybind11::class_, std::shared_ptr>> cl(M("std"), "hash_handlegraph_PathSense_t", ""); + cl.def( pybind11::init( [](){ return new std::hash(); } ) ); + cl.def( pybind11::init( [](std::hash const &o){ return new std::hash(o); } ) ); + } +} diff --git a/bdsg/cmake_bindings/std/stl_function.cpp b/bdsg/cmake_bindings/std/stl_function.cpp new file mode 100644 index 00000000..e7b92151 --- /dev/null +++ b/bdsg/cmake_bindings/std/stl_function.cpp @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include // __str__ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_stl_function(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::binary_function file:bits/stl_function.h line:131 + pybind11::class_, std::shared_ptr>> cl(M("std"), "binary_function_handlegraph_PathSense_handlegraph_PathSense_bool_t", ""); + cl.def( pybind11::init( [](){ return new std::binary_function(); } ) ); + cl.def( pybind11::init( [](std::binary_function const &o){ return new std::binary_function(o); } ) ); + } + { // std::binary_function file:bits/stl_function.h line:131 + pybind11::class_, std::shared_ptr>> cl(M("std"), "binary_function_std_string_std_string_bool_t", ""); + cl.def( pybind11::init( [](){ return new std::binary_function(); } ) ); + cl.def( pybind11::init( [](std::binary_function const &o){ return new std::binary_function(o); } ) ); + cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } + { // std::equal_to file:bits/stl_function.h line:373 + pybind11::class_, std::shared_ptr>, std::binary_function> cl(M("std"), "equal_to_handlegraph_PathSense_t", ""); + cl.def( pybind11::init( [](){ return new std::equal_to(); } ) ); + cl.def( pybind11::init( [](std::equal_to const &o){ return new std::equal_to(o); } ) ); + cl.def("__call__", (bool (std::equal_to::*)(const enum handlegraph::PathSense &, const enum handlegraph::PathSense &) const) &std::equal_to::operator(), "C++: std::equal_to::operator()(const enum handlegraph::PathSense &, const enum handlegraph::PathSense &) const --> bool", pybind11::arg("__x"), pybind11::arg("__y")); + } + { // std::equal_to file:bits/stl_function.h line:373 + pybind11::class_, std::shared_ptr>, std::binary_function> cl(M("std"), "equal_to_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::equal_to(); } ) ); + cl.def( pybind11::init( [](std::equal_to const &o){ return new std::equal_to(o); } ) ); + cl.def("__call__", (bool (std::equal_to::*)(const std::string &, const std::string &) const) &std::equal_to::operator(), "C++: std::equal_to::operator()(const std::string &, const std::string &) const --> bool", pybind11::arg("__x"), pybind11::arg("__y")); + cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } +} diff --git a/bdsg/cmake_bindings/std/unordered_set.cpp b/bdsg/cmake_bindings/std/unordered_set.cpp new file mode 100644 index 00000000..0364d6d9 --- /dev/null +++ b/bdsg/cmake_bindings/std/unordered_set.cpp @@ -0,0 +1,110 @@ +#include +#include +#include +#include +#include // __str__ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr, false) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*, false) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_unordered_set(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::unordered_set file:bits/unordered_set.h line:104 + pybind11::class_, std::shared_ptr>> cl(M("std"), "unordered_set_handlegraph_PathSense_t", ""); + cl.def( pybind11::init( [](){ return new std::unordered_set(); } ) ); + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::unordered_set(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1){ return new std::unordered_set(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1, const struct std::equal_to & a2){ return new std::unordered_set(a0, a1, a2); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql")); + cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::unordered_set const &o){ return new std::unordered_set(o); } ) ); + cl.def( pybind11::init &>(), pybind11::arg("__a") ); + + cl.def( pybind11::init &, const class std::allocator &>(), pybind11::arg("__uset"), pybind11::arg("__a") ); + + cl.def( pybind11::init &>(), pybind11::arg("__n"), pybind11::arg("__a") ); + + cl.def( pybind11::init &, const class std::allocator &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__a") ); + + cl.def("assign", (class std::unordered_set & (std::unordered_set::*)(const class std::unordered_set &)) &std::unordered_set::operator=, "C++: std::unordered_set::operator=(const class std::unordered_set &) --> class std::unordered_set &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator (std::unordered_set::*)() const) &std::unordered_set::get_allocator, "C++: std::unordered_set::get_allocator() const --> class std::allocator"); + cl.def("empty", (bool (std::unordered_set::*)() const) &std::unordered_set::empty, "C++: std::unordered_set::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_set::*)() const) &std::unordered_set::size, "C++: std::unordered_set::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_set::*)() const) &std::unordered_set::max_size, "C++: std::unordered_set::max_size() const --> unsigned long"); + cl.def("insert", (struct std::pair, bool> (std::unordered_set::*)(const enum handlegraph::PathSense &)) &std::unordered_set::insert, "C++: std::unordered_set::insert(const enum handlegraph::PathSense &) --> struct std::pair, bool>", pybind11::arg("__x")); + cl.def("erase", (unsigned long (std::unordered_set::*)(const enum handlegraph::PathSense &)) &std::unordered_set::erase, "C++: std::unordered_set::erase(const enum handlegraph::PathSense &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_set::*)()) &std::unordered_set::clear, "C++: std::unordered_set::clear() --> void"); + cl.def("swap", (void (std::unordered_set::*)(class std::unordered_set &)) &std::unordered_set::swap, "C++: std::unordered_set::swap(class std::unordered_set &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_set::*)() const) &std::unordered_set::hash_function, "C++: std::unordered_set::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_set::*)() const) &std::unordered_set::key_eq, "C++: std::unordered_set::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_set::*)(const enum handlegraph::PathSense &) const) &std::unordered_set::count, "C++: std::unordered_set::count(const enum handlegraph::PathSense &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair, struct std::__detail::_Node_iterator > (std::unordered_set::*)(const enum handlegraph::PathSense &)) &std::unordered_set::equal_range, "C++: std::unordered_set::equal_range(const enum handlegraph::PathSense &) --> struct std::pair, struct std::__detail::_Node_iterator >", pybind11::arg("__x")); + cl.def("bucket_count", (unsigned long (std::unordered_set::*)() const) &std::unordered_set::bucket_count, "C++: std::unordered_set::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_set::*)() const) &std::unordered_set::max_bucket_count, "C++: std::unordered_set::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_set::*)(unsigned long) const) &std::unordered_set::bucket_size, "C++: std::unordered_set::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_set::*)(const enum handlegraph::PathSense &) const) &std::unordered_set::bucket, "C++: std::unordered_set::bucket(const enum handlegraph::PathSense &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_set::*)() const) &std::unordered_set::load_factor, "C++: std::unordered_set::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_set::*)() const) &std::unordered_set::max_load_factor, "C++: std::unordered_set::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_set::*)(float)) &std::unordered_set::max_load_factor, "C++: std::unordered_set::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_set::*)(unsigned long)) &std::unordered_set::rehash, "C++: std::unordered_set::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_set::*)(unsigned long)) &std::unordered_set::reserve, "C++: std::unordered_set::reserve(unsigned long) --> void", pybind11::arg("__n")); + } + { // std::unordered_set file:bits/unordered_set.h line:104 + pybind11::class_,std::equal_to,std::allocator>, std::shared_ptr,std::equal_to,std::allocator>>> cl(M("std"), "unordered_set_std_string_std_hash_std_string_std_equal_to_std_string_std_allocator_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::unordered_set,std::equal_to,std::allocator>(); } ) ); + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::unordered_set,std::equal_to,std::allocator>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1){ return new std::unordered_set,std::equal_to,std::allocator>(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1, const struct std::equal_to & a2){ return new std::unordered_set,std::equal_to,std::allocator>(a0, a1, a2); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql")); + cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::unordered_set,std::equal_to,std::allocator> const &o){ return new std::unordered_set,std::equal_to,std::allocator>(o); } ) ); + cl.def( pybind11::init &>(), pybind11::arg("__a") ); + + cl.def( pybind11::init &, const class std::allocator &>(), pybind11::arg("__uset"), pybind11::arg("__a") ); + + cl.def( pybind11::init &>(), pybind11::arg("__n"), pybind11::arg("__a") ); + + cl.def( pybind11::init &, const class std::allocator &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__a") ); + + cl.def("assign", (class std::unordered_set & (std::unordered_set,std::equal_to,std::allocator>::*)(const class std::unordered_set &)) &std::unordered_set::operator=, "C++: std::unordered_set::operator=(const class std::unordered_set &) --> class std::unordered_set &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::get_allocator, "C++: std::unordered_set::get_allocator() const --> class std::allocator"); + cl.def("empty", (bool (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::empty, "C++: std::unordered_set::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::size, "C++: std::unordered_set::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::max_size, "C++: std::unordered_set::max_size() const --> unsigned long"); + cl.def("insert", (struct std::pair, bool> (std::unordered_set,std::equal_to,std::allocator>::*)(const std::string &)) &std::unordered_set::insert, "C++: std::unordered_set::insert(const std::string &) --> struct std::pair, bool>", pybind11::arg("__x")); + cl.def("erase", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)(const std::string &)) &std::unordered_set::erase, "C++: std::unordered_set::erase(const std::string &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_set,std::equal_to,std::allocator>::*)()) &std::unordered_set::clear, "C++: std::unordered_set::clear() --> void"); + cl.def("swap", (void (std::unordered_set,std::equal_to,std::allocator>::*)(class std::unordered_set &)) &std::unordered_set::swap, "C++: std::unordered_set::swap(class std::unordered_set &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::hash_function, "C++: std::unordered_set::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::key_eq, "C++: std::unordered_set::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)(const std::string &) const) &std::unordered_set::count, "C++: std::unordered_set::count(const std::string &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair, struct std::__detail::_Node_iterator > (std::unordered_set,std::equal_to,std::allocator>::*)(const std::string &)) &std::unordered_set::equal_range, "C++: std::unordered_set::equal_range(const std::string &) --> struct std::pair, struct std::__detail::_Node_iterator >", pybind11::arg("__x")); + cl.def("bucket_count", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::bucket_count, "C++: std::unordered_set::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::max_bucket_count, "C++: std::unordered_set::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)(unsigned long) const) &std::unordered_set::bucket_size, "C++: std::unordered_set::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_set,std::equal_to,std::allocator>::*)(const std::string &) const) &std::unordered_set::bucket, "C++: std::unordered_set::bucket(const std::string &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::load_factor, "C++: std::unordered_set::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_set,std::equal_to,std::allocator>::*)() const) &std::unordered_set::max_load_factor, "C++: std::unordered_set::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_set,std::equal_to,std::allocator>::*)(float)) &std::unordered_set::max_load_factor, "C++: std::unordered_set::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_set,std::equal_to,std::allocator>::*)(unsigned long)) &std::unordered_set::rehash, "C++: std::unordered_set::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_set,std::equal_to,std::allocator>::*)(unsigned long)) &std::unordered_set::reserve, "C++: std::unordered_set::reserve(unsigned long) --> void", pybind11::arg("__n")); + } +} From 84e1965299020c39fe6b7577a67d87006c9f311c Mon Sep 17 00:00:00 2001 From: Jean Monlong Date: Thu, 18 Sep 2025 15:29:01 +0200 Subject: [PATCH 05/10] may help ci run cmake even if a dep uses an old version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2884ec7f..0355abaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ script: - mkdir build - cd build # We may have several Pythons and need to take care to use the one that `python3` is. - - cmake -DPYTHON_EXECUTABLE=`which python3` .. + - cmake -DPYTHON_EXECUTABLE=`which python3` -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. - make -j2 - cd ../bdsg/docs - pip3 install -r requirements.txt From 0ab3af2364a07c5c4e52ee777092aa3c09e61ab0 Mon Sep 17 00:00:00 2001 From: Jean Monlong Date: Thu, 18 Sep 2025 15:31:07 +0200 Subject: [PATCH 06/10] try again to help cmake work on the mac ci --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0355abaa..c2a82377 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ script: - mkdir build - cd build # We may have several Pythons and need to take care to use the one that `python3` is. - - cmake -DPYTHON_EXECUTABLE=`which python3` -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. + - cmake -DPYTHON_EXECUTABLE=`which python3` -DCMAKE_POLICY_VERSION_MINIMUM=3.4 .. - make -j2 - cd ../bdsg/docs - pip3 install -r requirements.txt From 4f9688661cc921c944803d1c7e811a139c299cb3 Mon Sep 17 00:00:00 2001 From: Jean Monlong Date: Thu, 18 Sep 2025 15:34:26 +0200 Subject: [PATCH 07/10] revert back the CI conf after failing to fix it --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c2a82377..2884ec7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ script: - mkdir build - cd build # We may have several Pythons and need to take care to use the one that `python3` is. - - cmake -DPYTHON_EXECUTABLE=`which python3` -DCMAKE_POLICY_VERSION_MINIMUM=3.4 .. + - cmake -DPYTHON_EXECUTABLE=`which python3` .. - make -j2 - cd ../bdsg/docs - pip3 install -r requirements.txt From 560b0ba009ffd914d47eb490debc964ed3d83ddf Mon Sep 17 00:00:00 2001 From: Xian Date: Sun, 26 Oct 2025 19:35:29 +0100 Subject: [PATCH 08/10] Update libhandlegraph --- bdsg/deps/libhandlegraph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdsg/deps/libhandlegraph b/bdsg/deps/libhandlegraph index 0e70dadb..984295e5 160000 --- a/bdsg/deps/libhandlegraph +++ b/bdsg/deps/libhandlegraph @@ -1 +1 @@ -Subproject commit 0e70dadb5054568d8071e280b3b7b11b5658937f +Subproject commit 984295e55fa33967b41cd6ff28e488e2c2a50af4 From cefbeb1415cff48c1f4fb67f0b51e4d8c4991413 Mon Sep 17 00:00:00 2001 From: Xian Hui Chang Date: Sun, 26 Oct 2025 20:45:14 +0100 Subject: [PATCH 09/10] Update bindings --- .../cmake_bindings/bdsg/snarl_distance_index.cpp | 16 ++++++++++------ bdsg/cmake_bindings/handlegraph/types.cpp | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp index 9f3aa143..aa546f9f 100644 --- a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp +++ b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp @@ -514,7 +514,9 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("is_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_snarl, "Returns true if the given net handle refers to (a traversal of) a snarl.\n\nC++: bdsg::SnarlDistanceIndex::is_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_dag", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_dag, "Return true if the given snarl is a DAG and false otherwise\nReturns true if the given net_handle_t is not a snarl\n\nC++: bdsg::SnarlDistanceIndex::is_dag(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("snarl")); cl.def("is_simple_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_simple_snarl, "Returns true if the given net handle refers to (a traversal of) a simple snarl\nA simple snarl is a bubble where each child node can only reach the boundary nodes,\nand each side of a node reaches a different boundary node\nThere may also be an edge connecting the two boundary nodes but no additional \nedges are allowed\n\nC++: bdsg::SnarlDistanceIndex::is_simple_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); - cl.def("is_regular_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_regular_snarl, "Returns true if the given net handle refers to (a traversal of) a regular snarl\nA regular snarl is the same as a simple snarl, except that the children may be\nnested chains, rather than being restricted to nodes \n\nC++: bdsg::SnarlDistanceIndex::is_regular_snarl(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); + cl.def("is_regular_snarl", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0) -> bool { return o.is_regular_snarl(a0); }, "", pybind11::arg("net")); + cl.def("is_regular_snarl", [](bdsg::SnarlDistanceIndex const &o, const struct handlegraph::net_handle_t & a0, bool const & a1) -> bool { return o.is_regular_snarl(a0, a1); }, "", pybind11::arg("net"), pybind11::arg("allow_internal_loops")); + cl.def("is_regular_snarl", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, bool, const class handlegraph::HandleGraph *) const) &bdsg::SnarlDistanceIndex::is_regular_snarl, "Returns true if the given net handle refers to (a traversal of) a regular snarl\nA regular snarl is the same as a simple snarl, except that the children may be\nnested chains, rather than being restricted to nodes \n\nC++: bdsg::SnarlDistanceIndex::is_regular_snarl(const struct handlegraph::net_handle_t &, bool, const class handlegraph::HandleGraph *) const --> bool", pybind11::arg("net"), pybind11::arg("allow_internal_loops"), pybind11::arg("graph")); cl.def("is_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_chain, "Returns true if the given net handle refers to (a traversal of) a chain.\n\nC++: bdsg::SnarlDistanceIndex::is_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_multicomponent_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_multicomponent_chain, "Returns true if the given net handle refers to (a traversal of) a chain that is not start-end connected\n\nC++: bdsg::SnarlDistanceIndex::is_multicomponent_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); cl.def("is_looping_chain", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::is_looping_chain, "Returns true if the given net handle refers to (a traversal of) a chain that loops (a chain where the first and last node are the same).\n\nC++: bdsg::SnarlDistanceIndex::is_looping_chain(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); @@ -534,6 +536,8 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_rank_in_parent", (unsigned long (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_rank_in_parent, "For a child of a snarl, the rank is used to calculate the distance\n\nC++: bdsg::SnarlDistanceIndex::get_rank_in_parent(const struct handlegraph::net_handle_t &) const --> unsigned long", pybind11::arg("net")); cl.def("connected_component_count", (unsigned long (bdsg::SnarlDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::connected_component_count, "How many connected components are in this graph?\nThis returns the number of topological connected components, not necessarily the \nnumber of nodes in the top-level snarl \n\nC++: bdsg::SnarlDistanceIndex::connected_component_count() const --> unsigned long"); cl.def("get_snarl_child_from_rank", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const unsigned long &) const) &bdsg::SnarlDistanceIndex::get_snarl_child_from_rank, "Get the child of a snarl from its rank. This shouldn't be exposed to the public interface but I need it\nPlease don't use it\nFor 0 or 1, returns the sentinel facing in. Otherwise return the child as a chain going START_END\n\nC++: bdsg::SnarlDistanceIndex::get_snarl_child_from_rank(const struct handlegraph::net_handle_t &, const unsigned long &) const --> struct handlegraph::net_handle_t", pybind11::arg("snarl"), pybind11::arg("rank")); + cl.def("has_distances", (bool (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::has_distances, "Does this net handle store distances?\n\nC++: bdsg::SnarlDistanceIndex::has_distances(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("net")); + cl.def("has_distances", (bool (bdsg::SnarlDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::has_distances, "Does the distance index in general store distances?\n\nC++: bdsg::SnarlDistanceIndex::has_distances() const --> bool"); cl.def("get_parent_traversal", (struct handlegraph::net_handle_t (bdsg::SnarlDistanceIndex::*)(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &) const) &bdsg::SnarlDistanceIndex::get_parent_traversal, "Get a net handle for traversals of a snarl or chain that contains\nthe given oriented bounding node traversals or sentinels. Given two\nsentinels for a snarl, produces a net handle to a start-to-end,\nend-to-end, end-to-start, or start-to-start traversal of that snarl.\nGiven handles to traversals of the bounding nodes of a chain, similarly\nproduces a net handle to a traversal of the chain.\n\nFor a chain, either or both handles can also be a snarl containing tips,\nfor a tip-to-start, tip-to-end, start-to-tip, end-to-tip, or tip-to-tip\ntraversal. Similarly, for a snarl, either or both handles can be a chain\nin the snarl that contains internal tips, or that has no edges on the\nappropriate end.\n\nMay only be called if a path actually exists between the given start\nand end.\n\nC++: bdsg::SnarlDistanceIndex::get_parent_traversal(const struct handlegraph::net_handle_t &, const struct handlegraph::net_handle_t &) const --> struct handlegraph::net_handle_t", pybind11::arg("traversal_start"), pybind11::arg("traversal_end")); cl.def_static("has_distances", (const bool (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::has_distances, "C++: bdsg::SnarlDistanceIndex::has_distances(enum bdsg::SnarlDistanceIndex::record_t) --> const bool", pybind11::arg("type")); cl.def_static("get_record_handle_type", (const enum bdsg::SnarlDistanceIndex::net_handle_record_t (*)(enum bdsg::SnarlDistanceIndex::record_t)) &bdsg::SnarlDistanceIndex::get_record_handle_type, "Given the type of the record, return the handle type. Some record types can represent multiple things,\nfor example a simple snarl record is used to represent a snarl, and the nodes/trivial chains in it.\nThis will return whatever is higher on the snarl tree. A simple snarl will be considered a snarl,\na root snarl will be considered a root, etc\n\nC++: bdsg::SnarlDistanceIndex::get_record_handle_type(enum bdsg::SnarlDistanceIndex::record_t) --> const enum bdsg::SnarlDistanceIndex::net_handle_record_t", pybind11::arg("type")); @@ -571,7 +575,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_static("bit_width", (unsigned long (*)(unsigned long)) &bdsg::SnarlDistanceIndex::bit_width, "C++: bdsg::SnarlDistanceIndex::bit_width(unsigned long) --> unsigned long", pybind11::arg("value")); cl.def("time_accesses", (void (bdsg::SnarlDistanceIndex::*)()) &bdsg::SnarlDistanceIndex::time_accesses, "C++: bdsg::SnarlDistanceIndex::time_accesses() --> void"); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1524 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex file:bdsg/snarl_distance_index.hpp line:1537 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryDistanceIndex", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex(); } ) ); @@ -592,7 +596,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length() const --> unsigned long"); cl.def("assign", (class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &) --> class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &", pybind11::return_value_policy::automatic, pybind11::arg("")); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1544 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1557 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryRecord", ""); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord(o); } ) ); @@ -600,7 +604,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1546 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1559 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryChainRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord(); } ) ); @@ -634,7 +638,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1588 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1601 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporarySnarlRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord(); } ) ); @@ -667,7 +671,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1621 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1634 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryNodeRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord(); } ) ); diff --git a/bdsg/cmake_bindings/handlegraph/types.cpp b/bdsg/cmake_bindings/handlegraph/types.cpp index 57df3104..edb6f2ac 100644 --- a/bdsg/cmake_bindings/handlegraph/types.cpp +++ b/bdsg/cmake_bindings/handlegraph/types.cpp @@ -50,5 +50,7 @@ void bind_handlegraph_types(std::function< pybind11::module &(std::string const pybind11::class_> cl(M("handlegraph"), "net_handle_t", "A net handle is an opaque reference to a category of traversals of a single\n node, a chain, or the interior of a snarl, in the snarl decomposition of a\n graph.\n\n Snarls and chains are bounded by two particular points, but the traversal\n may not visit both or any of them (as is the case for traversals between\n internal tips).\n\n The handle refers to the snarl or chain itself and also a particular\n category of traversals of it. Each of the start and end of the traversal can\n be the start of the snarl/chain, the end of the snarl/chain, or some\n internal tip, for 6 distinct combinations.\n\n For single nodes, we only have forward and reverse."); cl.def( pybind11::init( [](){ return new handlegraph::net_handle_t(); } ) ); cl.def( pybind11::init( [](handlegraph::net_handle_t const &o){ return new handlegraph::net_handle_t(o); } ) ); + cl.def("__eq__", (bool (handlegraph::net_handle_t::*)(const struct handlegraph::net_handle_t &) const) &handlegraph::net_handle_t::operator==, "Define equality on net handles\n\nC++: handlegraph::net_handle_t::operator==(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("other")); + cl.def("__ne__", (bool (handlegraph::net_handle_t::*)(const struct handlegraph::net_handle_t &) const) &handlegraph::net_handle_t::operator!=, "Define inequality on net handles\n\nC++: handlegraph::net_handle_t::operator!=(const struct handlegraph::net_handle_t &) const --> bool", pybind11::arg("other")); } } From 3503009798f7aca9c759f67a0a037cff9da94e63 Mon Sep 17 00:00:00 2001 From: Xian Hui Chang Date: Wed, 29 Oct 2025 09:07:04 +0100 Subject: [PATCH 10/10] Update bindings --- bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp index b543525a..f3a76b69 100644 --- a/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp +++ b/bdsg/cmake_bindings/bdsg/snarl_distance_index.cpp @@ -586,6 +586,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_readwrite("max_tree_depth", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::max_tree_depth); cl.def_readwrite("max_index_size", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::max_index_size); cl.def_readwrite("max_distance", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::max_distance); + cl.def_readwrite("max_bits", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::max_bits); cl.def_readwrite("components", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::components); cl.def_readwrite("root_snarl_components", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::root_snarl_components); cl.def_readwrite("temp_chain_records", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::temp_chain_records); @@ -596,7 +597,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("get_max_record_length", (unsigned long (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)() const) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::get_max_record_length() const --> unsigned long"); cl.def("assign", (class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::*)(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::operator=(const class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &) --> class bdsg::SnarlDistanceIndex::TemporaryDistanceIndex &", pybind11::return_value_policy::automatic, pybind11::arg("")); - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1557 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord file:bdsg/snarl_distance_index.hpp line:1559 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "TemporaryRecord", ""); cl.def( pybind11::init( [](bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord const &o){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord(o); } ) ); @@ -604,7 +605,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1559 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord file:bdsg/snarl_distance_index.hpp line:1561 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryChainRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord(); } ) ); @@ -638,7 +639,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryChainRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1601 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord file:bdsg/snarl_distance_index.hpp line:1603 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporarySnarlRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord(); } ) ); @@ -656,6 +657,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def_readwrite("distance_start_start", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::distance_start_start); cl.def_readwrite("distance_end_end", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::distance_end_end); cl.def_readwrite("rank_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::rank_in_parent); + cl.def_readwrite("max_bits", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::max_bits); cl.def_readwrite("reversed_in_parent", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::reversed_in_parent); cl.def_readwrite("start_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::start_node_rev); cl.def_readwrite("end_node_rev", &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::end_node_rev); @@ -671,7 +673,7 @@ void bind_bdsg_snarl_distance_index(std::function< pybind11::module &(std::strin cl.def("assign", (struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord & (bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::*)(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &)) &bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=, "C++: bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord::operator=(const struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &) --> struct bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporarySnarlRecord &", pybind11::return_value_policy::automatic, pybind11::arg("")); } - { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1634 + { // bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord file:bdsg/snarl_distance_index.hpp line:1641 auto & enclosing_class = cl; pybind11::class_, bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryRecord> cl(enclosing_class, "TemporaryNodeRecord", ""); cl.def( pybind11::init( [](){ return new bdsg::SnarlDistanceIndex::TemporaryDistanceIndex::TemporaryNodeRecord(); } ) );