sms

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 2 Imported by: 0

README

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.

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