hpp::core::WeighedDistance Class Reference

Weighed distance between configurations. More...

#include <hpp/core/weighed-distance.hh>

Inheritance diagram for hpp::core::WeighedDistance:
Collaboration diagram for hpp::core::WeighedDistance:

List of all members.

Public Member Functions

virtual DistancePtr_t clone () const
value_type getWeight (int rank) const
 Get weight of joint at given rank.
void setWeight (unsigned int rank, value_type weight)
 Set weight of joint at given rank.
const DevicePtr_trobot () const
 Get robot.

Static Public Member Functions

static WeighedDistancePtr_t create (const DevicePtr_t &robot)
static WeighedDistancePtr_t create (const DevicePtr_t &robot, const std::vector< value_type > &weights)
static WeighedDistancePtr_t createCopy (const WeighedDistancePtr_t &distance)

Protected Member Functions

 WeighedDistance (const DevicePtr_t &robot)
 WeighedDistance (const DevicePtr_t &robot, const std::vector< value_type > &weights)
 WeighedDistance (const WeighedDistance &distance)
void init (WeighedDistanceWkPtr_t self)
virtual value_type impl_distance (ConfigurationIn_t q1, ConfigurationIn_t q2) const
 Derived class should implement this function.

Detailed Description

Weighed distance between configurations.

Euclidean distance between configurations seen as vectors. Each degree of freedom is weighed by a positive value.


Constructor & Destructor Documentation

hpp::core::WeighedDistance::WeighedDistance ( const DevicePtr_t robot) [protected]
hpp::core::WeighedDistance::WeighedDistance ( const DevicePtr_t robot,
const std::vector< value_type > &  weights 
) [protected]
hpp::core::WeighedDistance::WeighedDistance ( const WeighedDistance distance) [protected]

Member Function Documentation

virtual DistancePtr_t hpp::core::WeighedDistance::clone ( ) const [virtual]

Implements hpp::core::Distance.

static WeighedDistancePtr_t hpp::core::WeighedDistance::create ( const DevicePtr_t robot) [static]
static WeighedDistancePtr_t hpp::core::WeighedDistance::create ( const DevicePtr_t robot,
const std::vector< value_type > &  weights 
) [static]
static WeighedDistancePtr_t hpp::core::WeighedDistance::createCopy ( const WeighedDistancePtr_t distance) [static]
value_type hpp::core::WeighedDistance::getWeight ( int  rank) const

Get weight of joint at given rank.

Parameters:
rankrank of the joint in robot joint vector
virtual value_type hpp::core::WeighedDistance::impl_distance ( ConfigurationIn_t  q1,
ConfigurationIn_t  q2 
) const [protected, virtual]

Derived class should implement this function.

Implements hpp::core::Distance.

void hpp::core::WeighedDistance::init ( WeighedDistanceWkPtr_t  self) [protected]
const DevicePtr_t& hpp::core::WeighedDistance::robot ( ) const [inline]

Get robot.

void hpp::core::WeighedDistance::setWeight ( unsigned int  rank,
value_type  weight 
)

Set weight of joint at given rank.

Parameters:
rankrank of the joint in robot joint vector