#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(std::vector &articulationPointsVi) 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); static void printGraph(const BoostGraph &g); FlatPatternTopology(); BoostGraph constructRotationallySymmetricPattern( const BoostGraph &pattern, const std::unordered_map> &slotToNodes, const std::unordered_map &nodeToSlot, const std::unordered_map &correspondingNode) const; std::vector numberOfNodesPerSlot; std::unordered_map nodeToSlot; std::unordered_map> slotToNode; std::unordered_map correspondingNode; private: std::vector> isAdjacentTo; BoostGraph pattern; void constructCorresponginNodeMap(); /* * Creates a pattern which is a copy of the input pattern but with added edges * that result * */ void constructNodeToSlotMap(); void constructSlotToNodeMap(); bool pathExists(int src, int dest) const; }; #endif // FLATPATTTERNTOPOLOGY_HPP