Skip to content

Commit

Permalink
Merge pull request #2690 from oscar-system/aj/pgcleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lkastner committed Sep 20, 2023
2 parents 93ddb13 + ebf08ab commit 35bf9a4
Show file tree
Hide file tree
Showing 31 changed files with 717 additions and 648 deletions.
2 changes: 1 addition & 1 deletion docs/src/PolyhedralGeometry/Polyhedra/auxiliary.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ is_smooth(P::Polyhedron{QQFieldElem})
is_very_ample(P::Polyhedron{QQFieldElem})
lattice_points(P::Polyhedron{QQFieldElem})
lattice_volume(P::Polyhedron{QQFieldElem})
normalized_volume(P::Polyhedron{T}) where T<:scalar_types
normalized_volume(P::Polyhedron)
polarize(P::Polyhedron{T}) where T<:scalar_types
project_full(P::Polyhedron{T}) where T<:scalar_types
print_constraints(A::AnyVecOrMat, b::AbstractVector; trivial::Bool = false)
Expand Down
6 changes: 3 additions & 3 deletions docs/src/PolyhedralGeometry/Polyhedra/constructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ from other objects in OSCAR.
### Intersecting halfspaces: $H$-representation

```@docs
polyhedron(::Type{T}, A::AnyVecOrMat, b::AbstractVector) where T<:scalar_types
polyhedron(::Type{T}, I::Union{Nothing, AbstractCollection[AffineHalfspace]}, E::Union{Nothing, AbstractCollection[AffineHyperplane]} = nothing) where T<:scalar_types
polyhedron(::Oscar.scalar_type_or_field, A::AnyVecOrMat, b::AbstractVector)
polyhedron(::Oscar.scalar_type_or_field, I::Union{Nothing, AbstractCollection[AffineHalfspace]}, E::Union{Nothing, AbstractCollection[AffineHyperplane]} = nothing)
```

The complete $H$-representation can be retrieved using [`facets`](@ref facets)
Expand Down Expand Up @@ -54,7 +54,7 @@ true
### Computing convex hulls: $V$-representation

```@docs
convex_hull(::Type{T}, ::AnyVecOrMat; non_redundant::Bool=false) where T<:scalar_types
convex_hull(::Oscar.scalar_type_or_field, ::AnyVecOrMat; non_redundant::Bool=false)
```

This is a standard triangle, defined via a (redundant) $V$-representation and
Expand Down
2 changes: 1 addition & 1 deletion docs/src/PolyhedralGeometry/cones.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ reason for keeping cones as a distinct type.
## Construction

```@docs
positive_hull(::Type{T}, ::Union{Oscar.MatElem, AbstractMatrix}) where T<:scalar_types
positive_hull(::Oscar.scalar_type_or_field, ::Union{Oscar.MatElem, AbstractMatrix})
cone_from_inequalities
cone_from_equations
secondary_cone(SOP::SubdivisionOfPoints{T}) where T<:scalar_types
Expand Down
16 changes: 16 additions & 0 deletions docs/src/PolyhedralGeometry/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ any of the corresponding notions below.

### Vectors

There are two specialized `Vector`-like types, `PointVector` and `RayVector`, which commonly are returned by functions from Polyhedral Geometry. These can also be manually constructed:

```@docs
point_vector
ray_vector
```

While `RayVector`s can not be used do describe `PointVector`s (and vice versa),
matrices are generally allowed.

Expand All @@ -98,6 +105,15 @@ Type | A `RayVector` corresponds to...

### Halfspaces and Hyperplanes

Similar to points and rays, there are types `AffineHalfspace`, `LinearHalfspace`, `AffineHyperplane` and `LinearHyperplane`:

```@docs
affine_halfspace
linear_halfspace
affine_hyperplane
linear_hyperplane
```

These collections allow to mix up affine halfspaces/hyperplanes and their linear
counterparts, but note that an error will be produced when trying to convert
an affine description with bias not equal to zero to a linear description.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/PolyhedralGeometry/subdivisions_of_points.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ vector, but if it does, it is called `regular`.


```@docs
subdivision_of_points(::Type{T}, Points::Union{Oscar.MatElem,AbstractMatrix}, Incidence::IncidenceMatrix) where T<:scalar_types
subdivision_of_points(::Type{T}, Points::Union{Oscar.MatElem,AbstractMatrix}, Weights::AbstractVector) where T<:scalar_types
subdivision_of_points(::Oscar.scalar_type_or_field, Points::Union{Oscar.MatElem,AbstractMatrix}, Incidence::IncidenceMatrix)
subdivision_of_points(::Oscar.scalar_type_or_field, Points::Union{Oscar.MatElem,AbstractMatrix}, Weights::AbstractVector)
```

From a subdivision of points one can construct the
Expand All @@ -50,6 +50,6 @@ is_regular(SOP::SubdivisionOfPoints)
maximal_cells
min_weights
n_maximal_cells(SOP::SubdivisionOfPoints)
points(SOP::SubdivisionOfPoints)
points(SOP::SubdivisionOfPoints{T}) where T<:scalar_types
secondary_cone
```
2 changes: 1 addition & 1 deletion src/AlgebraicGeometry/Surfaces/K3Auto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ function span_in_S(L, S, weyl)
if N==0
M = zero_matrix(QQ, 0, rank(S))
else
M = reduce(vcat, (matrix(QQ, 1, rank(S), v.a) for v in spanC))
M = linear_equation_matrix(spanC)
end
k, K = kernel(M)
gensN = transpose(K)[1:k,:]
Expand Down
4 changes: 2 additions & 2 deletions src/AlgebraicGeometry/ToricVarieties/Proj/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ function _proj_and_total_space(is_proj::Bool, E::Vector{T}) where T <: Union{Tor
end
end

total_rays_gens = vcat([modified_ray_gens[ray] for ray in rays(v)], [vcat(RayVector(zeros(Int64, dim(v))), l[i]) for i in eachindex(E)])
total_rays_gens = vcat([modified_ray_gens[ray] for ray in rays(v)], [vcat(ray_vector(zeros(Int64, dim(v))), l[i]) for i in eachindex(E)])

return normal_toric_variety(polyhedral_fan(total_rays_gens, IncidenceMatrix(new_maximal_cones)))
end

function _m_sigma(sigma::Cone{QQFieldElem}, pol_sigma::Cone{QQFieldElem}, D::Union{ToricDivisor, ToricLineBundle})::RayVector{QQFieldElem}

ans = RayVector(zeros(QQFieldElem, dim(sigma)))
ans = ray_vector(zeros(QQFieldElem, dim(sigma)))
coeff = coefficients(isa(D, ToricDivisor) ? D : toric_divisor(D))

dual_ray = QQFieldElem[]
Expand Down
58 changes: 29 additions & 29 deletions src/PolyhedralGeometry/Cone/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,25 @@ julia> HS = positive_hull(R, L)
Polyhedral cone in ambient dimension 2
```
"""
function positive_hull(f::Union{Type{T}, Field}, R::AbstractCollection[RayVector], L::Union{AbstractCollection[RayVector], Nothing} = nothing; non_redundant::Bool = false) where T<:scalar_types
parent_field, scalar_type = _determine_parent_and_scalar(f, R, L)
inputrays = remove_zero_rows(unhomogenized_matrix(R))
if isnothing(L) || isempty(L)
L = Polymake.Matrix{_scalar_type_to_polymake(scalar_type)}(undef, 0, _ambient_dim(R))
end

if non_redundant
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(RAYS = inputrays, LINEALITY_SPACE = unhomogenized_matrix(L),), parent_field)
else
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(INPUT_RAYS = inputrays, INPUT_LINEALITY = unhomogenized_matrix(L),), parent_field)
end
function positive_hull(f::scalar_type_or_field, R::AbstractCollection[RayVector], L::Union{AbstractCollection[RayVector], Nothing} = nothing; non_redundant::Bool = false)
parent_field, scalar_type = _determine_parent_and_scalar(f, R, L)
inputrays = remove_zero_rows(unhomogenized_matrix(R))
if isnothing(L) || isempty(L)
L = Polymake.Matrix{_scalar_type_to_polymake(scalar_type)}(undef, 0, _ambient_dim(R))
end

if non_redundant
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(RAYS = inputrays, LINEALITY_SPACE = unhomogenized_matrix(L),), parent_field)
else
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(INPUT_RAYS = inputrays, INPUT_LINEALITY = unhomogenized_matrix(L),), parent_field)
end
end
# Redirect everything to the above constructor, use QQFieldElem as default for the
# scalar type T.
positive_hull(R::AbstractCollection[RayVector], L::Union{AbstractCollection[RayVector], Nothing} = nothing; non_redundant::Bool = false) = positive_hull(QQFieldElem, R, L; non_redundant=non_redundant)
cone(R::AbstractCollection[RayVector], L::Union{AbstractCollection[RayVector], Nothing} = nothing; non_redundant::Bool = false) = positive_hull(QQFieldElem, R, L; non_redundant=non_redundant)
cone(f::Union{Type{T}, Field}, R::AbstractCollection[RayVector], L::Union{AbstractCollection[RayVector], Nothing} = nothing; non_redundant::Bool = false) where T<:scalar_types = positive_hull(f, R, L; non_redundant=non_redundant)
cone(f::Union{Type{T}, Field}, x...) where T<:scalar_types = positive_hull(f, x...)
cone(f::scalar_type_or_field, R::AbstractCollection[RayVector], L::Union{AbstractCollection[RayVector], Nothing} = nothing; non_redundant::Bool = false) = positive_hull(f, R, L; non_redundant=non_redundant)
cone(f::scalar_type_or_field, x...) = positive_hull(f, x...)


function ==(C0::Cone{T}, C1::Cone{T}) where T<:scalar_types
Expand Down Expand Up @@ -115,16 +115,16 @@ julia> rays(C)
[1, 1]
```
"""
function cone_from_inequalities(f::Union{Type{T}, Field}, I::AbstractCollection[LinearHalfspace], E::Union{Nothing, AbstractCollection[LinearHyperplane]} = nothing; non_redundant::Bool = false) where T<:scalar_types
parent_field, scalar_type = _determine_parent_and_scalar(f, I, E)
IM = -linear_matrix_for_polymake(I)
EM = isnothing(E) || isempty(E) ? Polymake.Matrix{_scalar_type_to_polymake(scalar_type)}(undef, 0, size(IM, 2)) : linear_matrix_for_polymake(E)

if non_redundant
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(FACETS = IM, LINEAR_SPAN = EM), parent_field)
else
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(INEQUALITIES = IM, EQUATIONS = EM), parent_field)
end
function cone_from_inequalities(f::scalar_type_or_field, I::AbstractCollection[LinearHalfspace], E::Union{Nothing, AbstractCollection[LinearHyperplane]} = nothing; non_redundant::Bool = false)
parent_field, scalar_type = _determine_parent_and_scalar(f, I, E)
IM = -linear_matrix_for_polymake(I)
EM = isnothing(E) || isempty(E) ? Polymake.Matrix{_scalar_type_to_polymake(scalar_type)}(undef, 0, size(IM, 2)) : linear_matrix_for_polymake(E)

if non_redundant
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(FACETS = IM, LINEAR_SPAN = EM), parent_field)
else
return Cone{scalar_type}(Polymake.polytope.Cone{_scalar_type_to_polymake(scalar_type)}(INEQUALITIES = IM, EQUATIONS = EM), parent_field)
end
end

@doc raw"""
Expand Down Expand Up @@ -152,11 +152,11 @@ julia> dim(C)
1
```
"""
function cone_from_equations(f::Union{Type{T}, Field}, E::AbstractCollection[LinearHyperplane]; non_redundant::Bool = false) where T<:scalar_types
parent_field, scalar_type = _determine_parent_and_scalar(f, E)
EM = linear_matrix_for_polymake(E)
IM = Polymake.Matrix{_scalar_type_to_polymake(scalar_type)}(undef, 0, size(EM, 2))
return cone_from_inequalities(f, IM, EM; non_redundant = non_redundant)
function cone_from_equations(f::scalar_type_or_field, E::AbstractCollection[LinearHyperplane]; non_redundant::Bool = false)
parent_field, scalar_type = _determine_parent_and_scalar(f, E)
EM = linear_matrix_for_polymake(E)
IM = Polymake.Matrix{_scalar_type_to_polymake(scalar_type)}(undef, 0, size(EM, 2))
return cone_from_inequalities(f, IM, EM; non_redundant = non_redundant)
end

cone_from_inequalities(x...) = cone_from_inequalities(QQFieldElem, x...)
Expand Down
44 changes: 25 additions & 19 deletions src/PolyhedralGeometry/Cone/properties.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
###############################################################################
###############################################################################

rays(as::Type{RayVector{T}}, C::Cone) where T<:scalar_types = lineality_dim(C) == 0 ? _rays(as, C) : _empty_subobjectiterator(as, C)
_rays(as::Type{RayVector{T}}, C::Cone) where T<:scalar_types = SubObjectIterator{as}(C, _ray_cone, _nrays(C))
rays(as::Type{RayVector{T}}, C::Cone{T}) where T<:scalar_types = lineality_dim(C) == 0 ? _rays(as, C) : _empty_subobjectiterator(as, C)
_rays(as::Type{RayVector{T}}, C::Cone{T}) where T<:scalar_types = SubObjectIterator{as}(C, _ray_cone, _nrays(C))

_ray_cone(::Type{RayVector{T}}, C::Cone, i::Base.Integer) where T<:scalar_types = RayVector{T}(coefficient_field(C).(view(pm_object(C).RAYS, i, :)))
_ray_cone(U::Type{RayVector{T}}, C::Cone{T}, i::Base.Integer) where T<:scalar_types = ray_vector(coefficient_field(C), view(pm_object(C).RAYS, i, :))::U

_vector_matrix(::Val{_ray_cone}, C::Cone; homogenized=false) = homogenized ? homogenize(pm_object(C).RAYS, 0) : pm_object(C).RAYS

_matrix_for_polymake(::Val{_ray_cone}) = _vector_matrix

rays(::Type{RayVector}, C::Cone{T}) where T<:scalar_types = rays(RayVector{T}, C)
_rays(::Type{RayVector}, C::Cone{T}) where T<:scalar_types = _rays(RayVector{T}, C)
rays(::Type{<:RayVector}, C::Cone{T}) where T<:scalar_types = rays(RayVector{T}, C)
_rays(::Type{<:RayVector}, C::Cone{T}) where T<:scalar_types = _rays(RayVector{T}, C)

@doc raw"""
rays(C::Cone)
Expand Down Expand Up @@ -111,13 +111,13 @@ julia> RML.lineality_basis
```
"""
rays_modulo_lineality(C::Cone{T}) where T<:scalar_types = rays_modulo_lineality(NamedTuple{(:rays_modulo_lineality, :lineality_basis), Tuple{SubObjectIterator{RayVector{T}}, SubObjectIterator{RayVector{T}}}}, C)
function rays_modulo_lineality(as::Type{NamedTuple{(:rays_modulo_lineality, :lineality_basis), Tuple{SubObjectIterator{RayVector{T}}, SubObjectIterator{RayVector{T}}}}}, C::Cone) where T<:scalar_types
function rays_modulo_lineality(::Type{NamedTuple{(:rays_modulo_lineality, :lineality_basis), Tuple{SubObjectIterator{RayVector{T}}, SubObjectIterator{RayVector{T}}}}}, C::Cone{T}) where T<:scalar_types
return (
rays_modulo_lineality = _rays(C),
lineality_basis = lineality_space(C)
)
end
rays_modulo_lineality(as::Type{RayVector}, C::Cone) = _rays(C)
rays_modulo_lineality(::Type{<:RayVector}, C::Cone) = _rays(C)


@doc raw"""
Expand Down Expand Up @@ -147,17 +147,23 @@ function faces(C::Cone{T}, face_dim::Int) where T<:scalar_types
return SubObjectIterator{Cone{T}}(C, _face_cone, size(Polymake.polytope.faces_of_dim(pm_object(C), n), 1), (f_dim = n,))
end

function _face_cone(::Type{Cone{T}}, C::Cone, i::Base.Integer; f_dim::Int = 0) where T<:scalar_types
return Cone{T}(Polymake.polytope.Cone{_scalar_type_to_polymake(T)}(RAYS = pm_object(C).RAYS[collect(Polymake.to_one_based_indexing(Polymake.polytope.faces_of_dim(pm_object(C), f_dim)[i])), :], LINEALITY_SPACE = pm_object(C).LINEALITY_SPACE))
function _face_cone(::Type{Cone{T}}, C::Cone{T}, i::Base.Integer; f_dim::Int = 0) where T<:scalar_types
R = pm_object(C).RAYS[collect(Polymake.to_one_based_indexing(Polymake.polytope.faces_of_dim(pm_object(C), f_dim)[i])), :]
L = pm_object(C).LINEALITY_SPACE
PT = _scalar_type_to_polymake(T)
return Cone{T}(Polymake.polytope.Cone{PT}(RAYS = R, LINEALITY_SPACE = L), coefficient_field(C))
end

function _ray_indices(::Val{_face_cone}, C::Cone; f_dim::Int = 0)
f = Polymake.to_one_based_indexing(Polymake.polytope.faces_of_dim(pm_object(C), f_dim))
return IncidenceMatrix([collect(f[i]) for i in 1:length(f)])
end

function _face_cone_facet(::Type{Cone{T}}, C::Cone, i::Base.Integer) where T<:scalar_types
return Cone{T}(Polymake.polytope.Cone{_scalar_type_to_polymake(T)}(RAYS = pm_object(C).RAYS[collect(pm_object(C).RAYS_IN_FACETS[i, :]), :], LINEALITY_SPACE = pm_object(C).LINEALITY_SPACE), coefficient_field(C))
function _face_cone_facet(::Type{Cone{T}}, C::Cone{T}, i::Base.Integer) where T<:scalar_types
R = pm_object(C).RAYS[collect(pm_object(C).RAYS_IN_FACETS[i, :]), :]
L = pm_object(C).LINEALITY_SPACE
PT = _scalar_type_to_polymake(T)
return Cone{T}(Polymake.polytope.Cone{PT}(RAYS = R, LINEALITY_SPACE = pm_object(C).LINEALITY_SPACE), coefficient_field(C))
end

_ray_indices(::Val{_face_cone_facet}, C::Cone) = pm_object(C).RAYS_IN_FACETS
Expand Down Expand Up @@ -439,11 +445,11 @@ julia> f = facets(Halfspace, c)
-x₂ + x₃ ≦ 0
```
"""
facets(as::Type{<:Union{LinearHalfspace{T}, Cone{T}}}, C::Cone) where T<:scalar_types = SubObjectIterator{as}(C, _facet_cone, nfacets(C))
facets(as::Type{<:Union{LinearHalfspace{T}, Cone{T}}}, C::Cone{T}) where T<:scalar_types = SubObjectIterator{as}(C, _facet_cone, nfacets(C))

_facet_cone(::Type{LinearHalfspace{T}}, C::Cone, i::Base.Integer) where T<:scalar_types = linear_halfspace(coefficient_field(C), -pm_object(C).FACETS[[i], :])
_facet_cone(U::Type{LinearHalfspace{T}}, C::Cone{T}, i::Base.Integer) where T<:scalar_types = linear_halfspace(coefficient_field(C), -pm_object(C).FACETS[[i], :])::U

_facet_cone(::Type{Cone{T}}, C::Cone, i::Base.Integer) where T<:scalar_types = Cone{T}(Polymake.polytope.facet(pm_object(C), i-1), coefficient_field(C))
_facet_cone(::Type{Cone{T}}, C::Cone{T}, i::Base.Integer) where T<:scalar_types = Cone{T}(Polymake.polytope.facet(pm_object(C), i-1), coefficient_field(C))

_linear_inequality_matrix(::Val{_facet_cone}, C::Cone) = -pm_object(C).FACETS

Expand All @@ -455,7 +461,7 @@ _incidencematrix(::Val{_facet_cone}) = _ray_indices

facets(C::Cone{T}) where T<:scalar_types = facets(LinearHalfspace{T}, C)

facets(::Type{Halfspace}, C::Cone{T}) where T<:scalar_types = facets(LinearHalfspace{T}, C)
facets(::Type{<:Halfspace}, C::Cone{T}) where T<:scalar_types = facets(LinearHalfspace{T}, C)

facets(::Type{Cone}, C::Cone{T}) where T<:scalar_types = facets(Cone{T}, C)

Expand All @@ -477,7 +483,7 @@ julia> lineality_space(UH)
"""
lineality_space(C::Cone{T}) where T<:scalar_types = SubObjectIterator{RayVector{T}}(C, _lineality_cone, lineality_dim(C))

_lineality_cone(::Type{RayVector{T}}, C::Cone, i::Base.Integer) where T<:scalar_types = RayVector{T}(coefficient_field(C).(view(pm_object(C).LINEALITY_SPACE, i, :)))
_lineality_cone(U::Type{RayVector{T}}, C::Cone{T}, i::Base.Integer) where T<:scalar_types = ray_vector(coefficient_field(C), view(pm_object(C).LINEALITY_SPACE, i, :))::U

_generator_matrix(::Val{_lineality_cone}, C::Cone; homogenized=false) = homogenized ? homogenize(pm_object(C).LINEALITY_SPACE, 0) : pm_object(C).LINEALITY_SPACE

Expand All @@ -501,7 +507,7 @@ x₃ = 0
"""
linear_span(C::Cone{T}) where T<:scalar_types = SubObjectIterator{LinearHyperplane{T}}(C, _linear_span, size(pm_object(C).LINEAR_SPAN, 1))

_linear_span(::Type{LinearHyperplane{T}}, C::Cone, i::Base.Integer) where T<:scalar_types = linear_hyperplane(coefficient_field(C), view(pm_object(C).LINEAR_SPAN, i, :))
_linear_span(U::Type{LinearHyperplane{T}}, C::Cone{T}, i::Base.Integer) where T<:scalar_types = linear_hyperplane(coefficient_field(C), view(pm_object(C).LINEAR_SPAN, i, :))::U

_linear_equation_matrix(::Val{_linear_span}, C::Cone) = pm_object(C).LINEAR_SPAN

Expand Down Expand Up @@ -530,7 +536,7 @@ function hilbert_basis(C::Cone{QQFieldElem})
return SubObjectIterator{PointVector{ZZRingElem}}(C, _hilbert_generator, size(pm_object(C).HILBERT_BASIS_GENERATORS[1], 1))
end

_hilbert_generator(::Type{PointVector{ZZRingElem}}, C::Cone, i::Base.Integer) = PointVector{ZZRingElem}(view(pm_object(C).HILBERT_BASIS_GENERATORS[1], i, :))
_hilbert_generator(T::Type{PointVector{ZZRingElem}}, C::Cone{QQFieldElem}, i::Base.Integer) = point_vector(ZZ, view(pm_object(C).HILBERT_BASIS_GENERATORS[1], i, :))::T

_generator_matrix(::Val{_hilbert_generator}, C::Cone; homogenized=false) = homogenized ? homogenize(pm_object(C).HILBERT_BASIS_GENERATORS[1], 0) : pm_object(C).HILBERT_BASIS_GENERATORS[1]

Expand Down Expand Up @@ -586,4 +592,4 @@ Base.in(v::AbstractVector, C::Cone) = Polymake.polytope.contains(pm_object(C), v
Compute a point in the relative interior point of `C`, i.e. a point in `C` not
contained in any facet.
"""
relative_interior_point(C::Cone{T}) where T<:scalar_types = PointVector{T}(coefficient_field(C), view(Polymake.common.dense(pm_object(C).REL_INT_POINT), :)) # broadcast_view
relative_interior_point(C::Cone{T}) where T<:scalar_types = point_vector(coefficient_field(C), view(Polymake.common.dense(pm_object(C).REL_INT_POINT), :))::PointVector{T} # broadcast_view

0 comments on commit 35bf9a4

Please sign in to comment.