#include <IbexBlockSet.h>
Public Member Functions | |
| BlockSet (int nb_var, int nb_blk) throw (BlockSetException) | |
| BlockSet (const BlockSet &) | |
| ~BlockSet () | |
| void | rem_var (int var) throw (BlockSetException) |
| void | set_blk (int var, int blk) throw (BlockSetException) |
| int | blk (int var) const throw (BlockSetException) |
| int | next (int var) const throw (BlockSetException) |
| int | first (int blk) const throw (BlockSetException) |
| int | last (int blk) const throw (BlockSetException) |
| bool | noblk (int var) const throw (BlockSetException) |
| bool | empty (int blk) const throw (BlockSetException) |
Public Attributes | |
| const int | nb_var |
| const int | nb_blk |
This class allows to create a parition of variables, i.e., divide variables up into various blocks. Some algorithms (e.g., see ibex::BlockRoundRobin or ibex::MultiSystem::MultiSystem(const System&, const BlockSet&)) requires variables to be organized by blocks. E.g., instead of taking a usual set of variables such as {0,1,2,3,4,5}, it takes a collection of subsets such as { {0,2,5}, {3}, {1,4} }.
| ibex::BlockSet::BlockSet | ( | int | nb_var, | |
| int | nb_blk | |||
| ) | throw (BlockSetException) |
Create a set of nb_blk empty blocks.
| nb_var | - the number of variables to be divided. This number if fixed. | |
| nb_blk | - the number of blocks. This number is fixed. |
| BlockSetException | - if nb_blk exceeds nb_var. |
| ibex::BlockSet::BlockSet | ( | const BlockSet & | bs | ) |
Duplicate the set of variable blocks.
| ibex::BlockSet::~BlockSet | ( | ) |
Delete the set of variable blocks.
| void ibex::BlockSet::rem_var | ( | int | var | ) | throw (BlockSetException) |
Remove a variable from its block.
| BlockSetException | - if the variable is not in a block. |
| void ibex::BlockSet::set_blk | ( | int | var, | |
| int | blk | |||
| ) | throw (BlockSetException) |
Add a variable into a block.
If the variable is already within a block, it is first removed from the latter.
| var | - the variable to add. | |
| blk | - the block. |
| BlockSetException | - if var or blk exceeds bounds. |
| int ibex::BlockSet::blk | ( | int | var | ) | const throw (BlockSetException) [inline] |
Return the block of a variable.
| int ibex::BlockSet::next | ( | int | var | ) | const throw (BlockSetException) [inline] |
Return the variable following var in a block, in a circular way (if var is the last variable of the block, then the method returns the first variable of the block).
| BlockSetException | - if var exceeds the number of variables or if the variable is in no block. |
| int ibex::BlockSet::first | ( | int | blk | ) | const throw (BlockSetException) [inline] |
Return the first variable of the block blk.
| int ibex::BlockSet::last | ( | int | blk | ) | const throw (BlockSetException) [inline] |
Return the last variable of the block blk.
| bool ibex::BlockSet::noblk | ( | int | var | ) | const throw (BlockSetException) [inline] |
Return true if the variable var is not in a block.
| bool ibex::BlockSet::empty | ( | int | blk | ) | const throw (BlockSetException) [inline] |
Return true if the block blk is empty.
| const int ibex::BlockSet::nb_var |
The number of variables to divide up into blocks.
| const int ibex::BlockSet::nb_blk |
The number of blocks.
1.5.5