资源简介
用C#编写的摄影测量后方交会和前方交会代码,参考了网上的一些代码,经过调试,代码没问题
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Resection
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public TextBox[] mytextbox = new TextBox[41];
//矩阵打包成类,矩阵为m * n直接调用
public class Matrix
{
double[] A;
int m n;
string name;
public Matrix(int am int an)
{
m = am;
n = an;
A = new double[m n];
name = “Result“;
}
public Matrix(int am int an string aName)
{
m = am;
n = an;
A = new double[m n];
name = aName;
}
public int getM
{
get { return m; }
}
public int getN
{
get { return n; }
}
public double[] Detail
{
get { return A; }
set { A = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
}
/***********矩阵通用操作打包*************/
class MatrixOperator
{
//矩阵加法
public static Matrix MatrixAdd(Matrix Ma Matrix Mb)
{
int m = Ma.getM;
int n = Ma.getN;
int m2 = Mb.getM;
int n2 = Mb.getN;
if ((m != m2) || (n != n2))
{
Exception myException = new Exception(“数组维数不匹配“);
throw myException;
}
Matrix Mc = new Matrix(m n);
double[] c = Mc.Detail;
double[] a = Ma.Detail;
double[] b = Mb.Detail;
for (int i = 0; i < m; i++)
for (int j = 0; j < n; j++)
c[i j] = a[i j] + b[i j];
return Mc;
}
//矩阵减法
public static Matrix MatrixSub(Matrix Ma Matrix Mb)
{
int m = Ma.getM;
int n = Ma.getN;
int m2 = Mb.getM;
int n2 = Mb.getN;
if ((m != m2) || (n != n2))
{
Exception myException = new Exception(“数组维数不匹配“);
throw myException;
}
Matrix Mc = new Matrix(m n);
double[] c = Mc.Detail;
double[] a = Ma.Detail;
double[] b = Mb.Detail;
for (int i = 0; i < m; i++)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 32256 2015-09-05 20:44 Resection\Resection\bin\Debug\Resection.exe
文件 54784 2015-09-05 20:44 Resection\Resection\bin\Debug\Resection.pdb
文件 11600 2015-09-05 20:46 Resection\Resection\bin\Debug\Resection.vshost.exe
文件 490 2013-06-18 20:28 Resection\Resection\bin\Debug\Resection.vshost.exe.manifest
文件 28094 2015-09-05 20:44 Resection\Resection\Form1.cs
文件 41685 2015-09-05 20:44 Resection\Resection\Form1.Designer.cs
文件 5817 2015-09-05 20:44 Resection\Resection\Form1.resx
文件 5420 2015-09-05 09:01 Resection\Resection\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6332 2015-09-05 20:46 Resection\Resection\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 946 2015-09-05 17:16 Resection\Resection\obj\x86\Debug\Resection.csproj.FileListAbsolute.txt
文件 975 2015-09-05 17:09 Resection\Resection\obj\x86\Debug\Resection.csproj.GenerateResource.Cache
文件 9174 2015-09-05 09:14 Resection\Resection\obj\x86\Debug\Resection.csprojResolveAssemblyReference.cache
文件 32256 2015-09-05 20:44 Resection\Resection\obj\x86\Debug\Resection.exe
文件 180 2015-09-05 20:44 Resection\Resection\obj\x86\Debug\Resection.Form1.resources
文件 54784 2015-09-05 20:44 Resection\Resection\obj\x86\Debug\Resection.pdb
文件 180 2015-09-04 16:19 Resection\Resection\obj\x86\Debug\Resection.Properties.Resources.resources
文件 973 2015-09-05 20:46 Resection\Resection\obj\x86\Debug\Resection_intersection.csproj.FileListAbsolute.txt
文件 975 2015-09-05 20:44 Resection\Resection\obj\x86\Debug\Resection_intersection.csproj.GenerateResource.Cache
文件 504 2015-09-04 16:19 Resection\Resection\Program.cs
文件 1350 2015-09-04 13:06 Resection\Resection\Properties\AssemblyInfo.cs
文件 2870 2015-09-04 13:06 Resection\Resection\Properties\Resources.Designer.cs
文件 5612 2015-09-04 13:06 Resection\Resection\Properties\Resources.resx
文件 1096 2015-09-04 13:06 Resection\Resection\Properties\Settings.Designer.cs
文件 249 2015-09-04 13:06 Resection\Resection\Properties\Settings.settings
文件 3677 2015-09-04 16:19 Resection\Resection\Resection_intersection.csproj
文件 895 2015-09-05 17:25 Resection\Resection_intersection.sln
..A..H. 20992 2015-09-05 20:47 Resection\Resection_intersection.suo
目录 0 2015-09-04 13:06 Resection\Resection\obj\x86\Debug\TempPE
目录 0 2015-09-05 20:44 Resection\Resection\obj\x86\Debug
目录 0 2015-09-04 16:19 Resection\Resection\bin\Debug
............此处省略9个文件信息
评论
共有 条评论