Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/14 02:01:41 (10 years ago)
Author:
bburlacu
Message:

#2215: Updated tests project. Fixed a couple of bugs when adding arcs to a vertex. Removed useless events from the directed graph. Worked around invalid operation exception when removing arcs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/DirectedGraph/Vertex.cs

    r11229 r11234  
    126126        if (outArcs == null)
    127127          outArcs = new List<IArc>();
    128         else if (outArcs.Contains(arc) || outArcs.Any(a => a.Target == arc.Target && a.Source == arc.Source))
     128        else if (outArcs.Contains(arc) || outArcs.Any(a => a.Target == arc.Target))
    129129          throw new InvalidOperationException("Arc already added.");
    130130        outArcs.Add(arc);
     
    132132        if (inArcs == null)
    133133          inArcs = new List<IArc>();
    134         else if (inArcs.Contains(arc) || inArcs.Any(a => a.Target == arc.Target && a.Source == arc.Source))
     134        else if (inArcs.Contains(arc) || inArcs.Any(a => a.Source == arc.Source))
    135135          throw new InvalidOperationException("Arc already added.");
    136136        inArcs.Add(arc);
Note: See TracChangeset for help on using the changeset viewer.