Divooka Reference

Weed Trees

11 nodes

On this page 11

Add

Function

Graph-friendly numeric longest-tree addition.

Signature
Add -> Cad Tree of Number
    left: Cad Tree of Number
    right: Cad Tree of Number
CadTree<double> Add(CadTree<double> left, CadTree<double> right)

Parameters

nametypedefaultdescription
leftCad Tree of Number—
rightCad Tree of Number—

Returns

resultCad Tree of Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Create

Function

Creates a tree in numeric lexicographic path order, concatenating duplicate branches in input order.

Signature
Create -> Cad Tree of T
    paths: Integer Array Array
    branches: T Array Array
CadTree<T> Create(int[][] paths, T[][] branches)

Parameters

nametypedefaultdescription
pathsInteger Array Array—
branchesT Array Array—

Returns

resultCad Tree of T
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Flatten Numbers

Function

Graph-friendly numeric flattening into {0}.

Signature
FlattenNumbers(tree: Cad Tree of Number) -> Cad Tree of Number
CadTree<double> FlattenNumbers(CadTree<double> tree)

Parameters

nametypedefaultdescription
treeCad Tree of Number—

Returns

resultCad Tree of Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Flip Matrix

Function

Transposes a rectangular tree: item indices become branches; ragged input is rejected instead of inventing nulls.

Signature
FlipMatrix(tree: Cad Tree of T) -> Cad Tree of T
CadTree<T> FlipMatrix(CadTree<T> tree)

Parameters

nametypedefaultdescription
treeCad Tree of T—

Returns

resultCad Tree of T
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Flip Numbers

Function

Graph-friendly rectangular numeric transpose.

Signature
FlipNumbers(tree: Cad Tree of Number) -> Cad Tree of Number
CadTree<double> FlipNumbers(CadTree<double> tree)

Parameters

nametypedefaultdescription
treeCad Tree of Number—

Returns

resultCad Tree of Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Graft Numbers

Function

Graph-friendly numeric graft, appending the item index to each source path.

Signature
GraftNumbers(tree: Cad Tree of Number) -> Cad Tree of Number
CadTree<double> GraftNumbers(CadTree<double> tree)

Parameters

nametypedefaultdescription
treeCad Tree of Number—

Returns

resultCad Tree of Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Match

Function

Matches two item-access trees using longest branches and longest lists. The deeper tree supplies output paths; depth ties favor the left input.

Signature
Match -> Cad Tree of TResult
    left: Cad Tree of TLeft
    right: Cad Tree of TRight
    combine: Func<TLeft, TRight, TResult>
CadTree<TResult> Match(
    CadTree<TLeft> left,
    CadTree<TRight> right,
    Func<TLeft, TRight, TResult> combine)

Parameters

nametypedefaultdescription
leftCad Tree of TLeft—
rightCad Tree of TRight—
combineFunc<TLeft, TRight, TResult>—

Returns

resultCad Tree of TResult
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Numbers

Function

Creates a numeric tree with sorted, merged paths.

Signature
Numbers -> Cad Tree of Number
    paths: Integer Array Array
    branches: Number Array Array
CadTree<double> Numbers(int[][] paths, double[][] branches)

Parameters

nametypedefaultdescription
pathsInteger Array Array—
branchesNumber Array Array—

Returns

resultCad Tree of Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Simplify

Function

Removes common leading indices while retaining at least one index in each path.

Signature
Simplify(tree: Cad Tree of T) -> Cad Tree of T
CadTree<T> Simplify(CadTree<T> tree)

Parameters

nametypedefaultdescription
treeCad Tree of T—

Returns

resultCad Tree of T
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Simplify Numbers

Function

Graph-friendly removal of common path prefixes.

Signature
SimplifyNumbers(tree: Cad Tree of Number) -> Cad Tree of Number
CadTree<double> SimplifyNumbers(CadTree<double> tree)

Parameters

nametypedefaultdescription
treeCad Tree of Number—

Returns

resultCad Tree of Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD

Trim Paths

Function

Removes trailing path indices and merges resulting branches. Removing the entire path maps to {0}.

Signature
TrimPaths(tree: Cad Tree of T, levels: Integer) -> Cad Tree of T
CadTree<T> TrimPaths(CadTree<T> tree, int levels = 1)

Parameters

nametypedefaultdescription
treeCad Tree of T—
levelsInteger1

Returns

resultCad Tree of T
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Trees
Package
CAD