Use .cpp instead of .c for predict and train
Remove min/max/swap definitions. Instead use std's versions
nit: for() => for (), while() => while ()