Basic Saddle data structures
In this section, we will examine the basic data structures available to you when using Saddle. A lot of these you will recognize from similar data types in other systems. We will generally only quickly overview them. More advanced uses are covered in other sections. All of the examples in this section can be done from the REPL. We will only need to start creating separate .scala
files when we come to the more elaborate examples in the other sections. To start working with any of the following code examples, you need to first import the Saddle package:
scala> import org.saddle._ import org.saddle._
Using the Vec structure
The simplest type covered here is the vector. It is closest to a simple array in terms of functionality. On top of the functions expected from a one-dimensional array kind-of-type, there are also various mathematical functions defined for them. Let's see what those are. First of all, you will want to create a vector. The simplest way to...