mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::fastmks::FastMKSStat Class Reference

The statistic used in trees with FastMKS. More...

Public Member Functions

 FastMKSStat ()
 Default initialization. More...
 
template<typename TreeType >
 FastMKSStat (const TreeType &node)
 Initialize this statistic for the given tree node. More...
 
double Bound () const
 Get the bound. More...
 
double & Bound ()
 Modify the bound. More...
 
double LastKernel () const
 Get the last kernel evaluation. More...
 
double & LastKernel ()
 Modify the last kernel evaluation. More...
 
void * LastKernelNode () const
 Get the address of the node corresponding to the last distance evaluation. More...
 
void *& LastKernelNode ()
 Modify the address of the node corresponding to the last distance evaluation. More...
 
double SelfKernel () const
 Get the self-kernel. More...
 
double & SelfKernel ()
 Modify the self-kernel. More...
 
template<typename Archive >
void Serialize (Archive &ar, const unsigned int)
 Serialize the statistic. More...
 

Private Attributes

double bound
 The bound for pruning. More...
 
double lastKernel
 The last kernel evaluation. More...
 
void * lastKernelNode
 The node corresponding to the last kernel evaluation. More...
 
double selfKernel
 The self-kernel evaluation: sqrt(K(centroid, centroid)). More...
 

Detailed Description

The statistic used in trees with FastMKS.

This stores both the bound and the self-kernels for each node in the tree.

Definition at line 25 of file fastmks_stat.hpp.

Constructor & Destructor Documentation

mlpack::fastmks::FastMKSStat::FastMKSStat ( )
inline

Default initialization.

Definition at line 31 of file fastmks_stat.hpp.

template<typename TreeType >
mlpack::fastmks::FastMKSStat::FastMKSStat ( const TreeType &  node)
inline

Initialize this statistic for the given tree node.

The TreeType's metric better be IPMetric with some kernel type (that is, Metric().Kernel() must exist).

Parameters
nodeNode that this statistic is built for.

Definition at line 46 of file fastmks_stat.hpp.

References selfKernel.

Member Function Documentation

double mlpack::fastmks::FastMKSStat::Bound ( ) const
inline

Get the bound.

Definition at line 86 of file fastmks_stat.hpp.

References bound.

double& mlpack::fastmks::FastMKSStat::Bound ( )
inline

Modify the bound.

Definition at line 88 of file fastmks_stat.hpp.

References bound.

double mlpack::fastmks::FastMKSStat::LastKernel ( ) const
inline

Get the last kernel evaluation.

Definition at line 91 of file fastmks_stat.hpp.

References lastKernel.

double& mlpack::fastmks::FastMKSStat::LastKernel ( )
inline

Modify the last kernel evaluation.

Definition at line 93 of file fastmks_stat.hpp.

References lastKernel.

void* mlpack::fastmks::FastMKSStat::LastKernelNode ( ) const
inline

Get the address of the node corresponding to the last distance evaluation.

Definition at line 96 of file fastmks_stat.hpp.

References lastKernelNode.

void*& mlpack::fastmks::FastMKSStat::LastKernelNode ( )
inline

Modify the address of the node corresponding to the last distance evaluation.

Definition at line 99 of file fastmks_stat.hpp.

References lastKernelNode.

double mlpack::fastmks::FastMKSStat::SelfKernel ( ) const
inline

Get the self-kernel.

Definition at line 81 of file fastmks_stat.hpp.

References selfKernel.

double& mlpack::fastmks::FastMKSStat::SelfKernel ( )
inline

Modify the self-kernel.

Definition at line 83 of file fastmks_stat.hpp.

References selfKernel.

template<typename Archive >
void mlpack::fastmks::FastMKSStat::Serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serialize the statistic.

Definition at line 103 of file fastmks_stat.hpp.

References bound, mlpack::data::CreateNVP(), lastKernel, lastKernelNode, and selfKernel.

Member Data Documentation

double mlpack::fastmks::FastMKSStat::bound
private

The bound for pruning.

Definition at line 118 of file fastmks_stat.hpp.

Referenced by Bound(), and Serialize().

double mlpack::fastmks::FastMKSStat::lastKernel
private

The last kernel evaluation.

Definition at line 124 of file fastmks_stat.hpp.

Referenced by LastKernel(), and Serialize().

void* mlpack::fastmks::FastMKSStat::lastKernelNode
private

The node corresponding to the last kernel evaluation.

This has to be void otherwise we get recursive template arguments.

Definition at line 128 of file fastmks_stat.hpp.

Referenced by LastKernelNode(), and Serialize().

double mlpack::fastmks::FastMKSStat::selfKernel
private

The self-kernel evaluation: sqrt(K(centroid, centroid)).

Definition at line 121 of file fastmks_stat.hpp.

Referenced by FastMKSStat(), SelfKernel(), and Serialize().


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