Behind the
<foo>.t(..) // .t() is transpose
method of [DenseVector|DenseMatrix] is a relative labyrinthe of implicits, traits, and class hierarchies. Some of the pieces:
- trait CanTranspose
- class/object Transpose and associated implicits
- trait/object numericOps with corresponding implicits:
- trait TransposeLowPrio
Here is a possible example of what I am looking for: inside the Transpose object there is the following low-level code (the "dot"):
implicit def transTimesNormalFromDot[T, U, R](implicit dot: OpMulInner.Impl2[T, U, R]): OpMulMatrix.Impl2[Transpose[T], U, R] = {
new OpMulMatrix.Impl2[Transpose[T], U, R] {
def apply(v: Transpose[T], v2: U): R = {
dot(v.inner, v2)
}
}
}
Note however that Intellij IDE was unable to find any usages. I am trying to find how the DenseMatrix and DenseVector implement the transpose.