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

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

Best Java code snippets using org.grouplens.grapht.graph.DAGNode.replaceNode (Showing top 4 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: lenskit/lenskit

newGraph = newGraph.replaceNode(node, repl, memory);
origin: org.lenskit/lenskit-core

newGraph = newGraph.replaceNode(node, repl, memory);
origin: org.grouplens.grapht/grapht

DAGNodeBuilder<V,E> bld = newBuilder(label);
for (DAGEdge<V,E> edge: outgoingEdges) {
  DAGNode<V,E> newTail = edge.getTail().replaceNode(node, replacement, memory);
  bld.addEdge(newTail, edge.getLabel());
origin: org.grouplens.grapht/grapht

private void replaceNode(DAGNode<Component,Dependency> old,
             DAGNode<Component,Dependency> repl) {
  Map<DAGNode<Component,Dependency>,
      DAGNode<Component,Dependency>> memory = Maps.newHashMap();
  graph = graph.replaceNode(old, repl, memory);
  // loop over a snapshot of the list, replacing nodes
  Collection<DAGEdge<Component, Dependency>> oldBackEdges = backEdges.values();
  backEdges = HashMultimap.create();
  for (DAGEdge<Component,Dependency> edge: oldBackEdges) {
    DAGNode<Component,Dependency> newHead, newTail;
    newHead = memory.get(edge.getHead());
    if (newHead == null) {
      newHead = edge.getHead();
    }
    newTail = memory.get(edge.getTail());
    if (newTail == null) {
      newTail = edge.getTail();
    }
    DAGEdge<Component,Dependency> newEdge;
    if (newHead.equals(edge.getHead()) && newTail.equals(edge.getTail())) {
      newEdge = edge;
    } else {
      newEdge = DAGEdge.create(newHead, newTail, edge.getLabel());
    }
    backEdges.put(newHead, newEdge);
  }
}
org.grouplens.grapht.graphDAGNodereplaceNode

Javadoc

Replace one node with another in this graph. All edges referencing node are replaced with edges referencing replacement.

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
  • 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
  • initializeCaches
    Initialize caches for traversing this node.
  • getIncomingEdgeMap,
  • initializeCaches,
  • singleton,
  • sortVisit,
  • transformEdges

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • String (java.lang)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JButton (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
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