private Task <double> CalculateMse(string text, Bitmap emptyContainer, int delta, double alpha) { return(Task.Factory.StartNew(() => { var kutter = new KutterEncoder(delta, alpha); var fullContainer = kutter.Encode(text, emptyContainer); var estimator = new MseCalculator(); return estimator.Calculate(emptyContainer, fullContainer); })); }
private Task <double> CalculatePerr(string text, Bitmap emptyContainer, int delta, double alpha) { return(Task.Factory.StartNew(() => { var kutter = new KutterEncoder(delta, alpha); var fullContainer = kutter.Encode(text, emptyContainer); var estimator = new HammingDistanceCalculator(); return estimator.EstimateBitErrorRate(text, fullContainer, kutter); })); }