Code documentation updates.
This commit is contained in:
@@ -46,6 +46,10 @@ namespace TriangleNet.Tools
|
||||
get { return irow; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AdjacencyMatrix" /> class.
|
||||
/// </summary>
|
||||
/// <param name="mesh">The mesh.</param>
|
||||
public AdjacencyMatrix(Mesh mesh)
|
||||
{
|
||||
this.N = mesh.vertices.Count;
|
||||
@@ -60,6 +64,12 @@ namespace TriangleNet.Tools
|
||||
SortIndices();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AdjacencyMatrix" /> class.
|
||||
/// </summary>
|
||||
/// <param name="pcol">The column pointers.</param>
|
||||
/// <param name="irow">The row indices.</param>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public AdjacencyMatrix(int[] pcol, int[] irow)
|
||||
{
|
||||
this.N = pcol.Length - 1;
|
||||
@@ -265,6 +275,9 @@ namespace TriangleNet.Tools
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sort indices.
|
||||
/// </summary>
|
||||
public void SortIndices()
|
||||
{
|
||||
int k1, k2, n = N;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace TriangleNet.Tools
|
||||
/// <summary>
|
||||
/// Gets the permutation vector for the Reverse Cuthill-McKee numbering.
|
||||
/// </summary>
|
||||
/// <param name="mesh">The mesh.</param>
|
||||
/// <param name="matrix">The adjacency matrix.</param>
|
||||
/// <returns>Permutation vector.</returns>
|
||||
public int[] Renumber(AdjacencyMatrix matrix)
|
||||
{
|
||||
@@ -89,11 +89,11 @@ namespace TriangleNet.Tools
|
||||
int iccsze = 0;
|
||||
int level_num = 0;
|
||||
|
||||
/// Index vector for a level structure. The level structure is stored in the
|
||||
/// currently unused spaces in the permutation vector PERM.
|
||||
// Index vector for a level structure. The level structure is stored in the
|
||||
// currently unused spaces in the permutation vector PERM.
|
||||
int[] level_row = new int[n + 1];
|
||||
|
||||
/// Marks variables that have been numbered.
|
||||
// Marks variables that have been numbered.
|
||||
int[] mask = new int[n];
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
@@ -139,8 +139,8 @@ namespace TriangleNet.Tools
|
||||
/// nonzero input mask values are considered by the routine. The nodes numbered by RCM will have
|
||||
/// their mask values set to zero.</param>
|
||||
/// <param name="perm">Output, int PERM(NODE_NUM), the RCM ordering.</param>
|
||||
/// <param name="offset">Internal array offset.</param>
|
||||
/// <param name="iccsze">Output, int ICCSZE, the size of the connected component that has been numbered.</param>
|
||||
/// <param name="node_num">the number of nodes.</param>
|
||||
/// <remarks>
|
||||
/// The connected component is specified by a node ROOT and a mask.
|
||||
/// The numbering starts at the root node.
|
||||
@@ -169,8 +169,8 @@ namespace TriangleNet.Tools
|
||||
// Number of nodes in the mesh.
|
||||
int n = matrix.N;
|
||||
|
||||
/// Workspace, int DEG[NODE_NUM], a temporary vector used to hold
|
||||
/// the degree of the nodes in the section graph specified by mask and root.
|
||||
// Workspace, int DEG[NODE_NUM], a temporary vector used to hold
|
||||
// the degree of the nodes in the section graph specified by mask and root.
|
||||
int[] deg = new int[n];
|
||||
|
||||
// Find the degrees of the nodes in the component specified by MASK and ROOT.
|
||||
@@ -269,7 +269,7 @@ namespace TriangleNet.Tools
|
||||
/// containing the level structure found.</param>
|
||||
/// <param name="level">Output, int LEVEL(NODE_NUM), the level structure array pair
|
||||
/// containing the level structure found.</param>
|
||||
/// <param name="node_num">the number of nodes.</param>
|
||||
/// <param name="offset">Internal array offset.</param>
|
||||
/// <remarks>
|
||||
/// The diameter of a graph is the maximum distance (number of edges)
|
||||
/// between any two nodes of the graph.
|
||||
@@ -409,7 +409,7 @@ namespace TriangleNet.Tools
|
||||
/// in level 1. The neighbors of ROOT are in level 2, and so on.</param>
|
||||
/// <param name="level_row">Output, int LEVEL_ROW[NODE_NUM+1], the rooted level structure.</param>
|
||||
/// <param name="level">Output, int LEVEL[NODE_NUM], the rooted level structure.</param>
|
||||
/// <param name="node_num">the number of nodes.</param>
|
||||
/// <param name="offset">Internal array offset.</param>
|
||||
/// <remarks>
|
||||
/// Only nodes for which MASK is nonzero will be considered.
|
||||
///
|
||||
@@ -502,7 +502,7 @@ namespace TriangleNet.Tools
|
||||
/// <param name="iccsze">Output, int ICCSIZE, the number of nodes in the connected component.</param>
|
||||
/// <param name="ls">Output, int LS[NODE_NUM], stores in entries 1 through ICCSIZE the nodes in the
|
||||
/// connected component, starting with ROOT, and proceeding by levels.</param>
|
||||
/// <param name="node_num">the number of nodes.</param>
|
||||
/// <param name="offset">Internal array offset.</param>
|
||||
/// <remarks>
|
||||
/// The connected component is specified by MASK and ROOT.
|
||||
/// Nodes for which MASK is zero are ignored.
|
||||
@@ -621,7 +621,6 @@ namespace TriangleNet.Tools
|
||||
/// <summary>
|
||||
/// Produces the inverse of a given permutation.
|
||||
/// </summary>
|
||||
/// <param name="n">Number of items permuted.</param>
|
||||
/// <param name="perm">PERM[N], a permutation.</param>
|
||||
/// <returns>The inverse permutation.</returns>
|
||||
int[] PermInverse(int[] perm)
|
||||
@@ -642,6 +641,7 @@ namespace TriangleNet.Tools
|
||||
/// Reverses the elements of an integer vector.
|
||||
/// </summary>
|
||||
/// <param name="size">number of entries in the array.</param>
|
||||
/// <param name="offset">Internal array offset.</param>
|
||||
/// <param name="a">the array to be reversed.</param>
|
||||
/// <example>
|
||||
/// Input:
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace TriangleNet.Tools
|
||||
{
|
||||
using TriangleNet.Geometry;
|
||||
|
||||
/// <summary>
|
||||
/// Interpolation helper.
|
||||
/// </summary>
|
||||
public static class Interpolation
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace TriangleNet.Tools
|
||||
using System;
|
||||
using TriangleNet.Geometry;
|
||||
|
||||
/// <summary>
|
||||
/// Segment intersection helper.
|
||||
/// </summary>
|
||||
public static class IntersectionHelper
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -10,6 +10,9 @@ namespace TriangleNet.Tools
|
||||
using System.Collections.Generic;
|
||||
using TriangleNet.Geometry;
|
||||
|
||||
/// <summary>
|
||||
/// Polygon validation helper.
|
||||
/// </summary>
|
||||
public static class PolygonValidator
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace TriangleNet.Tools
|
||||
|
||||
Mesh mesh;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="QualityMeasure" /> class.
|
||||
/// </summary>
|
||||
public QualityMeasure()
|
||||
{
|
||||
areaMeasure = new AreaMeasure();
|
||||
@@ -158,6 +161,9 @@ namespace TriangleNet.Tools
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Update all quality measures.
|
||||
/// </summary>
|
||||
public void Update(Mesh mesh)
|
||||
{
|
||||
this.mesh = mesh;
|
||||
|
||||
@@ -22,12 +22,20 @@ namespace TriangleNet.Tools
|
||||
/// Number of incircle tests performed.
|
||||
/// </summary>
|
||||
public static long InCircleCount = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of adaptive incircle tests performed.
|
||||
/// </summary>
|
||||
public static long InCircleAdaptCount = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of counterclockwise tests performed.
|
||||
/// </summary>
|
||||
public static long CounterClockwiseCount = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Number of adaptive counterclockwise tests performed.
|
||||
/// </summary>
|
||||
public static long CounterClockwiseAdaptCount = 0;
|
||||
|
||||
/// <summary>
|
||||
@@ -201,6 +209,8 @@ namespace TriangleNet.Tools
|
||||
/// Update statistics about the quality of the mesh.
|
||||
/// </summary>
|
||||
/// <param name="mesh"></param>
|
||||
/// <param name="sampleDegrees">Number of degrees to sample
|
||||
/// (currently fixed to 60 = sample every 3 degrees).</param>
|
||||
public void Update(Mesh mesh, int sampleDegrees)
|
||||
{
|
||||
Point[] p = new Point[3];
|
||||
|
||||
@@ -50,6 +50,12 @@ namespace TriangleNet.Tools
|
||||
root.CreateSubRegion(++currentDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Query the quadtree a given point.
|
||||
/// </summary>
|
||||
/// <param name="x">The x coordinate.</param>
|
||||
/// <param name="y">The y coordinate.</param>
|
||||
/// <returns></returns>
|
||||
public ITriangle Query(double x, double y)
|
||||
{
|
||||
var point = new Point(x, y);
|
||||
|
||||
Reference in New Issue
Block a user