On Tue, Nov 16, 2010 at 4:06 AM, Christophe Grand wrote:
> You can implement your own, prettu easily with deftype.
> However it can be tedious to track every methods, so we need a repl helper
> function to scaffold the code for us.
>
> (defn scaffold [iface]
> (doseq [[iface methods] (->> iface
In guava, there is an immutable version of bimap.
http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/ImmutableBiMap.html
On Fri, Nov 19, 2010 at 3:24 AM, Christophe Grand wrote:
> One call away but rarely persistent or even immutable.
>
> On Fri, Nov 19, 2010 at 4:
One call away but rarely persistent or even immutable.
On Fri, Nov 19, 2010 at 4:55 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:
> awesome.. :) i keep forgetting that all of java is just a call away .. hmm
> thanks Lachlan..:)
> Sunil.
>
>
> On Fri, Nov 19, 2010 at 7:46 AM, jlk wr
Actually if you want to use java lib. Look at guava, formerly known as google
collection. It's one of my fav java lib.
http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/BiMap.html
On Nov 18, 2010, at 10:55 PM, Sunil S Nandihalli
wrote:
> awesome.. :) i keep for
awesome.. :) i keep forgetting that all of java is just a call away .. hmm
thanks Lachlan..:)
Sunil.
On Fri, Nov 19, 2010 at 7:46 AM, jlk wrote:
> I haven't tried it, but I just stumbled across
> http://commons.apache.org/collections/
> -> BidiMap, might be what you're after?
>
>
> On Nov 16, 6:
I haven't tried it, but I just stumbled across
http://commons.apache.org/collections/
-> BidiMap, might be what you're after?
On Nov 16, 6:14 pm, Sunil S Nandihalli
wrote:
> Hello everybody,
>
> Is there something like a bimap in clojure? I know I can have two regular
> hash-maps .. but I was w
Hi Christophe Grand
Yea true I kind of got confused .. thanks for the solution..
Sunil
On Wed, Nov 17, 2010 at 1:12 PM, Christophe Grand wrote:
> On Wednesday, November 17, 2010, Sunil S Nandihalli
> wrote:
> > Regarding your bimap implementation, in terms of complexity, I feel, it
> will be lin
On Wednesday, November 17, 2010, Sunil S Nandihalli
wrote:
> Regarding your bimap implementation, in terms of complexity, I feel, it will
> be linear in the number of elements, when accessing the pair via the value ..
> Is that true?
No I use two maps and rmap is O(1) so rmap+get is O(log32 n)
On Tue, Nov 16, 2010 at 10:18 PM, Sunil S Nandihalli
wrote:
> Thanks Christopher Grand. I really like your scaffold .. would be extremely
> handy .. Like david suggested .. it would be a perfect candidate for
> inclusion in the clojure.repl
> Regarding your bimap implementation, in terms of comple
On Tue, Nov 16, 2010 at 7:18 PM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:
> Thanks Christopher Grand. I really like your scaffold .. would be extremely
> handy .. Like david suggested .. it would be a perfect candidate for
> inclusion in the clojure.repl
>
> Regarding your bimap imp
Thanks Christopher Grand. I really like your scaffold .. would be extremely
handy .. Like david suggested .. it would be a perfect candidate for
inclusion in the clojure.repl
Regarding your bimap implementation, in terms of complexity, I feel, it will
be linear in the number of elements, when acce
You can implement your own, prettu easily with deftype.
However it can be tedious to track every methods, so we need a repl helper
function to scaffold the code for us.
(defn scaffold [iface]
(doseq [[iface methods] (->> iface .getMethods
(map #(vector (.getName (.get
A bimap is a map where each elements of the pair can be used as key to
access it..
Sunil.
On Tue, Nov 16, 2010 at 12:44 PM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:
> Hello everybody,
>
> Is there something like a bimap in clojure? I know I can have two regular
> hash-maps .. but I
Hello everybody,
Is there something like a bimap in clojure? I know I can have two regular
hash-maps .. but I was wondering if there is a better implementation..?
a similar implementation in c++ is
http://beta.boost.org/doc/libs/1_41_0/libs/bimap/doc/html/index.html
Thanks,
Sunil.
--
You rec
14 matches
Mail list logo