#ifndef FLATPATTTERNTOPOLOGY_HPP #define FLATPATTTERNTOPOLOGY_HPP #include #include #include #include #include using BoostGraph = boost::adjacency_list; using vertex_t = boost::graph_traits::vertex_descriptor; class FlatPatternTopology { public: bool containsArticulationPoints() const; FlatPatternTopology(const std::vector &numberOfNodesPerSlot, const std::vector &edges); static void constructNodeToSlotMap(const std::vector &numberOfNodesPerSlot, std::unordered_map &nodeToSlot); static void constructSlotToNodeMap( const std::unordered_map &nodeToSlot, std::unordered_map> &slotToNode); FlatPatternTopology(); private: BoostGraph pattern; std::vector numberOfNodesPerSlot; std::unordered_map nodeToSlot; std::unordered_map> slotToNode; std::unordered_map correspondingNode; void constructCorresponginNodeMap(); /* * Creates a pattern which is a copy of the input pattern but with added edges * that result * */ void printGraph(const BoostGraph &g) const; static BoostGraph constructRotationallySymmetricPattern( const BoostGraph &pattern, const std::unordered_map> &slotToNodes, const std::unordered_map &nodeToSlot, const std::unordered_map &correspondingNode); void constructNodeToSlotMap(); void constructSlotToNodeMap(); }; #endif // FLATPATTTERNTOPOLOGY_HPP