NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CRegExFSA Class Reference

Search Toolkit Book for CRegExFSA

#include "multipattern_search_impl.hpp"
(Private to src/util.)

+ Collaboration diagram for CRegExFSA:

Classes

struct  CRegExState
 
struct  THasher
 

Public Types

typedef vector< unique_ptr< CRegExState > > TStates
 
typedef pair< size_t, CRegEx::ETypeTNode
 
typedef vector< TNodeTNodeSet
 
typedef map< TNodeSet, size_t > TNodeSetMap
 
typedef vector< TNodeSetTNodeSetList
 
typedef array< vector< size_t >, 4 > TScratch
 

Public Member Functions

 CRegExFSA ()
 
size_t AddState (unsigned char t=CRegEx::eTypePass)
 
void Trans (size_t x, unsigned char c, size_t y)
 
void Short (size_t x, size_t y)
 
void Emit (size_t x, size_t n)
 
void Create (const CRegEx &rx, size_t emit)
 
void Add (const CRegEx &rx)
 
void Add (const vector< unique_ptr< CRegEx >> &v)
 
void Merge (unique_ptr< CRegExFSA > fsa)
 
void GenerateDotGraph (ostream &out) const
 
void GenerateSourceCode (ostream &out) const
 
void GenerateArrayMapData (ostream &out) const
 
void Refine ()
 

Static Public Member Functions

static size_t Collect (TScratch &VV, CRegEx::EType t, TStates &src, TStates &dest, TNodeSetMap &NM, TNodeSetList &NL, TNodeSet &NS, TScratch &HH)
 
static void Extend (size_t x, unsigned char c, TStates &src, TStates &dest, TNodeSetMap &NM, TNodeSetList &NL, TNodeSet &NS, TScratch &VV, TScratch &HH)
 
static void Push (size_t x, vector< size_t > &v, vector< size_t > &h)
 
static bool In (size_t x, vector< size_t > &h)
 

Public Attributes

TStates m_States
 
vector< stringm_Str
 

Detailed Description

Definition at line 205 of file multipattern_search_impl.hpp.

Member Typedef Documentation

◆ TNode

typedef pair<size_t, CRegEx::EType> CRegExFSA::TNode

Definition at line 247 of file multipattern_search_impl.hpp.

◆ TNodeSet

typedef vector<TNode> CRegExFSA::TNodeSet

Definition at line 248 of file multipattern_search_impl.hpp.

◆ TNodeSetList

Definition at line 250 of file multipattern_search_impl.hpp.

◆ TNodeSetMap

Definition at line 249 of file multipattern_search_impl.hpp.

◆ TScratch

typedef array<vector<size_t>, 4> CRegExFSA::TScratch

Definition at line 251 of file multipattern_search_impl.hpp.

◆ TStates

typedef vector<unique_ptr<CRegExState> > CRegExFSA::TStates

Definition at line 246 of file multipattern_search_impl.hpp.

Constructor & Destructor Documentation

◆ CRegExFSA()

CRegExFSA::CRegExFSA ( )

Definition at line 1159 of file multipattern_search.cpp.

References CRegEx::eTypeStart.

Member Function Documentation

◆ Add() [1/2]

void CRegExFSA::Add ( const CRegEx rx)

Definition at line 1166 of file multipattern_search.cpp.

References CRegEx::m_Str.

◆ Add() [2/2]

void CRegExFSA::Add ( const vector< unique_ptr< CRegEx >> &  v)

Definition at line 1173 of file multipattern_search.cpp.

References i, CRegEx::m_Str, and Merge().

◆ AddState()

size_t CRegExFSA::AddState ( unsigned char  t = CRegEx::eTypePass)
inline

◆ Collect()

size_t CRegExFSA::Collect ( TScratch VV,
CRegEx::EType  t,
TStates src,
TStates dest,
TNodeSetMap NM,
TNodeSetList NL,
TNodeSet NS,
TScratch HH 
)
static

◆ Create()

void CRegExFSA::Create ( const CRegEx rx,
size_t  emit 
)

◆ Emit()

void CRegExFSA::Emit ( size_t  x,
size_t  n 
)
inline

Definition at line 257 of file multipattern_search_impl.hpp.

References m_States, and n.

◆ Extend()

void CRegExFSA::Extend ( size_t  x,
unsigned char  c,
TStates src,
TStates dest,
TNodeSetMap NM,
TNodeSetList NL,
TNodeSet NS,
TScratch VV,
TScratch HH 
)
static

◆ GenerateArrayMapData()

void CRegExFSA::GenerateArrayMapData ( ostream &  out) const

◆ GenerateDotGraph()

void CRegExFSA::GenerateDotGraph ( ostream &  out) const

◆ GenerateSourceCode()

void CRegExFSA::GenerateSourceCode ( ostream &  out) const

◆ In()

static bool CRegExFSA::In ( size_t  x,
vector< size_t > &  h 
)
inlinestatic

Definition at line 279 of file multipattern_search_impl.hpp.

References i.

◆ Merge()

void CRegExFSA::Merge ( unique_ptr< CRegExFSA fsa)

Definition at line 1196 of file multipattern_search.cpp.

◆ Push()

static void CRegExFSA::Push ( size_t  x,
vector< size_t > &  v,
vector< size_t > &  h 
)
inlinestatic

Definition at line 268 of file multipattern_search_impl.hpp.

References i.

◆ Refine()

void CRegExFSA::Refine ( )

Definition at line 1235 of file multipattern_search.cpp.

References CRegEx::eTypePass, CRegEx::eTypeStart, CRegEx::eTypeStop, HH, and n.

◆ Short()

void CRegExFSA::Short ( size_t  x,
size_t  y 
)
inline

◆ Trans()

void CRegExFSA::Trans ( size_t  x,
unsigned char  c,
size_t  y 
)
inline

Definition at line 255 of file multipattern_search_impl.hpp.

References m_States.

Referenced by CRegEx::CRegX::DummyTrans(), and CRegEx::CRegXChar::Render().

Member Data Documentation

◆ m_States

TStates CRegExFSA::m_States

Definition at line 287 of file multipattern_search_impl.hpp.

Referenced by AddState(), Emit(), Short(), Trans(), and xMultiPatternSearch().

◆ m_Str

vector<string> CRegExFSA::m_Str

Definition at line 288 of file multipattern_search_impl.hpp.


The documentation for this class was generated from the following files:
Modified on Thu Feb 22 17:07:02 2024 by modify_doxy.py rev. 669887