DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut > Class Template Reference

#include <FGFS.hh>

Public Types

typedef GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut > Search
 
typedef Search::Graph Graph
 
typedef Search::Node Node
 
typedef Search::Container Container
 
typedef Search::Opposite Opposite
 
typedef Search::Solution Solution
 
typedef Search::PathCut PathCut
 
typedef Search::Accumulator Accumulator
 
typedef Search::IncidentEdges IncidentEdges
 
- Public Types inherited from Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >
typedef TContainer Container
 
typedef TAccumulator Accumulator
 
typedef TMark Mark
 
typedef TIncidentEdges IncidentEdges
 
typedef TOpposite Opposite
 
typedef TSolution Solution
 
typedef TPathCut PathCut
 
typedef IncidentEdges::Graph Graph
 
typedef IncidentEdges::Node Node
 

Public Member Functions

 GFS (Graph &graph, const Container &nodes, const Opposite &opposite, Solution &s, PathCut &cut, Accumulator &results)
 
virtual ~GFS ()
 
virtual void initialize ()
 
bool saturated (const typename Search::Node &node) const
 
bool visited (const typename Search::Node &node)
 
void setVisited (const typename Search::Node &node)
 
void setSaturated (const typename Search::Node &node)
 
bool isVisiting (const typename Search::Node &node) const
 
void setVisiting (const typename Search::Node &node)
 
void unsetVisiting (const typename Search::Node &node)
 
bool finished () const
 
void popStack ()
 
void next ()
 
- Public Member Functions inherited from Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >
 GraphSearch (Graph &graph, const Container &nodes, const Opposite &opposite, Solution &s, PathCut &cut, Accumulator &results)
 
virtual ~GraphSearch ()
 
const AccumulatorcurrentResults ()
 
bool updated () const
 

Private Member Functions

Search::Node pickup (const vector< typename Search::Node > &nodes)
 

Private Attributes

bool _atTop
 
unsigned _current
 
vector< typename Search::Node_vnodes
 
stack< typename Search::Node_stack
 
TMark _saturated
 
TMark _visiting
 

Additional Inherited Members

- Protected Attributes inherited from Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >
bool _updated
 
Mark _m
 
Graph_graph
 
const Container_nodes
 
const Opposite_opposite
 
Solution_s
 
PathCut_cut
 
Accumulator_results
 

Detailed Description

template<typename TIncidentEdges, typename TOpposite, typename TContainer, typename TAccumulator, typename TMark, typename TSolution, typename TPathCut>
class Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >

Implements a generic Greedy-First Search. Derives from GraphSearch

Definition at line 31 of file FGFS.hh.

Member Typedef Documentation

◆ Accumulator

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::Accumulator Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Accumulator

Definition at line 43 of file FGFS.hh.

◆ Container

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::Container Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Container

Definition at line 39 of file FGFS.hh.

◆ Graph

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::Graph Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Graph

Definition at line 37 of file FGFS.hh.

◆ IncidentEdges

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::IncidentEdges Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::IncidentEdges

Definition at line 44 of file FGFS.hh.

◆ Node

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::Node Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Node

Definition at line 38 of file FGFS.hh.

◆ Opposite

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::Opposite Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Opposite

Definition at line 40 of file FGFS.hh.

◆ PathCut

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::PathCut Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::PathCut

Definition at line 42 of file FGFS.hh.

◆ Search

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef GraphSearch<TIncidentEdges,TOpposite,TContainer,TAccumulator, TMark,TSolution,TPathCut> Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Search

Definition at line 36 of file FGFS.hh.

◆ Solution

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
typedef Search::Solution Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::Solution

Definition at line 41 of file FGFS.hh.

Constructor & Destructor Documentation

◆ GFS()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::GFS ( Graph graph,
const Container nodes,
const Opposite opposite,
Solution s,
PathCut cut,
Accumulator results 
)
inline

Constructor

Parameters
graphsee GraphSearch
nodessee GraphSearch
oppositesee GraphSearch
ssee GraphSearch
cutsee GraphSearch
resultssee GraphSearch

Definition at line 59 of file FGFS.hh.

References Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_vnodes.

◆ ~GFS()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
virtual Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::~GFS ( )
inlinevirtual

destructor

Definition at line 79 of file FGFS.hh.

Member Function Documentation

◆ finished()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
bool Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::finished ( ) const
inline

◆ initialize()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
virtual void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::initialize ( )
inlinevirtual

◆ isVisiting()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
bool Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::isVisiting ( const typename Search::Node node) const
inline

◆ next()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::next ( )
inline

Visit the next Node in the queue

Definition at line 186 of file FGFS.hh.

References Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_atTop, Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_current, Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_cut, Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_graph, Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_opposite, Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_results, Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_s, Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_stack, Diades::Graph::GraphSearch< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_updated, Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_vnodes, Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::finished(), Diades::Utils::generateRandomValue(), Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::isVisiting(), Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::pickup(), Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::popStack(), Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::saturated(), Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::setSaturated(), Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::setVisited(), and Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::setVisiting().

Referenced by Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::popStack().

◆ pickup()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
Search::Node Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::pickup ( const vector< typename Search::Node > &  nodes)
inlineprivate

◆ popStack()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::popStack ( )
inline

◆ saturated()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
bool Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::saturated ( const typename Search::Node node) const
inline

◆ setSaturated()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::setSaturated ( const typename Search::Node node)
inline

◆ setVisited()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::setVisited ( const typename Search::Node node)
inline

◆ setVisiting()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::setVisiting ( const typename Search::Node node)
inline

◆ unsetVisiting()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
void Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::unsetVisiting ( const typename Search::Node node)
inline

◆ visited()

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
bool Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::visited ( const typename Search::Node node)
inline

Member Data Documentation

◆ _atTop

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
bool Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_atTop
private

◆ _current

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
unsigned Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_current
private

◆ _saturated

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
TMark Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_saturated
mutableprivate

◆ _stack

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
stack< typename Search::Node > Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_stack
private

◆ _visiting

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
TMark Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_visiting
mutableprivate

◆ _vnodes

template<typename TIncidentEdges , typename TOpposite , typename TContainer , typename TAccumulator , typename TMark , typename TSolution , typename TPathCut >
vector< typename Search::Node > Diades::Utils::GFS< TIncidentEdges, TOpposite, TContainer, TAccumulator, TMark, TSolution, TPathCut >::_vnodes
private

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