登录
首页 » 算法 » 分治法求解N个点中最近的两个点之间的距离

分治法求解N个点中最近的两个点之间的距离

于 2022-05-05 发布 文件大小:4.97 MB
0 233
下载积分: 2 下载次数: 1

代码说明:

任意输入n个点的坐标,可以得出n个点中里的最近的两个点的距离值,最后按任意键退出

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 一个求解Josephus问题的函数
      #include #include #define NULL 0 #include typedef struct Lnode {  int data;  struct Lnode *next; }Josephus; void CreateList(Josephus*&L,int n)//建立循环链表 {  int i;  Josephus *p,*s;  s=(Josephus*)malloc(sizeof(Josephus));  s->data=1;  L=p=s;  for(i=2;idata=i;  p->next=s;  p=s;  }  p->next=L; } void DeleteList(Josephus*&L,Josephus*p,Josephus*q) {  q->next=p->next;  free(p); } void Josephus1(Josephus*&L,int s,int m)
    2022-01-27 23:12:59下载
    积分:1
  • 一个可以存放任何数据类型的链表类
    一个可以存放任何数据类型的链表类-a store any data type objectlist
    2022-01-26 02:55:49下载
    积分:1
  • 智能循迹小车
    应用背景本次智能小车设计是在全国电子设计大赛的背景下,省区选拔第一阶段,我和两名队友协作努力,一起完成整个电路的硬件设计,和算法。获得区级三等奖,成功进入国家级的初赛。关键技术本次智能小车的关键设计在于电路的选择和算法的实现。电路我采用最简单的51单片机作为MCU,对于循迹完全足够了,红外传感器既可以循迹,也可以避障。
    2023-08-26 16:45:04下载
    积分:1
  • MMSE均衡
    自适应信道均衡器模型仿真 收录时间:2013-12-09 资源分类:Matlab 工具:MATLAB 7.8 (R2009a) 均衡器(Equalizer),是一种可以分别调节各种频率成分电信号放大量的电子设备,通过对各种不同频率的电信号的调节来补偿扬声器和声场的缺陷,
    2023-01-13 00:20:04下载
    积分:1
  • 遗传实现最短路径优化
    %初始化参数 %注:popsize=200,MaxGeneration=100,约跑2分钟。若不要求太精确,可减少循环次数。pointnumber=11;                            %节点个数Popsize=200;                               %种群规模,只能取偶数(因67行的循环)MaxGeneration=100;                         %最大代数Pc=0.8;Pm=0.3;                             %交叉概率和变异概率A=[0 2 8 1 50 50 50 50 50 50 50    2 0 6 50 1 50 50 50 50 50 50    8 6 0 7 50 1 50 50 50 50 50    1 50 7 0 50 50 9 50 50 50 50    50 1 50 50 0 3 50 2 50 50 50    50 50 1 50 3 0 4 50 6 50 50    50 50 50 9 50 4 0 50 50 1 50    50 50 50 50 2 50 50 0 7 50 9    50 50 50 50 50 6 50 7 0 1
    2022-02-24 16:29:41下载
    积分:1
  • Alphat透明合成系统
    Alpha通道是一个8位的灰度通道,该通道用256级灰度来记录图像中的透明度信息,定义透明、不透明和半透明区域,其中黑表 示全透明,白表示不透明,灰表示半透明。 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2023-04-30 03:05:04下载
    积分:1
  • Was established based on moving least square (Moving Least
    建立了一种基于移动最小二乘(Moving Least-Squares MLS)法的曲线曲 面拟合方法 这种方法对传统的最小二乘(LS)法的作了比较大的改进 使生成的曲线曲面具 有精度高 光滑性好等许多优点 详细介绍了移动最小二乘法的原理 应用和特点 并且给 出了使用移动最小二乘法进行曲线曲面拟合的程序设计流程 最后给出了曲线拟合和空间散 乱数据曲面拟合算例 将拟合结果与最小二乘拟合结果作了比较 分析了 MLS 拟合曲线曲 面的光滑性和拟合质量 表明了该方法的优越性和有效性-Was established based on moving least square (Moving Least-Squares MLS) method of this curve and surface fitting method to the traditional method of least squares (LS) method was relatively large improvements to make the generated curves and surfaces with a precision of High smoothness, good detail, and many other advantages of the principle of least-squares method for mobile applications and features and gives the least-squares method using the mobile curve and surface fitting procedure design process Finally, curve fitting and spatial scattered data surface to be cost-effective cases of the results of the fitting results are compared with the least-squares fitting analysis of MLS fitting curves and surfaces smooth and fitting quality demon
    2023-02-17 12:50:04下载
    积分:1
  • GA-PSO 混合解决TSP问题
    资源描述TSP问题是一个NP难题,因PSO算法具有算法相对简单等特性借用BPSO来解决TSP问题,因此借鉴遗传算法的交叉运算,用基本粒子群算法中的学习因子来限制速度,依据选取当前速度值的概率(在算法中借用惯性系数w来实现)与rand(0,1)进行比较得到离散速度变量
    2023-03-31 07:45:04下载
    积分:1
  • 信息论编码中用hufman程序来实现的hufman编码
    信息论编码中用hufman程序来实现的hufman编码- In the information theory code hufman which realizes with the hufman procedure codes
    2023-03-06 03:50:03下载
    积分:1
  • 自动俄罗斯方块,能够自己消行,消行达到15000左右,但有些还待改进...
    自动俄罗斯方块,能够自己消行,消行达到15000左右,但有些还待改进-Auto Tetris, to make their own consumer line, elimination of about 15,000 lines, but there are still room for improvement
    2022-03-17 19:25:28下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载