Giter VIP home page Giter VIP logo

Comments (3)

ripytide avatar ripytide commented on June 12, 2024

Also! The touching predicate is different also! Since in a Continuous Map Included(4)-Included(6) would NOT touch Included(7)-Included(10) since their exists the value 6.5 inbetween them, BUT in over the Discrete Integer Domain They WOULD touch since their is no value between 6 and 7!!!

Because of this we should probably rename RangeBounds{Map,Set} to ContinuousRange{Map,Set} to make this clear! That opens the door for a new DiscreteRange{Map,Set} to cater to the Discrete set of properties!

from nodit.

ripytide avatar ripytide commented on June 12, 2024

In terms of implementation simplicity for the DiscreteRange datastructures, I think internally representing all bounds as either Unbounded or Included but NOT Excluded would make the implementation much simpler, this could be done quite easily with a helper trait (perhaps an extension to NiceRange) as follows:

enum DiscreteBound<I> {
    Included(I),
    Unbounded,
}

trait NiceDiscreteRange {
    fn start(&self) -> DiscreteBound<I>;
    fn end(&self) -> DiscreteBound<I>;
}

A blanket implementation for any Discrete RangeBounds type would then be trivial.

from nodit.

ripytide avatar ripytide commented on June 12, 2024

Upon further thought, It occurs to me that all my use cases for RangeMaps all prefer the Discrete versions over the Continuous versions. Upon this surprising enlightenment I think assuming Continuous-ness was a great mistake. Therefore I think the best course of action would be to Replace the current RangeBounds{Set,Map} behavior with the Discrete version RATHER than maintaining both versions alongside one-another.

Therefore I am closing this in favor of #37

from nodit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.