Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombinationsExceed ¶
Types ¶
type Iterator ¶
type Iterator interface {
Next() *TreeVertex
}
type Tree ¶
type Tree struct {
Root *TreeVertex
}
type TreeVertex ¶
type TreeVertex struct { Id string Data interface{} Descendants []*TreeVertex Threshold int }
func NewTreeVertex ¶
func NewTreeVertex(id string, data interface{}, descendants ...*TreeVertex) *TreeVertex
func (*TreeVertex) AddDescendant ¶
func (v *TreeVertex) AddDescendant(u *TreeVertex) *TreeVertex
func (*TreeVertex) Clone ¶
func (v *TreeVertex) Clone() *TreeVertex
func (*TreeVertex) Exists ¶
func (v *TreeVertex) Exists(id string) bool
func (*TreeVertex) Find ¶
func (v *TreeVertex) Find(id string) *TreeVertex
func (*TreeVertex) IsLeaf ¶
func (v *TreeVertex) IsLeaf() bool
func (*TreeVertex) ToTree ¶
func (v *TreeVertex) ToTree() *Tree
type Vertex ¶
type Vertex struct { Id string Data interface{} // contains filtered or unexported fields }
func (*Vertex) AddNeighbor ¶
func (*Vertex) NeighborById ¶
Click to show internal directories.
Click to hide internal directories.