At this url:
http://knnl.sourceforge.net/topology.html
is suggested to use "size_t" as template parameter for the class Max_topology, but in that way the class does not work properly: if the operator() is called by passing it negative values these are converted as values of type size_t becoming positive number with values close to their limit.
For example, the distance between a neuron of indices (0,1) and a neuron of indices (2,1) is computed as:
max (|0 - 2|, |1 - 1|)
but the first subtraction is converted to an unsigned integer becoming
max ( 4294967294, 0)
and the computed distance is 4294967294 instead of 2.
I know that this is not a true bug, but i think that could be very simple to write a wrong code in this way.
Sorry, there is a mistake in the bug description: obviously the error occur when the subtraction between two indices result in a negative number and not passing negative values in the operator() (that never will happen).