- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
列主元消去法(Elimination by column principal component)
列主元消去法(Elimination by column principal component)
/ / 解线性方程组
/ / would jj, 2008
# iostream.h in
# iomanip.h in
# stdlib.h in
# math.h in
/ / ---------------------------------------------- 全局变量定义区
const int number = 5; / / 方程最大个数
double [number] [number], b [number] copy _ and [number] [number] copy _ b [number]; / / 系数行列式
int and _ y [number]; / / [] [] 中随着横坐标增加列坐标的排列顺序, 如a [0] [0] and [1], [2] and [2] [1]...则a _ y [] = {}; 0,2,1...
int lenth, copy _ lenth; / / 方程的个数
double and _ sum; / / 计算行列式的值
char * x; / / 未知量a, b, c的载体
/ / ---------------------------------------------- 函数声明区
void input (); / / 输入方程组
void print _ menu (); / / 打印主菜单
int select (); / / 输入选择
void cramer (); / / cramer算法解方程组
void gauss _ row (); / / gauss列主元解方程组
void guass _ all (); / / gauss全主元解方程组
void doolittle (); / / 用doolittle算法解方程组
int doolittle _ check (double a [] [number], double b [number]); / / 判断是否行列式 0, 若是, 调整为顺序主子式全 0
void xiaoqu _ in _ l (); / / 将行列式doolittle分解
void calculate _ in _ l (); / / 计算doolittle结果
double calculate _ and (int n, int m); / / 计算行列式
double quanpailie _ and (); / / 根据列坐标的排列计算的值, 如a _ y [] = {0,2,1}, 得sum = a [0] [and _ y [0] and [1], [and _ y [1] and [2] [and _ y [2]] = a [0] [0] and [1] [2] * and [2] [1];
void exchange (int m, int i); / / 交换a _ y [m], and _ y [i]
void exchange _ lie (int j); / / 交换a [] [j] 与b [];
void exchange _ hang (int m, int n); / / 分别交换a [] [] [] 中的m与n两行 和b
void gauss _ row _ xiaoqu (); / / gauss列主元消去法
void gauss _ all _ xiaoqu (); / / gauss全主元消去法
void calculate gauss _ (); / / 根据gauss消去法结果计算未知量的值
void exchange _ and _ lie (int m, int n); / / 交换a [] [] 中的m和n列
void exchange _ x (int m, int n); / / 交换x [] 中的x [m] 和x [n]
void convert (); / / 恢复数据
/ / 主函数
void main ()
{
int flag = 1;
input (); / / 输入方程
while (flag)
{
print _ menu (); / / 打印主菜单
flag = choose (); / / 选择解答方式
}
}
/ / 函数定义区
void print () _ menu
{
system (cls);
cout ------------ 方程系数和常数矩阵表示如下: \ n;
for (int i = 0; j lenth; j + +)
cout 系数 j + 1 ;
cout \ t常数;
cout
您可能关注的文档
- 三国无双7武器(The 7 weapons of the Three Kingdoms).doc
- 三国笑话(Three Kingdoms jokes).doc
- 三国字(Three Kingdoms).doc
- 三国志11---兵法篇(The chronicles of the Three Kingdoms 11--- art of war).doc
- 万以内数的比较大小教案(Ten thousand less than the size of lesson plans).doc
- 三大学派(Three university pie).doc
- 三国志英杰传金手指(The legend of the Three Kingdoms).doc
- 三名大学毕业生的求职流浪记(Job hunting for three college graduates).doc
- 三家诗2(Three poems 2).doc
- 三年级数学科计划(下学期)29712(Grade three math program (next semester) 29712).doc
- 列传038(038 Biographies).doc
- 刘基《过苏州》九首(Liu Ji, Suzhou, nine).doc
- 凯德都会新峰项目市场分析(Cade will new project market analysis).doc
- 刘明康中国银行业要在实质上实施新资本协议_银行频道 - 央行与银监会(Liu Mingkang Chinese banking industry to implement the new capital accord _ Bank Channel - the central bank and the CBRC in essence.).doc
- 刘杰克橄榄油新产品企业培训上市营销案例解析(上)(Liu Jack a case study of olive oil new product enterprise training marketing).doc
- 刘翔退赛后的广告选择题(Liu Xiang's ad option after the game).doc
- 创业书籍名目(Venture books).doc
- 创业投资办企业管理之当场打井(Venture capital, enterprise management, drilling on the spot).doc
- 创业策划2(Business plan 2).doc
- 分析化学中的数据处理(Data processing in Analytical Chemistry).doc
最近下载
- 高考作文模拟写作直面青春迷茫导写(附写作指导及范文点评) 2021范文.doc VIP
- 餐厅6S制作流程.pptx
- 《现代酒店服务英语》Chapter2 客房预订部服务.ppt VIP
- 北京现代领动_汽车保养手册用户服务指南车辆维护保修说明书电子版.pdf VIP
- The Beginning-钢琴谱 原调简谱 高清正版完整版双手简谱.pdf
- 高考作文模拟写作:贫困应该带给我们的 导写(附:写作指导及范文点评).docx VIP
- 光伏发电+储能项目建议书写作模板.doc VIP
- 交通安全风险评估.pdf VIP
- 隧道注浆施工记录表.doc VIP
- 《现代酒店服务英语》Chapter1 前台服务.ppt VIP
文档评论(0)