Make reverse() return type auto
This commit is contained in:
@@ -16,7 +16,7 @@ public:
|
||||
Digraph(std::map<T, std::set<T>> digraph);
|
||||
|
||||
// Reverse graph directions
|
||||
Digraph<T> reverse();
|
||||
auto reverse();
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@@ -27,7 +27,7 @@ Digraph<T>::Digraph(std::map<T, std::set<T>> digraph) {
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Digraph<T> Digraph<T>::reverse() {
|
||||
auto Digraph<T>::reverse() {
|
||||
std::map<T, std::set<T>> revMatrix;
|
||||
|
||||
for (const auto& v : Graph<T>::adjMatrix) {
|
||||
|
||||
Reference in New Issue
Block a user