Package edu.uci.ics.jung.algorithms.scoring

Examples of edu.uci.ics.jung.algorithms.scoring.BarycenterScorer


     * @return A Map where the the key is the vertex (V) and the value is
     *      a POJO with result of metrics, named <code>BetweennessMeasure</code>.
     */
    public static <V, E> Map<V, Double> calcule(final Graph<V, E> graph) {
       
        BarycenterScorer<V, E> bs = new BarycenterScorer(graph);
       
        Map<V, Double> result = new HashMap<>(graph.getVertexCount());
        for (V v : graph.getVertices()) {
            result.put(v, bs.getVertexScore(v));
        }
       
        return result;
    }
View Full Code Here


            public Number transform(E edge) {
                return edgeWeigth.containsKey(edge) ? edgeWeigth.get(edge) : 0;
            }
        };
       
        BarycenterScorer<V, E> bs = new BarycenterScorer(graph, edgeWeigthTransformer);
       
        Map<V, Double> result = new HashMap<>(graph.getVertexCount());
        for (V v : graph.getVertices()) {
            result.put(v, bs.getVertexScore(v));
        }
       
        return result;
    }
View Full Code Here

TOP

Related Classes of edu.uci.ics.jung.algorithms.scoring.BarycenterScorer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.