Permalink
Browse files

refactor numerics -> spire

  • Loading branch information...
1 parent 1d1b0df commit b3eaa0f2ed00c087bcd6c11f4c957d2933f23941 @non committed Mar 15, 2012
Showing with 84 additions and 85 deletions.
  1. +1 −1 README
  2. 0 { → doc}/numeric-pre-sip.txt
  3. +3 −4 project/Build.scala
  4. +2 −2 src/main/scala/benchmark/Benchmark.scala
  5. +2 −2 src/main/scala/{numerics → spire}/math/Approximation.scala
  6. +1 −1 src/main/scala/{numerics → spire}/math/ApproximationContext.scala
  7. +2 −2 src/main/scala/{numerics → spire}/math/Complex.scala
  8. +1 −1 src/main/scala/{numerics → spire}/math/Convertable.scala
  9. +1 −1 src/main/scala/{numerics → spire}/math/Eq.scala
  10. +1 −1 src/main/scala/{numerics → spire}/math/EuclideanRing.scala
  11. +1 −1 src/main/scala/{numerics → spire}/math/Field.scala
  12. +1 −1 src/main/scala/{numerics → spire}/math/Fractional.scala
  13. +1 −1 src/main/scala/{numerics → spire}/math/Implicits.scala
  14. +1 −1 src/main/scala/{numerics → spire}/math/Integral.scala
  15. +1 −1 src/main/scala/{numerics → spire}/math/Interval.scala
  16. +1 −1 src/main/scala/{numerics → spire}/math/Monoid.scala
  17. +1 −1 src/main/scala/{numerics → spire}/math/NRoot.scala
  18. +2 −2 src/main/scala/{numerics → spire}/math/Number.scala
  19. +1 −1 src/main/scala/{numerics → spire}/math/Numeric.scala
  20. +1 −1 src/main/scala/{numerics → spire}/math/Order.scala
  21. +1 −1 src/main/scala/{numerics → spire}/math/Rational.scala
  22. +1 −1 src/main/scala/{numerics → spire}/math/Real.scala
  23. +1 −1 src/main/scala/{numerics → spire}/math/Ring.scala
  24. +1 −1 src/main/scala/{numerics → spire}/math/SafeLong.scala
  25. +1 −1 src/main/scala/{numerics → spire}/math/Semigroup.scala
  26. +1 −1 src/main/scala/{numerics → spire}/math/Sign.scala
  27. +1 −1 src/main/scala/{numerics → spire}/math/Sorting.scala
  28. +1 −1 src/main/scala/{numerics → spire}/math/Trig.scala
  29. +2 −2 src/main/scala/{numerics → spire}/math/fpf/FPFilter.scala
  30. +2 −2 src/main/scala/{numerics → spire}/math/fpf/FPFilterWrapper.scala
  31. +2 −2 src/main/scala/{numerics → spire}/math/fpf/MaybeDouble.scala
  32. +2 −2 src/main/scala/{numerics → spire}/math/real/BMFSSBound.scala
  33. +2 −2 src/main/scala/{numerics → spire}/math/real/BigDecimalApprox.scala
  34. +2 −2 src/main/scala/{numerics → spire}/math/real/BigDecimalApproximations.scala
  35. +2 −2 src/main/scala/{numerics → spire}/math/real/BubbleUpDivs.scala
  36. +1 −1 src/main/scala/{numerics → spire}/math/real/ConstantFolder.scala
  37. +3 −3 src/main/scala/{numerics → spire}/math/real/Expr.scala
  38. +3 −3 src/main/scala/{numerics → spire}/math/real/FPFilter.scala
  39. +1 −1 src/main/scala/{numerics → spire}/math/real/PrettyToString.scala
  40. +2 −2 src/main/scala/{numerics → spire}/math/real/RealLike.scala
  41. +2 −2 src/main/scala/{numerics → spire}/math/real/RealTransform.scala
  42. +1 −1 src/main/scala/{numerics → spire}/math/real/SeparationBound.scala
  43. +1 −1 src/main/scala/{numerics → spire}/math/real/TreeString.scala
  44. +1 −1 src/main/scala/{numerics → spire}/package.scala
  45. +2 −2 src/test/scala/{numerics → spire}/math/ComplexTest.scala
  46. +1 −1 src/test/scala/{numerics → spire}/math/NumberTest.scala
  47. +1 −1 src/test/scala/{numerics → spire}/math/NumericTest.scala
  48. +2 −2 src/test/scala/{numerics → spire}/math/PackageTest.scala
  49. +1 −1 src/test/scala/{numerics → spire}/math/RationalTest.scala
  50. +1 −1 src/test/scala/{numerics → spire}/math/RealTest.scala
  51. +2 −2 src/test/scala/{numerics → spire}/math/RingTest.scala
  52. +4 −4 src/test/scala/{numerics → spire}/math/SortingTest.scala
  53. +2 −2 src/test/scala/{numerics → spire}/math/TypeclassExistenceTest.scala
  54. +2 −2 src/test/scala/{numerics → spire}/math/fpf/FPFilterTest.scala
  55. +2 −2 src/test/scala/{numerics → spire}/math/fpf/MaybeDoubleTest.scala
  56. +2 −2 src/test/scala/{numerics → spire}/math/real/BubbleUpDivsTest.scala
View
2 README
@@ -1,4 +1,4 @@
-This is a library intended to support fast, generic math in Scala. It also
+Spire a library intended to support fast, generic math in Scala. It also
adds some new number types (Complex[T], Rational, etc.).
It began life as a series of proposed changes. At this point the hope is to
File renamed without changes.
View
@@ -3,11 +3,10 @@ import sbt.Keys._
object MyBuild extends Build {
lazy val project = Project("root", file(".")) settings(
- name := "Scala Numerics",
- organization := "na",
+ name := "Spire",
scalaVersion := "2.9.1",
- version := "0.1",
+ version := "0.2.0",
scalacOptions ++= Seq("-deprecation", "-unchecked", "-optimize"),
@@ -19,7 +18,7 @@ object MyBuild extends Build {
),
resolvers ++= Seq(
- "Scala-Tools" at "http://www.scala-tools.org/repo-reloases/",
+ //"Scala-Tools" at "http://www.scala-tools.org/repo-reloases/",
"Sonatype" at "http://oss.sonatype.org/content/repositories/snapshots"
),
@@ -3,8 +3,8 @@ package benchmark
import scala.{specialized => spec}
import scala.util.Random._
-import numerics.math._
-import numerics.math.Implicits._
+import spire.math._
+import spire.math.Implicits._
import com.google.caliper.Runner
import com.google.caliper.SimpleBenchmark
@@ -1,8 +1,8 @@
-package numerics.math
+package spire.math
import java.math.{ MathContext, BigDecimal => BigDec }
import scala.math.max
-import numerics.math.real.BigDecimalApproximations
+import spire.math.real.BigDecimalApproximations
/**
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
case class ApproximationContext[A](error: A)
object ApproximationContext {
@@ -1,10 +1,10 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
import scala.math.{ScalaNumber, ScalaNumericConversions}
import scala.math.{Pi, atan2, cos, exp, log, sin, sqrt}
-import numerics.math.fun._
+import spire.math.fun._
import Implicits._
// TODO: refactor places where Fractional is converted to Double in order to
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
trait ConvertableTo[@specialized A] {
def fromByte(a:Byte): A
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
import scala.math.{abs, ceil, floor}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import Implicits._
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
trait Monoid[A] extends Semigroup[A] {
def identity: A
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec, math => mth}
import java.math.MathContext
@@ -1,8 +1,8 @@
-package numerics.math
+package spire.math
import scala.math.{ScalaNumber, ScalaNumericConversions, floor}
import Implicits._
-import numerics.math.fun._
+import spire.math.fun._
// TODO: implement at least BigIntNumber, BigDecimalNumber, RationalNumber.
// TODO: implement toNumber and fromNumber in ConvertableTo/From.
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.math.{ScalaNumber, ScalaNumericConversions, abs, min}
import Implicits._
@@ -15,7 +15,7 @@
* http://stubber.math-inf.uni-greifswald.de/informatik/PEOPLE/Papers/ESA01/sepbound01.pd
* [3] "A New Constructive Root Bound for Algebraic Expressions." C. Li and C. Yap.
*/
-package numerics.math
+package spire.math
import java.math.{ MathContext, BigInteger, BigDecimal => BigDec }
import scala.math.{ ScalaNumber, ScalaNumericConversions, max }
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
import scala.math.{abs, ceil, floor, pow => mpow}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.math.{abs, signum}
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
trait Semigroup[A] extends Eq[A] {
def op(x:A, y:A): A
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
/**
* The `Sign` of a number.
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec}
import scala.math.min
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.{specialized => spec, math => mth}
@@ -1,9 +1,9 @@
-package numerics.math.fpf
+package spire.math.fpf
import scala.math.{ max, abs }
import java.lang.Double.{ NaN, isNaN, isInfinite }
-import numerics.math._
+import spire.math._
import Implicits._
@@ -1,6 +1,6 @@
-package numerics.math.fpf
+package spire.math.fpf
-import numerics.math._
+import spire.math._
import Implicits._
@@ -1,6 +1,6 @@
-package numerics.math.fpf
+package spire.math.fpf
-import numerics.math._
+import spire.math._
import scala.math.{ max, abs }
import java.lang.Double.{ NaN, isNaN, isInfinite }
@@ -1,6 +1,6 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math._
+import spire.math._
import Implicits._
@@ -1,6 +1,6 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math._
+import spire.math._
import java.math.MathContext
import Implicits._
@@ -1,9 +1,9 @@
-package numerics.math.real
+package spire.math.real
import java.math.{ MathContext, BigDecimal => BigDec }
import scala.math.max
-import numerics.math._
+import spire.math._
/**
* Provides absolute and relative approximations to `RealLike` types that have
@@ -1,6 +1,6 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math._
+import spire.math._
/**
@@ -1,4 +1,4 @@
-package numerics.math.real
+package spire.math.real
/**
@@ -1,8 +1,8 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math.fpf.MaybeDouble
+import spire.math.fpf.MaybeDouble
-import numerics.math._
+import spire.math._
/**
@@ -1,7 +1,7 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math.fpf.MaybeDouble
-import numerics.math._
+import spire.math.fpf.MaybeDouble
+import spire.math._
/**
@@ -1,4 +1,4 @@
-package numerics.math.real
+package spire.math.real
trait PrettyToString[A <: PrettyToString[A]] extends RealLike[A] { self: A =>
@@ -1,6 +1,6 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math._
+import spire.math._
import java.math.MathContext
@@ -1,6 +1,6 @@
-package numerics.math.real
+package spire.math.real
-import numerics.math._
+import spire.math._
/**
@@ -1,4 +1,4 @@
-package numerics.math.real
+package spire.math.real
/**
@@ -1,4 +1,4 @@
-package numerics.math.real
+package spire.math.real
sealed trait TreeString {
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import scala.annotation.tailrec
@@ -1,7 +1,7 @@
-package numerics.math
+package spire.math
import org.scalatest.FunSuite
-import numerics.math.fun._
+import spire.math.fun._
import Implicits.{eqOps => _, _}
import java.math.MathContext
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import org.scalatest.FunSuite
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
// scalatest
import org.scalatest.FunSuite
@@ -1,6 +1,6 @@
-package numerics.math
+package spire.math
-import numerics.math.fun._
+import spire.math.fun._
import org.scalatest.FunSuite
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import org.scalatest.FunSuite
@@ -1,4 +1,4 @@
-package numerics.math
+package spire.math
import org.scalatest.FunSuite
import java.math.MathContext
Oops, something went wrong.

0 comments on commit b3eaa0f

Please sign in to comment.