?? test.java
字號:
/*
* Test.java
*
* Created on February 12, 2006, 7:24 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package org.ray.ninegrid;
/**
*
* @author Ray#
*/
public class Test {
/** Creates a new instance of Test */
public Test() {
}
public static void main(String[] args){
//int[] temp=new int[]{1,2,3,4,5,0,7,8,6,6};
int[] temp=new int[]{1,2,3,4,0,5,7,8,6,5};
System.out.println("Simple test:");
test1(temp);
test2(temp);
test3(temp);
temp=new int[]{3,6,0,2,5,8,1,4,7,3};
System.out.println("Middle test:");
test1(temp);
test2(temp);
test3(temp);
temp=new int[]{6,4,7,8,5,0,3,2,1,6};
System.out.println("Hard test:");
test1(temp);
test2(temp);
test3(temp);
}
public static void test1(int[] t){
long cur=System.currentTimeMillis();
EightBFS ebfs=EightBFS.getInstance(t);
System.out.println(ebfs.search());
System.out.println("BFS - time : "+(System.currentTimeMillis()-cur)+"\n");
}
public static void test2(int[] t){
long cur=System.currentTimeMillis();
EightDTBFS ebfs=EightDTBFS.getInstance(t);
System.out.println(ebfs.search());
System.out.println("DTBFS - time : "+(System.currentTimeMillis()-cur)+"\n");
public static void test3(int[] t){
long cur=System.currentTimeMillis();
EightAStar ebfs=EightAStar.getInstance(t);
System.out.println(ebfs.search());
System.out.println("A*Search - time : "+(System.currentTimeMillis()-cur)+"\n");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -