Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14283


Ignore:
Timestamp:
09/16/16 15:36:59 (8 years ago)
Author:
bburlacu
Message:

#2288: Small refactor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/Layout/ConstrainedForceDirectedLayout.cs

    r14275 r14283  
    4646    private ColaEdges edges;
    4747    private Cola.Doubles edgeLengths;
    48     private int topologyNodeCount;
     48    //private int topologyNodeCount;
    4949    private Dictionary<uint, uint> idMap;
    5050    private Dictionary<IVertex, int> indexMap;
     
    126126        ++i;
    127127      }
    128       topologyNodeCount = i;
     128      //topologyNodeCount = i;
    129129      edges = new ColaEdges(arcs.Select(x => new ColaEdge((uint)indexMap[x.Source], (uint)indexMap[x.Target])).ToList());
    130130      edgeLengths = new Cola.Doubles(Enumerable.Range(0, edges.Count).Select(x => DefaultEdgeLength).ToList());
     
    219219    /// <summary>
    220220    /// This method performs edge routing, meaning that edges are moved such that they go around the nodes.
    221     /// Routing can produce polyline or orthogonal graph edges .
     221    /// Routing can produce polyline or orthogonal graph edges.
    222222    /// </summary>
    223223    private void RouteEdges() {
     
    233233          break;
    234234        default:
    235           var id = topologyNodeCount;
     235          var id = topologyNodes.Count;
    236236          foreach (var edge in edges) {
    237237            var eps = new TopologyEdgePointPtrs();
     
    250250      router.InvisibilityGrph = false;
    251251      // consider topology routes only for the topologyNodes associated with our objects (the rectangles)
    252       for (int i = 0; i < topologyNodeCount; ++i) {
     252      for (int i = 0; i < topologyNodes.Count; ++i) {
    253253        var r = topologyNodes[i].rect;
    254254        var poly = new Polygon(4);
     
    300300    }
    301301
     302    /// <summary>
     303    /// Save the layouted graph to a svg file
     304    /// </summary>
     305    /// <param name="path">The save path.</param>
    302306    public void OutputInstanceToSVG(string path) {
    303307      alg.outputInstanceToSVG(path);
Note: See TracChangeset for help on using the changeset viewer.