1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
// Copyright (C) 1994 The New York Group Theory Cooperative
// See magnus/doc/COPYRIGHT for the full notice.
// Contents: Definition of the GroupRep class.
//
// Principal Authors: Stephane Collart, Roger Needham
//
// Status: in progress
//
// Revision History:
//
// * 07/96 Alexey M. implemented IPC tools.
#ifndef _GROUP_REP_H_
#define _GROUP_REP_H_
#include "GenericObject.h"
#include "Type.h"
#include "Chars.h"
#include "Elt.h"
#include "Set.h"
#include "IPC.h"
#include "ExtendedIPC.h"
struct GroupRep : GenericRep {
public:
// Constructors:
GroupRep( ) : theOrder(-1) { }
// compiler provides copy constructor (does "deep copy")
// no need for destructor to do anything
// Representation methods:
// Inherited from PureRep:
// virtual PureRep* clone( ) = 0;
static const Type theGroupType;
static Type type( ) { return theGroupType; }
virtual Type actualType( ) const { return type(); }
// Operators:
private: GroupRep& operator = ( const GroupRep& );
// disable assignement
public:
// Methods dealing with group structure:
virtual bool compare( const GroupRep* G ) const = 0;
virtual int order( ) const = 0;
virtual Trichotomy isTrivial( ) const = 0;
virtual Trichotomy isFinite( ) const = 0;
virtual Trichotomy isInfinite( ) const = 0;
virtual Trichotomy isAbelian( ) const = 0;
// Methods dealing with group elements:
virtual Elt makeIdentity( ) const = 0;
virtual Bool isSyntacticIdentity(const Elt&) const = 0;
virtual Trichotomy isTrivialElt( const Elt& e ) const { return DONTKNOW; }
virtual Trichotomy areEqual(const Elt&, const Elt&) const = 0;
virtual Elt firstElt( ) const = 0;
virtual Elt nextElt(const Elt&) const = 0;
virtual Elt multiply(const Elt&, const Elt&) const = 0;
virtual Elt inverseOf(const Elt&) const = 0;
virtual Elt raiseToPower(const Elt&, int) const;
virtual Elt conjugateBy(const Elt&, const Elt&) const;
virtual Elt commutator(const Elt&, const Elt&) const;
// I/O:
virtual void printOn(ostream&) const = 0;
virtual GroupRep* readFrom(istream&, Chars&) const = 0;
/////////////////////////////////////////////////////////////////////////
// //
// IPC tools: //
// //
/////////////////////////////////////////////////////////////////////////
virtual void write( ostream& ostr ) const { ostr < theOrder; }
virtual void read( istream& istr ) { istr >theOrder;}
// Data members:
int theOrder;
//@rn We kludgily use -1 to record dontknow.
//@rn where/how to store info a group discovers about itself needs
// more thought.
// Debugging stuff:
#ifdef DEBUG
virtual bool consistent( ) const { return true; }
// this performs a simple consistency check on the internal data of
// group representation
// return true = no error detected
// return false = inconsistency found
#endif
};
#endif
|