FiniteGroup< T, BinaryFunction > Class Template Reference

#include <FiniteGroup.h>

List of all members.

Public Types

typedef T element_type
 The type of elements of the supposed group.
typedef std::vector< T > ElementsList
 A type definition for a list of elements.
typedef FiniteGroup< T, BinaryFunction > group_type
 Type of this class.

Public Member Functions

 FiniteGroup ()
 ~FiniteGroup ()
void setElements (const ElementsList &elements, int identityIndex)
unsigned int size () const
element_type identity () const
void display (std::ostream &stream=std::cout) const
bool checkIdentity () const
bool checkAssociative () const
bool checkInverses () const
bool checkClosure () const
bool isGroup () const
void getSubGroups () const


Detailed Description

template<typename T, class BinaryFunction>
class FiniteGroup< T, BinaryFunction >

Associates a set of objects with a binary operation. It can determine if the formed algebraic structure is a group and it also can determine all the subgroups of the given group. It has a very naive implementation.

Definition at line 25 of file FiniteGroup.h.


Constructor & Destructor Documentation

template<typename T, class BinaryFunction>
FiniteGroup< T, BinaryFunction >::FiniteGroup (  )  [inline]

Default constructor

Definition at line 47 of file FiniteGroup.h.

template<typename T, class BinaryFunction>
FiniteGroup< T, BinaryFunction >::~FiniteGroup (  )  [inline]

Destructor

Definition at line 53 of file FiniteGroup.h.


Member Function Documentation

template<typename T, class BinaryFunction>
void FiniteGroup< T, BinaryFunction >::setElements ( const ElementsList elements,
int  identityIndex 
) [inline]

Convenience method to set the list of elements

Parameters:
elements list of elements to be copied into member elements list
identityIndex the index of the identity element in the elements list

Definition at line 62 of file FiniteGroup.h.

Referenced by FiniteGroup< T, BinaryFunction >::getSubGroups().

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
unsigned int FiniteGroup< T, BinaryFunction >::size (  )  const [inline]

Return the order of this group

Definition at line 71 of file FiniteGroup.h.

Referenced by FiniteGroup< T, BinaryFunction >::getSubGroups().

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
element_type FiniteGroup< T, BinaryFunction >::identity (  )  const [inline]

Return the identity element in the group. In this implementation the identity element must be the first element in the list of elements.

Returns:
The supposed identity element of this supposed group

Definition at line 81 of file FiniteGroup.h.

Referenced by FiniteGroup< T, BinaryFunction >::checkIdentity(), and FiniteGroup< T, BinaryFunction >::checkInverses().

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
void FiniteGroup< T, BinaryFunction >::display ( std::ostream &  stream = std::cout  )  const [inline]

Display the elements to a stream.

Parameters:
stream stream to display to

Definition at line 89 of file FiniteGroup.h.

Referenced by FiniteGroup< T, BinaryFunction >::getSubGroups(), and FiniteGroup< T, BinaryFunction >::isGroup().

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
bool FiniteGroup< T, BinaryFunction >::checkIdentity (  )  const [inline]

Check that the element returned by identity() is indeed the identity element.

Returns:
true if an identity element exists, false otherwise

Definition at line 103 of file FiniteGroup.h.

References FiniteGroup< T, BinaryFunction >::identity().

Referenced by FiniteGroup< T, BinaryFunction >::isGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
bool FiniteGroup< T, BinaryFunction >::checkAssociative (  )  const [inline]

Check if the binary operation has the associativity property.

Definition at line 122 of file FiniteGroup.h.

Referenced by FiniteGroup< T, BinaryFunction >::isGroup().

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
bool FiniteGroup< T, BinaryFunction >::checkInverses (  )  const [inline]

Check if each element in the group has an inverse element.

Definition at line 156 of file FiniteGroup.h.

References FiniteGroup< T, BinaryFunction >::identity().

Referenced by FiniteGroup< T, BinaryFunction >::isGroup().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
bool FiniteGroup< T, BinaryFunction >::checkClosure (  )  const [inline]

Check if the binary operation is closed with respect to the set of elements.

Definition at line 188 of file FiniteGroup.h.

Referenced by FiniteGroup< T, BinaryFunction >::isGroup().

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
bool FiniteGroup< T, BinaryFunction >::isGroup (  )  const [inline]

Check if the list of elements along with the supplied binary operation form a group.

Definition at line 209 of file FiniteGroup.h.

References FiniteGroup< T, BinaryFunction >::checkAssociative(), FiniteGroup< T, BinaryFunction >::checkClosure(), FiniteGroup< T, BinaryFunction >::checkIdentity(), FiniteGroup< T, BinaryFunction >::checkInverses(), and FiniteGroup< T, BinaryFunction >::display().

Referenced by FiniteGroup< T, BinaryFunction >::getSubGroups().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T, class BinaryFunction>
void FiniteGroup< T, BinaryFunction >::getSubGroups (  )  const [inline]

Enumerate and display all subgroups of this group.

Definition at line 221 of file FiniteGroup.h.

References FiniteGroup< T, BinaryFunction >::display(), FiniteGroup< T, BinaryFunction >::isGroup(), Combinations::next(), FiniteGroup< T, BinaryFunction >::setElements(), IndexSet::size(), FiniteGroup< T, BinaryFunction >::size(), and Combinations::start().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Math-Objects Library Docs  Generated by: doxygen