davidcuddeback
Joined 17 years ago
Joined 17 years ago
Yes, absolutely. I see it all the time in the Ruby ecosystem and have used it myself in Ruby. Many times it gets called by a different name. I've seen it in Python and Elixir too.
Bigger asteroids are easier to see.
R-trees are more generic in that they can store intervals, shapes, volumes, etc, but (start time, duration) tuples are point-like, and that opens more possibilities. The ordered map is going to give you good memory locality. It might be that you'll only beat that when searching for larger durations (that require you to iterate over more of your ordered map). There will probably be an inflection point somewhere, depending on the distribution of your data and queries.
Hope that helps!
Check out priority search trees. They search two dimensions, one of them being half-open (that would be your minimum duration requirement). Depends if the other half of your queries fits the closed dimension of a priority tree or if you can adapt it to fit your needs.
An RTree is the first structure that comes to mind, but the way you describe the problem, it sounds like the intervals never overlap, so I have my doubts. Sounds like you might be looking to optimize the query "what is the first interval of at least N days?" Maybe look at priority trees. They're good at queries that are bounded in one dimension and half-open in the other.
Edit: Nevermind. Answered down thread. Lucky you. Beautiful area and Jory's work is phenomenal.
> Did occult mean what it does now when they started?
A word can have more than one meaning. The first definition on merriam-webster.com covers the definition used in astronomy:
occult (v.): to shut off from view or exposure: cover, eclipse [2]
The adjective form might be a source of derivation for the meaning you're alluding to:
occult (adj.): (1) not revealed: secret; (2) not easily apprehended or understood: abstruse, mysterious; (3) hidden from view: concealed [2]
And finally, the paranormal meaning that people are more familiar with today:
occult (n): matters regarded as involving the action or influence of supernatural or supernormal powers or some secret knowledge of them -> used with the [2]
Again, I don't know the history of these words. If I had to hazard a guess, I'd bet that the noun form, "the occult", is derived from the adjective form since "the occult" refers to supernatural phenomena, which is naturally hidden from view, concealed, not revealed, secret, not easily apprehended or understood, etc (because it's not real).
Edit: Another guess. If you think about the history of astronomy, it was originally intertwined with religion and astrology. Perhaps these words date back to a time when "the occult" and astronomy weren't entirely separate. Anyways, I agree. Language is strange.
Also, btw, you might want to read the article you linked. The article is discussing a fringe idea that some scientists have. Scientists are free to explore new ideas, and they make for good click bait for science journalists. Until those ideas gain traction, they don't provide for compelling arguments, though.
https://www.colorado.edu/today/2022/01/25/what-marshall-fire...
Yes, absolutely! :)
Or in BNF if you prefer: