Preliminary notes:
Abstract
is left out of the type names for conciseness- We need a
Covector
(or alternative name) type for theoretical reasons, i.e. to make dispatch able to distinguish between all of the following operations and to have methods with a different return type for these different operations. - We need a
LazyTranspose
type (andCovector
) for computational efficiency, i.e. to link with BLAS, to replace the currentAc_mul_Bt
etc family. - Alternatives with ?
...
? are not very likely, just to point out the possibility.
Given vectors v
and w
, linear maps with matrix representation A
and B
, and a covector z
abstract operation | julia ascii | julia method | possible alternative or unicode equivalent |
---|---|---|---|
Inner product | dot(v, w) |
dot(::Vector, ::Vector) -> Number |
v ∙ w |
Mapping vector to covector | z = v' |
transpose(::Vector) -> Covector |
Covector(v) , ? dot(v) (incomplete inner product) ? |
Mapping covector to vector | v = z' |
transpose(::Covector) -> Vector |
|
Applying a covector | z * w |
*(::Covector, ::Vector) -> Number |
? z(w) ? |
Combined operation | v'w = v' * w = dot(v,w) |
no special method required | |
Applying linear map | A * v |
*(::Matrix, ::Vector) -> Vector |
? A(v) ? |
Transpose of a map | B = A.' |
transpose(::Matrix) -> LazyTranpose |
|
Adjoint of a map | B = A' |
ctranspose(::Matrix) -> LazyTranpose |
|
Composing linear maps | A * B |
*(::Matrix, ::Matrix) -> Matrix |
? A ◦ B ? |
Composing linear form and linear map | z * A |
*(::Covector,::Matrix) -> Covector |
? z ◦ A ? |
Combined operation | A.' * v |
no special method required | |
Combined operation | A' * v |
no special method required | |
Combined operation | v'A = v' * A |
no special method required | ? dot(v,A) = v ∙ A ? |
Tensor product between vectors | kron(v, w) |
kron(::Vector, ::Vector) -> Vector |
v ⊗ w ? |
Outer product = tensor product between vector and covector | w * z = w * v' |
*(::Vector, ::Covector) -> Matrix |
w ⊗ z ? |