public void Init(ExerciseEvaluatorTrainingSet trainingSet) { if (!IsTrainingSetValid(trainingSet)) { throw new ArgumentException("Too few ideal movement steps"); } if (trainingSet.idealMovementSteps == null) { _isRealTimeSampling = true; trainingSet.idealMovementSteps = new List <ExerciseStep>(); } _trainingSet = trainingSet; RestartExercise(); }
private bool IsTrainingSetValid(ExerciseEvaluatorTrainingSet trainingSet) { // the training set is valid if is null (real time sampling) or if it is at minimum two sample long return(trainingSet.idealMovementSteps == null || trainingSet.idealMovementSteps.Count >= 2); }
public CoreExerciseEvaluator(ExerciseEvaluatorTrainingSet trainingSet) { Init(trainingSet); }