Changeset 10 for src/main/java/weka/clusterers/forMetisMQI/Node.java
- Timestamp:
- Sep 14, 2010, 5:27:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/Node.java
r9 r10 8 8 /** The weight of the node */ 9 9 private int vwgt; 10 /** The size of the adjacency list of the node */11 private int nedges;12 /**13 * The index into the adjacency list that is the beginning of the adjacency14 * list of v15 */16 private int iedges;17 10 /** The weight of the edges that have been contracted to create the node */ 18 11 private int cewgt; 19 /** The sum of the weight of the edges adjacent to v */20 private int adjwgt;21 22 12 public Node(String id) { 23 13 this.id = id; 24 14 this.vwgt = 1; 25 15 this.cewgt = 0; 26 this.iedges = 0;27 this.nedges = 0;28 this.adjwgt = 0;29 16 } 30 17 … … 47 34 @Override 48 35 public String toString() { 49 return "N" + id; 36 return "N" + id; //+ " Cewgt: " + cewgt; 50 37 } 51 38 … … 58 45 } 59 46 60 public int getNedges() {61 return nedges;62 }63 64 public void setNedges(int nedges) {65 this.nedges = nedges;66 }67 68 public int getIedges() {69 return iedges;70 }71 72 public void setIedges(int iedges) {73 this.iedges = iedges;74 }75 76 47 public int getCewgt() { 77 48 return cewgt; … … 82 53 } 83 54 84 public int getAdjwgt() {85 return adjwgt;86 }87 88 public void setAdjwgt(int adjwgt) {89 this.adjwgt = adjwgt;90 }91 92 55 @Override 93 56 public Node clone() { 94 57 Node n = new Node(id); 95 n.adjwgt = adjwgt;96 58 n.cewgt = cewgt; 97 n.iedges = iedges;98 n.nedges = nedges;99 59 n.vwgt = vwgt; 100 60 return n;
Note: See TracChangeset
for help on using the changeset viewer.