summaryrefslogtreecommitdiff
path: root/factors
diff options
context:
space:
mode:
authorAdrien Hopkins <adrien.p.hopkins@gmail.com>2023-11-12 15:33:53 -0500
committerAdrien Hopkins <adrien.p.hopkins@gmail.com>2023-11-12 15:57:32 -0500
commitce38cd3836c4954c4bc03db9c7e43e89b01ee0a8 (patch)
treef6a90c0d249b611809a3daa127c75d29219ba6f4 /factors
parent2cc0f9607872b8bd4fc6be2656a7b7a769b538b2 (diff)
Add per-file copyright notices & contact info
This is the safest thing to do to ensure my software is free while avoiding legal trouble ... hopefully, I'm not a lawyer!
Diffstat (limited to 'factors')
-rw-r--r--factors/digit_map.go16
-rw-r--r--factors/factorize.go16
-rw-r--r--factors/mtc.go16
-rw-r--r--factors/prime_factorization.go16
-rw-r--r--factors/property_test.go16
-rw-r--r--factors/score.go16
-rw-r--r--factors/slices.go16
-rw-r--r--factors/table_test.go16
-rw-r--r--factors/totative.go16
-rw-r--r--factors/type.go16
-rw-r--r--factors/uintpow.go16
11 files changed, 176 insertions, 0 deletions
diff --git a/factors/digit_map.go b/factors/digit_map.go
index 7c56a1e..3baf468 100644
--- a/factors/digit_map.go
+++ b/factors/digit_map.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
import "fmt"
diff --git a/factors/factorize.go b/factors/factorize.go
index 16cd810..2a3f143 100644
--- a/factors/factorize.go
+++ b/factors/factorize.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
// Factors returns a number's factors as a slice.
diff --git a/factors/mtc.go b/factors/mtc.go
index 4d40396..db3e670 100644
--- a/factors/mtc.go
+++ b/factors/mtc.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
// MTC returns the multiplication table complexity of a radix n.
diff --git a/factors/prime_factorization.go b/factors/prime_factorization.go
index f758448..2f0cde0 100644
--- a/factors/prime_factorization.go
+++ b/factors/prime_factorization.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
import (
diff --git a/factors/property_test.go b/factors/property_test.go
index 7072050..a4a1463 100644
--- a/factors/property_test.go
+++ b/factors/property_test.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
import (
diff --git a/factors/score.go b/factors/score.go
index b1da963..9d2d03b 100644
--- a/factors/score.go
+++ b/factors/score.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
import (
diff --git a/factors/slices.go b/factors/slices.go
index f2462cf..8b70575 100644
--- a/factors/slices.go
+++ b/factors/slices.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
import "sort"
diff --git a/factors/table_test.go b/factors/table_test.go
index 828d80b..c7eeb24 100644
--- a/factors/table_test.go
+++ b/factors/table_test.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
import (
diff --git a/factors/totative.go b/factors/totative.go
index 9dde4b0..ff3a4ab 100644
--- a/factors/totative.go
+++ b/factors/totative.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
// Totient calculates the number of numbers between 1 and n inclusive
diff --git a/factors/type.go b/factors/type.go
index 3e116af..7c11bf5 100644
--- a/factors/type.go
+++ b/factors/type.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
// The set of all colossaly abundant numbers that are small enough
diff --git a/factors/uintpow.go b/factors/uintpow.go
index 50bfe9d..e598213 100644
--- a/factors/uintpow.go
+++ b/factors/uintpow.go
@@ -1,3 +1,19 @@
+/* This script is part of radix_info.
+ Copyright (C) 2023 Adrien Hopkins
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of version 3 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
package factors
func uintpow(base, exponent uint) uint {