/** * Topological propagation considering one occurrence per term * * @return the number of occurrences (propagated considering a single * occurrence per class) * @throws SLIB_Exception */ public Map<URI, Integer> getNbOccurrenceProp() throws SLIB_Exception { if (cache.nbOccurrencePropagatted == null) { RVF_TAX RVF = new RVF_TAX(graph, Direction.IN); Map<URI, Integer> nbOccurrences = new HashMap<URI, Integer>(); for (URI o : classes) { nbOccurrences.put(o, 1); } Map<URI, Integer> nbOccurrencesPropagated = RVF.propagateNbOccurences(nbOccurrences); cache.nbOccurrencePropagatted = nbOccurrencesPropagated; } return Collections.unmodifiableMap(cache.nbOccurrencePropagatted); }
/** * Compute for all vertices of the loaded graph, the set of vertices corresponding to classes which can be reach from them. * Exclusive process: a vertex will NOT be included in the set of reachable vertices it can reach. * @return the map storing, for each vertex, the set of reachable vertices respecting the above constraint. * @throws SLIB_Ex_Critic */ public Map<URI, Set<URI>> getAllRVClass() throws SLIB_Ex_Critic { return getAllRV(); } }
/** * Compute the set of vertices corresponding to classes which can be reach from the given vertex. * Exclusive process: the focused vertex will NOT be included in the set of * reachable vertices. * @param v the vertex of interest * @return the set of classes which can be reached from the selected vertex */ public Set<URI> getRVClass(URI v) { return getRV(v); }
System.out.println(g); RVF_TAX rvf = new RVF_TAX(g, Direction.IN); Map<URI, Set<URI>> descs = rvf.getAllRVClass();
RVF rvf = new RVF_TAX(graph, Direction.OUT);
System.out.println(g); RVF_TAX rvf = new RVF_TAX(g, Direction.IN); Map<URI, Set<URI>> descs = rvf.getAllRVClass();
RVF rvf = new RVF_TAX(graph, Direction.OUT);
System.out.println(g); RVF_TAX rvf = new RVF_TAX(g, Direction.IN); Map<URI, Set<URI>> descs = rvf.getAllRVClass();
/** * Compute the set of vertices corresponding to classes which can be reach from the given vertex. * Exclusive process: the focused vertex will NOT be included in the set of * reachable vertices. * @param v the vertex of interest * @return the set of classes which can be reached from the selected vertex */ public Set<URI> getRVClass(URI v) { return getRV(v); }
/** * Compute for all vertices of the loaded graph, the set of vertices corresponding to classes which can be reach from them. * Exclusive process: a vertex will NOT be included in the set of reachable vertices it can reach. * @return the map storing, for each vertex, the set of reachable vertices respecting the above constraint. * @throws SLIB_Ex_Critic */ public Map<URI, Set<URI>> getAllRVClass() throws SLIB_Ex_Critic { return getAllRV(); } }
System.out.println(g); RVF_TAX rvf = new RVF_TAX(g, Direction.IN); Map<URI, Set<URI>> descs = rvf.getAllRVClass();