Documentation

Overview

    Package ordered provides common sort ordering types.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Reverse

    func Reverse(nodes []graph.Node)

      Reverse reverses the order of nodes.

      Types

      type ByID

      type ByID []graph.Node

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

        func (ByID) Len

        func (n ByID) Len() int

        func (ByID) Less

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

        func (ByID) Swap

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

        type BySliceIDs

        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

          func (c BySliceIDs) Len() int

          func (BySliceIDs) Less

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

          func (BySliceIDs) Swap

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

          type BySliceValues

          type BySliceValues [][]int64

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

            func (BySliceValues) Len

            func (c BySliceValues) Len() int

            func (BySliceValues) Less

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

            func (BySliceValues) Swap

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

            type Int64s

            type Int64s []int64

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

              func (Int64s) Len

              func (s Int64s) Len() int

              func (Int64s) Less

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

              func (Int64s) Swap

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

              type LinesByIDs

              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

                func (n LinesByIDs) Len() int

                func (LinesByIDs) Less

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

                func (LinesByIDs) Swap

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

                Source Files