#include "WireCellPgraph/Graph.h"
#include <iostream>
#include <sstream>
Go to the source code of this file.
Definition at line 189 of file test_pipegraph.cxx.
194 auto src1 =
new Source(count++, 0,4);
195 auto src2 =
new Source(count++, 10,14);
196 auto dst1 =
new Sink(count++);
197 auto dst2 =
new Sink(count++);
198 auto fun1 =
new Func(count++);
199 auto fun2 =
new Func(count++);
200 auto fun3 =
new Func(count++);
201 auto fan1 =
new Nfan(count++, 2);
202 auto joi1 =
new Njoin(count++, 2);
207 g.connect(src1,fun1);
208 g.connect(fun1,fan1);
209 g.connect(fan1,dst1);
210 g.connect(fan1,fun2,1);
211 g.connect(fun2,joi1);
212 g.connect(src2,fun3);
213 g.connect(fun3,joi1,0,1);
214 g.connect(joi1,sqb1);
215 g.connect(sqb1,dst2);
217 auto sorted = g.sort_kahn();
218 cout <<
"Sorted to " << sorted.size() <<
" nodes\n";
220 for (
size_t ind=0; ind<sorted.size(); ++ind) {
222 idn->
msg(
"at index ") << ind <<
endl;
224 cout <<
"Executing:\n";
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, VertexData, boost::property< boost::edge_weight_t, double, EdgeData > > Graph
define the boost-graph
std::ostream & msg(const std::string s)
QTextStream & endl(QTextStream &s)