Added patch #559 - neural gas functionality