Exemplo n.º 1
0
 public static NodeCollection hieu(NodeCollection nodes1, NodeCollection nodes2)
 {
     if (nodes1.Count > nodes2.Count)
     {
         NodeCollection result = new NodeCollection();
         foreach (Node node in nodes1)
         {
             if (!nodes2.Contains(node))
             {
                 result.Add(node);
             }
         }
         if (result.Count > 0)
         {
             return(result);
         }
         else
         {
             return(null);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
 void khoitao()
 {
     _edgeList         = new EdgeCollection();
     _nodeList         = new NodeCollection();
     this.IsUndirected = false;
 }