Package at.jku.ssw.fp.sect04_6
Class Demo2_LazySqrt
- java.lang.Object
-
- at.jku.ssw.fp.sect04_6.Demo2_LazySqrt
-
public class Demo2_LazySqrt extends Object
Demo showing computation of square root using lazy sequences.- Author:
- Herbert Praehofer
-
-
Field Summary
Fields Modifier and Type Field Description private static double
EPSILON
-
Constructor Summary
Constructors Constructor Description Demo2_LazySqrt()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<Double>
findSqrt(double x)
static void
main(String[] args)
static double
sqrt(double x)
static Iterable<Double>
sqrtApprox(double x)
static double
sqrtImperative(double x)
static Iterable<Double>
sqrtIterable(double x)
static Iterator<Double>
sqrtIterator(double x)
-
-
-
Method Detail
-
sqrt
public static double sqrt(double x)
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
sqrtImperative
public static double sqrtImperative(double x)
-
-