CiFEr
include
cifer
sample
uniform.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_UNIFORM_H
18
#define CIFER_UNIFORM_H
19
20
#include "
cifer/data/vec.h
"
21
#include "
cifer/data/mat.h
"
22
36
void
cfe_uniform_sample
(mpz_t res, mpz_t upper);
37
41
void
cfe_uniform_sample_i
(mpz_t res,
size_t
upper);
42
51
void
cfe_uniform_sample_range
(mpz_t res, mpz_t min, mpz_t max);
52
56
void
cfe_uniform_sample_range_i_mpz
(mpz_t res,
int
min, mpz_t max);
57
61
void
cfe_uniform_sample_range_i_i
(mpz_t res,
int
min,
int
max);
62
66
void
cfe_uniform_sample_vec
(
cfe_vec
*res, mpz_t max);
67
71
void
cfe_uniform_sample_range_vec
(
cfe_vec
*res, mpz_t lower, mpz_t upper);
72
76
void
cfe_uniform_sample_mat
(
cfe_mat
*res, mpz_t max);
77
81
void
cfe_uniform_sample_range_mat
(
cfe_mat
*res, mpz_t lower, mpz_t upper);
82
88
bool
cfe_bit_sample
(
void
);
89
99
void
cfe_uniform_sample_vec_det
(
cfe_vec
*res, mpz_t max,
unsigned
char
*key);
100
110
void
cfe_uniform_sample_mat_det
(
cfe_mat
*res, mpz_t max,
unsigned
char
*key);
111
112
#endif
cfe_uniform_sample_vec
void cfe_uniform_sample_vec(cfe_vec *res, mpz_t max)
cfe_uniform_sample_range_vec
void cfe_uniform_sample_range_vec(cfe_vec *res, mpz_t lower, mpz_t upper)
cfe_uniform_sample
void cfe_uniform_sample(mpz_t res, mpz_t upper)
cfe_vec
Definition:
vec.h:41
cfe_uniform_sample_mat
void cfe_uniform_sample_mat(cfe_mat *res, mpz_t max)
cfe_uniform_sample_range_i_mpz
void cfe_uniform_sample_range_i_mpz(mpz_t res, int min, mpz_t max)
mat.h
Matrix struct and operations.
cfe_uniform_sample_range_i_i
void cfe_uniform_sample_range_i_i(mpz_t res, int min, int max)
cfe_bit_sample
bool cfe_bit_sample(void)
cfe_uniform_sample_i
void cfe_uniform_sample_i(mpz_t res, size_t upper)
cfe_uniform_sample_range_mat
void cfe_uniform_sample_range_mat(cfe_mat *res, mpz_t lower, mpz_t upper)
cfe_uniform_sample_vec_det
void cfe_uniform_sample_vec_det(cfe_vec *res, mpz_t max, unsigned char *key)
cfe_uniform_sample_mat_det
void cfe_uniform_sample_mat_det(cfe_mat *res, mpz_t max, unsigned char *key)
vec.h
Vector struct and operations.
cfe_uniform_sample_range
void cfe_uniform_sample_range(mpz_t res, mpz_t min, mpz_t max)
cfe_mat
Definition:
mat.h:44
Generated by
1.8.17