Class DiscreteGaussianGeneratorGeneric
Defined in File discretegaussiangeneratorgeneric.h
Page Contents
Class Documentation
-
class lbcrypto::DiscreteGaussianGeneratorGeneric
The class for Generic Discrete Gaussion Distribution generator.
Public Functions
-
DiscreteGaussianGeneratorGeneric(BaseSampler **samplers, const double std, const int b, double N)
Basic constructor which does the precomputations.
- Parameters
samplers – Array containing the base samplers
std – Standard deviation of the base samplers
b – Log of number of centers that are used for calculating base samplers (Recall that base samplers are centered from 0 to (2^b-1)/2^b)
N – smoothing parameter
-
DiscreteGaussianGeneratorGeneric(const DiscreteGaussianGeneratorGeneric&) = delete
-
DiscreteGaussianGeneratorGeneric &operator=(const DiscreteGaussianGeneratorGeneric&) = delete
-
int64_t GenerateInteger(double mean, double std)
Returns a generated integer. Uses generic algorithm in UCSD paper, based on Sample Z.
- Parameters
mean – Mean of the distribution
std – Standard deviation of the desired distribution
- Returns
A random value within the Discrete Gaussian Distribution
-
inline int64_t GenerateInteger()
Returns a sample from the first base sampler (center 0), bypassing the generic combination step.
- Returns
A random value within the Discrete Gaussian Distribution of the first base sampler
-
~DiscreteGaussianGeneratorGeneric()
Destructor.
-
DiscreteGaussianGeneratorGeneric(BaseSampler **samplers, const double std, const int b, double N)