[jira] [Resolved] (MATH-418) add a storeless version of Percentile
[ https://issues.apache.org/jira/browse/MATH-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz resolved MATH-418. -- Resolution: Fixed Fix Version/s: (was: 4.0) 3.4 30-may patch with the following modifications committed in r 1604443: * Changed class names to "PSquare" to match references * Changed default quantile to 50 to be consistent with Percentile * Changed some hashcode implementations to use jdk Arrays.hashcode * Extracted constants to avoid repeated initialization (low, high marker indexes) * Changed random data tests to use a fixed seed * Miscellaneous javadoc edits Thanks for the patch! > add a storeless version of Percentile > - > > Key: MATH-418 > URL: https://issues.apache.org/jira/browse/MATH-418 > Project: Commons Math > Issue Type: New Feature >Affects Versions: 2.1 >Reporter: Luc Maisonobe > Fix For: 3.4 > > Attachments: 30-may-2014-418-psquare-patch, 418-psquare-patch, > psquare-patch > > > The Percentile class can handle only in-memory data. > It would be interesting to use an on-line algorithm to estimate quantiles as > a storeless statistic. > An example of such an algorithm is the exponentially weighted stochastic > approximation described in a 2000 paper by Fei Chen , Diane Lambert and > José C. Pinheiro "Incremental Quantile Estimation for Massive Tracking" which > can be retrieved from CiteSeerX at > [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.105.1580]. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Resolved] (COLLECTIONS-532) MapUtils.predicatedMap(map, keypredicate,valuepredicate) is not working as expected
[ https://issues.apache.org/jira/browse/COLLECTIONS-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brent Worden resolved COLLECTIONS-532. -- Resolution: Won't Fix Throwing exceptions has been the behavior of all predicated collections since the beginning. > MapUtils.predicatedMap(map, keypredicate,valuepredicate) is not working as > expected > --- > > Key: COLLECTIONS-532 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-532 > Project: Commons Collections > Issue Type: New Feature > Components: Collection, Map >Affects Versions: 4.0 > Environment: ubuntu/java8 >Reporter: Bhanupavansingh > > I expected that MapUtils.predicatedMap() includes those entries of the > specified map that match the specified key-predicate and specified > value-predicate.I expected that entries that do not match either of the > predicates not included i the returned map. > But in as per the code of org.apache.commons.collections4.map. {code} > PredicatedMap.validate() > protected void validate(final K key, final V value) { > if (keyPredicate != null && keyPredicate.evaluate(key) == false) { > throw new IllegalArgumentException("Cannot add key - Predicate > rejected it"); > } > if (valuePredicate != null && valuePredicate.evaluate(value) == > false) { > throw new IllegalArgumentException("Cannot add value - Predicate > rejected it"); > } > } > {code} > if evaluation of key or value predicate fails an IllegalArgumentException is > thrown. > Predicates are passed to input map to test if an entry is to be included or > not. If the evaluation of this predicate itself throws an exception based on > result of predicate, then this method is useless and cannot be used to filter > entries of a map(using predicates) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (COLLECTIONS-532) MapUtils.predicatedMap(map, keypredicate,valuepredicate) is not working as expected
[ https://issues.apache.org/jira/browse/COLLECTIONS-532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brent Worden updated COLLECTIONS-532: - Description: I expected that MapUtils.predicatedMap() includes those entries of the specified map that match the specified key-predicate and specified value-predicate.I expected that entries that do not match either of the predicates not included i the returned map. But in as per the code of org.apache.commons.collections4.map. {code} PredicatedMap.validate() protected void validate(final K key, final V value) { if (keyPredicate != null && keyPredicate.evaluate(key) == false) { throw new IllegalArgumentException("Cannot add key - Predicate rejected it"); } if (valuePredicate != null && valuePredicate.evaluate(value) == false) { throw new IllegalArgumentException("Cannot add value - Predicate rejected it"); } } {code} if evaluation of key or value predicate fails an IllegalArgumentException is thrown. Predicates are passed to input map to test if an entry is to be included or not. If the evaluation of this predicate itself throws an exception based on result of predicate, then this method is useless and cannot be used to filter entries of a map(using predicates) was: I expected that MapUtils.predicatedMap() includes those entries of the specified map that match the specified key-predicate and specified value-predicate.I expected that entries that do not match either of the predicates not included i the returned map. But in as per the code of org.apache.commons.collections4.map. PredicatedMap.validate() protected void validate(final K key, final V value) { if (keyPredicate != null && keyPredicate.evaluate(key) == false) { throw new IllegalArgumentException("Cannot add key - Predicate rejected it"); } if (valuePredicate != null && valuePredicate.evaluate(value) == false) { throw new IllegalArgumentException("Cannot add value - Predicate rejected it"); } } if evaluation of key or value predicate fails an IllegalArgumentException is thrown. Predicates are passed to input map to test if an entry is to be included or not. If the evaluation of this predicate itself throws an exception based on result of predicate, then this method is useless and cannot be used to filter entries of a map(using predicates) > MapUtils.predicatedMap(map, keypredicate,valuepredicate) is not working as > expected > --- > > Key: COLLECTIONS-532 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-532 > Project: Commons Collections > Issue Type: New Feature > Components: Collection, Map >Affects Versions: 4.0 > Environment: ubuntu/java8 >Reporter: Bhanupavansingh > > I expected that MapUtils.predicatedMap() includes those entries of the > specified map that match the specified key-predicate and specified > value-predicate.I expected that entries that do not match either of the > predicates not included i the returned map. > But in as per the code of org.apache.commons.collections4.map. {code} > PredicatedMap.validate() > protected void validate(final K key, final V value) { > if (keyPredicate != null && keyPredicate.evaluate(key) == false) { > throw new IllegalArgumentException("Cannot add key - Predicate > rejected it"); > } > if (valuePredicate != null && valuePredicate.evaluate(value) == > false) { > throw new IllegalArgumentException("Cannot add value - Predicate > rejected it"); > } > } > {code} > if evaluation of key or value predicate fails an IllegalArgumentException is > thrown. > Predicates are passed to input map to test if an entry is to be included or > not. If the evaluation of this predicate itself throws an exception based on > result of predicate, then this method is useless and cannot be used to filter > entries of a map(using predicates) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (JCS-131) AddressUtil.obtainFinalThreeDigitsOfAddressAsString does not allow for IPV6
Sebb created JCS-131: Summary: AddressUtil.obtainFinalThreeDigitsOfAddressAsString does not allow for IPV6 Key: JCS-131 URL: https://issues.apache.org/jira/browse/JCS-131 Project: Commons JCS Issue Type: Bug Reporter: Sebb AddressUtilTest is failing on Jenkins/Continuum. The problem appears to be that HostNameUtil.getLocalHostAddress() can return an IPv6 address which does not have the expected format. {noformat} INFO [AddressUtil] - WARN [AddressUtil] - {noformat} The String only appears to be used in KeyGeneratorUtil.generateRequestId(). This will be passed "000" if AddressUtil fails. Possible fixes: - change AddressUtil to handle IPv6 (I assume it must return digits) - change AddressUtilTest to ignore the failure if the local address is IPv6 -- This message was sent by Atlassian JIRA (v6.2#6252)