CManhattanWordDistance类参考


详细描述

class ManhattanWordDistance

在文件ManhattanWordDistance.h23行定义。

继承图,类CManhattanWordDistance
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CManhattanWordDistance ()
 CManhattanWordDistance (CStringFeatures< uint16_t > *l, CStringFeatures< uint16_t > *r)
virtual ~CManhattanWordDistance ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EDistanceType get_distance_type ()
virtual const char * get_name () const
void get_dictionary (int32_t &dsize, float64_t *&dweights)

保护成员

float64_t compute (int32_t idx_a, int32_t idx_b)

保护属性

int32_t dictionary_size
float64_tdictionary_weights

构造及析构函数文档

default constructor

在文件ManhattanWordDistance.cpp20行定义。

CManhattanWordDistance ( CStringFeatures< uint16_t > *  l,
CStringFeatures< uint16_t > *  r 
)

constructor

参数:
l features of left-hand side
r features of right-hand side

在文件ManhattanWordDistance.cpp29行定义。

~CManhattanWordDistance (  )  [virtual]

在文件ManhattanWordDistance.cpp41行定义。


成员函数文档

void cleanup (  )  [virtual]

cleanup distance

实现了CDistance

在文件ManhattanWordDistance.cpp54行定义。

float64_t compute ( int32_t  idx_a,
int32_t  idx_b 
) [protected, virtual]

compute distance function for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object

实现了CDistance

在文件ManhattanWordDistance.cpp58行定义。

void get_dictionary ( int32_t &  dsize,
float64_t *&  dweights 
)

get dictionary weights

参数:
dsize size of the dictionary
dweights dictionary weights are stored in here

在文件ManhattanWordDistance.h65行定义。

virtual EDistanceType get_distance_type (  )  [virtual]

get distance type we are

返回:
distance type MANHATTANWORD

实现了CDistance

在文件ManhattanWordDistance.h52行定义。

virtual const char* get_name (  )  const [virtual]

get name of the distance

返回:
name ManhattanWord

实现了CSGObject

在文件ManhattanWordDistance.h58行定义。

bool init ( CFeatures l,
CFeatures r 
) [virtual]

init distance

参数:
l features of left-hand side
r features of right-hand side
返回:
if init was successful

重载CStringDistance< uint16_t >

在文件ManhattanWordDistance.cpp48行定义。


成员数据文档

int32_t dictionary_size [protected]

size of the dictionary

在文件ManhattanWordDistance.h79行定义。

dictionary weights

在文件ManhattanWordDistance.h81行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation