Example usage for org.apache.commons.collections4.iterators LoopingIterator size

List of usage examples for org.apache.commons.collections4.iterators LoopingIterator size

Introduction

In this page you can find the example usage for org.apache.commons.collections4.iterators LoopingIterator size.

Prototype

public int size() 

Source Link

Document

Gets the size of the collection underlying the iterator.

Usage

From source file:com.samanamp.algorithms.RandomSelectionAlgorithm.java

private void printResults(int finalSigma, LoopingIterator<Node> selectedNodesIterator) {
    String result = "\n======================================" + "\nRunning Simulation on Random Algorithm"
            + "\n--------------------------------------" + "\nTotal Cost Budget: " + maxCost
            + "\nTotal Time Budget: " + maxTime + "\nTotal Sim Runs: " + runs + "\n#Selected Nodes: "
            + selectedNodesIterator.size() + "\nTotal Influence Achieved:" + finalSigma
            + "\n======================================";
    System.out.println(result);/*from   w  ww  .j av a 2s.co  m*/
}

From source file:com.samanamp.algorithms.GreedySelectionAlgorithm.java

private void printResults(int finalSigma, LoopingIterator<Node> selectedNodesIterator) {
    String result = "\n======================================" + "\nRunning Simulation on Greedy Algorithm"
            + "\n--------------------------------------" + "\nTotal Cost Budget: " + maxCost
            + "\nTotal Time Budget: " + maxTime + "\nTotal Sim Runs: " + runs + "\n#Selected Nodes: "
            + selectedNodesIterator.size() + "\nTotal Influence Achieved:" + finalSigma
            + "\n======================================";
    System.out.println(result);/*from w  w  w .  java 2  s . co m*/
}

From source file:com.samanamp.algorithms.ForwardInspectionAlgorithm.java

private void printResults(int finalSigma, LoopingIterator<Node> selectedNodesIterator) {
    String result = "\n======================================"
            + "\nRunning Simulation on ForwardInspection Algorithm" + "\n--------------------------------------"
            + "\nTotal Cost Budget: " + maxCost + "\nTotal Time Budget: " + maxTime + "\nTotal Sim Runs: "
            + runs + "\n#Selected Nodes: " + selectedNodesIterator.size() + "\nTotal Influence Achieved:"
            + finalSigma + "\n======================================";
    System.out.println(result);/*w ww  .  j  a va2 s. c  o m*/
}