Skip to content

Commit

Permalink
Add ParallelOps.highlightAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCourtney authored and skovati committed Sep 9, 2024
1 parent 556e4e8 commit 15d93de
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package gov.nasa.ammos.aerie.procedural.timeline.ops
import gov.nasa.jpl.aerie.merlin.protocol.types.Duration
import gov.nasa.ammos.aerie.procedural.timeline.*
import gov.nasa.ammos.aerie.procedural.timeline.collections.Universal
import gov.nasa.ammos.aerie.procedural.timeline.collections.Windows
import gov.nasa.ammos.aerie.procedural.timeline.collections.profiles.Numbers
import gov.nasa.ammos.aerie.procedural.timeline.collections.profiles.Booleans
import gov.nasa.ammos.aerie.procedural.timeline.ops.coalesce.CoalesceNoOp
Expand All @@ -22,6 +23,9 @@ interface ParallelOps<T: IntervalLike<T>, THIS: ParallelOps<T, THIS>>: GeneralOp

override fun isAlwaysSorted() = false

/** [(DOC)][highlightAll] Highlights all objects in the timeline in a new [Windows] timeline. */
fun highlightAll() = unsafeMap(::Windows, BoundsTransformer.IDENTITY, true) { it.interval }

/** [(DOC)][merge] Combines two timelines together by overlaying them. Does not perform any transformation. */
infix fun merge(other: GeneralOps<T, *>) = unsafeOperate { opts ->
collect(opts) + other.collect(opts)
Expand Down

0 comments on commit 15d93de

Please sign in to comment.