Changeset daf5d6 for molecuilder/src/molecules.cpp
- Timestamp:
- Aug 19, 2009, 12:30:21 PM (16 years ago)
- Children:
- 78dac6
- Parents:
- 27459a (diff), 6c09a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
molecuilder/src/molecules.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.cpp
r27459a rdaf5d6 7 7 #include "config.hpp" 8 8 #include "molecules.hpp" 9 10 /************************************* Other Functions *************************************/11 12 /** Determines sum of squared distances of \a X to all \a **vectors.13 * \param *x reference vector14 * \param *params15 * \return sum of square distances16 */17 double LSQ (const gsl_vector * x, void * params)18 {19 double sum = 0.;20 struct LSQ_params *par = (struct LSQ_params *)params;21 Vector **vectors = par->vectors;22 int num = par->num;23 24 for (int i=num;i--;) {25 for(int j=NDIM;j--;)26 sum += (gsl_vector_get(x,j) - (vectors[i])->x[j])*(gsl_vector_get(x,j) - (vectors[i])->x[j]);27 }28 29 return sum;30 };31 9 32 10 /************************************* Functions for class molecule *********************************/
Note:
See TracChangeset
for help on using the changeset viewer.
