However, a user may want to initialize with a diagonal metric adapt a dense metric or vice versa. Assuming we only support metrics for which an AbstractMatrix representation is available, it seems like it would be preferable to instead have a single EuclideanMetric type that stores the matrices M⁻¹ and W (UniformScaling for UnitEuclideanMetric) and then have the convenient aliases:
This would also eliminate the need for a custom metric type whenever a user wants to use a different matrix type for the metric for which a more efficient W is available then the Cholesky factor, see e.g. #277, #282
We need 4 things from a Euclidean metric:
M⁻¹
dot(v, M⁻¹, v)
W
, such thatW'*W == inv(M⁻¹)
Current this is handled by 3 different types:
UnitEuclideanMetric
DiagonalEuclideanMetric
DenseEuclideanMetric
However, a user may want to initialize with a diagonal metric adapt a dense metric or vice versa. Assuming we only support metrics for which an
AbstractMatrix
representation is available, it seems like it would be preferable to instead have a singleEuclideanMetric
type that stores the matricesM⁻¹
andW
(UniformScaling
forUnitEuclideanMetric
) and then have the convenient aliases:for dispatch.
This would also eliminate the need for a custom metric type whenever a user wants to use a different matrix type for the metric for which a more efficient
W
is available then the Cholesky factor, see e.g. #277, #282