Modify incremental eval QAP
This commit is contained in:
parent
e3d8ae04ee
commit
3e78afdd59
2 changed files with 19 additions and 3 deletions
|
|
@ -61,10 +61,10 @@ public:
|
|||
int d;
|
||||
int k;
|
||||
|
||||
unsigned i, j;
|
||||
|
||||
_neighbor.getIndices(n, i, j);
|
||||
unsigned i = _neighbor.first();
|
||||
unsigned j = _neighbor.second();
|
||||
|
||||
// _neighbor.getIndices(n, i, j);
|
||||
d = (A[i][i]-A[j][j])*(B[_solution[j]][_solution[j]]-B[_solution[i]][_solution[i]]) +
|
||||
(A[i][j]-A[j][i])*(B[_solution[j]][_solution[i]]-B[_solution[i]][_solution[j]]);
|
||||
|
||||
|
|
|
|||
|
|
@ -107,6 +107,22 @@ public:
|
|||
index( _first + n * (n - 1) / 2 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter of the firt location
|
||||
* @return first indice
|
||||
*/
|
||||
unsigned int first() {
|
||||
return indices.first;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter of the second location
|
||||
* @return second indice
|
||||
*/
|
||||
unsigned int second() {
|
||||
return indices.second;
|
||||
}
|
||||
|
||||
private:
|
||||
std::pair<unsigned int, unsigned int> indices;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue