MonoidParallel

case
class MonoidParallel[S](empty: S, append: (S, S) => S, split: S => (S, S), step: S => S, parallel: Int, stepSize: Int, stop: S => Boolean)
Value Params
append

The monoid binary operator to combine 2 states

empty

The monoid identity element, such that: append(empty, s) == s, append(s, empty) == s

split

Split the current state. The second member of the tuple is to be sent as input to the next step. The first is to become the new current state. This function can compute new states or simply duplicate its input, untouched, e.g. split(s) == (s, s).

trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

@tailrec
final
def fullStep(step: S => S, stepSize: Int, s: S): S
def init(start: S, n: Int): Vector[S]
def run(implicit ec: ExecutionContext): Try[S]
def scan(implicit ec: ExecutionContext): Vector[S]
@tailrec
final
def waitForNext(running: Vector[Future[S]]): (S, Vector[Future[S]])
@tailrec
final
def waitForNextT(running: Vector[Future[S]]): Try[(S, Vector[Future[S]])]

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product