realize artificial neural network using matrix operations

in machine learning repository, the neural networks algorithm is rewritten using all matrix operations. here is a simple change list:

unchanged features:
1.interfaces are compatible with original
2.algorithms stay the same

changed features:
1.algorithms realized using matrix operations (ann.cpp)
2.a brief intro is attached for every functions (also ann.cpp)
3.provide a sample to demostrate the power of ann (neural_networks.cpp & ann.hpp)

machine learning algorithms is important in various fields, this pr can bring useful contribution.