Code Search for Developers
 
 
  

RandomMSCGroup.C from Magnus at Krugle


Show RandomMSCGroup.C syntax highlighted

// Copyright (C) 1995 The New York Group Theory Cooperative
// See magnus/doc/COPYRIGHT for the full notice.

// Contents: Implementation of the RandomMSCGroup class.
//
// Principal Author: Dmitry Bormotov
//
// Status: in progress
//
// Revision History:
//
// Special Notes:
//
// Discussion:
//


#include "RandomMSCGroup.h"


FPGroup RandomMSCGroup::getRandomMSCGroup() {
  NormalRandomWord NW(numOfGens, meanLenOfRels, lenOfRelsStddev, gensSeed, lenOfRelsSeed);
  while ( true ) {
    int len;
    do {
      len = numOfRelsSeed.rand(meanNumOfRels, numOfRelsStddev);
    } while ( len < 1 );
    SetOf<Word> S;
    for ( int i = 0; i < len; i++ )
      S |= NW.word();
    FPGroup G(numOfGens, S);
    int lambda = G.cancellationLambda();
    if ( lambda == 0 || lambda >= 6 )
      return G;
  }
}











See more files for this project here

Magnus

Magnus is a special purpose mathematical package for Infinite Group Theory computations

Project homepage: http://sourceforge.net/projects/magnus
Programming language(s): C,C++
License: other

  AbelianEquations.C
  AbelianGroup.C
  AbelianGroupRep.C
  AbelianInfinitenessProblem.C
  AbelianSGPresentation.C
  Aff_poly_matrix.C
  Aff_poly_pair.C
  Aff_poly_term.C
  Aff_polynomial.C
  Affine.C
  EqSystemParser.C
  EquationParser.C
  FGGroup.C
  FGGroupRep.C
  FPGroup.C
  FPGroupRep.C
  FreeByCyclic.C
  FreeGroup.C
  FreeGroupRep.C
  GeneralWhitehead.C
  Group.C
  GroupFastChecks.C
  GroupRep.C
  Homology.C
  MSCGConjugacyProblem.C
  MSCGroup.C
  ORWordProblem.C
  PowerSeriesWP.C
  PresentationParser.C
  PrimeNumbers.C
  Products.C
  RandomAutomorphism.C
  RandomMSCGroup.C
  RandomPrimitiveElement.C
  RipsConstruction.C
  ShortenByRelators.C
  SmithNormalForm.C
  SmithNormalForm1.C
  SymmetricRelators.C
  TTP.C
  TietzeTrekker.C
  WordEnumerator.C