[GAP Forum] Action of Random on a vector space

krishna mohan trebauchet1986 at yahoo.co.in
Sat Oct 16 18:53:19 BST 2010


Hi...

I have a list of  basis vectors b. 

Now I define

V:=VectorSpace(Rationals,b);

I can choose a random vector in this vector space by using Random(V).

Are there any subtleties about the way this works? 

Also, I have got zero vectors by this procedure.

Is there any simple way to ensure that one gets only non-zero vectors?
 (Currently, I explicitly check this going through the elements of the vector, 
and then use Random again if I find all zero)

Krishnamohan



More information about the Forum mailing list