Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with missing and duplicate docstrings #198

Merged
merged 10 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- Fixed issue with `use_barriers` when a ghost edge is selected at random during point location. See [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196).
- Introduced the (currently internal) function `get_positive_curve_indices` for finding curves with positive orientation in a `Triangulation`. [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196).
- `is_exterior_curve`, `is_interior_curve`, `num_exterior_curves`, and `is_disjoint` are now defined based on `get_positive_curve_indices` rather than `get_exterior_curve_indices`. See [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196).
- `PointLocationHistory` was not marked as public. This has been fixed. See [#198](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/198).
- Fixed an issue with missing docstrings and duplicate docstrings in the documentation. See [#198](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/198).
- `copy` and `deepcopy` are now correctly implemented for `PolygonTree`s and `PolygonHierarchy`s. See [#199](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/199)

## 1.5.0
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DocMeta.setdocmeta!(
recursive = true,
)

const IS_LIVESERVER = false && get(ENV, "LIVESERVER_ACTIVE", "false") == "true"
const IS_LIVESERVER = get(ENV, "LIVESERVER_ACTIVE", "false") == "true"
if IS_LIVESERVER
using Revise
Revise.revise()
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Triangulation
VoronoiTessellation
ConvexHull
InsertionEventHistory
PointLocationHistory
```
2 changes: 1 addition & 1 deletion docs/src/api/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ associated accessor functions are intended to be used, e.g. prefer `get_X(tri)`
Each section will first start with the list of all functions to be listed, and then the docstrings of those functions will be given. There will be some docstrings that fit into multiple categories, in which case one is chosen. Here is an index of all the functions listed in the above pages.

```@index
Pages = ["data_structures.md", "triangulation.md", "operations.md", "voronoi.md", "convex_hull.md", "curves.md", "iterators.md", "point_location.md", "predicates.md", "statistics.md", "primitive_interfaces.md", "other.md"]
Pages = ["convex_hull.md", "curves.md", "data_structures.md", "iterators.md", "operations.md", "other.md", "point_location.md", "predicates.md", "primitives.md", "statistics.md", "triangulation.md", "voronoi.md"]
```
3 changes: 3 additions & 0 deletions docs/src/extended/algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Pages = ["src/algorithms/triangulation/basic_operations/add_segment.jl"]
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/algorithms/triangulation/constrained_triangulation.jl"]
Filter = t -> !(t in (DelaunayTriangulation.convert_boundary_points_to_indices,))
```

```@autodocs
Expand Down Expand Up @@ -92,6 +93,7 @@ Pages = ["src/data_structures/triangulation/methods/segments.jl"]
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/data_structures/triangulation/methods/weights.jl"]
Filter = t -> !(t in (DelaunayTriangulation.ZeroWeight,))
```

## Mesh Refinement
Expand Down Expand Up @@ -170,6 +172,7 @@ Pages = ["src/data_structures/triangulation/methods/adjacent2vertex.jl"]
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/data_structures/triangulation/methods/graph.jl"]
Filter = t -> !(t in (DelaunayTriangulation.get_vertices, DelaunayTriangulation.get_edges))
```

```@autodocs
Expand Down
84 changes: 82 additions & 2 deletions docs/src/extended/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ MaxPriorityQueue
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/queue/max_priority_queue.jl"]
Filter = t -> !(t in (DelaunayTriangulation.MaxPriorityQueue,))
```

## Queue
Expand All @@ -30,6 +31,7 @@ Queue
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/queue/queue.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Queue,))
```

## BalancedBST
Expand All @@ -43,6 +45,7 @@ BalancedBST
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/trees/bst.jl"]
Filter = t -> !(t in (DelaunayTriangulation.BalancedBST,))
```

## RTree
Expand All @@ -56,6 +59,7 @@ RTree
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/trees/rtree.jl"]
Filter = t -> !(t in (DelaunayTriangulation.RTree,))
```

```@docs
Expand All @@ -73,6 +77,7 @@ PolygonHierarchy
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/trees/polygon_hierarchy.jl"]
Filter = t -> !(t in (DelaunayTriangulation.PolygonHierarchy,))
```

## Adjacent
Expand All @@ -86,6 +91,7 @@ Adjacent
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/adjacent.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Adjacent,))
```

## Adjacent2Vertex
Expand All @@ -99,6 +105,7 @@ Adjacent2Vertex
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/adjacent2vertex.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Adjacent2Vertex,))
```

## Graph
Expand All @@ -112,13 +119,14 @@ Graph
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/graph.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Graph,))
```

## Curves

There are many data structures used to define the curves we provide in this package, all subtyping the `AbstractParametricCurve` type. This type, and its subtypes, are all in the public API with the exception of `PiecewiseLinear`.

```@docs; canonical=false
```@docs; canonical=false
AbstractParametricCurve
LineSegment
CircularArc
Expand All @@ -128,39 +136,55 @@ BSpline
CatmullRomSpline
```

```@docs; canonical=false
twice_differentiate
total_variation
thrice_differentiate
differentiate
arc_length
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/abstract.jl"]
Filter = t -> !(t in (DelaunayTriangulation.AbstractParametricCurve, DelaunayTriangulation.twice_differentiate, DelaunayTriangulation.total_variation, DelaunayTriangulation.thrice_differentiate, DelaunayTriangulation.differentiate, DelaunayTriangulation.arc_length))
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/beziercurve.jl"]
Filter = t -> !(t in (DelaunayTriangulation.BezierCurve,))

```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/bspline.jl"]
Filter = t -> !(t in (DelaunayTriangulation.BSpline,))
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/catmullromspline.jl"]
Filter = t -> !(t in (DelaunayTriangulation.CatmullRomSpline,))
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/circulararc.jl"]
Filter = t -> !(t in (DelaunayTriangulation.CircularArc,))
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/ellipticalarc.jl"]
Filter = t -> !(t in (DelaunayTriangulation.EllipticalArc,))
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/curves/linesegment.jl"]
Filter = t -> !(t in (DelaunayTriangulation.LineSegment,))
```

```@autodocs
Expand Down Expand Up @@ -211,6 +235,7 @@ ConvexHull
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/convex_hull.jl"]
Filter = t -> !(t in (DelaunayTriangulation.ConvexHull,))
```

## Triangulation
Expand All @@ -224,6 +249,7 @@ Triangulation
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/triangulation.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Triangulation,))
```

## TriangulationCache
Expand All @@ -246,6 +272,7 @@ BoundaryEnricher
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/boundary_enricher.jl"]
Filter = t -> !(t in (DelaunayTriangulation.BoundaryEnricher,))
```

## AbstractEach(Vertex/Edge/Triangle) Iterators
Expand All @@ -261,22 +288,28 @@ Pages = ["data_structures/triangulation/methods/iterators.jl"]

We provide a means for storing the history of triangles encountered during point location, using a `PointLocationHistory` struct. The main motivation for this struct is for constrained triangulations.

```@docs; canonical=false
PointLocationHistory
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/point_location_history.jl"]
Filter = t -> !(t in (DelaunayTriangulation.PointLocationHistory,))
```

## IndividualTriangleStatistics

We provide an `IndividualTriangleStatistics` struct for storing statistics about individual triangles in a triangulation. This struct is in the public API, as listed in the [API](../api/overview.md).

```@docs; canonical=false
```@docs; canonical=false
IndividualTriangleStatistics
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/statistics/individual_triangle_statistics.jl"]
Filter = t -> !(t in (DelaunayTriangulation.IndividualTriangleStatistics,))
```

## TriangulationStatistics
Expand All @@ -290,15 +323,21 @@ TriangulationStatistics
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/statistics/triangulation_statistics.jl"]
Filter = t -> !(t in (DelaunayTriangulation.TriangulationStatistics,))
```

## InsertionEventHistory

For mesh refinement we need a way to identify what happens to a triangulation after a point is added, in case we need to reverse the insertion. For this, we use `InsertionEventHistory` internally.

```@docs; canonical=false
InsertionEventHistory
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/mesh_refinement/insertion_event_history.jl"]
Filter = t -> !(t in (DelaunayTriangulation.InsertionEventHistory,))
```

## RefinementConstraints
Expand Down Expand Up @@ -339,6 +378,7 @@ VoronoiTessellation
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/voronoi.jl"]
Filter = t -> !(t in (DelaunayTriangulation.VoronoiTessellation,))
```

## Polygon
Expand All @@ -363,34 +403,74 @@ Pages = ["data_structures/shuffled_polygon_linked_list.jl"]

Here are functions that are used for defining and working with points in the package.

```@docs; canonical=false
set_point!
push_point!
pop_point!
num_points
getpoint
get_point
each_point_index
each_point
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/geometric_primitives/points.jl"]
Filter = t -> !(t in (DelaunayTriangulation.set_point!, DelaunayTriangulation.push_point!, DelaunayTriangulation.pop_point!, DelaunayTriangulation.num_points, DelaunayTriangulation.getpoint, DelaunayTriangulation.get_point, DelaunayTriangulation.each_point_index, DelaunayTriangulation.each_point))
```

## Edges (Primitive Interface)

Here are functions that are used for defining and working with edges in the package.

```@docs; canonical=false
random_edge
each_edge
contains_edge
construct_edge
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/geometric_primitives/edges.jl"]
Filter = t -> !(t in (DelaunayTriangulation.random_edge, DelaunayTriangulation.each_edge, DelaunayTriangulation.contains_edge, DelaunayTriangulation.construct_edge))
```

## Triangles (Primitive Interface)

Here are functions that are used for defining and working with triangles in the package.

```@docs; canonical=false
triangle_edges
sort_triangle
each_triangle
delete_triangle!
contains_triangle
construct_triangle
add_triangle!
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/geometric_primitives/triangles.jl"]
Filter = t -> !(t in (DelaunayTriangulation.triangle_edges, DelaunayTriangulation.sort_triangle, DelaunayTriangulation.each_triangle, DelaunayTriangulation.delete_triangle!, DelaunayTriangulation.contains_triangle, DelaunayTriangulation.construct_triangle, DelaunayTriangulation.add_triangle!))
```

## Boundary Nodes (Primitive Interface)

Here are functions that are used for defining and working with boundary nodes in the package.

```@docs; canonical=false
has_multiple_sections
has_multiple_curves
get_section_index
get_curve_index
get_boundary_nodes
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/geometric_primitives/boundary_nodes.jl"]
Filter = t -> !(t in (DelaunayTriangulation.has_multiple_sections, DelaunayTriangulation.has_multiple_curves, DelaunayTriangulation.get_section_index, DelaunayTriangulation.get_curve_index, DelaunayTriangulation.get_boundary_nodes))
```
5 changes: 5 additions & 0 deletions docs/src/extended/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ CurrentModule = DelaunayTriangulation

This section lists some of the internal utility functions, or other miscellaneous functions, used in this package.

```@docs; canonical=false
number_type
```

```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["src/utils/utils.jl"]
Filter = t -> !(t in (DelaunayTriangulation.number_type,))
```

```@autodocs
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate_tutorials/centroidal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tri = triangulate(points; rng)
vorn = voronoi(tri, clip = true)

# To now compute the centroidal tessellation, use [`centroidal_smooth`](@ref). (
# If you want to straight from a triangulation to a centroidal tessellation, you
# If you want to go straight from a triangulation to a centroidal tessellation, you
# can also just use `smooth_vorn = voronoi(tri, clip = true, smooth = true)`.)
smooth_vorn = centroidal_smooth(vorn; rng)

Expand Down
5 changes: 2 additions & 3 deletions docs/src/tutorials/clipped.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/d

One issue that may arise when dealing with Voronoi tessellations is the
presence of unbounded polygons occurring on the boundary. One way to deal with this
is to clip polygons to the convex hull of the tessellation. (Arbitrary clipping boundaries
are on the to-do list, but they are not yet implemented.)
is to clip polygons to the convex hull of the tessellation. We describe how to also clip
the tessellation to a generic convex polygon, instead of just the convex hull, in [this tutorial](clipped_polygon.md).

In the example below, we clip the tessellation to the convex hull of the point set by using `clip=true`
in the keyword arguments.
Expand Down Expand Up @@ -43,7 +43,6 @@ fig

As you can see, the unbounded polygons, and any polygons that included points
outside of the convex hull, have now been clipped to the convex hull.

## Just the code
An uncommented version of this example is given below.
You can view the source code for this file [here](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/clipped.jl).
Expand Down
Loading
Loading