com.twitter.scalding.mathematics

Product

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)]]] = scala.None)(implicit joiner: MatrixJoiner2) extends Matrix2[R, C2, V] with scala.Product with Serializable

Class representing a matrix product

left

multiplicand

right

multiplier

ring
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

Linear Supertypes
Serializable, scala.Product, Equals, Matrix2[R, C2, V], Serializable, AnyRef, Any
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
Learn more about member selection
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)]]] = scala.None)(implicit joiner: MatrixJoiner2)

    left

    multiplicand

    right

    multiplier

    ring
    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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

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

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

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

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

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

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

    Definition Classes
    Matrix2
  10. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. final def ==(arg0: Any): Boolean

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

    equivalent to multiplying this matrix by itself, power times

    equivalent to multiplying this matrix by itself, power times

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

    Definition Classes
    Matrix2
  14. final def asInstanceOf[T0]: T0

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

    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
  16. def binarizeAs[NewValT](implicit mon: Monoid[V], ring: Ring[NewValT]): Matrix2[R, C2, NewValT]

    Definition Classes
    Matrix2
  17. def clone(): AnyRef

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

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

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

    Structural, NOT mathematical equality (e.

    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
  21. val expressions: Option[Map[Matrix2[R, C2, V], TypedPipe[(R, C2, V)]]]

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

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

  22. def finalize(): Unit

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

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

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

    Definition Classes
    Matrix2
  26. def hashCode(): Int

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

    Definition Classes
    Any
  28. implicit val joiner: MatrixJoiner2

  29. val left: Matrix2[R, C, V]

    multiplicand

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

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

    Definition Classes
    ProductMatrix2
  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

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

    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
  35. def propagate[C2, VecV](vec: Matrix2[C2, C2, VecV])(implicit ev: =:=[V, Boolean], mon: Monoid[VecV], mj: MatrixJoiner2): Matrix2[R, C2, VecV]

    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
  36. def propagateRow[C2](mat: Matrix2[C2, C2, Boolean])(implicit ev: =:=[R, Unit], mon: Monoid[V], mj: MatrixJoiner2): Matrix2[Unit, C2, V]

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

    multiplier

  38. val ring: Ring[V]

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

    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
  40. def rowL2Normalize(implicit num: Numeric[V], mj: MatrixJoiner2): Matrix2[R, C2, Double]

    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
  41. implicit val rowOrd: Ordering[R]

    Definition Classes
    ProductMatrix2
  42. val sizeHint: SizeHint

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

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

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

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

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

    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
  48. lazy val transpose: Product[C2, C, R, V]

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

    Definition Classes
    Matrix2
  50. final def wait(): Unit

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

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

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

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

    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