Skip to content

Commit 9c2350f

Browse files
committed
-simplified method
1 parent c9496f7 commit 9c2350f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

BirthdayProblem.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -650,12 +650,12 @@ def methodToText(method):
650650
@staticmethod
651651
def methodToDescription(method, isInv):
652652
texts = {
653-
_BirthdayProblemSolver.CalcPrecision.EXACT: lambda isInv: "Exact method",
654-
_BirthdayProblemSolver.CalcPrecision.TAYLOR_APPROX: lambda isInv: "Taylor series approximation used in main calculation" + ("" if isInv else " (removes need for factorial calculation)"),
655-
_BirthdayProblemSolver.CalcPrecision.STIRLING_APPROX: lambda isInv: "Stirling's approximation used in factorial calculation",
656-
_BirthdayProblemSolver.CalcPrecision.TRIVIAL: lambda isInv: "Trivial solution"
653+
_BirthdayProblemSolver.CalcPrecision.EXACT: "Exact method",
654+
_BirthdayProblemSolver.CalcPrecision.TAYLOR_APPROX: "Taylor series approximation used in main calculation" + ("" if isInv else " (removes need for factorial calculation)"),
655+
_BirthdayProblemSolver.CalcPrecision.STIRLING_APPROX: "Stirling's approximation used in factorial calculation",
656+
_BirthdayProblemSolver.CalcPrecision.TRIVIAL: "Trivial solution"
657657
}
658-
return texts.get(method, lambda isInv: "Unknown method")(isInv)
658+
return texts.get(method, "Unknown method")
659659

660660
@staticmethod
661661
def headerTextBirthdayProblemInvNumbers(dLogOrNot, p, pPercent, isLog2, prec = None):

0 commit comments

Comments
 (0)