flatMap2Values

open fun flatMap2Values(other: SegmentOps<V, *>, op: (V, V, Interval) -> SegmentOps<V, *>?): THIS

(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: (V, W, Interval) -> SegmentOps<R, *>?): RESULT

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

Similar to map2Values, except it expects the operation to return a profile. Each nested profile is then collected on the interval it corresponds to, and the results are concatenated into a single profile.

This is useful for binary operations where at least one of the operand segments represents a value that varies within the segment, such as gov.nasa.ammos.aerie.procedural.timeline.collections.profiles.Real.

Return

a coalesced flattened profile; an instance of the return type of ctor

Parameters

W

the other operand's payload type

R

the result's payload type

RESULT

the result's timeline type

ctor

the result timeline's constructor

other

the other operand timeline

op

a binary operation between the two payload types that produces a maybe-null profile

See also