I assume you mean sorted maps? A timeline is pretty much an ordered time -> event mapping
The main reason for the RRB vectors is the efficient concatenation and slicing. So you can manipulate large chunks of timeline data. For example - this is helpful if you are handling long streams of sensor data, and want to cut out 5-minute long chunks for analysis. A secondary reason is that duplicate timestamps are allowed, so it is marginally trickier to implement this with sets / maps (though it is still clearly feasible, you can just store an ordered list of events for each unique timestamp....) Anyway, the good news is that with everything abstracted behind a protocol it will be fairly easy to improve the data structure implementation without changing the API. On Tuesday, 15 October 2013 22:18:28 UTC+8, Jozef Wagner wrote: > > Wouldn't sorted-set be better than RRB vector in your case? > > > On Tue, Oct 15, 2013 at 2:15 PM, Mikera <mike.r.an...@gmail.com<javascript:> > > wrote: > >> Hi All, >> >> I just created a new, small, experimental library because I needed to >> represent a "timeline" of values as an immutable object. >> >> Target use cases: >> - Efficient logging of timestamped events >> - Storage of sensor data event streams (Internet of Things etc.) >> >> It's far from finished but I thought it would be worth sharing early in >> case others find it useful, have feature requests, or have ideas to >> contribute. >> >> Key features / design points: >> - Each value (event) on the timeline has a timestamp >> - Given a timeline, it is possible to quickly query the value at any >> point in time. >> - Integrates with Joda time / clj-time >> - Uses RRB trees (thanks Michal for clojure/core.rrb-vector) so that >> timelines can be efficiently cut and spliced together >> - Backed by a protocol, allowing for alternative implementations (not >> sure if this is useful..... but maybe....) >> >> Repository is here: >> >> https://github.com/mikera/timeline >> >> Have fun! >> >> Mike. >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com<javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+u...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.