internal

package
v0.0.0-...-ff887e9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSorter

type FileSorter struct {
	FileData map[string]uint64
	Lines    []string
}

func ProcessFileToSort

func ProcessFileToSort(file *os.File) (*FileSorter, error)

func (*FileSorter) SortByHeap

func (f *FileSorter) SortByHeap(lines []string) []string

func (*FileSorter) SortByMerge

func (f *FileSorter) SortByMerge(lines []string) []string

func (*FileSorter) SortByQuick

func (f *FileSorter) SortByQuick(lines []string) []string

func (*FileSorter) SortByRadix

func (f *FileSorter) SortByRadix(lines []string) []string

func (*FileSorter) SortByRandom

func (f *FileSorter) SortByRandom(lines []string) []string

func (*FileSorter) SortFileByLines

func (f *FileSorter) SortFileByLines(algorithm SortAlgorithm) ([]string, error)

func (*FileSorter) SortFileByUniqueLines

func (f *FileSorter) SortFileByUniqueLines(algorithm SortAlgorithm) ([]string, error)

type SortAlgorithm

type SortAlgorithm string
const (
	RadixSort  SortAlgorithm = "radix"
	MergeSort  SortAlgorithm = "merge"
	QuickSort  SortAlgorithm = "quick"
	HeapSort   SortAlgorithm = "heap"
	RandomSort SortAlgorithm = "random"
)

Jump to

Keyboard shortcuts

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