#include <cDomainInteger.h>
List of all members.
Public Member Functions |
| cDomainInteger (longFib lInMinNumber, longFib lInMaxNumber) |
| cDomainInteger (longFib lInMinNumber, longFib lInMaxNumber, doubleFib dScalingFactor) |
| cDomainInteger (const cDomainInteger &domain) |
virtual string | getType () const |
virtual bool | isElement (const doubleFib dValue) const |
virtual bool | isInBoundaries (const doubleFib dValue) const |
virtual doubleFib | round (const doubleFib dValue) const |
doubleFib | getMaximum () const |
virtual doubleFib | getMinimum () const |
virtual doubleFib | getNull () const |
virtual bool | isUnscaledElement (const longFib lValue) const |
virtual longFib | roundUnscaled (const longFib lValue) const |
virtual longFib | getMaximumUnscaled () const |
virtual longFib | getMinimumUnscaled () const |
virtual longFib | getNullUnscaled () const |
virtual cDomainInteger * | clone () const |
virtual bool | operator== (const cDomain &domain) const |
virtual unsignedIntFib | getCompressedSize () const |
virtual unsignedIntFib | getCompressedSizeForValue () const |
virtual bool | storeXml (ostream &ostream) const |
virtual intFib | restoreXml (const TiXmlElement *pXmlElement) |
virtual bool | store (ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const |
virtual intFib | restore (cReadBits &iBitStream) |
virtual bool | storeValue (doubleFib dValue, ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const |
virtual bool | storeUnscaledValue (longFib lValue, ostream &stream, char &cRestBits, unsigned char &uiRestBitPosition) const |
virtual longFib | restoreIntegerValue (cReadBits &iBitStream, intFib &outStatus) const |
Public Member Functions inherited from fib::cDomainIntegerBasis |
doubleFib | getScalingFactor () const |
doubleFib | scale (const longFib lValue) const |
virtual doubleFib | restoreValue (cReadBits &iBitStream, intFib &outStatus) const |
Public Member Functions inherited from fib::cDomainSingle |
virtual bool | isScalar () const |
virtual bool | isVector () const |
Public Member Functions inherited from fib::cDomain |
virtual | ~cDomain ()=0 |
virtual bool | isReference () const |
virtual bool | equal (const cDomain &domain) const |
Detailed Description
Definition at line 56 of file cDomainInteger.h.
Constructor & Destructor Documentation
fib::cDomainInteger::cDomainInteger |
( |
longFib |
lInMinNumber, |
|
|
longFib |
lInMaxNumber |
|
) |
| |
The constructor for unscaled integer numer domains. If lInMinNumber is the minimal number and ulMaxNumber the maximal number of the domain {lInMinNumber, ..., ulMaxNumber} is the domain.
- Parameters:
-
lInMinNumber | the minimal number of the domain |
lInMaxNumber | the maximal number of the domain |
The constructor for scaled integer numer domains. If lInMinNumber is the minimal number and ulMaxNumber the maximal number of the domain {lInMinNumber*dScalingFactor, ..., ulMaxNumber*dScalingFactor} is the scaled domain. ({lInMinNumber, ..., ulMaxNumber} is the unscaled domain)
- Parameters:
-
lInMinNumber | the minimal number of the domain |
lInMaxNumber | the maximal number of the domain |
dScalingFactor | the scaling factor of the domain the scaling factor has to be greater 0.0 |
The copyconstructor for integer numer domains.
- Parameters:
-
domain | the integer number domain to copy |
Member Function Documentation
virtual unsignedIntFib fib::cDomainInteger::getCompressedSize |
( |
| ) |
const |
|
virtual |
This method evaluades the size of the domain in bits in the compressed file form.
- See also:
- store()
- Returns:
- the size of the domain in bits in the compressed form
Implements fib::cDomain.
virtual unsignedIntFib fib::cDomainInteger::getCompressedSizeForValue |
( |
| ) |
const |
|
virtual |
This method evaluades the size of values in the domain in bits in the compressed file form.
- See also:
- store()
- Returns:
- the size of the domain in bits in the compressed form
Implements fib::cDomainSingle.
doubleFib fib::cDomainInteger::getMaximum |
( |
| ) |
const |
|
virtual |
This method returns the biggest value in the domain.
- Returns:
- the biggest value in the domain
Implements fib::cDomainSingle.
virtual longFib fib::cDomainInteger::getMaximumUnscaled |
( |
| ) |
const |
|
virtual |
This method returns the biggest value in the unscaled domain.
- Returns:
- the biggest value in the unscaled domain
Implements fib::cDomainIntegerBasis.
virtual doubleFib fib::cDomainInteger::getMinimum |
( |
| ) |
const |
|
virtual |
This method returns the smalest value in the domain.
- Returns:
- the smalest value in the domain
Implements fib::cDomainSingle.
virtual longFib fib::cDomainInteger::getMinimumUnscaled |
( |
| ) |
const |
|
virtual |
This method returns the smalest value in the unscaled domain.
- Returns:
- the smalest value in the unscaled domain
Implements fib::cDomainIntegerBasis.
virtual doubleFib fib::cDomainInteger::getNull |
( |
| ) |
const |
|
virtual |
This method returns the nullvalue of the domain. The nullvalue is the value 0 rounded to an value in the domain.
- Returns:
- the nullvalue of the domain
Implements fib::cDomainSingle.
virtual longFib fib::cDomainInteger::getNullUnscaled |
( |
| ) |
const |
|
virtual |
This method returns the nullvalue of the unscaled domain. The nullvalue is the value 0 rounded to an value in the unscaled domain.
- Returns:
- the nullvalue of the domain
Implements fib::cDomainIntegerBasis.
virtual string fib::cDomainInteger::getType |
( |
| ) |
const |
|
virtual |
- Returns:
- the type of the domain as an string
Implements fib::cDomain.
virtual bool fib::cDomainInteger::isElement |
( |
const doubleFib |
dValue | ) |
const |
|
virtual |
This method checks if the given value is an element of the domain. If the value dValue is an element of the domain true is returned, else false.
- Parameters:
-
dValue | the value for which to check, if it is an element of the domain |
- Returns:
- if the value dValue is an element of the domain true true is returned, else false
Implements fib::cDomainSingle.
virtual bool fib::cDomainInteger::isInBoundaries |
( |
const doubleFib |
dValue | ) |
const |
|
virtual |
This method checks if the given value is inside the domain boundaries. If the value dValue is inside of the domain boundaries true is returned, else false. A value is inside of the vector domain boudaries, if it is greater than the minimum value minus the scaling factor and lower than the maximum value plus the scaling factor.
- Parameters:
-
dValue | the value for which to check, if it is inside of the domain boundaries |
- Returns:
- if the vector dValue is inside of the domain boundaries true is returned, else false
Implements fib::cDomainSingle.
virtual bool fib::cDomainInteger::isUnscaledElement |
( |
const longFib |
lValue | ) |
const |
|
virtual |
This method checks if the given value is an element of the unscaled domain. If the value lValue is an element of the unscaled domain true is returned, else false.
- Parameters:
-
lValue | the value for which to check, if it is an element of the unscaled domain |
- Returns:
- if the value dValue is an element of the unscaled domain true true is returned, else false
Implements fib::cDomainIntegerBasis.
virtual bool fib::cDomainInteger::operator== |
( |
const cDomain & |
domain | ) |
const |
|
virtual |
This Method checks if the given domain is equal to this domain.
- Parameters:
-
domain | the domain which should be equal to this domain |
- Returns:
- true if the given domain is equal to this domain, else false
Reimplemented from fib::cDomainIntegerBasis.
This method restores a domain from a bitstream, wher it is stored in the compressed fib -format.
- See also:
- store
- Parameters:
-
iBitStream | the stream where the domain is stored in, because the stream is an cReadBits, any number of bits can be readed from it |
- Returns:
- an integervalue with the errorvalue possible errorvalues are:
- 0 loading successful
- -1 loading error, invalid pXmlElement
- -2 loading error, invalid data in pXmlElement
- 1 loading warning, invalid data in pXmlElement, error could be corrected
- 2 loading warning, invalid data in pXmlElement, maybe the loaded object is wrong
Implements fib::cDomain.
This method restores the a unscaled integer value of the domain from the stream iBitStream, wher it is stored in the compressed fib -format.
- See also:
- storeValue
-
restoreValue
-
storeUnscaledValue
-
cFibElement::restore
- Parameters:
-
iBitStream | the stream where this value is stored to in, because this stream is an cReadBits, any number of bits can be readed from it |
outStatus | An reference to an integervalue where the errorvalue can be stored to. If the pointer is NULL no errorvalue will be given back. possible errorvalues are:
- 0 loading successful
- -1 loading error, invalid stream
- -2 loading error, invalid data in stream
- 1 loading warning, invalid data in stream, error could be corrected
- 2 loading warning, invalid data in stream, maybe the loaded object is wrong
|
- Returns:
- the unscaled restored value
Implements fib::cDomainIntegerBasis.
virtual intFib fib::cDomainInteger::restoreXml |
( |
const TiXmlElement * |
pXmlElement | ) |
|
|
virtual |
This method restores a domain in the XML -format from an TinyXml element.
- Parameters:
-
pXmlNode | a pointer to the TinyXml node wher the domain is stored in |
- Returns:
- an integervalue with the errorvalue possible errorvalues are:
- 0 loading successful
- -1 loading error, invalid pXmlElement
- -2 loading error, invalid data in pXmlElement
- 1 loading warning, invalid data in pXmlElement, error could be corrected
- 2 loading warning, invalid data in pXmlElement, maybe the loaded object is wrong
Implements fib::cDomain.
This method round the given value dValue to an value in the domain of this object. The rounded vale will be the value with the minimal distance to the given value dValue. If more of these exists the smales will be returned.
- Parameters:
-
dValue | the value which should be rounded |
- Returns:
- the rounded value of dValue
Implements fib::cDomainSingle.
virtual longFib fib::cDomainInteger::roundUnscaled |
( |
const longFib |
lValue | ) |
const |
|
virtual |
This method round the given value dValue to an value in the unscaled domain of this object. The rounded vale will be the unscaled value with the minimal distance to the given value lValue. If more of these exists the smales will be returned.
- Parameters:
-
lValue | the value which should be rounded |
- Returns:
- the rounded unscaled value of lValue
Implements fib::cDomainIntegerBasis.
virtual bool fib::cDomainInteger::store |
( |
ostream & |
stream, |
|
|
char & |
cRestBits, |
|
|
unsigned char & |
uiRestBitPosition |
|
) |
| const |
|
virtual |
This method stores this domain in the compressed fib -format into the given stream. It is needed because the stream can yust store byts but the size of fib -elements can be any number of bits. Because of that ther have to be a possibility to exchange the missing bits betwean the fib -elements.
- See also:
- cFibElement::store
- Parameters:
-
stream | the stream where this domain should be stored to |
cRestBits | the not yet writen bits which should be stored |
uiRestBitPosition | the number of bits in the cRestBits which should be writen respectively containing valid information |
- Returns:
- true if the domain is stored, else false
Implements fib::cDomain.
virtual bool fib::cDomainInteger::storeUnscaledValue |
( |
longFib |
lValue, |
|
|
ostream & |
stream, |
|
|
char & |
cRestBits, |
|
|
unsigned char & |
uiRestBitPosition |
|
) |
| const |
|
virtual |
This method stores the given unscaled value lValue in the compressed fib -format for the domain into the given stream. It is needed because the stream can yust store byts but the size of fib -elements can be any number of bits. Because of that ther have to be a possibility to exchange the missing bits betwean the fib -elements.
- See also:
- cFibElement::store
- Parameters:
-
lValue | the value to store |
stream | the stream where this domain should be stored to |
cRestBits | the not yet writen bits which should be stored |
uiRestBitPosition | the number of bits in the cRestBits which should be writen respectively containing valid information |
- Returns:
- true if the domain is stored, else false
Implements fib::cDomainIntegerBasis.
virtual bool fib::cDomainInteger::storeValue |
( |
doubleFib |
dValue, |
|
|
ostream & |
stream, |
|
|
char & |
cRestBits, |
|
|
unsigned char & |
uiRestBitPosition |
|
) |
| const |
|
virtual |
This method stores the given value dValue in the compressed fib -format for the domain into the given stream. It is needed because the stream can yust store byts but the size of fib -elements can be any number of bits. Because of that ther have to be a possibility to exchange the missing bits betwean the fib -elements.
- See also:
- cFibElement::store
- Parameters:
-
dValue | the value to store |
stream | the stream where this domain should be stored to |
cRestBits | the not yet writen bits which should be stored |
uiRestBitPosition | the number of bits in the cRestBits which should be writen respectively containing valid information |
- Returns:
- true if the domain is stored, else false
Implements fib::cDomainSingle.
virtual bool fib::cDomainInteger::storeXml |
( |
ostream & |
ostream | ) |
const |
|
virtual |
This method stores this domain in the XML -format into the given stream.
- Parameters:
-
ostream | the stream where domains should be stored to |
- Returns:
- true if this domain are stored, else false
Implements fib::cDomain.
Member Data Documentation
longFib fib::cDomainInteger::lMaxNumber |
|
protected |
The maximal number of the integer numbers in this domain.
Definition at line 67 of file cDomainInteger.h.
longFib fib::cDomainInteger::lMinNumber |
|
protected |
The minimal number of the integer numbers in this domain.
Definition at line 62 of file cDomainInteger.h.
longFib fib::cDomainInteger::lNumberOfValues |
|
protected |
The number of the integer numbers in this domain.
Definition at line 72 of file cDomainInteger.h.
The documentation for this class was generated from the following file: