BitMagic-C++: bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc > Class Template Reference

BitMagic-C++

Public Types | Public Member Functions | Protected Attributes
bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc > Class Template Reference

`#include <bmalgo_similarity.h>`

Collaboration diagram for bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >:
[legend]

## Public Types
typedef SO | similarity_object_type
typedef SValue | similarity_value_type
typedef SFunc | similarity_functor

## Public Member Functions
| similarity_descriptor ()
| similarity_descriptor (const SO *so1, const SO *so2, const distance_metric_descriptor *dmd_ptr)
| similarity_descriptor (const SO *so1, IDX_VALUE i1, const SO *so2, IDX_VALUE i2, const distance_metric_descriptor *dmd_ptr)
| similarity_descriptor (const similarity_descriptor &sd)
similarity_descriptor & | operator= (const similarity_descriptor &sd)
bool | operator> (const similarity_descriptor &sd) const
SValue | similarity () const
void | set_similarity (SValue s)
const SO * | get_first () const
const SO * | get_second () const
IDX_VALUE | get_first_idx () const
IDX_VALUE | get_second_idx () const
distance_metric_descriptor * | distance_begin ()
distance_metric_descriptor * | distance_end ()
void | set_metric (size_t i, distance_metric metric)

## Protected Attributes
SValue | similarity_
const SO * | so1_
const SO * | so2_
IDX_VALUE | so1_idx_
IDX_VALUE | so2_idx_
distance_metric_descriptor | dmd_ [DMD_SZ]

## Detailed Description

### template<typename SO, unsigned DMD_SZ, typename IDX_VALUE, typename SValue, typename SFunc>
class bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >

Similarity descriptor between two objects (bit vectors, blocks, etc)

Definition at line 44 of file bmalgo_similarity.h.

## Member Typedef Documentation

## ◆ similarity_functor

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

typedef SFunc bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_functor

Definition at line 49 of file bmalgo_similarity.h.

## ◆ similarity_object_type

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

typedef SO bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_object_type

Definition at line 47 of file bmalgo_similarity.h.

## ◆ similarity_value_type

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

typedef SValue bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_value_type

Definition at line 48 of file bmalgo_similarity.h.

## Constructor & Destructor Documentation

## ◆ similarity_descriptor() [1/4]

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_descriptor | ( |  | ) |
| inline

Definition at line 51 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_.

## ◆ similarity_descriptor() [2/4]

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_descriptor | ( | const SO * | so1,
|  | const SO * | so2,
|  | const distance_metric_descriptor * | dmd_ptr
| ) |  |
| inline

Definition at line 57 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_, and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_.

## ◆ similarity_descriptor() [3/4]

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_descriptor | ( | const SO * | so1,
|  | IDX_VALUE | i1,
|  | const SO * | so2,
|  | IDX_VALUE | i2,
|  | const distance_metric_descriptor * | dmd_ptr
| ) |  |
| inline

Definition at line 68 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_, and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_.

## ◆ similarity_descriptor() [4/4]

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_descriptor | ( | const similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc > & | sd | ) |
| inline

Definition at line 78 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_.

## Member Function Documentation

## ◆ distance_begin()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

distance_metric_descriptor* bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::distance_begin | ( |  | ) |
| inline

Definition at line 112 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_.

## ◆ distance_end()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

distance_metric_descriptor* bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::distance_end | ( |  | ) |
| inline

Definition at line 113 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_.

## ◆ get_first()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

const SO* bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_first | ( |  | ) | const
| inline

Definition at line 106 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so1_.

## ◆ get_first_idx()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

IDX_VALUE bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_first_idx | ( |  | ) | const
| inline

Definition at line 109 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so1_idx_.

## ◆ get_second()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

const SO* bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_second | ( |  | ) | const
| inline

Definition at line 107 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so2_.

## ◆ get_second_idx()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

IDX_VALUE bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_second_idx | ( |  | ) | const
| inline

Definition at line 110 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so2_idx_.

## ◆ operator=()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

similarity_descriptor& bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator= | ( | const similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc > & | sd | ) |
| inline

Definition at line 88 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_, bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_, bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so1_, bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so1_idx_, bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so2_, and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so2_idx_.

## ◆ operator>()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

bool bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator> | ( | const similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc > & | sd | ) | const
| inline

Definition at line 98 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_.

## ◆ set_metric()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

void bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::set_metric | ( | size_t | i,
|  | distance_metric | metric
| ) |  |
| inline

Definition at line 115 of file bmalgo_similarity.h.

References BM_ASSERT, bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_, and bm::distance_metric_descriptor::metric.

## ◆ set_similarity()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

void bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::set_similarity | ( | SValue | s | ) |
| inline

Definition at line 104 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_.

## ◆ similarity()

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

SValue bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity | ( |  | ) | const
| inline

Definition at line 103 of file bmalgo_similarity.h.

References bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_.

## Field Documentation

## ◆ dmd_

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

distance_metric_descriptor bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::dmd_[DMD_SZ]
| protected

Definition at line 128 of file bmalgo_similarity.h.

Referenced by bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::distance_begin(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::distance_end(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator=(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::set_metric(), and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_descriptor().

## ◆ similarity_

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

SValue bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_
| protected

Definition at line 123 of file bmalgo_similarity.h.

Referenced by bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator=(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator>(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::set_similarity(), bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity(), and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::similarity_descriptor().

## ◆ so1_

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

const SO* bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so1_
| protected

Definition at line 124 of file bmalgo_similarity.h.

Referenced by bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_first(), and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator=().

## ◆ so1_idx_

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

IDX_VALUE bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so1_idx_
| protected

Definition at line 126 of file bmalgo_similarity.h.

Referenced by bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_first_idx(), and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator=().

## ◆ so2_

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

const SO* bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so2_
| protected

Definition at line 125 of file bmalgo_similarity.h.

Referenced by bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_second(), and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator=().

## ◆ so2_idx_

template<typename SO , unsigned DMD_SZ, typename IDX_VALUE , typename SValue , typename SFunc >

IDX_VALUE bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::so2_idx_
| protected

Definition at line 127 of file bmalgo_similarity.h.

Referenced by bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::get_second_idx(), and bm::similarity_descriptor< SO, DMD_SZ, IDX_VALUE, SValue, SFunc >::operator=().

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

- bmalgo_similarity.h