Tabnine Logo
BaseGraph.successors
Code IndexAdd Tabnine to your IDE (free)

How to use
successors
method
in
com.google.common.graph.BaseGraph

Best Java code snippets using com.google.common.graph.BaseGraph.successors (Showing top 20 results out of 315)

origin: google/guava

/**
 * Called after {@link #successorIterator} is exhausted. Advances {@link #node} to the next node
 * and updates {@link #successorIterator} to iterate through the successors of {@link #node}.
 */
protected final boolean advance() {
 checkState(!successorIterator.hasNext());
 if (!nodeIterator.hasNext()) {
  return false;
 }
 node = nodeIterator.next();
 successorIterator = graph.successors(node).iterator();
 return true;
}
origin: google/guava

@Override
public Set<N> successors(N node) {
 return delegate().successors(node);
}
origin: google/j2objc

/**
 * Called after {@link #successorIterator} is exhausted. Advances {@link #node} to the next node
 * and updates {@link #successorIterator} to iterate through the successors of {@link #node}.
 */
protected final boolean advance() {
 checkState(!successorIterator.hasNext());
 if (!nodeIterator.hasNext()) {
  return false;
 }
 node = nodeIterator.next();
 successorIterator = graph.successors(node).iterator();
 return true;
}
origin: google/guava

@Override
public int size() {
 return graph.inDegree(node)
   + graph.outDegree(node)
   - (graph.successors(node).contains(node) ? 1 : 0);
}
origin: wildfly/wildfly

/**
 * Called after {@link #successorIterator} is exhausted. Advances {@link #node} to the next node
 * and updates {@link #successorIterator} to iterate through the successors of {@link #node}.
 */
protected final boolean advance() {
 checkState(!successorIterator.hasNext());
 if (!nodeIterator.hasNext()) {
  return false;
 }
 node = nodeIterator.next();
 successorIterator = graph.successors(node).iterator();
 return true;
}
origin: google/j2objc

@Override
public Set<N> successors(N node) {
 return delegate().successors(node);
}
origin: google/guava

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: wildfly/wildfly

@Override
public Set<N> successors(N node) {
 return delegate().successors(node);
}
origin: google/guava

 @Override
 public boolean contains(@Nullable Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: google/j2objc

@Override
public int size() {
 return graph.inDegree(node)
   + graph.outDegree(node)
   - (graph.successors(node).contains(node) ? 1 : 0);
}
origin: wildfly/wildfly

@Override
public int size() {
 return graph.inDegree(node)
   + graph.outDegree(node)
   - (graph.successors(node).contains(node) ? 1 : 0);
}
origin: google/j2objc

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: google/j2objc

 @Override
 public boolean contains(@NullableDecl Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: wildfly/wildfly

@Override
public UnmodifiableIterator<EndpointPair<N>> iterator() {
 return Iterators.unmodifiableIterator(
   Iterators.concat(
     Iterators.transform(
       graph.predecessors(node).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N predecessor) {
         return EndpointPair.ordered(predecessor, node);
        }
       }),
     Iterators.transform(
       // filter out 'node' from successors (already covered by predecessors, above)
       Sets.difference(graph.successors(node), ImmutableSet.of(node)).iterator(),
       new Function<N, EndpointPair<N>>() {
        @Override
        public EndpointPair<N> apply(N successor) {
         return EndpointPair.ordered(node, successor);
        }
       })));
}
origin: wildfly/wildfly

 @Override
 public boolean contains(@NullableDecl Object obj) {
  if (!(obj instanceof EndpointPair)) {
   return false;
  }
  EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
  if (!endpointPair.isOrdered()) {
   return false;
  }
  Object source = endpointPair.source();
  Object target = endpointPair.target();
  return (node.equals(source) && graph.successors(node).contains(target))
    || (node.equals(target) && graph.predecessors(node).contains(source));
 }
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Called after {@link #successorIterator} is exhausted. Advances {@link #node} to the next node
 * and updates {@link #successorIterator} to iterate through the successors of {@link #node}.
 */
protected final boolean advance() {
 checkState(!successorIterator.hasNext());
 if (!nodeIterator.hasNext()) {
  return false;
 }
 node = nodeIterator.next();
 successorIterator = graph.successors(node).iterator();
 return true;
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Called after {@link #successorIterator} is exhausted. Advances {@link #node} to the next node
 * and updates {@link #successorIterator} to iterate through the successors of {@link #node}.
 */
protected final boolean advance() {
 checkState(!successorIterator.hasNext());
 if (!nodeIterator.hasNext()) {
  return false;
 }
 node = nodeIterator.next();
 successorIterator = graph.successors(node).iterator();
 return true;
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public Set<N> successors(N node) {
 return delegate().successors(node);
}
origin: org.jboss.eap/wildfly-client-all

@Override
public int size() {
 return graph.inDegree(node)
   + graph.outDegree(node)
   - (graph.successors(node).contains(node) ? 1 : 0);
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public int size() {
 return graph.inDegree(node)
   + graph.outDegree(node)
   - (graph.successors(node).contains(node) ? 1 : 0);
}
com.google.common.graphBaseGraphsuccessors

Popular methods of BaseGraph

  • adjacentNodes
    Returns the nodes which have an incident edge in common with node in this graph.
  • allowsSelfLoops
    Returns true if this graph allows self-loops (edges that connect a node to itself). Attempting to ad
  • degree
    Returns the count of node's incident edges, counting self-loops twice (equivalently, the number of t
  • edges
    Returns all edges in this graph.
  • hasEdgeConnecting
    Returns true if there is an edge directly connecting nodeU to nodeV. This is equivalent to nodes().c
  • inDegree
    Returns the count of node's incoming edges (equal to predecessors(node).size()) in a directed graph.
  • isDirected
    Returns true if the edges in this graph are directed. Directed edges connect a EndpointPair#source()
  • nodeOrder
    Returns the order of iteration for the elements of #nodes().
  • nodes
    Returns all nodes in this graph, in the order specified by #nodeOrder().
  • outDegree
    Returns the count of node's outgoing edges (equal to successors(node).size()) in a directed graph. I
  • predecessors
  • predecessors

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JList (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now