/// <summary> /// Creating buckets for multi edges and allocating the graph. /// </summary> private void CreateFullLayeredGraph() { totalNodes = this.intGraph.NodeCount; foreach (List <IntEdge> list in database.RegularMultiedges) { int span = 0; bool first = true; foreach (IntEdge e in list) { if (first) { first = false; span = e.LayerSpan * 2; } if (span > 0) { e.LayerEdges = new LayerEdge[span]; for (int i = 0; i < span; i++) { int source = EdgePathsInserter.GetSource(ref totalNodes, e, i); int target = EdgePathsInserter.GetTarget(ref totalNodes, e, i, span); e.LayerEdges[i] = new LayerEdge(source, target, e.CrossingWeight); } LayerInserter.RegisterDontStepOnVertex(this.database, e); } } } this.nLayeredGraph = new ProperLayeredGraph(this.intGraph); }
static internal void InsertPaths( ref ProperLayeredGraph layeredGraph, ref LayerArrays la, Database db, BasicGraph<Node, IntEdge> intGraphP) { EdgePathsInserter li = new EdgePathsInserter(layeredGraph, la, db, intGraphP); li.InsertPaths(); layeredGraph = li.NLayeredGraph; la = li.Nla; }
static internal void InsertPaths( ref ProperLayeredGraph layeredGraph, ref LayerArrays la, Database db, BasicGraph <Node, IntEdge> intGraphP) { EdgePathsInserter li = new EdgePathsInserter(layeredGraph, la, db, intGraphP); li.InsertPaths(); layeredGraph = li.NLayeredGraph; la = li.Nla; }