Merge topology conflicts

This commit is contained in:
quemy 2012-11-24 15:28:28 +01:00
commit 56a72c2ff1
11 changed files with 105 additions and 46 deletions

View file

@ -28,20 +28,32 @@ Contact: paradiseo-help@lists.gforge.inria.fr
*/
#include <vector>
template <class TopologyType>
std::vector<unsigned> paradiseo::smp::Topology<TopologyType>::getIdNeighbors(unsigned idIsland) const
std::vector<unsigned> paradiseo::smp::Topology<TopologyType>::getIdNeighbors(unsigned idNode) const
{
std::vector<unsigned> neighbors;
for(unsigned j=0; j<_matrix.size();j++)
if(_matrix[idIsland][j]) neighbors.push_back(j);
if(_matrix[idNode][j]) neighbors.push_back(j);
return neighbors;
}
template <class TopologyType>
void paradiseo::smp::Topology<TopologyType>::construct(unsigned nbIsland)
void paradiseo::smp::Topology<TopologyType>::construct(unsigned nbNode)
{
_builder(nbIsland, _matrix);
_builder(nbNode, _matrix);
}
template <class TopologyType>
void paradiseo::smp::Topology<TopologyType>::isolateNode(unsigned idNode)
{
for(int i=0;i<_matrix.size();i++)
{
//Line of idNode to false : no connection FROM this node
_matrix[idNode][i] = false;
//Column of idNode to false : no connection TO this node
_matrix[i][idNode] = false;
}
}