Last change
on this file since 10915 was
9945,
checked in by ascheibe, 11 years ago
|
#1886
- added new convex hull algorithm based on SMO/SVM
- added unit test and a visualization
- updated MIConvexHull
|
File size:
719 bytes
|
Line | |
---|
1 |
|
---|
2 | namespace MIConvexHull
|
---|
3 | {
|
---|
4 | internal static class Constants
|
---|
5 | {
|
---|
6 | internal const double epsilon = 1e-8;
|
---|
7 | internal const double epsilonSquared = 1e-16;
|
---|
8 |
|
---|
9 |
|
---|
10 | /// <summary>
|
---|
11 | /// Checks whether to points are essentially the same position.
|
---|
12 | /// </summary>
|
---|
13 | /// <param name="pt1">The PT1.</param>
|
---|
14 | /// <param name="pt2">The PT2.</param>
|
---|
15 | /// <param name="dimension">The dimension.</param>
|
---|
16 | /// <returns></returns>
|
---|
17 | public static bool SamePosition(double[] pt1, double[] pt2, int dimension)
|
---|
18 | {
|
---|
19 | return (StarMath.norm2(StarMath.subtract(pt1, pt2, dimension), dimension, true) < epsilonSquared);
|
---|
20 | }
|
---|
21 | }
|
---|
22 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.