• R/O
  • SSH
  • HTTPS

conograph: Commit


Commit MetaInfo

Revision24 (tree)
Zeit2014-05-15 09:49:01
Autorrtomiyasu

Log Message

The following are modified a little.
1. a function to judge if two numbers including errors equal.
2. a not-in-use function to judge if two Delone reduced metric tensors equal.

Ändern Zusammenfassung

Diff

--- BLDConograph_ver1/trunk/src/lattice_symmetry/check_equiv.hh (revision 23)
+++ BLDConograph_ver1/trunk/src/lattice_symmetry/check_equiv.hh (revision 24)
@@ -34,8 +34,8 @@
3434 const Double& resol)
3535 {
3636 Double diff = lhs - rhs;
37- Double max_value = max( fabs(lhs), fabs(rhs) );
38- if( fabs( diff ) <= max_value * resol ) return true;
37+ Double min_value = min( fabs(lhs), fabs(rhs) );
38+ if( fabs( diff ) <= min_value * resol ) return true;
3939 return false;
4040 }
4141
@@ -102,12 +102,12 @@
102102 const Int4 ISIZE = lhs.size();
103103 for(Int4 i=0; i<ISIZE; i++)
104104 {
105-// if( !equiv_resol( lhs(i,i), rhs(i,i), resol2) )
106-// {
107-// return false;
108-// }
109- for(Int4 j=0; j<i; j++)
105+ if( !equiv_resol( lhs(i,i), rhs(i,i), resol) )
110106 {
107+ return false;
108+ }
109+ for(Int4 j=1; j<i; j++)
110+ {
111111 if( !equiv_resol( lhs(i,i)+lhs(j,j)+lhs(i,j)*2.0, rhs(i,i)+rhs(j,j)+rhs(i,j)*2.0, resol) )
112112 {
113113 return false;
Show on old repository browser