11 #ifndef IMPKINEMATICS_DOF_VALUES_H
12 #define IMPKINEMATICS_DOF_VALUES_H
16 IMPKINEMATICS_BEGIN_NAMESPACE
21 class IMPKINEMATICSEXPORT DOFValues :
public std::vector<double> {
24 DOFValues(
const DOFs& dofs) {
26 for(
unsigned int i=0; i<dofs.size(); i++)
27 push_back(dofs[i]->get_value());
35 double get_distance2(
const DOFValues& other_dof_values)
const {
37 for(
unsigned int i=0; i<size(); i++) {
38 double diff = ((*this)[i] - other_dof_values[i]);
44 double get_distance(
const DOFValues& other_dof_values)
const {
45 return sqrt(get_distance2(other_dof_values));
55 for(
unsigned int i=1 ; i < size(); i++) {
56 out <<
"," << operator[](i);
66 IMPKINEMATICS_END_NAMESPACE
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
double get_distance(const Plane3D &pln, const Vector3D &p)
Return the distance between a plane and a point in 3D.
IMP::base::Vector< IMP::base::Pointer< DOF > > DOFs