mon dernier commit :) On en a chier encore jusqu'au bout !!!
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1926 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
9cd987b1ea
commit
7631f6e040
5 changed files with 85 additions and 49 deletions
|
|
@ -55,26 +55,34 @@ public:
|
|||
* test if there is still some neighborhood to explore
|
||||
* @return true if there is some neighborhood to explore
|
||||
*/
|
||||
virtual bool cont(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>& _ls){
|
||||
virtual bool cont(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>*& _ls){
|
||||
return (cycle || (current <= (LSvector.size()-2)));
|
||||
std::cout << "current LS: " << current << std::endl;
|
||||
std::cout << _solution << std::endl;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* put the current neighborhood on the first one
|
||||
*/
|
||||
virtual void init(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>& _ls){
|
||||
virtual void init(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>*& _ls){
|
||||
current=0;
|
||||
_ls = *(LSvector[current]);
|
||||
_ls = LSvector[current];
|
||||
_shake = *(shakeVector[current]);
|
||||
std::cout << "current LS: " << _ls->className() << " " << current << std::endl;
|
||||
std::cout << _solution << std::endl;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* put the current neighborhood on the next one
|
||||
*/
|
||||
virtual void next(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>& _ls){
|
||||
virtual void next(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>*& _ls){
|
||||
current = (current+1) % LSvector.size();
|
||||
_ls = *(LSvector[current]);
|
||||
_ls = LSvector[current];
|
||||
_shake = *(shakeVector[current]);
|
||||
std::cout << "current LS: " << current << std::endl;
|
||||
std::cout << _solution << std::endl;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -50,17 +50,17 @@ public:
|
|||
* test if there is still some neighborhood to explore
|
||||
* @return true if there is some neighborhood to explore
|
||||
*/
|
||||
virtual bool cont(EOT& _solution, eoMonOp<EOT>& _skake, eoMonOp<EOT>& _ls) = 0;
|
||||
virtual bool cont(EOT& _solution, eoMonOp<EOT>& _skake, eoMonOp<EOT>*& _ls) = 0;
|
||||
|
||||
/**
|
||||
* put the current neighborhood on the first one
|
||||
*/
|
||||
virtual void init(EOT& _solution, eoMonOp<EOT>& _skake, eoMonOp<EOT>& _ls) = 0;
|
||||
virtual void init(EOT& _solution, eoMonOp<EOT>& _skake, eoMonOp<EOT>*& _ls) = 0;
|
||||
|
||||
/**
|
||||
* put the current neighborhood on the next one
|
||||
*/
|
||||
virtual void next(EOT& _solution, eoMonOp<EOT>& _skake, eoMonOp<EOT>& _ls) = 0;
|
||||
virtual void next(EOT& _solution, eoMonOp<EOT>& _skake, eoMonOp<EOT>*& _ls) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
current=0;
|
||||
}
|
||||
|
||||
void addLS(eoMonOp<EOT>& _otherLS, eoMonOp<EOT>& _otherShake){
|
||||
void add(eoMonOp<EOT>& _otherLS, eoMonOp<EOT>& _otherShake){
|
||||
LSvector.push_back(&_otherLS);
|
||||
shakeVector.push_back(&_otherShake);
|
||||
}
|
||||
|
|
@ -61,17 +61,17 @@ public:
|
|||
* test if there is still some neighborhood to explore
|
||||
* @return true if there is some neighborhood to explore
|
||||
*/
|
||||
virtual bool cont(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>& _ls) = 0;
|
||||
virtual bool cont(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>*& _ls) = 0;
|
||||
|
||||
/**
|
||||
* put the current neighborhood on the first one
|
||||
*/
|
||||
virtual void init(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>& _ls) = 0;
|
||||
virtual void init(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>*& _ls) = 0;
|
||||
|
||||
/**
|
||||
* put the current neighborhood on the next one
|
||||
*/
|
||||
virtual void next(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>& _ls) = 0;
|
||||
virtual void next(EOT& _solution, eoMonOp<EOT>& _shake, eoMonOp<EOT>*& _ls) = 0;
|
||||
|
||||
protected:
|
||||
std::vector<eoMonOp<EOT>* > LSvector;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue