Skip to content

Commit

Permalink
Fix NumberFFVector documentation, add an example
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fingolfin committed Dec 16, 2018
1 parent 5867012 commit 782bf18
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/listcoef.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#############################################################################
##
## <#GAPDoc Label="[1]{listcoef}">
## The following operations all perform arithmetic on row vectors.
## The following operations all perform arithmetic on row vectors,
## given as homogeneous lists of the same length, containing
## elements of a commutative ring.
## <P/>
Expand Down
14 changes: 13 additions & 1 deletion lib/vecmat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,23 @@ DeclareOperation( "ImmutableVector",[IsObject,IsRowVector]);
## <Oper Name="NumberFFVector" Arg='vec, sz'/>
##
## <Description>
## returns an integer that gives the position of the finite field row vector
## returns an integer that gives the position minus one of the finite field row vector
## <A>vec</A> in the sorted list of all row vectors over the field with
## <A>sz</A> elements in the same dimension as <A>vec</A>.
## <Ref Func="NumberFFVector"/> returns <K>fail</K> if the vector cannot be
## represented over the field with <A>sz</A> elements.
## <P/>
## <Example><![CDATA[
## gap> v:=[0,1,2,0]*Z(3);;
## gap> NumberFFVector(v, 3);
## 21
## gap> NumberFFVector(Zero(v),3);
## 0
## gap> V:=EnumeratorSorted(GF(3)^4);
## <enumerator of ( GF(3)^4 )>
## gap> V[21+1] = v;
## true
## ]]></Example>
## </Description>
## </ManSection>
## <#/GAPDoc>
Expand Down

0 comments on commit 782bf18

Please sign in to comment.