00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifdef __GNUC__
00029 #pragma interface
00030 #endif
00031
00032 #ifndef _math_symmetry_corrtab_h
00033 #define _math_symmetry_corrtab_h
00034
00035 #include <iostream>
00036
00037 #include <math/symmetry/pointgrp.h>
00038
00039 namespace sc {
00040
00041
00042
00046 class CorrelationTable: public RefCount {
00047 private:
00048 Ref<PointGroup> group_;
00049 Ref<PointGroup> subgroup_;
00050
00051 int n_;
00052 int subn_;
00053 int *ngamma_;
00054 int **gamma_;
00055
00056 void clear();
00057 public:
00058 CorrelationTable();
00059
00061 CorrelationTable(const Ref<PointGroup>& group,
00062 const Ref<PointGroup>& subgroup);
00063
00064 ~CorrelationTable();
00065
00067 Ref<PointGroup> group() const { return group_; }
00069 Ref<PointGroup> subgroup() const { return subgroup_; }
00070
00074 int initialize_table(const Ref<PointGroup>& group,
00075 const Ref<PointGroup>& subgroup);
00076
00078 const char *error(int errcod);
00079
00081 int n() const { return n_; }
00083 int subn() const { return subn_; }
00085 int degen(int igamma) const;
00087 int subdegen(int igamma) const;
00089
00090 int ngamma(int igamma) const { return ngamma_[igamma]; }
00093 int gamma(int igamma, int i) const { return gamma_[igamma][i]; }
00094
00095 void print(std::ostream &o=ExEnv::out0()) const;
00096 };
00097
00098 }
00099
00100 #endif
00101
00102
00103
00104
00105