Examples of BarycenterScorer


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

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

            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
Copyright © 2018 www.massapi.com. 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.