gonum: gonum.org/v1/gonum/graph/internal/ordered Index | Files

package ordered

import "gonum.org/v1/gonum/graph/internal/ordered"

Package ordered provides common sort ordering types.

Index

Package Files

doc.go sort.go

func Reverse Uses

func Reverse(nodes []graph.Node)

Reverse reverses the order of nodes.

type ByID Uses

type ByID []graph.Node

ByID implements the sort.Interface sorting a slice of graph.Node by ID.

func (ByID) Len Uses

func (n ByID) Len() int

func (ByID) Less Uses

func (n ByID) Less(i, j int) bool

func (ByID) Swap Uses

func (n ByID) Swap(i, j int)

type BySliceIDs Uses

type BySliceIDs [][]graph.Node

BySliceIDs implements the sort.Interface sorting a slice of []graph.Node lexically by the IDs of the []graph.Node.

func (BySliceIDs) Len Uses

func (c BySliceIDs) Len() int

func (BySliceIDs) Less Uses

func (c BySliceIDs) Less(i, j int) bool

func (BySliceIDs) Swap Uses

func (c BySliceIDs) Swap(i, j int)

type BySliceValues Uses

type BySliceValues [][]int64

BySliceValues implements the sort.Interface sorting a slice of []int64 lexically by the values of the []int64.

func (BySliceValues) Len Uses

func (c BySliceValues) Len() int

func (BySliceValues) Less Uses

func (c BySliceValues) Less(i, j int) bool

func (BySliceValues) Swap Uses

func (c BySliceValues) Swap(i, j int)

type Int64s Uses

type Int64s []int64

Int64s implements the sort.Interface sorting a slice of int64.

func (Int64s) Len Uses

func (s Int64s) Len() int

func (Int64s) Less Uses

func (s Int64s) Less(i, j int) bool

func (Int64s) Swap Uses

func (s Int64s) Swap(i, j int)

type LinesByIDs Uses

type LinesByIDs []graph.Line

LinesByIDs implements the sort.Interface sorting a slice of graph.LinesByIDs lexically by the From IDs, then by the To IDs, finally by the Line IDs.

func (LinesByIDs) Len Uses

func (n LinesByIDs) Len() int

func (LinesByIDs) Less Uses

func (n LinesByIDs) Less(i, j int) bool

func (LinesByIDs) Swap Uses

func (n LinesByIDs) Swap(i, j int)

Package ordered imports 1 packages (graph) and is imported by 9 packages. Updated 2019-01-30. Refresh now. Tools for package owners.