Documentation ¶
Index ¶
- type BubbleSort
- type BucketSort
- func NewBubbleSort(options ...C.Options) *BucketSort
- func NewBucketSort(options ...C.Options) *BucketSort
- func NewCountSort(options ...C.Options) *BucketSort
- func NewInsertSort(options ...C.Options) *BucketSort
- func NewMergeSort(options ...C.Options) *BucketSort
- func NewQuickSortByInsertOptimize(options ...C.Options) *BucketSort
- func NewQuickSortDuplex(options ...C.Options) *BucketSort
- func NewQuickSortNonRecursive(options ...C.Options) *BucketSort
- func NewQuickSortSimplex(options ...C.Options) *BucketSort
- func NewSelectSort(options ...C.Options) *BucketSort
- type CountSort
- type HeapSort
- type HeapSort2
- type InsertSort
- type MergeSort
- type QuickSortByInsertOptimize
- type QuickSortDuplex
- type QuickSortNonRecursive
- type QuickSortSimplex
- type SelectSort
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 (*CountSort) SortMethod ¶
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 (*HeapSort) BuildHeapDown ¶
顶堆
func (*HeapSort) GetAttribute ¶
func (*HeapSort) SortMethod ¶
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 (*HeapSort2) BuildHeapUp ¶
func (*HeapSort2) GetAttribute ¶
func (*HeapSort2) SortMethod ¶
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 (*MergeSort) SortMethod ¶
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)
Click to show internal directories.
Click to hide internal directories.