Documentation ¶
Index ¶
- func Choose(_a interface{}, chooser interface{})
- func Dijkstra(g Graph, src []int, dst []int) (float64, []int)
- func Map2(_in interface{}, _out interface{}, mapper interface{})
- func ReachableDestinations(g Graph, src []int, dst []int) []int
- func ReachableWithinBounds(g Graph, src []int, min, max float64) []int
- func ReachableWithinLimit(g Graph, src []int, limit float64) []int
- func TopoSort(dag DiGraph) []int
- type Chooser
- type DiGraph
- type Graph
- type Mapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Choose ¶
func Choose(_a interface{}, chooser interface{})
// Given a pointer to a slice and a Chooser, type as the input // slice that contains only those elements of the input slice for which // choose() returns true. The elements of the returned slice will be in the // same order that they were in in the input slice.
func ReachableDestinations ¶
Returns a list of all elements in dst that can be reached by some element in src.
func ReachableWithinBounds ¶
Returns the list of vertices whose shortest path from the sources are of length that satisfies min <= length <= max
func ReachableWithinLimit ¶
Returns the list of vertices that can be reached from the vertices in src with total path weight <= limit.
Types ¶
Click to show internal directories.
Click to hide internal directories.