Code Monkey home page Code Monkey logo

segmap's People

Contributors

ecclarke42 avatar h33p avatar jeffparsons avatar nmathewson avatar

Stargazers

 avatar

segmap's Issues

BitOr and BitAnd seem to give wrong answers

fn segmap_intersection_repro() {
    let set0 = segmap::SegmentSet::<i32>::from_iter([1..=3].into_iter());
    let set1 = segmap::SegmentSet::<i32>::from_iter([2..=4].into_iter());
    let union = &set0 | &set1;
    println!("{union:?}"); // got {[1, 3], [2, 4]}, expect ranges to be merged
    let intersection = set0 & set1;
    println!("{intersection:?}"); // got {}, expect {[2, 3]}
}

Tests for Iterators and Set Operations

Generate tests for RangeMap iterators. At least:

  • RangeMap::iter_subset and RangeMap::subset
  • RangeMap::iter_complement and RangeMap::complement
  • RangeMap::iter_gaps and RangeMap::gaps

And RangeSet iterators and operations, at least:

  • RangeSet::iter_subset and RangeSet::subset
  • RangeSet::iter_complement and RangeSet::complement
  • RangeSet::iter_gaps and RangeSet::gaps
  • RangeSet::iter_difference and RangeSet::differenece
  • RangeSet::iter_symmetric_difference and RangeSet::symmetric_differenece
  • RangeSet::iter_intersection and RangeSet::intersection
  • RangeSet::iter_union and RangeSet::union
  • RangeSet::is_disjoint
  • RangeSet::is_subset

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.