reglibcpp  2.0.0
A C++ implementation of models for regular languages
Public Member Functions | Public Attributes | List of all members
reg::nfa::impl Struct Reference

Private implementation details of NFAs. More...

Public Member Functions

 impl ()
 Constructs private implementation object for an NFA accepting the empty language ∅. More...
 
 impl (vector< char32_t > &&u32alphabet, vector< vector< valarray< bool >>> &&transitions, vector< string > &&labels, valarray< bool > &&acceptingStates)
 Constructs private implementation object with provided members and empty ε-closure cache. More...
 

Public Attributes

std::shared_ptr< dfa const > equivalent
 Stores a minimal DFA accepting the same language as this object's NFA. More...
 
valarray< bool > accepting
 A true value marks an index as belonging to an accept state. More...
 
vector< char32_t > u32alphabet
 Represents the set of processable symbols. More...
 
vector< stringalphabet
 Represents the set of processable symbols as UTF-8-encoded strings. More...
 
vector< valarray< bool > > epsClosures
 Cache for every state's ε-closures. More...
 
vector< stringlabels
 Stores the names of states. More...
 
vector< vector< valarray< bool > > > transitions
 Stores the transition function as a table viz state index × symbol index → list of bools with true at reached states' indices. More...
 

Detailed Description

Private implementation details of NFAs.

Definition at line 47 of file nfa.cpp.

Constructor & Destructor Documentation

◆ impl() [1/2]

reg::nfa::impl::impl ( )
inline

Constructs private implementation object for an NFA accepting the empty language ∅.

Definition at line 66 of file nfa.cpp.

◆ impl() [2/2]

reg::nfa::impl::impl ( vector< char32_t > &&  u32alphabet,
vector< vector< valarray< bool >>> &&  transitions,
vector< string > &&  labels,
valarray< bool > &&  acceptingStates 
)
inline

Constructs private implementation object with provided members and empty ε-closure cache.

Definition at line 77 of file nfa.cpp.

Member Data Documentation

◆ accepting

valarray<bool> reg::nfa::impl::accepting

A true value marks an index as belonging to an accept state.

Definition at line 50 of file nfa.cpp.

◆ alphabet

vector<string> reg::nfa::impl::alphabet

Represents the set of processable symbols as UTF-8-encoded strings.

Definition at line 54 of file nfa.cpp.

◆ epsClosures

vector<valarray<bool> > reg::nfa::impl::epsClosures
mutable

Cache for every state's ε-closures.

Definition at line 56 of file nfa.cpp.

◆ equivalent

std::shared_ptr<dfa const> reg::nfa::impl::equivalent
mutable

Stores a minimal DFA accepting the same language as this object's NFA.

Definition at line 48 of file nfa.cpp.

◆ labels

vector<string> reg::nfa::impl::labels

Stores the names of states.

Definition at line 58 of file nfa.cpp.

◆ transitions

vector<vector<valarray<bool> > > reg::nfa::impl::transitions

Stores the transition function as a table viz state index × symbol index → list of bools with true at reached states' indices.

Definition at line 59 of file nfa.cpp.

◆ u32alphabet

vector<char32_t> reg::nfa::impl::u32alphabet

Represents the set of processable symbols.

Definition at line 52 of file nfa.cpp.


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