BaseDD

com.phasmid.majabigwaduce.dd.BaseDD
abstract class BaseDD[K, V](using ec: ExecutionContext) extends DataDefinition[K, V]

Abstract base class which implements the generic DataDefinition[K, V].

Type parameters

K

the key type

V

the input value type

Value parameters

ec

an ExecutionContext

Attributes

Graph
Supertypes
trait DataDefinition[K, V]
trait () => Future[Map[K, V]]
class Object
trait Matchable
class Any
Known subtypes
class EagerDD[K, V]
class LazyDD[K, V, L, W]

Members list

Value members

Abstract methods

def evaluate: Future[DataDefinition[K, V] & HasEvaluatedMap[K, V]]

Evaluate this BaseDD as a Future[HasEvaluatedMap[K, V]

Evaluate this BaseDD as a Future[HasEvaluatedMap[K, V]

Attributes

Returns

an HasEvaluatedMap (in practice, this will be an EagerDD) wrapped in Future

Concrete methods

override def apply(): Future[Map[K, V]]

Evaluate this DataDefinition

Evaluate this DataDefinition

Attributes

Returns

a map of key-value pairs wrapped in Future

Definition Classes
Function0
def count: Future[Int]

Evaluate the number of elements in this DataDefinition

Evaluate the number of elements in this DataDefinition

Attributes

Returns

the number of k-v pairs

def reduce[X : Zero](wVWf: (X, V) => X): Future[X]

Method to evaluate this DataDefinition and reduce the dimensionality of the result by ignoring the keys and aggregating the values according to the function xw_x.

Method to evaluate this DataDefinition and reduce the dimensionality of the result by ignoring the keys and aggregating the values according to the function xw_x.

Type parameters

X

the underlying type of the result.

Value parameters

wVWf

the aggregation function.

Attributes

Returns

an X value, wrapped in Future.

Inherited methods

override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function0 -> Any
Inherited from:
Function0

Inherited and Abstract methods

def clean(): Unit

Clean up any residual resources from this DataDefinition

Clean up any residual resources from this DataDefinition

Attributes

Inherited from:
DataDefinition
def filter(p: ((K, V)) => Boolean): DataDefinition[K, V]

Method to filter this DataDefinition according to a predicate which takes a k-v tuple.

Method to filter this DataDefinition according to a predicate which takes a k-v tuple.

Value parameters

p

the predicate which will yield a Boolean for a given k-v tuple.

Attributes

Returns

a new DataDefinition containing only those k-v pairs which satisfy the predicate p.

Inherited from:
DataDefinition
def groupBy[L](f: V => L): DataDefinition[L, Iterable[V]]

Method to group values by a new key type generated from the values, ignoring the current keys.

Method to group values by a new key type generated from the values, ignoring the current keys.

Type parameters

L

the new key type, whose values are derived from the values of this DataDefinition

Attributes

Returns

a DataDefinition based on L and Iterable[V]

Inherited from:
DataDefinition
def join[L >: K, W](other: DataDefinition[L, W])(using evidence$1: Monoid[W], timeout: Timeout): DataDefinition[L, (V, W)]

Join method to perform inner join.

Join method to perform inner join.

Type parameters

L

key type of other and also of the result

W

value type of other

Value parameters

other

the DataDefinition with which to join this

Attributes

Returns

the inner join of this and other

Inherited from:
DataDefinition
def map[L, W : Monoid](f: ((K, V)) => (L, W)): DataDefinition[L, W]

Method to form a new DataDefinition where the resulting values derive from applying the function f to the original values

Method to form a new DataDefinition where the resulting values derive from applying the function f to the original values

Type parameters

L

the underlying type of the keys of the resulting map

W

the underlying type of the values of the resulting map

Value parameters

f

the function to transform key-value pairs

Attributes

Returns

a new DataDefinition

Inherited from:
DataDefinition