-
Notifications
You must be signed in to change notification settings - Fork 689
Installation
If you want to only feel Breeze and give it a chance and you don't want to bother with installation, run sbt
, configure a new project and run interactive console:
$ sbt
set scalaVersion := "2.10.4" // or 2.11.5
set libraryDependencies += "org.scalanlp" %% "breeze" % "0.12"
set libraryDependencies += "org.scalanlp" %% "breeze-viz" % "0.12"
set resolvers += "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/"
console
That's all! Now, you can go to Quickstart or read the instruction for recommended installation way:
We assume, that you have installed SBT
0.13.x or later. Add these lines to your SBT project definition:
libraryDependencies ++= Seq(
// other dependencies here
"org.scalanlp" %% "breeze" % "0.12",
// native libraries are not included by default. add this if you want them (as of 0.7)
// native libraries greatly improve performance, but increase jar sizes.
// It also packages various blas implementations, which have licenses that may or may not
// be compatible with the Apache License. No GPL code, as best I know.
"org.scalanlp" %% "breeze-natives" % "0.12",
// the visualization library is distributed separately as well.
// It depends on LGPL code.
"org.scalanlp" %% "breeze-viz" % "0.12"
)
resolvers ++= Seq(
// other resolvers here
// if you want to use snapshot builds (currently 0.12-SNAPSHOT), use this.
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
"Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/"
)
// or 2.11.5
scalaVersion := "2.10.4"
Then run sbt update
so SBT will download them from maven central.
Maven looks like this:
<dependency>
<groupId>org.scalanlp</groupId>
<artifactId>breeze_2.10</artifactId> <!-- or 2.11 -->
<version>0.12</version>
</dependency>
http://mvnrepository.com/artifact/org.scalanlp/breeze_2.10/0.12 (as an example) is a great resource for finding other configuration examples for other build tools.
You should not need to build Breeze yourself but in the case you do, here are the steps:
Breeze is hosted on github and is built with sbt.
Set up sbt
following their instructions, and then run sbt
. The following targets are useful:
-
compile
-- Builds the library -
test
-- Runs the unit tests -
doc
-- Builds scaladoc for the public API -
publish-local
-- Copies jars to local Ivy repository. -
assembly
-- Builds a distributable jar -
console
-- starts a scala repl
Note: you might need more than the default amount of memory to get Breeze to build. The following environment variable is known to work well:
export SBT_OPTS="-Xmx3g -XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M"
Breeze is a numerical processing library for Scala. http://www.scalanlp.org