My Project
|
Class IntMinorValue is derived from MinorValue and can be used for representing values in a cache for sub-determinantes; see class Cache. More...
#include <Minor.h>
Public Member Functions | |
IntMinorValue (const int result, const int multiplications, const int additions, const int accumulatedMultiplications, const int accumulatedAdditions, const int retrievals, const int potentialRetrievals) | |
A constructor for class MinorValue. More... | |
IntMinorValue (const IntMinorValue &mv) | |
Copy constructor. More... | |
IntMinorValue () | |
just to make the compiler happy More... | |
virtual | ~IntMinorValue () |
Destructor. More... | |
int | getResult () const |
Accessor for the private field _result. More... | |
int | getWeight () const |
Accessor for the current weight of this class instance. More... | |
std::string | toString () const |
A method for providing a printable version of the represented MinorValue. More... | |
Public Member Functions inherited from MinorValue | |
bool | operator== (const MinorValue &mv) const |
just to make the compiler happy More... | |
bool | operator< (const MinorValue &mv) const |
just to make the compiler happy More... | |
virtual int | getWeight () const |
A method for retrieving the weight of a given MinorValue. More... | |
int | getRetrievals () const |
A method for accessing the number of retrievals of this minor. More... | |
int | getPotentialRetrievals () const |
A method for accessing the maximum number of potential retrievals of this minor. More... | |
int | getMultiplications () const |
A method for accessing the multiplications performed while computing this minor. More... | |
int | getAccumulatedMultiplications () const |
A method for accessing the multiplications performed while computing this minor, including all nested multiplications. More... | |
int | getAdditions () const |
A method for accessing the additions performed while computing this minor. More... | |
int | getAccumulatedAdditions () const |
A method for accessing the additions performed while computing this minor, including all nested additions. More... | |
void | incrementRetrievals () |
A method for incrementing the number of performed retrievals of this instance of MinorValue. More... | |
int | getUtility () const |
A method for obtaining a rank measure for theiven MinorValue. More... | |
virtual std::string | toString () const |
A method for providing a printable version of the represented MinorValue. More... | |
void | print () const |
A method for printing a string representation of the given MinorValue to std::cout. More... | |
Private Attributes | |
int | _result |
a store for the actual value of the minor More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from MinorValue | |
static void | SetRankingStrategy (const int rankingStrategy) |
A method for determining the value ranking strategy. More... | |
Protected Member Functions inherited from MinorValue | |
int | rankMeasure1 () const |
A method for obtaining a rank measure for the given MinorValue. More... | |
int | rankMeasure2 () const |
A method for obtaining a rank measure for the given MinorValue. More... | |
int | rankMeasure3 () const |
A method for obtaining a rank measure for the given MinorValue. More... | |
int | rankMeasure4 () const |
A method for obtaining a rank measure for the given MinorValue. More... | |
int | rankMeasure5 () const |
A method for obtaining a rank measure for the given MinorValue. More... | |
Static Protected Member Functions inherited from MinorValue | |
static int | GetRankingStrategy () |
Accessor for the static private field g_rankingStrategy. More... | |
Protected Attributes inherited from MinorValue | |
int | _retrievals |
-1 iff cache is not used, otherwise the number of retrievals so far of the current minor More... | |
int | _potentialRetrievals |
-1 iff cache is not used, otherwise the maximum number of potential retrievals of this minor (e.g. More... | |
int | _multiplications |
a store for the actual number of multiplications to compute the current minor More... | |
int | _additions |
a store for the actual number of additions to compute the current minor More... | |
int | _accumulatedMult |
a store for the accumulated number of multiplications to compute the current minor; This also includes all multiplications nested in sub-minors which may be retrieved from a cache. More... | |
int | _accumulatedSum |
a store for the accumulated number of additions to compute the current minor; This also includes all additions nested in sub-minors which may be retrieved from a cache. More... | |
STATIC_VAR int | g_rankingStrategy = -1 |
private store for the current value ranking strategy; This member can be set using MinorValue::SetRankingStrategy (const int). More... | |
Class IntMinorValue is derived from MinorValue and can be used for representing values in a cache for sub-determinantes; see class Cache.
As such, it is a realization of the template class ValueClass which is used in the declaration of class Cache. Following the documentation of class Cache, we need to implement at least the methods:
bool IntMinorValue::operator< (const IntMinorValue& key),
bool IntMinorValue::operator== (const IntMinorValue& key),
int IntMinorValue::getWeight ().
The main purpose of IntMinorValue is to represent values of sub-determinantes of a pre-defined matrix. Class MinorKey is used to determine which rows and columns of this pre-defined matrix ought to belong to the respective sub-determinante of interest. So far, IntMinorValue is just an example implementation which assumes matrices with int entries, such that the result of any minor is again an int.
IntMinorValue::IntMinorValue | ( | const int | result, |
const int | multiplications, | ||
const int | additions, | ||
const int | accumulatedMultiplications, | ||
const int | accumulatedAdditions, | ||
const int | retrievals, | ||
const int | potentialRetrievals | ||
) |
A constructor for class MinorValue.
result | the actual value of the represented minor |
multiplications | number of multiplications to compute this minor |
additions | number of additions to compute this minor |
accumulatedMultiplications | number of multiplications to compute this minor, including nested operations |
accumulatedAdditions | number of additions to compute this minor, including nested operations |
retrievals | number of times this minor has been retrieved from cache |
potentialRetrievals | maximum number of times this minor may be retrieved from cache |
Definition at line 988 of file Minor.cc.
IntMinorValue::IntMinorValue | ( | const IntMinorValue & | mv | ) |
Copy constructor.
Definition at line 1059 of file Minor.cc.
IntMinorValue::IntMinorValue | ( | ) |
just to make the compiler happy
Definition at line 1004 of file Minor.cc.
|
virtual |
int IntMinorValue::getResult | ( | ) | const |
|
virtual |
Accessor for the current weight of this class instance.
Reimplemented from MinorValue.
Definition at line 980 of file Minor.cc.
|
virtual |
A method for providing a printable version of the represented MinorValue.
Reimplemented from MinorValue.
Definition at line 1024 of file Minor.cc.
|
private |