Class

com.twitter.scalding.mathematics

Product

Related Doc: package mathematics

Permalink

case class Product[R, C, C2, V](left: Matrix2[R, C, V], right: Matrix2[C, C2, V], ring: Ring[V], expressions: Option[Map[Matrix2[R, C2, V], TypedPipe[(R, C2, V)]]] = None)(implicit joiner: MatrixJoiner2) extends Matrix2[R, C2, V] with scala.Product with Serializable

Class representing a matrix product

left

multiplicand

right

multiplier

expressions

a HashMap of common subtrees; None if possibly not optimal (did not go through optimize), Some(...) with a HashMap that was created in optimize

Source
Matrix2.scala
Linear Supertypes
Serializable, scala.Product, Equals, Matrix2[R, C2, V], Serializable, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Product
  2. Serializable
  3. Product
  4. Equals
  5. Matrix2
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Product(left: Matrix2[R, C, V], right: Matrix2[C, C2, V], ring: Ring[V], expressions: Option[Map[Matrix2[R, C2, V], TypedPipe[(R, C2, V)]]] = None)(implicit joiner: MatrixJoiner2)

    Permalink

    left

    multiplicand

    right

    multiplier

    expressions

    a HashMap of common subtrees; None if possibly not optimal (did not go through optimize), Some(...) with a HashMap that was created in optimize

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def #*#(that: Matrix2[R, C2, V])(implicit ring: Ring[V]): Matrix2[R, C2, V]

    Permalink

    Represents the pointwise, or Hadamard, product of two matrices.

    Represents the pointwise, or Hadamard, product of two matrices.

    Definition Classes
    Matrix2
  4. def *(that: Scalar2[V])(implicit ring: Ring[V], mj: MatrixJoiner2): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  5. def *[C2](that: Matrix2[C2, C2, V])(implicit ring: Ring[V], mj: MatrixJoiner2): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  6. def +(that: Matrix2[R, C2, V])(implicit mon: Monoid[V]): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  7. def -(that: Matrix2[R, C2, V])(implicit g: Group[V]): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  8. def /(that: Scalar2[V])(implicit field: algebird.Field[V]): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  9. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def ^(power: Int)(implicit ev: =:=[R, C2], ring: Ring[V], mj: MatrixJoiner2): Matrix2[R, R, V]

    Permalink

    equivalent to multiplying this matrix by itself, power times

    equivalent to multiplying this matrix by itself, power times

    Definition Classes
    Matrix2
  11. def asCol[C2](c2: C2)(implicit ev: =:=[C2, Unit], colOrd: Ordering[C2]): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def asRow[R2](r2: R2)(implicit ev: =:=[R, Unit], rowOrd: Ordering[R2]): Matrix2[R2, C2, V]

    Permalink

    Consider this Matrix as the r2 row of a matrix.

    Consider this Matrix as the r2 row of a matrix. The current matrix must be a row, which is to say, its row type must be Unit.

    Definition Classes
    Matrix2
  14. def binarizeAs[NewValT](implicit mon: Monoid[V], ring: Ring[NewValT]): Matrix2[R, C2, NewValT]

    Permalink
    Definition Classes
    Matrix2
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. implicit val colOrd: Ordering[C2]

    Permalink
    Definition Classes
    ProductMatrix2
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(obj: Any): Boolean

    Permalink

    Structural, NOT mathematical equality (e.g.

    Structural, NOT mathematical equality (e.g. (A*B) * C != A * (B*C)) Used for the Matrix2OptimizationTest (so that it doesn't care about expressions)

    Definition Classes
    Product → Equals → AnyRef → Any
  19. val expressions: Option[Map[Matrix2[R, C2, V], TypedPipe[(R, C2, V)]]]

    Permalink

    a HashMap of common subtrees; None if possibly not optimal (did not go through optimize), Some(...) with a HashMap that was created in optimize

  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  22. def getColumn(index: C2): Matrix2[R, Unit, V]

    Permalink
    Definition Classes
    Matrix2
  23. def getRow(index: R): Matrix2[Unit, C2, V]

    Permalink
    Definition Classes
    Matrix2
  24. def hashCode(): Int

    Permalink
    Definition Classes
    Product → AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. implicit val joiner: MatrixJoiner2

    Permalink
  27. val left: Matrix2[R, C, V]

    Permalink

    multiplicand

  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def negate(implicit g: Group[V]): Product[R, C, C2, V]

    Permalink
    Definition Classes
    ProductMatrix2
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def optimizedSelf: Matrix2[R, C2, V]

    Permalink

    Users should never need this.

    Users should never need this. This is the current Matrix2, but in most optimized form. Usually, you will just do matrix operations until you eventually call write or toTypedPipe

    Definition Classes
    Matrix2
  33. def propagate[C2, VecV](vec: Matrix2[C2, C2, VecV])(implicit ev: =:=[V, Boolean], mon: Monoid[VecV], mj: MatrixJoiner2): Matrix2[R, C2, VecV]

    Permalink

    the result is the same as considering everything on the this to be like a 1 value so we just sum, using only a monoid on VecV, where this Matrix has the value true.

    the result is the same as considering everything on the this to be like a 1 value so we just sum, using only a monoid on VecV, where this Matrix has the value true. This is useful for graph propagation of monoids, such as sketchs like HyperLogLog, BloomFilters or CountMinSketch. TODO This is a special kind of product that could be optimized like Product is

    Definition Classes
    Matrix2
  34. def propagateRow[C2](mat: Matrix2[C2, C2, Boolean])(implicit ev: =:=[R, Unit], mon: Monoid[V], mj: MatrixJoiner2): Matrix2[Unit, C2, V]

    Permalink
    Definition Classes
    Matrix2
  35. val right: Matrix2[C, C2, V]

    Permalink

    multiplier

  36. val ring: Ring[V]

    Permalink
  37. def rowL1Normalize(implicit num: Numeric[V], mj: MatrixJoiner2): Matrix2[R, C2, Double]

    Permalink

    Row L1 normalization After this operation, the sum(|x|) alone each row will be 1.

    Row L1 normalization After this operation, the sum(|x|) alone each row will be 1.

    Definition Classes
    Matrix2
  38. def rowL2Normalize(implicit num: Numeric[V], mj: MatrixJoiner2): Matrix2[R, C2, Double]

    Permalink

    Row L2 normalization After this operation, the sum(|x|^2) along each row will be 1.

    Row L2 normalization After this operation, the sum(|x|^2) along each row will be 1.

    Definition Classes
    Matrix2
  39. implicit val rowOrd: Ordering[R]

    Permalink
    Definition Classes
    ProductMatrix2
  40. val sizeHint: SizeHint

    Permalink
    Definition Classes
    ProductMatrix2
  41. def sumColVectors(implicit ring: Ring[V], mj: MatrixJoiner2): Matrix2[R, Unit, V]

    Permalink
    Definition Classes
    Matrix2
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  43. lazy val toOuterSum: TypedPipe[(R, C2, V)]

    Permalink
  44. lazy val toTypedPipe: TypedPipe[(R, C2, V)]

    Permalink

    Convert the current Matrix to a TypedPipe

    Convert the current Matrix to a TypedPipe

    Definition Classes
    ProductMatrix2
  45. def trace(implicit mon: Monoid[V], ev1: =:=[R, C2]): Scalar2[V]

    Permalink

    Trace(A B) = Trace(B A) so we optimize to choose the lowest cost item

    Trace(A B) = Trace(B A) so we optimize to choose the lowest cost item

    Definition Classes
    ProductMatrix2
  46. lazy val transpose: Product[C2, C, R, V]

    Permalink
    Definition Classes
    ProductMatrix2
  47. def unary_-(implicit g: Group[V]): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2
  48. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. implicit def withOrderedSerialization: Ordering[(R, C2)]

    Permalink
  52. def write(sink: TypedSink[(R, C2, V)])(implicit fd: FlowDef, m: Mode): Matrix2[R, C2, V]

    Permalink
    Definition Classes
    Matrix2

Inherited from Serializable

Inherited from scala.Product

Inherited from Equals

Inherited from Matrix2[R, C2, V]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped