Documentation ¶
Index ¶
- Constants
- Variables
- func NewBinaryNode(tree *Tree, segments []*Segment, dimName interface{}, decreasePercent float64, ...) (*BinaryNode, []*Segment, []*Segment, []*Segment)
- func NewHashNode(tree *Tree, segments []*Segment, dimName interface{}, decreasePercent float64, ...) (*HashNode, []*Segment, map[Measure][]*Segment)
- type BinaryNode
- type ConjunctionDimDiscreteNode
- type ConjunctionDimNode
- type ConjunctionDimRealNode
- type ConjunctionNode
- type DimType
- type DimTypes
- type HashNode
- type Interval
- type Intervals
- type LeafNode
- type Measure
- type MeasureFloat
- type MeasureString
- type MeasureTime
- type Measures
- type Point
- type Rect
- type Segment
- type Tree
- func (tree *Tree) Add(rect Rect, data interface{}) error
- func (tree *Tree) Build()
- func (tree *Tree) Dumps() string
- func (tree *Tree) Insert(rect Rect, data interface{}) error
- func (tree *Tree) Remove(data interface{})
- func (tree *Tree) Search(p Point) []interface{}
- func (tree *Tree) SearchRect(r Rect) ([]interface{}, error)
- type TreeNode
- type TreeOptions
Constants ¶
View Source
const DefaultBranchDecreasePercentMin = 0.1
View Source
const DefaultLeafDataMax = 4
View Source
const DefaultTreeLevelMax = 16
Variables ¶
View Source
var DimTypeDiscrete = DimType{Type: 0}
View Source
var DimTypeReal = DimType{Type: 1}
Functions ¶
func NewBinaryNode ¶
Types ¶
type BinaryNode ¶
type BinaryNode struct { TreeNode Tree *Tree DimName interface{} Level int DecreasePercent float64 Mid Measure Left TreeNode Right TreeNode Pass TreeNode }
func (*BinaryNode) Dumps ¶
func (node *BinaryNode) Dumps(prefix string) string
func (*BinaryNode) Insert ¶
func (node *BinaryNode) Insert(seg *Segment) error
func (*BinaryNode) Search ¶
func (node *BinaryNode) Search(p Point) []interface{}
func (*BinaryNode) SearchRect ¶
func (node *BinaryNode) SearchRect(r Rect) []interface{}
type ConjunctionDimDiscreteNode ¶
type ConjunctionDimDiscreteNode struct { ConjunctionNode // contains filtered or unexported fields }
func NewDiscreteConjunctionNode ¶
func NewDiscreteConjunctionNode(segments []*Segment, dimName interface{}) *ConjunctionDimDiscreteNode
func (*ConjunctionDimDiscreteNode) MaxInvertNode ¶
func (node *ConjunctionDimDiscreteNode) MaxInvertNode() int
func (*ConjunctionDimDiscreteNode) Search ¶
func (node *ConjunctionDimDiscreteNode) Search(measure Measure) []int
func (*ConjunctionDimDiscreteNode) SearchRect ¶
func (node *ConjunctionDimDiscreteNode) SearchRect(scatters interface{}) []int
type ConjunctionDimNode ¶
type ConjunctionDimRealNode ¶
type ConjunctionDimRealNode struct { ConjunctionDimNode // contains filtered or unexported fields }
func NewConjunctionRealNode ¶
func NewConjunctionRealNode(segments []*Segment, dimName interface{}) *ConjunctionDimRealNode
func (*ConjunctionDimRealNode) MaxInvertNode ¶
func (dimNode *ConjunctionDimRealNode) MaxInvertNode() int
func (*ConjunctionDimRealNode) Search ¶
func (dimNode *ConjunctionDimRealNode) Search(measure Measure) []int
func (*ConjunctionDimRealNode) SearchRect ¶
func (dimNode *ConjunctionDimRealNode) SearchRect(measure interface{}) []int
type ConjunctionNode ¶
type ConjunctionNode struct { TreeNode Tree *Tree DimName interface{} Level int DecreasePercent float64 // contains filtered or unexported fields }
func NewConjunctionNode ¶
func NewConjunctionNode(tree *Tree, segments []*Segment, dimName interface{}, decreasePercent float64, level int, ) *ConjunctionNode
func (*ConjunctionNode) Dumps ¶
func (node *ConjunctionNode) Dumps(prefix string) string
func (*ConjunctionNode) Insert ¶
func (node *ConjunctionNode) Insert(seg *Segment) error
func (*ConjunctionNode) MaxInvertNodeNum ¶
func (node *ConjunctionNode) MaxInvertNodeNum() int
func (*ConjunctionNode) Search ¶
func (node *ConjunctionNode) Search(p Point) []interface{}
func (*ConjunctionNode) SearchRect ¶
func (node *ConjunctionNode) SearchRect(r Rect) []interface{}
type HashNode ¶
type HashNode struct { TreeNode Tree *Tree DimName interface{} Level int DecreasePercent float64 // contains filtered or unexported fields }
func (*HashNode) SearchRect ¶
type LeafNode ¶
func (*LeafNode) SearchRect ¶
type MeasureFloat ¶
type MeasureFloat float64
func (MeasureFloat) Bigger ¶
func (a MeasureFloat) Bigger(b interface{}) bool
func (MeasureFloat) BiggerOrEqual ¶
func (a MeasureFloat) BiggerOrEqual(b interface{}) bool
func (MeasureFloat) Equal ¶
func (a MeasureFloat) Equal(b interface{}) bool
func (MeasureFloat) Smaller ¶
func (a MeasureFloat) Smaller(b interface{}) bool
func (MeasureFloat) SmallerOrEqual ¶
func (a MeasureFloat) SmallerOrEqual(b interface{}) bool
type MeasureString ¶
type MeasureString string
func (MeasureString) Bigger ¶
func (a MeasureString) Bigger(b interface{}) bool
func (MeasureString) BiggerOrEqual ¶
func (a MeasureString) BiggerOrEqual(b interface{}) bool
func (MeasureString) Equal ¶
func (a MeasureString) Equal(b interface{}) bool
func (MeasureString) Smaller ¶
func (a MeasureString) Smaller(b interface{}) bool
func (MeasureString) SmallerOrEqual ¶
func (a MeasureString) SmallerOrEqual(b interface{}) bool
type MeasureTime ¶
func (MeasureTime) Bigger ¶
func (f MeasureTime) Bigger(b interface{}) bool
func (MeasureTime) BiggerOrEqual ¶
func (f MeasureTime) BiggerOrEqual(b interface{}) bool
func (MeasureTime) Equal ¶
func (f MeasureTime) Equal(b interface{}) bool
func (MeasureTime) Smaller ¶
func (f MeasureTime) Smaller(b interface{}) bool
func (MeasureTime) SmallerOrEqual ¶
func (f MeasureTime) SmallerOrEqual(b interface{}) bool
type Segment ¶
func MergeSegments ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func NewTree ¶
func NewTree(dimTypes map[interface{}]DimType, opts *TreeOptions) *Tree
func (*Tree) SearchRect ¶
Click to show internal directories.
Click to hide internal directories.