Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package saddle

    Saddle is a Scala Data Library.

    Saddle

    Saddle is a Scala Data Library.

    Saddle provides array-backed, indexed one- and two-dimensional data structures.

    These data structures are specialized on JVM primitives. With them one can often avoid the overhead of boxing and unboxing.

    Basic operations also aim to be robust to missing values (NA's)

    The building blocks are intended to be easily composed.

    The foundational building blocks are:

    Inspiration for Saddle comes from many sources, including the R programming language, the pandas data analysis library for Python, and the Scala collections library.

    Definition Classes
    org
  • package array

    This package contains utilities for working with arrays that are specialized for numeric types.

    This package contains utilities for working with arrays that are specialized for numeric types.

    Definition Classes
    saddle
  • package binary

    Binary serialization for Frame[String,String,T] or Mat[T] with primitive T

    Binary serialization for Frame[String,String,T] or Mat[T] with primitive T

    The layout of binary format is as follows:

    • The first 6 bytes are "SADDLE"
    • The next unsigned byte is the major version
    • The next unsigned byte is the minor version
    • The next 4 bytes form a little endian integer as HEADER_LENGTH
    • The next HEADER_LENGTH bytes form an UTF-8 string as the header.
    • The header is a valid JSON object with the following fields:
      • v: numeric positive integer is the version of the header structure
      • colix : a JSON array of strings, it is the column index of the frame
      • rowix : a JSON array of strings, it is the row index of the frame
      • numrows: numeric positive integer, number of rows
      • numcols: numeric positive integer, number of cols
      • Either one of rowix or numrows may be missing
      • Either one of colix or numcols may be missing
      • rowmajor : a boolean, indicating whether the data is stored in row-major or col-major order
      • datatype : string, either "double", "long", "int", "float", "byte"
    • The header is padded with spaces (0x20) such that HEADER_LENGTH+12 is divisible by 16. The count of spaces are included in HEADER_LENGTH.
    • The next width * numRows * numCols bytes form a little endian primitive array in row-major or col-major order. numRows and numCols are determined from the rowix/numrows and colix/numcols header fields. width is determined from the datatype field (8 for double and long, 4 for int and float, 1 for byte)
    Definition Classes
    saddle
  • package csv
    Definition Classes
    saddle
  • package groupby
    Definition Classes
    saddle
  • package index
    Definition Classes
    saddle
  • package io
    Definition Classes
    saddle
  • package linalg
    Definition Classes
    saddle
  • package macros
    Definition Classes
    saddle
  • package mat
    Definition Classes
    saddle
  • package npy
    Definition Classes
    saddle
  • package ops

    Provides type aliases for a few basic operations

    Provides type aliases for a few basic operations

    Definition Classes
    saddle
  • Add
  • AndOp
  • BinOp
  • BinOpFrame
  • BinOpInPlace
  • BinOpMat
  • BinOpMatInPlace
  • BinOpSeries
  • BinOpVec
  • BinOpVecInPlace
  • BinOps
  • BitAnd
  • BitOr
  • BitShl
  • BitShr
  • BitUShr
  • BitXor
  • Divide
  • EqOp
  • GtOp
  • GteOp
  • InnerProd
  • LtOp
  • LteOp
  • MatrixOp
  • Mod
  • Multiply
  • NeqOp
  • NumericOps
  • OpType
  • OrOp
  • OuterProd
  • Power
  • ScalarOp
  • Subtract
  • XorOp
  • package scalar
    Definition Classes
    saddle
  • package spire
    Definition Classes
    saddle
  • package util

    Additional utilities that need a home

    Additional utilities that need a home

    Definition Classes
    saddle
  • package vec

    Factory methods to generate Vec instances

    Factory methods to generate Vec instances

    Definition Classes
    saddle

package ops

Provides type aliases for a few basic operations

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ops
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Add extends ScalarOp
  2. type AddOp[T] = BinOp[Add, T, T, T]
  3. trait AndOp extends ScalarOp
  4. trait BinOp[O <: OpType, -X, -Y, +Z] extends AnyRef

    Concrete implementations of BinOp provide primitive-specialized support for performing binary operations on elements of the following objects, as well as the objects themselves:

    Concrete implementations of BinOp provide primitive-specialized support for performing binary operations on elements of the following objects, as well as the objects themselves:

    Appropriate BinOp instances have to be made available in an implicit context in order for the org.saddle.ops.NumericOps methods inherited by the structures above to operate in a seamless fashion.

    For example:

    Vec(1,2,3) * Vec(4,5,6) == Vec(4,10,18)

    The multiplication above relies on two BinOp implementations: the first is BinOp[Multiply, Vec, Vec, Vec], whose implementation in turn relies on BinOp[Multiply, Int, Int, Int].

    Annotations
    @implicitNotFound()
  5. trait BinOpFrame extends AnyRef

    Provides concrete implementations of binary operations for org.saddle.Frame; these instances provide implicit support for org.saddle.ops.NumericOps methods which are inherited by Frame.

  6. trait BinOpInPlace[O <: OpType, -X, -Y] extends AnyRef
  7. trait BinOpMat extends AnyRef

    Provides concrete implementations of binary operations for org.saddle.Mat; these instances provide implicit support for org.saddle.ops.NumericOps methods which are inherited by Mat.

  8. trait BinOpMatInPlace extends AnyRef
  9. trait BinOpSeries extends AnyRef

    Provides concrete implementations of binary operations for org.saddle.Series; these instances provide implicit support for org.saddle.ops.NumericOps methods which are inherited by Series.

  10. trait BinOpVec extends AnyRef

    Provides concrete implementations of binary operations for org.saddle.Vec; these instances provide implicit support for org.saddle.ops.NumericOps methods which are inherited by Vec.

  11. trait BinOpVecInPlace extends AnyRef
  12. trait BitAnd extends ScalarOp
  13. trait BitOr extends ScalarOp
  14. trait BitShl extends ScalarOp
  15. trait BitShr extends ScalarOp
  16. trait BitUShr extends ScalarOp
  17. trait BitXor extends ScalarOp
  18. type DivOp[T] = BinOp[Divide, T, T, T]
  19. trait Divide extends ScalarOp
  20. trait EqOp extends ScalarOp
  21. trait GtOp extends ScalarOp
  22. trait GteOp extends ScalarOp
  23. trait InnerProd extends MatrixOp
  24. trait LtOp extends ScalarOp
  25. trait LteOp extends ScalarOp
  26. trait MatrixOp extends OpType
  27. trait Mod extends ScalarOp
  28. type MulOp[T] = BinOp[Multiply, T, T, T]
  29. trait Multiply extends ScalarOp
  30. trait NeqOp extends ScalarOp
  31. trait NumericOps[+This] extends AnyRef

    NumericOps provides a mix-in trait for mathematical objects, which in Saddle include:

    NumericOps provides a mix-in trait for mathematical objects, which in Saddle include:

    The methods of this trait allow certain element-wise operations involving these objects to be expressed more naturally as mathematical expressions.

    For instance:

    Vec(1,2,4) << 1 == Vec(2,4,8)
    Vec(1,2,4) + Vec(3,5,7) == Vec(4,7,11)
    Vec(1,2,4) dot Vec(3,5,7) == 41
    This

    The type of the class inheriting the NumericOps trait

  32. sealed trait OpType extends AnyRef

    All operations on Saddle objects are defined via instances of subtypes of the trait OpType.

    All operations on Saddle objects are defined via instances of subtypes of the trait OpType. The instances further derive from ScalarOp or MatrixOp, depending on whether the second operand is a scalar or higher-dimensional object.

  33. trait OrOp extends ScalarOp
  34. trait OuterProd extends MatrixOp
  35. trait Power extends ScalarOp
  36. trait ScalarOp extends OpType
  37. type SubOp[T] = BinOp[Subtract, T, T, T]
  38. trait Subtract extends ScalarOp
  39. trait XorOp extends ScalarOp

Value Members

  1. object BinOps extends BinOpMat with BinOpMatInPlace with BinOpVec with BinOpVecInPlace with BinOpFrame with BinOpSeries

    Contains implementations of primitive binary ops that are NA-aware

    Contains implementations of primitive binary ops that are NA-aware

    Double primitive has NA bit pattern baked into its representation, but for others we must check for the appropriate sentinel value.

    Note scala.Function2 is not specialized on Boolean inputs, only output

Inherited from AnyRef

Inherited from Any

Ungrouped