• R/O
  • SSH
  • HTTPS

conograph: コミット


コミットメタ情報

リビジョン33 (tree)
日時2016-09-07 13:38:51
作者rtomiyasu

ログメッセージ

The output format for base-centered monoclinic cells was corrected.

変更サマリ

差分

--- Conograph/trunk/src/ControlParam.cc (revision 32)
+++ Conograph/trunk/src/ControlParam.cc (revision 33)
@@ -166,7 +166,7 @@
166166 RWParamData<Double>(1.9, REPLACE_NONE<Double>, GE<Double>, 0.0, NULL, MAX_DP(), -1, -1) ); // 0 <= param < INF.
167167 const pair<RWParamProperty, RWParamData<Double> > ControlParam::ThresholdRevM_Data(
168168 RWParamProperty(DVALUE, "ThresholdOnRevM"),
169- RWParamData<Double>(0.9, REPLACE_NONE<Double>, GE<Double>, 0.0, NULL, MAX_DP(), -1, -1) ); // 0 <= param < INF.
169+ RWParamData<Double>(1.0, REPLACE_NONE<Double>, GE<Double>, 0.0, NULL, MAX_DP(), -1, -1) ); // 0 <= param < INF.
170170 const pair<RWParamProperty, RWParamData<Double> > ControlParam::MinLatticePointDistance_Data(
171171 RWParamProperty(DVALUE, "MinDistanceBetweenLatticePoints"),
172172 RWParamData<Double>(2.0, REPLACE_NONE<Double>, GE<Double>, 0.0, NULL, MAX_DP(), -1, -1) ); // 0 <= param < INF.
@@ -501,7 +501,7 @@
501501
502502 inline Int4 put_automatic_edge_num(const eConographAnalysisMode& search_level, const Int4& MaxPeakNum)
503503 {
504- if( search_level == ConographQuickSearch ) return MaxPeakNum * (MaxPeakNum+1) / 3;
504+ if( search_level == ConographQuickSearch ) return max(100, MaxPeakNum*2);
505505 return MaxPeakNum * (MaxPeakNum+1) / 2;
506506 }
507507
@@ -508,7 +508,7 @@
508508
509509 inline Int4 put_automatic_node_num(const eConographAnalysisMode& search_level, const Int4& MaxPeakNum)
510510 {
511- if( search_level == ConographQuickSearch ) return min(MaxPeakNum * (MaxPeakNum+1) * MaxPeakNum * (MaxPeakNum+1) / 9, 64000);
511+ if( search_level == ConographQuickSearch ) return 64000;
512512 return min(MaxPeakNum * (MaxPeakNum+1) * (MaxPeakNum+2) * 2 / 3, 32000);
513513 }
514514
--- Conograph/trunk/src/LatticeWithSameQ/p_out_same_q.cc (revision 32)
+++ Conograph/trunk/src/LatticeWithSameQ/p_out_same_q.cc (revision 33)
@@ -33,13 +33,15 @@
3333
3434 void printSolutions(const vector<LatticeFigureOfMerit>& lattice_result,
3535 const ControlParam& cdata,
36- ostream* const os)
36+ ostream* const os, const size_t number_output)
3737 {
38+ if( number_output < 0 ) return;
39+
3840 os->precision(6);
3941
40- VecDat3<Double> length_axis, angle_axis;
42+ VecDat3<Double> length_axis, angle_axis;
4143 Int4 count = 0;
42- for(size_t n=0; n<lattice_result.size(); n++)
44+ for(size_t n=0; n<min(lattice_result.size(), number_output); n++)
4345 {
4446 *os << "(" << ++count << ") ";
4547
--- Conograph/trunk/src/LatticeWithSameQ/p_out_same_q.hh (revision 32)
+++ Conograph/trunk/src/LatticeWithSameQ/p_out_same_q.hh (revision 33)
@@ -37,13 +37,13 @@
3737
3838 void printSolutions(const vector<LatticeFigureOfMerit>& lattice_result,
3939 const ControlParam& cdata,
40- ostream * const os);
40+ ostream * const os, const size_t number_output = 15);
4141
4242 // Output q-values in fname.
4343 // If selected_lattice is not NULL, the information of selected_lattice is also output.
4444 inline void printSolutions(const vector<LatticeFigureOfMerit>& lattice_result,
4545 const ControlParam& cdata,
46- const string& fname)
46+ const string& fname, const size_t number_output = 15)
4747 {
4848 ofstream ofs(fname.c_str());
4949 printSolutions(lattice_result, cdata, &ofs);
--- Conograph/trunk/src/PeakPosData.cc (revision 32)
+++ Conograph/trunk/src/PeakPosData.cc (revision 33)
@@ -72,7 +72,7 @@
7272 replace(s.begin(),s.end(),',',' ');
7373 istringstream iss(s);
7474 iss >> header;
75-
75+
7676 if(count == 0)
7777 {
7878 if (header != "IGOR") throw ZErrorNotIGORFile;
@@ -100,8 +100,8 @@
100100 return ZErrorMessageReadingFile(filename,
101101 ZErrorMessage("There is no headers", __FILE__, __LINE__, __FUNCTION__));
102102 }
103-
104103
104+
105105 //read Profile Data.
106106 Double t;
107107 while (getnewline(ifs, s) == ZErrorNoError)
--- Conograph/trunk/src/PeakPosData.hh (revision 32)
+++ Conograph/trunk/src/PeakPosData.hh (revision 33)
@@ -55,7 +55,8 @@
5555 PeakPosData();
5656 ~PeakPosData();
5757
58- inline void setPeakPosXData(const Vec_DP& arg){ PeakPosX=arg; };
58+ // For GUI developers.
59+ inline void setPeakPosXData(const Vec_DP& arg){ PeakPosX=arg; };
5960 inline void setPeakPosYData(const Vec_DP& arg){ PeakPosY=arg; };
6061 inline void setPeakWidthData(const Vec_DP& arg){ PeakWidth=arg; };
6162 inline void setToUseFlag(const Vec_BOOL& arg){ toUseFlag=arg; };
--- Conograph/trunk/src/RietveldAnalysisTypes.hh (revision 32)
+++ Conograph/trunk/src/RietveldAnalysisTypes.hh (revision 33)
@@ -24,8 +24,8 @@
2424 THE SOFTWARE.
2525 *
2626 */
27-#ifndef RietveldAnalysisTypes_HH_
28-#define RietveldAnalysisTypes_HH_
27+#ifndef _RietveldAnalysisTypes_HH_
28+#define _RietveldAnalysisTypes_HH_
2929
3030 #include<vector>
3131 #include<complex>
--- Conograph/trunk/src/SortingLattice.cc (revision 32)
+++ Conograph/trunk/src/SortingLattice.cc (revision 33)
@@ -288,7 +288,6 @@
288288 VCLatticeFigureOfMeritToCheckSymmetry& latFOM = lattice_result_tri[n];
289289 latFOM.setLabel(n+1);
290290
291- // Calculate figures of merit as triclinic
292291 const ReducedVCLatticeToCheckBravais RLCB(abc_axis, rh_axis, m_DoesPrudentSymSearch, m_cv2, latFOM.putInitialSellingReducedForm() );
293292
294293 if( JudgeSymmetry[Monoclinic_B] )
--- Conograph/trunk/src/bravais_type/enumBravaisType.hh (revision 32)
+++ Conograph/trunk/src/bravais_type/enumBravaisType.hh (revision 33)
@@ -59,10 +59,10 @@
5959
6060 if( i == Monoclinic_B )
6161 {
62- if( axis == A_Axis ) return name[(size_t)i] + "(A)";
63- else if( axis == B_Axis ) return name[(size_t)i] + "(B)";
62+ if( axis == A_Axis ) return name[(size_t)i] + "(B)";
63+ else if( axis == B_Axis ) return name[(size_t)i] + "(C)";
6464 else // if( axis == C_Axis )
65- return name[(size_t)i] + "(C)";
65+ return name[(size_t)i] + "(A)";
6666 }
6767 else return name[(size_t)i];
6868 }
--- Conograph/trunk/src/indexing_func_dim2.cc (revision 32)
+++ Conograph/trunk/src/indexing_func_dim2.cc (revision 33)
@@ -577,7 +577,11 @@
577577 if( k > root_leftbr_tray[k][index] ) break;
578578 }
579579 if( index<lsize ) continue;
580- for(index=0; index<rsize; index++)
580+ for(index=0; index<rsize;
581+
582+
583+
584+ index++)
581585 {
582586 if( k > root_rightbr_tray[k][index] ) break;
583587 }
@@ -587,10 +591,8 @@
587591 if( bud_basket[k].iK3() == bud_basket[k].iK4() )
588592 {
589593 chibi_tree.setRootEqualUpper();
590- continue;
591594 }
592-
593- if( it->IsSuperBasisObtuse() )
595+ else if( it->IsSuperBasisObtuse() )
594596 {
595597 tree_left.setRoot( it->iK2(), it->iK3() );
596598 for(vector<Int4>::const_iterator it2=root_leftbr_tray[k].begin(); it2<root_leftbr_tray[k].end(); it2++)
--- Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMerit.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMerit.cc (revision 33)
@@ -36,6 +36,7 @@
3636 #include "gather_q_of_Ndim_lattice.hh"
3737 #include "ReducedLatticeToCheckBravais.hh"
3838 #include "LatticeFigureOfMerit.hh"
39+#include "../qc/gather_qcal2.hh"
3940
4041 const Double LatticeFigureOfMerit::m_cv2 = 9.0;
4142
@@ -270,24 +271,25 @@
270271
271272
272273 void LatticeFigureOfMerit::putMillerIndicesInRange(const Double& qend,
273- vector<HKL_Q>& cal_hkl_tray) const
274+ const Int4& irc_type,
275+ vector<HKL_Q>& cal_hkl_tray) const
274276 {
275277 cal_hkl_tray.clear();
276278
277279 vector<HKL_Q> cal_hkl_tray2;
278- gatherQcal(this->putSellingReducedForm(), qend, cal_hkl_tray2);
280+ gatherQcal(this->putSellingReducedForm(), qend, m_S_optimized.second, this->putBravaisType(), irc_type, cal_hkl_tray2);
279281
280282 set< VecDat3<Int4> > found_hkl_tray;
281283 vector<MillerIndex3> equiv_hkl_tray;
282- VecDat3<Int4> hkl;
283284
284285 PGNormalSeriesTray normal_tray(m_brat.enumLaueGroup());
285286 LaueGroup lg(m_brat.enumLaueGroup());
287+ VecDat3<Int4> hkl;
286288
287289 for(vector<HKL_Q>::const_iterator it=upper_bound(cal_hkl_tray2.begin(), cal_hkl_tray2.end(), HKL_Q(NRVec<Int4>(), 0.0));
288290 it<cal_hkl_tray2.end(); it++)
289291 {
290- hkl = product_hkl(it->HKL(), m_S_optimized.second);
292+ hkl = it->HKL();
291293 if( found_hkl_tray.find(hkl) != found_hkl_tray.end() )
292294 {
293295 continue;
@@ -341,7 +343,7 @@
341343 const SymMat<Double> S_sup( this->putSellingReducedForm() );
342344
343345 vector<HKL_Q> cal_hkl_tray;
344- gatherQcal(S_sup, MaxQ, cal_hkl_tray);
346+ gatherQcal(S_sup, MaxQ, m_S_optimized.second, cal_hkl_tray);
345347 if( cal_hkl_tray.empty() ) return;
346348
347349 vector< vector<HKL_Q>::const_iterator > closest_hkl_q_tray;
@@ -356,7 +358,7 @@
356358 Int4 num_q_observed = 0;
357359 for(Int4 k=0; k<num_Q; k++)
358360 {
359- closest_hkl_tray[k] = product_hkl( closest_hkl_q_tray[k]->HKL(), m_S_optimized.second);
361+ closest_hkl_tray[k] = closest_hkl_q_tray[k]->HKL();
360362 diff = qdata[k].q - closest_hkl_q_tray[k]->Q();
361363 actually_disc += fabs( diff );
362364 if( diff * diff <= m_cv2 * qdata[k].q_var )
@@ -374,7 +376,7 @@
374376
375377 const LaueGroup lg(m_brat.enumLaueGroup());
376378
377- Double inv_mult = 2.0 / lg->LaueMultiplicity( product_hkl(it_begin->HKL(), m_S_optimized.second) );
379+ Double inv_mult = 2.0 / lg->LaueMultiplicity( it_begin->HKL() );
378380 Double num_total_hkl = inv_mult;
379381 Double rev_actually_disc = fabs( it_begin->Q() - closest_q_tray[0]->q ) * inv_mult;
380382
@@ -382,7 +384,7 @@
382384 Int4 index = 1;
383385 for(vector<HKL_Q>::const_iterator it=it_begin+1; it<it_end; it++, index++)
384386 {
385- inv_mult = 2.0 / lg->LaueMultiplicity( product_hkl(it->HKL(), m_S_optimized.second) );
387+ inv_mult = 2.0 / lg->LaueMultiplicity( it->HKL() );
386388 num_total_hkl += inv_mult;
387389 rev_actually_disc += fabs( it->Q() - closest_q_tray[index]->q ) * inv_mult;
388390
@@ -401,7 +403,9 @@
401403
402404
403405
404-void LatticeFigureOfMerit::setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit,
406+void LatticeFigureOfMerit::setDeWolffFigureOfMerit(
407+ const Int4& num_ref_figure_of_merit,
408+ const Int4& irc_type,
405409 const vector<QData>& qdata)
406410 {
407411 assert( num_ref_figure_of_merit <= (Int4)qdata.size() );
@@ -417,7 +421,7 @@
417421 const SymMat<Double> S_sup( this->putSellingReducedForm() );
418422
419423 vector<HKL_Q> cal_hkl_tray;
420- gatherQcal(S_sup, MaxQ, cal_hkl_tray);
424+ gatherQcal(S_sup, MaxQ, m_S_optimized.second, this->putBravaisType(), irc_type, cal_hkl_tray);
421425 if( cal_hkl_tray.empty() ) return;
422426
423427 vector< vector<HKL_Q>::const_iterator > closest_hkl_q_tray;
@@ -438,7 +442,7 @@
438442 Double num_total_hkl = 0.0;
439443 for(vector<HKL_Q>::const_iterator it=it_begin; it<it_end; it++)
440444 {
441- num_total_hkl += 2.0 / lg->LaueMultiplicity( product_hkl(it->HKL(), m_S_optimized.second) );
445+ num_total_hkl += 2.0 / lg->LaueMultiplicity( it->HKL() );
442446 }
443447
444448 // Calculate the symmetric figures of merit by Wolff.
--- Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMerit.hh (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMerit.hh (revision 33)
@@ -145,9 +145,10 @@
145145 virtual ~LatticeFigureOfMerit(){};
146146
147147 void putMillerIndicesInRange(const Double& qrange_end,
148+ const Int4& irc_type,
148149 vector<HKL_Q>& cal_hkl_tray) const;
149150
150- void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit, const vector<QData>& qdata);
151+ void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit, const Int4& irc_type, const vector<QData>& qdata);
151152
152153 void setWuFigureOfMerit(const Int4& num_ref_figure_of_merit, const vector<QData>& qdata,
153154 const Double& min_thred_num_hkl,
@@ -322,24 +323,17 @@
322323
323324 inline void LatticeFigureOfMerit::reduceLatticeConstants(NRMat<Int4>& trans_mat)
324325 {
326+ // trans_mat * m_S_red * transpose(trans_mat) = m_S_optimized.first(old).
325327 setInverseOfBuergerReducedForm(trans_mat);
328+ // m_S_optimized.first(new) = m_S_red.
326329 m_S_optimized.first = m_S_red;
330+
331+ // m_S_optimized.second(new) * m_S_optimized.first(new) * transpose(m_S_optimized.second(new))
332+ // = m_S_optimized.second(old) * m_S_optimized.first(old) * transpose(m_S_optimized.second(old)) is Delone reduced.
327333 m_S_optimized.second = mprod(m_S_optimized.second, trans_mat);
328334 }
329335
330336
331-inline VecDat3<Int4> product_hkl(const VecDat3<Int4>& lhs, const NRMat<Int4>& rhs)
332-{
333- assert( rhs.nrows() >= 3 && rhs.ncols() == 3 );
334-
335- VecDat3<Int4> ans;
336- ans[0] = lhs[0]*rhs[0][0] + lhs[1]*rhs[1][0] + lhs[2]*rhs[2][0];
337- ans[1] = lhs[0]*rhs[0][1] + lhs[1]*rhs[1][1] + lhs[2]*rhs[2][1];
338- ans[2] = lhs[0]*rhs[0][2] + lhs[1]*rhs[1][2] + lhs[2]*rhs[2][2];
339- return ans;
340-}
341-
342-
343337 template<class T>
344338 inline T norm(const VecDat3<Int4>& lhs, const SymMat<T>& rhs)
345339 {
--- Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToCheckSymmetry.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToCheckSymmetry.cc (revision 33)
@@ -168,19 +168,22 @@
168168 {
169169 S_red = ans0;
170170 trans_mat2 = m_S_red.second;
171- putBuergerReducedMonoclinicP(1, 2, S_red, trans_mat2);
171+ putBuergerReducedMonoclinicP<Double>(1, 2, S_red, trans_mat2);
172172 }
173173 else if( epg_new == C2h_Y )
174174 {
175175 S_red = transform_sym_matrix(put_matrix_YXZ(), ans0);
176176 trans_mat2 = mprod(m_S_red.second, put_matrix_YXZ());
177- putBuergerReducedMonoclinicP(0, 2, S_red, trans_mat2);
177+ putBuergerReducedMonoclinicP<Double>(0, 2, S_red, trans_mat2);
178178 }
179179 else // if( epg_new == C2h_Z )
180180 {
181+ // (0 0 1)(0 1 0)
182+ // (1 0 0)(0 0 1)
183+ // (0 1 0)(1 0 0)
181184 S_red = transform_sym_matrix(put_matrix_YZX(), ans0);
182185 trans_mat2 = mprod(m_S_red.second, put_matrix_ZXY());
183- putBuergerReducedMonoclinicP(0, 1, S_red, trans_mat2);
186+ putBuergerReducedMonoclinicP<Double>(0, 1, S_red, trans_mat2);
184187 }
185188 ans.insert( SymMat43_Double( S_red, trans_mat2) );
186189 }
@@ -193,19 +196,19 @@
193196 {
194197 S_red = transform_sym_matrix(put_matrix_YXZ(), ans0);
195198 trans_mat2 = mprod(m_S_red.second, put_matrix_YXZ());
196- putBuergerReducedMonoclinicP(1, 2, S_red, trans_mat2);
199+ putBuergerReducedMonoclinicP<Double>(1, 2, S_red, trans_mat2);
197200 }
198201 else if( epg_new == C2h_Y )
199202 {
200203 S_red = ans0;
201204 trans_mat2 = m_S_red.second;
202- putBuergerReducedMonoclinicP(0, 2, S_red, trans_mat2);
205+ putBuergerReducedMonoclinicP<Double>(0, 2, S_red, trans_mat2);
203206 }
204207 else // if( epg_new == C2h_Z )
205208 {
206209 S_red = transform_sym_matrix(put_matrix_XZY(), ans0);
207210 trans_mat2 = mprod(m_S_red.second, put_matrix_XZY());
208- putBuergerReducedMonoclinicP(0, 1, S_red, trans_mat2);
211+ putBuergerReducedMonoclinicP<Double>(0, 1, S_red, trans_mat2);
209212 }
210213 ans.insert( SymMat43_Double( S_red, trans_mat2) );
211214 }
@@ -216,21 +219,24 @@
216219 {
217220 if( epg_new == C2h_X )
218221 {
222+ // (0 1 0)(0 0 1)
223+ // (0 0 1)(1 0 0)
224+ // (1 0 0)(0 1 0)
219225 S_red = transform_sym_matrix(put_matrix_ZXY(), ans0);
220226 trans_mat2 = mprod(m_S_red.second, put_matrix_YZX());
221- putBuergerReducedMonoclinicP(1, 2, S_red, trans_mat2);
227+ putBuergerReducedMonoclinicP<Double>(1, 2, S_red, trans_mat2);
222228 }
223229 else if( epg_new == C2h_Y )
224230 {
225231 S_red = transform_sym_matrix(put_matrix_XZY(), ans0);
226232 trans_mat2 = mprod(m_S_red.second, put_matrix_XZY());
227- putBuergerReducedMonoclinicP(0, 2, S_red, trans_mat2);
233+ putBuergerReducedMonoclinicP<Double>(0, 2, S_red, trans_mat2);
228234 }
229235 else // if( epg_new == C2h_Z )
230236 {
231237 S_red = ans0;
232238 trans_mat2 = m_S_red.second;
233- putBuergerReducedMonoclinicP(0, 1, S_red, trans_mat2);
239+ putBuergerReducedMonoclinicP<Double>(0, 1, S_red, trans_mat2);
234240 }
235241 ans.insert( SymMat43_Double( S_red, trans_mat2) );
236242 }
--- Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToCheckSymmetry.hh (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToCheckSymmetry.hh (revision 33)
@@ -62,7 +62,7 @@
6262
6363 const LatticeFigureOfMerit& putLatticeFigureOfMerit() const { return m_latfom; };
6464
65- inline void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit, const vector<QData>& qdata) { m_latfom.setDeWolffFigureOfMerit(num_ref_figure_of_merit, qdata); };
65+ inline void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit, const vector<QData>& qdata) { m_latfom.setDeWolffFigureOfMerit(num_ref_figure_of_merit, -1, qdata); };
6666
6767 // Returns true if the lattice has at least the symmetry of eps.
6868 // On output, ans equals the equivalent lattice with symmetry of eps.
--- Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToDisplay.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToDisplay.cc (revision 33)
@@ -31,12 +31,19 @@
3131 #include "../PeakPosData.hh"
3232 #include "LatticeFigureOfMeritToDisplay.hh"
3333
34-
35-LatticeFigureOfMeritToDisplay::LatticeFigureOfMeritToDisplay() : m_showsTicks(false)
34+LatticeFigureOfMeritToDisplay::LatticeFigureOfMeritToDisplay()
35+ : m_type_of_reflection_conditions(-1), m_showsTicks(false)
3636 {
3737 }
3838
3939
40+void LatticeFigureOfMeritToDisplay::setTypeOfSystematicAbsences(const Int4& arg)
41+{
42+ assert(arg < putNumberOfTypesOfSystematicAbsences(this->putLatticeFigureOfMerit().putBravaisType()));
43+ m_type_of_reflection_conditions = arg;
44+};
45+
46+
4047 void LatticeFigureOfMeritToDisplay::putStandardMillerIndicesToFit(vector< VecDat3<Int4> >& hkl_to_fit,
4148 vector<bool>& fix_or_fit_flag) const
4249 {
@@ -76,7 +83,7 @@
7683 qobs_range.begin = 0.0;
7784 qobs_range.end = m_qdata.rbegin()->q + sqrt(cv2 * m_qdata.rbegin()->q_var);
7885
79- m_latfom.putMillerIndicesInRange(qobs_range.end, m_cal_hkl_tray);
86+ m_latfom.putMillerIndicesInRange(qobs_range.end, m_type_of_reflection_conditions, m_cal_hkl_tray);
8087 m_associated_hkl_tray.clear();
8188 m_associated_hkl_tray.resize(num_fit_data);
8289
--- Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToDisplay.hh (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToDisplay.hh (revision 33)
@@ -30,6 +30,7 @@
3030 #include <map>
3131 #include "LatticeFigureOfMeritZeroShift.hh"
3232 #include "../utility_data_structure/range.hh"
33+#include "../qc/reflection_conditions.hh"
3334
3435
3536 // Class for outputting information about a lattice in IGOR file.
@@ -46,6 +47,9 @@
4647 vector< VecDat3<Int4> > m_hkl_to_fit;
4748 vector<bool> m_fix_or_fit_flag; // 0:fix, 1:fit.
4849
50+ // If this is negative value, only the reflection conditions derived from the Bravais type are considered.
51+ Int4 m_type_of_reflection_conditions;
52+
4953 // for GUI
5054 bool m_showsTicks;
5155
@@ -93,10 +97,28 @@
9397
9498 inline const vector<QData>& putQDataModifiedWithNewPeakShiftParam() const { return m_qdata; };
9599
96- // Return false if Qdata is not set or
97- // the number of unindexed reflections is larger max_num_false_peak.
100+ inline void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit){ m_latfom.setDeWolffFigureOfMerit(num_ref_figure_of_merit, m_type_of_reflection_conditions, m_qdata); };
98101 inline void setFigureOfMerit(const Int4& num_ref_figure_of_merit){ m_latfom.setFigureOfMerit(num_ref_figure_of_merit, m_qdata); };
99102
103+ void setTypeOfSystematicAbsences(const Int4& arg);
104+ inline string putShortStringTypeOfSystematicAbsences() const
105+ {
106+ return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions).putShortStringType();
107+ };
108+ inline const string& putStringTypeOfSystematicAbsences() const
109+ {
110+ return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions).putStringType();
111+ };
112+ inline const string& putStringReflectionConditions() const
113+ {
114+ return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions).putStringConditions();
115+ };
116+ inline const DataReflectionConditions& putDataOnReflectionConditions() const
117+ {
118+ return putInformationOnReflectionConditions(this->putLatticeFigureOfMerit().putBravaisType(), m_type_of_reflection_conditions);
119+ };
120+
121+
100122 // Resets m_associated_hkl_tray and q-values in m_cal_hkl_tray.
101123 void resetQValuesInRange(const Int4& num_fit_data);
102124 // Resets m_associated_hkl_tray and m_cal_hkl_tray.
@@ -182,9 +204,23 @@
182204 VCData::putPeakQData().size(), m_qdata);
183205 };
184206
207+
208+inline VecDat3<Int4> product_hkl(const VecDat3<Int4>& lhs, const NRMat<Int4>& rhs)
209+{
210+ assert( rhs.nrows() >= 3 && rhs.ncols() == 3 );
211+
212+ VecDat3<Int4> ans;
213+ ans[0] = lhs[0]*rhs[0][0] + lhs[1]*rhs[1][0] + lhs[2]*rhs[2][0];
214+ ans[1] = lhs[0]*rhs[0][1] + lhs[1]*rhs[1][1] + lhs[2]*rhs[2][1];
215+ ans[2] = lhs[0]*rhs[0][2] + lhs[1]*rhs[1][2] + lhs[2]*rhs[2][2];
216+ return ans;
217+}
218+
219+
185220 inline void LatticeFigureOfMeritToDisplay::reduceLatticeConstants()
186221 {
187222 NRMat<Int4> trans_mat;
223+ // trans_mat * m_latfom.m_S_optimized.first(new) * transpose(trans_mat) = m_latfom.m_S_optimized.first(old).
188224 m_latfom.reduceLatticeConstants(trans_mat);
189225
190226 for(vector<HKL_Q>::iterator it=m_cal_hkl_tray.begin(); it<m_cal_hkl_tray.end(); it++)
@@ -198,4 +234,11 @@
198234 }
199235 };
200236
237+inline bool cmpDeWolff(const LatticeFigureOfMeritToDisplay& lhs, const LatticeFigureOfMeritToDisplay& rhs)
238+{
239+ return lhs.putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff()
240+ > rhs.putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff();
241+}
242+
243+
201244 #endif /*LatticeFigureOfMeritToDisplay_HH_*/
--- Conograph/trunk/src/lattice_symmetry/ReducedLatticeToCheckBravais.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/ReducedLatticeToCheckBravais.cc (revision 33)
@@ -771,7 +771,7 @@
771771 if( !check_equiv_m(S2_red0, S2_red, resol) ) continue;
772772
773773 tmat = put_transform_matrix_row3to4(it->first);
774- putBuergerReducedMonoclinicB(monoclinic_b_type, S2_red, tmat);
774+ putBuergerReducedMonoclinicB<Double>(monoclinic_b_type, S2_red, tmat);
775775
776776 S_red_base.insert( SymMat43_Double(S2_red, tmat) );
777777 }
--- Conograph/trunk/src/lattice_symmetry/ReducedVCLatticeToCheckBravais.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/ReducedVCLatticeToCheckBravais.cc (revision 33)
@@ -781,7 +781,7 @@
781781 if( !check_equiv_m(S2_red0, S2_red, cv2) ) continue;
782782
783783 tmat = put_transform_matrix_row3to4(it->first);
784- putBuergerReducedMonoclinicB(monoclinic_b_type, S2_red, tmat);
784+ putBuergerReducedMonoclinicB<VCData>(monoclinic_b_type, S2_red, tmat);
785785
786786 S_red_base.insert( SymMat43_VCData(S2_red, tmat) );
787787 }
--- Conograph/trunk/src/lattice_symmetry/VCLatticeFigureOfMeritToCheckSymmetry.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/VCLatticeFigureOfMeritToCheckSymmetry.cc (revision 33)
@@ -153,19 +153,19 @@
153153 {
154154 S_red = ans0;
155155 trans_mat2 = m_S_red.second;
156- putBuergerReducedMonoclinicP(1, 2, S_red, trans_mat2);
156+ putBuergerReducedMonoclinicP<VCData>(1, 2, S_red, trans_mat2);
157157 }
158158 else if( epg_new == C2h_Y )
159159 {
160160 S_red = transform_sym_matrix(put_matrix_YXZ(), ans0);
161161 trans_mat2 = mprod(m_S_red.second, put_matrix_YXZ());
162- putBuergerReducedMonoclinicP(0, 2, S_red, trans_mat2);
162+ putBuergerReducedMonoclinicP<VCData>(0, 2, S_red, trans_mat2);
163163 }
164164 else // if( epg_new == C2h_Z )
165165 {
166166 S_red = transform_sym_matrix(put_matrix_YZX(), ans0);
167167 trans_mat2 = mprod(m_S_red.second, put_matrix_ZXY());
168- putBuergerReducedMonoclinicP(0, 1, S_red, trans_mat2);
168+ putBuergerReducedMonoclinicP<VCData>(0, 1, S_red, trans_mat2);
169169 }
170170 ans.insert( SymMat43_VCData( S_red, trans_mat2) );
171171 }
@@ -178,19 +178,19 @@
178178 {
179179 S_red = transform_sym_matrix(put_matrix_YXZ(), ans0);
180180 trans_mat2 = mprod(m_S_red.second, put_matrix_YXZ());
181- putBuergerReducedMonoclinicP(1, 2, S_red, trans_mat2);
181+ putBuergerReducedMonoclinicP<VCData>(1, 2, S_red, trans_mat2);
182182 }
183183 else if( epg_new == C2h_Y )
184184 {
185185 S_red = ans0;
186186 trans_mat2 = m_S_red.second;
187- putBuergerReducedMonoclinicP(0, 2, S_red, trans_mat2);
187+ putBuergerReducedMonoclinicP<VCData>(0, 2, S_red, trans_mat2);
188188 }
189189 else // if( epg_new == C2h_Z )
190190 {
191191 S_red = transform_sym_matrix(put_matrix_XZY(), ans0);
192192 trans_mat2 = mprod(m_S_red.second, put_matrix_XZY());
193- putBuergerReducedMonoclinicP(0, 1, S_red, trans_mat2);
193+ putBuergerReducedMonoclinicP<VCData>(0, 1, S_red, trans_mat2);
194194 }
195195 ans.insert( SymMat43_VCData( S_red, trans_mat2) );
196196 }
@@ -203,19 +203,19 @@
203203 {
204204 S_red = transform_sym_matrix(put_matrix_ZXY(), ans0);
205205 trans_mat2 = mprod(m_S_red.second, put_matrix_YZX());
206- putBuergerReducedMonoclinicP(1, 2, S_red, trans_mat2);
206+ putBuergerReducedMonoclinicP<VCData>(1, 2, S_red, trans_mat2);
207207 }
208208 else if( epg_new == C2h_Y )
209209 {
210210 S_red = transform_sym_matrix(put_matrix_XZY(), ans0);
211211 trans_mat2 = mprod(m_S_red.second, put_matrix_XZY());
212- putBuergerReducedMonoclinicP(0, 2, S_red, trans_mat2);
212+ putBuergerReducedMonoclinicP<VCData>(0, 2, S_red, trans_mat2);
213213 }
214214 else // if( epg_new == C2h_Z )
215215 {
216216 S_red = ans0;
217217 trans_mat2 = m_S_red.second;
218- putBuergerReducedMonoclinicP(0, 1, S_red, trans_mat2);
218+ putBuergerReducedMonoclinicP<VCData>(0, 1, S_red, trans_mat2);
219219 }
220220 ans.insert( SymMat43_VCData( S_red, trans_mat2) );
221221 }
--- Conograph/trunk/src/lattice_symmetry/gather_q_of_Ndim_lattice.cc (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/gather_q_of_Ndim_lattice.cc (revision 33)
@@ -174,7 +174,6 @@
174174 }
175175
176176
177-// On input, S_super = TransMat * S * transpose(TransMat).
178177 void gatherQcal(const SymMat<Double>& S_super,
179178 const Double& maxQ,
180179 vector<HKL_Q>& qcal_tray
@@ -196,6 +195,34 @@
196195 }
197196
198197
198+inline VecDat3<Int4> product_hkl(const VecDat3<Int4>& lhs, const NRMat<Int4>& rhs)
199+{
200+ assert( rhs.nrows() >= 3 && rhs.ncols() == 3 );
201+
202+ VecDat3<Int4> ans;
203+ ans[0] = lhs[0]*rhs[0][0] + lhs[1]*rhs[1][0] + lhs[2]*rhs[2][0];
204+ ans[1] = lhs[0]*rhs[0][1] + lhs[1]*rhs[1][1] + lhs[2]*rhs[2][1];
205+ ans[2] = lhs[0]*rhs[0][2] + lhs[1]*rhs[1][2] + lhs[2]*rhs[2][2];
206+ return ans;
207+}
208+
209+
210+// On input, S_super = TransMat * S * transpose(TransMat).
211+void gatherQcal(const SymMat<Double>& S_super,
212+ const Double& maxQ,
213+ const NRMat<Int4>& transform_hkl,
214+ vector<HKL_Q>& qcal_tray
215+ )
216+{
217+ gatherQcal(S_super, maxQ, qcal_tray);
218+
219+ for(vector<HKL_Q>::iterator it=qcal_tray.begin(); it<qcal_tray.end(); it++)
220+ {
221+ it->setHKL( product_hkl(it->HKL(), transform_hkl) );
222+ }
223+}
224+
225+
199226 bool associateQcalWithQobs(
200227 const vector<HKL_Q>::const_iterator& it_begin,
201228 const vector<HKL_Q>::const_iterator& it_end,
--- Conograph/trunk/src/lattice_symmetry/gather_q_of_Ndim_lattice.hh (revision 32)
+++ Conograph/trunk/src/lattice_symmetry/gather_q_of_Ndim_lattice.hh (revision 33)
@@ -38,6 +38,12 @@
3838 vector<HKL_Q>& hkl_q_tray
3939 );
4040
41+void gatherQcal(const SymMat<Double>& S_super,
42+ const Double& maxQ,
43+ const NRMat<Int4>& transform_hkl,
44+ vector<HKL_Q>& hkl_q_tray
45+ );
46+
4147 inline void gatherQcal(const SymMat<Double>& S_super,
4248 const Double& maxQ,
4349 vector<Double>& qcal_tray
--- Conograph/trunk/src/main_indexing.cc (revision 32)
+++ Conograph/trunk/src/main_indexing.cc (revision 33)
@@ -46,6 +46,7 @@
4646 #include "zerror_type/error_mes.hh"
4747 #include "zlog/zlog.hh"
4848 #include "p_out_indexing.hh"
49+#include "qc/p_out_space_group_dtm.hh"
4950 #include "chToqValue.hh"
5051 #include "utility_func/stopx.hh"
5152 #include "utility_func/zstring.hh"
@@ -372,6 +373,10 @@
372373 ostringstream oss;
373374 printSolutions(lattices_same_q, cData, &oss);
374375 ZLOG_WARN( "The unit-cell have very similar computed lines as the following (the solution might not determined uniquely from peak positions):\n" + oss.str() );
376+ if( lattices_same_q.size() > 15 )
377+ {
378+ ZLOG_WARN( "The peak positions of only the first 15 unit-cells are displayed. Output the IGOR file to check all the unit cells." );
379+ }
375380 }
376381
377382 string fname00, fname0;
@@ -386,8 +391,42 @@
386391 printPeakPosition(cData, pData, selected_lattice_tray[n], lattices_same_q, output_igor_file_name);
387392
388393 ZLOG_INFO( "The program has output an IGOR text file : " + output_igor_file_name + "\n\n" );
394+
395+ if( false )
396+ {
397+ const Int4 num_types = putNumberOfTypesOfSystematicAbsences(selected_lattice_tray[n].putLatticeFigureOfMerit().putBravaisType());
398+ const Double MIN_FOM = floor(selected_lattice_tray[n].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff()*100.0)*0.01;
399+
400+ vector<LatticeFigureOfMeritToDisplay> lattices_with_reflection_condition;
401+ for(Int4 i=0; i<num_types; i++)
402+ {
403+ // Copy constructor.
404+ LatticeFigureOfMeritToDisplay lattice_wrc(selected_lattice_tray[n]);
405+
406+ lattice_wrc.setTypeOfSystematicAbsences(i);
407+ lattice_wrc.setDeWolffFigureOfMerit(cData.putNumberOfReflectionsForFigureOfMerit());
408+ if( lattice_wrc.putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff() < MIN_FOM ) continue;
409+
410+ lattice_wrc.resetMillerIndicesInRange(cData.putNumberOfReflectionsForFigureOfMerit());
411+ lattice_wrc.resetMillerIndicesToFit();
412+
413+ lattices_with_reflection_condition.push_back(lattice_wrc);
414+ }
415+ sort( lattices_with_reflection_condition.begin(), lattices_with_reflection_condition.end(), cmpDeWolff );
416+
417+ // print_lattice_array(cData, pData, lattices_with_reflection_condition, fname0 + ".out.xml");
418+
419+ const string output_igor_file_name = fname0 + "_lattice_ref_cond("
420+ + put_bravais_type_name(selected_lattice_tray[n].putLatticeFigureOfMerit().enumBravaisType(), cData.putBaseCenteredAxis()) + ";"
421+ + selected_lattice_tray[n].putLatticeFigureOfMerit().printOptimizedLatticeConstants(cData.putBaseCenteredAxis(), cData.putRhombohedralAxis(), 3) + ";"
422+ + num2str<Double>(selected_lattice_tray[n].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff(), 3) + ").histogramIgor";
423+
424+ printPeakPosition(cData, pData, MIN_FOM,
425+ lattices_with_reflection_condition, output_igor_file_name);
426+ }
389427 }
390428 }
429+
391430 ZLOG_INFO( "Input a lattice number in " + cf.putOutputFileName() + " :" );
392431
393432 } while( true );
--- Conograph/trunk/src/p_out_indexing.cc (revision 32)
+++ Conograph/trunk/src/p_out_indexing.cc (revision 33)
@@ -364,7 +364,7 @@
364364 os->width(label_start);
365365 *os << "" << "<!-- Information on the best " + putLabel(sort_criterion) + " solution for each Bravais type.\n";
366366 os->width(label_start+6);
367- *os << "" << "TNB : total number of solutions of the Bravais types,\n";
367+ *os << "" << "TNB : number of solutions with the Bravais type,\n";
368368 os->width(label_start+6);
369369 *os << "" << putLabel(SCM) << " : de Wolff figure of merit,\n";
370370 os->width(label_start+6);
--- Conograph/trunk/src/qc/gather_qcal2.cc (nonexistent)
+++ Conograph/trunk/src/qc/gather_qcal2.cc (revision 33)
@@ -0,0 +1,28 @@
1+#include "reflection_conditions.hh"
2+#include "gather_qcal2.hh"
3+#include "../lattice_symmetry/gather_q_of_Ndim_lattice.hh"
4+
5+void gatherQcal(const SymMat<Double>& S_super,
6+ const Double& maxQ,
7+ const NRMat<Int4>& transform_hkl,
8+ const BravaisType& brav_type,
9+ const Int4& irc_type,
10+ vector<HKL_Q>& qcal_tray)
11+{
12+ // First call gatherQcal
13+ gatherQcal(S_super, maxQ, transform_hkl, qcal_tray);
14+ if( irc_type < 0 ) return;
15+
16+ // Next, erase entries of qcal_tray, according to ebrav_type and erc_type.
17+ const DataReflectionConditions& data = putInformationOnReflectionConditions(brav_type, irc_type);
18+ Int4 index = 0;
19+ for(vector<HKL_Q>::const_iterator it=qcal_tray.begin(); it!=qcal_tray.end(); it++)
20+ {
21+ const VecDat3<Int4>& hkl = it->HKL();
22+ if( (data.isNotExtinct(hkl[0], hkl[1], hkl[2]) ) )
23+ {
24+ qcal_tray[index++] = *it;
25+ }
26+ }
27+ qcal_tray.erase(qcal_tray.begin()+index, qcal_tray.end());
28+}
--- Conograph/trunk/src/qc/gather_qcal2.hh (nonexistent)
+++ Conograph/trunk/src/qc/gather_qcal2.hh (revision 33)
@@ -0,0 +1,23 @@
1+#ifndef _gather_qcal2_HH_
2+#define _gather_qcal2_HH_
3+// set_additonal_Q.hh
4+
5+#include "../lattice_symmetry/HKL_Q.hh"
6+#include "../utility_data_structure/SymMat.hh"
7+//#include "../lattice_symmetry/gather_q_of_Ndim_lattice.hh"
8+
9+using namespace std;
10+
11+void gatherQcal(const SymMat<Double>& S_super,
12+ const Double& maxQ,
13+ const NRMat<Int4>& transform_hkl,
14+ const BravaisType& ebrav_type,
15+ const Int4& irc_type,
16+ vector<HKL_Q>& qcal_tray);
17+
18+/*(const SymMat<Double>& S_super,
19+ const Double& maxQ, const eTypeOfSystematicAbsence& etype,
20+ vector<HKL_Q>& qcal_tray);*/
21+
22+
23+#endif
--- Conograph/trunk/src/qc/p_out_space_group_dtm.cc (nonexistent)
+++ Conograph/trunk/src/qc/p_out_space_group_dtm.cc (revision 33)
@@ -0,0 +1,226 @@
1+/*
2+ * The MIT License
3+
4+ Conograph (powder auto-indexing program)
5+
6+Copyright (c) <2012> <Ryoko Oishi-Tomiyasu, KEK>
7+
8+Permission is hereby granted, free of charge, to any person obtaining a copy
9+of this software and associated documentation files (the "Software"), to deal
10+in the Software without restriction, including without limitation the rights
11+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+copies of the Software, and to permit persons to whom the Software is
13+furnished to do so, subject to the following conditions:
14+
15+The above copyright notice and this permission notice shall be included in
16+all copies or substantial portions of the Software.
17+
18+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+THE SOFTWARE.
25+ *
26+ */
27+#include <fstream>
28+#include "p_out_space_group_dtm.hh"
29+#include "../ControlParam.hh"
30+#include "../PeakPosData.hh"
31+#include "../lattice_symmetry/LatticeFigureOfMeritToDisplay.hh"
32+
33+
34+void print_lattice_array(const ControlParam& cdata,
35+ const PeakPosData& pdata,
36+ const vector<LatticeFigureOfMeritToDisplay>& arg, const string& fname)
37+{
38+ ofstream ofs(fname.c_str());
39+
40+ ofs.setf(ios::right);
41+ ofs.setf(ios::scientific);
42+ ofs.precision(6);
43+
44+ Int4 label_start=0;
45+
46+ ofs.width(label_start);
47+ ofs << "" << "<ZCodeParameters>\n";
48+ label_start++;
49+
50+ ofs.width(label_start);
51+ ofs << "" << "<ConographOutput>\n";
52+ label_start++;
53+
54+ ofs.width(label_start);
55+ ofs << "" << "<TypeOfReflectionConditions>\n";
56+ //label_start++;
57+
58+ for (size_t j=0; j<arg.size(); j++)
59+ {
60+ ofs.width(label_start+1);
61+ ofs << "" << "<Candidates>\n";
62+ //label_start++;
63+
64+ ofs.width(label_start+2);
65+ ofs << "" << "<SpaceGroups> "+arg[j].putStringTypeOfSystematicAbsences();
66+ ofs << "" << " </SpaceGroups>\n";
67+ //label_start++;
68+
69+ ofs.width(label_start+2);
70+ ofs << "" << "<ReflectionConditions> "+arg[j].putStringReflectionConditions();
71+ ofs << "" << " </ReflectionConditions>\n";
72+ //label_start++;
73+
74+
75+ ofs.width(label_start+2); ofs << "";
76+ ofs << "<FigureOfMeritWolff name=\""+arg[j].putLatticeFigureOfMerit().putFiguresOfMerit().putLabel_FigureOfMeritWolff() << "\"> ";
77+ ofs << arg[j].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff() << " </FigureOfMeritWolff>\n";
78+
79+ arg[j].printIndexingResult(cdata, pdata, label_start+2, &ofs);
80+
81+ ofs.width(label_start+1);
82+ ofs << "" << "</Candidates>\n";
83+ //label_start++;
84+
85+ //ofs << arg[j].putStringTypeOfSystematicAbsences() + " ("
86+ // + arg[j].putLatticeFigureOfMerit().putFiguresOfMerit().putLabel_FigureOfMeritWolff() + "="
87+ //+ num2str(arg[j].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff(), 3) + ")\n";
88+ }
89+ /*ofs << "\n";
90+ label_start--;
91+ ofs.width(label_start);
92+ ofs << "" << "</TypeOfReflectionConditions>\n";*/
93+
94+ ofs.width(label_start);
95+ ofs << "" << "</TypeOfReflectionConditions>\n";
96+
97+ label_start--;
98+ ofs.width(label_start);
99+ ofs << "" << "</ConographOutput>\n";
100+
101+ label_start--;
102+ ofs.width(label_start);
103+ ofs << "" << "</ZCodeParameters>\n";
104+
105+ ofs.close();
106+}
107+
108+
109+void printPeakPosition(
110+ const ControlParam& cdata,
111+ const PeakPosData& pdata, const Double& MIN_FOM,
112+ const vector<LatticeFigureOfMeritToDisplay>& latfit_tray,
113+ const string& fname)
114+{
115+ ofstream ofs(fname.c_str());
116+ ostream * const os = &ofs;
117+
118+ *os << "IGOR\n";
119+ *os << "WAVES/O ";
120+
121+ pdata.printData(os);
122+
123+ if( latfit_tray.empty() ) return;
124+
125+ const Int4 isize = latfit_tray.size();
126+ for (Int4 j=0, j1=1; j<isize; j++, j1++)
127+ {
128+ const LatticeFigureOfMeritToDisplay& latfit = latfit_tray[j];
129+
130+ *os << "WAVES/O dphase_" << j1 << ", xphase_" << j1 << ", yphase_" << j1 << ", ";
131+ *os << "h_" << j1 << ", ";
132+ *os << "k_" << j1 << ", ";
133+ *os << "l_" << j1;
134+ *os << endl;
135+
136+ *os << "BEGIN\n";
137+
138+ const vector<HKL_Q>& cal_hkl_tray = latfit.putCalMillerIndices();
139+ Vec_DP cal_pos_tray;
140+ latfit.putCalculatedPeakPosInRange(cdata, cal_pos_tray);
141+
142+ const Int4 peak_num = cal_hkl_tray.size();
143+
144+ for (Int4 i=0; i<peak_num; i++)
145+ {
146+ os->width(15);
147+ *os << 1.0 / sqrt( cal_hkl_tray[i].Q() );
148+
149+ os->width(15);
150+ if( cal_pos_tray[i] < 0.0 )
151+ {
152+ *os << "NAN";
153+ }
154+ else
155+ {
156+ *os << cal_pos_tray[i];
157+ }
158+ os->width(15);
159+ *os << 0.0;
160+
161+ const VecDat3<Int4>& hkl = cal_hkl_tray[i].HKL();
162+
163+ os->width(5);
164+ *os << hkl[0];
165+ os->width(5);
166+ *os << hkl[1];
167+ os->width(5);
168+ *os << hkl[2];
169+
170+#ifdef DEBUG
171+const DataReflectionConditions& ref_data = latfit.putDataOnReflectionConditions();
172+if( !(ref_data.isNotExtinct(hkl[0], hkl[1], hkl[2])) )
173+{
174+ cout << hkl[0] << " " << hkl[1] << " " << hkl[2] << "\n";
175+ cout << latfit.putStringTypeOfSystematicAbsences() << "\n";
176+ cout << latfit.putStringReflectionConditions() << "\n";
177+ assert(false);
178+}
179+#endif
180+ *os << endl;
181+ }
182+ *os << "END\n\n";
183+ }
184+
185+ VecDat3<Double> length_axis, angle_axis;
186+ const string str_num_ref = num2str( cdata.putNumberOfReflectionsForFigureOfMerit() );
187+
188+ *os << "X Display " << pdata.putYIntColumnTitle() << " vs " << pdata.putXColumnTitle() << endl;
189+ *os << "X ModifyGraph mirror(left)=2\n";
190+ *os << "X ModifyGraph mirror(bottom)=2\n";
191+ *os << "X ModifyGraph rgb(" << pdata.putYIntColumnTitle() << ")=(0,15872,65280)\n";
192+
193+ *os << "X AppendToGraph height vs peakpos\n";
194+ *os << "X ModifyGraph mode(height)=3,marker(height)=17\n";
195+ *os << "X ModifyGraph rgb(height)=(0,65280,65280)\n";
196+
197+ Double offset = 0.0;
198+ const Double offset_gap = pdata.putMaxPeakHeightOfFirst20() * (-0.05);
199+ for (Int4 j=0, j1=1; j<isize; j++, j1++, offset+=offset_gap)
200+ {
201+ if( latfit_tray[j].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff() < MIN_FOM ) break;
202+ *os << "X AppendToGraph yphase_" << j1 << " vs xphase_" << j1 << endl;
203+ *os << "X ModifyGraph offset(yphase_" << j1 << ")={0," << offset << "},mode(yphase_" << j1 << ")=3,marker(yphase_" << j1;
204+ *os << ")=10,msize(yphase_" << j1 << ")=3,mrkThick(yphase_" << j1 << ")=0.6,rgb(yphase_" << j1 << ")=(3,52428,1)" << endl;
205+ }
206+
207+ *os << "X Legend/C/N=text0/J/A=MC \"";
208+ if( latfit_tray[0].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff() >= MIN_FOM )
209+ {
210+ *os << "\\s(yphase_" << 1 << ") "
211+ + latfit_tray[0].putShortStringTypeOfSystematicAbsences() + " ("
212+ + latfit_tray[0].putLatticeFigureOfMerit().putFiguresOfMerit().putLabel_FigureOfMeritWolff() + "="
213+ + num2str(latfit_tray[0].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff(), 3) + ")";
214+ }
215+ for (Int4 j=1, j1=2; j<isize; j++, j1++)
216+ {
217+ if( latfit_tray[j].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff() < MIN_FOM ) break;
218+ *os << "\\r\\s(yphase_" << j1 << ") "
219+ + latfit_tray[j].putShortStringTypeOfSystematicAbsences() + " ("
220+ + latfit_tray[j].putLatticeFigureOfMerit().putFiguresOfMerit().putLabel_FigureOfMeritWolff() + "="
221+ + num2str(latfit_tray[j].putLatticeFigureOfMerit().putFiguresOfMerit().putFigureOfMeritWolff(), 3) + ")";
222+ }
223+ *os << "\"\nX Legend/C/N=text0/J/A=RT/X=0.00/Y=0.00\n";
224+
225+ ofs.close();
226+}
--- Conograph/trunk/src/qc/p_out_space_group_dtm.hh (nonexistent)
+++ Conograph/trunk/src/qc/p_out_space_group_dtm.hh (revision 33)
@@ -0,0 +1,48 @@
1+/*
2+ * The MIT License
3+
4+ Conograph (powder auto-indexing program)
5+
6+Copyright (c) <2012> <Ryoko Oishi-Tomiyasu, KEK>
7+
8+Permission is hereby granted, free of charge, to any person obtaining a copy
9+of this software and associated documentation files (the "Software"), to deal
10+in the Software without restriction, including without limitation the rights
11+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+copies of the Software, and to permit persons to whom the Software is
13+furnished to do so, subject to the following conditions:
14+
15+The above copyright notice and this permission notice shall be included in
16+all copies or substantial portions of the Software.
17+
18+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+THE SOFTWARE.
25+ *
26+ */
27+#ifndef _P_OUT_SPACE_GROUP_DTM_HH_
28+#define _P_OUT_SPACE_GROUP_DTM_HH_
29+
30+#include "../RietveldAnalysisTypes.hh"
31+
32+class ControlParam;
33+class LatticeFigureOfMeritToDisplay;
34+class LatticeFigureOfMerit;
35+class PeakPosData;
36+
37+void print_lattice_array(const ControlParam& cdata,
38+ const PeakPosData& pdata,
39+ const vector<LatticeFigureOfMeritToDisplay>& arg, const string& file_name);
40+
41+// Print an IGOR file.
42+void printPeakPosition(
43+ const ControlParam& cdata,
44+ const PeakPosData& pdata, const Double& MIN_FOM,
45+ const vector<LatticeFigureOfMeritToDisplay>& latfit,
46+ const string& fname);
47+
48+#endif
--- Conograph/trunk/src/qc/reflection_conditions.cc (nonexistent)
+++ Conograph/trunk/src/qc/reflection_conditions.cc (revision 33)
@@ -0,0 +1,1562 @@
1+// reflection_conditions.cc
2+# include <assert.h>
3+# include "reflection_conditions.hh"
4+# include "../bravais_type/BravaisType.hh"
5+# include "../utility_func/zstring.hh"
6+
7+
8+bool is_not_extinct_none(const Int4& h, const Int4& k, const Int4& l)
9+{
10+ return true;
11+}
12+
13+bool is_not_extinct_4h00(const Int4& h, const Int4& k, const Int4& l)
14+{
15+ //h00: h=4n, 0k0: k=4n, 00l: l=4n
16+ if ( h % 4 != 0 && k == 0 && l == 0 ) return false;
17+ if ( h == 0 && k % 4 != 0 && l == 0 ) return false;
18+ if ( h == 0 && k == 0 && l % 4 != 0 ) return false;
19+ return true;
20+}
21+
22+bool is_not_extinct_2h00(const Int4& h, const Int4& k, const Int4& l)
23+{
24+ //h00 : h = 2n, 0k0 : k = 2n, 00l : l = 2n
25+ if ( h % 2 != 0 && k == 0 && l == 0 ) return false;
26+ if ( h == 0 && k % 2 != 0 && l == 0 ) return false;
27+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
28+ return true;
29+}
30+
31+
32+bool is_not_extinct_4h00_40kl(const Int4& h, const Int4& k, const Int4& l)
33+{
34+ //0kl:k+l=4n,h0l:h+l=4n,hk0:h+k=4n,h00:h=4n,0k0:k=4n,00l:l=4n
35+ if ( !is_not_extinct_4h00(h, k, l) ) return false;
36+ if ( h == 0 && (k + l) % 4 != 0 ) return false;
37+ if ( k == 0 && (h + l) % 4 != 0 ) return false;
38+ if ( l == 0 && (h + k) % 4 != 0 ) return false;
39+ return true;
40+}
41+
42+bool is_not_extinct_2h00_20kl(const Int4& h, const Int4& k, const Int4& l)
43+{
44+ //0kl : k+l = 2n, h0l : h+l = 2n, hk0 : h+k = 2n, h00 : h = 2n, 0k0 : k = 2n, 00l : l = 2n
45+ if ( !is_not_extinct_2h00(h, k, l) ) return false;
46+ if ( h == 0 && (k + l) % 2 != 0 ) return false;
47+ if ( k == 0 && (h + l) % 2 != 0 ) return false;
48+ if ( l == 0 && (h + k) % 2 != 0 ) return false;
49+ return true;
50+}
51+
52+bool is_not_extinct_2hhl(const Int4& h, const Int4& k, const Int4& l)
53+{
54+ //hhl:h,l=2n, hkh:h,k=2n, hkk:h,k=2n
55+ if ( k == h && !(h % 2 == 0 && l % 2 == 0 )) return false;
56+ if ( l == h && !(h % 2 == 0 && k % 2 == 0 ) ) return false;
57+ if ( l == k && !(h % 2 == 0 && k % 2 == 0 ) ) return false;
58+ return true;
59+}
60+
61+bool is_not_extinct_20kl(const Int4& h, const Int4& k, const Int4& l)
62+{
63+ //0kl:k,l=2n, h0l:h,l=2n, hk0:h,k=2n
64+ if ( h == 0 && !(k % 2 == 0 && l % 2 == 0 )) return false;
65+ if ( k == 0 && !(h % 2 == 0 && l % 2 == 0 )) return false;
66+ if ( l == 0 && !(h % 2 == 0 && k % 2 == 0 )) return false;
67+ return true;
68+}
69+bool is_not_extinct_40kl_2hhl_4h00(const Int4& h, const Int4& k, const Int4& l)
70+{
71+ //0kl:k+l=4n, h0l:h+l=4n, hk0:h+k=4n, hhl:h,l=2n, hkh:h,k=2n, hkk:h,k=2n, h00:h=4n, 0k0:k=4n, 00l:l=4n
72+ if ( !is_not_extinct_4h00_40kl(h, k, l) ) return false;
73+ if ( !is_not_extinct_2hhl(h, k, l) ) return false;
74+ return true;
75+}
76+bool is_not_extinct_4hhl_4h00(const Int4& h, const Int4& k, const Int4& l)
77+{
78+ //hhl : 2h+l = 4n, hkh : 2h+k = 4n, hkk : h+2k = 4n, h00 : h = 4n, 0k0 : k = 4n, 00l : l = 4n
79+ if ( !is_not_extinct_4h00(h, k, l) ) return false;
80+ if ( k == h && (2*h+l) % 4 !=0 ) return false;
81+ if ( l == h && (2*h+k) % 4 !=0 ) return false;
82+ if ( l == k && (2*k+h) % 4 !=0 ) return false;
83+ return true;
84+}
85+
86+bool is_not_extinct_2hhl_2h00(const Int4& h, const Int4& k, const Int4& l)
87+{
88+ //hhl : l = 2n, hkh : k = 2n, hkk : h = 2n, h00 : h = 2n, 0k0 : k = 2n, 00l : l = 2n
89+ if ( !is_not_extinct_2h00(h, k, l) ) return false;
90+ if ( k == h && (l) % 2 !=0 ) return false;
91+ if ( l == h && (k) % 2 !=0 ) return false;
92+ if ( l == k && (h) % 2 !=0 ) return false;
93+ return true;
94+}
95+bool is_not_extinct_2hhl_2h00_20kl(const Int4& h, const Int4& k, const Int4& l)
96+{
97+ //0kl:k+l=2n, h0l:h+l=2n, hk0:h+k=2n, hhl:l=2n, hkh:k=2n, hkk:h=2n, h00:h=2n, 0k0:k=2n, 00l:l=2n
98+ if ( !is_not_extinct_2h00_20kl(h, k, l) ) return false;
99+ if ( k == h && (l) % 2 !=0 ) return false;
100+ if ( l == h && (k) % 2 !=0 ) return false;
101+ if ( l == k && (h) % 2 !=0 ) return false;
102+ return true;
103+}
104+bool is_not_extinct_2hk0_2h00(const Int4& h, const Int4& k, const Int4& l)
105+{
106+ //hk0 : h = 2n 0kl : k = 2n h0l : l = 2n h00 : h = 2n 0k0 : k = 2n 00l : l = 2n
107+ if ( !is_not_extinct_2h00(h, k, l) ) return false;
108+ if ( l == 0 && (h) % 2 !=0 ) return false;
109+ if ( h == 0 && (k) % 2 !=0 ) return false;
110+ if ( k == 0 && (l) % 2 !=0 ) return false;
111+ return true;
112+}
113+bool is_not_extinct_2hk0mirror_2h00(const Int4& h, const Int4& k, const Int4& l)
114+{
115+ //h00 : h = 2n 0k0 : k = 2n 00l : l = 2n
116+ if ( !is_not_extinct_2h00(h, k, l) ) return false;
117+ //hk0 : k = 2n 0kl : l = 2n h0l : h = 2n
118+ if ( l == 0 && (k) % 2 !=0 ) return false;
119+ if ( h == 0 && (l) % 2 !=0 ) return false;
120+ if ( k == 0 && (h) % 2 !=0 ) return false;
121+ return true;
122+}
123+//Trigonal: tr
124+bool is_not_extinct_tr_3000l(const Int4& h, const Int4& k, const Int4& l)
125+{
126+//000l : l = 3n
127+ if ( h == 0 && k == 0 && (l) % 3 !=0 ) return false;
128+ return true;
129+}
130+bool is_not_extinct_tr_2hmh0l(const Int4& h, const Int4& k, const Int4& l)
131+{
132+//h-h0l : l = 2n h0-hl : l = 2n 0h-hl : l = 2n
133+ if ( k == -h && (l) % 2 !=0 ) return false;
134+ if ( k == 0 && (l) % 2 !=0 ) return false;
135+ if ( h == 0 && (l) % 2 !=0 ) return false;
136+ return true;
137+}
138+//Hexagonal : hex
139+bool is_not_extinct_hex_6000l(const Int4& h, const Int4& k, const Int4& l)
140+{
141+//000l : l = 6n
142+ if ( h == 0 && k == 0 && (l) % 6 !=0 ) return false;
143+ return true;
144+}
145+bool is_not_extinct_hex_3000l(const Int4& h, const Int4& k, const Int4& l)
146+{
147+//000l : l = 3n
148+ if ( h == 0 && k == 0 && (l) % 3 !=0 ) return false;
149+ return true;
150+}
151+bool is_not_extinct_hex_2000l(const Int4& h, const Int4& k, const Int4& l)
152+{
153+//000l : l = 2n
154+ if ( h == 0 && k == 0 && (l) % 2 !=0 ) return false;
155+ return true;
156+}
157+bool is_not_extinct_hex_2hhm2hl_2hmh0l_2000l(const Int4& h, const Int4& k, const Int4& l)
158+{
159+//hh-2hl : l = 2n, h-2hhl : l = 2n, -2hhhl : l = 2n, h-h0l : l = 2n, h0-hl : l = 2n, 0h-hl : l = 2n
160+ if ( k == h && (l) % 2 !=0 ) return false;
161+ if ( k == (-2 * h) && (l) % 2 !=0 ) return false;
162+ if ( h == (-2 * k) && (l) % 2 !=0 ) return false;
163+ if ( k == (-h) && (l) % 2 !=0 ) return false;
164+ if ( k == 0 && (l) % 2 !=0 ) return false;
165+ if ( h == 0 && (l) % 2 !=0 ) return false;
166+ return true;
167+}
168+bool is_not_extinct_hex_2hmh0l(const Int4& h, const Int4& k, const Int4& l)
169+{
170+//h-h0l : l = 2n, h0-hl : l = 2n, 0h-hl : l = 2n
171+ if ( k == (-h) && (l) % 2 !=0 ) return false;
172+ if ( k == 0 && (l) % 2 !=0 ) return false;
173+ if ( h == 0 && (l) % 2 !=0 ) return false;
174+ return true;
175+}
176+bool is_not_extinct_2hhm2hl(const Int4& h, const Int4& k, const Int4& l)
177+{
178+//hh-2hl : l = 2n, h-2hhl : l = 2n, -2hhhl : l = 2n
179+ if ( k == h && (l) % 2 !=0 ) return false;
180+ if ( k == (-2 * h) && (l) % 2 !=0 ) return false;
181+ if ( h == (-2 * k) && (l) % 2 !=0 ) return false;
182+ return true;
183+}
184+//Tetragonal
185+bool is_not_extinct_400l(const Int4& h, const Int4& k, const Int4& l)
186+{
187+ //00l:l=4n
188+ if ( h == 0 && k == 0 && (l) % 4 !=0 ) return false;
189+ return true;
190+}
191+
192+bool is_not_extinct_200l(const Int4& h, const Int4& k, const Int4& l)
193+{
194+ //00l:l=2n
195+ if ( h == 0 && k == 0 && (l) % 2 !=0 ) return false;
196+ return true;
197+}
198+
199+bool is_not_extinct_2hk0_200l(const Int4& h, const Int4& k, const Int4& l)
200+{
201+ //hk0 : h+k = 2n, 00l : l = 2n
202+ if ( !is_not_extinct_200l(h, k, l) ) return false;
203+ if ( l == 0 && (h + k) % 2 != 0) return false;
204+ return true;
205+}
206+
207+bool is_not_extinct_2h00_20k0(const Int4& h, const Int4& k, const Int4& l)
208+{
209+ //h00 : h = 2n, 0k0 : k = 2n
210+ if ( h % 2 != 0 && k == 0 && l == 0 ) return false;
211+ if ( h == 0 && k % 2 != 0 && l == 0 ) return false;
212+ return true;
213+}
214+
215+bool is_not_extinct_400l_2h00_0k0(const Int4& h, const Int4& k, const Int4& l)
216+{
217+ //00l : l = 4n, h00 : h = 2n, 0k0 : k = 2n
218+ if ( !is_not_extinct_2h00_20k0(h, k, l) ) return false;
219+ if ( h == 0 && k == 0 && (l) % 4 !=0 ) return false;
220+ return true;
221+}
222+bool is_not_extinct_t_2h0l(const Int4& h, const Int4& k, const Int4& l)
223+{
224+ //h0l : l = 2n, 0kl : l = 2n
225+ if ( k == 0 && (l) % 2 !=0 ) return false;
226+ if ( h == 0 && (l) % 2 !=0 ) return false;
227+ return true;
228+}
229+bool is_not_extinct_t_2h0l_2h00(const Int4& h, const Int4& k, const Int4& l)
230+{
231+ //h0l : l = 2n, 0kl : l = 2n, h00 : h = 2n, 0k0 : k = 2n
232+ if ( !is_not_extinct_t_2h0l(h, k, l) ) return false;
233+ if ( k == 0 && l == 0 && (h) % 2 !=0 ) return false;
234+ if ( h == 0 && l == 0 && (k) % 2 !=0 ) return false;
235+ return true;
236+}
237+bool is_not_extinct_t_2ph0l_2h00(const Int4& h, const Int4& k, const Int4& l)
238+{
239+ //h0l : h+l = 2n, 0kl : k+l = 2n ,h00 : h = 2n, 0k0 : k = 2n
240+ if ( k == 0 && (h + l) % 2 !=0 ) return false;
241+ if ( h == 0 && (k + l) % 2 !=0 ) return false;
242+ if ( k == 0 && l == 0 && (h) % 2 !=0 ) return false;
243+ if ( h == 0 && l == 0 && (k) % 2 !=0 ) return false;
244+ return true;
245+}
246+
247+bool is_not_extinct_t_2h0l_2hhl(const Int4& h, const Int4& k, const Int4& l)
248+{
249+ //h0l : l = 2n, 0kl : l = 2n, hhl : l = 2
250+ if ( !is_not_extinct_t_2h0l(h, k, l) ) return false;
251+ if ( k == h && (l) % 2 !=0 ) return false;
252+ return true;
253+}
254+bool is_not_extinct_t_2hhl(const Int4& h, const Int4& k, const Int4& l)
255+{
256+ //hhl : l = 2n
257+ if ( k == h && (l) % 2 !=0 ) return false;
258+ return true;
259+}
260+
261+bool is_not_extinct_t_2h00_2h0l_2hhl(const Int4& h, const Int4& k, const Int4& l)
262+{
263+ //h0l : h = 2n, 0kl : k = 2n, hhl : l = 2n, h00 : h = 2n, 0k0 : k = 2n
264+ if ( k == 0 && l == 0 && (h) % 2 !=0 ) return false;
265+ if ( h == 0 && l == 0 && (k) % 2 !=0 ) return false;
266+ if ( k == 0 && (h) % 2 !=0 ) return false;
267+ if ( h == 0 && (k) % 2 !=0 ) return false;
268+ if ( k == h && (l) % 2 !=0 ) return false;
269+ return true;
270+}
271+
272+bool is_not_extinct_t_2h00_2hhl(const Int4& h, const Int4& k, const Int4& l)
273+{
274+ //hhl : l = 2n, h00 : h = 2n, 0k0 : k = 2n
275+ if ( k == 0 && l == 0 && (h) % 2 !=0 ) return false;
276+ if ( h == 0 && l == 0 && (k) % 2 !=0 ) return false;
277+ if ( k == h && (l) % 2 !=0 ) return false;
278+ return true;
279+}
280+bool is_not_extinct_t_2phk0_2hhl(const Int4& h, const Int4& k, const Int4& l)
281+{
282+ //hk0 : h+k = 2n, h0l : h+l = 2n, 0kl : k+l = 2n, hhl : l = 2n
283+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
284+ if ( k == 0 && (h + l) % 2 !=0 ) return false;
285+ if ( h == 0 && (l + k) % 2 !=0 ) return false;
286+ if ( k == h && (l) % 2 !=0 ) return false;
287+ return true;
288+}
289+bool is_not_extinct_t_2phk0_2h0l(const Int4& h, const Int4& k, const Int4& l)
290+{
291+ //hk0 : h+k = 2n, h0l : h = 2n, 0kl : k = 2n
292+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
293+ if ( k == 0 && (h) % 2 !=0 ) return false;
294+ if ( h == 0 && (k) % 2 !=0 ) return false;
295+ return true;
296+}
297+bool is_not_extinct_t_2ph0l_2hhl_2h00(const Int4& h, const Int4& k, const Int4& l)
298+{
299+ //h0l : h+l = 2n, 0kl : k+l = 2n, hhl : l = 2n, h00 : h = 2n, 0k0 : k = 2n
300+ if ( k == 0 && (h + l) % 2 !=0 ) return false;
301+ if ( h == 0 && (l + k) % 2 !=0 ) return false;
302+ if ( k == h && (l) % 2 !=0 ) return false;
303+ if ( k == 0 && l == 0 && (h) % 2 !=0 ) return false;
304+ if ( h == 0 && l == 0 && (k) % 2 !=0 ) return false;
305+ return true;
306+}
307+bool is_not_extinct_t_2phk0(const Int4& h, const Int4& k, const Int4& l)
308+{
309+ //hk0 : h+k = 2n
310+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
311+ return true;
312+}
313+bool is_not_extinct_t_2phk0_2h0l_2hll(const Int4& h, const Int4& k, const Int4& l)
314+{
315+ //hk0 : h+k = 2n, h0l : l = 2n, 0kl : l = 2n, hhl : l = 2n
316+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
317+ if ( k == 0 && (l ) % 2 !=0 ) return false;
318+ if ( h == 0 && (l ) % 2 !=0 ) return false;
319+ if ( k == h && (l) % 2 !=0 ) return false;
320+ return true;
321+}
322+bool is_not_extinct_t_2phk0_2hll(const Int4& h, const Int4& k, const Int4& l)
323+{
324+ //hk0 : h+k = 2n, hhl : l = 2n
325+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
326+ if ( k == h && (l) % 2 !=0 ) return false;
327+ return true;
328+}
329+bool is_not_extinct_t_23phk0(const Int4& h, const Int4& k, const Int4& l)
330+{
331+ //hk0 : h+k = 2n, h0l : h+l = 2n, 0kl : k+l = 2n
332+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
333+ if ( k == 0 && (h + l) % 2 !=0 ) return false;
334+ if ( h == 0 && (l + k) % 2 !=0 ) return false;
335+ return true;
336+}
337+bool is_not_extinct_t_21phk0_2hhl(const Int4& h, const Int4& k, const Int4& l)
338+{
339+ //hk0 : h+k = 2n, hhl : l = 2n
340+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
341+ if ( k == h && (l) % 2 !=0 ) return false;
342+ return true;
343+}
344+
345+bool is_not_extinct_t_21phk0_2h0l(const Int4& h, const Int4& k, const Int4& l)
346+{
347+ //hk0 : h+k = 2n, h0l : l = 2n, 0kl : l = 2n
348+ if ( l == 0 && (h + k) % 2 !=0 ) return false;
349+ if ( k == 0 && (l) % 2 !=0 ) return false;
350+ if ( h == 0 && (l) % 2 !=0 ) return false;
351+ return true;
352+}
353+bool is_not_extinct_t_21hk0_200l(const Int4& h, const Int4& k, const Int4& l)
354+{
355+ //hk0 : h,k = 2n, 00l : l = 4n
356+ if ( l == 0 && !(h % 2 == 0 && (k) % 2 == 0 ) ) return false;
357+ if ( k == 0 && h == 0 && (l) % 4 !=0 ) return false;
358+ return true;
359+}
360+bool is_not_extinct_t_2ah0l(const Int4& h, const Int4& k, const Int4& l)
361+{
362+ //h0l : h, l = 2n, 0kl : k, l = 2n
363+ if ( k == 0 && !(h % 2 == 0 && (l) % 2 == 0 ) ) return false;
364+ if ( h == 0 && !(k % 2 == 0 && (l) % 2 == 0 ) ) return false;
365+ return true;
366+}
367+bool is_not_extinct_t_4phhl_2hmh0(const Int4& h, const Int4& k, const Int4& l)
368+{
369+ //hhl : 2h+l = 4n, h-h0 : h = 2n
370+ if ( k == h && (2 * h + l) % 4 !=0 ) return false;
371+ if ( l == 0 && k == -h && h % 2 !=0 ) return false;
372+ return true;
373+}
374+bool is_not_extinct_t_4phhl_2hmh0_2ah0l(const Int4& h, const Int4& k, const Int4& l)
375+{
376+ //hhl : 2h+l = 4n, h-h0 : h = 2n, h0l : h, l = 2n, 0kl : k, l = 2n
377+ if ( k == h && (2 * h + l) % 4 !=0 ) return false;
378+ if ( l == 0 && k == -h && h % 2 !=0 ) return false;
379+ if ( k == 0 && !(h % 2 == 0 && (l) % 2 == 0 ) ) return false;
380+ if ( h == 0 && !(k % 2 == 0 && (l) % 2 == 0 ) ) return false;
381+ return true;
382+}
383+bool is_not_extinct_t_2hk0_4phhl(const Int4& h, const Int4& k, const Int4& l)
384+{
385+ //hk0 : h,k = 2n, hhl : 2h+l = 4n
386+ if ( l == 0 && !(h % 2 == 0 && (k) % 2 == 0 ) ) return false;
387+ if ( k == h && (2 * h + l) % 4 !=0 ) return false;
388+ return true;
389+}
390+bool is_not_extinct_t_23ahk0_4phhl(const Int4& h, const Int4& k, const Int4& l)
391+{
392+ //hk0 : h,k = 2n, h0l : h, l = 2n, 0kl : k, l = 2n, hhl : 2h+l = 4n
393+ if ( l == 0 && !(h % 2 == 0 && (k) % 2 == 0 ) ) return false;
394+ if ( k == 0 && !(h % 2 == 0 && (l) % 2 == 0 ) ) return false;
395+ if ( h == 0 && !(l % 2 == 0 && (k) % 2 == 0 ) ) return false;
396+ if ( k == h && (2 * h + l) % 4 !=0 ) return false;
397+ return true;
398+}
399+bool is_not_extinct_rhom_2hhl(const Int4& h, const Int4& k, const Int4& l)
400+{
401+ //hhl : l = 2n, hkh: k = 2n, hkk : h = 2n
402+ if ( k == h && l % 2 != 0 ) return false;
403+ if ( l == h && k % 2 != 0 ) return false;
404+ if ( l == k && h % 2 != 0 ) return false;
405+ return true;
406+}
407+
408+bool is_not_extinct_rhom_hex_2hmh0l(const Int4& h, const Int4& k, const Int4& l)
409+{
410+ // h-h0l : l = 2n, h0-hl : l = 2n, 0h-hl : l = 2n
411+ if ( k == - h && l % 2 != 0 ) return false;
412+ if ( k == 0 && l % 2 != 0 ) return false;
413+ if ( h == 0 && l % 2 != 0 ) return false;
414+ return true;
415+}
416+
417+//Monoclinic P
418+bool is_not_extinct_mono_2h00(const Int4& h, const Int4& k, const Int4& l)
419+{
420+ // h00:h=2n
421+ if ( k == 0 && l == 0 && h % 2 != 0 ) return false;
422+ return true;
423+}
424+bool is_not_extinct_mono_20k0(const Int4& h, const Int4& k, const Int4& l)
425+{
426+ // 0k0:k=2n
427+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
428+ return true;
429+}
430+bool is_not_extinct_mono_200l(const Int4& h, const Int4& k, const Int4& l)
431+{
432+ // 00l:l=2n
433+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
434+ return true;
435+}
436+bool is_not_extinct_mono_20kl(const Int4& h, const Int4& k, const Int4& l)
437+{
438+ // 0kl:k=2n
439+ if ( h == 0 && k % 2 != 0 ) return false;
440+ return true;
441+}
442+bool is_not_extinct_mono_2h0l(const Int4& h, const Int4& k, const Int4& l)
443+{
444+ // h0l:l=2n
445+ if ( k == 0 && l % 2 != 0 ) return false;
446+ return true;
447+}
448+bool is_not_extinct_mono_2hk0(const Int4& h, const Int4& k, const Int4& l)
449+{
450+ // hk0:h=2n
451+ if ( l == 0 && h % 2 != 0 ) return false;
452+ return true;
453+}
454+bool is_not_extinct_mono_2l0kl(const Int4& h, const Int4& k, const Int4& l)
455+{
456+ // 0kl:l=2n
457+ if ( h == 0 && l % 2 != 0 ) return false;
458+ return true;
459+}
460+bool is_not_extinct_mono_2hh0l(const Int4& h, const Int4& k, const Int4& l)
461+{
462+ // h0l:h=2n
463+ if ( k == 0 && h % 2 != 0 ) return false;
464+ return true;
465+}
466+bool is_not_extinct_mono_2khk0(const Int4& h, const Int4& k, const Int4& l)
467+{
468+ // hk0:k=2n
469+ if ( l == 0 && k % 2 != 0 ) return false;
470+ return true;
471+}
472+bool is_not_extinct_mono_2hk0_200l(const Int4& h, const Int4& k, const Int4& l)
473+{
474+ // hk0:h=2n, 00l : l = 2n
475+ if ( l == 0 && h % 2 != 0 ) return false;
476+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
477+ return true;
478+}
479+bool is_not_extinct_mono_2phk0_200l(const Int4& h, const Int4& k, const Int4& l)
480+{
481+ // hk0:h+k=2n, 00l : l = 2n
482+ if ( l == 0 && ( h + k ) % 2 != 0 ) return false;
483+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
484+ return true;
485+}
486+bool is_not_extinct_mono_2dhk0_200l(const Int4& h, const Int4& k, const Int4& l)
487+{
488+ // hk0:k=2n, 00l : l = 2n
489+ if ( l == 0 && k % 2 != 0 ) return false;
490+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
491+ return true;
492+}
493+bool is_not_extinct_mono_2p0kl(const Int4& h, const Int4& k, const Int4& l)
494+{
495+ // 0kl:k+l=2n
496+ if ( h == 0 && (k + l) % 2 != 0 ) return false;
497+ return true;
498+}
499+bool is_not_extinct_mono_2ph0l(const Int4& h, const Int4& k, const Int4& l)
500+{
501+ // h0l:h+l=2n
502+ if ( k == 0 && ( h + l ) % 2 != 0 ) return false;
503+ return true;
504+}
505+bool is_not_extinct_mono_2phk0(const Int4& h, const Int4& k, const Int4& l)
506+{
507+ // hk0:h+k=2n
508+ if ( l == 0 && ( h + k ) % 2 != 0 ) return false;
509+ return true;
510+}
511+bool is_not_extinct_mono_2h0l_20k0(const Int4& h, const Int4& k, const Int4& l)
512+{
513+ //h0l : l = 2n, 0k0 : k = 2n
514+ if ( k == 0 && l % 2 != 0 ) return false;
515+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
516+ return true;
517+}
518+bool is_not_extinct_mono_2ph0l_20k0(const Int4& h, const Int4& k, const Int4& l)
519+{
520+ //h0l : h + l = 2n, 0k0 : k = 2n
521+ if ( k == 0 && ( h +l ) % 2 != 0 ) return false;
522+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
523+ return true;
524+}
525+bool is_not_extinct_mono_2dh0l_20k0(const Int4& h, const Int4& k, const Int4& l)
526+{
527+ //h0l : h = 2n, 0k0 : k = 2n
528+ if ( k == 0 && h % 2 != 0 ) return false;
529+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
530+ return true;
531+}
532+bool is_not_extinct_mono_20kl_2h00(const Int4& h, const Int4& k, const Int4& l)
533+{
534+ //0kl : k = 2n, h00 : h = 2n
535+ if ( h == 0 && k % 2 != 0 ) return false;
536+ if ( k == 0 && l == 0 && h % 2 != 0 ) return false;
537+ return true;
538+}
539+bool is_not_extinct_mono_2d0kl_2h00(const Int4& h, const Int4& k, const Int4& l)
540+{
541+ //0kl : l = 2n, h00 : h = 2n
542+ if ( h == 0 && l % 2 != 0 ) return false;
543+ if ( k == 0 && l == 0 && h % 2 != 0 ) return false;
544+ return true;
545+}
546+bool is_not_extinct_mono_2p0kl_20k0(const Int4& h, const Int4& k, const Int4& l)
547+{
548+ //0kl : k + l = 2n, 0k0 : k = 2n
549+ if ( h == 0 && ( k + l ) % 2 != 0 ) return false;
550+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
551+ return true;
552+}
553+//Orthorhombic
554+bool is_not_extinct_orth_2dh00(const Int4& h, const Int4& k, const Int4& l)
555+{
556+//h00 : h = 2n, 0k0 : k = 2n, 00l : l = 2n
557+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
558+ if ( k == 0 && l == 0 && h % 2 != 0 ) return false;
559+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
560+ return true;
561+}
562+bool is_not_extinct_orth_23phk0(const Int4& h, const Int4& k, const Int4& l)
563+{
564+ //hk0:h+k=2n,h0l:h+l=2n,0kl:k+l=2n
565+ if ( l == 0 && ( h + k ) % 2 != 0 ) return false;
566+ if ( k == 0 && ( h + l ) % 2 != 0 ) return false;
567+ if ( h == 0 && ( k + l ) % 2 != 0 ) return false;
568+ return true;
569+}
570+bool is_not_extinct_orth_2d30kl(const Int4& h, const Int4& k, const Int4& l)
571+{
572+//0kl : k = 2n,縲� h0l : l = 2n, 縲� hk0 : h = 2n
573+ if ( h == 0 && k % 2 != 0 ) return false;
574+ if ( k == 0 && l % 2 != 0 ) return false;
575+ if ( l == 0 && h % 2 != 0 ) return false;
576+ return true;
577+}
578+bool standard_function_for_abc(const Int4& h, const Int4& k, const Int4& l)
579+{
580+ //0kl:l = 2n, h0l:l=2n, hk0:h+k=2n
581+ if ( h == 0 && l % 2 != 0 ) return false;
582+ if ( k == 0 && l % 2 != 0 ) return false;
583+ if ( l == 0 && ( h + k ) % 2 != 0 ) return false;
584+ return true;
585+}
586+bool standard_function2_for_abc(const Int4& h, const Int4& k, const Int4& l)
587+{
588+ //h0l:l=2n
589+ if ( k == 0 && l % 2 != 0 ) return false;
590+ return true;
591+}
592+bool standard_function_for_abc_200l(const Int4& h, const Int4& k, const Int4& l)
593+{
594+ //00l:l = 2n
595+ if ( h == 0 && k == 0 && l % 2 != 0 ) return false;
596+ return true;
597+}
598+bool standard_function_for_abc_22h00(const Int4& h, const Int4& k, const Int4& l)
599+{
600+ // h00 : k = 2n, 0k0 : k = 2n.
601+ if ( h == 0 && l == 0 && k % 2 != 0 ) return false;
602+ if ( k == 0 && l == 0 && h % 2 != 0 ) return false;
603+ return true;
604+}
605+bool standard_function_for_abc_220kl(const Int4& h, const Int4& k, const Int4& l)
606+{
607+ //0kl : l = 2n, h0l : l = 2n
608+ if ( h == 0 && l % 2 != 0 ) return false;
609+ if ( k == 0 && l % 2 != 0 ) return false;
610+ return true;
611+}
612+bool standard_function_for_abc_2d20kl(const Int4& h, const Int4& k, const Int4& l)
613+{
614+ //0kl : k = 2n, h0l : h = 2n
615+ if ( h == 0 && k % 2 != 0 ) return false;
616+ if ( k == 0 && h % 2 != 0 ) return false;
617+ return true;
618+}
619+bool standard_function_for_abc_2p20kl(const Int4& h, const Int4& k, const Int4& l)
620+{
621+ //0kl : k+l = 2n h0l : h+l = 2n
622+ if ( h == 0 && ( k + l ) % 2 != 0 ) return false;
623+ if ( k == 0 && ( h + l ) % 2 != 0 ) return false;
624+ return true;
625+}
626+bool standard_function_for_abc_220kl_2phk0(const Int4& h, const Int4& k, const Int4& l)
627+{
628+ //0kl : k = 2n, 縲�縲� h0l : h = 2n, 縲�縲� hk0 : h+k = 2n
629+ if ( h == 0 && k % 2 != 0 ) return false;
630+ if ( k == 0 && h % 2 != 0 ) return false;
631+ if ( l == 0 && ( h + k ) % 2 != 0 ) return false;
632+ return true;
633+}
634+bool standard_function2_for_abc_22d0kl(const Int4& h, const Int4& k, const Int4& l)
635+{
636+ //0kl : l = 2n, h0l : h = 2n
637+ if ( h == 0 && l % 2 != 0 ) return false;
638+ if ( k == 0 && h % 2 != 0 ) return false;
639+ return true;
640+}
641+bool standard_function2_for_abc_22dd0kl(const Int4& h, const Int4& k, const Int4& l)
642+{
643+ //0kl : k = 2n, h0l : l = 2n
644+ if ( h == 0 && k % 2 != 0 ) return false;
645+ if ( k == 0 && l % 2 != 0 ) return false;
646+ return true;
647+}
648+bool standard_function2_for_abc_2p0kl_2h0l(const Int4& h, const Int4& k, const Int4& l)
649+{
650+ //0kl: k+l=2n , h0l: l=2n
651+ if ( h == 0 && ( k + l ) % 2 != 0 ) return false;
652+ if ( k == 0 && l % 2 != 0 ) return false;
653+ return true;
654+}
655+bool standard_function2_for_abc_2ph0l_2hk0(const Int4& h, const Int4& k, const Int4& l)
656+{
657+ //h0l: h+l=2n , hk0: h=2n
658+ if ( k == 0 && ( h + l ) % 2 != 0 ) return false;
659+ if ( l == 0 && h % 2 != 0 ) return false;
660+ return true;
661+}
662+bool standard_function2_for_abc_2ph0l(const Int4& h, const Int4& k, const Int4& l)
663+{
664+ //h0l: h+l=2n
665+ if ( k == 0 && ( h + l ) % 2 != 0 ) return false;
666+ return true;
667+}
668+bool standard_function2_for_abc_2p0kl_2dh0l(const Int4& h, const Int4& k, const Int4& l)
669+{
670+ //0kl : k+l = 2n, h0l : h = 2n
671+ if ( h == 0 && ( k + l ) % 2 != 0 ) return false;
672+ if ( k == 0 && h % 2 != 0 ) return false;
673+ return true;
674+}
675+bool standard_function2_for_abc_22p0kl_2hk0(const Int4& h, const Int4& k, const Int4& l)
676+{
677+ //0kl : k+l = 2n ,縲�縲� h0l : h+l = 2n, hk0 : h = 2n
678+ if ( h == 0 && ( k + l ) % 2 != 0 ) return false;
679+ if ( k == 0 && ( h + l ) % 2 != 0 ) return false;
680+ if ( l == 0 && h % 2 != 0 ) return false;
681+ return true;
682+}
683+bool standard_function2_for_abc_230kl(const Int4& h, const Int4& k, const Int4& l)
684+{
685+ //0kl : l = 2, 縲�縲� h0l : l = 2n , 縲�hk0 : h = 2n
686+ if ( h == 0 && l % 2 != 0 ) return false;
687+ if ( k == 0 && l % 2 != 0 ) return false;
688+ if ( l == 0 && h % 2 != 0 ) return false;
689+ return true;
690+}
691+bool standard_function2_for_abc_220kl_2phk0(const Int4& h, const Int4& k, const Int4& l)
692+{
693+ //0kl : k = 2n, 縲�h0l : l = 2n, 縲� hk0 : h+k = 2n
694+ if ( h == 0 && k % 2 != 0 ) return false;
695+ if ( k == 0 && l % 2 != 0 ) return false;
696+ if ( l == 0 && ( h + k ) % 2 != 0 ) return false;
697+ return true;
698+}
699+bool standard_function_for_abc_210kl(const Int4& h, const Int4& k, const Int4& l)
700+{
701+ //0kl : l = 2n
702+ if ( h == 0 && l % 2 != 0 ) return false;
703+ return true;
704+}
705+bool standard_function_for_abc_2ahk0(const Int4& h, const Int4& k, const Int4& l)
706+{
707+ //hk0 : h,k = 2n
708+ if ( l == 0 && !( h % 2 == 0 && k % 2 == 0 ) ) return false;
709+ return true;
710+}
711+bool standard_function_for_abc_2ahk0_20kl(const Int4& h, const Int4& k, const Int4& l)
712+{
713+ //hk0 : h, k = 2n, 0kl : l = 2n
714+ if ( l == 0 && !( h % 2 == 0 && k % 2 == 0 ) ) return false;
715+ if ( h == 0 && l % 2 != 0 ) return false;
716+ return true;
717+}
718+bool standard_function_for_abc_2ahk0_2h0l(const Int4& h, const Int4& k, const Int4& l)
719+{
720+ //hk0 : h, k = 2n, h0l : l = 2n
721+ if ( l == 0 && !( h % 2 == 0 && k % 2 == 0 ) ) return false;
722+ if ( k == 0 && l % 2 != 0 ) return false;
723+ return true;
724+}
725+bool standard_function_for_abc_220kl_2ahk0(const Int4& h, const Int4& k, const Int4& l)
726+{
727+ //0kl : l = 2n, 縲� h0l : l = 2n, hk0 : h,k = 2n
728+ if ( h == 0 && l % 2 != 0 ) return false;
729+ if ( k == 0 && l % 2 != 0 ) return false;
730+ if ( l == 0 && !( h % 2 == 0 && k % 2 == 0 ) ) return false;
731+ return true;
732+}
733+bool standard_function_for_abc_42p0kl(const Int4& h, const Int4& k, const Int4& l)
734+{
735+ //0kl : k+l = 4n, h0l : h+l = 4n
736+ if ( h == 0 && ( k+l) % 4 != 0 ) return false;
737+ if ( k == 0 && ( h+l) % 4 != 0 ) return false;
738+ return true;
739+}
740+bool standard_function_for_abc_43p0kl(const Int4& h, const Int4& k, const Int4& l)
741+{
742+ //0kl : k+l = 4n, h0l : h+l = 4n, hk0 : h+k = 4n
743+ if ( h == 0 && ( k+l) % 4 != 0 ) return false;
744+ if ( k == 0 && ( h+l) % 4 != 0 ) return false;
745+ if ( l == 0 && ( h+k) % 4 != 0 ) return false;
746+ return true;
747+}
748+bool standard_function_for_abc_2a0kl(const Int4& h, const Int4& k, const Int4& l)
749+{
750+ //0kl : k,l = 2n h0l : h,l = 2n
751+ if ( h == 0 && !( k % 2 == 0 && l % 2 == 0 ) ) return false;
752+ if ( k == 0 && !( h % 2 == 0 && l % 2 == 0 ) ) return false;
753+ return true;
754+}
755+bool standard_function_for_abc_2ah0l(const Int4& h, const Int4& k, const Int4& l)
756+{
757+ //h0l : h,l = 2n
758+ if ( k == 0 && !( h % 2 == 0 && l % 2 == 0 ) ) return false;
759+ return true;
760+}
761+bool standard_function_for_abc_23a0kl(const Int4& h, const Int4& k, const Int4& l)
762+{
763+ //0kl : k, l = 2n h0l : h, l = 2n hk0 : h,k = 2n
764+ if ( h == 0 && !( k % 2 == 0 && l % 2 == 0 ) ) return false;
765+ if ( k == 0 && !( h % 2 == 0 && l % 2 == 0 ) ) return false;
766+ if ( l == 0 && !( h % 2 == 0 && k % 2 == 0 ) ) return false;
767+ return true;
768+}
769+bool special_reflection_conditions_3h_4phkl(const Int4& h, const Int4& k, const Int4& l)
770+{
771+ // (A,face) hkl : h=2n+1 or h+k+l=4n
772+ if( (h+k+l-2) % 4 == 0 ) return false;
773+ return true;
774+}
775+bool special_reflection_conditions_3l_4p2hl(const Int4& h, const Int4& k, const Int4& l)
776+{
777+ // (A,body) hkl : l=2n+1 or 2h+l=4n
778+ if( (2*h+l-2) % 4 == 0 ) return false;
779+ return true;
780+}
781+bool special_reflection_conditions_3h_6ahkl_4ahkl(const Int4& h, const Int4& k, const Int4& l)
782+{
783+ // (B,face) hkl:h=2n+1 or h,k,l=4n+2 or h,k,l=4n
784+ if( h % 2 == 0 && !( (h - k) % 4 == 0 && (k - l) % 4 == 0 ) ) return false;
785+ return true;
786+}
787+bool special_reflection_conditions_3l_2ahk_4phkl(const Int4& h, const Int4& k, const Int4& l)
788+{
789+ // (B,body) hkl : l=2n+1or h,k=2n, h+k+l=4n
790+ if( l % 2 == 0 )
791+ {
792+ if( h % 2 != 0 ) return false;
793+ if( (h + k + l) % 4 != 0 ) return false;
794+ }
795+ return true;
796+}
797+bool special_reflection_conditions_3l_2h(const Int4& h, const Int4& k, const Int4& l)
798+{
799+ // (C) hkl : l=2n+1 or h=2n
800+ if( h % 2 != 0 && l % 2 == 0 ) return false;
801+ return true;
802+}
803+bool special_reflection_conditions_2l_3shk_3s2hk(const Int4& h, const Int4& k, const Int4& l)
804+{
805+ // (D) hkil : l=2n or h-k=3n+1 or h-k=3n+2
806+ if( (h - k) % 3 == 0 && l % 2 != 0 ) return false;
807+ return true;
808+}
809+bool special_reflection_conditions_oddh_oddk_3lhkil(const Int4& h, const Int4& k, const Int4& l)
810+{
811+ // (E) hkil : h=2n+1 or k=2n+1 or l=3n
812+ if( h % 2 == 0 && k % 2 == 0 && l % 3 != 0 ) return false;
813+ return true;
814+}
815+bool special_reflection_conditions_2h_2k_2hhl_2hkh_2hkk(const Int4& h, const Int4& k, const Int4& l)
816+{
817+ // (F) hkl: h=2n or k=2n or l=2n, hhl: l=2n, hkh: k=2n, hkk: h=2n
818+ if( k == l && h % 2 != 0 ) return false;
819+ if( h == l && k % 2 != 0 ) return false;
820+ if( h == k && l % 2 != 0 ) return false;
821+ if( h % 2 != 0 && k % 2 != 0 && l % 2 != 0 ) return false;
822+ return true;
823+}
824+bool special_reflection_conditions_2h_2k_2lhkl(const Int4& h, const Int4& k, const Int4& l)
825+{
826+ // (F) hkl: h=2n or k=2n or l=2n
827+ if( h % 2 != 0 && k % 2 != 0 && l % 2 != 0 ) return false;
828+ return true;
829+}
830+bool special_reflection_conditions_oddh_oddk_oddl_4phkl(const Int4& h, const Int4& k, const Int4& l)
831+{
832+ // (F) hkl: h=2n+1 or k=2n+1 or l=2n+1 or h+k+l=4n
833+ if( h % 2 == 0 && k % 2 == 0 && l % 2 == 0 && (h+k+l) % 4 != 0) return false;
834+ return true;
835+}
836+bool special_reflection_conditions_2phkl_oddhkl_4hkl_6hkl(const Int4& h, const Int4& k, const Int4& l)
837+{
838+ // (G) hkl:h+k+l=2n or either one of h, k, l is 2n+1, 4n and 4n+2
839+ if( (h+k+l) % 2 != 0 )
840+ {
841+ if( h % 4 != 0 && k % 4 != 0 && l % 4 != 0 ) return false;
842+ if( (h-2) % 4 != 0 && (k-2) % 4 != 0 && (l-2) % 4 != 0 ) return false;
843+ }
844+ return true;
845+}
846+bool special_reflection_conditions_22hkl_2oddhkl_4k_6l_6ahkl_4hkl(const Int4& h, const Int4& k, const Int4& l)
847+{
848+ // (H) hkl: two of h,k,l are odd or either one of h,k,l is 2n+1,k=4n and l=4n+2 or h,k,l=4n+2 or h,k,l=4n
849+ const Int4 num_odd = (abs(h) % 2) + (abs(k) % 2) + (abs(l) % 2);
850+ if( num_odd < 1 )
851+ {
852+ if( (h - k) % 4 != 0 || (k - l) % 4 != 0 ) return false;
853+ }
854+ else if( num_odd < 2 )
855+ {
856+ if( h % 4 != 0 && k % 4 != 0 && l % 4 != 0 ) return false;
857+ if( (h - 2) % 4 != 0 && (k - 2) % 4 != 0 && (l - 2) % 4 != 0 ) return false;
858+ }
859+ return true;
860+}
861+bool special_reflection_conditions_oddh_6ahkl_4ahkl(const Int4& h, const Int4& k, const Int4& l)
862+{
863+ // (I) hkl:h=2n+1 or h,k,l=4n+2 or h,k,l=4n
864+ if( h % 2 == 0 && k % 2 == 0 && l % 2 == 0 )
865+ {
866+ if( (h - k) % 4 != 0 || (k - l) % 4 != 0 ) return false;
867+ }
868+ return true;
869+}
870+bool special_reflection_conditions_2ahkl_4phkl_8h_12k_6phkl_oddahk_9ahk_4l_11ahk_4l_9h_7k_4l_11h(const Int4& h, const Int4& k, const Int4& l)
871+{
872+ // (J) hkl:h,k,l=2n,h+k+l=4n or h=8n, k=8n+4 and h+k+l=4n+2 or h,k=2n+1, l=4n+2 or h,k=8n+1, l=4n or h,k=8n+3,
873+ //l=4n or h=8n+1, k=8n-1, l=4n or h=8n+3, k=8n-3, l=4n
874+ if( h % 2 == 0 )
875+ {
876+ if( k % 2 == 0 ) // All even
877+ {
878+ if( (h + k + l) % 4 != 0 )
879+ { // h+k+l = 4n+2
880+ if( h % 8 != 0 && k % 8 != 0 && l % 8 != 0 ) return false;
881+ if( (h - 4) % 8 != 0 && (k - 4) % 8 != 0 && (l - 4) % 8 != 0 ) return false;
882+ }
883+ }
884+ else // k, l are odd
885+ {
886+ if( h % 4 == 0 && (k + l) % 8 != 0 && !( (k - l) % 8 == 0 && abs(k) % 8 < 4 ) ) return false;
887+ }
888+ }
889+ else if( k % 2 == 0 ) // h, l are odd
890+ {
891+ if( k % 4 == 0 && (h + l) % 8 != 0 && !( (h - l) % 8 == 0 && abs(h) % 8 < 4 ) ) return false;
892+ }
893+ else // h, k are odd
894+ {
895+ if( l % 4 == 0 && (h + k) % 8 != 0 && !( (h - k) % 8 == 0 && abs(h) % 8 < 4 ) ) return false;
896+ }
897+
898+ return true;
899+}
900+bool special_reflection_conditions_2hk_4phkl_8h_12k_6phkl_oddahk_6l_9h_11k_4l_15h_13k_9h_14k_4l_15h_11k_4l(const Int4& h, const Int4& k, const Int4& l)
901+{
902+ // (J2) hkl:h,k=2n,h+k+l=4n or h=8n, k=8n+4 and h+k+l=4n+2 or h,k=2n+1, l=4n+2 or h=8n+1, k=8n+3, l=4n
903+ //or h=8n+7, k=8n+5, l=4n or h=8n+1, k=8n+5, l=4n or h=8n+7, k=8n+3, l=4n
904+ if( h % 2 == 0 )
905+ {
906+ if( k % 2 == 0 ) // All even
907+ {
908+ if( (h + k + l) % 4 != 0 )
909+ { // h+k+l = 4n+2
910+ if( h % 8 != 0 && k % 8 != 0 && l % 8 != 0 ) return false;
911+ if( (h - 4) % 8 != 0 && (k - 4) % 8 != 0 && (l - 4) % 8 != 0 ) return false;
912+ }
913+ }
914+ else // k, l are odd
915+ {
916+ if( h % 4 == 0 && (k - l - 4) % 8 != 0 && (k + l - 4) % 8 == 0 ) return false;
917+ }
918+ }
919+ else if( k % 2 == 0 ) // h, l are odd
920+ {
921+ if( k % 4 == 0 && (h - l - 4) % 8 != 0 && (h + l - 4) % 8 != 0 ) return false;
922+ }
923+ else // h, k are odd
924+ {
925+ if( l % 4 == 0 && (h - k - 4) % 8 != 0 && (h + k - 4) % 8 != 0 ) return false;
926+ }
927+ return true;
928+}
929+bool special_reflection_conditions_oddh_4h_oddh_4phkl_hhl(const Int4& h, const Int4& k, const Int4& l)
930+{
931+ // (K) hkl: h=2n+1 or h=4n, hhl: h=2n+1 or h+k+l=4n
932+ if( h % 2 == 0 && k % 2 == 0 && l % 2 == 0 )
933+ {
934+ if( ( h == k || k == l || h == l ) && (h + k + l) % 4 != 0 ) return false;
935+ if( (h - 2) % 4 == 0 && (k - 2) % 4 == 0 && (l - 2) % 4 == 0 ) return false;
936+ }
937+ return true;
938+}
939+bool special_reflection_conditions_oddh_oddk_oddl_4hkl(const Int4& h, const Int4& k, const Int4& l)
940+{
941+ // (K) hkl: h=2n+1 or k=2n+1 or l=2n+1 or h=4n or k=4n or l=4n
942+ if( (h - 2) % 4 == 0 && (k - 2) % 4 == 0 && (l - 2) % 4 == 0 ) return false;
943+ return true;
944+}
945+bool special_reflection_conditions_4phl_4pkh_4plk_4plh_4phk_4pkl(const Int4& h, const Int4& k, const Int4& l)
946+{
947+ // (L) hkl: 2h+l=4n or 2k+h=4n or 2l+k=4n or 2l+h=4n or 2h+k=4n or 2k+l=4n
948+ //(Equivalently, {u_1,u_2,u_3\} mod 4 != {0,1,1}, {0,1,3}, {0,3,3}, {2,2,2})
949+ if( h % 2 != 0 )
950+ { // two odds and one even
951+ if( k % 4 != 0 && l % 4 != 0 ) return false;
952+ }
953+ else if( k % 2 != 0 )
954+ { // only h is even
955+ if( h % 4 != 0 ) return false;
956+ }
957+ else
958+ { // all even
959+ if( (h - 2) % 4 != 0 || (k - 2) % 4 != 0 || (l - 2) % 4 != 0 ) return false;
960+ }
961+ return true;
962+}
963+bool special_reflection_conditions_2ahk_4phkl_oddahk_6l_8h_12k_6phkl(const Int4& h, const Int4& k, const Int4& l)
964+{
965+ // (M) hkl: h,k=2n, h+k+l=4n or h,k=2n+1, l=4n+2 or h=8n, k=8n+4 and h+k+l=4n+2
966+ if( h % 2 != 0 )
967+ { // two odds and one even
968+ if( (k - 2) % 4 != 0 && (l - 2) % 4 != 0 ) return false;
969+ }
970+ else if( k % 2 != 0 )
971+ { // only h is even
972+ if( (h - 2) % 4 != 2 ) return false;
973+ }
974+ else
975+ { // all even
976+ if( (h + k + l) % 2 != 0 ) return false;
977+// if( (h + k + l) % 4 != 0 )
978+// {
979+ if( h % 8 != 0 && k % 8 != 0 && l % 8 != 0 ) return false;
980+ if( (h - 4) % 8 != 0 && (k - 4) % 8 != 0 && (l - 4) % 8 != 0 ) return false;
981+// }
982+ }
983+
984+ return true;
985+}
986+bool special_reflection_conditions_oddahk_6l_4ahkl(const Int4& h, const Int4& k, const Int4& l)
987+{
988+ // (N) hkl: h,k=2n+1, l=4n+2 or h,k,l=4n
989+ if( h % 2 != 0 )
990+ { // two odds and one even
991+ if( (k - 2) % 4 != 0 && (l - 2) % 4 != 0 ) return false;
992+ }
993+ else if( k % 2 != 0 )
994+ { // only h is even
995+ if( (h - 2) % 4 != 0 ) return false;
996+ }
997+ else
998+ { // all even
999+ if( h % 4 != 0 || k % 4 != 0 || l % 4 != 0 ) return false;
1000+ }
1001+ return true;
1002+}
1003+
1004+static const Int4 DATA_NUM_CUBIC_F = 7;
1005+static const Int4 DATA_NUM_CUBIC_I = 13;
1006+static const Int4 DATA_NUM_CUBIC_P = 12;
1007+static const Int4 DATA_NUM_HEXAGONAL = 9;
1008+static const Int4 DATA_NUM_TETRAGONAL_P = 23;
1009+static const Int4 DATA_NUM_TETRAGONAL_I = 11;
1010+static const Int4 DATA_NUM_ORTHORHOMBIC_P =71 ; //95;
1011+static const Int4 DATA_NUM_ORTHORHOMBIC_C =9;
1012+static const Int4 DATA_NUM_ORTHORHOMBIC_F =7;
1013+static const Int4 DATA_NUM_ORTHORHOMBIC_I =8;
1014+static const Int4 DATA_NUM_RHOMBOHEDRAL_RHOM_AXIS = 2;
1015+static const Int4 DATA_NUM_RHOMBOHEDRAL_HEX_AXIS = 2;
1016+static const Int4 DATA_NUM_MONOCLINIC_P_A_AXIS =8;
1017+static const Int4 DATA_NUM_MONOCLINIC_P_B_AXIS =8;
1018+static const Int4 DATA_NUM_MONOCLINIC_P_C_AXIS =8;
1019+static const Int4 DATA_NUM_MONOCLINIC_B_A_AXIS =2;
1020+static const Int4 DATA_NUM_MONOCLINIC_B_B_AXIS =2;
1021+static const Int4 DATA_NUM_MONOCLINIC_B_C_AXIS =2;
1022+static const Int4 DATA_NUM_TRICLINIC =1;
1023+
1024+
1025+Int4 putNumberOfTypesOfSystematicAbsences(const BravaisType& type)
1026+{
1027+ if( type.enumBravaisType() == Cubic_F )
1028+ {
1029+ return DATA_NUM_CUBIC_F;
1030+ }
1031+ if( type.enumBravaisType() == Cubic_I )
1032+ {
1033+ return DATA_NUM_CUBIC_I;
1034+ }
1035+ if ( type.enumBravaisType() == Cubic_P )
1036+ {
1037+ return DATA_NUM_CUBIC_P;
1038+ }
1039+ if ( type.enumBravaisType() == Hexagonal )
1040+ {
1041+ return DATA_NUM_HEXAGONAL;
1042+ }
1043+ if ( type.enumBravaisType() == Tetragonal_P )
1044+ {
1045+ return DATA_NUM_HEXAGONAL;
1046+ }
1047+ if ( type.enumBravaisType() == Tetragonal_I )
1048+ {
1049+ return DATA_NUM_HEXAGONAL;
1050+ }
1051+ if ( type.enumBravaisType() == Rhombohedral )
1052+ {
1053+ if( type.enumRHaxis() == Rho_Axis )
1054+ {
1055+ return DATA_NUM_RHOMBOHEDRAL_RHOM_AXIS;
1056+ }
1057+ if( type.enumRHaxis() == Hex_Axis )
1058+ {
1059+ return DATA_NUM_RHOMBOHEDRAL_HEX_AXIS;
1060+ }
1061+ }
1062+ if ( type.enumBravaisType() == Orthorhombic_P )
1063+ {
1064+ return DATA_NUM_ORTHORHOMBIC_P;
1065+ }
1066+ if ( type.enumBravaisType() == Orthorhombic_C )
1067+ {
1068+ return DATA_NUM_ORTHORHOMBIC_C;
1069+ }
1070+ if ( type.enumBravaisType() == Orthorhombic_F )
1071+ {
1072+ return DATA_NUM_ORTHORHOMBIC_F;
1073+ }
1074+ if ( type.enumBravaisType() == Orthorhombic_I )
1075+ {
1076+ return DATA_NUM_ORTHORHOMBIC_I;
1077+ }
1078+ if ( type.enumBravaisType() == Monoclinic_P )
1079+ {
1080+ if( type.enumABCaxis() == A_Axis )
1081+ {
1082+ return DATA_NUM_MONOCLINIC_P_A_AXIS;
1083+ }
1084+ if( type.enumABCaxis() == B_Axis )
1085+ {
1086+ return DATA_NUM_MONOCLINIC_P_B_AXIS;
1087+ }
1088+ if( type.enumABCaxis() == C_Axis )
1089+ {
1090+ return DATA_NUM_MONOCLINIC_P_C_AXIS;
1091+ }
1092+ }
1093+ if ( type.enumBravaisType() == Monoclinic_B )
1094+ {
1095+ if( type.enumABCaxis() == A_Axis )
1096+ {
1097+ return DATA_NUM_MONOCLINIC_B_A_AXIS;
1098+ }
1099+ if( type.enumABCaxis() == B_Axis )
1100+ {
1101+ return DATA_NUM_MONOCLINIC_B_B_AXIS;
1102+ }
1103+ if( type.enumABCaxis() == C_Axis )
1104+ {
1105+ return DATA_NUM_MONOCLINIC_B_C_AXIS;
1106+ }
1107+ }
1108+ if ( type.enumBravaisType() == Triclinic )
1109+ {
1110+ return DATA_NUM_TRICLINIC;
1111+ }
1112+
1113+ assert( false );
1114+ return -1;
1115+}
1116+
1117+const DataReflectionConditions& putInformationOnReflectionConditions(const BravaisType& brav_type, const Int4& irc_type)
1118+{
1119+// static const DataReflectionConditions DATA_NONE("None", "", &is_not_extinct_none);
1120+ static const DataReflectionConditions DATA_CUBIC_F[DATA_NUM_CUBIC_F]
1121+ = {
1122+ DataReflectionConditions("No condition:196,202,209,216,225" , "", &is_not_extinct_none),
1123+ DataReflectionConditions("210","h00:h=4n,0k0:k=4n,00l:l=4n", &is_not_extinct_4h00),
1124+ DataReflectionConditions("203,227","0kl:k+l=4n,h0l:h+l=4n,hk0:h+k=4n,h00:h=4n,0k0:k=4n,00l:l=4n", &is_not_extinct_4h00_40kl),
1125+ DataReflectionConditions("219,226","hhl:h,l=2n,hkh:h,k=2n,hkk:h,k=2n", &is_not_extinct_2hhl),
1126+ DataReflectionConditions("228","0kl:k+l=4n,h0l:h+l=4n,hk0:h+k=4n,hhl:h,l=2n,hkh:h,k=2n,hkk:h,k=2n,h00:h=4n,0k0:k=4n,00l:l=4n", &is_not_extinct_40kl_2hhl_4h00),
1127+ // A, face
1128+ DataReflectionConditions("203f(x,0,0),203b(1/2,1/2,1/2),203a(0,0,0),210f(x,0,0),210b(1/2,1/2,1/2),210a(0,0,0),227f(x,0,0),227b(1/2,1/2,1/2),227a(0,0,0)"
1129+ , "hkl:h=2n+1 or h+k+l=4n", &special_reflection_conditions_3h_4phkl),
1130+ // B, face
1131+ DataReflectionConditions("203d(5/8,5/8,5/8),203c(1/8,1/8,1/8),210d(5/8,5/8,5/8),210c(1/8,1/8,1/8),227d(5/8,5/8,5/8),227c(1/8,1/8,1/8)"
1132+ , "hkl:h=2n+1 or h,k,l=4n+2 or h,k,l=4n", &special_reflection_conditions_3h_6ahkl_4ahkl),
1133+ };
1134+
1135+ static const DataReflectionConditions DATA_CUBIC_I[DATA_NUM_CUBIC_I]
1136+ = {
1137+ DataReflectionConditions("No condition:197,199,204,211,217,229" , "", &is_not_extinct_none),
1138+ DataReflectionConditions( "206","0kl:k,l=2n,h0l:h,l=2n,hk0:h,k=2n", &is_not_extinct_20kl ),
1139+ DataReflectionConditions( "214","h00:h=4n,0k0:k=4n,00l:l=4n", &is_not_extinct_4h00 ),
1140+ DataReflectionConditions( "220,230","hhl:2h+l=4n,hkh:2h+k=4n,hkk:h+2k=4n,h00:h=4n,0k0:k=4n,00l:l=4n", &is_not_extinct_4hhl_4h00 ),
1141+ //F
1142+ DataReflectionConditions("220c(x,x,x),230e(x,x,x)" , "hkl:h=2n+1 or k=2n+1 or l=2n+1 or h+k+l=4n", &special_reflection_conditions_oddh_oddk_oddl_4phkl),
1143+ //I
1144+ DataReflectionConditions("214b(7/8,7/8,7/8),214a(1/8,1/8,1/8)" , "hkl:h=2n+1 or h,k,l=4n+2 or h,k,l=4n", &special_reflection_conditions_oddh_6ahkl_4ahkl),
1145+ //J
1146+ DataReflectionConditions("214d(5/8,0/1/4),214c(1/8,0,1/4)"
1147+ , "hkl:h,k,l=2n,h+k+l=4n or h=8n,k=8n+4 and h+k+l=4n+2 or h,k=2n+1,l=4n+2 or h,k=8n+1,l=4n or h,k=8n+3,l=4n or h=8n+1,k=8n-1,l=4n or h=8n+3,k=8n-3,l=4n"
1148+ , &special_reflection_conditions_2ahkl_4phkl_8h_12k_6phkl_oddahk_9ahk_4l_11ahk_4l_9h_7k_4l_11h),
1149+ //J2
1150+ DataReflectionConditions("220b(7/8,0,1/4),220a(3/8,0,1/4)"
1151+ , "hkl:h,k=2n,h+k+l=4n or h=8n,k=8n+4 and h+k+l=4n+2 or h,k=2n+1,l=4n+2 or h=8n+1,k=8n+3,l=4n or h=8n+7,k=8n+5,l=4n or h=8n+1,k=8n+5,l=4n or h=8n+7,k=8n+3,l=4n"
1152+ , &special_reflection_conditions_2hk_4phkl_8h_12k_6phkl_oddahk_6l_9h_11k_4l_15h_13k_9h_14k_4l_15h_11k_4l),
1153+ //K
1154+ DataReflectionConditions("214f(x,0,1/4)" , "hkl:h=2n+1 or h=4n,hhl:h=2n+1 or h+k+l=4n", &special_reflection_conditions_oddh_4h_oddh_4phkl_hhl),
1155+
1156+ DataReflectionConditions("220d(x,0,1/4),230g(1/8,y,-y+1/4)" , "hkl:h=2n+1 or h=4n", &special_reflection_conditions_oddh_oddk_oddl_4hkl),
1157+ //L
1158+ DataReflectionConditions("230f(x,0,1/4)" , "hkl:2h+l=4n or 2k+h=4n or 2l+k=4n o r2l+h=4n or 2h+k=4n or 2k+l=4n"
1159+ , &special_reflection_conditions_4phl_4pkh_4plk_4plh_4phk_4pkl),
1160+ //M
1161+ DataReflectionConditions("230d(3/8,0,1/4),230c(1/8,0,1/4)" , "hkl:h,k=2n,h+k+l=4n or h,k=2n+1,l=4n+2 or h=8n,k=8n+4 and h+k+l=4n+2"
1162+ , &special_reflection_conditions_2ahk_4phkl_oddahk_6l_8h_12k_6phkl),
1163+ //N
1164+ DataReflectionConditions("230b(1/8,1/8,1/8)" , "hkl:h,k=2n+1,l=4n+2 or h,k,l=4n"
1165+ , &special_reflection_conditions_oddahk_6l_4ahkl),
1166+
1167+ };
1168+ static const DataReflectionConditions DATA_CUBIC_P[DATA_NUM_CUBIC_P]
1169+ = {
1170+ DataReflectionConditions("No condition:195,200,207,215,221" , "", &is_not_extinct_none),
1171+ DataReflectionConditions( "198,208","h00:h=2n,0k0:k=2n,00l:l=2n", &is_not_extinct_2h00 ),
1172+ DataReflectionConditions( "201,224","h00:h=2n,0k0:k=2n,00l:l=2n,0kl:k+l=2n,h0l:h+l=2n,hk0:h+k=2n", &is_not_extinct_2h00_20kl ),
1173+ DataReflectionConditions( "205","hk0:h=2n,0kl:k=2n,h0l:l=2n,h00:h=2n,0k0:k=2n,00l:l=2n", &is_not_extinct_2hk0_2h00 ),
1174+ DataReflectionConditions( "205(mirror-reversed)","hk0:k=2n,0kl:l=2n,h0l:h=2n,h00:h=2n,0k0:k=2n,00l:l=2n",&is_not_extinct_2hk0mirror_2h00),
1175+ DataReflectionConditions( "212,213","h00:h=4n,0k0:k=4n,00l:l=4n", &is_not_extinct_4h00 ),
1176+ DataReflectionConditions( "218,223","hhl:l=2n,hkh:k=2n,hkk:h=2n,h00:h=2n,0k0:k=2n,00l:l=2n", &is_not_extinct_2hhl_2h00 ),
1177+ DataReflectionConditions( "222","0kl:k+l=2n,h0l:h+l=2n,hk0:h+k=2n,hhl:l=2n,hkh:k=2n,hkk:h=2n,h00:h=2n,0k0:k=2n,00l:l=2n", &is_not_extinct_2hhl_2h00_20kl ),
1178+ //F
1179+ DataReflectionConditions("208j(x,1/2,0),208i(x,0,1/2)"
1180+ , "hkl:h=2n or k=2n or l=2n,hhl:l=2n,hkh:k=2n,hkk:h=2n", &special_reflection_conditions_2h_2k_2hhl_2hkh_2hkk),
1181+ DataReflectionConditions("218h(x,0,1/2),218g(x,1/2,0),223j(1/4,y,y+1/2),223h(x,1/2,0),223g(x,0,1/2)"
1182+ , "hkl:h=2n or k=2n or l=2n", &special_reflection_conditions_2h_2k_2lhkl),
1183+ //G
1184+ DataReflectionConditions("208f(1/4,1/2,0),208e(1/4,0,1/2),218d(1/4,0,1/2),218c(1/4,1/2,0),223d(1/4,1/2,0),223c(1/4,0,1/2)"
1185+ , "hkl:h+k+l=2n or either one of h,k,l is 2n+1,4n and 4n+2", &special_reflection_conditions_2phkl_oddhkl_4hkl_6hkl),
1186+ //H
1187+ DataReflectionConditions("212b(5/8,5/8,5/8),212a(1/8,1/8,1/8),213b(7/8,7/8,7/8),213a(3/8,3/8,3/8)"
1188+ , "hkl:two of h,k,l are odd or either one of h,k,l is 2n+1,k=4n and l=4n+2 or h,k,l=4n+2 or h,k,l=4n", &special_reflection_conditions_22hkl_2oddhkl_4k_6l_6ahkl_4hkl),
1189+
1190+
1191+
1192+ };
1193+ static const DataReflectionConditions DATA_HEXAGONAL[DATA_NUM_HEXAGONAL]
1194+ = {
1195+ //Hexagonal :hex
1196+ DataReflectionConditions("No condition:143,147,149,150,156,157,162,164,168,174,175,177,183,187,189,191" , "", &is_not_extinct_none),
1197+ DataReflectionConditions( "144,145,151,152,153,154,171,172,180,181","000l:l=3n", &is_not_extinct_tr_3000l ),
1198+ DataReflectionConditions( "158,165,185,188,193","h-h0l:l=2n,h0-hl:l=2n,0h-hl:l=2n", &is_not_extinct_tr_2hmh0l ),
1199+ DataReflectionConditions( "159,163,186,190,194","hh-2hl:l=2n,h-2hhl:l=2n,-2hhhl:l=2n", &is_not_extinct_2hhm2hl ),
1200+ DataReflectionConditions( "169,170,178,179","000l:l=6n", &is_not_extinct_hex_6000l ),
1201+ DataReflectionConditions( "173,176,182","000l:l=2n", &is_not_extinct_hex_2000l ),
1202+ DataReflectionConditions( "184,192","hh-2hl:l=2n,h-2hhl:l=2n,-2hhhl:l=2n,h-h0l:l=2n,h0-hl:l=2n,0h-hl:l=2n", &is_not_extinct_hex_2hhm2hl_2hmh0l_2000l ),
1203+ //D
1204+ DataReflectionConditions("159b(1/3,2/3,z),163f(1/3,2/3,z),163d(2/3,1/3,1/4),163c(1/3,2/3,1/4),173b(1/3,2/3,z),176f(1/3,2/3,z),176d(2/3,1/3,1/4),176c(1/3,2/3,1/4),182f(1/3,2/3,z),182d(1/3,2/3,3/4),182c(1/3,2/3,1/4),186b(1/3,2/3,z),190f(1/3,2/3,z),190d(2/3,1/3,1/4),190c(1/3,2/3,1/4),194f(1/3,2/3,z),194d(1/3,2/3,3/4),194c(1/3,2/3,1/4)"
1205+ , "hkil:l=2n or h-k=3n+1 or h-k=3n+2", &special_reflection_conditions_2l_3shk_3s2hk),
1206+ //E
1207+ DataReflectionConditions("171b(1/2,1/2,z),172b(1/2,1/2,z),180f(1/2,0,z),180d(1/2,0,1/2),180c(1/2,0,0),181f(1/2,0,z),181d(1/2,0,1/2),181c(1/2,0,0)"
1208+ , "hkil:h=2n+1 or k=2n+1 or l=3n", &special_reflection_conditions_oddh_oddk_3lhkil)
1209+ };
1210+ static const DataReflectionConditions DATA_TETRAGONAL_P[DATA_NUM_TETRAGONAL_P]
1211+ = {
1212+ DataReflectionConditions("No condition:75,81,83,89,99,111,115,123" , "", &is_not_extinct_none),
1213+ DataReflectionConditions( "76,78,91,95","00l:l=4n", &is_not_extinct_400l ),
1214+ DataReflectionConditions( "77,84,93","00l:l=2n", &is_not_extinct_200l ),
1215+ DataReflectionConditions( "86","hk0:h+k=2n,00l:l=2n", &is_not_extinct_2hk0_200l ),
1216+ DataReflectionConditions( "90,113","h00:h=2n,0k0:k=2n", &is_not_extinct_2h00_20k0 ),
1217+ DataReflectionConditions( "92,96","00l:l=4n,h00:h=2n,0k0:k=2n", &is_not_extinct_400l_2h00_0k0 ),
1218+ DataReflectionConditions( "94","h00:h=2n,0k0:k=2n,00l:l=2n", &is_not_extinct_2h00 ),
1219+ DataReflectionConditions( "100,117,127","h0l:l=2n,0kl:l=2n,h00:h=2n,0k0:k=2n", &is_not_extinct_t_2h0l_2h00 ),//t:Tetragonal
1220+ DataReflectionConditions( "101,116,132","h0l:l=2n,0kl:l=2n", &is_not_extinct_t_2h0l ),
1221+ DataReflectionConditions( "102,118,136","h0l:h+l=2n,0kl:k+l=2n,h00:h=2n,0k0:k=2n", &is_not_extinct_t_2ph0l_2h00 ),//p:plush+l=0
1222+ DataReflectionConditions( "103,124","h0l:l=2n,0kl:l=2n,hhl:l=2n", &is_not_extinct_t_2h0l_2hhl ),
1223+ DataReflectionConditions( "105,112,131","hhl:l=2n", &is_not_extinct_t_2hhl ),
1224+ DataReflectionConditions( "106,135","h0l:h=2n,0kl:k=2n,hhl:l=2n,h00:h=2n,0k0:k=2n", &is_not_extinct_t_2h00_2h0l_2hhl ),
1225+ DataReflectionConditions( "114","hhl:l=2n,h00:h=2n,0k0:k=2n", &is_not_extinct_t_2h00_2hhl ),
1226+ DataReflectionConditions( "125","hk0:h+k=2n,h0l:h=2n,0kl:k=2n", &is_not_extinct_t_2phk0_2h0l ),
1227+ DataReflectionConditions( "126","hk0:h+k=2n,h0l:h+l=2n,0kl:k+l=2n,hhl:l=2n", &is_not_extinct_t_2phk0_2hhl ),
1228+ DataReflectionConditions( "104,128","h0l:h+l=2n,0kl:k+l=2n,hhl:l=2n,h00:h=2n,0k0:k=2n", &is_not_extinct_t_2ph0l_2hhl_2h00 ),
1229+ DataReflectionConditions( "85,129","hk0:h+k=2n", &is_not_extinct_t_2phk0 ),
1230+ DataReflectionConditions( "130","hk0:h+k=2n,h0l:l=2n,0kl:l=2n,hhl:l=2n", &is_not_extinct_t_2phk0_2h0l_2hll ),
1231+ DataReflectionConditions( "133","hk0:h+k=2n,hhl:l=2n", &is_not_extinct_t_2phk0_2hll ),
1232+ DataReflectionConditions( "134","hk0:h+k=2n,h0l:h+l=2n,0kl:k+l=2n", &is_not_extinct_t_23phk0 ),//3:hk0,0kl,h0l
1233+ DataReflectionConditions( "137","hk0:h+k=2n,hhl:l=2n", &is_not_extinct_t_21phk0_2hhl ),//1:hk0,no h0k or 0kl
1234+ DataReflectionConditions( "138","hk0:h+k=2n,h0l:l=2n,0kl:l=2n", &is_not_extinct_t_21phk0_2h0l ),//if Tetragonal and 2 conditions (h0l,0kl)no 1 or 3
1235+ };
1236+ static const DataReflectionConditions DATA_TETRAGONAL_I[DATA_NUM_TETRAGONAL_I]
1237+ = {
1238+ DataReflectionConditions("No condition:79,82,87,97,107,119,121,139" , "", &is_not_extinct_none),
1239+ DataReflectionConditions( "80,98","00l:l=4n", &is_not_extinct_400l ),
1240+ DataReflectionConditions( "88","hk0:h,k=2n,00l:l=4n", &is_not_extinct_t_21hk0_200l ),
1241+ DataReflectionConditions( "108,120,140","h0l:h,l=2n,0kl:k,l=2n", &is_not_extinct_t_2ah0l ),//a:and h,l=2n
1242+ DataReflectionConditions( "109,122","hhl:2h+l=4n,h-h0:h=2n", &is_not_extinct_t_4phhl_2hmh0 ),//mh:h-h0
1243+ DataReflectionConditions( "110","hhl:2h+l=4n,h-h0:h=2n,h0l:h,l=2n,0kl:k,l=2n", &is_not_extinct_t_4phhl_2hmh0_2ah0l ),
1244+ DataReflectionConditions( "141","hk0:h,k=2n,hhl:2h+l=4n", &is_not_extinct_t_2hk0_4phhl ),
1245+ DataReflectionConditions( "142","hk0:h,k=2n,hhl:2h+l=4n,h0l:h,l=2n,0kl:k,l=2n", &is_not_extinct_t_23ahk0_4phhl ),
1246+
1247+ //A,body
1248+ DataReflectionConditions("80a(0,0,z),88e(0,0,z),88b(0,0,1/2),88a(0,0,0),98c(0,0,z),98b(0,0,1/2),98a(0,0,0),109a(0,0,z),122c(0,0,z),122b(0,0,1/2),122a(0,0,0),141g(x,x,0),141e(0,0,z),141b(0,0,1/2),141a(0,0,0),142f(x,x,1/4)"
1249+ , "hkl:h=2n+1 or 2h+l=4n", &special_reflection_conditions_3l_4p2hl),
1250+ //B,body
1251+ DataReflectionConditions("88d(0,1/4,5/8),88c(0,1/4,1/8),141d(0,1/4,5/8),141c(0,1/4,1/8)"
1252+ , "hkl:l=2n+1 or h,k=2n,h+k+l=4n", &special_reflection_conditions_3l_2ahk_4phkl),
1253+ //C
1254+ DataReflectionConditions("141f(x,1/4,1/8),142e(1/4,y,1/8)"
1255+ , "hkl:l=2n+1 or h=2n", &special_reflection_conditions_3l_2h),
1256+ };
1257+ static const DataReflectionConditions DATA_RHOMBOHEDRAL_RHOM_AXIS[DATA_NUM_RHOMBOHEDRAL_RHOM_AXIS]
1258+ = {
1259+ DataReflectionConditions("No condition:146,148,155,160,166" , "", &is_not_extinct_none),
1260+ DataReflectionConditions("161,167","hhl:l=2n,hkh:k=2n,hkk:h=2n", &is_not_extinct_rhom_2hhl ),
1261+ };
1262+
1263+ static const DataReflectionConditions DATA_RHOMBOHEDRAL_HEX_AXIS[DATA_NUM_RHOMBOHEDRAL_HEX_AXIS]
1264+ = {
1265+ DataReflectionConditions("No condition:146,148,155,160,166" , "", &is_not_extinct_none),
1266+ DataReflectionConditions("161,167", "h-h0l:l=2n,h0-hl:l=2n,0h-hl:l=2n", &is_not_extinct_rhom_hex_2hmh0l),
1267+ };
1268+
1269+ //Monoclinic P
1270+ static const DataReflectionConditions DATA_MONOCLINIC_P_A_AXIS[DATA_NUM_MONOCLINIC_P_A_AXIS]
1271+ = {
1272+ DataReflectionConditions("No condition:3,6,10" , "", &is_not_extinct_none),
1273+ DataReflectionConditions( "4,11","h00:h=2n", &is_not_extinct_mono_2h00 ),
1274+ DataReflectionConditions( "7,13","0kl:k=2n", &is_not_extinct_mono_20kl ),
1275+ DataReflectionConditions( "7(cell choice 2),13(cell choice 2)","0kl:k+l=2n", &is_not_extinct_mono_2p0kl ),
1276+ DataReflectionConditions( "7(cell choice 3),13(cell choice 3)","0kl:l=2n", &is_not_extinct_mono_2l0kl ),//l in 2l:l=2n
1277+ DataReflectionConditions( "14","0kl:k=2n,h00:h=2n", &is_not_extinct_mono_20kl_2h00 ),
1278+ DataReflectionConditions( "14(cell choice 2)","0kl:k+l=2n,0k0:k=2n", &is_not_extinct_mono_2p0kl_20k0 ),
1279+ DataReflectionConditions( "14(cell choice 3)","0kl:l=2n,h00:h=2n", &is_not_extinct_mono_2d0kl_2h00 )
1280+ };
1281+
1282+
1283+ static const DataReflectionConditions DATA_MONOCLINIC_P_B_AXIS[DATA_NUM_MONOCLINIC_P_B_AXIS]
1284+ ={
1285+ DataReflectionConditions("No condition:3,6,10" , "", &is_not_extinct_none),
1286+ DataReflectionConditions( "4,11","0k0:k=2n", &is_not_extinct_mono_20k0 ),
1287+ DataReflectionConditions( "7,13","h0l:l=2n", &is_not_extinct_mono_2h0l ),
1288+ DataReflectionConditions( "7(cell choice 2),13(cell choice 2)","h0l:h+l=2n", &is_not_extinct_mono_2ph0l ),
1289+ DataReflectionConditions( "7(cell choice 3),13(cell choice 3)","h0l:h=2n", &is_not_extinct_mono_2hh0l ),
1290+ DataReflectionConditions( "14","h0l:l=2n,0k0:h=2n", &is_not_extinct_mono_2h0l_20k0 ),
1291+ DataReflectionConditions( "14(cell choice 2)","h0l:h+l=2n,0k0:k=2n", &is_not_extinct_mono_2ph0l_20k0 ),
1292+ DataReflectionConditions( "14(cell choice 3)","h0l:h=2n,0k0:l=2n", &is_not_extinct_mono_2dh0l_20k0 )
1293+ };
1294+
1295+ static const DataReflectionConditions DATA_MONOCLINIC_P_C_AXIS[DATA_NUM_MONOCLINIC_P_C_AXIS]
1296+ ={
1297+ DataReflectionConditions("No condition:3,6,10" , "", &is_not_extinct_none),
1298+ DataReflectionConditions( "4,11","00l:l=2n", &is_not_extinct_mono_200l ),
1299+ DataReflectionConditions( "7,13","hk0:h=2n", &is_not_extinct_mono_2hk0 ),
1300+ DataReflectionConditions( "7(cell choice 2),13(cell choice 2)","hk0:h+k=2n", &is_not_extinct_mono_2phk0 ),
1301+ DataReflectionConditions( "7(cell choice 3),13(cell choice 3)","hk0:k=2n", &is_not_extinct_mono_2khk0 ),
1302+ DataReflectionConditions( "14","hk0:h=2n,00l:l=2n", &is_not_extinct_mono_2hk0_200l ),
1303+ DataReflectionConditions( "14(cell choice 2)","hk0:h+k=2n,00l:k=2n", &is_not_extinct_mono_2phk0_200l ),
1304+ DataReflectionConditions( "14(cell choice 3)","hk0:k=2n,00l:l=2n", &is_not_extinct_mono_2dhk0_200l )
1305+ };
1306+
1307+ static const DataReflectionConditions DATA_MONOCLINIC_B_A_AXIS[DATA_NUM_MONOCLINIC_B_A_AXIS]
1308+ = {
1309+ DataReflectionConditions("No condition:5,8,12" , "", &is_not_extinct_none),
1310+ DataReflectionConditions( "9,15", "0kl:k=2n", &is_not_extinct_mono_20kl )
1311+ };
1312+
1313+ static const DataReflectionConditions DATA_MONOCLINIC_B_B_AXIS[DATA_NUM_MONOCLINIC_B_B_AXIS]
1314+ = {
1315+ DataReflectionConditions("No condition:5,8,12" , "", &is_not_extinct_none),
1316+ DataReflectionConditions( "9,15", "h0l:l=2n", &is_not_extinct_mono_2h0l )
1317+ };
1318+
1319+ static const DataReflectionConditions DATA_MONOCLINIC_B_C_AXIS[DATA_NUM_MONOCLINIC_B_C_AXIS]
1320+ = {
1321+ DataReflectionConditions("No condition:5,8,12" , "", &is_not_extinct_none),
1322+ DataReflectionConditions( "9,15", "hk0:h=2n", &is_not_extinct_mono_2hk0 )
1323+ };
1324+ static const DataReflectionConditions DATA_ORTHORHOMBIC_P[DATA_NUM_ORTHORHOMBIC_P]
1325+ = {
1326+ DataReflectionConditions("No condition:16,25,47" , "", &is_not_extinct_none),
1327+ DataReflectionConditions("19","h00:h=2n,0k0:k=2n,00l:l=2n", &is_not_extinct_orth_2dh00),
1328+ DataReflectionConditions("48","hk0:h+k=2n,h0l:h+l=2n,0kl:k+l=2n", &is_not_extinct_orth_23phk0, DataReflectionConditions::AXIS_ABC),
1329+ DataReflectionConditions("61","0kl:k=2n,h0l:l=2n,hk0:h=2n", &is_not_extinct_orth_2d30kl),//3:0kl,h0l,hk0
1330+ DataReflectionConditions("61(mirror-reversed)","0kl:l=2n,h0l:h=2n,hk0:k=2n", &is_not_extinct_orth_2d30kl, DataReflectionConditions::AXIS_ACB),//3:0kl,h0l,hk0
1331+
1332+ DataReflectionConditions("17","00l:l=2n", &standard_function_for_abc_200l, DataReflectionConditions::AXIS_ABC),
1333+ DataReflectionConditions("17(cab)","h00:h=2n", &standard_function_for_abc_200l, DataReflectionConditions::AXIS_CAB),
1334+ DataReflectionConditions("17(bca)","0k0:k=2n", &standard_function_for_abc_200l, DataReflectionConditions::AXIS_BCA),
1335+
1336+ DataReflectionConditions("18","h00:h=2n,0k0:k=2n", &standard_function_for_abc_22h00, DataReflectionConditions::AXIS_ABC),//2:h00,0k0
1337+ DataReflectionConditions("18(cab)","0k0:k=2n,00l:l=2n", &standard_function_for_abc_22h00, DataReflectionConditions::AXIS_CBA),
1338+ DataReflectionConditions("18(bca)","00l:l=2n,h00:h=2n", &standard_function_for_abc_22h00, DataReflectionConditions::AXIS_BCA),
1339+
1340+ DataReflectionConditions("27,49","0kl:l=2n,h0l:l=2n", &standard_function_for_abc_220kl, DataReflectionConditions::AXIS_ABC),//2:0kl,h0l
1341+ DataReflectionConditions("27(cab),49(cab)","h0l:h=2n,hk0:h=2n", &standard_function_for_abc_220kl, DataReflectionConditions::AXIS_CBA),
1342+ DataReflectionConditions("27(bca),49(bca)","hk0:k=2n,0kl:k=2n", &standard_function_for_abc_220kl, DataReflectionConditions::AXIS_BCA),
1343+
1344+ DataReflectionConditions("32,55","0kl:k=2n,h0l:h=2n", &standard_function_for_abc_2d20kl, DataReflectionConditions::AXIS_ABC),
1345+ DataReflectionConditions("32(cab),55(cab)","h0l:l=2n,hk0:k=2n", &standard_function_for_abc_2d20kl, DataReflectionConditions::AXIS_CBA),
1346+ DataReflectionConditions("32(bca),55(bca)","hk0:h=2n,0kl:l=2n", &standard_function_for_abc_2d20kl, DataReflectionConditions::AXIS_BCA),
1347+
1348+ DataReflectionConditions("34,58","0kl:k+l=2n,h0l:h+l=2n", &standard_function_for_abc_2p20kl, DataReflectionConditions::AXIS_ABC),
1349+ DataReflectionConditions("34(cab),58(cab)","h0l:h+l=2n,hk0:h+k=2n", &standard_function_for_abc_2p20kl, DataReflectionConditions::AXIS_ABC),
1350+ DataReflectionConditions("34(bca),58(bca)","hk0:k+h=2n,0kl:k+l=2n", &standard_function_for_abc_2p20kl, DataReflectionConditions::AXIS_ABC),
1351+
1352+ DataReflectionConditions("50","0kl:k=2n,h0l:h=2n,hk0:h+k=2n", &standard_function_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_ABC),
1353+ DataReflectionConditions("50(cab)","h0l:l=2n,hk0:k=2n,0kl:k+l=2n", &standard_function_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_CBA),
1354+ DataReflectionConditions("50(bca)","hk0:h=2n,0kl:l=2n,h0l:h+l=2n", &standard_function_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_BAC),
1355+
1356+
1357+ DataReflectionConditions("56","0kl:l=2n,h0l:l=2n,hk0:h+k=2n", &standard_function_for_abc, DataReflectionConditions::AXIS_ABC),
1358+ DataReflectionConditions("56(cab)","h0l:h=2n,hk0:h=2n,0kl:k+l=2n", &standard_function_for_abc, DataReflectionConditions::AXIS_CAB),
1359+ DataReflectionConditions("56(bca)","hk0:k=2n,0kl:k=2n,h0l:h+l=2n", &standard_function_for_abc, DataReflectionConditions::AXIS_BCA),
1360+
1361+ // case of (abc), the string conditions are different, the function are the same
1362+ DataReflectionConditions("26,28(-cba),51(bca)", "h0l:l=2n", &standard_function2_for_abc, DataReflectionConditions::AXIS_ABC),
1363+ DataReflectionConditions("26(cab),28(a-cb),51", "hk0:h=2n", &standard_function2_for_abc, DataReflectionConditions::AXIS_CAB),
1364+ DataReflectionConditions("26(bca),28(ba-c),51(cab)", "0kl:k=2n", &standard_function2_for_abc, DataReflectionConditions::AXIS_BCA),
1365+ DataReflectionConditions("26(ba-c),28(bca),51(-cba)", "0kl:l=2n", &standard_function2_for_abc, DataReflectionConditions::AXIS_BAC),
1366+ DataReflectionConditions("26(-cba),28,51(a-cb)", "h0l:h=2n", &standard_function2_for_abc, DataReflectionConditions::AXIS_CBA),
1367+ DataReflectionConditions("26(a-cb),28(cab),51(ba-c)", "hk0:k=2n", &standard_function2_for_abc, DataReflectionConditions::AXIS_ACB),
1368+
1369+ DataReflectionConditions("29,57" , "0kl:l=2n,h0l:h=2n", &standard_function2_for_abc_22d0kl, DataReflectionConditions::AXIS_ABC),
1370+ DataReflectionConditions("29(cab),57(cab)" , "h0l:h=2n,hk0:k=2n", &standard_function2_for_abc_22d0kl, DataReflectionConditions::AXIS_CAB),
1371+ DataReflectionConditions("29(bca),57(bca)" , "h0l:k=2n,0kl:l=2n", &standard_function2_for_abc_22d0kl, DataReflectionConditions::AXIS_BCA),
1372+ DataReflectionConditions("29(ba-c),57(ba-c)" , "h0l:l=2n,0kl:k=2n", &standard_function2_for_abc_22d0kl, DataReflectionConditions::AXIS_BAC),
1373+ DataReflectionConditions("29(-cba),57(-cba)" , "hk0:h=2n,h0l:l=2n", &standard_function2_for_abc_22d0kl, DataReflectionConditions::AXIS_CBA),
1374+ DataReflectionConditions("29(a-cb),57(a-cb)" , "0kl:k=2n,hk0:h=2n", &standard_function2_for_abc_22d0kl, DataReflectionConditions::AXIS_ACB),
1375+
1376+ DataReflectionConditions("30,53" , "0kl:k+l=2n,h0l:l=2n", &standard_function2_for_abc_2p0kl_2h0l, DataReflectionConditions::AXIS_ABC),
1377+ DataReflectionConditions("30(cab),53(cab)" , "h0l:h+l=2n,hk0:h=2n", &standard_function2_for_abc_2p0kl_2h0l, DataReflectionConditions::AXIS_CAB),
1378+ DataReflectionConditions("30(bca),53(bca)" , "hk0:h+k=2n,0kl:k=2n", &standard_function2_for_abc_2p0kl_2h0l, DataReflectionConditions::AXIS_BCA),
1379+ DataReflectionConditions("30(ba-c),53(ba-c)" , "h0l:h+l=2n,0kl:l=2n", &standard_function2_for_abc_2p0kl_2h0l, DataReflectionConditions::AXIS_BAC),
1380+ DataReflectionConditions("30(-cba),53(-cba)" , "hk0:h+k=2n,h0l:h=2n", &standard_function2_for_abc_2p0kl_2h0l, DataReflectionConditions::AXIS_CBA),
1381+ DataReflectionConditions("30(a-cb),53(a-cb)" , "0kl:k+l=2n,hk0:k=2n", &standard_function2_for_abc_2p0kl_2h0l, DataReflectionConditions::AXIS_ACB),
1382+
1383+ DataReflectionConditions("31,59(bca)" , "h0l:h+l=2n", &standard_function2_for_abc_2ph0l, DataReflectionConditions::AXIS_ABC),
1384+ DataReflectionConditions("31(cab),59" , "hk0:h+k=2n", &standard_function2_for_abc_2ph0l, DataReflectionConditions::AXIS_CAB),
1385+ DataReflectionConditions("31(bca),59(cab)", "0kl:k+l=2n", &standard_function2_for_abc_2ph0l, DataReflectionConditions::AXIS_BCA),
1386+
1387+ DataReflectionConditions("33,62" , "0kl:k+l=2n,h0l:h=2n", &standard_function2_for_abc_2p0kl_2dh0l, DataReflectionConditions::AXIS_ABC),
1388+ DataReflectionConditions("33(cab),62(cab)" , "h0l:h+l=2n,hk0:k=2n", &standard_function2_for_abc_2p0kl_2dh0l, DataReflectionConditions::AXIS_CAB),
1389+ DataReflectionConditions("33(bca),62(bca)" , "hk0:h+k=2n,0kl:l=2n", &standard_function2_for_abc_2p0kl_2dh0l, DataReflectionConditions::AXIS_BCA),
1390+ DataReflectionConditions("33(ba-c),62(ba-c)" , "h0l:h+l=2n,0kl:k=2n", &standard_function2_for_abc_2p0kl_2dh0l, DataReflectionConditions::AXIS_BAC),
1391+ DataReflectionConditions("33(-cba),62(-cba)" , "hk0:h+k=2n,h0l:l=2n", &standard_function2_for_abc_2p0kl_2dh0l, DataReflectionConditions::AXIS_CBA),
1392+ DataReflectionConditions("33(a-cb),62(a-cb)" , "0kl:k+l=2n,hk0:h=2n", &standard_function2_for_abc_2p0kl_2dh0l, DataReflectionConditions::AXIS_ACB),
1393+
1394+ DataReflectionConditions("52" , "0kl:k+l=2n,h0l:h+l=2n,hk0:h=2n", &standard_function2_for_abc_22p0kl_2hk0, DataReflectionConditions::AXIS_ABC),
1395+ DataReflectionConditions("52(cab)" , "h0l:h+l=2n,hk0:h+k=2n,0kl:k=2n", &standard_function2_for_abc_22p0kl_2hk0, DataReflectionConditions::AXIS_CAB),
1396+ DataReflectionConditions("52(bca)" , "hk0:h+k=2n,0kl:k+l=2n,h0l:l=2n", &standard_function2_for_abc_22p0kl_2hk0, DataReflectionConditions::AXIS_BCA),
1397+ DataReflectionConditions("52(ba-c)" , "h0l:h+l=2n,0kl:k+l=2n,hk0:k=2n", &standard_function2_for_abc_22p0kl_2hk0, DataReflectionConditions::AXIS_BAC),
1398+ DataReflectionConditions("52(-cba)" , "hk0:h+k=2n,h0l:h+l=2n,0kl:l=2n", &standard_function2_for_abc_22p0kl_2hk0, DataReflectionConditions::AXIS_CBA),
1399+ DataReflectionConditions("52(a-cb)" , "0kl:k+l=2n,hk0:h+k=2n,h0l:h=2n", &standard_function2_for_abc_22p0kl_2hk0, DataReflectionConditions::AXIS_ACB),
1400+
1401+ DataReflectionConditions("54" , "0kl:l=2n,h0l:l=2n,hk0:h=2n", &standard_function2_for_abc_230kl, DataReflectionConditions::AXIS_ABC),
1402+ DataReflectionConditions("54(cab)" , "h0l:h=2n,hk0:h=2n,0kl:k=2n", &standard_function2_for_abc_230kl, DataReflectionConditions::AXIS_CAB),
1403+ DataReflectionConditions("54(bca)" , "hk0:k=2n,0kl:k=2n,h0l:l=2n", &standard_function2_for_abc_230kl, DataReflectionConditions::AXIS_BCA),
1404+ DataReflectionConditions("54(ba-c)" , "h0l:l=2n,0kl:l=2n,hk0:k=2n", &standard_function2_for_abc_230kl, DataReflectionConditions::AXIS_BAC),
1405+ DataReflectionConditions("54(-cba)" , "hk0:h=2n,h0l:h=2n,0kl:l=2n", &standard_function2_for_abc_230kl, DataReflectionConditions::AXIS_CBA),
1406+ DataReflectionConditions("54(a-cb)" , "0kl:k=2n,hk0:k=2n,h0l:h=2n", &standard_function2_for_abc_230kl, DataReflectionConditions::AXIS_ACB),
1407+
1408+ DataReflectionConditions("60" , "0kl:k=2n,h0l:l=2n,hk0:h+k=2n", &standard_function2_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_ABC),
1409+ DataReflectionConditions("60(cab)" , "h0l:l=2n,hk0:h=2n,0kl:k+l=2n", &standard_function2_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_CAB),
1410+ DataReflectionConditions("60(bca)" , "hk0:h=2n,0kl:k=2n,h0l:h+l=2n", &standard_function2_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_BCA),
1411+ DataReflectionConditions("60(ba-c)" , "h0l:h=2n,0kl:l=2n,hk0:h+k=2n", &standard_function2_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_BAC),
1412+ DataReflectionConditions("60(-cba)" , "hk0:k=2n,h0l:h=2n,0kl:k+l=2n", &standard_function2_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_CBA),
1413+ DataReflectionConditions("60(a-cb)" , "0kl:l=2n,hk0:k=2n,h0l:h+l=2n", &standard_function2_for_abc_220kl_2phk0, DataReflectionConditions::AXIS_ACB),
1414+ };
1415+ static const DataReflectionConditions DATA_ORTHORHOMBIC_C[DATA_NUM_ORTHORHOMBIC_C]
1416+ = {
1417+ DataReflectionConditions("No condition:21,35,38,65" , "", &is_not_extinct_none),
1418+ DataReflectionConditions("20" , "00l:l=2n", &standard_function_for_abc_200l),
1419+ DataReflectionConditions("36,63" , "h0l:l=2n", &standard_function2_for_abc),
1420+ DataReflectionConditions("40(bca)" , "0kl:l=2n", &standard_function_for_abc_210kl),
1421+ DataReflectionConditions("37,66" , "0kl:l=2n,h0l:l=2n", &standard_function_for_abc_220kl),
1422+ DataReflectionConditions("39(bca),67" , "hk0:h,k=2n", &standard_function_for_abc_2ahk0),
1423+ DataReflectionConditions("41(bca),64(ba-c)" , "hk0:h,k=2n,0kl:l=2n", &standard_function_for_abc_2ahk0_20kl, DataReflectionConditions::AXIS_BAC),
1424+ DataReflectionConditions("41(-cba),64" , "hk0:h,k=2n,h0l:l=2n", &standard_function_for_abc_2ahk0_2h0l, DataReflectionConditions::AXIS_ABC),
1425+ DataReflectionConditions("68" , "0kl:l=2n,h0l:l=2n,hk0:h,k=2n", &standard_function_for_abc_220kl_2ahk0),
1426+
1427+ };
1428+ static const DataReflectionConditions DATA_ORTHORHOMBIC_F[DATA_NUM_ORTHORHOMBIC_F]
1429+ = {
1430+ DataReflectionConditions("No condition:22,42,69" , "", &is_not_extinct_none),
1431+ DataReflectionConditions("43" , "0kl:k+l=4n,h0l:h+l=4n", &standard_function_for_abc_42p0kl, DataReflectionConditions::AXIS_ABC),
1432+ DataReflectionConditions("43(cab)" , "h0l:h+l=4n,hk0:h+k=4n", &standard_function_for_abc_42p0kl, DataReflectionConditions::AXIS_CAB),
1433+ DataReflectionConditions("43(bca)" , "hk0:h+k=4n,0kl:k+l=4n", &standard_function_for_abc_42p0kl, DataReflectionConditions::AXIS_BCA),
1434+
1435+ DataReflectionConditions("70" , "0kl:k+l=4n,h0l:h+l=4n,hk0:h+k=4n", &standard_function_for_abc_43p0kl),
1436+
1437+ // A
1438+ DataReflectionConditions("43a(0,0,z),70g(0,0,z),70f(0,y,0),70e(x,0,0),70b(0,0,1/2),70a(0,0,0)" , "hkl:h=2n+1 or h+k+l=4n", &special_reflection_conditions_3h_4phkl),
1439+
1440+ // B
1441+ DataReflectionConditions("70d(5/8,5/8,5/8),70c(1/8,1/8,1/8)" , "hkl:h=2n+1 or h,k,l=4n+2 or h,k,l=4n", &special_reflection_conditions_3h_6ahkl_4ahkl),
1442+ };
1443+
1444+ static const DataReflectionConditions DATA_ORTHORHOMBIC_I[DATA_NUM_ORTHORHOMBIC_I]
1445+ = {
1446+ DataReflectionConditions("No condition:23,24,44,71" , "", &is_not_extinct_none),
1447+ DataReflectionConditions("45,72" , "0kl:k,l=2n,h0l:h,l=2n", &standard_function_for_abc_2a0kl, DataReflectionConditions::AXIS_ABC),
1448+ DataReflectionConditions("45(cab),72(cab)" , "h0l:h,l=2n,hk0:h,k=2n", &standard_function_for_abc_2a0kl, DataReflectionConditions::AXIS_CAB),
1449+ DataReflectionConditions("45(bca),72(bca)" , "hk0:h,k=2n,0kl:k,l=2n", &standard_function_for_abc_2a0kl, DataReflectionConditions::AXIS_BCA),
1450+
1451+ DataReflectionConditions("46,74" , "h0l:h,l=2n", &standard_function_for_abc_2ah0l, DataReflectionConditions::AXIS_ABC),
1452+ DataReflectionConditions("46(cab),74(cab)" , "hk0:h,k=2n", &standard_function_for_abc_2ah0l, DataReflectionConditions::AXIS_CAB),
1453+ DataReflectionConditions("46(bca),74(bca)" , "0kl:k,l=2n", &standard_function_for_abc_2ah0l, DataReflectionConditions::AXIS_BCA),
1454+
1455+ DataReflectionConditions("73" , "0kl:k,l=2n,h0l:h,l=2n,hk0:h,k=2n", &standard_function_for_abc_23a0kl),
1456+
1457+ };
1458+ static const DataReflectionConditions DATA_TRICLINIC[DATA_NUM_TRICLINIC]
1459+ = {
1460+ DataReflectionConditions("No condition:1,2" , "", &is_not_extinct_none),
1461+ };
1462+
1463+// if( irc_type < 0 ){ return DATA_NONE; }
1464+
1465+ if( brav_type.enumBravaisType() == Cubic_F )
1466+ {
1467+ return DATA_CUBIC_F[(size_t) irc_type];
1468+ }
1469+ if( brav_type.enumBravaisType() == Cubic_I )
1470+ {
1471+ return DATA_CUBIC_I[(size_t) irc_type];
1472+ }
1473+ if ( brav_type.enumBravaisType() == Cubic_P )
1474+ {
1475+ return DATA_CUBIC_P[(size_t) irc_type];
1476+ }
1477+ if ( brav_type.enumBravaisType() == Hexagonal )
1478+ {
1479+ return DATA_HEXAGONAL[(size_t) irc_type];
1480+ }
1481+ if ( brav_type.enumBravaisType() == Tetragonal_P )
1482+ {
1483+ return DATA_TETRAGONAL_P[(size_t) irc_type];
1484+ }
1485+ if ( brav_type.enumBravaisType() == Tetragonal_I )
1486+ {
1487+ return DATA_TETRAGONAL_I[(size_t) irc_type];
1488+ }
1489+ if ( brav_type.enumBravaisType() == Rhombohedral )
1490+ {
1491+ if( brav_type.enumRHaxis() == Rho_Axis )
1492+ {
1493+ return DATA_RHOMBOHEDRAL_RHOM_AXIS[(size_t) irc_type];
1494+ }
1495+ if( brav_type.enumRHaxis() == Hex_Axis )
1496+ {
1497+ return DATA_RHOMBOHEDRAL_HEX_AXIS[(size_t) irc_type];
1498+ }
1499+ }
1500+ if ( brav_type.enumBravaisType() == Orthorhombic_P )
1501+ {
1502+ return DATA_ORTHORHOMBIC_P[(size_t) irc_type];
1503+ }
1504+ if ( brav_type.enumBravaisType() == Orthorhombic_C )
1505+ {
1506+ return DATA_ORTHORHOMBIC_C[(size_t) irc_type];
1507+ }
1508+ if ( brav_type.enumBravaisType() == Orthorhombic_F )
1509+ {
1510+ return DATA_ORTHORHOMBIC_F[(size_t) irc_type];
1511+ }
1512+ if ( brav_type.enumBravaisType() == Orthorhombic_I )
1513+ {
1514+ return DATA_ORTHORHOMBIC_I[(size_t) irc_type];
1515+ }
1516+ if ( brav_type.enumBravaisType() == Monoclinic_P )
1517+ {
1518+ if( brav_type.enumABCaxis() == A_Axis )
1519+ {
1520+ return DATA_MONOCLINIC_P_A_AXIS[(size_t) irc_type];
1521+ }
1522+ if( brav_type.enumABCaxis() == B_Axis )
1523+ {
1524+ return DATA_MONOCLINIC_P_B_AXIS[(size_t) irc_type];
1525+ }
1526+ if( brav_type.enumABCaxis() == C_Axis )
1527+ {
1528+ return DATA_MONOCLINIC_P_C_AXIS[(size_t) irc_type];
1529+ }
1530+ }
1531+ if ( brav_type.enumBravaisType() == Monoclinic_B )
1532+ {
1533+ if( brav_type.enumABCaxis() == A_Axis )
1534+ {
1535+ return DATA_MONOCLINIC_B_A_AXIS[(size_t) irc_type];
1536+ }
1537+ if( brav_type.enumABCaxis() == B_Axis )
1538+ {
1539+ return DATA_MONOCLINIC_B_B_AXIS[(size_t) irc_type];
1540+ }
1541+ if( brav_type.enumABCaxis() == C_Axis )
1542+ {
1543+ return DATA_MONOCLINIC_B_C_AXIS[(size_t) irc_type];
1544+ }
1545+ }
1546+ if ( brav_type.enumBravaisType() == Triclinic )
1547+ {
1548+ return DATA_TRICLINIC[(size_t) irc_type];
1549+ }
1550+
1551+ assert( false );
1552+ return DATA_TRICLINIC[0];
1553+}
1554+
1555+string DataReflectionConditions::putShortStringType() const
1556+{
1557+ string ans;
1558+ istringstream iss(type);
1559+ ZErrorMessage zerr = getdelim(iss, ans, "(");
1560+ if( zerr.putErrorType() == ZErrorDelimiterNotFound || isalpha(*(ans.rbegin()) ) ) return ans;
1561+ return type;
1562+}
--- Conograph/trunk/src/qc/reflection_conditions.hh (nonexistent)
+++ Conograph/trunk/src/qc/reflection_conditions.hh (revision 33)
@@ -0,0 +1,51 @@
1+#ifndef _REFLECTION_CONDITION_HH_
2+#define _REFLECTION_CONDITION_HH_
3+
4+#include "../RietveldAnalysisTypes.hh"
5+#include <assert.h>
6+
7+class BravaisType;
8+
9+// Declaration of a struct to store information about reflection conditions
10+class DataReflectionConditions
11+{
12+public:
13+ enum eAxisOrder{ AXIS_ABC, AXIS_CAB, AXIS_BCA, AXIS_BAC, AXIS_CBA, AXIS_ACB };
14+
15+private:
16+ string type;
17+ string str_conditions;
18+ bool (*is_not_extinct)(const Int4& h, const Int4& k, const Int4& l);
19+ eAxisOrder axis_order;
20+
21+public:
22+ DataReflectionConditions(const string& arg1, const string& arg2, bool(*arg3)(const Int4& h, const Int4& k, const Int4& l), const eAxisOrder arg4 = AXIS_ABC)
23+ {
24+ type = arg1;
25+ str_conditions = arg2;
26+ is_not_extinct = arg3;
27+ axis_order = arg4;
28+ }
29+
30+ string putShortStringType() const;
31+ inline const string& putStringType() const { return type; };
32+ inline const string& putStringConditions() const { return str_conditions; };
33+ inline bool isNotExtinct(const Int4& h, const Int4& k, const Int4& l) const
34+ {
35+ if( axis_order == AXIS_ABC ) return (*is_not_extinct)(h, k, l);
36+ if( axis_order == AXIS_CAB ) return (*is_not_extinct)(k, l, h);
37+ if( axis_order == AXIS_BCA ) return (*is_not_extinct)(l, h, k);
38+ if( axis_order == AXIS_BAC ) return (*is_not_extinct)(k, h, l);
39+ if( axis_order == AXIS_CBA ) return (*is_not_extinct)(l, k, h);
40+ if( axis_order == AXIS_ACB ) return (*is_not_extinct)(h, l, k);
41+ assert(false);
42+ return true;
43+ }
44+};
45+
46+Int4 putNumberOfTypesOfSystematicAbsences(const BravaisType& type);
47+
48+// Declaration of a function to get information about reflection conditions.
49+const DataReflectionConditions& putInformationOnReflectionConditions(const BravaisType& brav_type, const Int4& irc_type);
50+
51+#endif
--- Conograph/trunk/src/utility_data_structure/Node3.cc (revision 32)
+++ Conograph/trunk/src/utility_data_structure/Node3.cc (revision 33)
@@ -76,6 +76,7 @@
7676
7777 this->SumK(0, 1) = K01;
7878 this->SumK(0, 2) = K02;
79+ // |l1+l2|^2 = |l0|^2 + |l1|^2 + |l2|^2 + |l0+l1+l2|^2 - |l0+l1|^2 - |l0+l2|^2
7980 this->SumK(1, 2) = K0 + K1 + K2 + K3 - K01 - K02;
8081
8182 S = calculateS3(*this);
--- Conograph/trunk/src/utility_data_structure/NodeB.cc (revision 32)
+++ Conograph/trunk/src/utility_data_structure/NodeB.cc (revision 33)
@@ -192,21 +192,21 @@
192192 }
193193
194194
195-void NodeB::putQuadraticForm(const VecDat3<Int4>& hkl_left,
196- const VecDat3<Int4>& hkl_right,
197- multimap<Int4, VecDat3<Int4> >& qindex_hkl) const
198-{
199- if( !( this->IsBud() ) )
200- {
201- VecDat3<Int4> diff = hkl_left - hkl_right;
202- if( this->Upper() >= 0)
203- {
204- qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( this->Upper(), diff ) );
205- }
206- m_left_branch->putQuadraticForm(hkl_left*(-1), diff, qindex_hkl);
207- if( m_left != m_right ) m_right_branch->putQuadraticForm(hkl_right, diff, qindex_hkl);
208- }
209-}
195+//void NodeB::putQuadraticForm(const VecDat3<Int4>& hkl_left,
196+// const VecDat3<Int4>& hkl_right,
197+// multimap<Int4, VecDat3<Int4> >& qindex_hkl) const
198+//{
199+// if( !( this->IsBud() ) )
200+// {
201+// VecDat3<Int4> diff = hkl_left - hkl_right;
202+// if( this->Upper() >= 0)
203+// {
204+// qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( this->Upper(), diff ) );
205+// }
206+// m_left_branch->putQuadraticForm(hkl_left*(-1), diff, qindex_hkl);
207+// if( m_left != m_right ) m_right_branch->putQuadraticForm(hkl_right, diff, qindex_hkl);
208+// }
209+//}
210210
211211
212212 void NodeB::print(ostream& os, const Int4& num,
--- Conograph/trunk/src/utility_data_structure/NodeB.hh (revision 32)
+++ Conograph/trunk/src/utility_data_structure/NodeB.hh (revision 33)
@@ -69,9 +69,9 @@
6969
7070 void putRootBud(const Int4& K3, std::set<Bud>& tray) const;
7171 void putBud(const Int4& K3, std::set<Bud>& tray) const;
72- void putQuadraticForm(const VecDat3<Int4>& hkl_left,
73- const VecDat3<Int4>& hkl_right,
74- multimap<Int4, VecDat3<Int4> >& qindex_hkl) const;
72+// void putQuadraticForm(const VecDat3<Int4>& hkl_left,
73+// const VecDat3<Int4>& hkl_right,
74+// multimap<Int4, VecDat3<Int4> >& qindex_hkl) const;
7575
7676 inline Int4 count_bud() const;
7777
--- Conograph/trunk/src/utility_data_structure/SymMat.hh (revision 32)
+++ Conograph/trunk/src/utility_data_structure/SymMat.hh (revision 33)
@@ -28,10 +28,8 @@
2828 #define SYMMAT_H_
2929
3030 #include <assert.h>
31-#include "../utility_data_structure/nrutil_nr.hh"
31+#include <stddef.h>
3232
33-using namespace std;
34-
3533 // Class of a symmmetric matrix (a_ij) determined by m_mat as below.
3634 // m_mat[0] m_mat[1] m_mat[2]
3735 // (a_ij) = m_mat[1] m_mat[3] m_mat[4]
@@ -40,8 +38,8 @@
4038 class SymMat
4139 {
4240 private:
43- const Int4 ISIZE;
44- const Int4 NUM_ELEMENT;
41+ const int ISIZE;
42+ const int NUM_ELEMENT;
4543 T* m_mat;
4644
4745 inline T& operator[](const int&);
@@ -48,8 +46,8 @@
4846 inline const T& operator[](const int&) const;
4947
5048 public:
51- SymMat(const Int4& isize);
52- SymMat(const Int4& isize, const T&);
49+ SymMat(const int& isize);
50+ SymMat(const int& isize, const T&);
5351 SymMat(const SymMat<T>&); // copy constructor
5452 ~SymMat();
5553
@@ -64,7 +62,7 @@
6462 inline T& operator()(const int&, const int&);
6563 inline const T& operator()(const int&, const int&) const;
6664
67- inline const Int4& size() const { return ISIZE; };
65+ inline const int& size() const { return ISIZE; };
6866
6967 // for GUI
7068 const T *getref_m_mat() const {return m_mat;}
@@ -72,7 +70,7 @@
7270 };
7371
7472 template <class T>
75-SymMat<T>::SymMat(const Int4& isize) : ISIZE(isize), NUM_ELEMENT(isize*(isize+1)/2), m_mat(NULL)
73+SymMat<T>::SymMat(const int& isize) : ISIZE(isize), NUM_ELEMENT(isize*(isize+1)/2), m_mat(NULL)
7674 {
7775 assert( isize >= 0 );
7876 if( isize > 0 ) m_mat = new T[NUM_ELEMENT];
@@ -79,7 +77,7 @@
7977 }
8078
8179 template <class T>
82-SymMat<T>::SymMat(const Int4& isize, const T& a) : ISIZE(isize), NUM_ELEMENT(isize*(isize+1)/2), m_mat(NULL)
80+SymMat<T>::SymMat(const int& isize, const T& a) : ISIZE(isize), NUM_ELEMENT(isize*(isize+1)/2), m_mat(NULL)
8381 {
8482 assert( isize >= 0 );
8583 if( isize > 0 ) m_mat = new T[NUM_ELEMENT];
@@ -194,7 +192,7 @@
194192 }
195193
196194
197-inline Int4 put_index(const int& ISIZE, const int& j, const int& k)
195+inline int put_index(const int& ISIZE, const int& j, const int& k)
198196 {
199197 if( j < k ) return j*(ISIZE*2-j-1)/2 + k;
200198 else return k*(ISIZE*2-k-1)/2 + j;
@@ -218,7 +216,7 @@
218216 }
219217
220218
221-inline Double Determinant3(const SymMat<Double>& rhs)
219+inline double Determinant3(const SymMat<double>& rhs)
222220 {
223221 assert( rhs.size() == 3 );
224222
@@ -228,20 +226,20 @@
228226 }
229227
230228
231-inline SymMat<Double> Inverse3(const SymMat<Double>& rhs)
229+inline SymMat<double> Inverse3(const SymMat<double>& rhs)
232230 {
233231 assert( rhs.size() == 3 );
234232
235- const Double det01 = rhs(0,0)*rhs(1,1)-rhs(0,1)*rhs(1,0);
236- const Double det02 = rhs(0,0)*rhs(2,2)-rhs(0,2)*rhs(2,0);
237- const Double det12 = rhs(1,1)*rhs(2,2)-rhs(1,2)*rhs(2,1);
238- const Double det01_02 = rhs(0,0)*rhs(1,2)-rhs(0,2)*rhs(1,0);
239- const Double det01_12 = rhs(0,1)*rhs(1,2)-rhs(0,2)*rhs(1,1);
240- const Double det02_12 = rhs(0,1)*rhs(2,2)-rhs(0,2)*rhs(2,1);
233+ const double det01 = rhs(0,0)*rhs(1,1)-rhs(0,1)*rhs(1,0);
234+ const double det02 = rhs(0,0)*rhs(2,2)-rhs(0,2)*rhs(2,0);
235+ const double det12 = rhs(1,1)*rhs(2,2)-rhs(1,2)*rhs(2,1);
236+ const double det01_02 = rhs(0,0)*rhs(1,2)-rhs(0,2)*rhs(1,0);
237+ const double det01_12 = rhs(0,1)*rhs(1,2)-rhs(0,2)*rhs(1,1);
238+ const double det02_12 = rhs(0,1)*rhs(2,2)-rhs(0,2)*rhs(2,1);
241239
242- const Double det = 1.0/(rhs(0,0)*det12 - rhs(0,1)*det02_12 + rhs(0,2)*det01_12);
240+ const double det = 1.0/(rhs(0,0)*det12 - rhs(0,1)*det02_12 + rhs(0,2)*det01_12);
243241
244- SymMat<Double> ans(3);
242+ SymMat<double> ans(3);
245243 ans(0,0) = det12;
246244 ans(1,1) = det02;
247245 ans(2,2) = det01;
--- Conograph/trunk/src/utility_data_structure/SymMat43_VCData.hh (revision 32)
+++ Conograph/trunk/src/utility_data_structure/SymMat43_VCData.hh (revision 33)
@@ -29,6 +29,7 @@
2929
3030 #include "../utility_data_structure/SymMat.hh"
3131 #include "../utility_data_structure/VCData.hh"
32+#include "../utility_data_structure/nrutil_nr.hh"
3233
3334 // Assume the first element is a symmetric matrix of size 3 and the second element is a 4-by-3 matrix.
3435 typedef pair< SymMat<VCData>, NRMat<Int4> > SymMat43_VCData;
--- Conograph/trunk/src/utility_data_structure/SymMatNplus1N.hh (revision 32)
+++ Conograph/trunk/src/utility_data_structure/SymMatNplus1N.hh (revision 33)
@@ -28,9 +28,10 @@
2828 #define SYMMATNPLUS1N_HH_
2929
3030 #include "../utility_data_structure/SymMat.hh"
31+#include "../utility_data_structure/nrutil_nr.hh"
3132
32-typedef pair< SymMat<Double>, NRMat<Int4> > SymMatNplus1N_Double;
33+typedef pair< SymMat<double>, NRMat<int> > SymMatNplus1N_Double;
3334 // Assume the first element is a symmetric matrix of size 3 and the second element is a 4-by-3 matrix.
34-typedef pair< SymMat<Double>, NRMat<Int4> > SymMat43_Double;
35+typedef pair< SymMat<double>, NRMat<int> > SymMat43_Double;
3536
3637 #endif /*SYMMATNPLUS1N_HH_*/
--- Conograph/trunk/src/utility_data_structure/TreeLattice.cc (revision 32)
+++ Conograph/trunk/src/utility_data_structure/TreeLattice.cc (revision 33)
@@ -25,6 +25,7 @@
2525 *
2626 */
2727 #include <algorithm>
28+#include <cmath>
2829 #include "FracMat.hh"
2930 #include "TreeLattice.hh"
3031
@@ -206,78 +207,92 @@
206207 }
207208
208209
209-bool TreeLattice::putQuadraticForm(SymMat<Double>& Q, multimap<Int4, VecDat3<Int4> >& qindex_hkl) const
210-{
211- static const VecDat3<Int4> hkl100(1,0,0);
212- static const VecDat3<Int4> hkl010(0,1,0);
213- static const VecDat3<Int4> hkl_1_10(-1,-1,0);
210+//bool TreeLattice::putQuadraticForm(SymMat<Double>& Q, multimap<Int4, VecDat3<Int4> >& qindex_hkl) const
211+//{
212+// static const VecDat3<Int4> hkl100(1,0,0);
213+// static const VecDat3<Int4> hkl010(0,1,0);
214+// static const VecDat3<Int4> hkl_1_10(-1,-1,0);
215+//
216+// qindex_hkl.clear();
217+// if( m_root == NULL ) return false;
218+//
219+// if(m_root->Left() >= 0)
220+// {
221+// qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root->Left(), hkl100 ) );
222+// }
223+// if(m_root->Right() >= 0)
224+// {
225+// qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root->Right(), hkl010 ) );
226+// }
227+//
228+// if( m_root_on_left != NULL )
229+// {
230+// if(m_root_on_left->Right() >= 0)
231+// {
232+// qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root_on_left->Right(), hkl_1_10 ) );
233+// }
234+//
235+// m_root->putQuadraticForm(hkl100, hkl010, qindex_hkl);
236+// m_root_on_left->putQuadraticForm(hkl010, hkl_1_10, qindex_hkl);
237+// if( m_root_on_right != NULL ) m_root_on_right->putQuadraticForm(hkl_1_10, hkl100, qindex_hkl);
238+// }
239+// else if( m_root_on_right != NULL )
240+// {
241+// if(m_root_on_right->Left() >= 0)
242+// {
243+// qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root_on_right->Left(), hkl_1_10 ) );
244+// }
245+//
246+// m_root->putQuadraticForm(hkl100, hkl010, qindex_hkl);
247+// m_root_on_right->putQuadraticForm(hkl_1_10, hkl100, qindex_hkl);
248+// }
249+// else
250+// {
251+// m_root->putQuadraticForm(hkl100, hkl010, qindex_hkl);
252+// }
253+//
254+// if( qindex_hkl.size() < 3 ) return false;
255+//
256+// const vector<QData>& qdata = VCData::putPeakQData();
257+// NRMat<Int4> icoef(3,3);
258+// NRVec<Double> qvalue(3);
259+//
260+// multimap<Int4, VecDat3<Int4> >::const_iterator it = qindex_hkl.begin();
261+// icoef[0][0] = it->second[0]*it->second[0];
262+// icoef[0][1] = it->second[1]*it->second[1];
263+// icoef[0][2] = it->second[0]*it->second[1]*2;
264+// qvalue[0] = qdata[(it++)->first].q;
265+// icoef[1][0] = it->second[0]*it->second[0];
266+// icoef[1][1] = it->second[1]*it->second[1];
267+// icoef[1][2] = it->second[0]*it->second[1]*2;
268+// qvalue[1] = qdata[(it++)->first].q;
269+// icoef[2][0] = it->second[0]*it->second[0];
270+// icoef[2][1] = it->second[1]*it->second[1];
271+// icoef[2][2] = it->second[0]*it->second[1]*2;
272+// qvalue[2] = qdata[(it++)->first].q;
273+//
274+// const FracMat inv_mat = FInverse3( icoef );
275+// assert( Q.size() == 2 );
276+//
277+// Q(0,0) = ( inv_mat.mat[0][0]*qvalue[0] + inv_mat.mat[0][1]*qvalue[1] + inv_mat.mat[0][2]*qvalue[2] ) / inv_mat.denom;
278+// Q(1,1) = ( inv_mat.mat[1][0]*qvalue[0] + inv_mat.mat[1][1]*qvalue[1] + inv_mat.mat[1][2]*qvalue[2] ) / inv_mat.denom;
279+// Q(0,1) = ( inv_mat.mat[2][0]*qvalue[0] + inv_mat.mat[2][1]*qvalue[1] + inv_mat.mat[2][2]*qvalue[2] ) / inv_mat.denom;
280+//
281+// return true;
282+//}
214283
215- qindex_hkl.clear();
216- if( m_root == NULL ) return false;
217284
218- if(m_root->Left() >= 0)
219- {
220- qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root->Left(), hkl100 ) );
221- }
222- if(m_root->Right() >= 0)
223- {
224- qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root->Right(), hkl010 ) );
225- }
285+void TreeLattice::putQuadraticForm(SymMat<VCData>& Q) const
286+{
287+ assert(Q.size() == 2);
288+ if( m_root == NULL ) return;
289+ if( m_root->IsBud() ) return;
226290
227- if( m_root_on_left != NULL )
228- {
229- if(m_root_on_left->Right() >= 0)
230- {
231- qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root_on_left->Right(), hkl_1_10 ) );
232- }
233-
234- m_root->putQuadraticForm(hkl100, hkl010, qindex_hkl);
235- m_root_on_left->putQuadraticForm(hkl010, hkl_1_10, qindex_hkl);
236- if( m_root_on_right != NULL ) m_root_on_right->putQuadraticForm(hkl_1_10, hkl100, qindex_hkl);
237- }
238- else if( m_root_on_right != NULL )
239- {
240- if(m_root_on_right->Left() >= 0)
241- {
242- qindex_hkl.insert( multimap<Int4, VecDat3<Int4> >::value_type( m_root_on_right->Left(), hkl_1_10 ) );
243- }
244-
245- m_root->putQuadraticForm(hkl100, hkl010, qindex_hkl);
246- m_root_on_right->putQuadraticForm(hkl_1_10, hkl100, qindex_hkl);
247- }
248- else
249- {
250- m_root->putQuadraticForm(hkl100, hkl010, qindex_hkl);
251- }
252-
253- if( qindex_hkl.size() < 3 ) return false;
254-
255- const vector<QData>& qdata = VCData::putPeakQData();
256- NRMat<Int4> icoef(3,3);
257- NRVec<Double> qvalue(3);
258-
259- multimap<Int4, VecDat3<Int4> >::const_iterator it = qindex_hkl.begin();
260- icoef[0][0] = it->second[0]*it->second[0];
261- icoef[0][1] = it->second[1]*it->second[1];
262- icoef[0][2] = it->second[0]*it->second[1]*2;
263- qvalue[0] = qdata[(it++)->first].q;
264- icoef[1][0] = it->second[0]*it->second[0];
265- icoef[1][1] = it->second[1]*it->second[1];
266- icoef[1][2] = it->second[0]*it->second[1]*2;
267- qvalue[1] = qdata[(it++)->first].q;
268- icoef[2][0] = it->second[0]*it->second[0];
269- icoef[2][1] = it->second[1]*it->second[1];
270- icoef[2][2] = it->second[0]*it->second[1]*2;
271- qvalue[2] = qdata[(it++)->first].q;
272-
273- const FracMat inv_mat = FInverse3( icoef );
274- assert( Q.size() == 2 );
275-
276- Q(0,0) = ( inv_mat.mat[0][0]*qvalue[0] + inv_mat.mat[0][1]*qvalue[1] + inv_mat.mat[0][2]*qvalue[2] ) / inv_mat.denom;
277- Q(1,1) = ( inv_mat.mat[1][0]*qvalue[0] + inv_mat.mat[1][1]*qvalue[1] + inv_mat.mat[1][2]*qvalue[2] ) / inv_mat.denom;
278- Q(0,1) = ( inv_mat.mat[2][0]*qvalue[0] + inv_mat.mat[2][1]*qvalue[1] + inv_mat.mat[2][2]*qvalue[2] ) / inv_mat.denom;
279-
280- return true;
291+ set<Bud> budtray;
292+ this->putRootBuds(budtray);
293+ Q(0,0) = budtray.begin()->Q1();
294+ Q(1,1) = budtray.begin()->Q2();
295+ Q(0,1) = ( Q(0,0) + Q(1,1) - budtray.begin()->Q3() )/2;
281296 }
282297
283298
@@ -286,18 +301,26 @@
286301 if( m_root == NULL ) return;
287302 if( m_root->IsBud() ) return;
288303
289- os << "* count : " << this->putCountOfQ() << endl;
290-
291- if( HeadIsTail )
304+ os << "* Number of used peak positions: " << this->putCountOfQ() << endl;
305+ SymMat<VCData> Q(2);
306+ this->putQuadraticForm(Q);
307+
308+ const Double det_Inv_Q = 1.0/( Q(0,0).Value()*Q(1,1).Value() - Q(0,1).Value()*Q(0,1).Value() );
309+ SymMat<Double> Inv_Q(2);
310+ Inv_Q(0,0) = Q(1,1).Value()*det_Inv_Q;
311+ Inv_Q(1,1) = Q(0,0).Value()*det_Inv_Q;
312+ Inv_Q(0,1) = -Q(0,1).Value()*det_Inv_Q;
313+
314+ Double a = sqrt(Q(0,0).Value());
315+ Double b = sqrt(Q(1,1).Value());
316+ os << "* (a*, b*, \\gamma*): (" << a << ", " << b << ", " << acos(Q(0,1).Value()/(a*b))*180.0/M_PI << ")\n";
317+
318+ a = sqrt(Inv_Q(0,0));
319+ b = sqrt(Inv_Q(1,1));
320+ os << "* (a, b, \\gamma): (" << a << ", " << b << ", " << acos(Inv_Q(0,1)/(a*b))*180.0/M_PI << ")\n";
321+
322+ if( HeadIsTail )
292323 {
293- os << "* This topograph contains a super-basis : ";
294- set<Bud> budtray;
295- this->putRootBuds(budtray);
296- os << "(" << budtray.begin()->Q3() << ",";
297- os << budtray.begin()->Q1() << ",";
298- os << budtray.begin()->Q2() << ")";
299- os << endl;
300-
301324 os.width(15);
302325 if( m_root->Upper() < 0 ) os << -1;
303326 else os << m_root->Upper() + 1; // HeadIsTail is true.
@@ -310,14 +333,6 @@
310333 }
311334 else if( m_root_on_left != NULL || m_root_on_right != NULL )
312335 {
313- os << "* This topograph contains a super-basis : ";
314- set<Bud> budtray;
315- this->putRootBuds(budtray);
316- os << "(" << budtray.begin()->Q3() << ",";
317- os << budtray.begin()->Q1() << ",";
318- os << budtray.begin()->Q2() << ")";
319- os << endl;
320-
321336 os.width(15);
322337 if( m_root_on_left != NULL )
323338 {
--- Conograph/trunk/src/utility_data_structure/TreeLattice.hh (revision 32)
+++ Conograph/trunk/src/utility_data_structure/TreeLattice.hh (revision 33)
@@ -89,7 +89,8 @@
8989 void putRootBuds(set<Bud>& tray) const;
9090 void putBud(set<Bud>& tray) const;
9191
92- bool putQuadraticForm(SymMat<Double>& Q, multimap<Int4, VecDat3<Int4> >& qindex_hkl) const;
92+ void putQuadraticForm(SymMat<VCData>& Q) const;
93+// bool putQuadraticForm(SymMat<Double>& Q, multimap<Int4, VecDat3<Int4> >& qindex_hkl) const;
9394
9495 void print(ostream&, const Double& minQ, const Double& maxQ) const;
9596
--- Conograph/trunk/src/utility_func/gcd.hh (revision 32)
+++ Conograph/trunk/src/utility_func/gcd.hh (revision 33)
@@ -48,7 +48,7 @@
4848 inline bool dbl2fraction(const Double& dbl, pair<Int4, Int4>& frac)
4949 {
5050 const Int4 k = iround_half_up(dbl*48);
51- if( fabs( k - dbl*48 ) >= 1.0e-2 ) return false;
51+ if( fabs( k - dbl*48 ) >= 1.0e-8 ) return false;
5252
5353 if( k == 0 )
5454 {
--- Conograph/trunk/src/utility_func/lattice_constant.hh (revision 32)
+++ Conograph/trunk/src/utility_func/lattice_constant.hh (revision 33)
@@ -35,7 +35,7 @@
3535
3636 inline const Int4& PNLatConst()
3737 {
38- static const Int4 PNLatConst = 6; // The number of paramters for the isotropic Debye-Waller factor.
38+ static const Int4 PNLatConst = 6; // The number of parameters for the isotropic Debye-Waller factor.
3939 return PNLatConst;
4040 }
4141
--- Conograph/trunk/src/utility_func/zmath.hh (revision 32)
+++ Conograph/trunk/src/utility_func/zmath.hh (revision 33)
@@ -96,12 +96,12 @@
9696
9797 inline Int8 iceil(const Double& num)
9898 {
99- return lrint( ceil(num) );
99+ return Int8( ceil(num) + 0.01 );
100100 }
101101
102102 inline Int8 ifloor(const Double& num)
103103 {
104- return lrint( floor(num) );
104+ return Int8( floor(num) + 0.01 );
105105 }
106106
107107 #endif /*MATH_HH_*/
--- Conograph/trunk/src/utility_func/zstring.cc (revision 32)
+++ Conograph/trunk/src/utility_func/zstring.cc (revision 33)
@@ -120,8 +120,8 @@
120120 ans.clear();
121121 if( delim.empty() ) return ZErrorMessage(ZErrorArgument, "Delimiter is empty", __FILE__, __LINE__, __FUNCTION__);
122122
123- const UInt4 ilength = delim.length();
124- UInt4 count = 0;
123+ const int ilength = delim.length();
124+ int count = 0;
125125 char c;
126126 while( ifs.get(c) )
127127 {
@@ -135,7 +135,7 @@
135135 }
136136 else
137137 {
138- Int4 i;
138+ int i;
139139 for(i=count-1; i>=0; i--)
140140 {
141141 if( delim.at(i) == c )
--- Conograph/trunk/src/utility_func/zstring.hh (revision 32)
+++ Conograph/trunk/src/utility_func/zstring.hh (revision 33)
@@ -27,10 +27,14 @@
2727 #ifndef _ZSTRING_HH_
2828 #define _ZSTRING_HH_
2929
30+#include <vector>
3031 #include <sstream>
31-#include "../RietveldAnalysisTypes.hh"
32-#include "../zerror_type/error_mes.hh"
32+#include "../zerror_type/ZErrorType.hh"
3333
34+class ZErrorMessage;
35+
36+using namespace std;
37+
3438 // Change the argument type from T to string.
3539 template<class T>
3640 inline bool str2num(const string& str, T& ans)
@@ -52,7 +56,7 @@
5256
5357
5458 template<class T>
55-inline string num2str(const T& num, const Int4& precision)
59+inline string num2str(const T& num, const int& precision)
5660 {
5761 stringstream strstream;
5862 strstream.precision(precision);
--- Conograph/trunk/src/utility_lattice_reduction/matrix_NbyN.hh (revision 32)
+++ Conograph/trunk/src/utility_lattice_reduction/matrix_NbyN.hh (revision 33)
@@ -153,22 +153,32 @@
153153 {
154154 assert( i < j );
155155 assert( 3 <= ISIZE && ISIZE <= 4 );
156- static const NRMat<Int4> trans_mat3[3]
157- = {
158- put_reduct_mat(3, 0, 1),
159- put_reduct_mat(3, 0, 2),
160- put_reduct_mat(3, 1, 2),
161- };
162156
163- static const NRMat<Int4> trans_mat4[6]
164- = {
165- put_reduct_mat(4, 0, 1),
166- put_reduct_mat(4, 0, 2),
167- put_reduct_mat(4, 0, 3),
168- put_reduct_mat(4, 1, 2),
169- put_reduct_mat(4, 1, 3),
170- put_reduct_mat(4, 2, 3)
171- };
157+ // 2014.11.6 VIC Tamura. (For programs compiled with Visual Studio C++)
158+ const NRMat<Int4>* trans_mat3;
159+ const NRMat<Int4>* trans_mat4;
160+#ifdef _OPENMP
161+#pragma omp critical
162+#endif
163+{
164+ static const NRMat<Int4> trans_mat3_[3]
165+ = {
166+ put_reduct_mat(3, 0, 1),
167+ put_reduct_mat(3, 0, 2),
168+ put_reduct_mat(3, 1, 2),
169+ };
170+ static const NRMat<Int4> trans_mat4_[6]
171+ = {
172+ put_reduct_mat(4, 0, 1),
173+ put_reduct_mat(4, 0, 2),
174+ put_reduct_mat(4, 0, 3),
175+ put_reduct_mat(4, 1, 2),
176+ put_reduct_mat(4, 1, 3),
177+ put_reduct_mat(4, 2, 3)
178+ };
179+ trans_mat3 = trans_mat3_;
180+ trans_mat4 = trans_mat4_;
181+}
172182
173183 if( ISIZE == 3 ) return trans_mat3[ i*(3-i)/2 + j-1 ];
174184 else return trans_mat4[ i*(5-i)/2 + j-1 ];
--- Conograph/trunk/src/utility_lattice_reduction/put_Buerger_reduced_lattice.hh (revision 32)
+++ Conograph/trunk/src/utility_lattice_reduction/put_Buerger_reduced_lattice.hh (revision 33)
@@ -314,7 +314,7 @@
314314 void putBuergerReducedMonoclinicP(const Int4& i, const Int4& j,
315315 SymMat<T>& S_red, NRMat<Int4>& trans_mat2)
316316 {
317- T zerro = 0;
317+ static const T zerro = 0;
318318
319319 assert(S_red.size()==3);
320320 assert(trans_mat2.ncols()==3);
@@ -340,7 +340,7 @@
340340 const Int8 m = iceil( S_red(i,j) / S_red(j,j) );
341341
342342 S_red(i,i) += ( S_red(j,j) * m - S_red(i,j) * 2 ) * m;
343- assert( !(S_red(i,i) < zerro) );
343+ assert( zerro < S_red(i,i) );
344344 S_red(i,j) = S_red(j,j) * m - S_red(i,j);
345345
346346 for(Int4 l=0; l<irow; l++)
@@ -362,7 +362,7 @@
362362 const Int8 n = iceil( S_red(i,j) / S_red(i,i) );
363363
364364 S_red(j,j) += ( S_red(i,i) * n - S_red(i,j) * 2 ) * n;
365- assert( !( S_red(j,j) < zerro ) );
365+ assert( zerro < S_red(j,j) );
366366 S_red(i,j) = S_red(i,i) * n - S_red(i,j);
367367
368368 for(Int4 l=0; l<irow; l++)
@@ -405,7 +405,7 @@
405405 const Int4 iabc_axis = monoclinic_b_type.enumABCaxis();
406406 const Int4 ir = put_complement_set3(iabc_axis, ibase_axis);
407407
408- T zerro = 0;
408+ static const T zerro = 0;
409409
410410 assert(S_red.size()==3);
411411 assert(trans_mat2.nrows()==0 || trans_mat2.ncols()==3);
@@ -431,7 +431,7 @@
431431 const Int8 m2 = m1*2;
432432
433433 S_red( ibase_axis, ibase_axis ) += ( S_red( ir, ir ) * m2 - S_red( ibase_axis, ir ) * 2 ) * m2;
434- assert( !( S_red( ibase_axis, ibase_axis ) < zerro ) );
434+ assert( zerro < S_red( ibase_axis, ibase_axis ) );
435435 S_red( ibase_axis, ir ) = S_red( ir, ir ) * m2 - S_red( ibase_axis, ir );
436436
437437 for(Int4 l=0; l<irow; l++)
@@ -453,7 +453,7 @@
453453 const Int4 n = iceil( S_red( ibase_axis, ir ) / S_red( ibase_axis, ibase_axis ) );
454454
455455 S_red( ir, ir ) += ( S_red( ibase_axis, ibase_axis ) * n - S_red( ibase_axis, ir ) * 2 ) * n;
456- assert( !( S_red( ir, ir ) < zerro ) );
456+ assert( zerro < S_red( ir, ir ) );
457457 S_red( ibase_axis, ir ) = S_red( ibase_axis, ibase_axis ) * n - S_red( ibase_axis, ir );
458458
459459 for(Int4 l=0; l<irow; l++)
--- Conograph/trunk/src/zerror_type/ZErrorType.hh (revision 32)
+++ Conograph/trunk/src/zerror_type/ZErrorType.hh (revision 33)
@@ -24,12 +24,12 @@
2424 THE SOFTWARE.
2525 *
2626 */
27-#ifndef _ERROR_TYPE_H_
28-#define _ERROR_TYPE_H_
27+#ifndef _ZCODE_ERROR_TYPE_HH_
28+#define _ZCODE_ERROR_TYPE_HH_
2929
3030 typedef enum {
3131 ZErrorNoError = 0, // no error
32-
32+
3333 //Standard Error
3434 ZErrorFailedMemoryAllocate,
3535 ZErrorArgmentSize,
@@ -54,7 +54,7 @@
5454 ZErrorNotIGORFile,
5555 ZErrorErrorsAreNotContained,
5656 ZErrorPeakPositionsAreNotContained,
57-
57+
5858 //Undefined
5959 ZErrorUndefined,
6060
旧リポジトリブラウザで表示