DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <Candidate.hh>
Public Types | |
typedef Diades::Graph::Node::NodeId | StateId |
typedef set< Event >::const_iterator | FaultIterator |
typedef set< Event >::size_type | FaultSize |
Public Member Functions | |
Candidate () | |
Candidate (StateId stateId, const set< Event > &faults) | |
Candidate (const vector< StateId > &stateId, const vector< set< Event > > &faults) | |
Candidate (const Candidate &candidate) | |
Candidate & | operator= (const Candidate &candidate) |
const vector< StateId > & | stateId () const |
const vector< set< Event > > & | faults () const |
FaultIterator | begin (unsigned i) const |
FaultIterator | end (unsigned i) const |
FaultSize | numberOfFaults () const |
bool | isNormal () const |
bool | isAbnormal () const |
bool | operator== (const Candidate &candidate) const |
bool | operator!= (const Candidate &candidate) const |
bool | operator< (const Candidate &candidate) const |
string | toString () const |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
vector< StateId > | _stateId |
vector< set< Event > > | _faults |
Friends | |
class | boost::serialization::access |
ostream & | operator<< (ostream &os, const Candidate &candidate) |
Representation of a diagnosis candidate
A diagnosis candidate is the association of a Candidate::StateId and a set of faults (Event)
Definition at line 38 of file Candidate.hh.
typedef set<Event>::const_iterator Diades::Automata::Candidate::FaultIterator |
Candidate::FaultIterator
iterator on the faults of this candidate
Definition at line 49 of file Candidate.hh.
typedef set<Event>::size_type Diades::Automata::Candidate::FaultSize |
Candidate::FaultSize
type of integer in which the number of faults is encoded
Definition at line 54 of file Candidate.hh.
Candidate::StateId
the id of a State.
Definition at line 44 of file Candidate.hh.
|
inline |
Default constructor
Definition at line 64 of file Candidate.hh.
Parametrised constructor (singleton constructor)
stateId | id of the State |
faults | set of faults of the Candidate |
Definition at line 72 of file Candidate.hh.
|
inline |
Parametrised constructor (vector constructor)
stateId | vectoriezed ids of the State |
faults | vectorized set of faults of the Candidate |
Definition at line 85 of file Candidate.hh.
|
inline |
Copy constructor (linear in the size of the faults)
candidate | the Candidate to copy |
Definition at line 94 of file Candidate.hh.
|
inline |
Fault iterator
Definition at line 138 of file Candidate.hh.
|
inline |
Fault iterator
Definition at line 146 of file Candidate.hh.
|
inline |
Faults of the Candidate
Definition at line 130 of file Candidate.hh.
References _faults.
Referenced by Candidate(), and numberOfFaults().
|
inline |
Definition at line 178 of file Candidate.hh.
References isNormal().
|
inline |
Definition at line 169 of file Candidate.hh.
References numberOfFaults().
Referenced by isAbnormal().
|
inline |
Definition at line 154 of file Candidate.hh.
References faults().
Referenced by isNormal().
|
inline |
Inquality operator (attention, inequality by value, linear in the size of faults())
candidate | Candidate to compare |
Definition at line 202 of file Candidate.hh.
References operator<().
bool Diades::Automata::Candidate::operator< | ( | const Candidate & | candidate | ) | const |
comparison operator to be used with set<Candidate>. the comparison operator works as follows. The smaller size of fault candidates first.
candidate | the Candidate to compare |
Referenced by operator!=().
|
inline |
|
inlineprivate |
Serialisation method
ar | the Archive to use |
version | the version |
Definition at line 263 of file Candidate.hh.
|
inline |
The state id of the Candidate
Definition at line 122 of file Candidate.hh.
References _stateId.
Referenced by Candidate(), and operator==().
|
inline |
Definition at line 222 of file Candidate.hh.
Referenced by std::hash< Diades::Automata::Candidate >::operator()().
|
friend |
Definition at line 252 of file Candidate.hh.
|
friend |
output stream operator
os | output stream |
candidate | the Candidate to print |
Definition at line 237 of file Candidate.hh.
|
private |
Definition at line 59 of file Candidate.hh.
Referenced by faults(), operator=(), operator==(), and serialize().
|
private |
Definition at line 58 of file Candidate.hh.
Referenced by operator=(), serialize(), and stateId().