permlib
0.2.9
Library for permutation computations
Toggle main menu visibility
Loading...
Searching...
No Matches
include
permlib
bsgs_core.h
1
// ---------------------------------------------------------------------------
2
//
3
// This file is part of PermLib.
4
//
5
// Copyright (c) 2009-2011 Thomas Rehn <thomas@carmen76.de>
6
// All rights reserved.
7
//
8
// Redistribution and use in source and binary forms, with or without
9
// modification, are permitted provided that the following conditions
10
// are met:
11
// 1. Redistributions of source code must retain the above copyright
12
// notice, this list of conditions and the following disclaimer.
13
// 2. Redistributions in binary form must reproduce the above copyright
14
// notice, this list of conditions and the following disclaimer in the
15
// documentation and/or other materials provided with the distribution.
16
// 3. The name of the author may not be used to endorse or promote products
17
// derived from this software without specific prior written permission.
18
//
19
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
//
30
// ---------------------------------------------------------------------------
31
32
#include <list>
33
#include <vector>
34
35
#ifndef BSGSCORE_H_
36
#define BSGSCORE_H_
37
38
namespace
permlib {
39
41
template
<
class
PERM,
class
TRANS>
42
struct
BSGSCore
{
43
public
:
45
typedef
PERM
PERMtype
;
47
typedef
TRANS
TRANStype
;
48
49
typedef
std::list<typename PERM::ptr> PERMlist;
50
52
virtual
~BSGSCore
() {}
53
55
std::vector<dom_int>
B
;
57
PERMlist
S
;
59
std::vector<TRANS>
U
;
61
dom_int
n
;
62
64
67
virtual
bool
operator==
(
const
BSGSCore<PERM,TRANS>
& bsgs)
const
;
68
70
virtual
bool
isSymmetricGroup
()
const
{
return
false
; }
71
protected
:
73
explicit
BSGSCore
(
unsigned
int
id
) :
m_id
(id) {}
75
BSGSCore
(
unsigned
int
id
, dom_int n_, dom_int bSize) :
B
(bSize),
n
(n_),
m_id
(id) {}
77
BSGSCore
(
unsigned
int
id
,
const
std::vector<dom_int>& B_,
const
std::vector<TRANS>& U_, dom_int n_)
78
:
B
(B_),
U
(U_.size(),
TRANS
(n_)),
n
(n_),
m_id
(id) {}
79
81
int
m_id
;
82
private
:
84
BSGSCore
(
const
BSGSCore<PERM,TRANS>
& copy) {}
86
BSGSCore
& operator=(
const
BSGSCore<PERM,TRANS>
& copy) {}
87
};
88
89
template
<
class
PERM,
class
TRANS>
90
bool
BSGSCore<PERM, TRANS>::operator==
(
const
BSGSCore<PERM,TRANS>
& bsgs)
const
{
91
return
bsgs.
m_id
== this->
m_id
;
92
}
93
94
}
95
96
#endif
// BSGSCORE_H_
97
permlib::PERM
permlib::BSGSCore
core data of a base and strong generating set (BSGS)
Definition
bsgs_core.h:42
permlib::BSGSCore::BSGSCore
BSGSCore(unsigned int id, const std::vector< dom_int > &B_, const std::vector< TRANS > &U_, dom_int n_)
kind of copy constructor, initializes data structure with given data
Definition
bsgs_core.h:77
permlib::PERMlist::n
dom_int n
Definition
bsgs_core.h:61
permlib::PERMlist::U
std::vector< TRANS > U
Definition
bsgs_core.h:59
permlib::PERMlist::PERMtype
PERM PERMtype
Definition
bsgs_core.h:45
permlib::PERMlist::TRANStype
TRANS TRANStype
Definition
bsgs_core.h:47
permlib::BSGSCore::BSGSCore
BSGSCore(unsigned int id, dom_int n_, dom_int bSize)
constructs empty data structure with given group id, group degree n and base size n
Definition
bsgs_core.h:75
permlib::PERMlist::B
std::vector< dom_int > B
Definition
bsgs_core.h:55
permlib::BSGSCore::~BSGSCore
virtual ~BSGSCore()
empty destructor
Definition
bsgs_core.h:52
permlib::PERMlist::S
PERMlist S
Definition
bsgs_core.h:57
permlib::BSGSCore::operator==
virtual bool operator==(const BSGSCore< PERM, TRANS > &bsgs) const
checks for equality by internal id only
Definition
bsgs_core.h:90
permlib::BSGSCore::isSymmetricGroup
virtual bool isSymmetricGroup() const
true if this structure represents a symmetric group
Definition
bsgs_core.h:70
permlib::BSGSCore::BSGSCore
BSGSCore(unsigned int id)
constructs empty data structure with given group id
Definition
bsgs_core.h:73
permlib::PERMlist::m_id
int m_id
Definition
bsgs_core.h:81
Generated on
for permlib by
1.17.0