Internal: V3Graph style cleanup. No functional change

This commit is contained in:
Wilson Snyder 2023-10-22 09:50:38 -04:00
parent 5bda901146
commit bcbe5059a9
2 changed files with 6 additions and 7 deletions

View File

@ -300,6 +300,7 @@ public:
std::ostream& operator<<(std::ostream& os, V3GraphVertex* vertexp) VL_MT_DISABLED;
//============================================================================
// TODO should we have a smaller edge structure when we don't need weight etc?
class V3GraphEdge VL_NOT_FINAL {
VL_RTTI_IMPL_BASE(V3GraphEdge)
@ -313,8 +314,8 @@ protected:
friend class GraphAcyc;
friend class GraphAcycEdge;
V3ListEnt<V3GraphEdge*> m_outs; // Next Outbound edge for same vertex (linked list)
V3ListEnt<V3GraphEdge*> m_ins; // Next Inbound edge for same vertex (linked list)
V3ListEnt<V3GraphEdge*> m_outs; // Next outbound edge for same vertex (linked list)
V3ListEnt<V3GraphEdge*> m_ins; // Next inbound edge for same vertex (linked list)
//
V3GraphVertex* m_fromp; // Vertices pointing to this edge
V3GraphVertex* m_top; // Vertices this edge points to

View File

@ -33,7 +33,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
//######################################################################
//######################################################################
// Algorithms - weakly connected components
// Algorithms - Remove redundancies
class GraphRemoveRedundant final : GraphAlg<> {
const bool m_sumWeights; ///< Sum, rather then maximize weights
@ -176,7 +176,7 @@ void V3Graph::weaklyConnected(V3EdgeFuncP edgeFuncp) { GraphAlgWeakly{this, edge
class GraphAlgStrongly final : GraphAlg<> {
private:
uint32_t m_currentDfs; // DFS count
uint32_t m_currentDfs = 0; // DFS count
std::vector<V3GraphVertex*> m_callTrace; // List of everything we hit processing so far
void main() {
@ -253,7 +253,6 @@ private:
public:
GraphAlgStrongly(V3Graph* graphp, V3EdgeFuncP edgeFuncp)
: GraphAlg<>{graphp, edgeFuncp} {
m_currentDfs = 0;
main();
}
~GraphAlgStrongly() = default;
@ -323,7 +322,7 @@ void V3Graph::rank(V3EdgeFuncP edgeFuncp) { GraphAlgRank{this, edgeFuncp}; }
class GraphAlgRLoops final : GraphAlg<> {
private:
std::vector<V3GraphVertex*> m_callTrace; // List of everything we hit processing so far
bool m_done; // Exit algorithm
bool m_done = false; // Exit algorithm
void main(V3GraphVertex* vertexp) {
// Vertex::m_user begin: 1 indicates processing, 2 indicates completed
@ -360,7 +359,6 @@ private:
public:
GraphAlgRLoops(V3Graph* graphp, V3EdgeFuncP edgeFuncp, V3GraphVertex* vertexp)
: GraphAlg<>{graphp, edgeFuncp} {
m_done = false;
main(vertexp);
}
~GraphAlgRLoops() = default;