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

📄 20e83fe41167001b1fc8c86c12fb3d87

📁 在eclipse下开发的求平面上两点之间的最短距离。通过随机在平面上生成无数个点
💻
字号:
package distance;
import java.io.IOException;
public class Test {
	//public static int NumOfPoints;

	public static void main(String[] args) throws IOException{		
		ProducingPoints d = new ProducingPoints();
		int num = d.getNumOfPoints();
		Point[] ad = new Point[num];			
		ad = d.getPoints(num);		
		for(int i = 0; i < num; i++){
			System.out.println("num " + i + "  x:" + ad[i].getXCoordinate()+ " y:" + ad[i].getYCoordinate());
		}	
		ShortestDistance sd = new ShortestDistance();
		sd.findShortestDistance(ad,0,ad.length - 1);
		System.out.println("final point1 is:" + ShortestDistance.selectPoint1);
		System.out.println("final point1 is:" + ShortestDistance.selectPoint2);
		System.out.println("final point1 is:" + ShortestDistance.minDistance);
		System.exit(0);
	}
}

⌨️ 快捷键说明

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