Package-level declarations

Types

Link copied to clipboard
internal data class ColumnPosition(val originalIndex: Int, var wasRemoved: Boolean, var column: AnyCol?) : ReferenceData
Link copied to clipboard
internal interface ReadonlyTreeNode<out T>
Link copied to clipboard
internal interface ReferenceData
Link copied to clipboard
internal class TreeNode<T>(var name: String, val depth: Int, var data: T, val parent: TreeNode<T>? = null) : ReadonlyTreeNode<T>

Functions

Link copied to clipboard
internal fun <T> TreeNode<T?>.allChildrenNotNull(): List<TreeNode<T>>
Link copied to clipboard
Link copied to clipboard
internal fun <D> List<ColumnWithPath<*>>.collectTree(emptyData: D, createData: (AnyCol) -> D): TreeNode<D>
Link copied to clipboard
Link copied to clipboard
internal tailrec fun <T> ReadonlyTreeNode<T>.getAncestor(depth: Int): ReadonlyTreeNode<T>
Link copied to clipboard
internal fun <T> TreeNode<T?>.getOrPut(path: ColumnPath): TreeNode<T?>
internal fun <T> TreeNode<T>.getOrPut(path: ColumnPath, createData: (ColumnPath) -> T): TreeNode<T>
Link copied to clipboard
internal fun <T> TreeNode<T>.getOrPutEmpty(path: ColumnPath, emptyData: T): TreeNode<T>
Link copied to clipboard
internal fun <T : ReadonlyTreeNode<*>, R> T.map(operation: (node: T, children: List<R>) -> R): R

Mapping function for ReadonlyTreeNodes (like TreeNode) which can convert the tree-structure (depth-first) to any other tree-type structure (e.g. DataFrame).

Link copied to clipboard
internal fun <T> TreeNode<T?>.put(path: ColumnPath, data: T): TreeNode<T?>
Link copied to clipboard

Shorten column paths as much as possible to keep them unique

Link copied to clipboard
internal fun <T> TreeNode<T>.topmostChildren(yieldCondition: (TreeNode<T>) -> Boolean): List<TreeNode<T>>

Traverses all children in the tree in depth-first order and returns the top-most nodes that satisfy yieldCondition. This means that if a node satisfies yieldCondition, its children are not traversed, regardless of whether they satisfy yieldCondition or not.

Link copied to clipboard
internal fun <T> TreeNode<T>.topmostChildrenExcluding(excludeRoot: TreeNode<*>): List<TreeNode<T>>
Link copied to clipboard