Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ e93fe9bcf5ff0c314ca676bf9f3b9c8148574786

# Scala Steward: Reformat with scalafmt 3.7.17
7829f68c27c622dee3a8d1329d82a139f183d0c1

# Scala Steward: Reformat with scalafmt 3.9.6
8a0c76ec1dfc1c5bb530713c27e0bcdb3cd6b523
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.7.17
version=3.9.6
runner.dialect = Scala213Source3
fileOverride {
"glob:**/scala-3/**" {
Expand Down
3 changes: 0 additions & 3 deletions core/src/main/scala/spire/math/Interval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,9 @@ object Interval {
* This method assumes that lower < upper to avoid comparisons.
*
* - When one of the arguments is Unbound, the result will be All, Above(x, _), or Below(y, _).
*
* - When both arguments are Open/Closed (e.g. Open(x), Open(y)), then x < y and the result will be a Bounded
* interval.
*
* - If both arguments are EmptyBound, the result is Empty.
*
* - Any other arguments are invalid.
*
* This method cannot construct Point intervals.
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/spire/math/prime/SieveSegment.scala
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ case class SieveSegment(start: SafeLong, primes: BitSet, cutoff: SafeLong) {
while (k < lim) { k += pp; primes -= k }
m = k.toLong + pp
}
if (p < 7) {} else if (m - primes.length < primes.length) {
if (p < 7) {}
else if (m - primes.length < primes.length) {
buf += FastFactor(p, SafeLong(m))
} else if (cutoff > p) {
slowq += Factor(SafeLong(p), SafeLong(m))
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/spire/random/rng/MersenneTwister32.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ import java.util.Arrays
* @author
* <a href="mailto:[email protected]">Du&#x0161;an Kysel</a>
*/
final class MersenneTwister32 protected[random] (mt: Array[Int], mti0: Int = 625) extends IntBasedGenerator { // N + 1 == 625
final class MersenneTwister32 protected[random] (mt: Array[Int], mti0: Int = 625)
extends IntBasedGenerator { // N + 1 == 625

import MersenneTwister32.{mag01, BYTES, LowerMask, M, M_1, M_N, N, N_1, N_M, UpperMask}

Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/spire/random/rng/MersenneTwister64.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ import java.util.Arrays
* @author
* <a href="mailto:[email protected]">Du&#x0161;an Kysel</a>
*/
final class MersenneTwister64 protected[random] (mt: Array[Long], mti0: Int = 313) extends LongBasedGenerator { // N + 1 = 313
final class MersenneTwister64 protected[random] (mt: Array[Long], mti0: Int = 313)
extends LongBasedGenerator { // N + 1 = 313

import MersenneTwister64.{mag01, BYTES, LowerMask, M, M_1, M_N, N, N_1, N_M, UpperMask}

Expand Down
7 changes: 4 additions & 3 deletions tests/shared/src/test/scala/spire/math/SortingSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ class SortingSuite extends munit.FunSuite {
val pivotValue = 7
val expectedAfterPartition = Array(5, 2, 1, 7, 8, 11, 9)

matchAgainstExpected[Int](QuickSort.partition(_, 2, 9, 5),
Array(6, -1) ++ leftSegment ++ Array(pivotValue) ++ rightSegment ++ Array(2, 10),
Array(6, -1) ++ expectedAfterPartition ++ Array(2, 10)
matchAgainstExpected[Int](
QuickSort.partition(_, 2, 9, 5),
Array(6, -1) ++ leftSegment ++ Array(pivotValue) ++ rightSegment ++ Array(2, 10),
Array(6, -1) ++ expectedAfterPartition ++ Array(2, 10)
)
}

Expand Down