diff --git a/doc/ref/vector.xml b/doc/ref/vector.xml index fd336ebd963..7afeb6c6001 100644 --- a/doc/ref/vector.xml +++ b/doc/ref/vector.xml @@ -190,7 +190,7 @@ than the natural field of the problem. <#Include Label="[1]{listcoef}"> <#Include Label="AddRowVector"> <#Include Label="AddCoeffs"> -<#Include Label="MultRowVector"> +<#Include Label="MultVector"> <#Include Label="CoeffsMod"> diff --git a/hpcgap/lib/ffeconway.gi b/hpcgap/lib/ffeconway.gi index a4416dde816..6f4b6107f47 100644 --- a/hpcgap/lib/ffeconway.gi +++ b/hpcgap/lib/ffeconway.gi @@ -955,7 +955,7 @@ InstallMethod(InverseOp, s := t; od; Assert(1,Length(a) = 1); - MultRowVector(r,Inverse(a[1])); + MultVector(r,Inverse(a[1])); if AssertionLevel() >= 2 then t := ProductCoeffs(x![1],r); fam!.ConwayFldEltReducers[d](t); diff --git a/hpcgap/lib/polyrat.gi b/hpcgap/lib/polyrat.gi index b33a1625491..63b7d59c4d0 100644 --- a/hpcgap/lib/polyrat.gi +++ b/hpcgap/lib/polyrat.gi @@ -563,7 +563,7 @@ local fam,gcd, u, v, w, val, r, s; od; #gcd := u * (a/u[Length(u)]); gcd:=u; - MultRowVector(gcd,a/u[Length(u)]); + MultVector(gcd,a/u[Length(u)]); ReduceCoeffsMod(gcd,p); # and return the polynomial @@ -943,19 +943,19 @@ BindGlobal("RPGcdRepresentationModPrime",function(f,g,p) # convert and back into polynomials if 0 = Length(g) then #sx := q * sx; - MultRowVector(sx,q); + MultVector(sx,q); ReduceCoeffsMod(sx,p); return [ LaurentPolynomialByCoefficients(brci[1],sx,0,brci[2]), Zero(brci[1]) ]; else #hx := q * sx; hx:=ShallowCopy(sx); - MultRowVector(hx,q); + MultVector(hx,q); ReduceCoeffsMod(hx,p); hx := LaurentPolynomialByCoefficients(brci[1],hx,0,brci[2]); AddCoeffs(s,ProductCoeffs(sx,f),-1); #s := q * s; - MultRowVector(s,q); + MultVector(s,q); ReduceCoeffsMod(s,p); s := LaurentPolynomialByCoefficients(brci[1],s,0,brci[2]); g := LaurentPolynomialByCoefficients(brci[1],g,0,brci[2]); diff --git a/hpcgap/lib/vec8bit.gi b/hpcgap/lib/vec8bit.gi index 928f0f955e7..0f700da5938 100644 --- a/hpcgap/lib/vec8bit.gi +++ b/hpcgap/lib/vec8bit.gi @@ -583,15 +583,15 @@ InstallOtherMethod( AddRowVector, "For 2 8 bit vectors", ############################################################################# ## -#M MultRowVector( , ) +#M MultVector( , ) ## ## multiply by in place ## -InstallOtherMethod( MultRowVector, "For an 8 bit vector and an ffe", +InstallOtherMethod( MultVector, "For an 8 bit vector and an ffe", IsCollsElms, [ IsRowVector and Is8BitVectorRep, IsFFE and IsInternalRep], 0, - MULT_ROWVECTOR_VEC8BITS); + MULT_VECTOR_VEC8BITS); ############################################################################# ## diff --git a/hpcgap/lib/vecmat.gi b/hpcgap/lib/vecmat.gi index 8c559c23f37..26828f9c219 100644 --- a/hpcgap/lib/vecmat.gi +++ b/hpcgap/lib/vecmat.gi @@ -1809,13 +1809,13 @@ end); ############################################################################# ## -#M MultRowVector( , ) +#M MultVector( , ) ## -InstallOtherMethod( MultRowVector, "for GF(2) vector and char 2 scalar", +InstallOtherMethod( MultVector, "for GF(2) vector and char 2 scalar", IsCollsElms, [IsGF2VectorRep and IsRowVector and IsMutable, IsFFE], 0, - MULT_ROW_VECTOR_GF2VECS_2); + MULT_VECTOR_GF2VECS_2); ############################################################################# ## @@ -2361,7 +2361,7 @@ InstallMethod( Randomize, "for a mutable gf2 vector", [ IsGF2VectorRep and IsMutable ], function( v ) local i; - MultRowVector(v,0); + MultVector(v,0); for i in [1..Length(v)] do if Random(0,1) = 1 then v[i] := Z(2); fi; od; @@ -2371,7 +2371,7 @@ InstallMethod( Randomize, "for a mutable gf2 vector and a random source", [ IsGF2VectorRep and IsMutable, IsRandomSource ], function( v, rs ) local i; - MultRowVector(v,0); + MultVector(v,0); for i in [1..Length(v)] do if Random(rs,0,1) = 1 then v[i] := Z(2); fi; od; diff --git a/lib/claspcgs.gi b/lib/claspcgs.gi index a9916bc9f67..9262423ff53 100644 --- a/lib/claspcgs.gi +++ b/lib/claspcgs.gi @@ -208,7 +208,7 @@ local classes, # classes to be constructed, the result if IsIdenticalObj( FamilyObj( U ), FamilyObj( cl.candidates ) ) then for c in cl.candidates do exp:=ExponentsOfPcElement( N, LeftQuotient( h, c ) ); - MultRowVector( exp, One( field ) ); + MultVector( exp, One( field ) ); w:=exp * N!.subspace.projection; exp{ N!.subspace.baseComplement }:= exp{ N!.subspace.baseComplement }-w; diff --git a/lib/ffeconway.gi b/lib/ffeconway.gi index e5c54a0885f..9f571165dcd 100644 --- a/lib/ffeconway.gi +++ b/lib/ffeconway.gi @@ -925,7 +925,7 @@ InstallMethod(InverseOp, s := t; od; Assert(1,Length(a) = 1); - MultRowVector(r,Inverse(a[1])); + MultVector(r,Inverse(a[1])); if AssertionLevel() >= 2 then t := ProductCoeffs(x![1],r); fam!.ConwayFldEltReducers[d](t); diff --git a/lib/grpffmat.gi b/lib/grpffmat.gi index fed1aa76d2f..27799394097 100644 --- a/lib/grpffmat.gi +++ b/lib/grpffmat.gi @@ -507,7 +507,7 @@ function(rs, G) local m; m:= RandomInvertibleMat( rs, DimensionOfMatrixGroup( G ), FieldOfMatrixGroup( G ) ); - MultRowVector(m[1], DeterminantMat(m)^-1); + MultVector(m[1], DeterminantMat(m)^-1); return ImmutableMatrix(FieldOfMatrixGroup(G), m, true); end); diff --git a/lib/listcoef.gd b/lib/listcoef.gd index a895d7f5e16..717e223c4cc 100644 --- a/lib/listcoef.gd +++ b/lib/listcoef.gd @@ -97,29 +97,29 @@ DeclareOperation( ############################################################################# ## -#O MultRowVectorLeft( , ) +#O MultVectorLeft( , ) ## -## <#GAPDoc Label="MultRowVector"> +## <#GAPDoc Label="MultVector"> ## -## -## +## +## ## nothing ## ## ## This operation calculates mul*list1 in-place. ##

-## Note that MultRowVector is just a synonym for -## MultRowVectorLeft. +## Note that MultVector is just a synonym for +## MultVectorLeft. ## ## ## <#/GAPDoc> ## DeclareOperation( - "MultRowVectorLeft", + "MultVectorLeft", [ IsMutable and IsList, IsObject ] ); -# For VectorObj objects there also exists a MultRowVectorRight operation -DeclareSynonym( "MultRowVector", MultRowVectorLeft ); +# For VectorObj objects there also exists a MultVectorRight operation +DeclareSynonym( "MultVector", MultVectorLeft ); ############################################################################# ## diff --git a/lib/listcoef.gi b/lib/listcoef.gi index 6c7f2602bb0..88884ef883d 100644 --- a/lib/listcoef.gi +++ b/lib/listcoef.gi @@ -262,9 +262,9 @@ end ); ############################################################################# ## -#M MultRowVectorLeft( , ) +#M MultVectorLeft( , ) ## -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "for a mutable dense list, and an object", [ IsDenseList and IsMutable, IsObject ], @@ -274,32 +274,32 @@ function( l, m ) l[i] := m * l[i]; od; end ); -InstallOtherMethod( MultRowVectorLeft, "error if immutable", +InstallOtherMethod( MultVectorLeft, "error if immutable", [ IsList, IsObject ], L1_IMMUTABLE_ERROR); -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "kernel method for a mutable dense small list, and an object", IsCollsElms, [ IsSmallList and IsDenseList and IsMutable, IsObject ], - MULT_ROW_VECTOR_LEFT_2 + MULT_VECTOR_LEFT_2 ); -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "kernel method for a mutable dense plain list of \ cyclotomics, and a cyclotomic", IsCollsElms, [ IsDenseList and IsMutable and IsPlistRep and IsCyclotomicCollection, IsCyclotomic ], - MULT_ROW_VECTOR_2_FAST + MULT_VECTOR_2_FAST ); -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "kernel method for a mutable row vector of ffes in \ plain list rep, and an ffe", IsCollsElms, [ IsRowVector and IsMutable and IsPlistRep and IsFFECollection, IsFFE],0, - MULT_ROWVECTOR_VECFFES ); + MULT_VECTOR_VECFFES ); ############################################################################# diff --git a/lib/matobj.gi b/lib/matobj.gi index be36fd0dd62..0598ab8042e 100644 --- a/lib/matobj.gi +++ b/lib/matobj.gi @@ -580,7 +580,7 @@ end ); ############################################################################ # Arithmetical operations: ############################################################################ -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "generic method for a mutable vector, and an object", [ IsVectorObj and IsMutable, IsObject ], function( v, s ) @@ -590,7 +590,7 @@ InstallMethod( MultRowVectorLeft, od; end ); -InstallMethod( MultRowVectorRight, +InstallMethod( MultVectorRight, "generic method for a mutable vector, and an object", [ IsVectorObj and IsMutable, IsObject ], function( v, s ) @@ -600,7 +600,7 @@ InstallMethod( MultRowVectorRight, od; end ); -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "generic method for a mutable vector, an object, an int, \ and an int", [ IsVectorObj and IsMutable, IsObject, IsInt, IsInt ], @@ -611,7 +611,7 @@ and an int", od; end ); -InstallMethod( MultRowVectorRight, +InstallMethod( MultVectorRight, "generic method for a mutable vector, an object, an int, \ and an int", [ IsVectorObj and IsMutable, IsObject, IsInt, IsInt ], diff --git a/lib/matobj2.gd b/lib/matobj2.gd index d4e472191fb..b96e3f406d3 100644 --- a/lib/matobj2.gd +++ b/lib/matobj2.gd @@ -384,24 +384,24 @@ DeclareOperation( "AddRowVector", ############################################################################# ## -#O MultRowVector( , [, , ] ) -#O MultRowVectorLeft( , [, , ] ) -#O MultRowVectorRight( , [, , ] ) +#O MultVector( , [, , ] ) +#O MultVectorLeft( , [, , ] ) +#O MultVectorRight( , [, , ] ) ## -## <#GAPDoc Label="MatObj_MultRowVectorLeft"> +## <#GAPDoc Label="MatObj_MultVectorLeft"> ## -## -## -## +## +## +## ## nothing ## ## ## These operations multiply mul with vec in-place -## where MultRowVectorLeft multiplies with mul from the left -## and MultRowVectorRight does so from the right. +## where MultVectorLeft multiplies with mul from the left +## and MultVectorRight does so from the right. ##

-## Note that MultRowVector is just a synonym for -## MultRowVectorLeft. +## Note that MultVector is just a synonym for +## MultVectorLeft. ##

## If the optional parameters from and to are given only the ## index range [from..to] is guaranteed to be @@ -414,15 +414,15 @@ DeclareOperation( "AddRowVector", ##
## <#/GAPDoc> ## -DeclareOperation( "MultRowVectorLeft", +DeclareOperation( "MultVectorLeft", [ IsVectorObj and IsMutable, IsObject ] ); -DeclareOperation( "MultRowVectorRight", +DeclareOperation( "MultVectorRight", [ IsVectorObj and IsMutable, IsObject ] ); -DeclareOperation( "MultRowVectorLeft", +DeclareOperation( "MultVectorLeft", [ IsVectorObj and IsMutable, IsObject, IsInt, IsInt ] ); -DeclareOperation( "MultRowVectorRight", +DeclareOperation( "MultVectorRight", [ IsVectorObj and IsMutable, IsObject, IsInt, IsInt ] ); -# Note that MultRowVector is declared a synonym for MultRowVectorLeft in +# Note that MultVector is declared a synonym for MultVectorLeft in # listcoef.gd @@ -601,7 +601,7 @@ DeclareOperation( "Randomize", [IsVectorObj and IsMutable,IsRandomSource] ); ## ## TODO: link to ExtractSubVector ## -## TODO: In AddRowVector and MultRowVector, the destination is always the first argument; +## TODO: In AddRowVector and MultVector, the destination is always the first argument; ## it would be better if we were consistent... ## ## TODO: Maybe also have a version of this as follows: diff --git a/lib/matobjplist.gi b/lib/matobjplist.gi index 70a9b53266d..2df89632779 100644 --- a/lib/matobjplist.gi +++ b/lib/matobjplist.gi @@ -415,27 +415,27 @@ InstallMethod( AddRowVector, fi; end ); -InstallMethod( MultRowVectorLeft, +InstallMethod( MultVectorLeft, "for a plist vector, and an object", [ IsPlistVectorRep and IsMutable, IsObject ], function( v, s ) - MULT_ROW_VECTOR_LEFT_2(v![ELSPOS],s); + MULT_VECTOR_LEFT_2(v![ELSPOS],s); end ); -InstallMethod( MultRowVectorRight, +InstallMethod( MultVectorRight, "for a plist vector, and an object", [ IsPlistVectorRep and IsMutable, IsObject ], function( v, s ) - MULT_ROW_VECTOR_RIGHT_2(v![ELSPOS],s); + MULT_VECTOR_RIGHT_2(v![ELSPOS],s); end ); -InstallOtherMethod( MultRowVectorLeft, "for an integer vector, and a small integer", +InstallOtherMethod( MultVectorLeft, "for an integer vector, and a small integer", [ IsPlistVectorRep and IsIntVector and IsMutable, IsSmallIntRep ], function( v, s ) - MULT_ROW_VECTOR_2_FAST(v![ELSPOS],s); + MULT_VECTOR_2_FAST(v![ELSPOS],s); end ); -# The four argument version of MultRowVectorLeft / ..Right uses the generic +# The four argument version of MultVectorLeft / ..Right uses the generic # implementation in matobj.gi InstallMethod( \*, "for a plist vector and a scalar", diff --git a/lib/matrix.gi b/lib/matrix.gi index 336d33051c6..812341a3f96 100644 --- a/lib/matrix.gi +++ b/lib/matrix.gi @@ -414,10 +414,10 @@ BindGlobal( "Matrix_OrderPolynomialInner", function( fld, mat, vec, vecs) if piv <=d then x := Inverse(w[piv]); - MultRowVector(p, x); + MultVector(p, x); MakeImmutable(p); pols[piv] := p; - MultRowVector(w, x ); + MultVector(w, x ); MakeImmutable(w); vecs[piv] := w; vec := vec*mat; @@ -541,7 +541,7 @@ BindGlobal( "Matrix_MinimalPolynomialSameField", function( fld, mat, ind ) piv := PositionNonZero(w, piv); until piv > n or not IsBound(base[piv]); if piv <= n then - MultRowVector(w,Inverse(w[piv])); + MultVector(w,Inverse(w[piv])); MakeImmutable(w); base[piv] := w; dim := dim+1; @@ -1351,11 +1351,11 @@ InstallMethod( DeterminantMatDestructive, row2 := mat[j]; mult := -row2[k]; if mult <> zero then - MultRowVector( row2, piv ); + MultVector( row2, piv ); AddRowVector( row2, row, mult, k, m ); - MultRowVector( row2, Inverse(det) ); + MultVector( row2, Inverse(det) ); else - MultRowVector( row2, piv/det); + MultVector( row2, piv/det); fi; od; @@ -1433,7 +1433,7 @@ function( mat ) # ... and normalize the row. x := row[k]; det := det * x; - MultRowVector( mat[k], Inverse(x) ); + MultVector( mat[k], Inverse(x) ); # clear all entries in this column, adjust only columns > k # (Note that we need not clear the rows from 'k+1' to 'j'.) @@ -1707,11 +1707,11 @@ local R,M,transform,divide,swaprow, swapcol, addcol, addrow, multcol, multrow, l end; multrow:=function(a,m) - MultRowVector(M[a],m); + MultVector(M[a],m); if transform then - MultRowVector(left[a],m); + MultVector(left[a],m); if basmat<>fail then - MultRowVector(basmat[a],1/m); + MultVector(basmat[a],1/m); fi; fi; end; @@ -2308,7 +2308,7 @@ InstallMethod( SemiEchelonMatDestructive, if inv = fail then return fail; fi; - MultRowVector( row, inv ); + MultVector( row, inv ); Add( vectors, row ); Add( nzheads, j ); heads[j]:= Length( vectors ); @@ -2956,7 +2956,7 @@ InstallMethod( TriangulizeMat, if x = fail then TryNextMethod(); fi; - MultRowVector( row, x ); + MultVector( row, x ); mat[i] := row; # clear all entries in this column diff --git a/lib/meataxe.gi b/lib/meataxe.gi index 83d6900e365..d6e588a6cf3 100644 --- a/lib/meataxe.gi +++ b/lib/meataxe.gi @@ -421,7 +421,7 @@ SMTX_SpinnedBasis:=function( arg ) subdim:=subdim + 1; leadpos[subdim]:=j; #w:=(w[j]^-1) * w; - MultRowVector(w,w[j]^-1); + MultVector(w,w[j]^-1); Add( ans, w ); if subdim = dim then ans:=ImmutableMatrix(F,ans); diff --git a/lib/onecohom.gi b/lib/onecohom.gi index 3e79fb5f8b8..c9d924ea280 100644 --- a/lib/onecohom.gi +++ b/lib/onecohom.gi @@ -1238,14 +1238,14 @@ local cobounds,cocycles, # base of one coboundaries and cocycles Append(RS,OCSmallEquationMatrix(ocr,rels[i],g)); od; RR:=OCSmallEquationVector(ocr,rels[i]); - MultRowVector(RR,-One(ocr.field)); + MultVector(RR,-One(ocr.field)); else for g in gens do Append(RS,OCEquationMatrix(ocr,rels[i],g)); od; RR:=OCEquationVector(ocr,rels[i]); - MultRowVector(RR,-One(ocr.field)); + MultVector(RR,-One(ocr.field)); fi; diff --git a/lib/polyrat.gi b/lib/polyrat.gi index 91204820cdc..955b73f1c72 100644 --- a/lib/polyrat.gi +++ b/lib/polyrat.gi @@ -551,7 +551,7 @@ local fam,gcd, u, v, w, val, r, s; od; #gcd := u * (a/u[Length(u)]); gcd:=u; - MultRowVector(gcd,a/u[Length(u)]); + MultVector(gcd,a/u[Length(u)]); ReduceCoeffsMod(gcd,p); # and return the polynomial @@ -931,19 +931,19 @@ BindGlobal("RPGcdRepresentationModPrime",function(f,g,p) # convert and back into polynomials if 0 = Length(g) then #sx := q * sx; - MultRowVector(sx,q); + MultVector(sx,q); ReduceCoeffsMod(sx,p); return [ LaurentPolynomialByCoefficients(brci[1],sx,0,brci[2]), Zero(brci[1]) ]; else #hx := q * sx; hx:=ShallowCopy(sx); - MultRowVector(hx,q); + MultVector(hx,q); ReduceCoeffsMod(hx,p); hx := LaurentPolynomialByCoefficients(brci[1],hx,0,brci[2]); AddCoeffs(s,ProductCoeffs(sx,f),-1); #s := q * s; - MultRowVector(s,q); + MultVector(s,q); ReduceCoeffsMod(s,p); s := LaurentPolynomialByCoefficients(brci[1],s,0,brci[2]); g := LaurentPolynomialByCoefficients(brci[1],g,0,brci[2]); diff --git a/lib/sparsevectorsorted.gi b/lib/sparsevectorsorted.gi index b15804a25c7..5d4a7d60b56 100644 --- a/lib/sparsevectorsorted.gi +++ b/lib/sparsevectorsorted.gi @@ -74,7 +74,7 @@ InstallGlobalFunction(SparseVectorBySortedList, function(arg) return l; end); -## AddRowVector, MultRowVector +## AddRowVector, MultVector ## products with scalars, scalar product, AddCoeffs, MultCoeffs, ## more coeffs functions ## maybe product with matrices @@ -267,9 +267,9 @@ InstallMethod(DIFF, [IsSparseRowVector and IsSparseListBySortedListRep, IsSparse function(v1,v2) return SUM(v1, AINV(v2)); end); -InstallOtherMethod( MultRowVector, [IsSparseRowVector and IsSparseListBySortedListRep and IsMutable, IsMultiplicativeElement], +InstallOtherMethod( MultVector, [IsSparseRowVector and IsSparseListBySortedListRep and IsMutable, IsMultiplicativeElement], function(v,x) - MultRowVector(v![SL_VALS],x); + MultVector(v![SL_VALS],x); end); InstallMethod( \*, [IsSparseRowVector and IsSparseListBySortedListRep, IsMultiplicativeElement], diff --git a/lib/vec8bit.gi b/lib/vec8bit.gi index f514b2b04d9..55dcb0fe4fa 100644 --- a/lib/vec8bit.gi +++ b/lib/vec8bit.gi @@ -572,15 +572,15 @@ InstallOtherMethod( AddRowVector, "For 2 8 bit vectors", ############################################################################# ## -#M MultRowVector( , ) +#M MultVector( , ) ## ## multiply by in place ## -InstallOtherMethod( MultRowVector, "For an 8 bit vector and an ffe", +InstallOtherMethod( MultVector, "For an 8 bit vector and an ffe", IsCollsElms, [ IsRowVector and Is8BitVectorRep, IsFFE and IsInternalRep], 0, - MULT_ROWVECTOR_VEC8BITS); + MULT_VECTOR_VEC8BITS); ############################################################################# ## diff --git a/lib/vecmat.gi b/lib/vecmat.gi index 68a685744de..ec48193f8dc 100644 --- a/lib/vecmat.gi +++ b/lib/vecmat.gi @@ -1620,13 +1620,13 @@ end); ############################################################################# ## -#M MultRowVector( , ) +#M MultVector( , ) ## -InstallOtherMethod( MultRowVector, "for GF(2) vector and char 2 scalar", +InstallOtherMethod( MultVector, "for GF(2) vector and char 2 scalar", IsCollsElms, [IsGF2VectorRep and IsRowVector and IsMutable, IsFFE], 0, - MULT_ROW_VECTOR_GF2VECS_2); + MULT_VECTOR_GF2VECS_2); ############################################################################# ## @@ -2172,7 +2172,7 @@ InstallMethod( Randomize, "for a mutable gf2 vector", [ IsGF2VectorRep and IsMutable ], function( v ) local i; - MultRowVector(v,0); + MultVector(v,0); for i in [1..Length(v)] do if Random(0,1) = 1 then v[i] := Z(2); fi; od; @@ -2182,7 +2182,7 @@ InstallMethod( Randomize, "for a mutable gf2 vector and a random source", [ IsGF2VectorRep and IsMutable, IsRandomSource ], function( v, rs ) local i; - MultRowVector(v,0); + MultVector(v,0); for i in [1..Length(v)] do if Random(rs,0,1) = 1 then v[i] := Z(2); fi; od; diff --git a/lib/vspcmat.gi b/lib/vspcmat.gi index f4a5f99021c..6068c5fa1f7 100644 --- a/lib/vspcmat.gi +++ b/lib/vspcmat.gi @@ -1072,7 +1072,7 @@ InstallMethod( CloseMutableBasis, if j <= n then scalar:= Inverse( v[i][j] ); for k in [ 1 .. m ] do - MultRowVector( v[k], scalar ); + MultVector( v[k], scalar ); od; Add( basisvectors, v ); heads[i][j]:= Length( basisvectors ); diff --git a/lib/vspcrow.gi b/lib/vspcrow.gi index 077bca45ff9..11124e461a0 100644 --- a/lib/vspcrow.gi +++ b/lib/vspcrow.gi @@ -1583,7 +1583,7 @@ InstallMethod( CloseMutableBasis, # If necessary add the sifted vector, and update the basis info. j := PositionNonZero( v ); if j <= ncols then - MultRowVector( v, Inverse( v[j] ) ); + MultVector( v, Inverse( v[j] ) ); Add( basisvectors, v ); heads[j]:= Length( basisvectors ); fi; diff --git a/src/listoper.c b/src/listoper.c index bffe58d59af..c2a14bc3ba0 100644 --- a/src/listoper.c +++ b/src/listoper.c @@ -1339,7 +1339,7 @@ Obj FuncINV_MATRIX_IMMUTABLE( Obj self, Obj mat) /* We need these to redispatch when the user has supplied a replacement value. */ static Obj AddRowVectorOp; /* BH changed to static */ -static Obj MultRowVectorLeftOp; /* BH changed to static */ +static Obj MultVectorLeftOp; /* BH changed to static */ Obj FuncADD_ROW_VECTOR_5( Obj self, Obj list1, @@ -1571,7 +1571,7 @@ Obj FuncADD_ROW_VECTOR_2_FAST ( Obj self, /**************************************************************************** ** -*F FuncMULT_ROW_VECTOR_LEFT_RIGHT_2( , , ) +*F FuncMULT_VECTOR_LEFT_RIGHT_2( , , ) ** ** This function destructively multiplies the entries of by . ** It multiplies with from the left if is not 0 and from the @@ -1580,7 +1580,7 @@ Obj FuncADD_ROW_VECTOR_2_FAST ( Obj self, ** */ -Obj FuncMULT_ROW_VECTOR_LEFT_RIGHT_2(Obj self, Obj list, Obj mult, UInt left) +Obj FuncMULT_VECTOR_LEFT_RIGHT_2(Obj self, Obj list, Obj mult, UInt left) { UInt i; Obj prd; @@ -1602,19 +1602,19 @@ Obj FuncMULT_ROW_VECTOR_LEFT_RIGHT_2(Obj self, Obj list, Obj mult, UInt left) return 0; } -Obj FuncMULT_ROW_VECTOR_LEFT_2(Obj self, Obj list, Obj mult) +Obj FuncMULT_VECTOR_LEFT_2(Obj self, Obj list, Obj mult) { - return FuncMULT_ROW_VECTOR_LEFT_RIGHT_2(self, list, mult, 1); + return FuncMULT_VECTOR_LEFT_RIGHT_2(self, list, mult, 1); } -Obj FuncMULT_ROW_VECTOR_RIGHT_2(Obj self, Obj list, Obj mult) +Obj FuncMULT_VECTOR_RIGHT_2(Obj self, Obj list, Obj mult) { - return FuncMULT_ROW_VECTOR_LEFT_RIGHT_2(self, list, mult, 0); + return FuncMULT_VECTOR_LEFT_RIGHT_2(self, list, mult, 0); } /**************************************************************************** ** -*F FuncMULT_ROW_VECTOR_2_FAST( , , ) +*F FuncMULT_VECTOR_2_FAST( , , ) ** ** This function destructively multiplies the entries of by ** It does very little checking @@ -1623,7 +1623,7 @@ Obj FuncMULT_ROW_VECTOR_RIGHT_2(Obj self, Obj list, Obj mult) ** multiplier */ -Obj FuncMULT_ROW_VECTOR_2_FAST( Obj self, +Obj FuncMULT_VECTOR_2_FAST( Obj self, Obj list, Obj mult ) { @@ -1683,7 +1683,7 @@ Obj FuncPROD_VEC_MAT_DEFAULT( Obj self, if (res == (Obj)0) { res = SHALLOW_COPY_OBJ(vecr); - CALL_2ARGS(MultRowVectorLeftOp, res, elt); + CALL_2ARGS(MultVectorLeftOp, res, elt); } else CALL_3ARGS(AddRowVectorOp, res, vecr, elt); @@ -1701,7 +1701,7 @@ Obj FuncPROD_VEC_MAT_DEFAULT( Obj self, *F FuncINV_MAT_DEFAULT ** ** A faster version of InvMat for those matrices for whose rows AddRowVector -** and MultRowVectorLeft make sense (and might have fast kernel methods) +** and MultVectorLeft make sense (and might have fast kernel methods) ** */ @@ -1802,8 +1802,8 @@ Obj InvMatWithRowVecs( Obj mat, UInt mut) if (!EQ(x, one)) { xi = INV(x); - CALL_2ARGS(MultRowVectorLeftOp, row, xi); - CALL_2ARGS(MultRowVectorLeftOp, row2, xi); + CALL_2ARGS(MultVectorLeftOp, row, xi); + CALL_2ARGS(MultVectorLeftOp, row2, xi); } /* Clear the entries. We know that we can ignore the entries in rows i..j */ @@ -2259,9 +2259,9 @@ static StructGVarFunc GVarFuncs[] = { GVAR_FUNC(ADD_ROW_VECTOR_3_FAST, 3, "list1, list2, mult"), GVAR_FUNC(ADD_ROW_VECTOR_2, 2, "list1, list2"), GVAR_FUNC(ADD_ROW_VECTOR_2_FAST, 2, "list1, list2"), - GVAR_FUNC(MULT_ROW_VECTOR_LEFT_2, 2, "list, mult"), - GVAR_FUNC(MULT_ROW_VECTOR_RIGHT_2, 2, "list, mult"), - GVAR_FUNC(MULT_ROW_VECTOR_2_FAST, 2, "list, mult"), + GVAR_FUNC(MULT_VECTOR_LEFT_2, 2, "list, mult"), + GVAR_FUNC(MULT_VECTOR_RIGHT_2, 2, "list, mult"), + GVAR_FUNC(MULT_VECTOR_2_FAST, 2, "list, mult"), GVAR_FUNC(PROD_VEC_MAT_DEFAULT, 2, "vec, mat"), GVAR_FUNC(INV_MAT_DEFAULT_MUTABLE, 1, "mat"), GVAR_FUNC(INV_MAT_DEFAULT_SAME_MUTABILITY, 1, "mat"), @@ -2292,7 +2292,7 @@ static Int InitKernel ( InitHdlrFuncsFromTable( GVarFuncs ); InitFopyGVar( "AddRowVector", &AddRowVectorOp ); - InitFopyGVar("MultRowVectorLeft", &MultRowVectorLeftOp); + InitFopyGVar("MultVectorLeft", &MultVectorLeftOp); InitFopyGVar( "ConvertToMatrixRep", &ConvertToMatrixRep ); diff --git a/src/vec8bit.c b/src/vec8bit.c index b281277b475..87daf725bf0 100644 --- a/src/vec8bit.c +++ b/src/vec8bit.c @@ -1631,12 +1631,12 @@ void AddVec8BitVec8BitMultInner( Obj sum, /**************************************************************************** ** -*F FuncMULT_ROW_VECTOR( , , ) +*F FuncMULT_VECTOR( , , ) ** ** In-place scalar multiply */ -Obj FuncMULT_ROWVECTOR_VEC8BITS( Obj self, Obj vec, Obj mul) +Obj FuncMULT_VECTOR_VEC8BITS( Obj self, Obj vec, Obj mul) { UInt q; q = FIELD_VEC8BIT(vec); @@ -5832,7 +5832,7 @@ static StructGVarFunc GVarFuncs [] = { GVAR_FUNC(ADD_ROWVECTOR_VEC8BITS_5, 5, "gfqvecl, gfqvecr, mul, from, to"), GVAR_FUNC(ADD_ROWVECTOR_VEC8BITS_3, 3, "gfqvecl, gfqvecr, mul"), GVAR_FUNC(ADD_ROWVECTOR_VEC8BITS_2, 2, "gfqvecl, gfqvecr"), - GVAR_FUNC(MULT_ROWVECTOR_VEC8BITS, 2, "gfqvec, ffe"), + GVAR_FUNC(MULT_VECTOR_VEC8BITS, 2, "gfqvec, ffe"), GVAR_FUNC(POSITION_NONZERO_VEC8BIT, 2, "vec8bit, zero"), GVAR_FUNC(POSITION_NONZERO_VEC8BIT3, 3, "vec8bit, zero, from"), GVAR_FUNC(APPEND_VEC8BIT, 2, "vec8bitl, vec8bitr"), diff --git a/src/vecffe.c b/src/vecffe.c index 4d3bbaf4b88..469e7a48ec5 100644 --- a/src/vecffe.c +++ b/src/vecffe.c @@ -734,13 +734,13 @@ Obj FuncADD_ROWVECTOR_VECFFES_3( Obj self, Obj vecL, Obj vecR, Obj mult ) } /**************************************************************************** ** -*F FuncMULT_ROWVECTOR_VECFFES( , , ) +*F FuncMULT_VECTOR_VECFFES( , , ) ** */ -static Obj MultRowVectorLeftOp; /* BH changed to static */ +static Obj MultVectorLeftOp; /* BH changed to static */ -Obj FuncMULT_ROWVECTOR_VECFFES( Obj self, Obj vec, Obj mult ) +Obj FuncMULT_VECTOR_VECFFES( Obj self, Obj vec, Obj mult ) { Obj *ptr; FFV valM; @@ -772,10 +772,10 @@ Obj FuncMULT_ROWVECTOR_VECFFES( Obj self, Obj vec, Obj mult ) /* check the characteristic */ if (CHAR_FF(fld) != CHAR_FF(FLD_FFE(mult))) { mult = ErrorReturnObj( - "MultRowVector: has different field", + "MultVector: has different field", 0L, 0L, "you can replace via 'return ;'"); - return CALL_2ARGS(MultRowVectorLeftOp, vec, mult); + return CALL_2ARGS(MultVectorLeftOp, vec, mult); } /* if the multiplier is over a non subfield then redispatch */ @@ -1087,7 +1087,7 @@ static StructGVarFunc GVarFuncs [] = { GVAR_FUNC(ADD_ROWVECTOR_VECFFES_3, 3, "vecl, vecr, mult"), GVAR_FUNC(ADD_ROWVECTOR_VECFFES_2, 2, "vecl, vecr"), - GVAR_FUNC(MULT_ROWVECTOR_VECFFES, 2, "vec, mult"), + GVAR_FUNC(MULT_VECTOR_VECFFES, 2, "vec, mult"), GVAR_FUNC(IS_VECFFE, 1, "vec"), GVAR_FUNC(COMMON_FIELD_VECFFE, 1, "vec"), GVAR_FUNC(SMALLEST_FIELD_VECFFE, 1, "vec"), diff --git a/src/vecgf2.c b/src/vecgf2.c index 61673712b76..47c3cf48393 100644 --- a/src/vecgf2.c +++ b/src/vecgf2.c @@ -2382,11 +2382,11 @@ Obj FuncSUM_GF2VEC_GF2VEC ( /**************************************************************************** ** -*F FuncMULT_ROW_VECTOR_GF2VECS_2( , , ) +*F FuncMULT_VECTOR_GF2VECS_2( , , ) ** . . . . . sum of GF2 vectors ** */ -Obj FuncMULT_ROW_VECTOR_GF2VECS_2 ( +Obj FuncMULT_VECTOR_GF2VECS_2 ( Obj self, Obj vl, Obj mul ) @@ -4503,7 +4503,7 @@ static StructGVarFunc GVarFuncs [] = { GVAR_FUNC(SHRINKCOEFFS_GF2VEC, 1, "gf2vec"), GVAR_FUNC(POSITION_NONZERO_GF2VEC, 2, "gf2vec, zero"), GVAR_FUNC(POSITION_NONZERO_GF2VEC3, 3, "gf2vec, zero, from"), - GVAR_FUNC(MULT_ROW_VECTOR_GF2VECS_2, 2, "gf2vecl, mul"), + GVAR_FUNC(MULT_VECTOR_GF2VECS_2, 2, "gf2vecl, mul"), GVAR_FUNC(APPEND_GF2VEC, 2, "gf2vecl, gf2vecr"), GVAR_FUNC(SHALLOWCOPY_GF2VEC, 1, "gf2vec"), GVAR_FUNC(NUMBER_GF2VEC, 1, "gf2vec"),