[GitHub] metron issue #899: METRON-1405: Add Boyer-Moore majority vote algorithm to S...

2018-01-18 Thread mmiklavc
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/899 Pulling this PR until I can resolve and underlying issue with the counting semantics, however I believe this may by theoretically impossible without a 2-pass model. ---

[GitHub] metron issue #899: METRON-1405: Add Boyer-Moore majority vote algorithm to S...

2018-01-17 Thread ottobackwards
Github user ottobackwards commented on the issue: https://github.com/apache/metron/pull/899 @Test public void boyerMoore_calculates_plurality_from_list_of_values_o() throws Exception { List items = Arrays.asList(1, 1, 1,1, 2,2,3,3,4,4,4); BoyerMooreState state

[GitHub] metron issue #899: METRON-1405: Add Boyer-Moore majority vote algorithm to S...

2018-01-17 Thread mmiklavc
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/899 Yes - good catch - this not actually going to work without some modification. The count zeroes out when a majority is held by non-m values and gets reset to a new non-plurality, non-majority

[GitHub] metron issue #899: METRON-1405: Add Boyer-Moore majority vote algorithm to S...

2018-01-16 Thread ottobackwards
Github user ottobackwards commented on the issue: https://github.com/apache/metron/pull/899 Just in case: Note that that test is modified from your test ( _o ) ---

[GitHub] metron issue #899: METRON-1405: Add Boyer-Moore majority vote algorithm to S...

2018-01-16 Thread mmiklavc
Github user mmiklavc commented on the issue: https://github.com/apache/metron/pull/899 I'll look into the test as it's passing locally for me in my IDE. ---

[GitHub] metron issue #899: METRON-1405: Add Boyer-Moore majority vote algorithm to S...

2018-01-16 Thread ottobackwards
Github user ottobackwards commented on the issue: https://github.com/apache/metron/pull/899 This tests fails, I think something is wrong. ```java @Test public void boyerMoore_calculates_plurality_from_list_of_mixed_objects_o() throws Exception { List items