* Added abstract functions for a bunch of pointwise functions (mainly those defined as operators in F#) in Matrix and Vector and also added implementations for all the subtypes
* Exposed some of the pointwise functions as static members in the Matrix and Vector generic types, so that these can be called from F# as if they are normal mathematical operators
* Removing Sign from static member as it won't work for F# which expects it to return an integer and is different from the pointwise definition.
* Exposed PointwiseLog() and PointwiseExp() as static members Log() and Exp() respectively so that they work with F# mathematical operator syntax
* Looks like op_DotHat is already in. Reverting to original so as not to overwrite other people's work
* Changing all the newly added pointwise functions with f(0)=0 to use the AllowSkip option in Map so that its more efficient for sparse matrices.
* Fixed one of the PointwiseBinary helpers so that it has protected access
* Filled in comments for all public functions. Fixed PointwiseBinary to consider both matrices when replicating so that a dense or sparse matrix is created accordingly
For non-complex matrices, the ConjugateTranspose is the same
as the transpose. Therefore, a sealed override for
ConjugateTranspose() that simply forwards the call to Transpose()
makes sense for double/single matrices.
Signed-off-by: Alexander Karatarakis <alex@karatarakis.com>
Change LeftMultiply to a protected method (from protected abstract) and it now
calls TransposeThisAndMultiply(). TransposeThisAndMultiply has unit tests
so it was chosen as the "main" method. Overrides of LeftMultiply were removed,
because now only TransposeThisAndMultiply() needs to be overriden.
Signed-off-by: Alexander Karatarakis <alex@karatarakis.com>
The formulas found in various references do not have abs. Furthermore,
when multiplying A*A^T or A^T*A (for the frobenius norm we only care
about the diagonal so it doesn't matter which product is used) the
i-ith diagonal element of the final matrix comes from the multiplication
of line i with itself. Therefore, all numbers involved will be multiplied
with themselves resulting in numbers that are always non-negative.
Signed-off-by: Alexander Karatarakis <alex@karatarakis.com>