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

How to use
ofImmutable
method
in
com.google.common.graph.DirectedNetworkConnections

Best Java code snippets using com.google.common.graph.DirectedNetworkConnections.ofImmutable (Showing top 5 results out of 315)

origin: google/guava

private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) {
 if (network.isDirected()) {
  Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network));
  Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network));
  int selfLoopCount = network.edgesConnecting(node, node).size();
  return network.allowsParallelEdges()
    ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount)
    : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount);
 } else {
  Map<E, N> incidentEdgeMap =
    Maps.asMap(network.incidentEdges(node), adjacentNodeFn(network, node));
  return network.allowsParallelEdges()
    ? UndirectedMultiNetworkConnections.ofImmutable(incidentEdgeMap)
    : UndirectedNetworkConnections.ofImmutable(incidentEdgeMap);
 }
}
origin: google/j2objc

private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) {
 if (network.isDirected()) {
  Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network));
  Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network));
  int selfLoopCount = network.edgesConnecting(node, node).size();
  return network.allowsParallelEdges()
    ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount)
    : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount);
 } else {
  Map<E, N> incidentEdgeMap =
    Maps.asMap(network.incidentEdges(node), adjacentNodeFn(network, node));
  return network.allowsParallelEdges()
    ? UndirectedMultiNetworkConnections.ofImmutable(incidentEdgeMap)
    : UndirectedNetworkConnections.ofImmutable(incidentEdgeMap);
 }
}
origin: wildfly/wildfly

private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) {
 if (network.isDirected()) {
  Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network));
  Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network));
  int selfLoopCount = network.edgesConnecting(node, node).size();
  return network.allowsParallelEdges()
    ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount)
    : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount);
 } else {
  Map<E, N> incidentEdgeMap =
    Maps.asMap(network.incidentEdges(node), adjacentNodeFn(network, node));
  return network.allowsParallelEdges()
    ? UndirectedMultiNetworkConnections.ofImmutable(incidentEdgeMap)
    : UndirectedNetworkConnections.ofImmutable(incidentEdgeMap);
 }
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) {
 if (network.isDirected()) {
  Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network));
  Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network));
  int selfLoopCount = network.edgesConnecting(node, node).size();
  return network.allowsParallelEdges()
    ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount)
    : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount);
 } else {
  Map<E, N> incidentEdgeMap =
    Maps.asMap(network.incidentEdges(node), adjacentNodeFn(network, node));
  return network.allowsParallelEdges()
    ? UndirectedMultiNetworkConnections.ofImmutable(incidentEdgeMap)
    : UndirectedNetworkConnections.ofImmutable(incidentEdgeMap);
 }
}
origin: org.jboss.eap/wildfly-client-all

private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) {
 if (network.isDirected()) {
  Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network));
  Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network));
  int selfLoopCount = network.edgesConnecting(node, node).size();
  return network.allowsParallelEdges()
    ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount)
    : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount);
 } else {
  Map<E, N> incidentEdgeMap =
    Maps.asMap(network.incidentEdges(node), adjacentNodeFn(network, node));
  return network.allowsParallelEdges()
    ? UndirectedMultiNetworkConnections.ofImmutable(incidentEdgeMap)
    : UndirectedNetworkConnections.ofImmutable(incidentEdgeMap);
 }
}
com.google.common.graphDirectedNetworkConnectionsofImmutable

Popular methods of DirectedNetworkConnections

  • <init>
  • of

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JCheckBox (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook Extensions
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