MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
Référence de la classe HypergraphLib::Graph

#include <hypergraphlib_graph.h>

Graphe d'héritage de HypergraphLib::Graph:
Graphe de collaboration de HypergraphLib::Graph:

Types publics

typedef std::map< int, Arc * > MapArcsById
 
typedef std::map< int, Node * > MapNodesById
 

Fonctions membres publiques

 ~Graph ()
 
 Graph (int __id=0)
 
 Graph (const Graph &__G, int __clone=1, int __reverse=0)
 
 Graph (const Graph &__G, const std::set< Node * > &)
 
 Graph (const Graph &__G, const std::vector< Node * > &__nodes)
 
NodeGetNode (int) const
 
NodeMergeNodes (Node *__A, Node *__B, int __id, bool __keepNodes=false)
 
NodeMergeNodes (int __A, int __B, int __id, bool __keepNodes=false)
 
ArcGetArc (int) const
 
int RemoveNode (int __id)
 
int RemoveNode (Node *)
 
int RemoveArc (int __id)
 
int RemoveArc (Arc *)
 
NodeAddNode (int __id=0)
 
ArcAddArc (const std::vector< int > &, int __id)
 
ArcAddArc (const int __id, int __rank,...)
 
ArcAddArc (const int __id, const std::multimap< int, Node * > &__nodes)
 
int CheckFreeNodeId (int __id) const
 
int CheckFreeArcId (int __id) const
 
int GetMaxArcId ()
 
int GetMaxNodeId ()
 
const MapArcsByIdGetArcs () const
 
const MapNodesByIdGetNodes () const
 
void CheckIntegrity () const
 
void Filaments (std::vector< std::vector< int > > &__filaments)
 
bool IsCycle () const
 
bool IsCycle (const std::vector< Node * > &__nodes) const
 
ArcDuplicateArc (int __id, int __dupId)
 
ArcDuplicateArc (Arc *__arc, int __dupId)
 
- Fonctions membres publiques hérités de HypergraphLib::GraphObject
 GraphObject (const Graph *__owner, const int __id)
 
 GraphObject (const GraphObject &, const Graph *__owner)
 
int Id () const
 
const GraphOwner () const
 
void * GetUserData () const
 
void SetUserData (void *)
 
void * GetUserData (unsigned i) const
 
void SetUserData (unsigned i, void *)
 

Attributs protégés

MapArcsById _arcs
 
MapNodesById _nodes
 
- Attributs protégés hérités de HypergraphLib::GraphObject
const Graph_owner
 
const int _id
 
std::map< int, void * > _userData
 

Description détaillée

Définition à la ligne 58 du fichier hypergraphlib_graph.h.

Documentation des définitions de type membres

◆ MapArcsById

typedef std::map< int, Arc * > HypergraphLib::Graph::MapArcsById

Définition à la ligne 60 du fichier hypergraphlib_graph.h.

◆ MapNodesById

typedef std::map< int, Node * > HypergraphLib::Graph::MapNodesById

Définition à la ligne 61 du fichier hypergraphlib_graph.h.

Documentation des constructeurs et destructeur

◆ ~Graph()

HypergraphLib::Graph::~Graph ( )

Définition à la ligne 44 du fichier hypergraphlib_graph.cpp.

Références _arcs, _nodes, et node.

◆ Graph() [1/4]

HypergraphLib::Graph::Graph ( int  __id = 0)

Constructor

Définition à la ligne 38 du fichier hypergraphlib_graph.cpp.

◆ Graph() [2/4]

HypergraphLib::Graph::Graph ( const Graph __G,
int  __clone = 1,
int  __reverse = 0 
)

copy constructor

Définition à la ligne 65 du fichier hypergraphlib_graph.cpp.

Références _arcs, _nodes, HypergraphLib::Arc::Add(), et HypergraphLib::Arc::Nodes().

Voici le graphe d'appel pour cette fonction :

◆ Graph() [3/4]

HypergraphLib::Graph::Graph ( const Graph __G,
const std::set< Node * > &  __nodes 
)

subgraph constructor

Définition à la ligne 90 du fichier hypergraphlib_graph.cpp.

Références _arcs, _nodes, a, AddArc(), AddNode(), HypergraphLib::GraphObject::GetUserData(), HypergraphLib::GraphObject::Id(), HypergraphLib::Arc::Nodes(), et HypergraphLib::GraphObject::SetUserData().

Voici le graphe d'appel pour cette fonction :

◆ Graph() [4/4]

HypergraphLib::Graph::Graph ( const Graph __G,
const std::vector< Node * > &  __nodes 
)

Documentation des fonctions membres

◆ AddArc() [1/3]

Arc* HypergraphLib::Graph::AddArc ( const int  __id,
const std::multimap< int, Node * > &  __nodes 
)

◆ AddArc() [2/3]

Arc * HypergraphLib::Graph::AddArc ( const int  __id,
int  __rank,
  ... 
)

Add an arc that links __rank Nodes Together, and affects the ID __id to the new arc Example : AddArc(123, 3, 4, 54, 5); creates arc ID=123, Rank=3, Nodes=4;54;5

Définition à la ligne 335 du fichier hypergraphlib_graph.cpp.

Références _arcs, a, HypergraphLib::Node::Add(), et GetNode().

Voici le graphe d'appel pour cette fonction :

◆ AddArc() [3/3]

Arc * HypergraphLib::Graph::AddArc ( const std::vector< int > &  __nodeIds,
int  __id 
)

Add an arc returns 0 if successful

Définition à la ligne 378 du fichier hypergraphlib_graph.cpp.

Références _arcs, a, HypergraphLib::Node::Add(), et GetNode().

Référencé par CAD4FE::MCBody::ContractEdgeToVertex(), CAD4FE::MCBody::CreateMCVertex(), DuplicateArc(), CAD4FE::MCAA::FaceBoundaryMesh(), Graph(), CAD4FE::MCBody::InitHyperGraphs(), CAD4FE::ShortestPath::InitializeAdjacencyGraph(), et CAD4FE::MCBody::SuppressMCVertex().

Voici le graphe d'appel pour cette fonction :
Voici le graphe des appelants de cette fonction :

◆ AddNode()

Node * HypergraphLib::Graph::AddNode ( int  __id = 0)

Add one node

Définition à la ligne 278 du fichier hypergraphlib_graph.cpp.

Références _nodes.

Référencé par CAD4FE::MCAA::FaceBoundaryMesh(), Graph(), CAD4FE::MCBody::InitHyperGraphs(), CAD4FE::ShortestPath::InitializeAdjacencyGraph(), MergeNodes(), et CAD4FE::MCBody::SplitEdge().

Voici le graphe des appelants de cette fonction :

◆ CheckFreeArcId()

int HypergraphLib::Graph::CheckFreeArcId ( int  __id) const

Checks if the ID already exists in the Arcs of the graph, if it already exists, it get the first free one starting from the lowest ID of the arcs.

return : the ID

◆ CheckFreeNodeId()

int HypergraphLib::Graph::CheckFreeNodeId ( int  __id) const

Checks if the ID already exists in the Nodes of the graph, if it already exists, it get the first free one starting from the lowest ID of the nodes.

return : the ID

◆ CheckIntegrity()

void HypergraphLib::Graph::CheckIntegrity ( ) const

DEBUGGING PURPOSES Verifies the integrity of the Graph :

  • each node of the arcs must exist in the graph
  • each incident arc of each node must exist in the graph
  • each incident arc of each node must reference this node
  • each node of each arc must reference this arc

Définition à la ligne 458 du fichier hypergraphlib_graph.cpp.

Références GetArc(), GetArcs(), GetNode(), et GetNodes().

Référencé par RemoveNode().

Voici le graphe d'appel pour cette fonction :
Voici le graphe des appelants de cette fonction :

◆ DuplicateArc() [1/2]

Arc * HypergraphLib::Graph::DuplicateArc ( Arc __arc,
int  __dupId 
)

Définition à la ligne 170 du fichier hypergraphlib_graph.cpp.

Références AddArc(), et HypergraphLib::Arc::Nodes().

Voici le graphe d'appel pour cette fonction :

◆ DuplicateArc() [2/2]

Arc * HypergraphLib::Graph::DuplicateArc ( int  __id,
int  __dupId 
)

duplicate an arc, use the second argument to set the id of the new arc

Définition à la ligne 164 du fichier hypergraphlib_graph.cpp.

Références GetArc().

Référencé par CAD4FE::MCBody::SplitEdge().

Voici le graphe d'appel pour cette fonction :
Voici le graphe des appelants de cette fonction :

◆ Filaments()

void HypergraphLib::Graph::Filaments ( std::vector< std::vector< int > > &  __filaments)

Extract filaments of the graph

◆ GetArc()

◆ GetArcs()

const MapArcsById& HypergraphLib::Graph::GetArcs ( ) const
inline

Get the array of arcs by ID

Définition à la ligne 171 du fichier hypergraphlib_graph.h.

Référencé par CheckIntegrity(), CAD4FE::MCAA::CollapseMCEdgeToMCVertex(), CAD4FE::MCBody::GetFEVCount(), IsCycle(), CAD4FE::MCAA::Simplify2(), CAD4FE::MCAA::SimplifyEdgeCollapse(), et V().

Voici le graphe des appelants de cette fonction :

◆ GetMaxArcId()

int HypergraphLib::Graph::GetMaxArcId ( )

Returns the maximum value of the arcs' IDs of this graph

Définition à la ligne 324 du fichier hypergraphlib_graph.cpp.

Références _arcs.

◆ GetMaxNodeId()

int HypergraphLib::Graph::GetMaxNodeId ( )

Returns the maximum value of the nodes' IDs of this graph

Définition à la ligne 329 du fichier hypergraphlib_graph.cpp.

Références _nodes.

◆ GetNode()

◆ GetNodes()

const MapNodesById& HypergraphLib::Graph::GetNodes ( ) const
inline

◆ IsCycle() [1/2]

bool HypergraphLib::Graph::IsCycle ( ) const

Tests wether the graph is a cycle or not

Définition à la ligne 524 du fichier hypergraphlib_graph.cpp.

Références _arcs, _nodes, et GetArcs().

Référencé par HypergraphLib::dfsCycle().

Voici le graphe d'appel pour cette fonction :
Voici le graphe des appelants de cette fonction :

◆ IsCycle() [2/2]

bool HypergraphLib::Graph::IsCycle ( const std::vector< Node * > &  __nodes) const

Définition à la ligne 536 du fichier hypergraphlib_graph.cpp.

Références HypergraphLib::Node::GetNbArcsToNode(), et HypergraphLib::Node::IsAdjacentToNode().

Voici le graphe d'appel pour cette fonction :

◆ MergeNodes() [1/2]

Node * HypergraphLib::Graph::MergeNodes ( int  __A,
int  __B,
int  __id,
bool  __keepNodes = false 
)

Définition à la ligne 399 du fichier hypergraphlib_graph.cpp.

Références GetNode(), et MergeNodes().

Voici le graphe d'appel pour cette fonction :

◆ MergeNodes() [2/2]

Node * HypergraphLib::Graph::MergeNodes ( Node __A,
Node __B,
int  __id,
bool  __keepNodes = false 
)

Merge two nodes if __keepNodes = true, then the 2 initial nodes are kept

Merge two nodes.

This merge is implemented by creating a new node C, and replacing node A by node C in all arcs incident to A, and node B by node C in all arcs incident to B.

(If there exist two arcs X–A and X–B, it will result two parallel arcs X–C. Any arc A–B will result in a loop-arc C–C).

Then nodes A and B will be removed from the graph.

Définition à la ligne 421 du fichier hypergraphlib_graph.cpp.

Références HypergraphLib::Node::Add(), AddNode(), HypergraphLib::Node::IncidentArcs(), et RemoveNode().

Référencé par CAD4FE::MCBody::ContractEdgeToVertex(), MergeNodes(), CAD4FE::MCBody::SuppressMCEdge(), et CAD4FE::MCBody::SuppressMCVertex().

Voici le graphe d'appel pour cette fonction :
Voici le graphe des appelants de cette fonction :

◆ RemoveArc() [1/2]

int HypergraphLib::Graph::RemoveArc ( Arc __arc)

Remove one Arc, and all its references in its nodes

Définition à la ligne 245 du fichier hypergraphlib_graph.cpp.

Références HypergraphLib::GraphObject::Id(), et RemoveArc().

Voici le graphe d'appel pour cette fonction :

◆ RemoveArc() [2/2]

int HypergraphLib::Graph::RemoveArc ( int  __id)

Remove one Arc, and all its references in its nodes

Définition à la ligne 250 du fichier hypergraphlib_graph.cpp.

Références _arcs, HypergraphLib::Arc::Nodes(), et HypergraphLib::Arc::Remove().

Référencé par CAD4FE::MCBody::ContractEdgeToVertex(), CAD4FE::MCBody::MergeVertices(), RemoveArc(), CAD4FE::MCBody::SplitEdge(), CAD4FE::MCBody::SuppressMCEdge(), et CAD4FE::MCBody::SuppressMCVertex().

Voici le graphe d'appel pour cette fonction :
Voici le graphe des appelants de cette fonction :

◆ RemoveNode() [1/2]

int HypergraphLib::Graph::RemoveNode ( int  __id)

Remove one node, and all its references in its incident arcs

Définition à la ligne 229 du fichier hypergraphlib_graph.cpp.

Références _nodes.

Référencé par CAD4FE::MCBody::ContractEdgeToVertex(), MergeNodes(), CAD4FE::MCBody::SplitEdge(), et CAD4FE::MCBody::SuppressMCEdge().

Voici le graphe des appelants de cette fonction :

◆ RemoveNode() [2/2]

int HypergraphLib::Graph::RemoveNode ( Node __node)

Remove one node, and all its references in its incident arcs

Définition à la ligne 201 du fichier hypergraphlib_graph.cpp.

Références _nodes, CheckIntegrity(), HypergraphLib::GraphObject::Id(), et HypergraphLib::Node::IncidentArcs().

Voici le graphe d'appel pour cette fonction :

Documentation des données membres

◆ _arcs

MapArcsById HypergraphLib::Graph::_arcs
protected

Définition à la ligne 211 du fichier hypergraphlib_graph.h.

Référencé par AddArc(), GetArc(), GetMaxArcId(), Graph(), IsCycle(), RemoveArc(), et ~Graph().

◆ _nodes

MapNodesById HypergraphLib::Graph::_nodes
protected

Définition à la ligne 212 du fichier hypergraphlib_graph.h.

Référencé par AddNode(), GetMaxNodeId(), GetNode(), Graph(), IsCycle(), RemoveNode(), et ~Graph().


La documentation de cette classe a été générée à partir des fichiers suivants :