#include #include #include #include using namespace std; struct edgeS { unsigned source,target; }; namespace std { template <> struct less { bool operator()(const edgeS &c,const edgeS &d) const { if (c.sourced.source) return false; if (c.targetd.target) return false; return false; } }; }; struct CirculantGraph:public ImportModule { CirculantGraph(ClusterContext context):ImportModule(context) {} ~CirculantGraph(){} bool import(const string &name) { bool ok=true; int l = QInputDialog::getInteger( QString("Please enter the rope number"),QString("Rope"), 0, 0, 1000000, 1, &ok ); if (!ok) return false; int numberOFNodes = QInputDialog::getInteger( QString("Please enter the number of nodes"), QString("Number of nodes"), 0 , 0, 1000000,1, &ok ); if (!ok) return false; vector tmp(numberOFNodes); for (int i=0;iaddNode(); } for (int i=0;iaddEdge(tmp[i],tmp[(i+j)%numberOFNodes]); } return true; } }; IMPORTPLUGIN(CirculantGraph,"Circulant Graph","Auber","16/06/2002","0","0","1")