Name

neigh_func_default — A SA function which computes a neighbor of a given point

Calling Sequence

x_neigh = neigh_func_default(x_current,T,param)

Parameters

x_current

the point for which we want to compute a neighbor

T

the current temperature

param

a two columns vector. The first column correspond to the negative amplitude of variation and the second column corresponds to the positive amplitude of variation of the neighborhood. By default, the first column is a column of -0.1 and the second column is a column of 0.1.

x_neigh

the computed neighbor

Description

  • This function computes a neighbor of a given point. For example, for a continuous vector, a neighbor will be produced by adding some noise to each component of the vector. For a binary string, a neighbor will be produced by changing one bit from 0 to 1 or from 1 to 0.

Examples

 
// We produce a neighbor by adding some noise to each component of a given vector
function x_neigh = neigh_func_default(x_current, T)
  sa_min_delta = -0.1*ones(size(x_current,1),size(x_current,2));
  sa_max_delta = 0.1*ones(size(x_current,1),size(x_current,2));
  x_neigh = x_current + (sa_max_delta - sa_min_delta).*rand(size(x_current,1),size(x_current,2)) + sa_min_delta;
endfunction
 

See Also

optim_sa , compute_initial_temp , temp_law_default

Authors

collette

Yann COLLETTE (ycollet@freesurf.fr)