Graph: Seperate core functions from common API#1222
Graph: Seperate core functions from common API#1222fabratu wants to merge 9 commits intonetworkit:masterfrom
Conversation
24b187d to
b8cb91e
Compare
bernlu
left a comment
There was a problem hiding this comment.
one inconsistency I noticed: for some iterator files we define a shorthand (using VLN = VeryLongName) and for others we do not. The ones that are defined are not used that much. Maybe we should just remove them to make everything a bit more consistent and readable? (at least outside of the specific class files: in graph.hpp its not so obvious what EIB is).
|
|
||
| template <> | ||
| void Graph::ASB<Graph::PerNode>::checkPremise() const { | ||
| void ASB<PerNode, Graph>::checkPremise() const { |
There was a problem hiding this comment.
these four methods should be defined in a Attributes.cpp and not in Graph.cpp?
|
|
||
| template <> | ||
| void Graph::ASB<Graph::PerEdge>::checkPremise() const { | ||
| void ASB<PerEdge, Graph>::checkPremise() const { |
|
|
||
| template <> | ||
| void Graph::ASB<Graph::PerNode>::indexOK(index n) const { | ||
| void ASB<PerNode, Graph>::indexOK(index n) const { |
|
|
||
| template <> | ||
| void Graph::ASB<Graph::PerEdge>::indexOK(index n) const { | ||
| void ASB<PerEdge, Graph>::indexOK(index n) const { |
| } | ||
|
|
||
| template <> | ||
| bool EIB<Graph>::validEdge() const noexcept { |
There was a problem hiding this comment.
I think it would be better not to use the shorthand here to make it easier to read for someone who did not read the iterator file yet.
Also, again: this is a method definition for an iterator and should be defined in EdgeIterators.cpp and not in Graph?
| } | ||
|
|
||
| template <> | ||
| Edge EdgeTypeIterator<Graph, Edge>::operator*() const noexcept { |
| } | ||
|
|
||
| template <> | ||
| WeightedEdge EdgeTypeIterator<Graph, WeightedEdge>::operator*() const noexcept { |
Currently, the PR is in draft mode. The plan is to extract and move functionality out of the graph data structure, which might be useful for other graph types (e.g. Hypergraphs). The graph type and basic data type (e.g. edge) should be deduced by template.
ToDo: