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

# mlpack\_metric\_IPMetric(3)

## NAME

mlpack::metric::IPMetric\< KernelType \> -

## SYNOPSIS

### Public Member Functions

**IPMetric** ()\
 *Create the* **IPMetric** *without an instantiated kernel.*  **IPMetric** (KernelType &**kernel**)\
 *Create the* **IPMetric** *with an instantiated kernel.*  **~IPMetric** ()\
 *Destroy the* **IPMetric** *object.*  template\<typename Vec1Type , typename Vec2Type \> double **Evaluate** (const Vec1Type &a, const Vec2Type &b)\
 *Evaluate the metric.*  const KernelType & **Kernel** () const \
 *Get the kernel.*  KernelType & **Kernel** ()\
 *Modify the kernel.*  std::string **ToString** () const \
 *Returns a string representation of this object.*

### Private Attributes

KernelType & **kernel**\
 *The reference to the kernel that is being used.*  KernelType \* **localKernel**\
 *The locally stored kernel, if it is necessary.*

## Detailed Description

### template\<typename KernelType\>class mlpack::metric::IPMetric\< KernelType \>

Definition at line 30 of file ip\_metric.hpp.

## Constructor & Destructor Documentation

### template\<typename KernelType \> mlpack::metric::IPMetric\< KernelType \>::IPMetric ()

Create the **IPMetric** without an instantiated kernel.

### template\<typename KernelType \> mlpack::metric::IPMetric\< KernelType \>::IPMetric (KernelType &kernel)

Create the **IPMetric** with an instantiated kernel.

### template\<typename KernelType \> mlpack::metric::IPMetric\< KernelType \>::~IPMetric ()

Destroy the **IPMetric** object.

## Member Function Documentation

### template\<typename KernelType \> template\<typename Vec1Type , typename Vec2Type \> double mlpack::metric::IPMetric\< KernelType \>::Evaluate (const Vec1Type &a, const Vec2Type &b)

Evaluate the metric.

### template\<typename KernelType \> const KernelType& mlpack::metric::IPMetric\< KernelType \>::Kernel () const` [inline]`

Get the kernel.

Definition at line 49 of file ip\_metric.hpp.

References mlpack::metric::IPMetric\< KernelType \>::kernel.

### template\<typename KernelType \> KernelType& mlpack::metric::IPMetric\< KernelType \>::Kernel ()` [inline]`

Modify the kernel.

Definition at line 51 of file ip\_metric.hpp.

References mlpack::metric::IPMetric\< KernelType \>::kernel.

### template\<typename KernelType \> std::string mlpack::metric::IPMetric\< KernelType \>::ToString () const

Returns a string representation of this object.

## Member Data Documentation

### template\<typename KernelType \> KernelType& mlpack::metric::IPMetric\< KernelType \>::kernel` [private]`

The reference to the kernel that is being used.

Definition at line 60 of file ip\_metric.hpp.

Referenced by mlpack::metric::IPMetric\< KernelType \>::Kernel().

### template\<typename KernelType \> KernelType\* mlpack::metric::IPMetric\< KernelType \>::localKernel` [private]`

The locally stored kernel, if it is necessary.

Definition at line 58 of file ip\_metric.hpp.

## Author

Generated automatically by Doxygen for MLPACK from the source code.
