|
| 1 | +load("@rules_java//java:defs.bzl", "java_binary", "java_library") |
| 2 | + |
| 3 | +# Math algorithms library |
| 4 | +java_library( |
| 5 | + name = "math", |
| 6 | + srcs = glob(["*.java"]), |
| 7 | + visibility = ["//visibility:public"], |
| 8 | +) |
| 9 | + |
| 10 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:CompressedPrimeSieve |
| 11 | +java_binary( |
| 12 | + name = "CompressedPrimeSieve", |
| 13 | + main_class = "com.williamfiset.algorithms.math.CompressedPrimeSieve", |
| 14 | + runtime_deps = [":math"], |
| 15 | +) |
| 16 | + |
| 17 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:EulerTotientFunction |
| 18 | +java_binary( |
| 19 | + name = "EulerTotientFunction", |
| 20 | + main_class = "com.williamfiset.algorithms.math.EulerTotientFunction", |
| 21 | + runtime_deps = [":math"], |
| 22 | +) |
| 23 | + |
| 24 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:EulerTotientFunctionWithSieve |
| 25 | +java_binary( |
| 26 | + name = "EulerTotientFunctionWithSieve", |
| 27 | + main_class = "com.williamfiset.algorithms.math.EulerTotientFunctionWithSieve", |
| 28 | + runtime_deps = [":math"], |
| 29 | +) |
| 30 | + |
| 31 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:FastFourierTransform |
| 32 | +java_binary( |
| 33 | + name = "FastFourierTransform", |
| 34 | + main_class = "com.williamfiset.algorithms.math.FastFourierTransform", |
| 35 | + runtime_deps = [":math"], |
| 36 | +) |
| 37 | + |
| 38 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:GCD |
| 39 | +java_binary( |
| 40 | + name = "GCD", |
| 41 | + main_class = "com.williamfiset.algorithms.math.GCD", |
| 42 | + runtime_deps = [":math"], |
| 43 | +) |
| 44 | + |
| 45 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:IsPrime |
| 46 | +java_binary( |
| 47 | + name = "IsPrime", |
| 48 | + main_class = "com.williamfiset.algorithms.math.IsPrime", |
| 49 | + runtime_deps = [":math"], |
| 50 | +) |
| 51 | + |
| 52 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:LCM |
| 53 | +java_binary( |
| 54 | + name = "LCM", |
| 55 | + main_class = "com.williamfiset.algorithms.math.LCM", |
| 56 | + runtime_deps = [":math"], |
| 57 | +) |
| 58 | + |
| 59 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:ModPow |
| 60 | +java_binary( |
| 61 | + name = "ModPow", |
| 62 | + main_class = "com.williamfiset.algorithms.math.ModPow", |
| 63 | + runtime_deps = [":math"], |
| 64 | +) |
| 65 | + |
| 66 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:ModularInverse |
| 67 | +java_binary( |
| 68 | + name = "ModularInverse", |
| 69 | + main_class = "com.williamfiset.algorithms.math.ModularInverse", |
| 70 | + runtime_deps = [":math"], |
| 71 | +) |
| 72 | + |
| 73 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:NChooseRModPrime |
| 74 | +java_binary( |
| 75 | + name = "NChooseRModPrime", |
| 76 | + main_class = "com.williamfiset.algorithms.math.NChooseRModPrime", |
| 77 | + runtime_deps = [":math"], |
| 78 | +) |
| 79 | + |
| 80 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:PrimeFactorization |
| 81 | +java_binary( |
| 82 | + name = "PrimeFactorization", |
| 83 | + main_class = "com.williamfiset.algorithms.math.PrimeFactorization", |
| 84 | + runtime_deps = [":math"], |
| 85 | +) |
| 86 | + |
| 87 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:RelativelyPrime |
| 88 | +java_binary( |
| 89 | + name = "RelativelyPrime", |
| 90 | + main_class = "com.williamfiset.algorithms.math.RelativelyPrime", |
| 91 | + runtime_deps = [":math"], |
| 92 | +) |
| 93 | + |
| 94 | +# bazel run //src/main/java/com/williamfiset/algorithms/math:SieveOfEratosthenes |
| 95 | +java_binary( |
| 96 | + name = "SieveOfEratosthenes", |
| 97 | + main_class = "com.williamfiset.algorithms.math.SieveOfEratosthenes", |
| 98 | + runtime_deps = [":math"], |
| 99 | +) |
0 commit comments