Class FibonacciAlgorithm
java.lang.Object
topics.parallel.FibonacciAlgorithm
To solve the classical Fibonacci algorithm
using a recursive and inefficient algorithm
- Author:
- vicegd
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongsolve()Initializes the process calling the recursive method
-
Field Details
-
n
public int n
-
-
Constructor Details
-
FibonacciAlgorithm
public FibonacciAlgorithm(int n) Constructor- Parameters:
n- The number to calculate the result
-
-
Method Details
-
solve
public long solve()Initializes the process calling the recursive method- Returns:
- The Fibonacci results for the value of n
-