/// <summary> /// Performs the actual work not the most efficient way but I'll work it out /// </summary> public void Evaluate(IMathematics mathematics) { Model.DoseMatrixOptimal sourceDose = new Model.DoseMatrixOptimal(_source.DoseMatrix()); Model.DoseMatrixOptimal targetDose = new Model.DoseMatrixOptimal(_target.DoseMatrix()); TotalCount = targetDose.Length; Debug.WriteLine("\n\n\nEvaluating " + _source.FileName + " and " + _target.FileName + " Dimensions disagree"); Debug.WriteLine("Max dose: Source - " + sourceDose.MaxPointDose.Dose + " Target - " + targetDose.MaxPointDose.Dose); Model.SingleComparison ret; for (int i = 0; i < _dtas.Length; i++) { if (_dtas[i].Global) { ret = mathematics.CompareRelative(sourceDose, targetDose, _dtas[i]); } else { ret = mathematics.CompareAbsolute(sourceDose, targetDose, _dtas[i]); } _comparisons[i] = ret; } IsEvaluated = true; }