Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Conograph/trunk/src/lattice_symmetry/gather_q_of_Ndim_lattice.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 32 by rtomiyasu, Mon Jul 7 02:35:51 2014 UTC revision 33 by rtomiyasu, Wed Sep 7 04:38:51 2016 UTC
# Line 174  static void set_candidate_Q(const Int4& Line 174  static void set_candidate_Q(const Int4&
174  }  }
175    
176    
 // On input, S_super = TransMat * S * transpose(TransMat).  
177  void gatherQcal(const SymMat<Double>& S_super,  void gatherQcal(const SymMat<Double>& S_super,
178                  const Double& maxQ,                  const Double& maxQ,
179                  vector<HKL_Q>& qcal_tray                  vector<HKL_Q>& qcal_tray
# Line 196  void gatherQcal(const SymMat<Double>& S_ Line 195  void gatherQcal(const SymMat<Double>& S_
195  }  }
196    
197    
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    
226  bool associateQcalWithQobs(  bool associateQcalWithQobs(
227                  const vector<HKL_Q>::const_iterator& it_begin,                  const vector<HKL_Q>::const_iterator& it_begin,
228              const vector<HKL_Q>::const_iterator& it_end,              const vector<HKL_Q>::const_iterator& it_end,

Legend:
Removed from v.32  
changed lines
  Added in v.33

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26