Skip to content

Commit

Permalink
PolyhedralGeometry: added missing doc entries and doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
YueRen committed Aug 13, 2024
1 parent 68b9bbb commit c3a97ae
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/src/PolyhedralGeometry/polyhedral_complexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ codim(PC::PolyhedralComplex)
dim(PC::PolyhedralComplex)
f_vector(PC::PolyhedralComplex)
is_embedded(PC::PolyhedralComplex)
is_pure(PC::PolyhedralComplex)
is_simplicial(PC::PolyhedralComplex)
lineality_dim(PC::PolyhedralComplex)
lineality_space(PC::PolyhedralComplex{T}) where T<:scalar_types
maximal_polyhedra(PC::PolyhedralComplex{T}) where T<:scalar_types
minimal_faces(PC::PolyhedralComplex{T}) where T<:scalar_types
n_maximal_polyhedra(PC::PolyhedralComplex)
Expand All @@ -47,4 +51,3 @@ rays_modulo_lineality(PC::PolyhedralComplex{T}) where T<:scalar_types
vertices(PC::PolyhedralComplex)
vertices_and_rays(PC::PolyhedralComplex{T}) where T<:scalar_types
```

45 changes: 45 additions & 0 deletions src/PolyhedralGeometry/PolyhedralComplex/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,29 @@ function _ith_polyhedron(
)
end

@doc raw"""
lineality_space(PC::PolyhedralComplex)
Return the lineality space of `PC`.
# Examples
```jldoctest
julia> VR = [0 0 0; 1 0 0; 0 1 0; -1 0 0];
julia> IM = IncidenceMatrix([[1,2,3],[1,3,4]]);
julia> far_vertices = [2,3,4];
julia> L = [0 0 1];
julia> PC = polyhedral_complex(IM, VR, far_vertices, L)
Polyhedral complex in ambient dimension 3
julia> lineality_space(PC)
1-element SubObjectIterator{RayVector{QQFieldElem}}:
[0, 0, 1]
```
"""
lineality_space(PC::PolyhedralComplex{T}) where {T<:scalar_types} =
SubObjectIterator{RayVector{T}}(PC, _lineality_complex, lineality_dim(PC))

Expand All @@ -604,6 +627,28 @@ _generator_matrix(::Val{_lineality_complex}, PC::PolyhedralComplex; homogenized=

_matrix_for_polymake(::Val{_lineality_complex}) = _generator_matrix

@doc raw"""
lineality_dim(PC::PolyhedralComplex)
Return the lineality dimension of `PC`.
# Examples
```jldoctest
julia> VR = [0 0 0; 1 0 0; 0 1 0; -1 0 0];
julia> IM = IncidenceMatrix([[1,2,3],[1,3,4]]);
julia> far_vertices = [2,3,4];
julia> L = [0 0 1];
julia> PC = polyhedral_complex(IM, VR, far_vertices, L)
Polyhedral complex in ambient dimension 3
julia> lineality_dim(PC)
1
```
"""
lineality_dim(PC::PolyhedralComplex) = pm_object(PC).LINEALITY_DIM::Int

@doc raw"""
Expand Down

0 comments on commit c3a97ae

Please sign in to comment.