![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>. More...
#include <agrum/PRM/gspan/interfaceGraph.h>
Public Member Functions | |
InterfaceGraph (const PRMSystem< GUM_SCALAR > &sys) | |
Default constructor. More... | |
InterfaceGraph (const InterfaceGraph &source) | |
Copy constructor, proceeds with a shallow copy so for friends only. More... | |
InterfaceGraph & | operator= (const InterfaceGraph &source) |
Copy operator. More... | |
~InterfaceGraph () | |
Destructor. More... | |
UndiGraph & | graph () |
Returns the graph of this interface graph. More... | |
const UndiGraph & | graph () const |
Returns the graph of this interface graph. More... | |
Bijection< Idx, LabelData *> & | labels () |
Returns the bijection between LabelData and their string representation. More... | |
const Bijection< Idx, LabelData *> & | labels () const |
Returns the bijection between LabelData and their string representation. More... | |
Size | size (const LabelData *l) const |
Returns the number of node or edges labelled by l. More... | |
Set< NodeData< GUM_SCALAR > *> & | nodes (const LabelData *l) |
Returns the set of nodes labelled by l. More... | |
const Set< NodeData< GUM_SCALAR > *> & | nodes (const LabelData *l) const |
Returns the set of nodes labelled by l. More... | |
Set< EdgeData< GUM_SCALAR > *> & | edges (const LabelData *l) |
Returns the set of nodes labelled by l. More... | |
const Set< EdgeData< GUM_SCALAR > *> & | edges (const LabelData *l) const |
Returns the set of nodes labelled by l. More... | |
LabelData * | label (Idx id) |
Returns a label given its id. More... | |
NodeId | id (const PRMInstance< GUM_SCALAR > &i) const |
Returns the id of i in this interface graph. More... | |
NodeId | id (const PRMInstance< GUM_SCALAR > *i) const |
Returns the id of i in this interface graph. More... | |
NodeData< GUM_SCALAR > & | node (const PRMInstance< GUM_SCALAR > *i) |
Returns data about a node. More... | |
const NodeData< GUM_SCALAR > & | node (const PRMInstance< GUM_SCALAR > *i) const |
Returns data about a node. More... | |
NodeData< GUM_SCALAR > & | node (NodeId id) |
Returns data about a node. More... | |
const NodeData< GUM_SCALAR > & | node (NodeId id) const |
Returns data about a node. More... | |
EdgeData< GUM_SCALAR > & | edge (NodeId u, NodeId v) |
Returns data about an edge. More... | |
const EdgeData< GUM_SCALAR > & | edge (NodeId u, NodeId v) const |
Returns data about an edge. More... | |
Friends | |
class | gum::prm::GSpan< GUM_SCALAR > |
This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>.
An interface graph is a labelled graph over the instances of a gum::prm::PRMSystem<GUM_SCALAR>, where there exists an edge between two instance i and j if and only if their shared interface is nonempty.
Labels assigned to edges and nodes in the interface graph are technically strings, however since we need a linear oder each label is assigned a unique id.
Definition at line 164 of file interfaceGraph.h.
|
explicit |
Default constructor.
Definition at line 94 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::InterfaceGraph | ( | const InterfaceGraph< GUM_SCALAR > & | source | ) |
Copy constructor, proceeds with a shallow copy so for friends only.
Definition at line 137 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::~InterfaceGraph | ( | ) |
Destructor.
Definition at line 147 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
|
private |
Compute the label of node and add it to labels if it does not exists yet. Update node with the correct label's id.
Definition at line 178 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
|
private |
Compute the label of edge and add it to labels if it does not exists yet. Update edge with the correct label's id.
Definition at line 224 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE EdgeData< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::edge | ( | NodeId | u, |
NodeId | v | ||
) |
Returns data about an edge.
NotFound |
Definition at line 349 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const EdgeData< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::edge | ( | NodeId | u, |
NodeId | v | ||
) | const |
Returns data about an edge.
NotFound |
Definition at line 356 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE Set< EdgeData< GUM_SCALAR > *> & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::edges | ( | const LabelData * | l | ) |
Returns the set of nodes labelled by l.
Definition at line 301 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const Set< EdgeData< GUM_SCALAR > *> & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::edges | ( | const LabelData * | l | ) | const |
Returns the set of nodes labelled by l.
Definition at line 307 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE UndiGraph & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::graph | ( | ) |
Returns the graph of this interface graph.
Definition at line 261 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const UndiGraph & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::graph | ( | ) | const |
Returns the graph of this interface graph.
Definition at line 266 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE NodeId gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::id | ( | const PRMInstance< GUM_SCALAR > & | i | ) | const |
Returns the id of i in this interface graph.
Definition at line 317 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE NodeId gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::id | ( | const PRMInstance< GUM_SCALAR > * | i | ) | const |
Returns the id of i in this interface graph.
Definition at line 322 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE LabelData * gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::label | ( | Idx | id | ) |
Returns a label given its id.
Definition at line 312 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE Bijection< Idx, LabelData *> & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::labels | ( | ) |
Returns the bijection between LabelData and their string representation.
Definition at line 271 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const Bijection< Idx, LabelData *> & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::labels | ( | ) | const |
Returns the bijection between LabelData and their string representation.
Definition at line 276 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE NodeData< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::node | ( | const PRMInstance< GUM_SCALAR > * | i | ) |
Returns data about a node.
NotFound |
Definition at line 328 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const NodeData< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::node | ( | const PRMInstance< GUM_SCALAR > * | i | ) | const |
Returns data about a node.
NotFound |
Definition at line 334 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE NodeData< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::node | ( | NodeId | id | ) |
Returns data about a node.
NotFound |
Definition at line 339 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const NodeData< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::node | ( | NodeId | id | ) | const |
Returns data about a node.
NotFound |
Definition at line 344 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE Set< NodeData< GUM_SCALAR > *> & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::nodes | ( | const LabelData * | l | ) |
Returns the set of nodes labelled by l.
Definition at line 289 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE const Set< NodeData< GUM_SCALAR > *> & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::nodes | ( | const LabelData * | l | ) | const |
Returns the set of nodes labelled by l.
Definition at line 295 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
InterfaceGraph< GUM_SCALAR > & gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::operator= | ( | const InterfaceGraph< GUM_SCALAR > & | source | ) |
Copy operator.
Definition at line 173 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
INLINE Size gum::prm::gspan::InterfaceGraph< GUM_SCALAR >::size | ( | const LabelData * | l | ) | const |
Returns the number of node or edges labelled by l.
Definition at line 281 of file interfaceGraph_tpl.h.
References gum::prm::gspan::operator<<().
|
friend |
Definition at line 165 of file interfaceGraph.h.
|
private |
A counter used of assigning ids to labels.
Definition at line 273 of file interfaceGraph.h.
|
private |
Mapping between a LabelData and the set of EdgeData<GUM_SCALAR> with that label.
Definition at line 270 of file interfaceGraph.h.
|
private |
Data associated with edges in graph.
Definition at line 257 of file interfaceGraph.h.
|
private |
For shallow copies.
Definition at line 276 of file interfaceGraph.h.
|
private |
The interface graph.
Definition at line 248 of file interfaceGraph.h.
|
private |
Mapping between PRMInstance<GUM_SCALAR> dans their id in graph.
Definition at line 254 of file interfaceGraph.h.
|
private |
Bijection between labels and their ids.
Definition at line 260 of file interfaceGraph.h.
|
private |
Mapping between a LabelData and the set of NodeData<GUM_SCALAR> with that label.
Definition at line 265 of file interfaceGraph.h.
|
private |
Data associated with a node in graph.
Definition at line 251 of file interfaceGraph.h.
|
private |
The gum::prm::PRMSystem<GUM_SCALAR> represented by this interface graph.
Definition at line 245 of file interfaceGraph.h.