- All Implemented Interfaces:
- Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.MapFunction<Long,Long>
- Enclosing class:
- PiEstimation
public static class PiEstimation.Sampler
extends Object
implements org.apache.flink.api.common.functions.MapFunction<Long,Long>
Sampler randomly emits points that fall within a square of edge x * y. It calculates the
distance to the center of a virtually centered circle of radius x = y = 1 If the distance is
less than 1, then and only then does it returns a 1.
- See Also:
- Serialized Form