Giter Club home page Giter Club logo

Comments (5)

tobiasgrosser avatar tobiasgrosser commented on August 29, 2024

The bindings are already C++11 of larger. Not sure if this would change anything regarding the separate file.

And yes, I think it would be great to systematically think about less-than and hashability. Your point of needing a std::hash for id was a certainly a good one.

from isl.

ftynse avatar ftynse commented on August 29, 2024

Sorry, I've mistaken that for the generator file, which is not C++11. Nevermind.

For hashes there are two options: either we can wrap around isl_*_get_hash() or just compute a hash of the pointer with the standard hashing function.

from isl.

tobiasgrosser avatar tobiasgrosser commented on August 29, 2024

This likely depends what you want. isl_*_get_hash gives identical hashes for different objects that model the same set. The pointer does not carry this information.

from isl.

ftynse avatar ftynse commented on August 29, 2024

Well, I think it is reasonable to expect hashes of logically equal (i.e. represent the same set) values to be equal.

from isl.

tobiasgrosser avatar tobiasgrosser commented on August 29, 2024

There are good reasons for expecting logical equality. On the other side, hashing can be expensive this way. Assume you insert a large isl::set into a hashtable and you first need to scan the full isl::set. I feel there is a tradeoff.

from isl.

Related Issues (13)

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.