diff options
| author | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-10-09 16:25:09 -0500 |
|---|---|---|
| committer | Adrien Hopkins <adrien.p.hopkins@gmail.com> | 2023-10-09 16:25:09 -0500 |
| commit | 7fe152e1de2ce0ff9716d54bd03ec090a601824a (patch) | |
| tree | 0135b63f92f10c055f502ab91724ad8d08d6ed2e /factor_info.go | |
| parent | c50ece109cdb29ab5d3fa7444040b546da7e360c (diff) | |
factors: Give Type proper name & zero value
Diffstat (limited to 'factor_info.go')
| -rw-r--r-- | factor_info.go | 8 |
1 files changed, 4 insertions, 4 deletions
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.") |
