Code Search for Developers
 
 
  

ORProblems.h from Magnus at Krugle


Show ORProblems.h syntax highlighted

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

// Contents: Definition of class ORProblems
//
// Principal Author: Dmitry Bormotov
//
// Status: provisional implementation
//
// Usage: 
//
// Special Notes:
//
//   All this functions should be in the class OneRelatorGroup, 
//   but we still don't have it. 
//
// Revision History:
//

#ifndef _OR_PROBLEMS_H_
#define _OR_PROBLEMS_H_

#include "FPGroup.h"


// ---------------------------- ORProblems --------------------------------- //


class ORProblems {

public:

  /////////////////////////////////////////////////////////////////////////
  //                                                                     //
  // Constructors:                                                       //
  //                                                                     //
  /////////////////////////////////////////////////////////////////////////

  ORProblems( int numOfGens, const Word& relator ) 
    : numberOfGenerators( numOfGens ), 
      theRelator( relator )
  { }
  

  /////////////////////////////////////////////////////////////////////////
  //                                                                     //
  // Accessors:                                                          //
  //                                                                     //
  /////////////////////////////////////////////////////////////////////////

  bool isTrivial( ) const;

  bool isAbelian( ) const;

  bool isFinite( ) const;

  bool isFree( ) const;

  int order( ) const;

  
private:
 
  /////////////////////////////////////////////////////////////////////////
  //                                                                     //
  // Data Members:                                                       //
  //                                                                     //
  /////////////////////////////////////////////////////////////////////////

  int numberOfGenerators;

  Word theRelator;

};


inline bool ORProblems::isFinite( ) const
{
  return numberOfGenerators == 1;
}


inline int ORProblems::order( ) const
{
  if( isFinite() )
    return theRelator.length();
  else
    return 0;
}

#endif





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

  AP-fixups.h
  APofFreeGroups.h
  APofFreeGroupsRep.h
  APwithOneRelator.h
  APwithOneRelatorRep.h
  AmalgamatedProductParser.h
  CONDITION.h
  HNNExtOfFreeGroup.h
  HNNExtOfORGroup.h
  HNNExtension.h
  HNNParser.h
  MagnusBreakdown.h
  Margin.h
  ORProblems.h
  OneRelatorGroup.h
  OneRelatorGroupWithTorsion.h
  Range.h
  ShortenByRelators2.h
  SubgroupOfOneRelatorGroup.h
  SuperGen.h
  Whitehead.h