Refactor: Rename adjMatrix to adjList
This commit is contained in:
@@ -50,14 +50,14 @@ private:
|
||||
|
||||
template<typename T>
|
||||
void Frigioni<T>::init() {
|
||||
auto SCCs = Tarjan<T>(this->G.adjMatrix).execute();
|
||||
auto SCCs = Tarjan<T>(this->G.adjList).execute();
|
||||
rodittyZwick = RodittyZwick<T>(this->G);
|
||||
rodittyZwick.init();
|
||||
|
||||
for (auto& scc : SCCs) {
|
||||
RT[scc.id] = BreadthFirstTree<T>(this->G, scc.id);
|
||||
for (const auto& u : this->G.vertices()) {
|
||||
for (const auto& v : this->G.adjMatrix[u]) {
|
||||
for (const auto& v : this->G.adjList[u]) {
|
||||
if (scc.member(u)) {
|
||||
if (scc.member(v))
|
||||
E[scc.id].in.insert(std::make_pair(u, v));
|
||||
@@ -126,7 +126,7 @@ void Frigioni<T>::remove(const std::vector<std::pair<T, T>>& edges) {
|
||||
for (const auto& c : E[v].out)
|
||||
H[id].push(C[c.second].id);
|
||||
}
|
||||
RT[id].adjMatrix[u].erase(v);
|
||||
RT[id].adjList[u].erase(v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ void Frigioni<T>::remove(const std::vector<std::pair<T, T>>& edges) {
|
||||
for (const auto& c : E[v].out)
|
||||
H[id].push(C[c.second].id);
|
||||
}
|
||||
RT[id].adjMatrix[u].erase(v);
|
||||
RT[id].adjList[u].erase(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void Frigioni<T>::remove(const std::vector<std::pair<T, T>>& edges) {
|
||||
|
||||
for (const auto& [u, v] : E[h].inc) {
|
||||
if (RT[id].contains(id, u)) {
|
||||
RT[id].adjMatrix[u].insert(h);
|
||||
RT[id].adjList[u].insert(h);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user