congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
UndirectedGraphConnections
Code IndexAdd Tabnine to your IDE (free)

How to use
UndirectedGraphConnections
in
com.google.common.graph

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

origin: google/guava

static <N, V> UndirectedGraphConnections<N, V> ofImmutable(Map<N, V> adjacentNodeValues) {
 return new UndirectedGraphConnections<>(ImmutableMap.copyOf(adjacentNodeValues));
}
origin: google/guava

@Override
public void addPredecessor(N node, V value) {
 @SuppressWarnings("unused")
 V unused = addSuccessor(node, value);
}
origin: google/guava

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

private static <N> GraphConnections<N, Presence> connectionsOf(Graph<N> graph, N node) {
 Function<Object, Presence> edgeValueFn = Functions.constant(Presence.EDGE_EXISTS);
 return graph.isDirected()
   ? DirectedGraphConnections.ofImmutable(
     graph.predecessors(node), Maps.asMap(graph.successors(node), edgeValueFn))
   : UndirectedGraphConnections.ofImmutable(
     Maps.asMap(graph.adjacentNodes(node), edgeValueFn));
}
origin: google/guava

@Override
public void removePredecessor(N node) {
 @SuppressWarnings("unused")
 V unused = removeSuccessor(node);
}
origin: google/guava

 private GraphConnections<N, V> newConnections() {
  return isDirected()
    ? DirectedGraphConnections.<N, V>of()
    : UndirectedGraphConnections.<N, V>of();
 }
}
origin: google/guava

 private static <N, V> GraphConnections<N, V> connectionsOf(
   final ValueGraph<N, V> graph, final N node) {
  Function<N, V> successorNodeToValueFn =
    new Function<N, V>() {
     @Override
     public V apply(N successorNode) {
      return graph.edgeValueOrDefault(node, successorNode, null);
     }
    };
  return graph.isDirected()
    ? DirectedGraphConnections.ofImmutable(
      graph.predecessors(node), Maps.asMap(graph.successors(node), successorNodeToValueFn))
    : UndirectedGraphConnections.ofImmutable(
      Maps.asMap(graph.adjacentNodes(node), successorNodeToValueFn));
 }
}
origin: google/j2objc

@Override
public void removePredecessor(N node) {
 @SuppressWarnings("unused")
 V unused = removeSuccessor(node);
}
origin: google/j2objc

 private GraphConnections<N, V> newConnections() {
  return isDirected()
    ? DirectedGraphConnections.<N, V>of()
    : UndirectedGraphConnections.<N, V>of();
 }
}
origin: google/j2objc

private static <N> GraphConnections<N, Presence> connectionsOf(Graph<N> graph, N node) {
 Function<Object, Presence> edgeValueFn = Functions.constant(Presence.EDGE_EXISTS);
 return graph.isDirected()
   ? DirectedGraphConnections.ofImmutable(
     graph.predecessors(node), Maps.asMap(graph.successors(node), edgeValueFn))
   : UndirectedGraphConnections.ofImmutable(
     Maps.asMap(graph.adjacentNodes(node), edgeValueFn));
}
origin: google/guava

@Override
public Set<N> predecessors() {
 return adjacentNodes();
}
origin: google/guava

static <N, V> UndirectedGraphConnections<N, V> of() {
 return new UndirectedGraphConnections<>(new HashMap<N, V>(INNER_CAPACITY, INNER_LOAD_FACTOR));
}
origin: wildfly/wildfly

@Override
public void removePredecessor(N node) {
 @SuppressWarnings("unused")
 V unused = removeSuccessor(node);
}
origin: google/j2objc

@Override
public void addPredecessor(N node, V value) {
 @SuppressWarnings("unused")
 V unused = addSuccessor(node, value);
}
origin: wildfly/wildfly

 private GraphConnections<N, V> newConnections() {
  return isDirected()
    ? DirectedGraphConnections.<N, V>of()
    : UndirectedGraphConnections.<N, V>of();
 }
}
origin: google/j2objc

 private static <N, V> GraphConnections<N, V> connectionsOf(
   final ValueGraph<N, V> graph, final N node) {
  Function<N, V> successorNodeToValueFn =
    new Function<N, V>() {
     @Override
     public V apply(N successorNode) {
      return graph.edgeValueOrDefault(node, successorNode, null);
     }
    };
  return graph.isDirected()
    ? DirectedGraphConnections.ofImmutable(
      graph.predecessors(node), Maps.asMap(graph.successors(node), successorNodeToValueFn))
    : UndirectedGraphConnections.ofImmutable(
      Maps.asMap(graph.adjacentNodes(node), successorNodeToValueFn));
 }
}
origin: google/j2objc

@Override
public Set<N> predecessors() {
 return adjacentNodes();
}
origin: google/j2objc

static <N, V> UndirectedGraphConnections<N, V> ofImmutable(Map<N, V> adjacentNodeValues) {
 return new UndirectedGraphConnections<>(ImmutableMap.copyOf(adjacentNodeValues));
}
origin: org.jboss.eap/wildfly-client-all

@Override
public void removePredecessor(N node) {
 @SuppressWarnings("unused")
 V unused = removeSuccessor(node);
}
origin: wildfly/wildfly

@Override
public void addPredecessor(N node, V value) {
 @SuppressWarnings("unused")
 V unused = addSuccessor(node, value);
}
com.google.common.graphUndirectedGraphConnections

Javadoc

An implementation of GraphConnections for undirected graphs.

Most used methods

  • <init>
  • addSuccessor
  • adjacentNodes
  • of
  • ofImmutable
  • removeSuccessor

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Path (java.nio.file)
  • JFileChooser (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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