CACAO
|
An integral value of the form Constant + NumericInstruction. More...
Public Member Functions | |
Scalar () | |
Creates a scalar which equals zero. More... | |
Scalar (s4 constant) | |
Scalar (const NumericInstruction &instruction) | |
Scalar (s4 constant, const NumericInstruction &instruction) | |
Creates a scalar which equals constant + instruction. More... | |
s4 | constant () const |
NumericInstruction | instruction () const |
s4 | lower () const |
s4 | upper () const |
void | upperBoundOfMinimumWith (const Scalar &) |
Computes an upper bound of the minimum of this and the specified scalar. More... | |
void | lowerBoundOfMaximumWith (const Scalar &) |
Computes a lower bound of the maximum of this and the specified scalar. More... | |
void | upperBoundOfMaximumWith (const Scalar &) |
Computes an upper bound of the maximum of this and the specified scalar. More... | |
void | lowerBoundOfMinimumWith (const Scalar &) |
Computes a lower bound of the minimum of this and the specified scalar. More... | |
bool | tryAdd (const Scalar &) |
Tries to add a scalar to this scalar. More... | |
bool | trySubtract (const Scalar &) |
Tries to subtract a scalar from this scalar. More... | |
Static Public Member Functions | |
static s4 | min () |
static s4 | max () |
Private Attributes | |
s4 | _constant |
NumericInstruction | _instruction |
An integral value of the form Constant + NumericInstruction.
Definition at line 40 of file Scalar.hpp.
|
inline |
Creates a scalar which equals zero.
Definition at line 53 of file Scalar.hpp.
|
inlineexplicit |
Definition at line 58 of file Scalar.hpp.
|
inlineexplicit |
Definition at line 63 of file Scalar.hpp.
|
inline |
Creates a scalar which equals constant + instruction.
The expression must not over- or underflow!
Definition at line 72 of file Scalar.hpp.
|
inline |
Definition at line 86 of file Scalar.hpp.
|
inline |
Definition at line 87 of file Scalar.hpp.
|
inline |
Definition at line 89 of file Scalar.hpp.
Computes a lower bound of the maximum of this and the specified scalar.
The result is stored in this object.
Definition at line 140 of file Scalar.hpp.
Computes a lower bound of the minimum of this and the specified scalar.
The result is stored in this object.
Definition at line 59 of file Scalar.cpp.
|
inlinestatic |
Definition at line 48 of file Scalar.hpp.
|
inlinestatic |
Definition at line 47 of file Scalar.hpp.
bool Scalar::tryAdd | ( | const Scalar & | other | ) |
Tries to add a scalar to this scalar.
If an overflow can happen or the result is not representable as a scalar, this scalar will not be changed and false will be returned. Otherwise the return value is true.
Definition at line 88 of file Scalar.cpp.
bool Scalar::trySubtract | ( | const Scalar & | other | ) |
Tries to subtract a scalar from this scalar.
If an overflow can happen or the result is not representable as a scalar, this scalar will not be changed and false will be returned. Otherwise the return value is true.
Definition at line 118 of file Scalar.cpp.
|
inline |
Definition at line 90 of file Scalar.hpp.
Computes an upper bound of the maximum of this and the specified scalar.
The result is stored in this object.
Definition at line 30 of file Scalar.cpp.
Computes an upper bound of the minimum of this and the specified scalar.
The result is stored in this object.
Definition at line 134 of file Scalar.hpp.
|
private |
Definition at line 42 of file Scalar.hpp.
|
private |
Definition at line 43 of file Scalar.hpp.