Codota Logo
DAGNode.sortVisit
Code IndexAdd Codota to your IDE (free)

How to use
sortVisit
method
in
org.grouplens.grapht.graph.DAGNode

Best Java code snippets using org.grouplens.grapht.graph.DAGNode.sortVisit (Showing top 1 results out of 315)

  • Common ways to obtain DAGNode
private void myMethod () {
DAGNode d =
  • Codota IconDAGNodeBuilder dAGNodeBuilder;dAGNodeBuilder.build()
  • Codota IconRecommenderGraphBuilder recommenderGraphBuilder;recommenderGraphBuilder.buildGraph()
  • Codota IconRecommenderInstantiator recommenderInstantiator;recommenderInstantiator.instantiate()
  • Smart code suggestions by Codota
}
origin: org.grouplens.grapht/grapht

/**
 * Helper mode for {@link #getSortedNodes()}, via {@link TopologicalSortSupplier}.  This method
 * does a depth-first traversal of the nodes, adding each to the {@code visited} set when it is
 * left.  This results in {@code visited} being a topological sort.
 *
 * @param visited The set of nodes seen so far.
 */
private void sortVisit(LinkedHashSet<DAGNode<V,E>> visited) {
  if (!visited.contains(this)) {
    for (DAGEdge<V,E> nbr: outgoingEdges) {
      nbr.getTail().sortVisit(visited);
    }
    // neighbors won't have added this, or we have an impossible cycle
    assert !visited.contains(this);
    visited.add(this);
  }
}
org.grouplens.grapht.graphDAGNodesortVisit

Javadoc

Helper mode for #getSortedNodes(), via TopologicalSortSupplier. This method does a depth-first traversal of the nodes, adding each to the visited set when it is left. This results in visited being a topological sort.

Popular methods of DAGNode

  • getLabel
    Get the label for this node.
  • getOutgoingEdges
    Get the outgoing edges of this node.
  • getReachableNodes
  • newBuilder
    Construct a new DAG node builder.
  • getOutgoingEdgeWithLabel
  • getSortedNodes
    Topographical sort all nodes reachable from the given root node. Nodes that are farther away, or mor
  • replaceNode
    Replace one node with another in this graph. All edges referencing node are replaced with edges refe
  • breadthFirstEdges
  • <init>
    Construct a new DAG node.
  • copyBuilder
    Create a new builder initialized to build a copy of the specified node.
  • getAdjacentNodes
    Get the nodes that are adjacent to this node (only considering outgoing edges).
  • getIncomingEdgeMap
    Get a multimap of incoming edges. For each node reachable from this node, the map will contain each
  • getAdjacentNodes,
  • getIncomingEdgeMap,
  • initializeCaches,
  • singleton,
  • transformEdges

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now