Skip to content

Commit

Permalink
Rename MultRowVector to MultVector
Browse files Browse the repository at this point in the history
Performs the following sed commands in the directories
`lib/`, `src/`, `hpcgap/`. Then undo the changes in
the `obsolete.{gd,gi}` files.

sed -i 's/MULT_ROW_VECTOR/MULT_VECTOR/g' `find . -type f`
sed -i 's/MULT_ROWVECTOR/MULT_VECTOR/g' `find . -type f`
sed -i 's/MultRowVector/MultVector/g' `find . -type f`
git checkout -- obsolete.{gd,gi}

Also perform:
sed -i 's/MultRowVector/MultVector/g' doc/ref/vector.xml
  • Loading branch information
ssiccha authored and fingolfin committed Sep 12, 2018
1 parent 56ace34 commit 4040d9b
Show file tree
Hide file tree
Showing 26 changed files with 124 additions and 124 deletions.
2 changes: 1 addition & 1 deletion doc/ref/vector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ than the <Q>natural</Q> field of the problem.
<#Include Label="[1]{listcoef}">
<#Include Label="AddRowVector">
<#Include Label="AddCoeffs">
<#Include Label="MultRowVector">
<#Include Label="MultVector">
<#Include Label="CoeffsMod">

</Section>
Expand Down
2 changes: 1 addition & 1 deletion hpcgap/lib/ffeconway.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions hpcgap/lib/polyrat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -943,19 +943,19 @@ BindGlobal("RPGcdRepresentationModPrime",function(f,g,p)
# convert <s> and <x> 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]);
Expand Down
6 changes: 3 additions & 3 deletions hpcgap/lib/vec8bit.gi
Original file line number Diff line number Diff line change
Expand Up @@ -583,15 +583,15 @@ InstallOtherMethod( AddRowVector, "For 2 8 bit vectors",

#############################################################################
##
#M MultRowVector( <vec>, <ffe> )
#M MultVector( <vec>, <ffe> )
##
## multiply <vec> by <ffe> 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);

#############################################################################
##
Expand Down
10 changes: 5 additions & 5 deletions hpcgap/lib/vecmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1809,13 +1809,13 @@ end);

#############################################################################
##
#M MultRowVector( <vl>, <mul>)
#M MultVector( <vl>, <mul>)
##

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);

#############################################################################
##
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/claspcgs.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/ffeconway.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/grpffmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,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);

Expand Down
18 changes: 9 additions & 9 deletions lib/listcoef.gd
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,29 @@ DeclareOperation(

#############################################################################
##
#O MultRowVectorLeft( <list>, <mul> )
#O MultVectorLeft( <list>, <mul> )
##
## <#GAPDoc Label="MultRowVector">
## <#GAPDoc Label="MultVector">
## <ManSection>
## <Oper Name="MultRowVector" Arg='list1, mul'/>
## <Oper Name="MultRowVectorLeft" Arg='list1, mul'/>
## <Oper Name="MultVector" Arg='list1, mul'/>
## <Oper Name="MultVectorLeft" Arg='list1, mul'/>
## <Returns>nothing</Returns>
##
## <Description>
## This operation calculates <A>mul</A>*<A>list1</A> in-place.
## <P/>
## Note that <C>MultRowVector</C> is just a synonym for
## <C>MultRowVectorLeft</C>.
## Note that <C>MultVector</C> is just a synonym for
## <C>MultVectorLeft</C>.
## </Description>
## </ManSection>
## <#/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 );

#############################################################################
##
Expand Down
18 changes: 9 additions & 9 deletions lib/listcoef.gi
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ end );

#############################################################################
##
#M MultRowVectorLeft( <list>, <mul> )
#M MultVectorLeft( <list>, <mul> )
##
InstallMethod( MultRowVectorLeft,
InstallMethod( MultVectorLeft,
"for a mutable dense list, and an object",
[ IsDenseList and IsMutable,
IsObject ],
Expand All @@ -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 );


#############################################################################
Expand Down
8 changes: 4 additions & 4 deletions lib/matobj.gi
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ end );
############################################################################
# Arithmetical operations:
############################################################################
InstallMethod( MultRowVectorLeft,
InstallMethod( MultVectorLeft,
"generic method for a mutable vector, and an object",
[ IsVectorObj and IsMutable, IsObject ],
function( v, s )
Expand All @@ -599,7 +599,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 )
Expand All @@ -609,7 +609,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 ],
Expand All @@ -620,7 +620,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 ],
Expand Down
34 changes: 17 additions & 17 deletions lib/matobj2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -384,24 +384,24 @@ DeclareOperation( "AddRowVector",

#############################################################################
##
#O MultRowVector( <vec>, <mul>[, <from>, <to>] )
#O MultRowVectorLeft( <vec>, <mul>[, <from>, <to>] )
#O MultRowVectorRight( <vec>, <mul>[, <from>, <to>] )
#O MultVector( <vec>, <mul>[, <from>, <to>] )
#O MultVectorLeft( <vec>, <mul>[, <from>, <to>] )
#O MultVectorRight( <vec>, <mul>[, <from>, <to>] )
##
## <#GAPDoc Label="MatObj_MultRowVectorLeft">
## <#GAPDoc Label="MatObj_MultVectorLeft">
## <ManSection>
## <Oper Name="MultRowVector" Arg='vec, mul[, from, to]'/>
## <Oper Name="MultRowVectorLeft" Arg='vec, mul[, from, to]'/>
## <Oper Name="MultRowVectorRight" Arg='vec, mul[, from, to]'/>
## <Oper Name="MultVector" Arg='vec, mul[, from, to]'/>
## <Oper Name="MultVectorLeft" Arg='vec, mul[, from, to]'/>
## <Oper Name="MultVectorRight" Arg='vec, mul[, from, to]'/>
## <Returns>nothing</Returns>
##
## <Description>
## These operations multiply <A>mul</A> with <A>vec</A> in-place
## where <C>MultRowVectorLeft</C> multiplies with <A>mul</A> from the left
## and <C>MultRowVectorRight</C> does so from the right.
## where <C>MultVectorLeft</C> multiplies with <A>mul</A> from the left
## and <C>MultVectorRight</C> does so from the right.
## </P>
## Note that <C>MultRowVector</C> is just a synonym for
## <C>MultRowVectorLeft</C>.
## Note that <C>MultVector</C> is just a synonym for
## <C>MultVectorLeft</C>.
## </P>
## If the optional parameters <A>from</A> and <A>to</A> are given only the
## index range <C>[<A>from</A>..<A>to</A>]</C> is guaranteed to be
Expand All @@ -414,15 +414,15 @@ DeclareOperation( "AddRowVector",
## </ManSection>
## <#/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


Expand Down Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions lib/matobjplist.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 4040d9b

Please sign in to comment.