congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NodeIterable.toCollection
Code IndexAdd Tabnine to your IDE (free)

How to use
toCollection
method
in
org.gephi.graph.api.NodeIterable

Best Java code snippets using org.gephi.graph.api.NodeIterable.toCollection (Showing top 6 results out of 315)

origin: org.gephi/tools-plugin

public static Node[] getPredecessors(DirectedGraph graph, Node[] nodes) {
  Set<Node> nodeTree = new HashSet<>();
  graph.readLock();
  try {
    for (Node n : nodes) {
      nodeTree.addAll(graph.getPredecessors(n).toCollection());
    }
  } finally {
    graph.readUnlock();
  }
  //remove original nodes
  for (Node n : nodes) {
    nodeTree.remove(n);
  }
  return nodeTree.toArray(new Node[0]);
}
origin: org.gephi/tools-plugin

public static Node[] getNeighbors(Graph graph, Node[] nodes) {
  Set<Node> nodeTree = new HashSet<>();
  
  graph.readLock();
  try {
    for (Node n : nodes) {
      nodeTree.addAll(graph.getNeighbors(n).toCollection());
    }
  } finally {
    graph.readUnlock();
  }
  //remove original nodes
  for (Node n : nodes) {
    nodeTree.remove(n);
  }
  return nodeTree.toArray(new Node[0]);
}
origin: org.gephi/tools-plugin

public static Node[] getSuccessors(DirectedGraph graph, Node[] nodes) {
  Set<Node> nodeTree = new HashSet<>();
  graph.readLock();
  try {
    for (Node n : nodes) {
      nodeTree.addAll(graph.getSuccessors(n).toCollection());
    }
  } finally {
    graph.readUnlock();
  }
  //remove original nodes
  for (Node n : nodes) {
    nodeTree.remove(n);
  }
  return nodeTree.toArray(new Node[0]);
}
origin: org.gephi/tools-plugin

public static Node[] getNeighborsOfNeighbors(Graph graph, Node[] nodes) {
  Set<Node> nodeTree = new HashSet<>();
  graph.readLock();
  try {
    for (Node n : nodes) {
      nodeTree.addAll(graph.getNeighbors(n).toCollection());
    }
    //remove original nodes
    for (Node n : nodes) {
      nodeTree.remove(n);
    }
    for (Node n : nodeTree.toArray(new Node[0])) {
      nodeTree.addAll(graph.getNeighbors(n).toCollection());
    }
  } finally {
    graph.readUnlock();
  }
  //remove original nodes
  for (Node n : nodes) {
    nodeTree.remove(n);
  }
  return nodeTree.toArray(new Node[0]);
}
origin: org.gephi/statistics-plugin

topology[node_index] = new ArrayList<>();
Set<Node> uniqueNeighbors = new HashSet<>(graph.getNeighbors(node).toCollection());
for (Node neighbor : uniqueNeighbors) {
  if (node == neighbor) {
origin: org.gephi/filters-plugin

Collection<Node> nodes = graph.getNodes().toCollection();
org.gephi.graph.apiNodeIterabletoCollection

Javadoc

Returns the iterator content as a collection.

Popular methods of NodeIterable

  • toArray
    Returns the iterator content as an array.
  • doBreak
  • iterator
    Returns a node iterator.

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JFileChooser (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Sublime Text 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