sms

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

README

SMS

Simple Merge Sorter

A simple and fast merge sorter for integer (int) values.
Value type can easily be changed to floating point numbers (float64) by changing just a couple of code lines.

Notes
Until a working type switch for generics appears in Go language, this library is not using generic types.
Let us hope, it happens in this life.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleMergeSorter

type SimpleMergeSorter struct {
	// contains filtered or unexported fields
}

SimpleMergeSorter is the simple merge sorter.

func New

func New(data ...[]ValueType) (sms *SimpleMergeSorter, err error)

New is a constructor of a simple merge sorter.

func (*SimpleMergeSorter) Sort

func (s *SimpleMergeSorter) Sort() (result []ValueType)

Sort sorts the data.

type ValueType

type ValueType = float64

ValueType is the type of the sorted data. If you change this, you will also need to make changes to the code. type ValueType = int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL