breeze.generic

Type members

Classlikes

trait ElementwiseUFunc extends UFunc
trait MMRegistry1[M]
trait MMRegistry2[R]
trait MMRegistry3[R]
sealed trait MappingUFuncLowPrio extends GenericOps
trait MethodImpl[A, +R]

Basically Function1, but not because we don't want these coming up when implicit search happens...

Basically Function1, but not because we don't want these coming up when implicit search happens...

trait Multimethod[Method, A <: AnyRef, R] extends MMRegistry1[Method]

A Multimethod is basically a glorified registry that uses dynamic reflection (and subtyping) to determine which version of the method to invoke.

A Multimethod is basically a glorified registry that uses dynamic reflection (and subtyping) to determine which version of the method to invoke.

trait ShapedUFunc extends UFunc
trait UFunc extends HasOps

"Universal" Functions that mimic numpy's. A universal function is typically defined on anything that supports elementwise maps.

"Universal" Functions that mimic numpy's. A universal function is typically defined on anything that supports elementwise maps.

For example, exp is a UFunc: It just calls exp on all components of the passed in object.

Moreover, "operators" like breeze.linalg.operators.OpAdd are UFuncs as well, with syntactic sugar provided by way of breeze.linalg.NumericOps.

Additional implementations can be added as implicits by extending a UFunc's Impl, InPlaceImpl, or SinkImpl traits. For example, breeze.math.Complex extends breeze.numerics.log with the following implicit:

    implicit object logComplexImpl extends breeze.numerics.log.Impl[Complex, Complex] { def apply(v: Complex) = v.log }
Companion:
object
object UFunc
Companion:
class
trait VariableUFunc[U <: UFunc, T <: VariableUFunc[U, T]]
case class WrappedUFunc1[A1, R](f: A1 => R) extends VariableUFunc[WrappedUFunc.type, WrappedUFunc1[A1, R]]
case class WrappedUFunc2[A1, A2, R](f: (A1, A2) => R) extends VariableUFunc[WrappedUFunc.type, WrappedUFunc2[A1, A2, R]]