package order

import "gonum.org/v1/gonum/internal/order"

Package order provides common sorting functions.

Index

Functions

func ByID

func ByID[S ~[]E, E graph.Node](n S)

ByID sorts a slice of graph.Node by ID.

func BySliceIDs

func BySliceIDs(c [][]graph.Node)

BySliceIDs sorts a slice of []graph.Node lexically by the IDs of the []graph.Node.

func BySliceValues

func BySliceValues[S ~[]E, E cmp.Ordered](c []S)

BySliceValues sorts a slice of []cmp.Ordered lexically by the values of the []cmp.Ordered.

func LinesByIDs

func LinesByIDs(n []graph.Line)

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

Source Files

doc.go order.go

Version
v0.15.1 (latest)
Published
Aug 16, 2024
Platform
linux/amd64
Imports
4 packages
Last checked
1 day ago

Tools for package owners.