Multiply CoordinateSystems


(Henrik Kihlman) #1

I’m trying to multiply two coordinate systems.

Dim M1 As New MathNet.Spatial.Euclidean.CoordinateSystem
Dim M2 As New MathNet.Spatial.Euclidean.CoordinateSystem
Dim M3 As MathNet.Spatial.Euclidean.CoordinateSystem
= M1 * M2

It troughs on M3. It says:
Unable to cast object of type
’MathNet.Numerics.LinearAlgebra.Double.DensMatrix’ to type
’MathNet.Spational.Euclidean.CoordinateSystem’

If I declare M3 like this it works.
Dim M3 As MathNet.Numerics.LinearAlgebra.Double.DenseMatrix

Is there a way to multiply coordinate system and have a coordinate system as a result.

Thanks,


(Christoph Rüegg) #2

I think the intended API usage would be to do M3 = M1.Transform(M2) instead of the * operator.

Seems to me it may have been a design mistake that CoordinateSystem inherits from Matrix rather than encapsulating it.