cvGen function

Cross-validation and stratified cross-validation