Class SampleBernoulliDistribution

java.lang.Object
dk.alexandra.fresco.stat.sampling.SampleBernoulliDistribution
All Implemented Interfaces:
dk.alexandra.fresco.framework.builder.Computation<dk.alexandra.fresco.framework.value.SInt,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>

public class SampleBernoulliDistribution
extends Object
implements dk.alexandra.fresco.framework.builder.Computation<dk.alexandra.fresco.framework.value.SInt,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>
Sample a number from a Bernoulli distribution which is 0 with probability p and 1 with probability 1-p.
  • Constructor Details

  • Method Details

    • buildComputation

      public dk.alexandra.fresco.framework.DRes<dk.alexandra.fresco.framework.value.SInt> buildComputation​(dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric root)
      Specified by:
      buildComputation in interface dk.alexandra.fresco.framework.builder.Computation<dk.alexandra.fresco.framework.value.SInt,​dk.alexandra.fresco.framework.builder.numeric.ProtocolBuilderNumeric>