DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <SubConfiguration.hh>
Public Types | |
typedef set< Topology::Connection > | ConnectionSet |
typedef ConnectionSet::const_iterator | ConnectionIterator |
typedef set< Topology::Node > | ComponentSet |
typedef ComponentSet::const_iterator | ComponentIterator |
typedef Diades::Utils::Exception< SubConfiguration > | Exception |
Static Public Member Functions | |
static string | typeName () |
Private Attributes | |
Topology::Node | _root |
ComponentSet | _components |
ConnectionSet | _effective |
ConnectionSet | _relaxed |
ConnectionSet | _external |
const Topology * | _topology |
This class implements a sub-configuration of the network. Given a topology and a root node, it can represent any sub-configuration of the topology by simply adding or removing connections in the sub-configuration. Here are some definitions:
Definition at line 35 of file SubConfiguration.hh.
typedef ComponentSet::const_iterator Diades::Automata::SubConfiguration::ComponentIterator |
Definition at line 42 of file SubConfiguration.hh.
Definition at line 41 of file SubConfiguration.hh.
typedef ConnectionSet::const_iterator Diades::Automata::SubConfiguration::ConnectionIterator |
Definition at line 40 of file SubConfiguration.hh.
Definition at line 39 of file SubConfiguration.hh.
Definition at line 59 of file SubConfiguration.hh.
|
inline |
Default constructor
Definition at line 64 of file SubConfiguration.hh.
|
inline |
topology | The underlying Topology of the network |
Definition at line 75 of file SubConfiguration.hh.
References require, and Diades::Automata::Topology::valid().
|
inline |
topology | The underlying Topology of the network |
root | the root node considered in this network |
Definition at line 99 of file SubConfiguration.hh.
References Diades::Automata::Topology::contains(), Diades::Automata::Topology::nodeConnectionBegin(), Diades::Automata::Topology::nodeConnectionEnd(), require, and Diades::Automata::Topology::valid().
|
inline |
Copy constructor
Definition at line 131 of file SubConfiguration.hh.
|
inline |
Definition at line 157 of file SubConfiguration.hh.
References operator==().
void Diades::Automata::SubConfiguration::addConnection | ( | Topology::Connection | connection | ) |
Make a connection effective in the sub-configuration, An external connection involves one (and only one) component of the current sub-configuration. A relaxed one involves two components of the sub-configuration but is not effective. A connection involving two components that are not in the current subconfiguration is neither called external, nor relaxed.
Update the other connections whose status may change with this adding.
connection | a connection |
Referenced by operator!=().
|
inline |
make the subconfiguration empty
Definition at line 305 of file SubConfiguration.hh.
References exportSubConf(), Diades::Automata::getBehaviour(), Diades::Automata::getNonRelaxedBehaviour(), importSubConf(), and Diades::Automata::operator<<().
|
inline |
Definition at line 275 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 279 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 200 of file SubConfiguration.hh.
|
inline |
Definition at line 243 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 247 of file SubConfiguration.hh.
Referenced by main().
void Diades::Automata::SubConfiguration::exportSubConf | ( | ostream & | os | ) |
output operator Produce a stream with the following format (cf Alban Grastien)
p sub nb_comp nb_effective_connections Comp0, Comp1, ..., CompN; label_event_connection_1: Comp11, Comp12, ...., Comp1M1; .... label_event_connection_K: CompK1, CompK2, ...., CompKMK; ;
Referenced by clear().
|
inline |
Definition at line 267 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 271 of file SubConfiguration.hh.
Referenced by main().
void Diades::Automata::SubConfiguration::importSubConf | ( | istream & | is | ) |
input operator Get a subconfiguration from the following stream format. Be aware that this stream must contains labels compatible with the underlying topology of the subconfiguration. The root is Comp0
p sub nb_comp nb_effective_connections Comp0, Comp1, ..., CompN; label_event_connection_1: Comp11, Comp12, ...., Comp1M1; .... label_event_connection_K: CompK1, CompK2, ...., CompKMK; ;
|
inline |
Definition at line 222 of file SubConfiguration.hh.
|
inline |
Definition at line 211 of file SubConfiguration.hh.
|
inline |
Definition at line 192 of file SubConfiguration.hh.
|
inline |
Definition at line 298 of file SubConfiguration.hh.
|
inline |
Definition at line 236 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 239 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 263 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 251 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Difference operator
Definition at line 165 of file SubConfiguration.hh.
References addConnection(), and operator<().
bool Diades::Automata::SubConfiguration::operator< | ( | const SubConfiguration & | subconf | ) | const |
Comparison operator
Referenced by operator!=().
|
inline |
Assignation operator
Definition at line 143 of file SubConfiguration.hh.
References _components, _effective, _external, _relaxed, _root, and _topology.
bool Diades::Automata::SubConfiguration::operator== | ( | const SubConfiguration & | subconf | ) | const |
Equality operator
Referenced by ~SubConfiguration().
|
inline |
Definition at line 255 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 259 of file SubConfiguration.hh.
Referenced by main().
|
inline |
Definition at line 283 of file SubConfiguration.hh.
References _root, isMaximal(), and setRoot().
void Diades::Automata::SubConfiguration::setRoot | ( | Topology::Node | newRoot | ) |
|
inline |
Definition at line 230 of file SubConfiguration.hh.
References _topology.
Referenced by valid().
|
inlinestatic |
Definition at line 58 of file SubConfiguration.hh.
|
inline |
Definition at line 121 of file SubConfiguration.hh.
References Diades::Automata::Topology::contains(), root(), topology(), and Diades::Automata::Topology::valid().
|
private |
Definition at line 46 of file SubConfiguration.hh.
Referenced by operator=().
|
private |
Definition at line 49 of file SubConfiguration.hh.
Referenced by operator=().
|
private |
Definition at line 52 of file SubConfiguration.hh.
Referenced by operator=().
|
private |
Definition at line 50 of file SubConfiguration.hh.
Referenced by operator=().
|
private |
Definition at line 45 of file SubConfiguration.hh.
Referenced by operator=(), and root().
|
private |
Definition at line 55 of file SubConfiguration.hh.
Referenced by operator=(), and topology().