Closed GoogleCodeExporter closed 9 years ago
I can understand that desire, but I'm somewhat concerned that that's easily
confused with some measure of the "size of the ranges," e.g. that a RangeMap
with a Range from 1 to 42 would have size 42, or something along those lines.
Thoughts?
Original comment by wasserman.louis
on 18 Apr 2013 at 5:31
> [..] I'm somewhat concerned that that's easily confused with some measure of
the "size of the ranges," e.g. that a RangeMap with a Range from 1 to 42 would
have size 42, or something along those lines. Thoughts?
When I read the title of this ticket, i.e. before I clicked on it, that was the
first semantics for RangeMap#size() I came up with. Admittedly I haven't yet
used RangeMap extensively, but I guess it does show that your concern is
warranted.
Original comment by stephan...@gmail.com
on 18 Apr 2013 at 7:06
Thank you for the quick replies.
As I work more with RangeMap (in the context of storing features on genomic
sequences, see e.g. http://www.sequenceontology.org/gff3.shtml), I am finding
that most of my interaction will be through the asMapOfRanges() view.
I also think the concern about confusion with size() is valid; I would be ok
marking this issue as WontFix, perhaps after being left a while for further
comment.
Original comment by heue...@gmail.com
on 18 Apr 2013 at 7:12
would using a DiscreteDomain be to obfuscating?
{
[0,5)=A
[10,14)=B
[40,42)=C
}
size = rangeMap.size(integers());
// size = 5 + 4 + 2 = 11
Original comment by jysjys1...@gmail.com
on 20 Apr 2013 at 5:57
[deleted comment]
Also, to this effect, I suppose: is it practical to have a view of the
comparable items to the associated values? I suppose it would be akin to a
ContiguousSet.
i.e.
Range<Integer> range;
Object o;
Map.Entry<Range<Integer>, Object> entry;
DiscreteDomain<Integer> domain;
...
ContiguousMap.create(domain, range, o);
ContiguousMap.create(domain, entry);
...
RangeMap<Integer, Object> rangeMap;
Map<Range<Integer>, Object> mapOfRanges;
...
PiecewiseMap.create(domain, rangeMap);
PiecewiseMap.create(domain, mapOfRanges);
Original comment by jysjys1...@gmail.com
on 23 Apr 2013 at 5:10
If size() is not added to the interface is it possible to get isEmpty()
analogous to RangeSet#isEmpty()?
Original comment by markus.s...@gmail.com
on 2 Sep 2013 at 6:22
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<issue id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:12
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original issue reported on code.google.com by
heue...@gmail.com
on 18 Apr 2013 at 5:14