Methods
void close()
int read()
reads and returns a chracter.
int read(char[] characterArray)
populates an array of characters with data.
boolean ready()
- returns “true” if there is data available.
……
public class CircleMenuCanvas extends Canvas implements Runnable{
double pi = Math.PI
public final int MENURIGHT = 1
public final int MENULEFT = 0
Image menuImage[] = new Image[6]
int []jiaodu = {330,30,90,150,210,270}
String menuName[] = {"新游戏","继续游戏","游戏设置","高分榜","游戏帮助 ...
Specification File
adjacencyListGragh
class GeneralGraph:
use adjacency list to implement the graph which data structure is vector
Construct methods:
* public GeneralGraph():
contain an empty vector store the vertex and a boolean determines whether graph is directed or not, defaulted is undirecte ...
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 ...