Source File
reversed_edge_restorer.go
Belonging Package
github.com/d2lang/elk-go/internal/layered/intermediate
// Copyright (c) 2010, 2015 Kiel University and others.//// This program and the accompanying materials are made available under the// terms of the Eclipse Public License 2.0 which is available at// https://www.eclipse.org/legal/epl-2.0.//// SPDX-License-Identifier: EPL-2.0package intermediateimport (basegraph)// RestoreReversedEdges restores every cycle-breaking reversal. Iteration uses// a copy of each outgoing-edge list because ReverseEdge mutates adjacency.func ( *layered.LGraphArena, layered.LGraphID) {for , := range .Graph().Layers {for , := range .Layer().Nodes {for , := range .Node().Ports {:= append([]layered.LEdgeID(nil), .Port().OutgoingEdges...)for , := range {if basegraph.Get(&.Edge().Properties, layered.Reversed) {.ReverseEdge(, , false)}}}}}}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |