Builder

vecxt_re.Scenarr.Builder
final class Builder(val numberIterations: Int, threshold: Double, day1: LocalDate, name: String, id: Long, sizeHint: Int)

Collects events one at a time into primitive columns, then builds a Scenarr. Use it for streaming sources (CSV, parquet, a database cursor), where the number of events isn't known up front.

Each add checks the iteration lies in 1..numberIterations (the per-iteration kernels trust this without checking), that the day is at least 1, and that the amount is not NaN. result checks the sort order in one pass: events added in (iteration, day) order are used as they are, anything else is sorted. Either way the result has isSorted = true.

A builder can't be reused after result.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(iteration: Int, day: Int, amount: Double, eventId: Long): this.type
def length: Int

The number of events added so far.

The number of events added so far.

Attributes

def result(): Scenarr

Concrete fields

val numberIterations: Int