inner_sort

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BubbleSort

type BubbleSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

func (*BubbleSort) GetAttribute

func (m *BubbleSort) GetAttribute() *C.Attribute

func (*BubbleSort) SortMethod

func (m *BubbleSort) SortMethod(array []int)

func (*BubbleSort) Tags

func (m *BubbleSort) Tags() []string

type BucketSort

type BucketSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

func NewBubbleSort

func NewBubbleSort(options ...C.Options) *BucketSort

func NewBucketSort

func NewBucketSort(options ...C.Options) *BucketSort

func NewCountSort

func NewCountSort(options ...C.Options) *BucketSort

func NewInsertSort

func NewInsertSort(options ...C.Options) *BucketSort

func NewMergeSort

func NewMergeSort(options ...C.Options) *BucketSort

func NewQuickSortByInsertOptimize

func NewQuickSortByInsertOptimize(options ...C.Options) *BucketSort

func NewQuickSortDuplex

func NewQuickSortDuplex(options ...C.Options) *BucketSort

func NewQuickSortNonRecursive

func NewQuickSortNonRecursive(options ...C.Options) *BucketSort

func NewQuickSortSimplex

func NewQuickSortSimplex(options ...C.Options) *BucketSort

func NewSelectSort

func NewSelectSort(options ...C.Options) *BucketSort

func (*BucketSort) GetAttribute

func (m *BucketSort) GetAttribute() *C.Attribute

func (*BucketSort) SortMethod

func (m *BucketSort) SortMethod(array []int)

type CountSort

type CountSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

func (*CountSort) GetAttribute

func (m *CountSort) GetAttribute() *C.Attribute

func (*CountSort) SortMethod

func (m *CountSort) SortMethod(array []int)

type HeapSort

type HeapSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
	IsSmallHeap   bool // IsSmallHeap = true:表示开启小顶堆,默认大顶堆
	// contains filtered or unexported fields
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/26 00:01
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func NewHeapSort

func NewHeapSort(options ...C.Options) *HeapSort

func (*HeapSort) BuildHeapDown

func (m *HeapSort) BuildHeapDown(array interface{}, parent, border int)

顶堆

func (*HeapSort) GetAttribute

func (m *HeapSort) GetAttribute() *C.Attribute

func (*HeapSort) SortMethod

func (m *HeapSort) SortMethod(array []int)

type HeapSort2

type HeapSort2 struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
	IsSmallHeap   bool // Flag = true:表示开启小顶堆,默认大顶堆(false)
	// contains filtered or unexported fields
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/26 00:01
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func NewHeapSort2

func NewHeapSort2(options ...C.Options) *HeapSort2

func (*HeapSort2) BuildHeapUp

func (m *HeapSort2) BuildHeapUp(array interface{}, border int)

func (*HeapSort2) GetAttribute

func (m *HeapSort2) GetAttribute() *C.Attribute

func (*HeapSort2) SortMethod

func (m *HeapSort2) SortMethod(array []int)

type InsertSort

type InsertSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 21:21
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 插入排序 *

func (*InsertSort) GetAttribute

func (m *InsertSort) GetAttribute() *C.Attribute

func (*InsertSort) SortMethod

func (m *InsertSort) SortMethod(array []int)

type MergeSort

type MergeSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 21:21
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 归并排序 *

func (*MergeSort) GetAttribute

func (m *MergeSort) GetAttribute() *C.Attribute

func (*MergeSort) SortMethod

func (m *MergeSort) SortMethod(array []int)

type QuickSortByInsertOptimize

type QuickSortByInsertOptimize struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 23:57
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 经插入排序优化后的快排 *

func (*QuickSortByInsertOptimize) GetAttribute

func (m *QuickSortByInsertOptimize) GetAttribute() *C.Attribute

func (*QuickSortByInsertOptimize) SortMethod

func (m *QuickSortByInsertOptimize) SortMethod(array []int)

type QuickSortDuplex

type QuickSortDuplex struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 23:54
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 快速排序-双向快排 *

func (*QuickSortDuplex) GetAttribute

func (m *QuickSortDuplex) GetAttribute() *C.Attribute

func (*QuickSortDuplex) SortMethod

func (m *QuickSortDuplex) SortMethod(array []int)

type QuickSortNonRecursive

type QuickSortNonRecursive struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 23:59
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 无须递归的快速排序 - 使用栈实现 *

func (*QuickSortNonRecursive) GetAttribute

func (m *QuickSortNonRecursive) GetAttribute() *C.Attribute

func (*QuickSortNonRecursive) SortMethod

func (m *QuickSortNonRecursive) SortMethod(array []int)

type QuickSortSimplex

type QuickSortSimplex struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 23:54
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 快速排序-单向快排 *

func (*QuickSortSimplex) GetAttribute

func (m *QuickSortSimplex) GetAttribute() *C.Attribute

func (*QuickSortSimplex) SortMethod

func (m *QuickSortSimplex) SortMethod(array []int)

type SelectSort

type SelectSort struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/6/25 21:21
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*SelectSort) GetAttribute

func (m *SelectSort) GetAttribute() *C.Attribute

func (*SelectSort) SortMethod

func (m *SelectSort) SortMethod(array []int)

Jump to

Keyboard shortcuts

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