开发者

How to start scalala console?

I am starting using scala and I am interested in using the scalala package for doing linear algebra computations. I successfully installed it through sbt but I can't (or better don't know how) start the scalala console. Can anyone point out the steps I have to take to make that possible?

Thanks a lot

P.S. I have read this quickstart guide but didn't help me.

[EDIT]

To be more clear I do not want to explicitly make includes with the standard scala console in order scalala t开发者_StackOverflow社区o work.


UPDATE:

If you want start Scalala console without explicitly import those package, then maybe you need build a excutable jar directly from the GitHub repo.

The following steps should work:

  1. git clone https://github.com/scalala/Scalala
  2. cd Scalala
  3. ./sbt update compile proguard
  4. java -jar target/scala_2.8.1/scalala_2.8.1-1.0.0.RC2-SNAPSHOT.min.jar

And now you should get an Scala console with Scalala package imported by default.


Since the document says the scalala console just a standard Scala console with default package imported.

You could just run sbt under your project directory, and using console command to enter Scala console mode.

Finally, type in the following code:

import scalala.scalar._;
import scalala.tensor.::;
import scalala.tensor.mutable._;
import scalala.tensor.dense._;
import scalala.tensor.sparse._;
import scalala.library.Library._;
import scalala.library.LinearAlgebra._;
import scalala.library.Statistics._;
import scalala.library.Plotting._;
import scalala.operators.Implicits._;

Now you should be able to use Scalala just like the document sayas.


run

java -jar target/scala_2.8.1/scalala*.min.jar

or the equivalent for your release of scalala. Optionally, you could run the standard scala console and type in the following includes

import scalala.scalar._;
import scalala.tensor._;
import scalala.tensor.mutable._;
import scalala.tensor.dense._;
import scalala.tensor.sparse._;
import scalala.library.Library._;
import scalala.library.LinearAlgebra._;
import scalala.library.Statistics._;
import scalala.library.Plotting._;
import scalala.operators.Implicits._;

Was there something beyond the instructions you were having an issue with? Citing specific errors or specific problems encountered is a great way to get a more specific answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜