Documentation ¶
Index ¶
- Variables
- func BitonicSort(arr []int, frameGen FrameGen)
- func BogoSort(arr []int, frameGen FrameGen)
- func BubbleSort(arr []int, frameGen FrameGen)
- func CocktailSort(arr []int, frameGen FrameGen)
- func CombSort(arr []int, frameGen FrameGen)
- func CountingSort(arr []int, frameGen FrameGen)
- func CycleSort(arr []int, frameGen FrameGen)
- func GnomeSort(arr []int, frameGen FrameGen)
- func HeapSort(arr []int, frameGen FrameGen)
- func InsertionSort(arr []int, frameGen FrameGen)
- func MergeSort(arr []int, frameGen FrameGen)
- func OddEvenSort(arr []int, frameGen FrameGen)
- func PancakeSort(arr []int, frameGen FrameGen)
- func QuickSort(arr []int, frameGen FrameGen)
- func RadixSort(arr []int, frameGen FrameGen)
- func SelectionSort(arr []int, frameGen FrameGen)
- func ShellSort(arr []int, frameGen FrameGen)
- func SleepSort(arr []int, frameGen FrameGen)
- func StoogeSort(arr []int, frameGen FrameGen)
- func WriteGif(name string, g *gif.GIF)
- func WriteStdout(arr []int)
- type FrameGen
- type GifVisualizer
- type Sorter
- type Visualizer
Constants ¶
This section is empty.
Variables ¶
var Count int
var Fps int
var Max int
var Mode int
Functions ¶
func BitonicSort ¶ added in v0.13.0
BitonicSort is an implementation of https://en.wikipedia.org/wiki/Bitonic_sorter
func BogoSort ¶
BogoSort is an implementation of https://en.wikipedia.org/wiki/Bogosort
func BubbleSort ¶
BubbleSort is an implementation of https://en.wikipedia.org/wiki/Bubble_sort
func CocktailSort ¶
CocktailSort is an implementation of https://en.wikipedia.org/wiki/Cocktail_shaker_sort
func CombSort ¶
CombSort is an implementation of https://en.wikipedia.org/wiki/Comb_sort
func CountingSort ¶
CountingSort is an implementation of https://en.wikipedia.org/wiki/Counting_sort
func CycleSort ¶ added in v0.11.0
CycleSort is an implementation of https://en.wikipedia.org/wiki/Cycle_sort
func GnomeSort ¶
GnomeSort is an implementation of https://en.wikipedia.org/wiki/Gnome_sort
func HeapSort ¶ added in v0.10.0
HeapSort is an implementation of https://en.wikipedia.org/wiki/Heapsort
func InsertionSort ¶
InsertionSort is an implementation of https://en.wikipedia.org/wiki/Insertion_sort
func MergeSort ¶ added in v0.9.1
MergeSort is an implementation of https://en.wikipedia.org/wiki/Merge_sort
func OddEvenSort ¶
OddEvenSort is an implementation of https://en.wikipedia.org/wiki/Odd–even_sort
func PancakeSort ¶ added in v0.12.0
PancakeSort is an implementation of https://en.wikipedia.org/wiki/Pancake_sorting
func QuickSort ¶ added in v0.9.1
QuickSort is an implementation of https://en.wikipedia.org/wiki/Quicksort
func RadixSort ¶ added in v0.13.0
RadixSort is an implementation of https://en.wikipedia.org/wiki/Radix_sort
func SelectionSort ¶
SelectionSort is an implementation of https://en.wikipedia.org/wiki/Selection_sort
func ShellSort ¶ added in v0.10.0
ShellSort is an implementation of https://en.wikipedia.org/wiki/Shellsort
func StoogeSort ¶
StoogeSort is an implementation of https://en.wikipedia.org/wiki/Stooge_sort
func WriteStdout ¶
func WriteStdout(arr []int)
WriteStdout writes the array to stdout as an ASCII visualization
Types ¶
type GifVisualizer ¶
type GifVisualizer struct {
// contains filtered or unexported fields
}
GifVisualizer is a visualizer that outputs a GIF
func (*GifVisualizer) AddFrame ¶
func (gv *GifVisualizer) AddFrame(arr []int)
AddFrame adds a frame to the GIF
func (*GifVisualizer) Complete ¶
func (gv *GifVisualizer) Complete()
Complete writes the GIF to disk
func (*GifVisualizer) Setup ¶
func (gv *GifVisualizer) Setup(name string)
Setup initializes the GIF visualizer
type Visualizer ¶
Visualizer interface for visualizing sorting steps