Islands send pop to IslandModel. Add and clean documentation.
This commit is contained in:
parent
3a8821a923
commit
083d77ba08
20 changed files with 206 additions and 79 deletions
|
|
@ -37,12 +37,22 @@ namespace paradiseo
|
|||
{
|
||||
namespace smp
|
||||
{
|
||||
/** Bimap
|
||||
|
||||
Bidirectional map in order to create a bijection between islands and vertices.
|
||||
A and B objects are stocked in two std::set, then if you would avoid instances duplications,
|
||||
template A and B with pointers.
|
||||
|
||||
**/
|
||||
template<class A, class B>
|
||||
class Bimap
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Add a relation
|
||||
* @param workersNb the number of workers
|
||||
* @param args... list of parameters according to the constructor of your algorithm
|
||||
*/
|
||||
void add(A a, B b)
|
||||
{
|
||||
ASet.insert(a);
|
||||
|
|
@ -51,6 +61,7 @@ public:
|
|||
leftAssociation[&b] = &a;
|
||||
}
|
||||
|
||||
|
||||
B& getRight(A const a)
|
||||
{
|
||||
return *rightAssociation[&a];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue