|
dxFeed Graal CXX API v7.0.0
|
Classes | |
| struct | AdditionalUnderlyings |
| Represents a set of additional underlyings for a given option. More... | |
| struct | CFI |
| A wrapper class for Classification of Financial Instruments code as defined in ISO 10962 standard. More... | |
| struct | PriceIncrements |
| Represents rules for valid price quantization for a given instrument on a certain exchange. More... | |
Enumerations | |
| enum class | RoundingMode : std::int32_t { RoundingMode::ROUNDING_MODE_UP = 0 , RoundingMode::ROUNDING_MODE_DOWN , RoundingMode::ROUNDING_MODE_CEILING , RoundingMode::ROUNDING_MODE_FLOOR , RoundingMode::ROUNDING_MODE_HALF_UP , RoundingMode::ROUNDING_MODE_HALF_DOWN , RoundingMode::ROUNDING_MODE_HALF_EVEN , RoundingMode::ROUNDING_MODE_UNNECESSARY } |
| Specifies a rounding behavior for numerical operations capable of discarding precision. More... | |
Functions | |
| template<typename MapLikeType> requires (!std::convertible_to<MapLikeType, StringLike>) | |
| static Ptr | AdditionalUnderlyings::valueOf (const MapLikeType &map) |
| Returns an instance of additional underlyings for specified internal representation. | |
|
strong |
Specifies a rounding behavior for numerical operations capable of discarding precision.
Each rounding mode indicates how the least significant returned digit of a rounded result is to be calculated. If fewer digits are returned than the digits needed to represent the exact numerical result, the discarded digits will be referred to as the discarded fraction regardless of the digits' contribution to the value of the number. In other words, considered as a numerical value, the discarded fraction could have an absolute value greater than one.
https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/math/RoundingMode.html
| Enumerator | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ROUNDING_MODE_UP | 0 | 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. Example:
| ||||||||||||||||||||||
| ROUNDING_MODE_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. Example:
| |||||||||||||||||||||||
| ROUNDING_MODE_CEILING | Rounding mode to round towards positive infinity. If the result is positive, behaves as for ROUNDING_MODE_UP; if negative, behaves as for ROUNDING_MODE_DOWN. Note that this rounding mode never decreases the calculated value. Example:
| |||||||||||||||||||||||
| ROUNDING_MODE_FLOOR | Rounding mode to round towards negative infinity. If the result is positive, behave as for ROUNDING_MODE_DOWN; if negative, behave as for ROUNDING_MODE_UP. Note that this rounding mode never increases the calculated value. Example:
| |||||||||||||||||||||||
| ROUNDING_MODE_HALF_UP | Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up. Behaves as for ROUNDING_MODE_UP if the discarded fraction is <= 0.5; otherwise, behaves as for ROUNDING_MODE_DOWN. Note that this is the rounding mode commonly taught at school. Example:
| |||||||||||||||||||||||
| ROUNDING_MODE_HALF_DOWN | Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. Behaves as for ROUNDING_MODE_UP if the discarded fraction is > 0.5; otherwise, behaves as for ROUNDING_MODE_DOWN. Example:
| |||||||||||||||||||||||
| ROUNDING_MODE_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 ROUNDING_MODE_HALF_UP if the digit to the left of the discarded fraction is odd; behaves as for ROUNDING_MODE_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. It is sometimes known as "Banker's rounding" and is chiefly used in the USA. This rounding mode is analogous to the rounding policy used for Example:
| |||||||||||||||||||||||
| ROUNDING_MODE_UNNECESSARY | Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary. If this rounding mode is specified on an operation that yields an inexact result, an Java Example:
| |||||||||||||||||||||||
|
static |
Returns an instance of additional underlyings for specified internal representation.
See AdditionalUnderlyings::getMap() for details about internal representation.
| MapLikeType | The type of map. std::map<K, V>, std::unordered_map<K, V>, QMap<K, V>, std::vector<std::pair<K, V>> etc. excluding the type std::initializer_list<std::pair<K, V>>. Where K is a string-like type and V is a type convertible to double. |
| map | The map-like container. |
| JavaException("IllegalArgumentException") | if data contains invalid values. |