Matrix类详见http://hi.baidu.com/aragon2/blog/item/1edbba124ab4beecc2ce796e.html?timeStamp=1311046817866,
一个基本的水准平差控制台程序。
1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4: using System.Text;
5: using System.IO;
6:
7: namespace Adjustment
8: {
9: public class LPointClass
10: {
11: public string PID { get; set; }
12: public double H { get; set; }
13: public bool IsControlP { get; set; }
14: }
15:
16: public class LineClass
17: {
18: public int CZCount { get; set; }
19: public LPointClass SP { get; set; }
20: public LPointClass EP { get; set; }
21: public double dH { get; set; }
22: public double Distance { get; set; }
23: }
24:
25: public class AdjustedPart
26: {
27: List<LPointClass> AdjustedPoints = new List<LPointClass>();
28: public Matrix B { get; set; }
29: public Matrix Q { get; set; }
30: }
31:
32: public class AdjustClass
33: {
34: public Matrix B { get; set; }
35: public Matrix P { get; set; }
36: public Matrix l { get; set; }
37: public Matrix Q { get; set; }
38: public Matrix x { get; set; }
39: public Matrix V { get; set; }
40:
41: public void LevelAdjust(List<LineClass> CurrentSegments, List<LPointClass> CurrentPoints, List<LPointClass> ControlPoints)
42: {
43: int n = CurrentSegments.Count;
44: int t = CurrentPoints.Count - ControlPoints.Count;
45: B = new Matrix(n, t);