From 7fe152e1de2ce0ff9716d54bd03ec090a601824a Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Mon, 9 Oct 2023 16:25:09 -0500 Subject: factors: Give Type proper name & zero value --- factor_info.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'factor_info.go') diff --git a/factor_info.go b/factor_info.go index becc08a..a6710e7 100644 --- a/factor_info.go +++ b/factor_info.go @@ -34,7 +34,7 @@ type factorInfo struct { // Whether or not this radix is part of any special factor-related classes. // This is not calculated if the radix is too large - in this case // this field will be nil. - Type factors.NumberType + Type factors.CompositenessType // An estimate of the complexity of the radix's multiplication table. // This is not calculated if the radix is too large - in this case // this field will be nil. @@ -146,7 +146,7 @@ func (fi *factorInfo) writeToCompact(w io.Writer) { } } -func writeTypeMessage(w io.Writer, t factors.NumberType) { +func writeTypeMessage(w io.Writer, t factors.CompositenessType) { switch t { case factors.ColossallyAbundant: fmt.Fprintln(w, "This radix is colossally abundant!") @@ -159,7 +159,7 @@ func writeTypeMessage(w io.Writer, t factors.NumberType) { } } -func typeAbbrev(t factors.NumberType) string { +func typeAbbrev(t factors.CompositenessType) string { switch t { case factors.ColossallyAbundant: return "Colossally Abundant" @@ -169,7 +169,7 @@ func typeAbbrev(t factors.NumberType) string { return "Ordered Exponents" case factors.Practical: return "Practical" - case factors.NotPractical: + case factors.None: return "Not Practical" default: panic("Should not be possible to get here.") -- cgit v1.2.3