greptilian logo

IRC log for #friendlyjava, 2014-11-01

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:16 pdurbin just got back from trick or treating with the kids
00:20 aditsu :)
00:20 aditsu we're having some fun at the office: http://imgur.com/a/NsoCJ
00:28 Patch joined ##friendlyjava
00:47 aditsu btw I had a question last night, you can see it in the logs
00:56 pdurbin Happy Halloween! - https://plus.google.com/+PhilDurbin/posts/aoqd3bsRKe
00:56 pdurbin aditsu: great Edward Scissorhands
00:57 aditsu yeah that guy is awesome :)
00:58 pdurbin ArrayList isn't efficient enough?
01:00 aditsu ArrayList is not sorted
01:02 aditsu I like your hat :)
01:03 pdurbin shockingly easy costume. just throw a hat on
01:03 pdurbin right, right. not sorted. hmm. dunno
01:04 pdurbin this is ##friendlyjava not ##knowledgeablejava
01:04 aditsu heh, that (hopefully) doesn't exclude knowledge
01:05 aditsu I think the standard structure is a balanced binary tree with node counts for each subtree.. was just wondering if there's a popular choice for java
01:06 aditsu or perhaps something that was recently added
01:08 aditsu I have an AVL implementation somewhere..
01:16 * pdurbin looks at http://en.wikipedia.org/wiki/AVL_tree
01:19 aditsu it's what I learned in uni, before I heard of red-black and other trees :p
01:21 aditsu too bad TreeSet doesn't provide indexed access..
01:25 pdurbin you'll have to keep us posted on what you settle on
01:26 aditsu somebody mentioned https://code.google.com/p/indexed-tree-map/ on stackoverflow
01:31 aditsu I wonder if some popular collections libraries also have something like this
01:35 aditsu apparently not
01:35 aditsu I'll probably go with my own AVL code..
01:36 aditsu I just have to find it :p
01:42 Patch joined ##friendlyjava
02:37 Patch joined ##friendlyjava
03:40 Patch joined ##friendlyjava
04:47 aditsu joined ##friendlyjava
14:45 Patch joined ##friendlyjava
15:01 pdurbin aditsu: nothing in Guava for this?
15:05 * pdurbin wonders if this would do it: http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/TreeMultiset.html
15:05 pdurbin via http://stackoverflow.com/questions/10675446/list-implementation-that-maintains-ordering
16:44 Patch joined ##friendlyjava
17:55 Patch joined ##friendlyjava
18:09 mr_lou joined ##friendlyjava
19:01 aditsu pdurbin: nope, maintains the order = not sorted
19:02 aditsu also, where's the indexed access?
19:02 pdurbin "A multiset which maintains the ordering of its elements, according to either their natural order or an explicit Comparator."
19:03 pdurbin so you write a Comparator. right?
19:03 aditsu oh, their wording is weird
19:03 pdurbin and the Comparator does teh sorting
19:03 aditsu ok, I guess that is sorted then
19:03 aditsu usually "maintains the order" means it keeps them in the same order in which they were added
19:04 aditsu but... what about the indexed access?
19:06 pdurbin no idea
19:07 aditsu lol
19:08 pdurbin try it and see
19:09 aditsu there's nothing to try
19:11 pdurbin fine. use the thing you wrote :)
19:16 pdurbin by index access I assume you mean you want to be able to do foo.get(0)
19:32 aditsu not just 0 (that's easy), but any index
19:33 pdurbin .get(42)
21:25 aditsu related: http://en.wikipedia.org/wiki/Order_statistic_tree

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode