changed trainer & matcher classes to algorithm2D and algorithm3D. Now training and matching are done in the same class.