org.saddle.ops

Provides type aliases for a few basic operations

Attributes

Members list

Concise view

Type members

Classlikes

trait Add extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait AndOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait BinOp[O <: OpType, -X, -Y, +Z]()

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].

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FrFrEOp[OP, X, Y, A, B, C]
class FrScEOp[OP, X, Y, A, B, C]
class SrScEOp[OP, X, A, B, C]
class SrSrEOp[OP, X, A, B, C]
class MatMatElemOp[OP, A, B, C]
class MatSclrElemOp[OP, A, B, C]
class VecSclrElemOp[OP, A, B, C]
class VecVecDot[A, B, C]
class VecVecElemOp[OP, A, B, C]
class VecVecOuter[A, B, C]

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.

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Frame.type
object BinOps.type
trait BinOpInPlace[O <: OpType, -X, -Y]()

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class MatMatElemOpIp[OP, A, B]
class MatSclrElemOpIp[OP, A, B]
class VecSclrElemOpIp[OP, A, B]
class VecVecElemOpIp[OP, A, B]
trait BinOpMat

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.

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object BinOps.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object BinOps.type

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.

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Series.type
object BinOps.type
trait BinOpVec

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.

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object BinOps.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object BinOps.type

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

Attributes

Graph
Supertypes
trait BinOpVec
trait BinOpMat
class Object
trait Matchable
class Any
Self type
BinOps.type
trait BitAnd extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait BitOr extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait BitShl extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait BitShr extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait BitUShr extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait BitXor extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait Divide extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait EqOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait GtOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait GteOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait InnerProd extends MatrixOp

Attributes

Graph
Supertypes
trait MatrixOp
trait OpType
class Object
trait Matchable
class Any
trait LtOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait LteOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait MatrixOp extends OpType

Attributes

Graph
Supertypes
trait OpType
class Object
trait Matchable
class Any
Known subtypes
trait InnerProd
trait OuterProd
trait Mod extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait Multiply extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait NeqOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait NumericOps[+This]

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

Attributes

This

The type of the class inheriting the NumericOps trait

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Frame[RX, CX, T]
class Mat[T]
class Series[X, T]
trait Vec[T]
class VecDefault[T]
Self type
This
sealed 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.

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait MatrixOp
trait InnerProd
trait OuterProd
trait ScalarOp
trait Add
trait AndOp
trait BitAnd
trait BitOr
trait BitShl
trait BitShr
trait BitUShr
trait BitXor
trait Divide
trait EqOp
trait GtOp
trait GteOp
trait LtOp
trait LteOp
trait Mod
trait Multiply
trait NeqOp
trait OrOp
trait Power
trait Subtract
trait XorOp
trait OrOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait OuterProd extends MatrixOp

Attributes

Graph
Supertypes
trait MatrixOp
trait OpType
class Object
trait Matchable
class Any
trait Power extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait ScalarOp extends OpType

Attributes

Graph
Supertypes
trait OpType
class Object
trait Matchable
class Any
Known subtypes
trait Add
trait AndOp
trait BitAnd
trait BitOr
trait BitShl
trait BitShr
trait BitUShr
trait BitXor
trait Divide
trait EqOp
trait GtOp
trait GteOp
trait LtOp
trait LteOp
trait Mod
trait Multiply
trait NeqOp
trait OrOp
trait Power
trait Subtract
trait XorOp
trait Subtract extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any
trait XorOp extends ScalarOp

Attributes

Graph
Supertypes
trait ScalarOp
trait OpType
class Object
trait Matchable
class Any

Types

type AddOp[T] = BinOp[Add, T, T, T]
type DivOp[T] = BinOp[Divide, T, T, T]
type MulOp[T] = BinOp[Multiply, T, T, T]
type SubOp[T] = BinOp[Subtract, T, T, T]