Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sort ¶
func Sort[T any](cn *ComparisonNetwork, data []T, less func(i, j T) bool)
Types ¶
type ComparisonNetwork ¶
type ComparisonNetwork struct {
Comparators []*comparator.Comparator
}
func Parse ¶
func Parse(data string) (*ComparisonNetwork, error)
func (*ComparisonNetwork) IsSortingNetwork ¶
func (cn *ComparisonNetwork) IsSortingNetwork() bool
IsSortingNetwork uses the zero-one principle to determine if this comparison network is a sorting network
func (*ComparisonNetwork) MaxInput ¶
func (cn *ComparisonNetwork) MaxInput() int
func (*ComparisonNetwork) String ¶
func (cn *ComparisonNetwork) String() string
func (*ComparisonNetwork) Svg ¶
func (cn *ComparisonNetwork) Svg() string
Click to show internal directories.
Click to hide internal directories.