UC Library Extensions
UnderC comes with a pocket implementation of the standard C++ libraries, which is a reasonably faithful subset. This documentation describes those UnderC functions and classes which are not part of the C++ standard.
UC Library
Builtin functions:
Most of these are standard C functions, but there are a few unique to the UnderC system which give you runtime access to the compiler. You may evaluate expressions, execute commands, compile code, etc.
* Expands the text in expr using the UnderC preprocessor, putting the result
into buff.
void uc_macro_subst(const char* expr, char* buff, int buffsize)
* executes a UC #-command, like #l or #help.
uc_cmd() expects the name of the command, _without_ the hash,
e.g. uc_cmd("l fred.cpp") or uc_cmd("help").
void uc_cmd(const char* cmd)
* Evaluates any C++ expression or statement will return non-zero if
unsuccessful.
標簽:
implementation
Extensions
libraries
standard
上傳時間:
2013-12-14
上傳用戶:leehom61
Generate Possion Dis.
step1:Generate a random number between [0,1]
step2:Let u=F(x)=1-[(1/e)x]
step3:Slove x=1/F(u)
step4:Repeat Step1~Step3 by using different u,you can get x1,x2,x3,...,xn
step5:If the first packet was generated at time [0], than the
second packet will be generated at time [0+x1],The third packet will be generated at time [0+x1+x2],
and so on ….
Random-number generation
1.static method random from class Math
-Returns doubles in the range 0.0 <= x < 1.0
2.class Random from package java.util
-Can produce pseudorandom boolean, byte, float, double, int, long and Gaussian values
-Is seeded with the current time of day to generate different sequences of numbers each time the program executes
標簽:
Generate
Possion
between
random
上傳時間:
2017-05-25
上傳用戶:bibirnovis