The Adjacent map is used for mapping edges to vertices that together form a positively oriented triangle. The definition of the Adjacent map is below:

end
end

We list the complete docstring for Adjacent below, along with individual docstrings for methods for working with Adjacent.

Struct for storing adjacency relationships for mapping edges to vertices that together form a positively oriented triangle in an associated triangulation. The type I is the integer type used, while E is the edge type.

See the docs for a description of how boundary edges are handled.

Fields

The Dict used for storing the edges (the keys) and the associated vertices (the values). If (u, v) is not a valid edge, then w = get_adjacent(adjacent, u, v) returns 0 (this value is defined in DefaultAdjacentValue). Otherwise, (u, v, w) is a positively oriented triangle.

Constructors

The adjacent map can be constructed in two ways:

• Adjacent{I, E}() where {I, E}

Creates an empty map.

Creates an adjacent map from an existing Dict.

Extended help

You should not work with the adjacent field directly. We provide the following functions for working with Adjacent, where adj denotes an Adjacent{I, E} type. (Type information in the function signatures is omitted.)

Accessors

In the latter methods, you can also use the keyword argument check_existence to declare whether to check that the edge exists. This would be used if you need to be careful about different boundary indices on the same boundary curve. The default value is Val(false), meaning this isn't checked.

Mutators

Iteration

You can also iterate over Adjacent maps the same way as you would with a Dict, e.g.

end
Multiple boundary segments

Note that in the case that you have multiple boundary indices, this iteration may not be safe the iteration doesn't make use of get_adjacent, which knows how to handle boundary indices properly (if you have just a single boundary, do not worry).

Given the adjacent map adj and an edge (u, v), returns the vertex w such that (u, v, w) is a positively oriented triangle in the underlying triangulation.

In the case of a ghost edge, check_existence = Val(true) may be useful in case the boundary curve has multiple segments, meaning multiple boundary indices could correspond to the same same curve. If this is the case, then boundary_index_ranges should also be a Dict from construct_boundary_index_ranges, so that all possible valid boundary indices can be checked.

Given the adjacent map adj, an edge (u, v), and a vertex w, adds the edge (u, v) with corresponding value w into the adjacent map so that (u, v, w) is a positively oriented triangle in the underlying triangulation.