Skip to content

[Feature Request] Remove restriction of matrix nullspace calculation #194

@bvenn

Description

@bvenn

Is your feature request related to a problem? Please describe.
As pointed out in the fslab discord channel there is no requirement for Matrix.nullspace to be guarded by the HasService query. The SVD works even if no service is available.

Describe the solution you'd like
The condition could simply be removed. The results may be different for different SVD implementations. Unit tests should be added to ensure the validity of the nullspace result.

Additional context
The matrix multiplied with its nullspace must result in zeros. It's up to discussion what the threshold for the singular value filtering should be (currently it is set to 1E-05).

let m = 
    [|
        [|1.;1.;2.|]
        [|3.;2.;1.;|]
    |]
    |> matrix 
    
let ns = Algebra.LinearAlgebra.nullspace m
m * ns 
val it: Matrix<float> = matrix [[-3.330669074e-16]
                                [-3.885780586e-16]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions