-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change mathematics library to mathnet-numerics (MIT). All transformation classes rewrite to mathnet-numerics. Rename all classes with tests. Add SingularValueDecomposition algorithm calculation parameters transformation. Add SingularValueDecomposition xml doc. Coverage 98%.
- Loading branch information
Showing
18 changed files
with
915 additions
and
766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
using System.Collections.Generic; | ||
using Extreme.Mathematics; | ||
using SCPT.Transformation; | ||
|
||
namespace SCPT.Helper | ||
{ | ||
internal static class Extension | ||
{ | ||
// TODO write Helmert transformation | ||
// TODO write Helmert transformation | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using Extreme.Mathematics; | ||
using Extreme.Mathematics.LinearAlgebra; | ||
using MathNet.Numerics.LinearAlgebra; | ||
using SCPT.Helper; | ||
|
||
|
||
internal partial class Incapsulation | ||
public abstract class BaseTest | ||
{ | ||
public abstract class BaseTest | ||
{ | ||
protected static string PathToTest = | ||
"D:\\RiderProjects\\-SCPT-SystemCoordinateParametersTransformation\\SCPT\\CalculateParameters\\Tests"; | ||
protected static string PathToTest = | ||
"D:\\RiderProjects\\-SCPT-SystemCoordinateParametersTransformation\\SCPT\\CalculateParameters\\Tests"; | ||
|
||
protected DenseMatrix<double> ReadControlDataFromFile(string path, int row, int col) | ||
protected Matrix<double> ReadControlDataFromFile(string path, int row, int col) | ||
{ | ||
var matrixFromData = Matrix<double>.Build.Dense(row, col); | ||
var data = File.ReadAllLines(path); | ||
for (int textRow = 0; textRow < data.Length; textRow++) | ||
{ | ||
var matrixFromData = Matrix.Create<double>(row, col); | ||
var data = File.ReadAllLines(path); | ||
for (int textRow = 0; textRow < data.Length; textRow++) | ||
{ | ||
var split = data[textRow].Split(' '); | ||
for (int textCol = 0; textCol < split.Length; textCol++) | ||
matrixFromData[textRow, textCol] = Convert.ToDouble(split[textCol]); | ||
} | ||
|
||
return matrixFromData; | ||
var split = data[textRow].Split(' '); | ||
for (int textCol = 0; textCol < split.Length; textCol++) | ||
matrixFromData[textRow, textCol] = Convert.ToDouble(split[textCol]); | ||
} | ||
|
||
protected void FillListsCoordinationData(string path, ref List<Point> listSrc, ref List<Point> listDest) | ||
return matrixFromData; | ||
} | ||
|
||
protected void FillListsCoordinationData(string path, ref List<Point> listSrc, ref List<Point> listDest) | ||
{ | ||
var srcMatrix = ReadControlDataFromFile(path + "\\testpoints_src.txt", 10, 3); | ||
var dstMatrix = ReadControlDataFromFile(path + "\\testpoints_dest.txt", 10, 3); | ||
for (int row = 0; row < srcMatrix.RowCount; row++) | ||
{ | ||
var srcMatrix = ReadControlDataFromFile(path + "\\testpoints_src.txt", 10, 3); | ||
var dstMatrix = ReadControlDataFromFile(path + "\\testpoints_dest.txt", 10, 3); | ||
for (int row = 0; row < srcMatrix.RowCount; row++) | ||
{ | ||
listSrc.Add(new Point(srcMatrix[row, 0], srcMatrix[row, 1], srcMatrix[row, 2])); | ||
listDest.Add(new Point(dstMatrix[row, 0], dstMatrix[row, 1], dstMatrix[row, 2])); | ||
} | ||
listSrc.Add(new Point(srcMatrix[row, 0], srcMatrix[row, 1], srcMatrix[row, 2])); | ||
listDest.Add(new Point(dstMatrix[row, 0], dstMatrix[row, 1], dstMatrix[row, 2])); | ||
} | ||
} | ||
} |
121 changes: 0 additions & 121 deletions
121
SCPT/CalculateParameters/Tests/ConvertMatrix/ConvertMatrixTests.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.