LearnTA  0.0.1
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
learnta::ElementaryLanguage Class Reference

An elementary language. More...

#include <elementary_language.hh>

Inheritance diagram for learnta::ElementaryLanguage:
Inheritance graph
[legend]
Collaboration diagram for learnta::ElementaryLanguage:
Collaboration graph
[legend]

Public Member Functions

 ElementaryLanguage (std::string word, TimedCondition timedCondition)
 
bool isSimple () const
 Returns if this elementary language is simple.
 
std::size_t wordSize () const
 Returns the number of the events in this elementary language.
 
ElementaryLanguage operator+ (const ElementaryLanguage &another) const
 Concatenate two elementary languages.
 
void enumerate (std::vector< ElementaryLanguage > &result) const
 Make a vector of simple elementary languages in this elementary language.
 
std::vector< ElementaryLanguageenumerate () const
 Make a vector of simple elementary languages in this elementary language.
 
TimedWord sample () const
 Return a timed word in this elementary language.
 
void removeEqualityUpperBoundAssign ()
 
void removeUpperBoundAssign ()
 
ElementaryLanguage removeUpperBound () const
 
ElementaryLanguage constrain (const TimedWord &prefix) const
 Constrain the valuation using a timed word. More...
 
bool contains (const TimedWord &testedWord) const
 Check if the given the timed word is a member of this elementary languages.
 
const std::string & getWord () const
 
const TimedConditiongetTimedCondition () const
 
bool operator== (const ElementaryLanguage &another) const
 
bool operator!= (const ElementaryLanguage &another) const
 

Static Public Member Functions

static ElementaryLanguage empty ()
 Construct the empty elementary language containing only 0.
 
static ElementaryLanguage convexHull (const std::list< ElementaryLanguage > &elementaryLanguages)
 Construct a convex-hull of the given timed conditions. More...
 

Protected Attributes

std::string word
 
TimedCondition timedCondition
 

Friends

std::ostream & operator<< (std::ostream &os, const ElementaryLanguage &language)
 

Detailed Description

An elementary language.

An elementary language is a timed language \(\{ \tau_0 a_1 \tau_1 a_2 \tau_2 \dots \tau_{n-1} a_n \tau_{n} \mid \tau_0, \tau_1, \dots, \tau_n \models \Lambda \}\), where \(a_1 a_2 \dots a_n \) is word and \(\Lambda\) is timedCondition.

Invariant
word.size() + 1 == timedCondition.size()

Member Function Documentation

◆ constrain()

ElementaryLanguage learnta::ElementaryLanguage::constrain ( const TimedWord prefix) const
inline

Constrain the valuation using a timed word.

Precondition
prefix is a prefix of this

◆ convexHull()

static ElementaryLanguage learnta::ElementaryLanguage::convexHull ( const std::list< ElementaryLanguage > &  elementaryLanguages)
inlinestatic

Construct a convex-hull of the given timed conditions.

Precondition
For all elementary in elementaryLanguages, elementary.word == result.word

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