Giter Site home page Giter Site logo

Comments (8)

statik avatar statik commented on May 18, 2024

@lemire I started taking a look at this and got a little confused. I'll list out what I found, and just say there is a good chance I'm missing something and would greatly appreciate any pointers on what operations are still missing here.

https://github.com/RoaringBitmap/roaring/blob/master/setutil.go#L211 has intersects2by2. Not sure if the 2by2 suffix is correct, when comparing https://github.com/RoaringBitmap/RoaringBitmap/blob/50d435c5f82df78b5d369f4120559e10c3455e95/src/main/java/org/roaringbitmap/Util.java#L680

intersects2by2 is called from

return intersects2by2(
which seems similar to the way it is used in java https://github.com/RoaringBitmap/RoaringBitmap/blob/78ad3a1c11e374e471e4fc666257569269447412/src/main/java/org/roaringbitmap/ArrayContainer.java#L573

I also see OrCardinality, AndCardinality, and Intersects implemented herev in the public API:

// OrCardinality returns the cardinality of the union between two bitmaps, bitmaps are not modified

func (rb *Bitmap) AndCardinality(x2 *Bitmap) uint64 {

func (rb *Bitmap) Intersects(x2 *Bitmap) bool {

from roaring.

lemire avatar lemire commented on May 18, 2024

@statik I'll get back to you.

from roaring.

lemire avatar lemire commented on May 18, 2024

@statik

Not sure if the 2by2 suffix is correct

It means that we take the intersection of two sets... as opposed to intersecting 3 sets, and so forth. Arguably, the 2by2 suffix is unnecessary but that's a private function.

from roaring.

lemire avatar lemire commented on May 18, 2024

@statik

Ok. So the current status of this issue is that it is all implemented except that the OrCardinality function materializes the temporary containers needlessly.

// TODO: could be faster if we did not have to materialize the container

I'll update the issue description to avoid confusion.

from roaring.

lemire avatar lemire commented on May 18, 2024

@statik

Done. Let us hope that things are clearer now. Thanks for the feedback.

from roaring.

statik avatar statik commented on May 18, 2024

@lemire thanks! this makes sense. I hope to find some time to work on this.

from roaring.

lemire avatar lemire commented on May 18, 2024

@statik Please do. And, also, if you do, don't forget to throw in extra tests for good measure!

from roaring.

lemire avatar lemire commented on May 18, 2024

Resolved as of this commit 8a91ca4

from roaring.

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.