using Skeleton.Algebra.Extensions; namespace Skeleton.Utils.Helpers; /// /// public static class Decorators { /// /// /// /// /// /// public static T WithTol(double tol, Func f) { GeneralExt.SetTol(tol); T res = f(); GeneralExt.ResetTol(); return res; } /// /// /// /// public static void WithTol(double tol, Action a) { GeneralExt.SetTol(tol); a(); GeneralExt.ResetTol(); } /*public static M WithRealFix(Func f) where D : IDimension where V : class, IRealVector where M : class, IRealMatrix { M res = f(); res.Fix(); return res; } public static M WithComplexFix(Func f) where D : IDimension where V : class, IComplexVector where M : class, IComplexMatrix { M res = f(); res.Fix(); return res; }*/ }