Skip to content

Commit 782bf18

Browse files
committed
Fix NumberFFVector documentation, add an example
The documentation of NumberFFVector made it sound as if a value from 1 to q^n is returned, but it really returns a value from 0 to q^n-1. Also fix another unrelated typo in listcoef.gd.
1 parent 5867012 commit 782bf18

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

lib/listcoef.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#############################################################################
1212
##
1313
## <#GAPDoc Label="[1]{listcoef}">
14-
## The following operations all perform arithmetic on row vectors.
14+
## The following operations all perform arithmetic on row vectors,
1515
## given as homogeneous lists of the same length, containing
1616
## elements of a commutative ring.
1717
## <P/>

lib/vecmat.gd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,23 @@ DeclareOperation( "ImmutableVector",[IsObject,IsRowVector]);
419419
## <Oper Name="NumberFFVector" Arg='vec, sz'/>
420420
##
421421
## <Description>
422-
## returns an integer that gives the position of the finite field row vector
422+
## returns an integer that gives the position minus one of the finite field row vector
423423
## <A>vec</A> in the sorted list of all row vectors over the field with
424424
## <A>sz</A> elements in the same dimension as <A>vec</A>.
425425
## <Ref Func="NumberFFVector"/> returns <K>fail</K> if the vector cannot be
426426
## represented over the field with <A>sz</A> elements.
427+
## <P/>
428+
## <Example><![CDATA[
429+
## gap> v:=[0,1,2,0]*Z(3);;
430+
## gap> NumberFFVector(v, 3);
431+
## 21
432+
## gap> NumberFFVector(Zero(v),3);
433+
## 0
434+
## gap> V:=EnumeratorSorted(GF(3)^4);
435+
## <enumerator of ( GF(3)^4 )>
436+
## gap> V[21+1] = v;
437+
## true
438+
## ]]></Example>
427439
## </Description>
428440
## </ManSection>
429441
## <#/GAPDoc>

0 commit comments

Comments
 (0)