peo debug
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1006 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
b1175c10ab
commit
22a1dcd146
5 changed files with 12 additions and 6 deletions
|
|
@ -44,7 +44,7 @@ void CompleteTopology :: setNeighbors (Cooperative * __mig,
|
||||||
__from.clear () ;
|
__from.clear () ;
|
||||||
__to.clear () ;
|
__to.clear () ;
|
||||||
|
|
||||||
for (int i = 0; i < mig.size (); i ++) {
|
for (unsigned i = 0; i < mig.size (); i ++) {
|
||||||
if (mig [i] != __mig) {
|
if (mig [i] != __mig) {
|
||||||
__from.push_back (mig [i]);
|
__from.push_back (mig [i]);
|
||||||
__to.push_back (mig [i]);
|
__to.push_back (mig [i]);
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ void RandomTopology :: setNeighbors (Cooperative * __mig,
|
||||||
__from.clear () ;
|
__from.clear () ;
|
||||||
__to.clear () ;
|
__to.clear () ;
|
||||||
|
|
||||||
for (int i = 0; i < mig.size (); i ++) {
|
for (unsigned i = 0; i < mig.size (); i ++) {
|
||||||
if (mig [i] != __mig && rng.uniform() < 0.5 ) {
|
if (mig [i] != __mig && rng.uniform() < 0.5 ) {
|
||||||
__from.push_back (mig [i]);
|
__from.push_back (mig [i]);
|
||||||
__to.push_back (mig [i]);
|
__to.push_back (mig [i]);
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ void StarTopology :: setNeighbors (Cooperative * __mig,
|
||||||
|
|
||||||
if ( __mig == center ) {
|
if ( __mig == center ) {
|
||||||
|
|
||||||
for (int i = 0; i < mig.size (); i ++) {
|
for (unsigned i = 0; i < mig.size (); i ++) {
|
||||||
if (mig [i] != center) {
|
if (mig [i] != center) {
|
||||||
__from.push_back (mig [i]);
|
__from.push_back (mig [i]);
|
||||||
__to.push_back (mig [i]);
|
__to.push_back (mig [i]);
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ class continuator
|
||||||
//! @brief Virtual function of check
|
//! @brief Virtual function of check
|
||||||
//! @return true if the algorithm must continue
|
//! @return true if the algorithm must continue
|
||||||
virtual bool check()=0;
|
virtual bool check()=0;
|
||||||
|
//! @brief Virtual destructor
|
||||||
|
virtual ~continuator(){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -103,6 +105,8 @@ template < class TYPE> class selector
|
||||||
//! @brief Virtual operator on the template type
|
//! @brief Virtual operator on the template type
|
||||||
//! @param TYPE &
|
//! @param TYPE &
|
||||||
virtual void operator()(TYPE &)=0;
|
virtual void operator()(TYPE &)=0;
|
||||||
|
//! @brief Virtual destructor
|
||||||
|
virtual ~selector(){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -156,6 +160,8 @@ template < class TYPE> class replacement
|
||||||
//! @brief Virtual operator on the template type
|
//! @brief Virtual operator on the template type
|
||||||
//! @param TYPE &
|
//! @param TYPE &
|
||||||
virtual void operator()(TYPE &)=0;
|
virtual void operator()(TYPE &)=0;
|
||||||
|
//! @brief Virtual destructor
|
||||||
|
virtual ~replacement(){}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ template < typename EntityType > class peoMultiStart : public Service
|
||||||
virtual ~AbstractAggregationAlgorithm()
|
virtual ~AbstractAggregationAlgorithm()
|
||||||
{ }
|
{ }
|
||||||
virtual void operator()( AbstractDataType& dataTypeInstanceA, AbstractDataType& dataTypeInstanceB )
|
virtual void operator()( AbstractDataType& dataTypeInstanceA, AbstractDataType& dataTypeInstanceB )
|
||||||
{};
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
template < typename AggregationAlgorithmType > struct AggregationAlgorithm : public AbstractAggregationAlgorithm
|
template < typename AggregationAlgorithmType > struct AggregationAlgorithm : public AbstractAggregationAlgorithm
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue