/** * Compute the set of reachable vertices for each vertices composing the * graph associated to the object considering the edge types loaded. * * Exclusive process: The returned result is exclusive as the queried * vertices will NOT be included in their respective set of reachable * vertices. * * @param queryVertices * @return an Map key V value the set of vertices reachable from the key */ public Map<URI, Set<URI>> getRV(Set<URI> queryVertices) { logger.debug("Get All reachable vertices : start"); Map<URI, Set<URI>> allVertices = new HashMap<URI, Set<URI>>(); for (URI v : queryVertices) { allVertices.put(v, getRV(v)); } logger.debug("Get All reachable vertices : end"); return allVertices; }
/** * Compute the set of reachable vertices for each vertices composing the * graph associated to the object considering the edge types loaded. * * Exclusive process: The returned result is exclusive as the queried * vertices will NOT be included in their respective set of reachable * vertices. * * @param queryVertices * @return an Map key V value the set of vertices reachable from the key */ public Map<URI, Set<URI>> getRV(Set<URI> queryVertices) { logger.debug("Get All reachable vertices : start"); Map<URI, Set<URI>> allVertices = new HashMap(); for (URI v : queryVertices) { allVertices.put(v, getRV(v)); } logger.debug("Get All reachable vertices : end"); return allVertices; }
/** * Return the number of vertices reachable from all vertices composing the * graph associated to the instance. * * Exclusive process: The returned result is exclusive as the queried * vertices will NOT be counted as part of their respective set of reachable * vertices. * * @param queryVertices * @return an Map key V value the size of the set of vertices reachable * from the key as Integer */ public Map<URI, Integer> getRVnb(Set<URI> queryVertices) { Map<URI, Set<URI>> r = getRV(queryVertices); Map<URI, Integer> results = new HashMap<URI, Integer>(r.size()); for (Entry<URI, Set<URI>> entry : r.entrySet()) { results.put(entry.getKey(), entry.getValue().size()); } return results; }
/** * Return the number of vertices reachable from all vertices composing the * graph associated to the instance. * * Exclusive process: The returned result is exclusive as the queried * vertices will NOT be counted as part of their respective set of reachable * vertices. * * @param queryVertices * @return an Map key V value the size of the set of vertices reachable from * the key as Integer */ public Map<URI, Integer> getRVnb(Set<URI> queryVertices) { Map<URI, Set<URI>> r = getRV(queryVertices); Map<URI, Integer> results = new HashMap(r.size()); for (Entry<URI, Set<URI>> entry : r.entrySet()) { results.put(entry.getKey(), entry.getValue().size()); } return results; }
isVisited.put(v, Boolean.TRUE); Set<URI> ancestorsV = rvf.getRV(v);
isVisited.put(v, Boolean.TRUE); Set<URI> ancestorsV = rvf.getRV(v);