math_util.h

来自「题描述的是一个旅行商要到几个城市去」· C头文件 代码 · 共 36 行

H
36
字号
/* $Id: math_util.h,v 1.3 2006-08-09 15:20:54 jonathan Exp $ * Jonathan Ledlie, Harvard University. * Copyright 2005.  All rights reserved. */#ifndef MATH_UTIL_H#define MATH_UTIL_H//#include <sunmath.h>#include <vector>#include <algorithm>#include <math.h>#include <iostream>using namespace::std;#define Long long long#define Rand() drand48()#define SRand(c) srand48(c)#define ABS(x) ((x > 0) ? x : -1*x)double randPct ();int poisson (int mean);double poisson (double mean);int unifRand (int a, int b);vector<int> unifRands (int count, int a, int b);double mean (vector<double> v);double stddev (vector<double> v, double mean);double percentile (vector<double> v, double percentile);double square (double x);double log16 (double x);double log8 (double x);#endif

⌨️ 快捷键说明

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