ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/addin/outil/src/hypergraphlib_dfs.cpp
Revision: 1156
Committed: Thu Jun 13 22:02:48 2024 UTC (14 months, 2 weeks ago) by francois
File size: 1713 byte(s)
Log Message:
compatibilité Ubuntu 22.04
Suppression des refeences à Windows
Ajout d'une banière

File Contents

# User Rev Content
1 francois 1156 //####//------------------------------------------------------------
2     //####//------------------------------------------------------------
3     //####// MAGiC
4     //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5     //####// Departement de Genie Mecanique - UQTR
6     //####//------------------------------------------------------------
7     //####// MAGIC est un projet de recherche de l equipe ERICCA
8     //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9     //####// http://www.uqtr.ca/ericca
10     //####// http://www.uqtr.ca/
11     //####//------------------------------------------------------------
12     //####//------------------------------------------------------------
13     //####//
14     //####// hypergraphlib_dfs.cpp
15     //####//
16     //####//------------------------------------------------------------
17     //####//------------------------------------------------------------
18     //####// COPYRIGHT 2000-2024
19     //####// jeu 13 jun 2024 11:53:59 EDT
20     //####//------------------------------------------------------------
21     //####//------------------------------------------------------------
22 francois 481 #include "hypergraphlib_platform.h"
23 francois 283
24 francois 481 #include "hypergraphlib_dfs.h"
25     #include "hypergraphlib_node.h"
26     #include "hypergraphlib_graph.h"
27 francois 283
28     using namespace HypergraphLib;
29    
30     HYPERGRAPHLIB_ITEM void
31     HypergraphLib::dfs(Node *__n, std::set < Node * > & __depthFirstSearchNodes)
32     {
33     std::set < Node * > adj;
34     __n->AdjacentNodes( adj );
35     __depthFirstSearchNodes.insert (__n);
36     for ( std::set < Node * >::const_iterator it = adj.begin();
37     it != adj.end() ;
38     it++)
39     if ( __depthFirstSearchNodes.find(*it) == __depthFirstSearchNodes.end())
40     HypergraphLib::dfs (*it, __depthFirstSearchNodes);
41     }
42