Documentation
¶
Index ¶
- type Config
- type IDNamePair
- type Node
- type ReachabilityPriorityQueue
- func (pq *ReachabilityPriorityQueue) HasNext() bool
- func (pq ReachabilityPriorityQueue) Len() int
- func (pq ReachabilityPriorityQueue) Less(i, j int) bool
- func (pq *ReachabilityPriorityQueue) Pop() interface{}
- func (pq *ReachabilityPriorityQueue) Push(x interface{})
- func (pq ReachabilityPriorityQueue) Swap(i, j int)
- type ServeableNode
- type TableGraph
- func (O *TableGraph) CopyOrganization() *TableGraph
- func (O *TableGraph) GetChildren(s graph.Node) []*Node
- func (O *TableGraph) GetParents(s graph.Node) []*Node
- func (O *TableGraph) GetRootNode() graph.Node
- func (O *TableGraph) MarshalDOT() ([]byte, error)
- func (O *TableGraph) SetRootName(name string)
- func (O *TableGraph) ToVisualizer(path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Gamma float64 // The model's gamma parameter, a penalty for a node having too many children
TerminationThreshold float64 // The threshold below which the learning algorithm stops
TerminationWindow int // The number of prior iterations to account for in terminating
MaxIters int // The node reachability below which we choose to delete a parent instead of adding a parent
}
Config for an organization
type IDNamePair ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a node in the organization graph.
func (*Node) Attributes ¶
Attributes for the DOT encoding. Implements encoding.Attributer.
type ReachabilityPriorityQueue ¶
type ReachabilityPriorityQueue []*Node
Use priority queue to get the least reachable nodes at a given level It implements the container/heap interface.
func (*ReachabilityPriorityQueue) HasNext ¶
func (pq *ReachabilityPriorityQueue) HasNext() bool
func (ReachabilityPriorityQueue) Len ¶
func (pq ReachabilityPriorityQueue) Len() int
func (ReachabilityPriorityQueue) Less ¶
func (pq ReachabilityPriorityQueue) Less(i, j int) bool
func (*ReachabilityPriorityQueue) Pop ¶
func (pq *ReachabilityPriorityQueue) Pop() interface{}
func (*ReachabilityPriorityQueue) Push ¶
func (pq *ReachabilityPriorityQueue) Push(x interface{})
func (ReachabilityPriorityQueue) Swap ¶
func (pq ReachabilityPriorityQueue) Swap(i, j int)
type ServeableNode ¶
type ServeableNode struct {
ID int64
NodeName string
Dataset string
ParentIDs []*IDNamePair
ChildIDs []*IDNamePair
}
ServeableNode a data structure containing node information for the frontend
func ToServeableNode ¶
func ToServeableNode(O *TableGraph, s graph.Node) *ServeableNode
ToServeableNode converts a node in the organization into a node that is serveable
type TableGraph ¶
type TableGraph struct {
*simple.DirectedGraph
// contains filtered or unexported fields
}
TableGraph the custom graph structure for an organization
func BuildInitialOrg ¶
buildInitialOrg builds the initial organization of the navigation graph.
The initial organization is a binary tree created by joining the most similar pairs of nodes under a parent node.
func BuildOrganization ¶
func (*TableGraph) CopyOrganization ¶
func (O *TableGraph) CopyOrganization() *TableGraph
Wrapper around GoNum's implementation
func (*TableGraph) GetChildren ¶
func (O *TableGraph) GetChildren(s graph.Node) []*Node
func (*TableGraph) GetParents ¶
func (O *TableGraph) GetParents(s graph.Node) []*Node
func (*TableGraph) GetRootNode ¶
func (O *TableGraph) GetRootNode() graph.Node
func (*TableGraph) MarshalDOT ¶
func (O *TableGraph) MarshalDOT() ([]byte, error)
func (*TableGraph) SetRootName ¶
func (O *TableGraph) SetRootName(name string)
func (*TableGraph) ToVisualizer ¶
func (O *TableGraph) ToVisualizer(path string)