Пример #1
0
        public override void Find(WireRoute w1, WireRoute w2)
        {
            Reset();

            Parallel.For(0, w1.Route.Count,
                         index =>
            {
                var w2Index = w2.Route.IndexOf(w1.Route[index]);

                if (w2Index >= 0)
                {
                    overlaps.Add(new Tuple <int, int>(index + 1, w2Index + 1));
                }
            });
        }
Пример #2
0
        public virtual void Find(WireRoute w1, WireRoute w2)
        {
            Reset();

            foreach (var pointIn2 in w1.Route)
            {
                foreach (var pointIn1 in w2.Route)
                {
                    if (pointIn1.Item1 == pointIn2.Item1 &&
                        pointIn1.Item2 == pointIn2.Item2)
                    {
                        overlaps.Add(pointIn1);
                        // don't search anymore in case there are loops
                        break;
                    }
                }
            }
        }