CiFEr
normal_double.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 XLAB d.o.o.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CIFER_NORMAL_DOUBLE_H
18 #define CIFER_NORMAL_DOUBLE_H
19 
21 #include "cifer/internal/errors.h"
22 
37 typedef struct cfe_normal_double {
38  cfe_normal nor;
39  cfe_normal_cumulative sampler_cumu; // normal_cumulative sampler used in the first part
40  mpz_t k; // precomputed parameters used for sampling
41  mpz_t twice_k;
43 
57 cfe_error cfe_normal_double_init(cfe_normal_double *s, mpf_t sigma, size_t n, mpf_t first_sigma);
58 
67 
77 
82 
87 
88 #endif
cfe_normal_double_sample
void cfe_normal_double_sample(mpz_t res, cfe_normal_double *s)
cfe_vec
Definition: vec.h:41
cfe_normal_double
Definition: normal_double.h:37
cfe_normal_double_free
void cfe_normal_double_free(cfe_normal_double *s)
errors.h
Error definitions.
cfe_normal_double
struct cfe_normal_double cfe_normal_double
cfe_normal_double_sample_mat
void cfe_normal_double_sample_mat(cfe_mat *res, cfe_normal_double *s)
normal_cumulative.h
Normal cumulative sampler.
cfe_normal_double_init
cfe_error cfe_normal_double_init(cfe_normal_double *s, mpf_t sigma, size_t n, mpf_t first_sigma)
cfe_normal
Definition: normal.h:34
cfe_mat
Definition: mat.h:44
cfe_normal_double_sample_vec
void cfe_normal_double_sample_vec(cfe_vec *res, cfe_normal_double *s)
cfe_normal_cumulative
Definition: normal_cumulative.h:36