Update distance matrix
Update an existing distance matrix D_mat
by adding distances
of all previous candidate solutions to one new candidate solution, d_vec= d(x_i,x_new)
.
distanceMatrixUpdate(distanceMat, x, distanceFunction, ...)
distanceMat |
original distance matrix |
x |
list of candidate solutions, last in list is the new solution |
distanceFunction |
Distance function of type f(x,y)=r, where r is a scalar and x and y are candidate solutions whose distance is evaluated. |
... |
further arguments passed to distanceFunction |
matrix of distances between all solutions x
x <- list(5:1,c(2,4,5,1,3),c(5,4,3,1,2)) dm <- distanceMatrix(x,distancePermutationHamming) x <- append(x,list(1:5)) dmUp <- distanceMatrixUpdate(dm,x,distancePermutationHamming)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.