void clearVisited() { for (Edge<Node> e : adjacencies.values()) { e.from.visited = false; e.to.visited = false; } }
public Collection<Edge<Node>> getAllEdges() { return adjacencies.values(); }
public void printEdges() { for (Edge<Node> e : adjacencies.values()) { System.out.println(e.from.index + " -> " + e.to.index); } }
Collection<Node> getInternalRootNodes() { Set<Node> nodes = new HashSet<Node>(getNodeSet()); for (Edge<Node> e : adjacencies.values()) { nodes.remove(e.to); } return nodes; }
public AdjacencyList<V> getReversedList() { AdjacencyList<V> newlist = new AdjacencyList<V>(); for (Edge<Node> e : adjacencies.values()) { newlist.addEdge(e.to, e.from, e.weight); } return newlist; }
void clearVisited() { for (Edge<Node> e : adjacencies.values()) { e.from.visited = false; e.to.visited = false; } }
public Collection<Edge<Node>> getAllEdges() { return adjacencies.values(); }
public void printEdges() { for (Edge<Node> e : adjacencies.values()) { System.out.println(e.from.index + " -> " + e.to.index); } }
Collection<Node> getInternalRootNodes() { Set<Node> nodes = new HashSet<Node>(getNodeSet()); for (Edge<Node> e : adjacencies.values()) { nodes.remove(e.to); } return nodes; }
public AdjacencyList<V> getReversedList() { AdjacencyList<V> newlist = new AdjacencyList<V>(); for (Edge<Node> e : adjacencies.values()) { newlist.addEdge(e.to, e.from, e.weight); } return newlist; }
/** * Registers all functions present in Drill classpath on start-up. * All functions will be marked as built-in. Built-in functions are not allowed to be unregistered. * Since local function registry version is based on remote function registry version, * initially sync version will be set to {@link DataChangeVersion#UNDEFINED} * to ensure that upon first check both registries would be synchronized. */ public LocalFunctionRegistry(ScanResult classpathScan) { registryHolder = new FunctionRegistryHolder(); validate(BUILT_IN, classpathScan); register(Lists.newArrayList(new JarScan(BUILT_IN, classpathScan, this.getClass().getClassLoader())), DataChangeVersion.UNDEFINED); if (logger.isTraceEnabled()) { StringBuilder allFunctions = new StringBuilder(); for (DrillFuncHolder method: registryHolder.getAllFunctionsWithHolders().values()) { allFunctions.append(method.toString()).append("\n"); } logger.trace("Registered functions: [\n{}]", allFunctions); } }