예제 #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);
 }