From 69dc288978551d3bd0b39a2a4ad49c2331d09cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 2 Jul 2024 11:53:31 +0200 Subject: [PATCH] Add MacaulayNullspace constructor --- src/null.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/null.jl b/src/null.jl index ac4e684..ef7d26b 100644 --- a/src/null.jl +++ b/src/null.jl @@ -32,6 +32,17 @@ function Base.getindex( ) end +function MacaulayNullspace( + ν::MomentMatrix, + rank_check::RankCheck, + ldlt::LowRankLDLTAlgorithm = SVDLDLT(), +) + M = value_matrix(ν) + chol = low_rank_ldlt(M, ldlt, rank_check) + @assert size(chol.L, 1) == LinearAlgebra.checksquare(M) + return MacaulayNullspace(chol.L, ν.basis, accuracy(chol)) +end + abstract type MacaulayNullspaceSolver end function solve(null::MacaulayNullspace, solver::MacaulayNullspaceSolver)