Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1879] Inject DisplayRecommendedPipe to NaryMappingProperty #1981

Merged
merged 11 commits into from
Oct 2, 2023
Prev Previous commit
Next Next commit
ready for merge
muyangye committed Sep 9, 2023
commit c0a2e1b0193fb3cbbb3c05d4e59dc87aba31ccd6
Original file line number Diff line number Diff line change
@@ -26,13 +26,14 @@

## Description

This processor rounds numeric values to the given digit/precision.
This processor rounds numeric values to the given decimal places.
It supports multiple rounding strategies.

***

## Required input

This processor requires an event that provides numbers.
This processor requires an event that provides numerical properties.

***

@@ -44,13 +45,20 @@ Select which fields of the event should be rounded.

### Number of Digits

Specify the number of digits after the decimal point to round/keep, e.g., if number is 2.8935 and #digits is 3,
Specify the number of digits after the decimal point to round/keep, e.g., if number is 2.8935 and 'digits' is 3,
the result will be 2.894.

### Mode of Rounding

Specify the mode of rounding. All supported modes
are [here](https://docs.oracle.com/javase/8/docs/api/java/math/RoundingMode.html).
Specify the mode of rounding.
Supported rounding modes:
* `UP`: Rounding mode to round away from zero. Always increments the digit prior to a non-zero discarded fraction. Note that this rounding mode never decreases the magnitude of the calculated value.
* `DOWN`: Rounding mode to round towards zero. Never increments the digit prior to a discarded fraction (i.e., truncates). Note that this rounding mode never increases the magnitude of the calculated value.
* `CEILING`: Rounding mode to round towards positive infinity. If the result is positive, behaves as for `UP`; if negative, behaves as for `DOWN`. Note that this rounding mode never decreases the calculated value
* `FLOOR`: Rounding mode to round towards negative infinity. If the result is positive, behave as for `DOWN`; if negative, behave as for `UP`. Note that this rounding mode never increases the calculated value.
* `HALF_UP`: Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up. Behaves as for `UP` if the discarded fraction is ≥ 0.5; otherwise, behaves as for `DOWN`.
* `HALF_DOWN`: Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. Behaves as for `UP` if the discarded fraction is > 0.5; otherwise, behaves as for `DOWN`.
* `HALF_EVEN`: Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor. Behaves as for `HALF_UP` if the digit to the left of the discarded fraction is odd; behaves as for `HALF_DOWN` if it's even. Note that this is the rounding mode that statistically minimizes cumulative error when applied repeatedly over a sequence of calculations.

## Output

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -15,14 +15,14 @@
# limitations under the License.
#

org.apache.streampipes.processors.transformation.jvm.round.title=Number Rounder
org.apache.streampipes.processors.transformation.jvm.round.title=Numeric Rounding
org.apache.streampipes.processors.transformation.jvm.round.description=Round numeric values

fields.title=Fields to Be Rounded
fields.description=The fields which should be rounded
fields.description=Select the fields which should be rounded

num-digits.title=Number of Digits
num-digits.description=How many digits after decimal point to round/keep?
num-digits.title=Number of Decimal Places
num-digits.description=How many decimal places to keep after rounding

rounding-mode.title=Mode of Rounding
rounding-mode.description=See https://docs.oracle.com/javase/8/docs/api/java/math/RoundingMode.html
rounding-mode.description=Which rounding mode should be applied?
You are viewing a condensed version of this merge commit. You can view the full changes here.