Growing span of vectors

asked 2023-02-14 22:05:14 +0200

quimey gravatar image

I'm trying to generate a basis of a vector space that satisfies certain properties. The method I'm using is kind of randomized, but fast, the bottleneck at the moment is how to maintain a structure that serves to check if the current element is in the basis or not. In code it would be something like this:

while V.dimension() < n:
    w = random vector
    if has_good_property(w) and w not in V:
        v += span([w])

This code recomputes the echelonized basis of V on each iteration and I feel that it could be made more efficient.

Any suggestions?

edit retag flag offensive close merge delete

Comments

Why do you think it's inefficient?

Max Alekseyev gravatar imageMax Alekseyev ( 2023-02-22 17:07:35 +0200 )edit