@@ -470,19 +470,15 @@ end);
470470# #
471471# M Random( <G> ) . . . . . . . . . . . . . . . . . . . . . . for natural GL
472472# #
473- InstallMethod( Random,
474- " for natural GL" ,
475- true ,
476- [ IsFFEMatrixGroup and IsFinite and IsNaturalGL ] ,
477- 0 ,
478- function (G )
473+ InstallMethodWithRandomSource( Random,
474+ " for a random source and natural GL" ,
475+ [ IsRandomSource, IsFFEMatrixGroup and IsFinite and IsNaturalGL ] ,
476+ function (rs, G )
479477 local m;
480- m := RandomInvertibleMat( DimensionOfMatrixGroup( G ),
478+ m := RandomInvertibleMat( rs, DimensionOfMatrixGroup( G ),
481479 FieldOfMatrixGroup( G ) );
482- MakeImmutable(m);
483- ConvertToMatrixRep(m, FieldOfMatrixGroup(G));
484- return m;
485- end );
480+ return ImmutableMatrix(FieldOfMatrixGroup(G), m, true );
481+ end );
486482
487483
488484# ############################################################################
@@ -493,20 +489,16 @@ InstallMethod( Random,
493489# # entry in the upper left corner to arbitrary nonzero values in the field
494490# # $F$ form a set of coset representatives of $SL(n,F)$ in $GL(n,F)$.
495491# #
496- InstallMethod( Random,
497- " for natural SL" ,
498- true ,
499- [ IsFFEMatrixGroup and IsFinite and IsNaturalSL ] ,
500- 0 ,
501- function ( G )
492+ InstallMethodWithRandomSource( Random,
493+ " for a random source and natural SL" ,
494+ [ IsRandomSource, IsFFEMatrixGroup and IsFinite and IsNaturalSL ] ,
495+ function (rs, G )
502496 local m;
503- m:= RandomInvertibleMat( DimensionOfMatrixGroup( G ),
497+ m:= RandomInvertibleMat( rs, DimensionOfMatrixGroup( G ),
504498 FieldOfMatrixGroup( G ) );
505499 MultRowVector(m[ 1 ] , DeterminantMat(m)^- 1 );
506- MakeImmutable(m);
507- ConvertToMatrixRep(m, FieldOfMatrixGroup(G));
508- return m;
509- end );
500+ return ImmutableMatrix(FieldOfMatrixGroup(G), m, true );
501+ end );
510502
511503# ############################################################################
512504# #
0 commit comments