FSMSADF::MPExplore::TokenFIFO Class Reference
#include <mpexplore.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::MPExplore::TokenFIFO::TokenFIFO | ( | uint | sz | ) |
Member Function Documentation
void FSMSADF::MPExplore::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.
References begin, end, and tokens.
Referenced by FSMSADF::MPExplore::State::add().
uint FSMSADF::MPExplore::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.
References begin, end, MaxPlus::Vector::put(), and tokens.
Referenced by FSMSADF::MPExplore::State::produce().
int FSMSADF::MPExplore::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::MPExplore::TokenFIFO::copy | ( | ) |
copy() The function returns a copy of the FIFO.
References TokenFIFO().
void FSMSADF::MPExplore::TokenFIFO::decreaseAll | ( | MPDelay | amount | ) |
decreaseAll() The function decreases the production time of all tokens in the FIFO by the specified amount.
bool FSMSADF::MPExplore::TokenFIFO::equals | ( | const TokenFIFO * | l | ) | const |
equals() The function returns true when two FIFO are identical (i.e. same size and same content).
References begin, end, MaxPlus::MP_EPSILON, MaxPlus::MP_ISMINUSINFINITY(), and tokens.
Token * FSMSADF::MPExplore::TokenFIFO::first | ( | ) |
first() The function returns a pointer to the first token in the FIFO.
Referenced by FSMSADF::MPExplore::State::firstToken().
MPTime FSMSADF::MPExplore::TokenFIFO::getMax | ( | ) |
getMax() The function returns the largest production time of the tokens in the FIFO.
References begin, end, MaxPlus::MP_MAX(), and tokens.
size_t FSMSADF::MPExplore::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.
References begin, end, TokenFIFO(), and tokens.
Referenced by FSMSADF::MPExplore::State::minus().
References MaxPlus::MP_MAX(), and FSMSADF::MPExplore::Token::productionTime.
Referenced by FSMSADF::MPExplore::State::consume().
uint FSMSADF::MPExplore::TokenFIFO::size | ( | ) | const |
size() The function returns the number of tokens in the FIFO.
References begin, end, and tokens.
Referenced by FSMSADF::MPExplore::State::firstToken().
void FSMSADF::MPExplore::TokenFIFO::smooth | ( | TokenFIFO * | l | ) |
Member Data Documentation
uint FSMSADF::MPExplore::TokenFIFO::begin [private] |
Referenced by add(), addToVector(), compare(), decreaseAll(), equals(), first(), getMax(), hashValue(), minus(), size(), smooth(), and TokenFIFO().
uint FSMSADF::MPExplore::TokenFIFO::end [private] |
Referenced by add(), addToVector(), compare(), decreaseAll(), equals(), getMax(), hashValue(), minus(), size(), smooth(), and TokenFIFO().
vector<Token> FSMSADF::MPExplore::TokenFIFO::tokens [private] |
Referenced by add(), addToVector(), compare(), decreaseAll(), equals(), first(), getMax(), hashValue(), minus(), size(), smooth(), and TokenFIFO().
The documentation for this class was generated from the following files: