Package space.kscience.dataforge.actions

Types

Action
Link copied to clipboard
common
interface Action<in T : Any, out R : Any>

A simple data transformation on a data node. Actions should avoid doing actual dependency evaluation in execute.

ActionEnv
Link copied to clipboard
common
data class ActionEnv(name: Name, meta: Meta, actionMeta: Meta)

Action environment includes data name, data meta and action configuration meta

JoinGroup
Link copied to clipboard
common
class JoinGroup<T : Any, R : Any>(name: String, set: DataSet<T>)
MapActionBuilder
Link copied to clipboard
common
class MapActionBuilder<T, R>(name: Name, meta: MutableMeta, actionMeta: Meta)

Action environment

ReduceGroupBuilder
Link copied to clipboard
common
class ReduceGroupBuilder<T : Any, R : Any>(inputType: KType, scope: CoroutineScope, actionMeta: Meta)
SplitBuilder
Link copied to clipboard
common
class SplitBuilder<T : Any, R : Any>(name: Name, meta: Meta)

Functions

map
Link copied to clipboard
common
inline fun <T : Any, R : Any> Action.Companion.map(noinline builder: MapActionBuilder<T, R>.() -> Unit): Action<T, R>

A one-to-one mapping action

reduce
Link copied to clipboard
common
inline fun <T : Any, R : Any> Action.Companion.reduce(noinline builder: ReduceGroupBuilder<T, R>.() -> Unit): Action<T, R>

A one-to-one mapping action

split
Link copied to clipboard
common
inline fun <T : Any, R : Any> Action.Companion.split(noinline builder: SplitBuilder<T, R>.() -> Unit): Action<T, R>

Action that splits each incoming element into a number of fragments defined in builder

then
Link copied to clipboard
common
infix fun <T : Any, I : Any, R : Any> Action<T, I>.then(action: Action<I, R>): Action<T, R>

Action composition. The result is terminal if one of its parts is terminal

transformWith
Link copied to clipboard
common
suspend fun <T : Any, R : Any> DataSet<T>.transformWith(action: Action<T, R>, meta: Meta = Meta.EMPTY, scope: CoroutineScope? = null): DataSet<R>