Changeset 15 for src/main/java/weka/clusterers/forMetisMQI/graph
- Timestamp:
- Sep 17, 2010, 6:04:18 PM (14 years ago)
- Location:
- src/main/java/weka/clusterers/forMetisMQI/graph
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/graph/Bisection.java
r12 r15 139 139 140 140 /** 141 * Returns the smaller subgraph of this bisection.141 * Returns the smaller not empty subgraph of this bisection, null otherwise. 142 142 * @return 143 143 */ 144 public Subgraph getSmallerSubgraph() { 144 public Subgraph getSmallerNotEmptySubgraph() { 145 if(a.getVertexCount() > 0 && b.getVertexCount() == 0) 146 return a; 147 if(b.getVertexCount() > 0 && a.getVertexCount() == 0) 148 return b; 145 149 if(a.getVertexCount() < b.getVertexCount()) 146 150 return a; -
src/main/java/weka/clusterers/forMetisMQI/graph/Edge.java
r11 r15 28 28 Edge e = (Edge) o; 29 29 result = result && (e.getId().equals(id)); 30 result = result && (e.getWeight() == weight);31 result = result && (e.getCapacity() == capacity);32 30 } 33 31 return result; -
src/main/java/weka/clusterers/forMetisMQI/graph/Subgraph.java
r13 r15 204 204 @Override 205 205 public String toString() { 206 String out = "["; 206 if(getVertexCount() == 0) 207 return "[]"; 208 StringBuffer out =new StringBuffer("["); 207 209 Iterator<Node> it = nodes.iterator(); 208 210 while(it.hasNext()) { 209 211 Node u = it.next(); 210 out = out + u + ","; 211 } 212 out = out + "]"; 213 return out; 212 out.append(u.toString() + ","); 213 } 214 out.setLength(out.length() - 1); 215 out.append("]"); 216 return out.toString(); 214 217 } 215 218
Note: See TracChangeset
for help on using the changeset viewer.