53 template<
class GraphType>
144 return rep!= UINT_MAX ?
rep :
n ;
162 for (; EI != EE; ++EI)
177 return it->second.subNodes();
241 return GTraits::getNode(
_graph,
id);
246 return GTraits::getNodeID(node);
260 for (; EI != EE; ++EI)
270 this->
rep(v) : this->
rep(w);
274 if (this->
rep(v) == v)
326 if (this->
rep(node) == UINT_MAX || this->
rep(node) == node)
338 for (
NodeID node : candidates)
342 if (this->
rep(node) == UINT_MAX || this->
rep(node) == node)
void addSubNodes(NodeID n)
const NodeBS & subNodes() const
void rep(NodeID n, NodeID r)
const GraphType & graph()
SCCDetection(const GraphType >)
void find(NodeSet &candidates)
NodeID repNode(NodeID n) const
get the rep node if not found return itself
const NodeBS & getRepNodes() const
get all repNodeID
GNODESCCInfoMap _NodeSCCAuxInfo
Map< NodeID, GNodeSCCInfo > GNODESCCInfoMap
bool isInCycle(NodeID n) const
whether the node is in a cycle
NodeID Node_Index(GNODE node) const
GNODE Node(NodeID id) const
GNodeStack & topoNodeStack()
const NodeBS & subNodes(NodeID n) const
get all subnodes in one scc, if size is empty insert itself into the set
Map< NodeID, NodeID > NodeToNodeMap
std::stack< NodeID > GNodeStack
SVF::GenericGraphTraits< GraphType > GTraits
Define the GTraits and node iterator for printing.
void setInSCC(NodeID n, bool v)
const GNODESCCInfoMap & GNodeSCCInfo() const
GTraits::nodes_iterator node_iterator
GTraits::ChildIteratorType child_iterator
void setVisited(NodeID n, bool v)
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
typename GraphType::UnknownGraphTypeError NodeRef