FSMSADF::MPExploreBindingAware::TokenFIFO Class Reference
#include <mpexplore_binding_aware.h>
Public Member Functions | |
TokenFIFO (uint sz) | |
MPTime | removeFirstN (uint n) |
void | append (MPTime t, uint n=1) |
TokenFIFO * | copy () |
size_t | hashValue () const |
bool | equals (const TokenFIFO *l) const |
int | compare (const TokenFIFO *l) const |
Token * | first () |
MPTime | getMax () |
void | decreaseAll (MPDelay amount) |
void | smooth (TokenFIFO *l) |
uint | size () const |
TokenFIFO * | minus (TokenFIFO *l) const |
void | add (double factor, TokenFIFO *l) |
uint | addToVector (MaxPlus::Vector *v, uint k) const |
Private Attributes | |
vector< Token > | tokens |
uint | begin |
uint | end |
Detailed Description
class TokenFIFO A token fifo
Constructor & Destructor Documentation
FSMSADF::MPExploreBindingAware::TokenFIFO::TokenFIFO | ( | uint | sz | ) |
Member Function Documentation
void FSMSADF::MPExploreBindingAware::TokenFIFO::add | ( | double | factor, | |
TokenFIFO * | m | |||
) |
add() The function adds the token production times of the tokens in FIFO m to this fifo. These token production times are however scaled with the supplied factor.
Referenced by FSMSADF::MPExploreBindingAware::State::add().
uint FSMSADF::MPExploreBindingAware::TokenFIFO::addToVector | ( | MaxPlus::Vector * | v, | |
uint | k | |||
) | const |
addToVector() The function adds the token production times of all tokens which are stored in this fifo to the vector v. The first token production time is placed at position k in this vector. The function returns the position after which the last addition to vector v has taken place.
Referenced by FSMSADF::MPExploreBindingAware::State::produce().
int FSMSADF::MPExploreBindingAware::TokenFIFO::compare | ( | const TokenFIFO * | l | ) | const |
compare() impose a total ordering on FIFOs
References begin, end, MaxPlus::MP_EPSILON, MaxPlus::MP_ISMINUSINFINITY(), and tokens.
TokenFIFO * FSMSADF::MPExploreBindingAware::TokenFIFO::copy | ( | ) |
copy() The function returns a copy of the FIFO.
References TokenFIFO().
void FSMSADF::MPExploreBindingAware::TokenFIFO::decreaseAll | ( | MPDelay | amount | ) |
decreaseAll() The function decreases the production time of all tokens in the FIFO by the specified amount.
bool FSMSADF::MPExploreBindingAware::TokenFIFO::equals | ( | const TokenFIFO * | l | ) | const |
equals() The function returns true when two FIFO are identical (i.e. same size and same content).
Token * FSMSADF::MPExploreBindingAware::TokenFIFO::first | ( | ) |
MPTime FSMSADF::MPExploreBindingAware::TokenFIFO::getMax | ( | ) |
getMax() The function returns the largest production time of the tokens in the FIFO.
size_t FSMSADF::MPExploreBindingAware::TokenFIFO::hashValue | ( | ) | const |
hashValue() The function returns a hash value for the FIFO.
minus() The function returns a pointer to a new FIFO which is a copy of the tokens in this FIFO, but with their production times lowered by the amount specified in the FIFO m.
Referenced by FSMSADF::MPExploreBindingAware::State::minus().
References MaxPlus::MP_MAX(), and FSMSADF::MPExploreBindingAware::Token::productionTime.
Referenced by FSMSADF::MPExploreBindingAware::State::consume().
uint FSMSADF::MPExploreBindingAware::TokenFIFO::size | ( | ) | const |
void FSMSADF::MPExploreBindingAware::TokenFIFO::smooth | ( | TokenFIFO * | l | ) |
smooth() Average the production time of the tokens in this fifo with the production times in the fifo l.
Member Data Documentation
Referenced by compare(), first(), hashValue(), size(), and TokenFIFO().
Referenced by compare(), hashValue(), size(), and TokenFIFO().
vector<Token> FSMSADF::MPExploreBindingAware::TokenFIFO::tokens [private] |
Referenced by compare(), first(), hashValue(), size(), and TokenFIFO().
The documentation for this class was generated from the following files: