Ejemplo n.º 1
0
        public MinimalCycle Compose(MinimalCycle thatCycle, Segment extended)
        {
            MinimalCycle composed = new MinimalCycle();

            List <Point> thisPts = this.GetPointsBookEndedBySegment(extended);
            List <Point> thatPts = thatCycle.GetPointsBookEndedBySegment(extended);

            // Add all points from this;
            composed.AddAll(thisPts);

            // Add all points from that (excluding endpoints)
            for (int p = thatPts.Count - 2; p > 0; p--)
            {
                composed.Add(thatPts[p]);
            }

            return(composed);
        }
Ejemplo n.º 2
0
        public MinimalCycle Compose(MinimalCycle thatCycle, Segment extended)
        {
            MinimalCycle composed = new MinimalCycle();

            List<Point> thisPts = this.GetPointsBookEndedBySegment(extended);
            List<Point> thatPts = thatCycle.GetPointsBookEndedBySegment(extended);

            // Add all points from this;
            composed.AddAll(thisPts);

            // Add all points from that (excluding endpoints)
            for (int p = thatPts.Count - 2; p > 0; p--)
            {
                composed.Add(thatPts[p]);
            }

            return composed;
        }