Minor modification for documentation and not changing topology if not necessary
This commit is contained in:
parent
085530ab36
commit
9b46377062
5 changed files with 54 additions and 45 deletions
|
|
@ -32,16 +32,19 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
void paradiseo::smp::Ring::operator()(unsigned nbNode, std::vector<std::vector<bool>>& matrix) const
|
||||
{
|
||||
matrix.clear();
|
||||
if(nbNode!=matrix.size())
|
||||
{
|
||||
matrix.clear();
|
||||
|
||||
matrix.resize(nbNode);
|
||||
for(auto& line : matrix)
|
||||
line.resize(nbNode);
|
||||
matrix.resize(nbNode);
|
||||
for(auto& line : matrix)
|
||||
line.resize(nbNode);
|
||||
|
||||
std::vector<bool> line;
|
||||
line.assign(nbNode, false);
|
||||
matrix.assign(nbNode, line);
|
||||
std::vector<bool> line;
|
||||
line.assign(nbNode, false);
|
||||
matrix.assign(nbNode, line);
|
||||
|
||||
for(int i=0; i<nbNode;i++)
|
||||
matrix[i][(i+1)%nbNode]=true;
|
||||
for(int i=0; i<nbNode;i++)
|
||||
matrix[i][(i+1)%nbNode]=true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue