[jira] [Work logged] (TEXT-207) Include DoubleFormats utility from commons-geometry
[ https://issues.apache.org/jira/browse/TEXT-207?focusedWorklogId=621338&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621338 ] ASF GitHub Bot logged work on TEXT-207: --- Author: ASF GitHub Bot Created on: 11/Jul/21 03:12 Start Date: 11/Jul/21 03:12 Worklog Time Spent: 10m Work Description: kinow commented on a change in pull request #248: URL: https://github.com/apache/commons-text/pull/248#discussion_r667413903 ## File path: src/main/java/org/apache/commons/text/numbers/DoubleFormat.java ## @@ -0,0 +1,732 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.text.numbers; + +import java.text.DecimalFormatSymbols; +import java.util.Objects; +import java.util.function.DoubleFunction; +import java.util.function.Function; + +/** Enum containing standard double format types with methods to produce + * configured formatter instances. This type is intended to provide a + * quick and convenient way to create lightweight, thread-safe double format functions + * for common format types using a builder pattern. + * + * Comparison with DecimalFormat + * This type provides some of the same functionality as Java's own + * {@link java.text.DecimalFormat}. However, unlike {@code DecimalFormat}, the format + * functions produced by this type are lightweight and thread-safe, making them + * much easier to work with in multi-threaded environments. They also provide performance + * comparable to, and in many cases faster than, {@code DecimalFormat}. + * + * Examples Review comment: Maybe before the examples, besides talking about this implementation & `DecimalFormat`, and thread-safety, also include a one-sentence long description for locale? The examples contain an example with a `locale` variable, and some javadocs in the other class mention locale & thousands separators I think. Maybe worth describing how/if we will handle it too? ## File path: src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java ## @@ -0,0 +1,725 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.text.numbers; + +/** Internal class representing a decimal value parsed into separate components. Each number + * is represented with + * + * a boolean flag for the sign, + * a sequence of the digits {@code 0 - 10} representing an unsigned integer with leading and trailing zeros + * removed, and + * an exponent value that when applied to the base 10 digits produces a floating point value with the + * correct magnitude. + * + * Examples + * + * DoubleNegativeDigitsExponent + * 0.0false[0]0 + * 1.2false[1, 2]-1 + * -0.00971true[9, 7, 1]-5 + * 56300true[5, 6, 3]2 + * + */ +final class ParsedDecimal { + +/** Interface containing values used during string formatting. + */ +interface FormatOptions { + +/** Return true if fraction placeholders (e.g., {@code ".0"} in {@code "1.0"}) + * should be included. + * @return true if fraction placeholders should be included + */ +boolean getIncludeFractionPlaceholder(); + +/** Return true if the string zero should be prefixed with the minus sign + * for negative zero values. + * @return true if the minus zero string should be allowed + */ +boolean g
[GitHub] [commons-text] kinow commented on a change in pull request #248: TEXT-207: adding DoubleFormat utility
kinow commented on a change in pull request #248: URL: https://github.com/apache/commons-text/pull/248#discussion_r667413903 ## File path: src/main/java/org/apache/commons/text/numbers/DoubleFormat.java ## @@ -0,0 +1,732 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.text.numbers; + +import java.text.DecimalFormatSymbols; +import java.util.Objects; +import java.util.function.DoubleFunction; +import java.util.function.Function; + +/** Enum containing standard double format types with methods to produce + * configured formatter instances. This type is intended to provide a + * quick and convenient way to create lightweight, thread-safe double format functions + * for common format types using a builder pattern. + * + * Comparison with DecimalFormat + * This type provides some of the same functionality as Java's own + * {@link java.text.DecimalFormat}. However, unlike {@code DecimalFormat}, the format + * functions produced by this type are lightweight and thread-safe, making them + * much easier to work with in multi-threaded environments. They also provide performance + * comparable to, and in many cases faster than, {@code DecimalFormat}. + * + * Examples Review comment: Maybe before the examples, besides talking about this implementation & `DecimalFormat`, and thread-safety, also include a one-sentence long description for locale? The examples contain an example with a `locale` variable, and some javadocs in the other class mention locale & thousands separators I think. Maybe worth describing how/if we will handle it too? ## File path: src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java ## @@ -0,0 +1,725 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.text.numbers; + +/** Internal class representing a decimal value parsed into separate components. Each number + * is represented with + * + * a boolean flag for the sign, + * a sequence of the digits {@code 0 - 10} representing an unsigned integer with leading and trailing zeros + * removed, and + * an exponent value that when applied to the base 10 digits produces a floating point value with the + * correct magnitude. + * + * Examples + * + * DoubleNegativeDigitsExponent + * 0.0false[0]0 + * 1.2false[1, 2]-1 + * -0.00971true[9, 7, 1]-5 + * 56300true[5, 6, 3]2 + * + */ +final class ParsedDecimal { + +/** Interface containing values used during string formatting. + */ +interface FormatOptions { + +/** Return true if fraction placeholders (e.g., {@code ".0"} in {@code "1.0"}) + * should be included. + * @return true if fraction placeholders should be included + */ +boolean getIncludeFractionPlaceholder(); + +/** Return true if the string zero should be prefixed with the minus sign + * for negative zero values. + * @return true if the minus zero string should be allowed + */ +boolean getSignedZero(); + +/** Get an array containing the localized digit characters 0-9 in that order. + * This string must be non-null and have a length of 10. + * @return array containing the digit characters 0-9 + */ +char[] getDigits(); + +/** Get the decimal separator character. + * @return decimal separator character + */ +char getDecimalSeparato
[jira] [Resolved] (MATH-1600) "NormalizedRandomGenerator" is-a "DoubleSupplier"
[ https://issues.apache.org/jira/browse/MATH-1600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles Sadowski resolved MATH-1600. --- Resolution: Resolved Interface removed in commit eab3bcec3c6ee118ec0adaf54d2ecb34c2449c08 ("master" branch). > "NormalizedRandomGenerator" is-a "DoubleSupplier" > - > > Key: MATH-1600 > URL: https://issues.apache.org/jira/browse/MATH-1600 > Project: Commons Math > Issue Type: Sub-task >Reporter: Gilles Sadowski >Priority: Minor > Labels: api, clean > Fix For: 4.0 > > Time Spent: 10m > Remaining Estimate: 0h > > What's the added value? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (MATH-1615) Remove "StableRandomGenerator" class
[ https://issues.apache.org/jira/browse/MATH-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles Sadowski resolved MATH-1615. --- Resolution: Done Commit 5fee542f820e233c59b796f01b737ae6a46964d7 ("master" branch). > Remove "StableRandomGenerator" class > > > Key: MATH-1615 > URL: https://issues.apache.org/jira/browse/MATH-1615 > Project: Commons Math > Issue Type: Sub-task >Affects Versions: 3.6.1 >Reporter: Gilles Sadowski >Assignee: Gilles Sadowski >Priority: Major > Fix For: 4.0 > > > Class is buggy (cf. RNG-137). > Fix and replacement are in the development version of "Commons RNG". -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (MATH-1614) Refactoring of "SimplexOptimizer"
[ https://issues.apache.org/jira/browse/MATH-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378559#comment-17378559 ] Gilles Sadowski commented on MATH-1614: --- Done in commit 46a0c3ae4140fd34cf8479362192bddb7b7b3e38 ("master" branch). Please review. > Refactoring of "SimplexOptimizer" > - > > Key: MATH-1614 > URL: https://issues.apache.org/jira/browse/MATH-1614 > Project: Commons Math > Issue Type: Task >Reporter: Gilles Sadowski >Priority: Major > Labels: api, design > Fix For: 4.0 > > > It is proposed to > * reduce the number of repetitive statements > * create an immutable {{Simplex}} class (to replace {{AbstractSimplex}}) -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (MATH-1615) Remove "StableRandomGenerator" class
Gilles Sadowski created MATH-1615: - Summary: Remove "StableRandomGenerator" class Key: MATH-1615 URL: https://issues.apache.org/jira/browse/MATH-1615 Project: Commons Math Issue Type: Sub-task Affects Versions: 3.6.1 Reporter: Gilles Sadowski Assignee: Gilles Sadowski Fix For: 4.0 Class is buggy (cf. RNG-137). Fix and replacement are in the development version of "Commons RNG". -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?focusedWorklogId=621324&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621324 ] ASF GitHub Bot logged work on LANG-1664: Author: ASF GitHub Bot Created on: 11/Jul/21 00:05 Start Date: 11/Jul/21 00:05 Worklog Time Spent: 10m Work Description: amarlearning closed pull request #777: URL: https://github.com/apache/commons-lang/pull/777 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621324) Time Spent: 50m (was: 40m) > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?focusedWorklogId=621323&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621323 ] ASF GitHub Bot logged work on LANG-1664: Author: ASF GitHub Bot Created on: 11/Jul/21 00:05 Start Date: 11/Jul/21 00:05 Worklog Time Spent: 10m Work Description: amarlearning commented on pull request #777: URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877719394 @oneiros-de sorry my mistake, I got confused. Closing my PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621323) Time Spent: 40m (was: 0.5h) > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-lang] amarlearning closed pull request #777: LANG-1664 - Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an Int
amarlearning closed pull request #777: URL: https://github.com/apache/commons-lang/pull/777 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-lang] amarlearning commented on pull request #777: LANG-1664 - Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an Int
amarlearning commented on pull request #777: URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877719394 @oneiros-de sorry my mistake, I got confused. Closing my PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?focusedWorklogId=621322&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621322 ] ASF GitHub Bot logged work on LANG-1664: Author: ASF GitHub Bot Created on: 10/Jul/21 23:03 Start Date: 10/Jul/21 23:03 Worklog Time Spent: 10m Work Description: oneiros-de commented on pull request #777: URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877714792 This is wrong - the "separator" is not an index but a char used by `String#indexof(int)`. See also the unit test `StringUtilsSubstringTest.testSubstringBefore_StringInt` So the description of the method is mostly correct (the description of `separator` is wrong, should be "character (Unicode code point", not "String"); the examples simply don't match the code (the unit test has working examples). An `@see String#indexOf(int)` would help. And this should be done for similar functions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621322) Time Spent: 0.5h (was: 20m) > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-lang] oneiros-de commented on pull request #777: LANG-1664 - Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an Int
oneiros-de commented on pull request #777: URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877714792 This is wrong - the "separator" is not an index but a char used by `String#indexof(int)`. See also the unit test `StringUtilsSubstringTest.testSubstringBefore_StringInt` So the description of the method is mostly correct (the description of `separator` is wrong, should be "character (Unicode code point", not "String"); the examples simply don't match the code (the unit test has working examples). An `@see String#indexOf(int)` would help. And this should be done for similar functions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?focusedWorklogId=621321&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621321 ] ASF GitHub Bot logged work on LANG-1664: Author: ASF GitHub Bot Created on: 10/Jul/21 22:18 Start Date: 10/Jul/21 22:18 Worklog Time Spent: 10m Work Description: coveralls commented on pull request #777: URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877711430 [![Coverage Status](https://coveralls.io/builds/41269638/badge)](https://coveralls.io/builds/41269638) Coverage remained the same at 94.976% when pulling **5b4b80db28a3984000294c7264f9b1b81bd963fe on amarlearning:LANG-1664-javadoc-substringBefore** into **b0d9979fb6547651d37bda56e150e505c705d3d9 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621321) Time Spent: 20m (was: 10m) > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-lang] coveralls commented on pull request #777: LANG-1664 - Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an Int
coveralls commented on pull request #777: URL: https://github.com/apache/commons-lang/pull/777#issuecomment-877711430 [![Coverage Status](https://coveralls.io/builds/41269638/badge)](https://coveralls.io/builds/41269638) Coverage remained the same at 94.976% when pulling **5b4b80db28a3984000294c7264f9b1b81bd963fe on amarlearning:LANG-1664-javadoc-substringBefore** into **b0d9979fb6547651d37bda56e150e505c705d3d9 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?focusedWorklogId=621320&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621320 ] ASF GitHub Bot logged work on LANG-1664: Author: ASF GitHub Bot Created on: 10/Jul/21 22:10 Start Date: 10/Jul/21 22:10 Worklog Time Spent: 10m Work Description: amarlearning opened a new pull request #777: URL: https://github.com/apache/commons-lang/pull/777 Ready for review -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621320) Remaining Estimate: 0h Time Spent: 10m > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-lang] amarlearning opened a new pull request #777: LANG-1664 - Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an Int
amarlearning opened a new pull request #777: URL: https://github.com/apache/commons-lang/pull/777 Ready for review -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (MATH-1597) Low-discrepancy sequence
[ https://issues.apache.org/jira/browse/MATH-1597?focusedWorklogId=621297&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621297 ] ASF GitHub Bot logged work on MATH-1597: Author: ASF GitHub Bot Created on: 10/Jul/21 15:39 Start Date: 10/Jul/21 15:39 Worklog Time Spent: 10m Work Description: amarlearning commented on a change in pull request #190: URL: https://github.com/apache/commons-math/pull/190#discussion_r667349474 ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. * * This operation can be performed in O(1). * * @param index the index in the sequence to skip to - * @return the i-th point in the Halton sequence - * @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 + * @return the copy of this sequence + * @throws NotPositiveException if index < 0 */ -public double[] skipTo(final int index) { +@Override +public LowDiscrepancySequence jump(final long index) throws NotPositiveException { +if(index < 0) { +throw new NotPositiveException(index); +} +HaltonSequenceGenerator copy = this.copy(); +copy.performJump(index); +return copy; +} + +/** + * Do jump at the index. + * @param index + */ +private void performJump(long index) { count = index; -return get(); } /** - * Returns the index i of the next point in the Halton sequence that will be returned - * by calling {@link #get()}. - * - * @return the index of the next point + * Private constructor avoid side effects. + * @return copy of HaltonSequenceGenerator */ -public int getNextIndex() { -return count; +private HaltonSequenceGenerator copy() { +return new HaltonSequenceGenerator(this); } + + Review comment: extra line -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621297) Time Spent: 2.5h (was: 2h 20m) > Low-discrepancy sequence > > > Key: MATH-1597 > URL: https://issues.apache.org/jira/browse/MATH-1597 > Project: Commons Math > Issue Type: Sub-task >Reporter: Gilles Sadowski >Priority: Minor > Fix For: 4.0 > > Time Spent: 2.5h > Remaining Estimate: 0h > > Two low-discrepancy sequences are implemented in Commons Math (in package > {{o.a.c.math4.legacy.random}}: > * {{SobolSequenceGenerator}} > * {{HaltonSequenceGenerator}} > They both provide several methods: > * {{nextVector()}} > * {{skipTo(int)}} > * {{getNextIndex()}} > of which only the first is part of their common API through the > {{RandomVectorGenerator}}. > I propose to create an interface that would better represent the specific > concept (and avoid the confusion with pseudo-random generators): > {code} > public interface LowDiscrepancySequence extends Supplier { /* ... > */} > {code} > Thus, instead of class {{SobolSequenceGenerator}} we'd have: > {code} > public class SobolSequence implements LowDiscrepancySequence { > // ... > } > {code} > This functionality could be moved to a new {{o.a.c.m.legacy.quasirandom}} > package (?). > Method {{skipTo}} could be replaced with an API similar to Commons RNG > {{JumpableUniformRandomProvider}} (?). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (MATH-1597) Low-discrepancy sequence
[ https://issues.apache.org/jira/browse/MATH-1597?focusedWorklogId=621296&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621296 ] ASF GitHub Bot logged work on MATH-1597: Author: ASF GitHub Bot Created on: 10/Jul/21 15:38 Start Date: 10/Jul/21 15:38 Worklog Time Spent: 10m Work Description: amarlearning commented on a change in pull request #190: URL: https://github.com/apache/commons-math/pull/190#discussion_r667349534 ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. * * This operation can be performed in O(1). * * @param index the index in the sequence to skip to - * @return the i-th point in the Halton sequence - * @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 + * @return the copy of this sequence + * @throws NotPositiveException if index < 0 Review comment: We can give the reference to the exception class as well `org.apache.commons.math4.legacy.exception.NotPositiveException` ## File path: commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGeneratorTest.java ## @@ -119,16 +118,30 @@ public void testConstructor2() throws Exception{ } @Test -public void testSkip() { -double[] result = generator.skipTo(5); +public void testJump() { +LowDiscrepancySequence copyOfSeq = generator.jump(5); +double[] result = copyOfSeq.get(); Assert.assertArrayEquals(referenceValues[5], result, 1e-3); -Assert.assertEquals(6, generator.getNextIndex()); + for (int i = 6; i < referenceValues.length; i++) { -result = generator.get(); +result = copyOfSeq.get(); Assert.assertArrayEquals(referenceValues[i], result, 1e-3); -Assert.assertEquals(i + 1, generator.getNextIndex()); } } + +@Test(expected = NotPositiveException.class) +public void testJumpNegativeIndex() { +LowDiscrepancySequence copyOfSeq = generator.jump(-5); +} + + + +@Test Review comment: Can you please remove these 2 extra lines as well ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. Review comment: Make the `J` capital ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. * * This operation can be performed in O(1). * * @param index the index in the sequence to skip to - * @return the i-th point in the Halton sequence - * @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 + * @return the copy of this sequence + * @throws NotPositiveException if index < 0 */ -public double[] skipTo(final int index) { +@Override +public LowDiscrepancySequence jump(final long index) throws NotPositiveException { +if(index < 0) { +throw new NotPositiveException(index); +} +
[GitHub] [commons-math] amarlearning commented on a change in pull request #190: MATH-1597: LowDiscrepancySequence supplier/jump for Halton and Sobol
amarlearning commented on a change in pull request #190: URL: https://github.com/apache/commons-math/pull/190#discussion_r667349474 ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. * * This operation can be performed in O(1). * * @param index the index in the sequence to skip to - * @return the i-th point in the Halton sequence - * @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 + * @return the copy of this sequence + * @throws NotPositiveException if index < 0 */ -public double[] skipTo(final int index) { +@Override +public LowDiscrepancySequence jump(final long index) throws NotPositiveException { +if(index < 0) { +throw new NotPositiveException(index); +} +HaltonSequenceGenerator copy = this.copy(); +copy.performJump(index); +return copy; +} + +/** + * Do jump at the index. + * @param index + */ +private void performJump(long index) { count = index; -return get(); } /** - * Returns the index i of the next point in the Halton sequence that will be returned - * by calling {@link #get()}. - * - * @return the index of the next point + * Private constructor avoid side effects. + * @return copy of HaltonSequenceGenerator */ -public int getNextIndex() { -return count; +private HaltonSequenceGenerator copy() { +return new HaltonSequenceGenerator(this); } + + Review comment: extra line -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-math] amarlearning commented on a change in pull request #190: MATH-1597: LowDiscrepancySequence supplier/jump for Halton and Sobol
amarlearning commented on a change in pull request #190: URL: https://github.com/apache/commons-math/pull/190#discussion_r667349534 ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. * * This operation can be performed in O(1). * * @param index the index in the sequence to skip to - * @return the i-th point in the Halton sequence - * @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 + * @return the copy of this sequence + * @throws NotPositiveException if index < 0 Review comment: We can give the reference to the exception class as well `org.apache.commons.math4.legacy.exception.NotPositiveException` ## File path: commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGeneratorTest.java ## @@ -119,16 +118,30 @@ public void testConstructor2() throws Exception{ } @Test -public void testSkip() { -double[] result = generator.skipTo(5); +public void testJump() { +LowDiscrepancySequence copyOfSeq = generator.jump(5); +double[] result = copyOfSeq.get(); Assert.assertArrayEquals(referenceValues[5], result, 1e-3); -Assert.assertEquals(6, generator.getNextIndex()); + for (int i = 6; i < referenceValues.length; i++) { -result = generator.get(); +result = copyOfSeq.get(); Assert.assertArrayEquals(referenceValues[i], result, 1e-3); -Assert.assertEquals(i + 1, generator.getNextIndex()); } } + +@Test(expected = NotPositiveException.class) +public void testJumpNegativeIndex() { +LowDiscrepancySequence copyOfSeq = generator.jump(-5); +} + + + +@Test Review comment: Can you please remove these 2 extra lines as well ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. Review comment: Make the `J` capital ## File path: commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/quasirandom/HaltonSequenceGenerator.java ## @@ -151,31 +159,44 @@ public HaltonSequenceGenerator(final int dimension, final int[] bases, final int * @param digit the j-th digit * @return the scrambled digit */ -protected int scramble(final int i, final int j, final int b, final int digit) { +protected long scramble(final int i, final int j, final int b, final long digit) { return weight != null ? (weight[i] * digit) % b : digit; } /** - * Skip to the i-th point in the Halton sequence. + * jump to the i-th point in the Halton sequence. * * This operation can be performed in O(1). * * @param index the index in the sequence to skip to - * @return the i-th point in the Halton sequence - * @throws org.apache.commons.math4.legacy.exception.NotPositiveException NotPositiveException if index < 0 + * @return the copy of this sequence + * @throws NotPositiveException if index < 0 */ -public double[] skipTo(final int index) { +@Override +public LowDiscrepancySequence jump(final long index) throws NotPositiveException { +if(index < 0) { +throw new NotPositiveException(index); +} +HaltonSequenceGenerator copy = this.copy(); +copy.performJump(index); +return copy; +} + +/** + * Do jump at the index. + * @param index + */ +private void performJump(long index) { count = index; -return get(); } /** - * Returns the index i of the next point in the Halton sequence that will be returned - * by calling {@link #get()}. -
[jira] [Commented] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378481#comment-17378481 ] Gary D. Gregory commented on LANG-1664: --- [~amarlearning] Feel free :-) > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (LANG-1664) Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int
[ https://issues.apache.org/jira/browse/LANG-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378475#comment-17378475 ] Amar Prakash Pandey commented on LANG-1664: --- [~ggregory] Can I take this one? > Javadoc for StringUtils.substringBefore(String str, int separator) doesn't > mention that the separator is an int > > > Key: LANG-1664 > URL: https://issues.apache.org/jira/browse/LANG-1664 > Project: Commons Lang > Issue Type: Bug > Components: lang.* >Affects Versions: 3.12.0 >Reporter: Martin Schröder >Priority: Major > > The javadoc of {{StringUtils.substringBefore(String str, int separator)}} > talks of the separator as a String, not as an int (and so doesn't explain > what the separator param is). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (RNG-155) ZigguratNormalizedGaussianSampler to use a table size of 256
Alex Herbert created RNG-155: Summary: ZigguratNormalizedGaussianSampler to use a table size of 256 Key: RNG-155 URL: https://issues.apache.org/jira/browse/RNG-155 Project: Commons RNG Issue Type: Improvement Components: sampling Affects Versions: 1.3 Reporter: Alex Herbert Fix For: 1.4 The ZigguratNormalizedGaussianSampler uses a table size of 128. The source paper provides constants for a table size of 256. This table size brings a small performance gain as the table is used for more of the sampling and the rejection algorithm for sampling at the edge of the ziggurat is used less. The JMH examples module contains an implementation of the 256 size table for performance testing (see [RNG-152]). I suggest swapping the implementations so the 128 table size is in the examples and the 256 table size is in the main sampling package. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (RNG-152) Update sampling to use ZigguratSampler.NormalizedGaussian
[ https://issues.apache.org/jira/browse/RNG-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Herbert resolved RNG-152. -- Fix Version/s: 1.4 Resolution: Implemented Added in commit: df423bf1bbd2679177095915242e724a1e625b4a > Update sampling to use ZigguratSampler.NormalizedGaussian > - > > Key: RNG-152 > URL: https://issues.apache.org/jira/browse/RNG-152 > Project: Commons RNG > Issue Type: Improvement > Components: sampling >Reporter: Alex Herbert >Priority: Minor > Fix For: 1.4 > > > The new ZigguratSampler.NormalizedGaussian has better performance than the > current ZigguratNormalizedGaussianSampler on JDK 8 and no worse performance > on later JDK platforms. > Current samplers using a Gaussian distribution should update to the new > ZigguratSampler.NormalizedGaussian. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (NUMBERS-166) SortInPlace should not implement BiConsumer
[ https://issues.apache.org/jira/browse/NUMBERS-166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Juntunen resolved NUMBERS-166. --- Resolution: Done > SortInPlace should not implement BiConsumer > --- > > Key: NUMBERS-166 > URL: https://issues.apache.org/jira/browse/NUMBERS-166 > Project: Commons Numbers > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > The {{SortInPlace}} enum uses a varargs in the method signature that is not > compatible with the {{BiConsumer}} interface that it implements. The > interface implementation should be removed and the sort method renamed from > {{accept}} to {{apply}} to better reflect that the arguments are being > modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NUMBERS-166) SortInPlace should not implement BiConsumer
[ https://issues.apache.org/jira/browse/NUMBERS-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378460#comment-17378460 ] Matt Juntunen commented on NUMBERS-166: --- Done in commit 437432572b9840ebf7b34efa5e0de35971a38f79 > SortInPlace should not implement BiConsumer > --- > > Key: NUMBERS-166 > URL: https://issues.apache.org/jira/browse/NUMBERS-166 > Project: Commons Numbers > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > The {{SortInPlace}} enum uses a varargs in the method signature that is not > compatible with the {{BiConsumer}} interface that it implements. The > interface implementation should be removed and the sort method renamed from > {{accept}} to {{apply}} to better reflect that the arguments are being > modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (NUMBERS-166) SortInPlace should not implement BiConsumer
[ https://issues.apache.org/jira/browse/NUMBERS-166?focusedWorklogId=621264&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621264 ] ASF GitHub Bot logged work on NUMBERS-166: -- Author: ASF GitHub Bot Created on: 10/Jul/21 12:08 Start Date: 10/Jul/21 12:08 Worklog Time Spent: 10m Work Description: asfgit merged pull request #101: URL: https://github.com/apache/commons-numbers/pull/101 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621264) Time Spent: 0.5h (was: 20m) > SortInPlace should not implement BiConsumer > --- > > Key: NUMBERS-166 > URL: https://issues.apache.org/jira/browse/NUMBERS-166 > Project: Commons Numbers > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > The {{SortInPlace}} enum uses a varargs in the method signature that is not > compatible with the {{BiConsumer}} interface that it implements. The > interface implementation should be removed and the sort method renamed from > {{accept}} to {{apply}} to better reflect that the arguments are being > modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-numbers] asfgit merged pull request #101: NUMBERS-166: removing BiConsumer implementation from SortInPlace
asfgit merged pull request #101: URL: https://github.com/apache/commons-numbers/pull/101 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (NUMBERS-166) SortInPlace should not implement BiConsumer
[ https://issues.apache.org/jira/browse/NUMBERS-166?focusedWorklogId=621263&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621263 ] ASF GitHub Bot logged work on NUMBERS-166: -- Author: ASF GitHub Bot Created on: 10/Jul/21 12:05 Start Date: 10/Jul/21 12:05 Worklog Time Spent: 10m Work Description: coveralls commented on pull request #101: URL: https://github.com/apache/commons-numbers/pull/101#issuecomment-877627416 [![Coverage Status](https://coveralls.io/builds/41267043/badge)](https://coveralls.io/builds/41267043) Coverage remained the same at 99.658% when pulling **437432572b9840ebf7b34efa5e0de35971a38f79 on darkma773r:numbers-166-sortinplace** into **4457bfdb65383de0daa9902ad0856f848892f364 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621263) Time Spent: 20m (was: 10m) > SortInPlace should not implement BiConsumer > --- > > Key: NUMBERS-166 > URL: https://issues.apache.org/jira/browse/NUMBERS-166 > Project: Commons Numbers > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > The {{SortInPlace}} enum uses a varargs in the method signature that is not > compatible with the {{BiConsumer}} interface that it implements. The > interface implementation should be removed and the sort method renamed from > {{accept}} to {{apply}} to better reflect that the arguments are being > modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-numbers] coveralls commented on pull request #101: NUMBERS-166: removing BiConsumer implementation from SortInPlace
coveralls commented on pull request #101: URL: https://github.com/apache/commons-numbers/pull/101#issuecomment-877627416 [![Coverage Status](https://coveralls.io/builds/41267043/badge)](https://coveralls.io/builds/41267043) Coverage remained the same at 99.658% when pulling **437432572b9840ebf7b34efa5e0de35971a38f79 on darkma773r:numbers-166-sortinplace** into **4457bfdb65383de0daa9902ad0856f848892f364 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (NUMBERS-166) SortInPlace should not implement BiConsumer
[ https://issues.apache.org/jira/browse/NUMBERS-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378452#comment-17378452 ] Matt Juntunen commented on NUMBERS-166: --- PR: https://github.com/apache/commons-numbers/pull/101 > SortInPlace should not implement BiConsumer > --- > > Key: NUMBERS-166 > URL: https://issues.apache.org/jira/browse/NUMBERS-166 > Project: Commons Numbers > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > The {{SortInPlace}} enum uses a varargs in the method signature that is not > compatible with the {{BiConsumer}} interface that it implements. The > interface implementation should be removed and the sort method renamed from > {{accept}} to {{apply}} to better reflect that the arguments are being > modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (NUMBERS-166) SortInPlace should not implement BiConsumer
[ https://issues.apache.org/jira/browse/NUMBERS-166?focusedWorklogId=621262&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-621262 ] ASF GitHub Bot logged work on NUMBERS-166: -- Author: ASF GitHub Bot Created on: 10/Jul/21 11:48 Start Date: 10/Jul/21 11:48 Worklog Time Spent: 10m Work Description: darkma773r opened a new pull request #101: URL: https://github.com/apache/commons-numbers/pull/101 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 621262) Remaining Estimate: 0h Time Spent: 10m > SortInPlace should not implement BiConsumer > --- > > Key: NUMBERS-166 > URL: https://issues.apache.org/jira/browse/NUMBERS-166 > Project: Commons Numbers > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > The {{SortInPlace}} enum uses a varargs in the method signature that is not > compatible with the {{BiConsumer}} interface that it implements. The > interface implementation should be removed and the sort method renamed from > {{accept}} to {{apply}} to better reflect that the arguments are being > modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-numbers] darkma773r opened a new pull request #101: NUMBERS-166: removing BiConsumer implementation from SortInPlace
darkma773r opened a new pull request #101: URL: https://github.com/apache/commons-numbers/pull/101 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (NUMBERS-77) Move utilities from "Commons Geometry"
[ https://issues.apache.org/jira/browse/NUMBERS-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Juntunen resolved NUMBERS-77. -- Fix Version/s: (was: 1.1) 1.0 Resolution: Fixed > Move utilities from "Commons Geometry" > -- > > Key: NUMBERS-77 > URL: https://issues.apache.org/jira/browse/NUMBERS-77 > Project: Commons Numbers > Issue Type: Task >Reporter: Gilles Sadowski >Priority: Major > Fix For: 1.0 > > Attachments: NUMBERS-77.diff > > Time Spent: 1h 40m > Remaining Estimate: 0h > > "Commons Geometry" defines utilities that would be a better fit in this > component. > Duplication of general-purpose codes should be avoided, in order to benefit > from consolidated usage (bug reporting, performance enhancements, ...). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NUMBERS-77) Move utilities from "Commons Geometry"
[ https://issues.apache.org/jira/browse/NUMBERS-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378451#comment-17378451 ] Matt Juntunen commented on NUMBERS-77: -- Closing this issue as no more utilities need to be moved into numbers. > Move utilities from "Commons Geometry" > -- > > Key: NUMBERS-77 > URL: https://issues.apache.org/jira/browse/NUMBERS-77 > Project: Commons Numbers > Issue Type: Task >Reporter: Gilles Sadowski >Priority: Major > Fix For: 1.1 > > Attachments: NUMBERS-77.diff > > Time Spent: 1h 40m > Remaining Estimate: 0h > > "Commons Geometry" defines utilities that would be a better fit in this > component. > Duplication of general-purpose codes should be avoided, in order to benefit > from consolidated usage (bug reporting, performance enhancements, ...). -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (NUMBERS-166) SortInPlace should not implement BiConsumer
Matt Juntunen created NUMBERS-166: - Summary: SortInPlace should not implement BiConsumer Key: NUMBERS-166 URL: https://issues.apache.org/jira/browse/NUMBERS-166 Project: Commons Numbers Issue Type: Improvement Reporter: Matt Juntunen The {{SortInPlace}} enum uses a varargs in the method signature that is not compatible with the {{BiConsumer}} interface that it implements. The interface implementation should be removed and the sort method renamed from {{accept}} to {{apply}} to better reflect that the arguments are being modified. -- This message was sent by Atlassian Jira (v8.3.4#803005)