資源簡介
一個(gè)自己編制的helmert方差分量學(xué)習(xí)程序,希望初學(xué)者能從中借鑒到一些方法。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
namespace?qqq
{
????public?class?Class1
????{
????????private?double[]?ReverseMatrix(double[]?dMatrix?int?Level)
???{
????double?dMatrixValue?=?MatrixValue(?dMatrix?Level?);
????if(?dMatrixValue?==?0?)?return?null;
????????????
????double[]?dReverseMatrix?=?new?double[Level2*Level];
????double?x?c;
????//?Init?Reverse?matrix?
????for(?int?i?=?0;?i?
????{
????????for(?int?j?=?0;?j?2?*?Level;?j++?)
????????{
????????????if(?j?
????????????????dReverseMatrix[ij]?=?dMatrix[ij];
????????????else
????????????????dReverseMatrix[ij]?=?0;
????????}
?
????????dReverseMatrix[iLevel?+?i?]?=?1;
????}
?
????for(?int?i?=?0?j?=?0;?i?
????{
????????if(?dReverseMatrix[ij]?==?0?)
????????{
????????????int?m?=?i;
????????????for(?;?dMatrix[mj]?==?0;?m++?);
????????????if(?m?==?Level?)
????????????????return?null;
????????????else
????????????{
????????????????//?Add?i-row?with?m-row
????????????????for(?int?n?=?j;?n?2?*?Level;?n++?)
????????????????????dReverseMatrix[in]?+=?dReverseMatrix[mn];
????????????}
????????}
?
????????//?Format?the?i-row?with?“1“?start
????????x?=?dReverseMatrix[ij];
????????if(?x?!=?1?)
????????{
????????????for(?int?n?=?j;?n?2?*?Level;?n++?)
????????????????if(?dReverseMatrix[in]?!=?0?)
????????????????????dReverseMatrix[in]?/=?x;
????????}
?
????????//?Set?0?to?the?current?column?in?the?rows?after?current?row
????????for(?int?s?=?Level?-?1;?s?>?i;s--?)
????????{
????????????x?=?dReverseMatrix[sj];
????????????for(?int?t?=?j;?t?2?*?Level;?t++?)
????????????????dReverseMatrix[st]?-=?(?dReverseMatrix[it]*?x?);
????????}
????}
?
????//?Format?the?first?matrix?into?unit-matrix
????for(?int?i?=?Level?-?2;?i?>=?0;?i--?)
????{
????????for(?int?j?=?i?+?1?;?j?
????????????if(?dReverseMatrix[ij]?!=?0?)
????????????{
????????????????c?=?dReverseMatrix[ij];
????????????????for(?int?n?=?j;?n?2*Level;?n++?)
????????????????????dReverseMatrix[in]?-=?(?c?*?dReverseMatrix[jn]?);
????????????}
????}
?
????double[]?dReturn?=?new?double[Level?Level];
????for(?int?i?=?0;?i?
????????for(?int?j?=?0;?j?
????????????dReturn[ij]?=?dReverseMatrix[ij+Level];
????return?dReturn;
}
?
private?double?MatrixValue(?double[]?MatrixList?int?Level?)
{
????double[]?dMatrix?=?new?double[Level?Level];
????for(?int?i?=?0;?i?
????????for(?int?j?=?0;?j?
????????????dMatrix[ij]?=?MatrixList[ij];
????double?c?x;
????int?k?=?1;
????for(?int?i?=?0?j?=?0;?i?
????{
????????if(?dMatrix[ij]?==?0?)
????????{
????????????int?m?=?i;
????????????for(?;?dMatrix
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????895??2010-03-27?13:34??ND(荷爾蒙特)\ND.sln
????..A..H.?????18944??2010-05-17?13:15??ND(荷爾蒙特)\ND.suo
?????文件?????????28??2010-03-29?18:00??ND(荷爾蒙特)\荷爾蒙特矩陣\S1.txt
?????文件?????????28??2010-03-29?23:07??ND(荷爾蒙特)\荷爾蒙特矩陣\S2.txt
?????文件?????????28??2010-03-29?23:08??ND(荷爾蒙特)\荷爾蒙特矩陣\S3.txt
?????文件?????????16??2010-03-29?18:01??ND(荷爾蒙特)\荷爾蒙特矩陣\W1.txt
?????文件?????????16??2010-03-29?23:07??ND(荷爾蒙特)\荷爾蒙特矩陣\W2.txt
?????文件?????????16??2010-03-29?23:08??ND(荷爾蒙特)\荷爾蒙特矩陣\W3.txt
?????文件???????4064??2010-03-29?20:53??ND(荷爾蒙特)\ND\Class1.cs
?????文件????????137??2010-03-29?21:38??ND(荷爾蒙特)\ND\Class2.cs
?????文件??????13807??2010-05-14?12:53??ND(荷爾蒙特)\ND\Class3.cs
?????文件??????26577??2010-05-17?11:53??ND(荷爾蒙特)\ND\Form1.cs
?????文件???????7538??2010-05-15?12:01??ND(荷爾蒙特)\ND\Form1.Designer.cs
?????文件???????5814??2010-05-15?12:01??ND(荷爾蒙特)\ND\Form1.resx
?????文件???????4051??2010-03-29?22:05??ND(荷爾蒙特)\ND\MMM.cs
?????文件???????3834??2010-05-13?21:07??ND(荷爾蒙特)\ND\ND.csproj
?????文件????????461??2010-03-27?13:34??ND(荷爾蒙特)\ND\Program.cs
?????文件???????1176??2010-03-27?13:34??ND(荷爾蒙特)\ND\Properties\AssemblyInfo.cs
?????文件???????2860??2010-03-27?13:34??ND(荷爾蒙特)\ND\Properties\Resources.Designer.cs
?????文件???????5612??2010-03-27?13:34??ND(荷爾蒙特)\ND\Properties\Resources.resx
?????文件???????1087??2010-03-27?13:34??ND(荷爾蒙特)\ND\Properties\Settings.Designer.cs
?????文件????????249??2010-03-27?13:34??ND(荷爾蒙特)\ND\Properties\Settings.settings
?????文件???????3428??2010-05-17?13:14??ND(荷爾蒙特)\ND\obj\ND.csproj.FileListAbsolute.txt
?????文件????????842??2010-05-15?13:28??ND(荷爾蒙特)\ND\obj\Debug\ND.csproj.GenerateResource.Cache
?????文件??????36864??2010-05-17?11:54??ND(荷爾蒙特)\ND\obj\Debug\ND.exe
?????文件????????180??2010-05-15?13:28??ND(荷爾蒙特)\ND\obj\Debug\ND.Form1.resources
?????文件??????77312??2010-05-17?11:54??ND(荷爾蒙特)\ND\obj\Debug\ND.pdb
?????文件????????180??2010-03-29?20:50??ND(荷爾蒙特)\ND\obj\Debug\ND.Properties.Resources.resources
?????文件???????6870??2010-05-17?10:56??ND(荷爾蒙特)\ND\obj\Debug\ResolveAssemblyReference.cache
?????文件??????36864??2010-05-17?11:54??ND(荷爾蒙特)\ND\bin\Debug\ND.exe
............此處省略26個(gè)文件信息
評(píng)論
共有 條評(píng)論