Booleans

Constructors

Link copied to clipboard
constructor(v: Boolean)
constructor(vararg segments: Segment<Boolean>)
constructor(segments: List<Segment<Boolean>>)
constructor(timeline: Timeline<Segment<Boolean>, Booleans>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun accumulatedTrueDuration(unit: Duration): Real

Creates a Real profile corresponding to the running total of time that this profile has spent true.

Link copied to clipboard
infix fun and(other: Booleans): Booleans

Computes the AND operation between two boolean profiles.

Link copied to clipboard
open infix fun assignGaps(other: SerialSegmentOps<Boolean, *>): Booleans

(DOC) Fills in gaps in this profile with another profile.

open infix fun assignGaps(v: Boolean): Booleans

(DOC) Fills in gaps in this profile with a constant value.

Link copied to clipboard
open override fun cache(): Booleans

(DOC) Caches the timeline for all available time.

open override fun cache(opts: CollectOptions): Booleans

Caches the result of collecting this timeline, to be reused for future collect requests if possible.

open override fun cache(bounds: Interval): Booleans

(DOC) A simplified version of cache.

Link copied to clipboard
open override fun changes(): Booleans

(DOC) Returns a Booleans that is true whenever this profile changes, and false or gap everywhere else.

Link copied to clipboard
open override fun collect(): List<Segment<Boolean>>

(DOC) Collects the timeline for all available time.

open override fun collect(opts: CollectOptions): List<Segment<Boolean>>

(DOC) Evaluates the stack of operations and produces a list of timeline payload objects.

open override fun collect(bounds: Interval): List<Segment<Boolean>>

(DOC) A simplified version of collect.

Link copied to clipboard

(DOC) Safely converts to another timeline type that accepts the same payload type.

Link copied to clipboard

(DOC) Uses a NullBinaryOperation as a predicate to highlight edges between segments.

Link copied to clipboard
open infix fun equalTo(other: SerialConstantOps<Boolean, *>): Booleans

(DOC) Returns a Booleans that is true when this and another profile are equal.

open infix fun equalTo(v: Boolean): Booleans

(DOC) Returns a Booleans that is true when this equals a constant value.

Link copied to clipboard

Detects when this transitions from false to true.

Link copied to clipboard
open fun falsifyByDuration(validInterval: Interval): Booleans

(DOC) Falsifies any true segments with durations outside the given interval.

Link copied to clipboard
open fun falsifyLongerThan(dur: Duration): Booleans

(DOC) Falsifies any true segments with durations longer than the given duration.

Link copied to clipboard
open fun falsifyShorterThan(dur: Duration): Booleans

(DOC) Falsifies any true segments with durations shorter than the given duration.

Link copied to clipboard
open fun filter(preserveMargin: Boolean = false, f: (Segment<Boolean>) -> Boolean): Booleans

(DOC) Removes or retains objects based on a predicate.

Link copied to clipboard
open fun filterByDuration(validInterval: Interval): Booleans

(DOC) Removes objects whose duration is outside a given valid interval.

Link copied to clipboard
open fun filterByWindows(windows: SerialOps<Interval, *>, truncateMarginal: Boolean = true): Booleans

(DOC) Filters out payload objects whose intervals are not contained in the given Windows timeline.

Link copied to clipboard
open fun filterLongerThan(dur: Duration): Booleans

(DOC) Removes objects whose duration is shorter than a given duration.

Link copied to clipboard
open fun filterShorterThan(dur: Duration): Booleans

(DOC) Removes objects whose duration is longer than a given duration.

Link copied to clipboard

(DOC) Performs a local binary operation that produces profiles, and flattens it into a profile of the same type as this.

(DOC) Performs a local binary operation that produces profiles, and flattens it, with special treatment of gaps.

Link copied to clipboard

(DOC) A simpler version of flatMap2Values for operations that don't change the timeline type.

open fun <W : Any, R : Any, RESULT : SegmentOps<R, RESULT>> flatMap2Values(ctor: (Timeline<Segment<R>, RESULT>) -> RESULT, other: SegmentOps<W, *>, op: (Boolean, W, Interval) -> SegmentOps<R, *>?): RESULT

(DOC) Performs a local binary operation that produces profiles, and flattens it.

Link copied to clipboard

(DOC) A simpler version of flatMapValues for operations that don't change the timeline type.

(DOC) Maps segments into a collection of nested timelines and flattens them into their original intervals.

Link copied to clipboard
open fun forEach(p0: Consumer<in Segment<Boolean>>)
Link copied to clipboard

(DOC) Similar to filter, but produces a coalesced Windows object that highlights everything that satisfies the predicate.

Link copied to clipboard
open fun highlightEqualTo(value: Boolean): Windows

(DOC) Highlights intervals where the value is equal to a specific value.

Link copied to clipboard

(DOC) Creates an Windows object that highlights whenever this profile is false.

Link copied to clipboard

(DOC) Creates an Windows object that highlights whenever this profile is true.

Link copied to clipboard

(DOC) Inserts a no-op function into the operation stack to allow side effects, such as printing.

Link copied to clipboard

(DOC) Similar to filter, but returns an Universal timeline.

Link copied to clipboard

(DOC) Isolates intervals where the value is equal to a specific value.

Link copied to clipboard

(DOC) Creates an Universal object with intervals whenever this profile is false.

Link copied to clipboard

(DOC) Creates an Universal object with intervals whenever this profile is true.

Link copied to clipboard
open operator override fun iterator(): Iterator<Segment<Boolean>>
Link copied to clipboard

(DOC) Performs a local binary operation between two profiles where the result is the same type as this profile.

(DOC) Performs a local binary operation between two profiles, with special treatment of gaps.

Link copied to clipboard

(DOC) A simplified version of map2Values for operations that don't change the timeline type.

open fun <W : Any, R : Any, RESULT : SegmentOps<R, RESULT>> map2Values(ctor: (Timeline<Segment<R>, RESULT>) -> RESULT, other: SegmentOps<W, *>, op: (Boolean, W, Interval) -> R?): RESULT

(DOC) Performs a local binary operation between two segment-valued timelines.

Link copied to clipboard

(DOC) Locally transforms the values of a profile without changing the intervals or profile type.

open fun <R : Any, RESULT : SegmentOps<R, RESULT>> mapValues(ctor: (Timeline<Segment<R>, RESULT>) -> RESULT, f: (Segment<Boolean>) -> R): RESULT

(DOC) Locally transforms the values of a profile without changing the intervals.

Link copied to clipboard
infix fun nand(other: Booleans): Booleans

Computes the NAND operation between two boolean profiles.

Link copied to clipboard
infix fun nor(other: Booleans): Booleans

Computes the NOR operation between two boolean profiles.

Link copied to clipboard
open operator fun not(): Booleans

(DOC) Applies the unary NOT operation.

Link copied to clipboard
open infix fun notEqualTo(other: SerialConstantOps<Boolean, *>): Booleans

(DOC) Returns a Booleans that is true when this and another profile are not equal.

open infix fun notEqualTo(v: Boolean): Booleans

(DOC) Returns a Booleans that is true when this is not equal to a constant value.

Link copied to clipboard
infix fun or(other: Booleans): Booleans

Computes the OR operation between two boolean profiles.

Link copied to clipboard

Detects when this transitions from false to true.

Link copied to clipboard
fun rollingTrueDuration(range: Duration, unit: Duration): Real

Calculates the sum of durations of true segments in a range leading the current time.

Link copied to clipboard
open fun sample(time: Duration): Boolean?

(DOC) Calculates the value of the profile at the given time.

Link copied to clipboard
open fun select(interval: Interval): Booleans

(DOC) Restricts the timeline to only be evaluated in the given interval.

Link copied to clipboard
open infix fun set(other: SerialSegmentOps<Boolean, *>): Booleans

(DOC) Overwrites this profile with another. Gaps in the argument profile will be filled in with this profile.

Link copied to clipboard
open fun shift(dur: Duration): Booleans

(DOC) Uniformly shifts the entire timeline in time (positive shifts toward the future).

Link copied to clipboard
fun shiftEdges(shiftRising: Duration, shiftFalling: Duration): Booleans

Shifts the rising and falling edges of a boolean profile independently of each other.

Link copied to clipboard
open fun split(f: (Segment<Boolean>) -> Int): Booleans

(DOC) Splits payload objects into a variable number of equally sized pieces.

Link copied to clipboard
open fun splitEqualTo(value: Boolean, numPieces: Int): Booleans

(DOC) Splits segments where the value is equal to a specific value.

Link copied to clipboard
Link copied to clipboard
open fun splitFalse(numPieces: Int): Booleans

(DOC) Splits false segments into the given number of pieces (leaving true unchanged).

Link copied to clipboard
open fun splitTrue(numPieces: Int): Booleans

(DOC) Splits true segments into the given number of pieces (leaving false unchanged).

Link copied to clipboard
open fun transitions(from: Boolean, to: Boolean): Booleans

(DOC) Returns a Booleans that is true when this profile's value changes between two specific values.

Link copied to clipboard

(DOC) UNSAFE! Casts this timeline type to another type without changing its contents.

Link copied to clipboard
open fun <R : IntervalLike<R>, RESULT : GeneralOps<R, RESULT>> unsafeFlatMap(ctor: (Timeline<R, RESULT>) -> RESULT, boundsTransformer: BoundsTransformer, truncate: Boolean, f: (Segment<Boolean>) -> Segment<GeneralOps<R, *>>): RESULT

(DOC) UNSAFE! Maps each object to a nested timeline and flattens all the timelines into one.

Link copied to clipboard
open fun unsafeMap(boundsTransformer: BoundsTransformer, truncate: Boolean, f: (Segment<Boolean>) -> Segment<Boolean>): Booleans

(DOC) UNSAFE! A simpler version of unsafeMap for operations that don't change the timeline type.

open fun <R : IntervalLike<R>, RESULT : GeneralOps<R, RESULT>> unsafeMap(ctor: (Timeline<R, RESULT>) -> RESULT, boundsTransformer: BoundsTransformer, truncate: Boolean, f: (Segment<Boolean>) -> R): RESULT

(DOC) UNSAFE! Maps each timeline object to another object, of potentially a different type, at potentially a different time.

Link copied to clipboard
open fun <W : IntervalLike<W>, R : IntervalLike<R>, RESULT : GeneralOps<R, RESULT>> unsafeMap2(ctor: (Timeline<R, RESULT>) -> RESULT, other: GeneralOps<W, *>, op: (Segment<Boolean>, W, Interval) -> R?): RESULT

Performs a generalized binary operation between this and another timeline.

Link copied to clipboard
open fun unsafeMapIntervals(boundsTransformer: BoundsTransformer, truncate: Boolean, f: (Segment<Boolean>) -> Interval): Booleans

(DOC) UNSAFE! Maps the interval of each object, leaving the rest of the object unchanged.

Link copied to clipboard

(DOC) UNSAFE! A simpler version of unsafeOperate for operations that don't change the timeline type.

(DOC) UNSAFE! The basic, most general operation method. All operations eventually delegate here.

Link copied to clipboard
open fun unset(reject: Interval): Booleans

(DOC) Unsets everything in a given interval. Timeline objects whose intervals fully contain the rejected interval may be split into two objects.

Link copied to clipboard
infix fun xor(other: Booleans): Booleans

Computes the XOR operation between two boolean profiles.

Link copied to clipboard
open infix fun zip(other: SerialSegmentOps<Boolean, *>): Booleans

Overlays two profiles on each other, asserting that they both cannot be defined at the same time.