Template Function rdf4cpp::try_compare_graphs_fast¶
Defined in File GraphComparison.hpp
Function Documentation¶
-
template<std::ranges::sized_range Q, std::ranges::range G>
requires std::ranges::random_access_range<Q> && std::same_as<std::ranges::range_value_t<Q>, std::remove_cvref_t<Node>> && std::same_as<std::ranges::range_value_t<G>, std::remove_cvref_t<Q>>
nonstd::expected<std::map<BlankNode, BlankNode>, std::pair<Node, Node>> rdf4cpp::try_compare_graphs_fast(G const &graph_a, G const &graph_b)¶ does a fast graph comparison, handling blank node mappings, by doing intelligent sorting. if this function finds a bn mapping, then the 2 graphs are isomorph. if this function does not find a mapping, a full graph isomorphism check might still find one. (but this function is usually enough for parser tests). expects both graphs to be deduplicated.
- Template Parameters:
Q – Quad or Triple (but anything with a std::vector-like API will work)
- Parameters:
graph_a –
graph_b –
- Returns:
blank node mapping from graph_b to graph_a if found, first mismatched node pair otherwise