Source File
routing_access.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2talalayout/internal/layoutgraph
package layoutgraphimport// RoutingCostState is the cached routing-cost state that an atomic routing// stage must restore on failure.type RoutingCostState struct {Crossing float64Turn float64NonCenterPort float64}func ( *Graph) () RoutingCostState {.costMu.RLock()defer .costMu.RUnlock()return RoutingCostState{Crossing: .crossingCost,Turn: .turnCost,NonCenterPort: .nonCenterPortCost,}}func ( *Graph) ( RoutingCostState) {.costMu.Lock()defer .costMu.Unlock().crossingCost = .Crossing.turnCost = .Turn.nonCenterPortCost = .NonCenterPort}func ( *EdgeSegment) () *Edge { return .edge }func ( *Graph) () float64 { return .crossingCostValue() }func ( *Graph) () float64 { return .nonCenterPortCostValue() }func ( *Edge) () EntityID { return .entityID() }func ( *Edge) ( *Edge) bool { return .isDuplicateOf() }func ( *Edge) ( []*Edge) bool { return .hasDuplicateIn() }func ( *Edge) ( *Edge) bool { return .hasMatchingArrowheads() }func ( *Edge) () bool { return .ownArrowheadsMatch() }func ( *Edge) () bool { return .isStraight() }func ( *Edge) () bool { return .hasOverlappingEnd() }func ( *Edge) () float64 { return .euclideanDistance() }func ( *Edge) () bool { return .isTreeEdge() }func ( Edges) ( *Node) map[geo.Point][]*Edge { return .portEdges() }func ( *Node) ( *geo.Point, float64) bool {return .containsPoint(, )}func ( *Node) ( geo.Orientation) []geo.Point {return .portsByOrientation()}func ( *Node) () []geo.Point { return .centerPorts() }func ( *Node) ( *geo.Point) bool { return .isPointOnNode() }func ( *Node) ( *geo.Point) bool { return .isPointNear() }func ( *Node) (, *geo.Point) bool {return .isWithinBounds(, )}func ( *Node) ( *geo.Point) geo.Orientation {return .pointToPortOrientation()}func ( *Node) () map[geo.Point]geo.Point { return .mirroredPorts() }func ( *Node) ( *Node) map[geo.Point]bool {return .overlappingPorts()}func ( *Node) ( *Node, bool) float64 {return .distanceTo(, )}func ( Nodes) ( *Edge) bool { return .intersectsNode() }
![]() |
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. |