Boost logo

Boost Users :

From: Bernhard Lippmann (bernhard.lippmann_at_[hidden])
Date: 2008-03-08 16:04:14


Hi,

I use the add_edge () function to build my graph. Works almost perfect.
While analysing my graph I found there have been add vertices created,
I have have no idea where is is going to happen.
Any helpmpossible ? I add a code snippet for the add_edge() function and my
data log. vertices 12-15 are never created by me, but the are suddenly in
my graph....

Best

Bernhard
>>>>>>>>>>>><SOURCE CODE Snippet >>>>>>>>

iter = this->Elements.begin();
         while(iter != this->Elements.end())
             {
             aAtomicElement = (*iter).second;

                 for (str_iter=aAtomicElement.AE_PinList.begin();
str_iter!= aAtomicElement.AE_PinList.end(); ++str_iter)
                    {
                               cout << "\n Params before call Add_edge(...)
function (Bipartit Graph Type) \n ";
                                                           cout << "edge [<std::string>]: "<< aAtomicElement.AE_Name << "
::" << *str_iter << " \n ";
                               cout << "edge [<int> <int>]: "<<
index_of_element( this->VertexNamesList, aAtomicElement.AE_Name) << " :: "
<< index_of_element( this->VertexNamesList, *str_iter) << " \n ";
                                                           OneEdge.first = index_of_element( this->VertexNamesList,
aAtomicElement.AE_Name);
                               OneEdge.second = index_of_element(
this->VertexNamesList, *str_iter);

                               tie(e, inserted) = add_edge(OneEdge.first,
OneEdge.second, g);

                                                           if (inserted)
                                        {

                                    v = source(e, g);

                                                                        VertexNamesMap[v] = aAtomicElement.AE_Name ;

                                    v = target(e, g);

                                                                        VertexNamesMap[v] = *str_iter;

                                                                        EdgeNamesMap[e] = aAtomicElement.AE_Name + "-->" +*str_iter;

                                                                        cout << " by edge :" << EdgeNamesMap[e] << "\n";

                                                                        WeightMap[e] = 1 ;
                                                                }

                    }

                iter ++;
          } // while ...

<<<<<<< data log >>>>>>>>>
Drücken Sie eine beliebige Taste . . .
-------------------->>>>>>>>>><<<<<<<<<<-------------------------

 = Create the Edge Array and the Graph (V2)..

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans299 ::Z
 edge [<int> <int>]: 0 :: 1
  by edge :ptrans299-->Z

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans299 ::A
 edge [<int> <int>]: 0 :: 2
  by edge :ptrans299-->A

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans299 ::vdd!
 edge [<int> <int>]: 0 :: 3
  by edge :ptrans299-->vdd!

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans299 ::vdd!s
 edge [<int> <int>]: 0 :: 4
  by edge :ptrans299-->vdd!s

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans38 ::Z
 edge [<int> <int>]: 5 :: 1
  by edge :ptrans38-->Z

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans38 ::B
 edge [<int> <int>]: 5 :: 6
  by edge :ptrans38-->B

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans38 ::vdd!
 edge [<int> <int>]: 5 :: 3
  by edge :ptrans38-->vdd!

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ptrans38 ::vdd!s
 edge [<int> <int>]: 5 :: 4
  by edge :ptrans38-->vdd!s

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans35 ::Z
 edge [<int> <int>]: 7 :: 1
  by edge :ntrans35-->Z

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans35 ::A
 edge [<int> <int>]: 7 :: 2
  by edge :ntrans35-->A

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans35 ::net25
 edge [<int> <int>]: 7 :: 8
  by edge :ntrans35-->net25

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans35 ::vss!s
 edge [<int> <int>]: 7 :: 9
  by edge :ntrans35-->vss!s

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans36 ::net25
 edge [<int> <int>]: 10 :: 8
  by edge :ntrans36-->net25

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans36 ::B
 edge [<int> <int>]: 10 :: 6
  by edge :ntrans36-->B

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans36 ::vss!
 edge [<int> <int>]: 10 :: 11
  by edge :ntrans36-->vss!

 Params before call Add_edge(...) function (Bipartit Graph Type)
 edge [<std::string>]: ntrans36 ::vss!s
 edge [<int> <int>]: 10 :: 9
  by edge :ntrans36-->vss!s
Drücken Sie eine beliebige Taste . . .
-------------------->>>>>>>>>><<<<<<<<<<-------------------------

 = http://www.graphviz.org/Download_windows.php
    write graph wizard file ...
-------------------->>>>>>>>>><<<<<<<<<<-------------------------

 = vertices(g) =
0 : ptrans299
1 : Z
2 : A
3 : vdd!
4 : vdd!s
5 : ptrans38
6 : B
7 : ntrans35
8 : net25
9 : vss!s
10 : ntrans36
11 : vss!
12 :
13 :
14 :
15 :

Drücken Sie eine beliebige Taste . . .
-------------------->>>>>>>>>><<<<<<<<<<-------------------------

 = edges(g) =
(0,1) =ptrans299-->Z (0,2) =ptrans299-->A (0,3) =ptrans299-->vdd! (0,4) =
ns299-->vdd!s (5,1) =ptrans38-->Z (5,6) =ptrans38-->B (5,3) =ptrans38-->v
 (5,4) =ptrans38-->vdd!s (7,1) =ntrans35-->Z (7,2) =ntrans35-->A (7,8) =n
s35-->net25 (7,9) =ntrans35-->vss!s (10,8) =ntrans36-->net25 (10,6) =ntra
-->B (10,11) =ntrans36-->vss! (10,9) =ntrans36-->vss!s
in-edges: (1,0) (2,0) (3,0) (4,0)
in-edges: (0,1) (5,1) (7,1)
in-edges: (0,2) (7,2)
in-edges: (0,3) (5,3)
in-edges: (0,4) (5,4)
in-edges: (1,5) (6,5) (3,5) (4,5)
in-edges: (5,6) (10,6)
in-edges: (1,7) (2,7) (8,7) (9,7)
in-edges: (7,8) (10,8)
in-edges: (7,9) (10,9)
in-edges: (8,10) (6,10) (11,10) (9,10)
in-edges: (10,11)
in-edges:
in-edges:
in-edges:
in-edges:
Drücken Sie eine beliebige Taste . . .
-------------------->>>>>>>>>><<<<<<<<<<-------------------------
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.6/1318 - Release Date: 07.03.2008
14:01


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net