public EdgeNode(int y, int weight, EdgeNode next) { this.y = y; this.weight = weight; this.next = next; }
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++; }