32.3 NormedVector

NormedVector( vec )

NormedVector returns the scalar multiple of vec such that the first nonzero entry of vec is the one from the field over which the vector is defined. If vec contains only zeroes a copy of it is returned.

    gap> NormedVector( [ 0, -3, -2, 0, 6 ] );
    [ 0, 1, 2/3, 0, -2 ]
    gap> NormedVector( [ 0, 0 ] );
    [ 0, 0 ]
    gap> NormedVector( [ Z(3^4)^3, Z(3^2)^5, Z(3^4)^13 ] );
    [ Z(3)^0, Z(3^4)^47, Z(3^2) ] 

Previous Up Top Next
Index

GAP 3.4.4
April 1997