⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utility.h

📁 关于时下流行的粒子滤波程序的源码
💻 H
字号:
/////////////////////////////////////////////////////////////////////////////////////////////////
//
//	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -