/** * Equivalent to <code>this(graph, averaging, true, true)</code>. * * @param graph The graph on which the node scores are to be calculated. * @param averaging Specifies whether the values returned is the sum of all v-distances or the * mean v-distance. */ public DistanceCentralityScorer(Graph<N> graph, boolean averaging) { this(graph, new UnweightedShortestPath<N>(graph), averaging, true, true); }
/** * @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistanceMap(Object) */ @Override public Map<V, Number> getDistanceMap(V source) { Map<V, Number> sourceSPMap = mDistanceMap.get(source); if (sourceSPMap == null) { computeShortestPathsFromSource(source); sourceSPMap = mDistanceMap.get(source); } return sourceSPMap; }
/** * @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistance(Object, * Object) */ @Override public Number getDistance(V source, V target) { Map<V, Number> sourceSPMap = getDistanceMap(source); return sourceSPMap.get(target); }
final UnweightedShortestPath<VertexRef, EdgeRef> shortestPath = new UnweightedShortestPath<>(sparseGraph); Map<VertexRef, EdgeRef> incomingEdgeMap = shortestPath.getIncomingEdgeMap(rootVertex); return incomingEdgeMap;
public Integer distance(final AccessPoint a, final AccessPoint b) { return (Integer) this.usp.getDistance(a.getElementName().getParent(), b .getElementName().getParent()); }
final UnweightedShortestPath<VertexRef, EdgeRef> shortestPath = new UnweightedShortestPath<>(sparseGraph); Map<VertexRef, EdgeRef> incomingEdgeMap = shortestPath.getIncomingEdgeMap(rootVertex); return incomingEdgeMap;
public Integer distance(final AccessPoint a, final AccessPoint b) { return (Integer) this.usp.getDistance(a.getElementName().getParent(), b .getElementName().getParent()); }
/** * Equivalent to <code>this(graph, averaging, true, true)</code>. * @param graph The graph on which the vertex scores are to be * calculated. * @param averaging Specifies whether the values returned is the sum of * all v-distances or the mean v-distance. */ public DistanceCentralityScorer(Hypergraph<V,E> graph, boolean averaging) { this(graph, new UnweightedShortestPath<V,E>(graph), averaging, true, true); }
/** @see edu.uci.ics.jung.algorithms.shortestpath.ShortestPath#getIncomingEdgeMap(Object) */ public Map<N, N> getIncomingEdgeMap(N source) { Map<N, N> sourceIEMap = mPredecessorMap.get(source); if (sourceIEMap == null) { computeShortestPathsFromSource(source); sourceIEMap = mPredecessorMap.get(source); } return sourceIEMap; }
/** * @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistance(Object, Object) */ public Number getDistance(V source, V target) { Map<V, Number> sourceSPMap = getDistanceMap(source); return sourceSPMap.get(target); }
public Integer distance(final AccessPoint a, final AccessPoint b) { return (Integer) this.usp.getDistance(a.getElementName().getParent(), b .getElementName().getParent()); }
/** * Creates an instance for the specified graph. */ public KKLayout(Graph<V,E> g) { this(g, new UnweightedShortestPath<V,E>(g)); }
/** * @see edu.uci.ics.jung.algorithms.shortestpath.ShortestPath#getIncomingEdgeMap(Object) */ @Override public Map<V, E> getIncomingEdgeMap(V source) { Map<V, E> sourceIEMap = mIncomingEdgeMap.get(source); if (sourceIEMap == null) { computeShortestPathsFromSource(source); sourceIEMap = mIncomingEdgeMap.get(source); } return sourceIEMap; }
/** * @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistance(Object, Object) */ public Number getDistance(V source, V target) { Map<V, Number> sourceSPMap = getDistanceMap(source); return sourceSPMap.get(target); }
/** * Equivalent to <code>this(graph, averaging, true, true)</code>. * * @param graph * The graph on which the vertex scores are to be calculated. * @param averaging * Specifies whether the values returned is the sum of all * v-distances or the mean v-distance. */ public DistanceCentralityScorer(Hypergraph<V, E> graph, boolean averaging) { this(graph, new UnweightedShortestPath<V, E>(graph), averaging, true, true); }
/** * @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistanceMap(Object) */ public Map<V,Number> getDistanceMap(V source) { Map<V,Number> sourceSPMap = mDistanceMap.get(source); if (sourceSPMap == null) { computeShortestPathsFromSource(source); sourceSPMap = mDistanceMap.get(source); } return sourceSPMap; }
/** @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistance(Object, Object) */ public Integer getDistance(N source, N target) { Map<N, Integer> sourceSPMap = getDistanceMap(source); return sourceSPMap.get(target); }
/** * Equivalent to <code>this(graph, averaging, true, true)</code>. * @param graph The graph on which the vertex scores are to be * calculated. * @param averaging Specifies whether the values returned is the sum of * all v-distances or the mean v-distance. */ public DistanceCentralityScorer(Hypergraph<V,E> graph, boolean averaging) { this(graph, new UnweightedShortestPath<V,E>(graph), averaging, true, true); }
/** @see edu.uci.ics.jung.algorithms.shortestpath.Distance#getDistanceMap(Object) */ public Map<N, Integer> getDistanceMap(N source) { Map<N, Integer> sourceSPMap = mDistanceMap.get(source); if (sourceSPMap == null) { computeShortestPathsFromSource(source); sourceSPMap = mDistanceMap.get(source); } return sourceSPMap; }
/** * Initialises unit distance measure. * * @param viewer * OVTK2PropertiesAggregator */ public AttributeKKLayout(OVTK2PropertiesAggregator viewer) { super(viewer); this.distance = new UnweightedShortestPath<ONDEXConcept, ONDEXRelation>( graph); }