Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  random.gi   Sprache: Shell

 

#############################################################################
##
#F  RandomClosure( <G>, <fam>, <e> )
##
## <G>: group the nearring is acting on as a transformation nearring
## <fam>: the family of the elements of the nearring
## <e>: a record with the components
## p : the result has probability 1/p to be incorrect
## size : if the size of the nearring is known it can
## be given to the function which produces a
## correct result in this case
##
## Note: only one of p and size has to be set via the function
## SetErrorProbability

RandomClosure := function ( group, fam, e )
local i, m, badp, p, size, addGens;

  if IsBound( e.size ) then
 size := e.size;
 p := 10^100;
  else
 size := Size(fam!.group)^Size(fam!.group);
 p := e.p;
  fi;

  Info( InfoNearRing, 2, "actual size: ",Size(group) );

  addGens := GeneratorsOfGroup( group );
  i := 0; 
  badp := Length(addGens)/(Length(addGens)-1);
  while badp^i < p  and Size(group) < size do
#    Print("->",QuotientRemainder(NumeratorRat(badp^i),DenominatorRat(badp^i))[1],"\n");
    i := i + 1;
    Info( InfoNearRing, 2, "pass: ", i );
    m := GroupElementRepOfNearRingElement(
 NearRingElementByGroupRep( fam, Random(group) ) *
 NearRingElementByGroupRep( fam, Random( GeneratorsOfGroup(group) ) )
    );
    if not m in group then
 return RandomClosure( ClosureGroup( group, m ), fam, e );
    fi;
  od;

  return group;
end;

#############################################################################
##
#M  GroupReduct( <TfmNR> ) random method
##

InstallMethod(
 GroupReduct,
 "random",
 true,
 [IsNearRing and IsTransformationNearRing and HasErrorProbability],
 0,
  function ( nr )
  local addGroup, id;

  if ErrorProbability( nr ) = 0 then
 TryNextMethod();
  fi;

  id := GroupElementRepOfNearRingElement( GeneratorsOfNearRing(nr)[1] )^0;
  addGroup := Group( List( GeneratorsOfNearRing(nr), GroupElementRepOfNearRingElement ), id );

  return RandomClosure( addGroup, nr!.elementsInfo, ErrorProbability( nr ) );
  end );












Messung V0.5 in Prozent
C=77 H=88 G=82

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet am  2026-10-12) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1128594
#Domains=1976912