hpp-core: hpp::core::NearestNeighbor Class Reference

hpp-core 9.0.2 Implement basic classes for canonical path planning for kinematic chains.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpp::core::NearestNeighbor Class Referenceabstract

Optimization of the nearest neighbor search. More...

`#include <hpp/core/nearest-neighbor.hh>`

## Public Member Functions
virtual void | clear ()=0
virtual void | addNode (const NodePtr_t &node)=0
virtual NodePtr_t | search (ConfigurationIn_t configuration, const ConnectedComponentPtr_t &connectedComponent, value_type &distance, bool reverse=false)=0
| search Return the closest node of the given configuration
virtual NodePtr_t | search (const NodePtr_t &node, const ConnectedComponentPtr_t &connectedComponent, value_type &distance)=0
virtual Nodes_t | KnearestSearch (ConfigurationIn_t configuration, const ConnectedComponentPtr_t &connectedComponent, const std::size_t K, value_type &distance)=0
virtual Nodes_t | KnearestSearch (const NodePtr_t &node, const ConnectedComponentPtr_t &connectedComponent, const std::size_t K, value_type &distance)=0
virtual Nodes_t | KnearestSearch (ConfigurationIn_t configuration, const RoadmapPtr_t &roadmap, const std::size_t K, value_type &distance)=0
virtual NodeVector_t | withinBall (ConfigurationIn_t configuration, const ConnectedComponentPtr_t &cc, value_type maxDistance)=0
virtual void | merge (ConnectedComponentPtr_t cc1, ConnectedComponentPtr_t cc2)=0
virtual DistancePtr_t | distance () const =0
virtual | ~NearestNeighbor ()

## Detailed Description

Optimization of the nearest neighbor search.

## Constructor & Destructor Documentation

## ◆ ~NearestNeighbor()

virtual hpp::core::NearestNeighbor::~NearestNeighbor | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ addNode()

virtual void hpp::core::NearestNeighbor::addNode | ( | const NodePtr_t & | node | ) |
| pure virtual

## ◆ clear()

virtual void hpp::core::NearestNeighbor::clear | ( |  | ) |
| pure virtual

## ◆ distance()

virtual DistancePtr_t hpp::core::NearestNeighbor::distance | ( |  | ) | const
| pure virtual

## ◆ KnearestSearch() [1/3]

virtual Nodes_t hpp::core::NearestNeighbor::KnearestSearch | ( | ConfigurationIn_t | configuration,
|  | const ConnectedComponentPtr_t & | connectedComponent,
|  | const std::size_t | K,
|  | value_type & | distance
| ) |  |
| pure virtual

Parameters

  [out] | distance | to the Kth closest neighbor

Returns
  the K nearest neighbors

## ◆ KnearestSearch() [2/3]

virtual Nodes_t hpp::core::NearestNeighbor::KnearestSearch | ( | ConfigurationIn_t | configuration,
|  | const RoadmapPtr_t & | roadmap,
|  | const std::size_t | K,
|  | value_type & | distance
| ) |  |
| pure virtual

Return the K nearest nodes in the whole roadmap

Parameters

  configuration,the | configuration to which distance is computed,
  K | the number of nearest neighbors to return

Return values

  distance | to the Kth closest neighbor

Returns
  the K nearest neighbors

## ◆ KnearestSearch() [3/3]

virtual Nodes_t hpp::core::NearestNeighbor::KnearestSearch | ( | const NodePtr_t & | node,
|  | const ConnectedComponentPtr_t & | connectedComponent,
|  | const std::size_t | K,
|  | value_type & | distance
| ) |  |
| pure virtual

Parameters

  [out] | distance | to the Kth closest neighbor

Returns
  the K nearest neighbors

## ◆ merge()

virtual void hpp::core::NearestNeighbor::merge | ( | ConnectedComponentPtr_t | cc1,
|  | ConnectedComponentPtr_t | cc2
| ) |  |
| pure virtual

## ◆ search() [1/2]

virtual NodePtr_t hpp::core::NearestNeighbor::search | ( | ConfigurationIn_t | configuration,
|  | const ConnectedComponentPtr_t & | connectedComponent,
|  | value_type & | distance,
|  | bool | reverse = `false`
| ) |  |
| pure virtual

search Return the closest node of the given configuration

Parameters

  configuration |
  connectedComponent |
  distance |
  reverse | if true, compute distance from given configuration to nodes in roadmap, if false from nodes in roadmap to given configuration

Returns

## ◆ search() [2/2]

virtual NodePtr_t hpp::core::NearestNeighbor::search | ( | const NodePtr_t & | node,
|  | const ConnectedComponentPtr_t & | connectedComponent,
|  | value_type & | distance
| ) |  |
| pure virtual

## ◆ withinBall()

virtual NodeVector_t hpp::core::NearestNeighbor::withinBall | ( | ConfigurationIn_t | configuration,
|  | const ConnectedComponentPtr_t & | cc,
|  | value_type | maxDistance
| ) |  |
| pure virtual

Returns
  all the nodes closer than `maxDistance` to `configuration` within `connectedComponent`.

The documentation for this class was generated from the following file:

- include/hpp/core/nearest-neighbor.hh