Factor::FactorOracle< T > Class Template Reference

Public Member Functions

 FactorOracle ()
 
void AddLetter (int i, const std::vector< T > word)
 
int LengthCommonSuffix (int phi_one, int phi_two)
 
int FindBetter (int i, T alpha, const std::vector< T > word)
 
std::vector< T > FOGenerate (int &i, std::vector< T > v, float q)
 
void FactorOracleStart (const std::vector< T > word)
 
void AddState (int first_state)
 
void AddTransition (int first_state, int last_state, T symbol)
 
std::vector< T > CallGenerate (int len, float q)
 

Public Attributes

int phi = 0
 
int k = 0
 
int fo_iter = 0
 
int current_state = 1
 
std::vector< T > input_values
 
std::vector< State< T > > states_
 
std::vector< std::vector< int > > RevSuffix
 

Constructor & Destructor Documentation

◆ FactorOracle()

template<class T >
Factor::FactorOracle< T >::FactorOracle ( )
inline

< S[0] = -1

Member Function Documentation

◆ AddLetter()

template<class T >
void Factor::FactorOracle< T >::AddLetter ( int  i,
const std::vector< T >  word 
)
inline

A normal member taking two arguments and returning no value.

Parameters
ian integer argument.
worda template vector argument.

< k = S[i-1]

< phi_one = i-1

while k > -1 and delta(k,p[i]) is undefined do delta(k, p[i]) <- i phi_one = k k = S[k]

◆ FactorOracleStart()

template<class T >
void Factor::FactorOracle< T >::FactorOracleStart ( const std::vector< T >  word)
inline

A normal member taking one argument and returning no value.

Parameters
worda template argument.

◆ FindBetter()

template<class T >
int Factor::FactorOracle< T >::FindBetter ( int  i,
alpha,
const std::vector< T >  word 
)
inline

A normal member taking three arguments and returning an integer value.

Parameters
ian integer argument.
alphaa template symbol argument.
worda template vector argument.
Returns
A better state

◆ FOGenerate()

template<class T >
std::vector<T> Factor::FactorOracle< T >::FOGenerate ( int &  i,
std::vector< T >  v,
float  q 
)
inline

A normal member taking three arguments and returning a string value.

Parameters
ian integer argument.
va template vector argument.
qa float argument.
Returns
The factor oracle improvisation

Member Data Documentation

◆ RevSuffix

template<class T >
std::vector<std::vector<int> > Factor::FactorOracle< T >::RevSuffix

std::vector where each position has all the suffix transitions directed to each state

◆ states_

template<class T >
std::vector<State<T> > Factor::FactorOracle< T >::states_

std::vector of all the states


The documentation for this class was generated from the following file: