NumericOps

org.saddle.ops.NumericOps
trait NumericOps[+This]

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

Type parameters

This

The type of the class inheriting the NumericOps trait

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class VecDefault[T]
class Frame[RX, CX, T]
class Mat[T]
class Series[X, T]
trait Vec[T]
Self type
This

Members list

Value members

Concrete methods

def %[B, That](other: B)(implicit op: BinOp[Mod, This, B, That]): That

Integer modulus of division

Integer modulus of division

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance (divisor)

Attributes

def %=[B](other: B)(implicit op: BinOpInPlace[Mod, This, B]): Unit
def &[B, That](other: B)(implicit op: BinOp[BitAnd, This, B, That]): That

Bit-wise AND

Bit-wise AND

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def &&[B, That](other: B)(implicit op: BinOp[AndOp, This, B, That]): That

Logical AND

Logical AND

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def *[B, That](other: B)(implicit op: BinOp[Multiply, This, B, That]): That

Multiplication

Multiplication

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def **[B, That](other: B)(implicit op: BinOp[Power, This, B, That]): That

Exponentiation

Exponentiation

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance (exponent)

Attributes

def **=[B](other: B)(implicit op: BinOpInPlace[Power, This, B]): Unit
def *=[B](other: B)(implicit op: BinOpInPlace[Multiply, This, B]): Unit
def +[B, That](other: B)(implicit op: BinOp[Add, This, B, That]): That

Addition

Addition

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def +=[B](other: B)(implicit op: BinOpInPlace[Add, This, B]): Unit
def -[B, That](other: B)(implicit op: BinOp[Subtract, This, B, That]): That

Subtraction

Subtraction

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def -=[B](other: B)(implicit op: BinOpInPlace[Subtract, This, B]): Unit
def /[B, That](other: B)(implicit op: BinOp[Divide, This, B, That]): That

Division

Division

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance (divisor)

Attributes

def /=[B](other: B)(implicit op: BinOpInPlace[Divide, This, B]): Unit
def <[B, That](other: B)(implicit op: BinOp[LtOp, This, B, That]): That

Less-than comparison operator

Less-than comparison operator

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def <<[B, That](other: B)(implicit op: BinOp[BitShl, This, B, That]): That

Bit-shift left

Bit-shift left

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def <=[B, That](other: B)(implicit op: BinOp[LteOp, This, B, That]): That

Less-than-or-equal-to comparison operator

Less-than-or-equal-to comparison operator

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def <>[B, That](other: B)(implicit op: BinOp[NeqOp, This, B, That]): That

Element-wise inequality operator

Element-wise inequality operator

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def =?[B, That](other: B)(implicit op: BinOp[EqOp, This, B, That]): That

Element-wise equality operator

Element-wise equality operator

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def >[B, That](other: B)(implicit op: BinOp[GtOp, This, B, That]): That

Greater-than comparison operator

Greater-than comparison operator

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def >=[B, That](other: B)(implicit op: BinOp[GteOp, This, B, That]): That

Greater-than-or-equal-to comparison operator

Greater-than-or-equal-to comparison operator

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def >>[B, That](other: B)(implicit op: BinOp[BitShr, This, B, That]): That

Bit-shift right (arithmetic)

Bit-shift right (arithmetic)

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def >>>[B, That](other: B)(implicit op: BinOp[BitUShr, This, B, That]): That

Bit-shift right (logical)

Bit-shift right (logical)

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def ^[B, That](other: B)(implicit op: BinOp[BitXor, This, B, That]): That

Bit-wise EXCLUSIVE OR

Bit-wise EXCLUSIVE OR

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def dot[B, That](other: B)(implicit op: BinOp[InnerProd, This, B, That]): That

Dot (inner) product

Dot (inner) product

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def outer[B, That](other: B)(implicit op: BinOp[OuterProd, This, B, That]): That

Outer product

Outer product

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def xor[B, That](other: B)(implicit op: BinOp[XorOp, This, B, That]): That

Logical EXCLUSIVE OR

Logical EXCLUSIVE OR

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def |[B, That](other: B)(implicit op: BinOp[BitOr, This, B, That]): That

Bit-wise OR

Bit-wise OR

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes

def ||[B, That](other: B)(implicit op: BinOp[OrOp, This, B, That]): That

Logical OR

Logical OR

Type parameters

B

type of the other operand

That

result type of operation

Value parameters

op

implicit evidence for operation between this and other

other

other operand instance

Attributes