Mescal
|
Implementation of Boolean arrays. More...
#include "tools.h"
Go to the source code of this file.
Classes | |
struct | barray |
Type used to represent an array of Booleans. More... | |
Functions | |
barray * | create_barray (uint) |
Creation of an array of Booleans. | |
uint | getsize_barray (barray *) |
Computation of the size of an array of Booleans. | |
void | delete_barray (barray *) |
Release of an array of Booleans. | |
void | settrue_barray (barray *, uint) |
Sets a cell to true in an array of Booleans. | |
void | setfalse_barray (barray *, uint) |
Sets a cell to false in an array of Booleans. | |
bool | getval_barray (barray *, uint) |
Returns the value of a cell in an array of Booleans. | |
barray * | or_barray (barray *, barray *) |
Bitwise disjunction of two Boolean arrays of the same size. | |
void | or_barray_mod (barray *, barray *) |
Bitwise disjunction of two Boolean arrays of the same size. Modifies the first array. | |
barray * | and_barray (barray *, barray *) |
Bitwise conjunction of two Boolean arrays of the same size. | |
void | and_barray_mod (barray *, barray *) |
Bitwise conjunction of two Boolean arrays of the same size. Modifies the first array. | |
barray * | copy_barray (barray *) |
Copy of an array of Booleans. | |
Implementation of Boolean arrays.
Bitwise conjunction of two Boolean arrays of the same size.
a1 | The first array of Booleans. |
a2 | The second array of Booleans. |
Bitwise conjunction of two Boolean arrays of the same size. Modifies the first array.
a1 | The first array of Booleans. |
a2 | The second array of Booleans. |
Copy of an array of Booleans.
a | The array of Booleans. |
barray * create_barray | ( | uint | size | ) |
Creation of an array of Booleans.
size | The size |
void delete_barray | ( | barray * | a | ) |
Release of an array of Booleans.
a | The array of Booleans. |
uint getsize_barray | ( | barray * | a | ) |
Computation of the size of an array of Booleans.
a | The array of Booleans. |
bool getval_barray | ( | barray * | a, |
uint | i ) |
Returns the value of a cell in an array of Booleans.
a | The array of Booleans. |
i | The cell. |
Bitwise disjunction of two Boolean arrays of the same size.
a1 | The first array of Booleans. |
a2 | The second array of Booleans. |
Bitwise disjunction of two Boolean arrays of the same size. Modifies the first array.
a1 | The first array of Booleans. |
a2 | The second array of Booleans. |
void setfalse_barray | ( | barray * | a, |
uint | i ) |
Sets a cell to false in an array of Booleans.
a | The array of Booleans. |
i | The cell. |
void settrue_barray | ( | barray * | a, |
uint | i ) |
Sets a cell to true in an array of Booleans.
a | The array of Booleans. |
i | The cell. |