Ignore:
Timestamp:
Sep 29, 2010, 9:13:19 AM (14 years ago)
Author:
gnappo
Message:

Implementato raffinamento KL in metis; implementata ottimizzazione di mqi sulla conduttanza.

Location:
src/main/java/weka/clusterers/forMetisMQI/graph
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/weka/clusterers/forMetisMQI/graph/Bisection.java

    r15 r18  
    122122        }
    123123       
    124         public Bisection copy(){
     124        public Bisection clone(){
    125125                Bisection clone = new Bisection();
    126126                clone.a = (Subgraph) a.clone();
    127127                clone.b = (Subgraph) b.clone();
     128                clone.g = g.clone();
    128129                clone.marked = new HashSet<Node>();
    129130                return clone;
  • src/main/java/weka/clusterers/forMetisMQI/graph/Subgraph.java

    r15 r18  
    260260                return FilterUtils.createInducedSubgraph(nodes,g);
    261261        }
     262       
     263        public int totalDegree() {
     264                int result = 0;
     265                Iterator<Node> nodeIterator = iterator();
     266                while(nodeIterator.hasNext()) {
     267                        int degree = g.degree(nodeIterator.next());
     268                        result += degree;
     269                }
     270                return result;
     271        }
    262272}
Note: See TracChangeset for help on using the changeset viewer.