CiFEr
policy.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_POLICY_H
18 #define CIFER_POLICY_H
19 
20 #include <stdbool.h>
21 #include <gmp.h>
22 
23 #include "cifer/data/mat.h"
24 #include "cifer/data/vec.h"
25 #include "cifer/internal/errors.h"
26 #include "cifer/internal/str.h"
27 
43 typedef struct cfe_msp {
44  cfe_mat mat;
46 } cfe_msp;
47 
69 cfe_error cfe_boolean_to_msp(cfe_msp *msp, char *bool_exp,
70  size_t bool_exp_len, bool convert_to_ones);
71 
75 cfe_error cfe_boolean_to_msp_iterative(cfe_msp *msp, cfe_string *bool_exp, cfe_vec *vec, size_t c);
76 
80 void cfe_init_set_vecs_and(cfe_vec *vec1, cfe_vec *vec2, cfe_vec *vec, size_t c);
81 
89 void cfe_msp_free(cfe_msp *msp);
90 
91 #endif
str.h
Internal functions for dealing with strings.
cfe_vec
Definition: vec.h:41
cfe_init_set_vecs_and
void cfe_init_set_vecs_and(cfe_vec *vec1, cfe_vec *vec2, cfe_vec *vec, size_t c)
mat.h
Matrix struct and operations.
errors.h
Error definitions.
cfe_msp::row_to_attrib
int * row_to_attrib
Definition: policy.h:45
cfe_msp
Definition: policy.h:43
cfe_msp_free
void cfe_msp_free(cfe_msp *msp)
cfe_boolean_to_msp
cfe_error cfe_boolean_to_msp(cfe_msp *msp, char *bool_exp, size_t bool_exp_len, bool convert_to_ones)
cfe_boolean_to_msp_iterative
cfe_error cfe_boolean_to_msp_iterative(cfe_msp *msp, cfe_string *bool_exp, cfe_vec *vec, size_t c)
vec.h
Vector struct and operations.
cfe_msp
struct cfe_msp cfe_msp
cfe_string
Definition: str.h:32
cfe_mat
Definition: mat.h:44