public class PiEstimation extends Object implements Serializable
x = Math.random()
y = Math.random()
x * x + y * y < 1
Modifier and Type | Class and Description |
---|---|
static class |
PiEstimation.Sampler
Sampler randomly emits points that fall within a square of edge x * y.
|
static class |
PiEstimation.SumReducer
Simply sums up all long values.
|
Constructor and Description |
---|
PiEstimation() |
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.