91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 591KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-10
  • 語言: C/C++
  • 標簽:

資源簡介

對超松弛算法用c語言進行了詳細的描述,可在vc++6.0上運行

資源截圖

代碼片段和文件信息

#include?
#include
#include?
#include
using?namespace?std;
void?function(char?*file)
{

ifstream?FileIn;
FileIn.open(file);
/////////////////////////////////////////////////////
//動態給二位數組分配存儲空間
int?line;
int?row;
FileIn>>line;
FileIn>>row;
double?**coefficient_matrix;
coefficient_matrix?=?new?double?*[line];
int?loop;
for(loop?=?0;loop? coefficient_matrix[loop]?=?new?double?[row];
//由用戶自行輸入系數矩陣A
cout.setf(ios_base::left?ios_base::adjustfield?);
int?factor;
for?(loop?=?0;loop for(factor?=?0;factor? {
//cout?<<“?請輸入第“< FileIn?>>???coefficient_matrix[loop][factor];
}
///////////////////////////////////////
double?*constant_Matrix?;
constant_Matrix?=?new?double?[line];
//cout?< for(loop?=?0;loop? {
//cout?<<“請輸入第“< FileIn?>>constant_Matrix[loop];
}
/////////////////////////////////////////
double?*First_iteratorValue;?
First_iteratorValue?=?new?double??[line];//給行分配大小
//////////////////////////////////////////
//輸入數據
//cout<<“\n請輸入近似解的初始矩陣值:“< for(loop?=?0;loop {
//cout?<<“請輸入第“< FileIn>>?First_iteratorValue[loop];
}
///////////////////////////////////////
//聲明x(k+1)
double??*Next_iterator?=?new?double?[line];
for(loop?=?0;loop? Next_iterator[loop]?=?0;
int?count?=?0;
double?MaxPrecision?=?0.001;
cout<<“\t\t\tGuass?算法“< cout<<“\n______________________________________________________________“< cout.width(15);
cout<<“k“;

for(loop?=?0;loop? {
cout.width(15);
cout<<“X“;
}

cout<<“\n______________________________________________________________“< int?index;
for(index?=?0;index? {
if(index?==?0)
{
cout.width(15);
cout< }

cout.width?(15);
cout< }
cout< cout.clear?();
int?w?=?1.2;
do
{
double?sum?=?0;
double?total?=?0;
int?index_i=?0;
int?index_j?=?0;
index_j?=?0;
do
{

if(index_j? do{

sum?+=?coefficient_matrix[index_i][index_j]*Next_iterator[index_j];
index_j++;

}while(index_j?
index_j?=?index_i+1;
for(;index_j? total?+=?coefficient_matrix[index_i][index_j]*First_iteratorValue[index_j];

Next_iterator[index_i]?=?First_iteratorValue[index_i]*(1-w)+w*(constant_Matrix[index_i]-total-sum)/coefficient_matrix[index_i][index_i];
index_i++;
}while(index_i?
int?FOR_loop?=?0;
for(;FOR_loop? {??

First_iteratorValue?[FOR_loop]?=?Next_iterator[FOR_loop];
}



for(index?=?0;index? {
if(index?==?0)
{
cout

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2010-03-11?16:38??超松弛\
?????文件??????????46??2010-01-15?07:19??超松弛\data.txt
?????文件??????????43??2010-01-15?08:17??超松弛\data2.txt
?????文件??????????49??2010-01-15?08:18??超松弛\data3.txt
?????文件??????????44??2010-01-15?08:19??超松弛\data4.txt
?????文件??????????26??2010-01-15?08:19??超松弛\data5.txt
?????目錄???????????0??2010-03-11?16:38??超松弛\Debug\
?????文件????????8828??2010-01-15?08:34??超松弛\Debug\BuildLog.htm
?????文件???????47507??2010-01-15?08:34??超松弛\Debug\Function.obj
?????文件????????5076??2010-01-15?08:34??超松弛\Debug\main.obj
?????文件??????????67??2010-01-15?08:34??超松弛\Debug\mt.dep
?????文件??????175104??2010-01-15?08:34??超松弛\Debug\vc90.idb
?????文件??????225280??2010-01-15?08:34??超松弛\Debug\vc90.pdb
?????文件???????44032??2010-01-15?08:34??超松弛\Debug\超松弛.exe
?????文件?????????663??2010-01-15?08:34??超松弛\Debug\超松弛.exe.embed.manifest
?????文件?????????728??2010-01-15?08:34??超松弛\Debug\超松弛.exe.embed.manifest.res
?????文件?????????621??2010-01-15?08:34??超松弛\Debug\超松弛.exe.intermediate.manifest
?????文件??????402592??2010-01-15?08:34??超松弛\Debug\超松弛.ilk
?????文件??????535552??2010-01-15?08:34??超松弛\Debug\超松弛.pdb
?????文件????????3457??2010-01-15?08:34??超松弛\Function.cpp
?????文件?????????262??2010-01-15?08:34??超松弛\main.cpp
?????文件?????1223680??2010-01-15?08:45??超松弛\超松弛.ncb
?????文件?????????883??2010-01-15?08:28??超松弛\超松弛.sln
?????文件????????8192??2010-01-15?08:45??超松弛\超松弛.suo
?????文件????????3978??2010-01-15?08:34??超松弛\超松弛.vcproj
?????文件????????1427??2010-01-15?08:45??超松弛\超松弛.vcproj.PC-20100113JOHO.Administrator.user

評論

共有 條評論

相關資源