Class Pegasus
java.lang.Object
org.shredzone.commons.suncalc.util.Pegasus
Finds the root of a function by using the Pegasus method.
- Since:
 - 2.3
 - See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe function that is to be solved. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic Doublecalculate(double lower, double upper, double accuracy, Pegasus.Function f) Find the root of the given function within the boundaries. 
- 
Constructor Details
- 
Pegasus
public Pegasus() 
 - 
 - 
Method Details
- 
calculate
Find the root of the given function within the boundaries.- Parameters:
 lower- Lower boundaryupper- Upper boundaryaccuracy- Desired accuracyf- Function to be used for calculation- Returns:
 - root that was found
 - Throws:
 ArithmeticException- if the root could not be found in the given accuracy within 30 iterations.
 
 -