Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollapseLongPaths ¶
CollapseLongPaths will collapse all long chains in tree.
func CollapseLongPathsFromNode ¶
CollapseLongPathsFromNode will collapse current node into children as long as it has single child. Will set name of this node to joined path from roots. Will set size and heat to this child's size and heat. Expecting Name containing either single value for current node.
func SetNamesFromPaths ¶
SetNamesFromPaths will update each node to its path leaf as name.
Types ¶
type SumSizeImputer ¶
type SumSizeImputer struct {
EmptyLeafSize float64
}
SumSizeImputer will set sum of children into empty parents and fill children with contant.
func (SumSizeImputer) ImputeSize ¶
func (s SumSizeImputer) ImputeSize(ctx context.Context, t Tree)
func (SumSizeImputer) ImputeSizeNode ¶
func (s SumSizeImputer) ImputeSizeNode(ctx context.Context, t Tree, node string)
type WeightedHeatImputer ¶
type WeightedHeatImputer struct {
EmptyLeafHeat float64
}
WeightedHeatImputer will make color of parent to weighted sum of colors of its children.
func (WeightedHeatImputer) ImputeHeat ¶
func (s WeightedHeatImputer) ImputeHeat(ctx context.Context, t Tree)
func (WeightedHeatImputer) ImputeHeatNode ¶
func (s WeightedHeatImputer) ImputeHeatNode(ctx context.Context, t Tree, node string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.