Hi,
I have a bit of a problem understanding how best to use some of the matrix methods in VB. For example:
Is there a way of getting round this? If I use Option Strict Off then the conversions between types are implicit but obviously this is bad practice.
Thanks for your help,
Andrew
I have a bit of a problem understanding how best to use some of the matrix methods in VB. For example:
Option Explicit On
Option Strict On
Option Infer On
Imports MathNet.Numerics.LinearAlgebra.Double
Public Class myClass
Private Sub GetDiagonalFromQR()
Dim tempVectorList As New List(Of DenseVector)
'Code to populate list with DenseVectors here...
Dim tempXMatrix As DenseMatrix = DenseMatrix.CreateFromColumns(tempVectorList)
Dim diagonal() As Double = tempXMatrix.GramSchmidt.R.Diagonal.ToArray
End Sub
End Class
This gives me an error when I have Option Strict On because the CreateFromColumns method is looking for aSystem.Collections.Generic.IList(Of MathNet.Numerics.LinearAlgebra.Generic.Vector(Of Double))
instead.Is there a way of getting round this? If I use Option Strict Off then the conversions between types are implicit but obviously this is bad practice.
Thanks for your help,
Andrew