My Project
|
#include <Minor.h>
Public Member Functions | |
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... | |
Static Public Member Functions | |
static void | SetRankingStrategy (const int rankingStrategy) |
A method for determining the value ranking strategy. More... | |
Protected Member Functions | |
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 | |
static int | GetRankingStrategy () |
Accessor for the static private field g_rankingStrategy. More... | |
Protected Attributes | |
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... | |
int MinorValue::getAccumulatedAdditions | ( | ) | const |
A method for accessing the additions performed while computing this minor, including all nested additions.
Contrary to MinorValue::getAdditions () const, this method will also count additions needed to compute all cached sub-minors (, although they need not be performed again in order to compute the given instance of MinorValue).
Definition at line 898 of file Minor.cc.
int MinorValue::getAccumulatedMultiplications | ( | ) | const |
A method for accessing the multiplications performed while computing this minor, including all nested multiplications.
Contrary to MinorValue::getMultiplications () const, this method will also count multiplications needed to compute all cached sub-minors (, although they need not be performed again in order to compute the given instance of MinorValue).
Definition at line 893 of file Minor.cc.
int MinorValue::getAdditions | ( | ) | const |
A method for accessing the additions performed while computing this minor.
Additions that were needed to compute cached sub-minors will not be counted, as the value of those sub-minors can be directly retrieved from the cache.
Definition at line 888 of file Minor.cc.
int MinorValue::getMultiplications | ( | ) | const |
A method for accessing the multiplications performed while computing this minor.
Due to multiplication with zero entries of the underlying matrix, some sub-minors may be irrelevant. In this case, the multiplications needed to compute these sub-minors will not be counted (, as they need not be performed). Moreover, multiplications that were needed to compute cached sub-minors will not be counted either, as the value of those sub-minors can be directly retrieved from the cache.
Definition at line 883 of file Minor.cc.
int MinorValue::getPotentialRetrievals | ( | ) | const |
A method for accessing the maximum number of potential retrievals of this minor.
Multiple retrievals will occur when computing large minors by means of cached sub-minors. (Then, the latter ones may be retrieved multiple times.)
Definition at line 878 of file Minor.cc.
|
staticprotected |
Accessor for the static private field g_rankingStrategy.
Definition at line 919 of file Minor.cc.
int MinorValue::getRetrievals | ( | ) | const |
A method for accessing the number of retrievals of this minor.
Multiple retrievals will occur when computing large minors by means of cached sub-minors. (Then, the latter ones may be retrieved multiple times.)
Definition at line 868 of file Minor.cc.
int MinorValue::getUtility | ( | ) | const |
A method for obtaining a rank measure for theiven MinorValue.
Rank measures are used to compare any two instances of MinorValue. The induced ordering on MinorValues has an impact on the caching behaviour of the underlying cache: Greater MinorValues will be cached longer than lower ones.
More explicitly, this means: Make the return value of this method greater, and the given MinorValue will be cached longer.
Internally, this method will call one of several implementations, depending on the pre-defined caching strategy; see MinorProcessor::SetCacheStrategy (const int).
this
Definition at line 926 of file Minor.cc.
|
virtual |
A method for retrieving the weight of a given MinorValue.
The implementation of Cache uses this function to determine the total weight of an entire cache. As the user can instantiate Cache by determining its maximum total weight (see Cache::Cache(const int, const int)), the definition of weight of a MinorValue may have an impact on the behaviour of the cache.
Reimplemented in IntMinorValue, and PolyMinorValue.
Definition at line 840 of file Minor.cc.
void MinorValue::incrementRetrievals | ( | ) |
A method for incrementing the number of performed retrievals of this instance of MinorValue.
Note that, when calling MinorValue::incrementRetrievals () for some instance mv of MinorValue which has been cached in a Cache under MinorKey mk, the user should be careful: After incrementing the number of retrievals for mv, the user should always put the value again into cache, i.e. should perform Cache::put (const KeyClass&, const ValueClass&) with mk and the modified mv as arguments. This is due to the fact that changing the number of performed retrievals of a MinorValue may have an impact on its ranking in Cache. Only by calling Cache::put (const KeyClass&, const ValueClass&) can the user ensure that the pair (mk --> mv) will be correctly re-positioned within the Cache.
bool MinorValue::operator< | ( | const MinorValue & | mv | ) | const |
bool MinorValue::operator== | ( | const MinorValue & | mv | ) | const |
void MinorValue::print | ( | ) | const |
A method for printing a string representation of the given MinorValue to std::cout.
Definition at line 903 of file Minor.cc.
|
protected |
A method for obtaining a rank measure for the given MinorValue.
Rank measures are used to compare any two instances of MinorValue. The induced ordering on MinorValues has an impact on the caching behaviour in a given cache: Greater MinorValues will be cached longer than lower ones.
More explicitly, this means: Make the return value of this method greater, and the given MinorValue will be cached longer when caching strategy 1 is deployed.
Rank measure 1 is equal to the number of actually performed multiplications to compute mv.
this
Definition at line 940 of file Minor.cc.
|
protected |
A method for obtaining a rank measure for the given MinorValue.
Rank measures are used to compare any two instances of MinorValue. The induced ordering on MinorValues has an impact on the caching behaviour in a given cache: Greater MinorValues will be cached longer than lower ones.
More explicitly, this means: Make the return value of this method greater, and the given MinorValue will be cached longer when caching strategy 1 is deployed.
Rank measure 2 is equal to the number of accumulated multiplications to compute the given MinorValue. This also includes all nested multiplications which were performed to compute all sub-minors which could be reused from cache.
this
Definition at line 946 of file Minor.cc.
|
protected |
A method for obtaining a rank measure for the given MinorValue.
Rank measures are used to compare any two instances of MinorValue. The induced ordering on MinorValues has an impact on the caching behaviour in a given cache: Greater MinorValues will be cached longer than lower ones.
More explicitly, this means: Make the return value of this method greater, and the given MinorValue will be cached longer when caching strategy 1 is deployed.
Rank measure 3 is equal to the number of actually performed multiplications, weighted with the ratio of not yet performed retrievals over the maximum number of retrievals.
this
Definition at line 953 of file Minor.cc.
|
protected |
A method for obtaining a rank measure for the given MinorValue.
Rank measures are used to compare any two instances of MinorValue. The induced ordering on MinorValues has an impact on the caching behaviour in a given cache: Greater MinorValues will be cached longer than lower ones.
More explicitly, this means: Make the return value of this method greater, and the given MinorValue will be cached longer when caching strategy 1 is deployed.
Rank measure 4 is equal to the number of actually performed multiplications, multiplied with the number of not yet performed retrievals.
this
Definition at line 963 of file Minor.cc.
|
protected |
A method for obtaining a rank measure for the given MinorValue.
Rank measures are used to compare any two instances of MinorValue. The induced ordering on MinorValues has an impact on the caching behaviour in a given cache: Greater MinorValues will be cached longer than lower ones.
More explicitly, this means: Make the return value of this method greater, and the given MinorValue will be cached longer when caching strategy 1 is deployed.
Rank measure 5 is equal to the number of not yet performed retrievals. This strategy tends to cache MinorValues longer which have a high maximum number of potential retrievals.
this
Definition at line 972 of file Minor.cc.
|
static |
A method for determining the value ranking strategy.
This setting has a direct effect on how long the given MinorValue will be cached in any cache that uses MinorValue to represent its cached values.
rankingStrategy | an int, so far one of 1, 2, ..., 5 |
Definition at line 909 of file Minor.cc.
|
virtual |
A method for providing a printable version of the represented MinorValue.
Reimplemented in IntMinorValue, and PolyMinorValue.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
private store for the current value ranking strategy; This member can be set using MinorValue::SetRankingStrategy (const int).