Lines Matching full:edges

79 /// where m is the number of edges, n is the number of vertices, and v(f) is the
83 /// The input is a set of edges with specified costs and capacities, and a pair
96 Edges = std::vector<std::vector<Edge>>(NodeCount, std::vector<Edge>()); in initialize()
107 // flow along its edges in run()
114 for (auto &Edge : Edges[Src]) { in run()
131 /// Multiple edges between a pair of nodes are allowed but self-edges
142 SrcEdge.RevEdgeIndex = Edges[Dst].size(); in addEdge()
149 DstEdge.RevEdgeIndex = Edges[Src].size(); in addEdge()
151 Edges[Src].push_back(SrcEdge); in addEdge()
152 Edges[Dst].push_back(DstEdge); in addEdge()
164 for (const auto &Edge : Edges[Src]) { in getFlow()
174 for (const auto &Edge : Edges[Src]) { in getFlow()
184 /// flow along its edges. The method returns the number of applied iterations.
221 auto &Edge = Edges[Pred][Nodes[Now].ParentEdgeIndex]; in computeAugmentingPathCapacity()
250 // Although the residual network contains edges with negative costs in findAugmentingPath()
251 // (in particular, backward edges), it can be shown that there are no in findAugmentingPath()
269 // Process adjacent edges in findAugmentingPath()
270 for (uint64_t EdgeIdx = 0; EdgeIdx < Edges[Src].size(); EdgeIdx++) { in findAugmentingPath()
271 auto &Edge = Edges[Src][EdgeIdx]; in findAugmentingPath()
299 auto &Edge = Edges[Pred][Nodes[Now].ParentEdgeIndex]; in augmentFlowAlongPath()
300 auto &RevEdge = Edges[Now][Edge.RevEdgeIndex]; in augmentFlowAlongPath()
313 /// runs in O(MaxDfsCalls * |Edges| + |Nodes|) time.
321 // - the next edge to scan is Edges[NodeIdx][EdgeIdx] in findAugmentingDAG()
345 // If we haven't scanned all edges out of NodeIdx, continue scanning in findAugmentingDAG()
346 if (EdgeIdx < Edges[NodeIdx].size()) { in findAugmentingDAG()
347 auto &Edge = Edges[NodeIdx][EdgeIdx]; in findAugmentingDAG()
384 // Phase 2: Extract all forward (DAG) edges and fill in AugmentingEdges in findAugmentingDAG()
387 for (auto &Edge : Edges[Src]) { in findAugmentingDAG()
395 "incorrectly constructed augmenting edges"); in findAugmentingDAG()
459 // Because of rounding, not all flow can be sent along the edges of Src. in augmentFlowAlongDAG()
476 // Phase 4: Update flow values along all edges in augmentFlowAlongDAG()
484 auto &RevEdge = Edges[Edge->Dst][Edge->RevEdgeIndex]; in augmentFlowAlongDAG()
496 /// Identify candidate (shortest) edges for augmentation.
499 // To make sure the augmentation DAG contains only edges with large residual in identifyShortestEdges()
500 // capacity, we prune all edges whose capacity is below a fraction of in identifyShortestEdges()
502 // (All edges of the path itself are always in the DAG) in identifyShortestEdges()
505 // Decide which edges are on a shortest path from Source to Target in identifyShortestEdges()
511 for (auto &Edge : Edges[Src]) { in identifyShortestEdges()
572 /// The set of network edges.
573 std::vector<std::vector<Edge>> Edges; member in __anon5aecd1f00111::MinCostMaxFlow
578 /// Augmenting edges.
746 /// and avoid changing branch probability of outgoing edges drastically,
750 /// - minimizes total multiplicative Flow increase for the remaining edges.
1083 // Edges from S and to T in initializeNetwork()
1093 // Add the corresponding edges to the network in initializeNetwork()
1102 // Initialize edges of the flow network in initializeNetwork()
1113 // Add the corresponding edges to the network in initializeNetwork()
1232 // Verify that there are no parallel edges in verifyInput()
1237 assert(It.second && "input CFG contains parallel edges"); in verifyInput()
1285 // One could modify FlowFunction to hold edges indexed by the sources, which in verifyOutput()
1294 // Run BFS from the source along edges with positive flow in verifyOutput()
1311 // along edges with a positive flow in verifyOutput()