示例#1
0
 public EdgeNode(int y, int weight, EdgeNode next)
 {
     this.y = y;
     this.weight = weight;
     this.next = next;
 }
示例#2
0
        private void Insert(int x, int y, int weight, bool directed)
        {
            EdgeNode edge = new EdgeNode(y, weight, this.edges[x]);
            this.edges[x] = edge;
            this.degrees[x]++;

            if (!directed)
                Insert(y, x, weight, true);
            else
                nedges++;
        }