Пример #1
0
        //
        // Shallow copy constructor
        //
        public PlanarGraphNode(PlanarGraphNode thatNode)
        {
            thePoint = thatNode.thePoint;
            // type = thatNode.type;
            edges = new List<PlanarGraphEdge>();

            foreach (PlanarGraphEdge e in thatNode.edges)
            {
                edges.Add(new PlanarGraphEdge(e));
            }
        }
Пример #2
0
        //
        // Equality is only based on the point in the graph.
        //
        public override bool Equals(object obj)
        {
            PlanarGraphNode node = obj as PlanarGraphNode;

            if (node == null)
            {
                return(false);
            }

            return(this.thePoint.Equals(node.thePoint));
        }
Пример #3
0
        //
        // Shallow copy constructor
        //
        public PlanarGraphNode(PlanarGraphNode thatNode)
        {
            thePoint = thatNode.thePoint;
            // type = thatNode.type;
            edges = new List <PlanarGraphEdge>();

            foreach (PlanarGraphEdge e in thatNode.edges)
            {
                edges.Add(new PlanarGraphEdge(e));
            }
        }
Пример #4
0
 private void AddNode(PlanarGraphNode node)
 {
     nodes.Add(node);
 }
Пример #5
0
 private void AddNode(PlanarGraphNode node)
 {
     nodes.Add(node);
 }