Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
This enhancement sort of relates to Issue 177 (the InvertibleFunction or
Converter interface) - implementing a BijectiveFunction interface would make
behavioural guarantees about the function.
Original comment by antonmar...@gmail.com
on 2 Nov 2010 at 3:09
After further thought, you can get some impressive performance advantages if
applying a transformation to a BijectiveFunction - add(), remove(), contains(),
etc., can all be written to work as efficiently as the transformed Set (in
terms of computational complexity, assuming apply() and applyInverse() are
constant time operations). Attached is a trivial implementation of a
TransformedSet implementation.
Original comment by antonmar...@gmail.com
on 2 Nov 2010 at 6:36
Attachments:
We went down this road quite a while ago, but didn't quite get to the endpoint.
One thing that held us up was discovering how shockingly many functions people
want to use are *almost* bijective, and *seem* bijective, but aren't quite --
so subtle bugs will be lurking in your program. This gave us pause, but I
don't think it kills the whole idea necessarily.
Original comment by kevinb@google.com
on 5 Nov 2010 at 5:55
Original comment by kevinb@google.com
on 6 Apr 2011 at 3:27
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
antonmar...@gmail.com
on 25 Oct 2010 at 10:13