utility.h

来自「关于时下流行的粒子滤波程序的源码」· C头文件 代码 · 共 31 行

H
31
字号
/////////////////////////////////////////////////////////////////////////////////////////////////
//
//	Header file for Utility routines, Utility.h
//
//		XinFan 2003.3.2
//
//
#ifndef _UTILITY_H
#define	_UTILITY_H

#include "DMatrix.h"

double uniform_random(void);
double gaussian_random(void);
double evaluate_gaussian(double val, double sigma);
void gaussian_vector(CDVector & Vec, double sigma = 1., double mean = 0.);
bool bi_random(double prob);
double atan_u(double x, double y);

/*swap a and b*/
inline void SWAP(int &a,int &b);

/*Find out the point at the line segment from (x0,y0) to (x1,y1) */
void line_pt(int x0, int y0, int x1, int y1, int* &x, int* &y, int &nNum);

/* Set Vector/Matrix by another Vector/Matrix */
void SetVec(float *dest, const float *src, int nNum);
/* Set Vector/Matrix by a scarlar value */
void SetVec(float *dest, float value, int Num);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?