资源简介
本内容是《计算机常用数值计算算法与程序 C++版》一书的配套源码,盘中包括了书中所有的C++程序源代码文件,每个源程序文件的文件扩展名都使用.cpp形式。对于初学程序常用算法是很有帮助的。只需一分,帮助很大。

代码片段和文件信息
//Comm.cpp 使用公共头文件示例
//#include
#include //输入输出流头文件
#include “Comm.h“ //公共部分头文件
#include “Matrix.h“ //矩阵类及相关函数等的定义
using namespace std; //名字空间
// 定义控制台应用程序的入口点
void main()
{
int ia(10) ib(-23);
double fx(1.5369200000000001) fy(-38.67);
complex cf(fx fy);
//显示初始数据
cout << “初始数据:“ << endl;
cout << “ ia = “ << ia << endl;
cout << “ ib = “ << ib << endl;
printf(“ fx = %25.20f \n“ fx);
printf(“ fy = %25.20f \n“ fy);
cout << “ cf = “ << cf << endl << endl;
//取绝对值运算
cout << “取绝对值运算:“ << endl;
cout << “ Abs(ia) = “ << Abs(ia) << endl;
cout << “ Abs(ib) = “ << Abs(ib) << endl;
cout << “ Abs(fx) = “ << Abs(fx) << endl;
cout << “ Abs(fy) = “ << Abs(fy) << endl;
cout << “ Abs(cf) = “ << Abs(cf) << endl << endl;
//取符号运算
cout << “取符号运算:“ << endl;
cout << “ Sgn(ia) = “ << Sgn(ia) << endl;
cout << “ Sgn(ib) = “ << Sgn(ib) << endl;
cout << “ Sgn(fx) = “ << Sgn(fx) << endl;
cout << “ Sgn(fy) = “ << Sgn(fy) << endl << endl;
//浮点数比较
cout << “浮点数比较:“ << endl;
if(FloatEqual(fx1.53692))
printf(“ fx == 1.53692 \t fx = %25.20f \n\n“ fx);
else
printf(“ fx != 1.53692 \t fx = %25.20f \n\n“ fx);
if(FloatNotEqual(fy-38.671))
printf(“ fy != -38.671 \t fy = %25.20f \n\n“ fy);
else
printf(“ fy == -38.671 \t fy = %25.20f \n\n“ fy);
//求最小值运算
cout << “求最小值运算:“ << endl;
cout << “ Min(ia ib) = “ << Min(ia ib) << endl << endl;
//求最大值运算
cout << “求最大值运算:“ << endl;
cout << “ Max(fx fy) = “ << Max(fx fy) << endl << endl;
double a[4] = {1.01 1.02 1.03 2.04};
valarray va(a 4);
//打印数组(向量)值
cout << “打印数组(向量)值:“ << endl;
ValarrayPrint(va);
cout << endl;
//打印某个指定数组(向量)元素值
cout << “打印某个指定数组(向量)元素值:“ << endl;
for(ia=0; ia<4; ia++)
ValarrayPrint(va ia);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 26598 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Matrix.inl
文件 2649 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\NonLinearEquation.h
文件 21387 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\NonLinearEquation.inl
文件 3009 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\OrdinaryDifferentialEguation.h
文件 36643 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\OrdinaryDifferentialEguation.inl
文件 1154 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Polynomials.h
文件 4934 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Polynomials.inl
文件 1094 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Random.h
文件 3245 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Random.inl
文件 1843 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\SpecialFunction.h
文件 18729 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\SpecialFunction.inl
文件 1595 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Statistic.h
文件 9348 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Statistic.inl
文件 1294 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Transform.h
文件 8414 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Transform.inl
文件 2117 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Comm.h
文件 2220 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Comm.inl
文件 1416 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\EigenvalueVector.h
文件 12736 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\EigenvalueVector.inl
文件 1802 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Extremum.h
文件 20683 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Extremum.inl
文件 1072 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\FittingApproximation.h
文件 12513 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\FittingApproximation.inl
文件 1869 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Integral.h
文件 13892 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Integral.inl
文件 3301 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Interpolation.h
文件 28064 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Interpolation.inl
文件 2195 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\LinearEquation.h
文件 19470 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\LinearEquation.inl
文件 10546 2004-09-27 20:50 计算机常用数值计算算法与程序 C++版\include\Matrix.h
............此处省略187个文件信息
- 上一篇:基于特征点匹配的视频稳像
- 下一篇:VC++多人聊天室
相关资源
- 基于MFC的TCP调试助手源码95706
- CCS FFT c语言算法
- 移木块游戏,可以自编自玩,vc6.0编写
- 小波变换算法 c语言版
- 3des加密算法C语言实现
- C++纯文字DOS超小RPG游戏
- 安科瑞智能电能表MODBUS通讯程序 VC6
- DES加密算法C语言实现
- 线性回归算法c语言实现
- 基于C语言的模拟退火算法
- C语言实现的DES对称加密算法
- 用VC6.0实现多边形扫描线填充算法
- c语言编写的货郎担算法
- Em算法(使用C++编写)
- 九齐单片机源码
- Qt画图工具源码(qgraphics draw)
- qt 串口助手源码
- modbus 主机源码
- 《LINUX C编程从初学到精通》光盘源码
- STM32烧写算法flash包
- 永磁同步电机的FOC控制算法
- OLED驱动源码
- Proteus仿真:PID算法输出.rar
- 一个模糊PID温度控制算法源代码
- tm1650+stm32f103源码(board_tm1650.c)
- cheat engine 7.2源码
- CrySearch内存搜索器源码
- FTP客户端源码(c++)
- MFC视频播放器源码(支持avi/wma/mp3等格
- CreatBitmap图片合成源码
评论
共有 条评论