Unify Pair implementation ------------------------- Key: MAHOUT-174 URL: https://issues.apache.org/jira/browse/MAHOUT-174 Project: Mahout Issue Type: Task Affects Versions: 0.2 Reporter: Sean Owen Assignee: Sean Owen Priority: Minor Fix For: 0.2 Attachments: MAHOUT-174.patch
Per discussion on mahout-dev, starting a series of patches to unify code, starting with Pair. Simple enough, but, it snowballed a little bit: - Now there is just org.apache.mahout.common.Pair - I moved my LongPair implementation next to it for consistency - But it depends on my RandomUtils, and doesn't make sense for a top-level package to depend downward like that, so moved it too -- since we discussed that this should probably get reused a little more too - Then I saw that the LFUCache class needs a mutable Pair whereas the new variant is immutable. I judged it was better to actually modify LFUCache to not need mutability -- because in this case it ends up increasing performance as well: Rather than create and re-create Longs as counts, it uses a "mutable Long" -- AtomicLong. An array of one long would have done the trick too. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.