let shift path dt = List.map (fun qt -> add_time qt dt) path
+ let concat paths =
let rec loop paths time =
- |  :: paths -> loop paths time
- | (qt :: _) as path :: paths ->
- let (path, time) = shift_helper path (time -. t0) in
+ let (path, time) = shift_helper path time in
List.concat (loop paths 0.)
(** [shift path dt] shifts [path] by adding [dt] to all time values.
- val concat : 'a t list list -> 'a t list
-(** [concat ~t0 paths] concatenates [paths].
+ val concat : ?t0:float -> 'a t list list -> 'a t list
+(** Concatenation of time-stamped paths.
+ [concat ~t0 paths] concatenates [paths] as if they were ordinary lists but
+ time shifts each path to align with the previous path.
+ The first path is time shifted by [~t0] ([0.0] by default). The next path is
+ time shifted by the time of the last configuration of the previously shifted