MPQC 2.3.1

- Main Page
- Related Pages
- Classes
- Files

- File List

corrtab.h
1 //
2 // corrtab.h
3 //
4 // Copyright (C) 1997 Limit Point Systems, Inc.
5 //
6 // Author: Curtis Janssen <cljanss@limitpt.com>
7 // Maintainer: LPS
8 //
9 // This file is part of the SC Toolkit.
10 //
11 // The SC Toolkit is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU Library General Public License as published by
13 // the Free Software Foundation; either version 2, or (at your option)
14 // any later version.
15 //
16 // The SC Toolkit is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU Library General Public License for more details.
20 //
21 // You should have received a copy of the GNU Library General Public License
22 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 //
25 // The U.S. Government is granted a limited license as per AL 91-7.
26 //
27
28 #ifdef __GNUC__
29 #pragma interface
30 #endif
31
32 #ifndef _math_symmetry_corrtab_h
33 #define _math_symmetry_corrtab_h
34
35 #include <iostream>
36
37 #include <math/symmetry/pointgrp.h>
38
39 namespace sc {
40
41 // //////////////////////////////////////////////////////////////////
42
46 class CorrelationTable: public RefCount {
47 private:
48 Ref<PointGroup> group_;
49 Ref<PointGroup> subgroup_;
50
51 int n_;
52 int subn_;
53 int *ngamma_;
54 int **gamma_;
55
56 void clear();
57 public:
58 CorrelationTable();
59
61 CorrelationTable(const Ref<PointGroup>& group,
62 const Ref<PointGroup>& subgroup);
63
64 ~CorrelationTable();
65
67 Ref<PointGroup> group() const { return group_; }
69 Ref<PointGroup> subgroup() const { return subgroup_; }
70
74 int initialize_table(const Ref<PointGroup>& group,
75 const Ref<PointGroup>& subgroup);
76
78 const char *error(int errcod);
79
81 int n() const { return n_; }
83 int subn() const { return subn_; }
85 int degen(int igamma) const;
87 int subdegen(int igamma) const;
89 //from the high order group can be reduced to.
90 int ngamma(int igamma) const { return ngamma_[igamma]; }
93 int gamma(int igamma, int i) const { return gamma_[igamma][i]; }
94
95 void print(std::ostream &o=ExEnv::out0()) const;
96 };
97
98 }
99
100 #endif
101
102 // Local Variables:
103 // mode: c++
104 // c-file-style: "CLJ-CONDENSED"
105 // End: