---
name: "mlpack_neighbor_NeighborSearchStat"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_neighbor_NeighborSearchStat"
---

# mlpack\_neighbor\_NeighborSearchStat(3)

Extra data for each node in the tree.

## NAME

mlpack::neighbor::NeighborSearchStat\< SortPolicy \> -

Extra data for each node in the tree.

## SYNOPSIS

### Public Member Functions

**NeighborSearchStat** ()\
 *Initialize the statistic with the worst possible distance according to our sorting policy.*  template\<typename TreeType \> **NeighborSearchStat** (TreeType &)\
 *Initialization for a fully initialized node.*  double **Bound** () const \
 *Get the overall bound (the better of the two bounds).*  double & **Bound** ()\
 *Modify the overall bound (it should be the better of the two bounds).*  double **FirstBound** () const \
 *Get the first bound.*  double & **FirstBound** ()\
 *Modify the first bound.*  double **LastDistance** () const \
 *Get the last distance calculation.*  double & **LastDistance** ()\
 *Modify the last distance calculation.*  void \* **LastDistanceNode** () const \
 *Get the last distance evaluation node.*  void \*& **LastDistanceNode** ()\
 *Modify the last distance evaluation node.*  double **SecondBound** () const \
 *Get the second bound.*  double & **SecondBound** ()\
 *Modify the second bound.*

### Private Attributes

double **bound**\
 *The better of the two bounds.*  double **firstBound**\
 *The first bound on the node's neighbor distances (B\_1).*  double **lastDistance**\
 *The last distance evaluation.*  void \* **lastDistanceNode**\
 *The last distance evaluation node.*  double **secondBound**\
 *The second bound on the node's neighbor distances (B\_2).*

## Detailed Description

### template\<typename SortPolicy\>class mlpack::neighbor::NeighborSearchStat\< SortPolicy \>

Extra data for each node in the tree.

For neighbor searches, each node only needs to store a bound on neighbor distances.

Definition at line 36 of file neighbor\_search\_stat.hpp.

## Constructor & Destructor Documentation

### template\<typename SortPolicy \> mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::NeighborSearchStat ()` [inline]`

Initialize the statistic with the worst possible distance according to our sorting policy.

Definition at line 60 of file neighbor\_search\_stat.hpp.

### template\<typename SortPolicy \> template\<typename TreeType \> mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::NeighborSearchStat (TreeType &)` [inline]`

Initialization for a fully initialized node. In this case, we don't need to worry about the node.

Definition at line 72 of file neighbor\_search\_stat.hpp.

## Member Function Documentation

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::Bound () const` [inline]`

Get the overall bound (the better of the two bounds).

Definition at line 88 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::bound.

### template\<typename SortPolicy \> double& mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::Bound ()` [inline]`

Modify the overall bound (it should be the better of the two bounds).

Definition at line 90 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::bound.

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::FirstBound () const` [inline]`

Get the first bound.

Definition at line 80 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::firstBound.

### template\<typename SortPolicy \> double& mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::FirstBound ()` [inline]`

Modify the first bound.

Definition at line 82 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::firstBound.

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::LastDistance () const` [inline]`

Get the last distance calculation.

Definition at line 96 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::lastDistance.

### template\<typename SortPolicy \> double& mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::LastDistance ()` [inline]`

Modify the last distance calculation.

Definition at line 98 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::lastDistance.

### template\<typename SortPolicy \> void\* mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::LastDistanceNode () const` [inline]`

Get the last distance evaluation node.

Definition at line 92 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::lastDistanceNode.

### template\<typename SortPolicy \> void\*& mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::LastDistanceNode ()` [inline]`

Modify the last distance evaluation node.

Definition at line 94 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::lastDistanceNode.

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::SecondBound () const` [inline]`

Get the second bound.

Definition at line 84 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::secondBound.

### template\<typename SortPolicy \> double& mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::SecondBound ()` [inline]`

Modify the second bound.

Definition at line 86 of file neighbor\_search\_stat.hpp.

References mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::secondBound.

## Member Data Documentation

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::bound` [private]`

The better of the two bounds.

Definition at line 48 of file neighbor\_search\_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::Bound().

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::firstBound` [private]`

The first bound on the node's neighbor distances (B\_1). This represents the worst candidate distance of any descendants of this node.

Definition at line 41 of file neighbor\_search\_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::FirstBound().

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::lastDistance` [private]`

The last distance evaluation.

Definition at line 53 of file neighbor\_search\_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::LastDistance().

### template\<typename SortPolicy \> void\* mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::lastDistanceNode` [private]`

The last distance evaluation node.

Definition at line 51 of file neighbor\_search\_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::LastDistanceNode().

### template\<typename SortPolicy \> double mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::secondBound` [private]`

The second bound on the node's neighbor distances (B\_2). This represents a bound on the worst distance of any descendants of this node assembled using the best descendant candidate distance modified by the furthest descendant distance.

Definition at line 46 of file neighbor\_search\_stat.hpp.

Referenced by mlpack::neighbor::NeighborSearchStat\< SortPolicy \>::SecondBound().

## Author

Generated automatically by Doxygen for MLPACK from the source code.
