• 大小: 2.66MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-29
  • 语言: 其他
  • 标签: 打靶法  两点边值  

资源简介

实例测试通过,可直接运行,并带有详细代码注释 采用全局收敛的牛顿-拉普森迭代算法求解编制问题 绝对物超所值!

资源截图

代码片段和文件信息

/*计算正向差分以逼近雅克比行列式*/

#include 
#include “nr.h“
using namespace std;

/*输入x[0...n-1]是雅克比行列式被计算的点fvec[0...n-1]是在那点的函数值向量;
  vecfunc(xf)是用户提供的程序它返回x点处的函数向量;
  输出df[0...n-1][0...n-1]是雅克比矩阵*/

void NR::fdjac(Vec_IO_DP &x Vec_I_DP &fvec Mat_O_DP &dfvoid vecfunc(Vec_I_DP & Vec_O_DP &))
{
const DP EPS=1.0e-8;   //逼近机器精度的平方根
int ij;
DP htemp;

int n=x.size();
Vec_DP f(n);
for (j=0;j temp=x[j];
h=EPS*fabs(temp);
if (h == 0.0) h=EPS;
x[j]=temp+h;
h=x[j]-temp;           //减小有限精度误差的技巧
vecfunc(xf);
x[j]=temp;
for (i=0;i df[i][j]=(f[i]-fvec[i])/h;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    6876129  2013-05-03 11:30  two-point-problem\Ballistic.txt

     文件      17684  2013-05-02 18:22  two-point-problem\Debug\fdjac.obj

     文件          0  2013-05-02 18:23  two-point-problem\Debug\fdjac.sbr

     文件      14488  2013-05-03 16:40  two-point-problem\Debug\fmin.obj

     文件          0  2013-05-03 16:40  two-point-problem\Debug\fmin.sbr

     文件      64800  2013-05-02 18:25  two-point-problem\Debug\lnsrch.obj

     文件          0  2013-05-02 18:25  two-point-problem\Debug\lnsrch.sbr

     文件      15449  2013-05-02 18:22  two-point-problem\Debug\lubksb.obj

     文件          0  2013-05-02 18:23  two-point-problem\Debug\lubksb.sbr

     文件      64460  2013-05-02 18:22  two-point-problem\Debug\ludcmp.obj

     文件          0  2013-05-02 18:23  two-point-problem\Debug\ludcmp.sbr

     文件      73476  2013-05-02 18:22  two-point-problem\Debug\newt.obj

     文件          0  2013-05-02 18:23  two-point-problem\Debug\newt.sbr

     文件      66526  2013-05-03 16:39  two-point-problem\Debug\odeint.obj

     文件          0  2013-05-03 16:39  two-point-problem\Debug\odeint.sbr

     文件     705536  2013-05-03 16:41  two-point-problem\Debug\opt_shoot.bsc

     文件     630883  2013-05-03 16:41  two-point-problem\Debug\opt_shoot.exe

     文件     934468  2013-05-03 16:41  two-point-problem\Debug\opt_shoot.ilk

     文件    2820692  2013-05-03 16:41  two-point-problem\Debug\opt_shoot.pch

     文件    1467392  2013-05-03 16:41  two-point-problem\Debug\opt_shoot.pdb

     文件      23819  2013-05-02 18:23  two-point-problem\Debug\rkck.obj

     文件          0  2013-05-02 18:23  two-point-problem\Debug\rkck.sbr

     文件      64981  2013-05-03 09:20  two-point-problem\Debug\rkqs.obj

     文件          0  2013-05-03 09:20  two-point-problem\Debug\rkqs.sbr

     文件      16105  2013-05-03 16:41  two-point-problem\Debug\shoot.obj

     文件          0  2013-05-03 16:41  two-point-problem\Debug\shoot.sbr

     文件     258035  2013-05-03 16:41  two-point-problem\Debug\sphoot.obj

     文件          0  2013-05-03 16:41  two-point-problem\Debug\sphoot.sbr

     文件     156672  2013-05-03 16:41  two-point-problem\Debug\vc60.idb

     文件     143360  2013-05-03 16:41  two-point-problem\Debug\vc60.pdb

............此处省略27个文件信息

评论

共有 条评论