Tabnine Logo
ConfigurableNetwork
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: google/guava

@Override
public ImmutableGraph<N> asGraph() {
 return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable
}
origin: google/guava

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

@Override
public EndpointPair<N> incidentNodes(E edge) {
 N nodeU = checkedReferenceNode(edge);
 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge);
 return EndpointPair.of(this, nodeU, nodeV);
}
origin: google/guava

@Override
public Set<E> edgesConnecting(N nodeU, N nodeV) {
 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU);
 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality
  return ImmutableSet.of();
 }
 checkArgument(containsNode(nodeV), NODE_NOT_IN_GRAPH, nodeV);
 return connectionsU.edgesConnecting(nodeV);
}
origin: google/j2objc

@Override
public Set<E> edgesConnecting(N nodeU, N nodeV) {
 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU);
 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality
  return ImmutableSet.of();
 }
 checkArgument(containsNode(nodeV), NODE_NOT_IN_GRAPH, nodeV);
 return connectionsU.edgesConnecting(nodeV);
}
origin: google/guava

@Override
public Set<E> incidentEdges(N node) {
 return checkedConnections(node).incidentEdges();
}
origin: wildfly/wildfly

@Override
public Set<E> edgesConnecting(N nodeU, N nodeV) {
 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU);
 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality
  return ImmutableSet.of();
 }
 checkArgument(containsNode(nodeV), NODE_NOT_IN_GRAPH, nodeV);
 return connectionsU.edgesConnecting(nodeV);
}
origin: google/j2objc

@Override
public EndpointPair<N> incidentNodes(E edge) {
 N nodeU = checkedReferenceNode(edge);
 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge);
 return EndpointPair.of(this, nodeU, nodeV);
}
origin: google/j2objc

@Override
public ImmutableGraph<N> asGraph() {
 return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable
}
origin: google/guava

@Override
public Set<N> predecessors(N node) {
 return checkedConnections(node).predecessors();
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public Set<E> edgesConnecting(N nodeU, N nodeV) {
 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU);
 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality
  return ImmutableSet.of();
 }
 checkArgument(containsNode(nodeV), NODE_NOT_IN_GRAPH, nodeV);
 return connectionsU.edgesConnecting(nodeV);
}
origin: wildfly/wildfly

@Override
public EndpointPair<N> incidentNodes(E edge) {
 N nodeU = checkedReferenceNode(edge);
 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge);
 return EndpointPair.of(this, nodeU, nodeV);
}
origin: wildfly/wildfly

@Override
public ImmutableGraph<N> asGraph() {
 return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable
}
origin: google/guava

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

@Override
public Set<E> edgesConnecting(N nodeU, N nodeV) {
 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU);
 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality
  return ImmutableSet.of();
 }
 checkArgument(containsNode(nodeV), NODE_NOT_IN_GRAPH, nodeV);
 return connectionsU.edgesConnecting(nodeV);
}
origin: org.jboss.eap/wildfly-client-all

@Override
public EndpointPair<N> incidentNodes(E edge) {
 N nodeU = checkedReferenceNode(edge);
 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge);
 return EndpointPair.of(this, nodeU, nodeV);
}
origin: org.jboss.eap/wildfly-client-all

@Override
public ImmutableGraph<N> asGraph() {
 return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable
}
origin: google/guava

@Override
public Set<E> inEdges(N node) {
 return checkedConnections(node).inEdges();
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public EndpointPair<N> incidentNodes(E edge) {
 N nodeU = checkedReferenceNode(edge);
 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge);
 return EndpointPair.of(this, nodeU, nodeV);
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

@Override
public ImmutableGraph<N> asGraph() {
 return new ImmutableGraph<N>(super.asGraph()); // safe because the view is effectively immutable
}
com.google.common.graphConfigurableNetwork

Javadoc

Configurable implementation of Network that supports the options supplied by NetworkBuilder.

This class maintains a map of nodes to NetworkConnections. This class also maintains a map of edges to reference nodes. The reference node is defined to be the edge's source node on directed graphs, and an arbitrary endpoint of the edge on undirected graphs.

Collection-returning accessors return unmodifiable views: the view returned will reflect changes to the graph (if the graph is mutable) but may not be modified by the user.

The time complexity of all collection-returning accessors is O(1), since views are returned.

Most used methods

  • asGraph
  • checkedConnections
  • checkedReferenceNode
  • containsNode

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Top 12 Jupyter Notebook extensions
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