congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Permission (java.security)
    Legacy security code; do not use.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best IntelliJ plugins
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