Passage du code dans un pretty printer
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1813 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
cc31901008
commit
3d8057ac4d
88 changed files with 2726 additions and 2720 deletions
|
|
@ -37,7 +37,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* Abstract class for Acceptance criteria
|
* Abstract class for Acceptance criteria
|
||||||
*/
|
*/
|
||||||
template< class Neighbor >
|
template< class Neighbor >
|
||||||
class moAcceptanceCriterion : public eoBF<typename Neighbor::EOT&, typename Neighbor::EOT&, bool>, virtual public moMemory<Neighbor>{
|
class moAcceptanceCriterion : public eoBF<typename Neighbor::EOT&, typename Neighbor::EOT&, bool>, virtual public moMemory<Neighbor> {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* Acceptance Criterion for extreme diversification : always accept new solution
|
* Acceptance Criterion for extreme diversification : always accept new solution
|
||||||
*/
|
*/
|
||||||
template< class Neighbor >
|
template< class Neighbor >
|
||||||
class moAlwaysAcceptCrit : public moAcceptanceCriterion<Neighbor>, public moDummyMemory<Neighbor>{
|
class moAlwaysAcceptCrit : public moAcceptanceCriterion<Neighbor>, public moDummyMemory<Neighbor> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename Neighbor::EOT EOT;
|
typedef typename Neighbor::EOT EOT;
|
||||||
|
|
@ -48,7 +48,7 @@ public:
|
||||||
* @param _sol2 the new solution after local search
|
* @param _sol2 the new solution after local search
|
||||||
* @return always true
|
* @return always true
|
||||||
*/
|
*/
|
||||||
bool operator()(EOT& _sol1, EOT& _sol2){
|
bool operator()(EOT& _sol1, EOT& _sol2) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,12 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
||||||
* Acceptance Criterion for extreme intensification : accept if the new solution is better than previous one
|
* Acceptance Criterion for extreme intensification : accept if the new solution is better than previous one
|
||||||
*/
|
*/
|
||||||
template< class Neighbor >
|
template< class Neighbor >
|
||||||
class moBetterAcceptCrit : public moAcceptanceCriterion<Neighbor>, public moDummyMemory<Neighbor>{
|
class moBetterAcceptCrit : public moAcceptanceCriterion<Neighbor>, public moDummyMemory<Neighbor> {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename Neighbor::EOT EOT;
|
typedef typename Neighbor::EOT EOT;
|
||||||
|
|
||||||
moBetterAcceptCrit(moSolComparator<EOT>& _comparator):comparator(_comparator){}
|
moBetterAcceptCrit(moSolComparator<EOT>& _comparator):comparator(_comparator) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accept if the new solution is better than previous one
|
* Accept if the new solution is better than previous one
|
||||||
|
|
@ -51,7 +51,7 @@ public:
|
||||||
* @param _sol2 the new solution after local search
|
* @param _sol2 the new solution after local search
|
||||||
* @return true if the new solution is better than previous one
|
* @return true if the new solution is better than previous one
|
||||||
*/
|
*/
|
||||||
bool operator()(EOT& _sol1, EOT& _sol2){
|
bool operator()(EOT& _sol1, EOT& _sol2) {
|
||||||
return comparator(_sol1, _sol2);
|
return comparator(_sol1, _sol2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,9 +97,11 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
class dummmyMonOp: public eoMonOp<EOT>{
|
class dummmyMonOp: public eoMonOp<EOT> {
|
||||||
public:
|
public:
|
||||||
bool operator()(EOT&){return false;}
|
bool operator()(EOT&) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}dummyOp;
|
}dummyOp;
|
||||||
moIterContinuator<moDummyNeighbor<EOT> > iterCont;
|
moIterContinuator<moDummyNeighbor<EOT> > iterCont;
|
||||||
moMonOpPerturb<Neighbor> defaultPerturb;
|
moMonOpPerturb<Neighbor> defaultPerturb;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public:
|
||||||
* @param _solution a solution
|
* @param _solution a solution
|
||||||
*/
|
*/
|
||||||
virtual void init(EOT & _solution) {
|
virtual void init(EOT & _solution) {
|
||||||
for(unsigned int i = 0; i < continuators.size(); ++i)
|
for (unsigned int i = 0; i < continuators.size(); ++i)
|
||||||
continuators[i]->init(_solution);
|
continuators[i]->init(_solution);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ public:
|
||||||
|
|
||||||
// some data may be update in each continuator.
|
// some data may be update in each continuator.
|
||||||
// So, all continuators are tested
|
// So, all continuators are tested
|
||||||
for(unsigned int i = 0; i < continuators.size(); ++i)
|
for (unsigned int i = 0; i < continuators.size(); ++i)
|
||||||
if ( !(*continuators[i])(_solution) )
|
if ( !(*continuators[i])(_solution) )
|
||||||
bContinue = false;
|
bContinue = false;
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue