Documentation ¶
Index ¶
- func Float64CompFunc(v1 Value, v2 Value) int
- func FloatHeapSort(data []Value)
- func HeapSort(data []Value, cmf CompFunc)
- func IMin(v1 int, v2 int) int
- func IndexArray1D(data []float64, size []int) []float64
- func IndexArray2D(data []float64, size []int) [][]float64
- func IndexArray3D(data []float64, size []int) [][][]float64
- func IndexArray4D(data []float64, size []int) [][][][]float64
- func IndexArray5D(data []float64, size []int) [][][][][]float64
- func IndexBArray1D(data []byte, size []int) []byte
- func IndexBArray2D(data []byte, size []int) [][]byte
- func IndexBArray3D(data []byte, size []int) [][][]byte
- func IndexBArray4D(data []byte, size []int) [][][][]byte
- func IndexBArray5D(data []byte, size []int) [][][][][]byte
- func IndexIArray1D(data []int, size []int) []int
- func IndexIArray2D(data []int, size []int) [][]int
- func IndexIArray3D(data []int, size []int) [][][]int
- func IndexIArray4D(data []int, size []int) [][][][]int
- func IndexIArray5D(data []int, size []int) [][][][][]int
- func IntCompFunc(v1 Value, v2 Value) int
- func IntHeapSort(data []Value)
- func LocToInd(size []int, loc []int) int
- func TotalSize(size []int) int
- type AvlNode
- func (root *AvlNode) Add(v Value) (new_root *AvlNode, new_deeper int)
- func (root *AvlNode) BalanceLeft() *AvlNode
- func (root *AvlNode) BalanceRight() *AvlNode
- func (root *AvlNode) FindLeftNeighbour() *AvlNode
- func (root *AvlNode) FindRightNeighbour() *AvlNode
- func (root *AvlNode) GetHeight() int
- func (root *AvlNode) Print(level int)
- func (root *AvlNode) Remove(v Value) (new_root *AvlNode, junk *AvlNode)
- func (root *AvlNode) RemoveLeftMostDescendant() (new_root *AvlNode, junk *AvlNode)
- func (root *AvlNode) RestoreLeftBalance(oldbf int) *AvlNode
- func (root *AvlNode) RestoreRightBalance(oldbf int) *AvlNode
- func (root *AvlNode) Search(v Value) (dir []int)
- type AvlTree
- type Chain
- type CompFunc
- type DirGraph
- func (dg *DirGraph) AddEdge(i1, i2 int)
- func (dg *DirGraph) AddNode(inode int)
- func (dg *DirGraph) Expand(size int)
- func (dg *DirGraph) GetAllEdge() [][]int
- func (dg *DirGraph) GetAllNode() []int
- func (dg *DirGraph) GetInEdge(inode int) []int
- func (dg *DirGraph) GetOutEdge(inode int) []int
- func (dg *DirGraph) GetSize() int
- func (dg *DirGraph) GetUnuseIndex() int
- func (dg *DirGraph) PrintRootLeaf(fout io.Writer)
- func (dg *DirGraph) RemoveEdge(i1, i2 int)
- func (dg *DirGraph) RemoveNode(inode int)
- func (dg *DirGraph) Save(fout io.Writer)
- type Hash
- func (hash *Hash) AddData(key Value, value Value)
- func (hash *Hash) Clear()
- func (hash *Hash) GotoChain(ind []int) *Chain
- func (hash *Hash) InitSubHash(ind []int, n int)
- func (hash *Hash) RemoveData(key Value)
- func (hash *Hash) Search(key Value) (value Value)
- func (hash *Hash) SearchChain(key Value) *Chain
- func (hash *Hash) SearchNode(key Value) (last *Node, pcc *Chain, result *Node)
- type Heap
- type Key
- type KeyToIndexFunc
- type LList
- func (ll *LList) Flush()
- func (ll *LList) Get(ind int) (value *Value)
- func (ll *LList) GetFirst() (value *Value)
- func (ll *LList) GetLast() (value *Value)
- func (ll *LList) GetN() int
- func (ll *LList) Pop() (value Value)
- func (ll *LList) PopFirst() (value Value)
- func (ll *LList) Push(value Value) int
- type LListD
- func (ll *LListD) Flush()
- func (ll *LListD) Get(ind int) (value *Value)
- func (ll *LListD) GetFirst() (value *Value)
- func (ll *LListD) GetLast() (value *Value)
- func (ll *LListD) GetN() int
- func (ll *LListD) Pop() (value Value)
- func (ll *LListD) PopFirst() (value Value)
- func (ll *LListD) Push(value Value)
- type LinkMat
- func (lm *LinkMat) Clear()
- func (lm *LinkMat) ClearCol(col int)
- func (lm *LinkMat) ClearRow(row int)
- func (lm *LinkMat) ColTraverseForward()
- func (lm *LinkMat) ColTraverseStart(col int)
- func (lm *LinkMat) Expand(size int)
- func (lm *LinkMat) GetAllLabel() [][]int
- func (lm *LinkMat) GetCol(col int) []int
- func (lm *LinkMat) GetColNum(col int) int
- func (lm *LinkMat) GetColTraverseLabel() (row, col int)
- func (lm *LinkMat) GetLabel(row, col int) bool
- func (lm *LinkMat) GetNum() int
- func (lm *LinkMat) GetRow(row int) []int
- func (lm *LinkMat) GetRowNum(row int) int
- func (lm *LinkMat) GetRowTraverseLabel() (row, col int)
- func (lm *LinkMat) GetSize() int
- func (lm *LinkMat) GetTraverseLabel() (row, col int)
- func (lm *LinkMat) RowTraverseForward()
- func (lm *LinkMat) RowTraverseStart(row int)
- func (lm *LinkMat) Save(fout io.Writer)
- func (lm *LinkMat) Set(row int, col int)
- func (lm *LinkMat) TraverseForward()
- func (lm *LinkMat) TraverseStart()
- func (lm *LinkMat) UnSet(row int, col int)
- type LinkSet
- func (ls *LinkSet) Clear()
- func (ls *LinkSet) DeleteCurrentTraverse()
- func (ls *LinkSet) Expand(size int)
- func (ls *LinkSet) GetAllLabel() []int
- func (ls *LinkSet) GetFirstLabel() int
- func (ls *LinkSet) GetLabel(ind int) bool
- func (ls *LinkSet) GetNum() int
- func (ls *LinkSet) GetSize() int
- func (ls *LinkSet) GetTraverseLabel() int
- func (ls *LinkSet) Save(fout io.Writer)
- func (ls *LinkSet) Set(ind int)
- func (ls *LinkSet) TraverseBackward()
- func (ls *LinkSet) TraverseEnd()
- func (ls *LinkSet) TraverseForward()
- func (ls *LinkSet) TraverseStart()
- func (ls *LinkSet) UnSet(ind int)
- type Node
- type PQueue
- type PerfGraph
- type SAvlNode
- type SAvlTree
- func (tr *SAvlTree) Add(v Value)
- func (tree *SAvlTree) AddNode(root int, v Value) (new_root, new_deeper int)
- func (tr *SAvlTree) BalanceLeft(root int) int
- func (tr *SAvlTree) BalanceRight(root int) int
- func (tr *SAvlTree) FindLeftNeighbour(root int) int
- func (tr *SAvlTree) FindRightNeighbour(root int) int
- func (tr *SAvlTree) FollowPath(path []int) int
- func (tr *SAvlTree) GetHeight() int
- func (tr *SAvlTree) GetHeightNode(root int) int
- func (tree *SAvlTree) InitSAvlNode(v Value) int
- func (tr *SAvlTree) Print()
- func (tr *SAvlTree) PrintNode(root, level int)
- func (tr *SAvlTree) Remove(v Value)
- func (tr *SAvlTree) RemoveLeftMostDescendant(root int) (new_root, junk int)
- func (tr *SAvlTree) RemoveNode(root int, v Value) (new_root, junk int)
- func (tr *SAvlTree) RestoreLeftBalance(root int, oldbf int) int
- func (tr *SAvlTree) RestoreRightBalance(root int, oldbf int) int
- func (tr *SAvlTree) Search(v Value, dir []int) int
- func (tr *SAvlTree) SearchNode(root int, v Value, dir []int) int
- func (tr *SAvlTree) SearchRange(v Value, work_path []int) (vc Value, vl Value, vr Value)
- type Set
- func (sres *Set) Co(s1 *Set)
- func (oset *Set) CopyFrom(sset *Set) (is_err bool)
- func (sres *Set) Diff(s1 *Set, s2 *Set)
- func (s1 *Set) Empty()
- func (s1 *Set) Full()
- func (set *Set) GetAllLabel() (labels []int)
- func (set *Set) GetLabel(ind int) bool
- func (set *Set) GetNLabel() int
- func (set *Set) GetSize() int
- func (sres *Set) Inter(s1 *Set, s2 *Set)
- func (set *Set) IsEmpty() bool
- func (set *Set) Save(fsav io.Writer)
- func (set *Set) SetLabel(ind int, label bool)
- func (sres *Set) Union(s1 *Set, s2 *Set)
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64CompFunc ¶
func FloatHeapSort ¶
func FloatHeapSort(data []Value)
func IndexArray1D ¶ added in v1.2.0
func IndexArray2D ¶ added in v1.2.0
func IndexArray3D ¶ added in v1.2.0
func IndexArray4D ¶ added in v1.2.0
func IndexArray5D ¶ added in v1.2.0
func IndexBArray1D ¶ added in v1.3.0
func IndexBArray2D ¶ added in v1.3.0
func IndexBArray3D ¶ added in v1.3.0
func IndexBArray4D ¶ added in v1.3.0
func IndexBArray5D ¶ added in v1.3.0
func IndexIArray1D ¶ added in v1.3.0
func IndexIArray2D ¶ added in v1.3.0
func IndexIArray3D ¶ added in v1.3.0
func IndexIArray4D ¶ added in v1.3.0
func IndexIArray5D ¶ added in v1.3.0
func IntCompFunc ¶
func IntHeapSort ¶
func IntHeapSort(data []Value)
Types ¶
type AvlNode ¶
type AvlNode struct {
// contains filtered or unexported fields
}
func InitAvlNode ¶
func (*AvlNode) BalanceLeft ¶
func (*AvlNode) BalanceRight ¶
func (*AvlNode) FindLeftNeighbour ¶ added in v1.2.0
func (*AvlNode) FindRightNeighbour ¶ added in v1.2.0
func (*AvlNode) RemoveLeftMostDescendant ¶
func (*AvlNode) RestoreLeftBalance ¶
func (*AvlNode) RestoreRightBalance ¶
type AvlTree ¶
type AvlTree struct {
// contains filtered or unexported fields
}
func InitAvlTree ¶
func InitFloatAvlTree ¶
func InitFloatAvlTree() *AvlTree
func InitIntAvlTree ¶
func InitIntAvlTree() *AvlTree
func (*AvlTree) FollowPath ¶ added in v1.2.0
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
* Hash 非叶节点结构, 若其子节点为叶节点, 则 len(sublist) = 0,
- head 指向首个子节点, tail 指向最后一个子节点.
- 若其子节点为非叶节点, 则 head = tail = nil, sublist 指向子节点数组,
- n 为子节点个数.
type DirGraph ¶ added in v1.3.0
type DirGraph struct { Node *LinkSet Edge *LinkMat Leaf *LinkSet Root *LinkSet // contains filtered or unexported fields }
func InitDirGraph ¶ added in v1.3.0
func LoadDirGraph ¶ added in v1.3.0
func (*DirGraph) GetAllEdge ¶ added in v1.4.0
func (*DirGraph) GetAllNode ¶ added in v1.4.0
func (*DirGraph) GetOutEdge ¶ added in v1.4.0
func (*DirGraph) GetUnuseIndex ¶ added in v1.3.0
func (*DirGraph) PrintRootLeaf ¶ added in v1.4.0
func (*DirGraph) RemoveEdge ¶ added in v1.3.0
func (*DirGraph) RemoveNode ¶ added in v1.3.0
type Hash ¶
type Hash struct {
// contains filtered or unexported fields
}
* Hash 结构
func InitTreeHash ¶
func InitTreeHash(n []int, ktoi KeyToIndexFunc, comp CompFunc) *Hash
func (*Hash) AddData ¶
* 向 hash 中增加一个叶节点.
- \param hash 待增加hash
- \param key 增加节点的 key
- \param value 增加节点的 value
func (*Hash) InitSubHash ¶
func (*Hash) RemoveData ¶
* 删除 hash 中以 key 为索引的节点
- \param hash 待删除节点所在的 hash
- \param key 待删除节点的索引 (key)
func (*Hash) Search ¶
* 核心函数, 利用 Hash 完成查找,
- \param hash 已经建立好的 Hash
- \param key 待查找的 key
- \param value 返回查找得到的 value (nil: 没找到)
type Heap ¶
type Heap struct {
// contains filtered or unexported fields
}
func InitFloatHeap ¶
func InitFloatHeap() *Heap
func InitIntHeap ¶
func InitIntHeap() *Heap
type KeyToIndexFunc ¶
type LListD ¶ added in v1.2.0
type LListD []Value
func InitLListD ¶ added in v1.2.0
func InitLListD() *LListD
type LinkMat ¶ added in v1.2.0
type LinkMat struct {
// contains filtered or unexported fields
}
func InitLinkMat ¶ added in v1.2.0
func InverseLinkMat ¶ added in v1.3.0
func LoadLinkMat ¶ added in v1.3.0
func (*LinkMat) ColTraverseForward ¶ added in v1.2.0
func (lm *LinkMat) ColTraverseForward()
func (*LinkMat) ColTraverseStart ¶ added in v1.2.0
func (*LinkMat) GetAllLabel ¶ added in v1.4.0
func (*LinkMat) GetColTraverseLabel ¶ added in v1.2.0
row = -1 if traverse to tail
func (*LinkMat) GetRowTraverseLabel ¶ added in v1.2.0
col = -1 if traverse to tail
func (*LinkMat) GetTraverseLabel ¶ added in v1.2.0
return -1, -1 if traverse to tail
func (*LinkMat) RowTraverseForward ¶ added in v1.2.0
func (lm *LinkMat) RowTraverseForward()
func (*LinkMat) RowTraverseStart ¶ added in v1.2.0
func (*LinkMat) TraverseForward ¶ added in v1.2.0
func (lm *LinkMat) TraverseForward()
func (*LinkMat) TraverseStart ¶ added in v1.2.0
func (lm *LinkMat) TraverseStart()
type LinkSet ¶ added in v1.2.0
type LinkSet struct {
// contains filtered or unexported fields
}
func InitFullLinkSet ¶ added in v1.4.0
func InitLinkSet ¶ added in v1.2.0
func InverseLinkSet ¶ added in v1.3.0
func LoadLinkSet ¶ added in v1.3.0
func (*LinkSet) DeleteCurrentTraverse ¶ added in v1.4.0
func (ls *LinkSet) DeleteCurrentTraverse()
func (*LinkSet) GetAllLabel ¶ added in v1.4.0
func (*LinkSet) GetFirstLabel ¶ added in v1.4.0
func (*LinkSet) GetTraverseLabel ¶ added in v1.2.0
return -1 if traverse to tail
func (*LinkSet) TraverseBackward ¶ added in v1.2.0
func (ls *LinkSet) TraverseBackward()
func (*LinkSet) TraverseEnd ¶ added in v1.2.0
func (ls *LinkSet) TraverseEnd()
func (*LinkSet) TraverseForward ¶ added in v1.2.0
func (ls *LinkSet) TraverseForward()
func (*LinkSet) TraverseStart ¶ added in v1.2.0
func (ls *LinkSet) TraverseStart()
type PerfGraph ¶ added in v1.4.0
type PerfGraph struct {
// contains filtered or unexported fields
}
func InitPerfGraph ¶ added in v1.4.0
func LoadPerfGraph ¶ added in v1.4.0
func (*PerfGraph) CalNodeTimeRange ¶ added in v1.4.0
func (pg *PerfGraph) CalNodeTimeRange()
type SAvlTree ¶ added in v1.4.0
type SAvlTree struct {
// contains filtered or unexported fields
}
func InitFloatSAvlTree ¶ added in v1.4.0
func InitIntSAvlTree ¶ added in v1.4.0
func InitSAvlTree ¶ added in v1.4.0
func (*SAvlTree) BalanceLeft ¶ added in v1.4.0
func (*SAvlTree) BalanceRight ¶ added in v1.4.0
func (*SAvlTree) FindLeftNeighbour ¶ added in v1.4.0
func (*SAvlTree) FindRightNeighbour ¶ added in v1.4.0
func (*SAvlTree) FollowPath ¶ added in v1.4.0
func (*SAvlTree) GetHeightNode ¶ added in v1.4.0
func (*SAvlTree) InitSAvlNode ¶ added in v1.4.0
func (*SAvlTree) RemoveLeftMostDescendant ¶ added in v1.4.0
func (*SAvlTree) RemoveNode ¶ added in v1.4.0
func (*SAvlTree) RestoreLeftBalance ¶ added in v1.4.0
func (*SAvlTree) RestoreRightBalance ¶ added in v1.4.0
func (*SAvlTree) SearchNode ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.