de.uka.ipd.sdq.ByCounter.example.fibonacci
Class FibonacciAlgorithm

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.example.fibonacci.FibonacciAlgorithm

public class FibonacciAlgorithm
extends java.lang.Object

Implementation of an algorithm calculating Fibonacci numbers. Chosen as the calculation requires only CPU. Algorithm is also used in class de.uka.ipd.sdq.measurement.strategies.activeresource.cpu.FibonacciDemand of the ProtoCom framework.

Author:
groenda

Constructor Summary
FibonacciAlgorithm()
           
 
Method Summary
 long fibonacci(long rounds)
          Calculates a Fibonacci number given the number of rounds the algorithm should run.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FibonacciAlgorithm

public FibonacciAlgorithm()
Method Detail

fibonacci

public long fibonacci(long rounds)
Calculates a Fibonacci number given the number of rounds the algorithm should run.

Parameters:
rounds - Number of calculation rounds.
Returns:
Fibonacci number.