Finished distance network and SOM (self organizing feature map) learning
algorithm.