-
Notifications
You must be signed in to change notification settings - Fork 126
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
Polytopes: Initial documentation #468
Conversation
@benlorenz said that the docs will build for a draft pr, right now it is a hassle to build the docs locally. |
…ded PolyhedralGeometry category to the side bar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good to me. Is there a reason to keep this as a draft, instead of simply merging it?
docs/src/PolyhedralGeometry/pg.md
Outdated
- Theobald + Joswig | ||
- Ziegler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you can use bibtex references (see docs/oscar_references.bib
; to cite something, use [bibkey](@cite)
.
|
||
Polyhedra are convex bodies. When a polyhedron $P \subset \mathbb{R}^n$ is bounded, it is called a polytope and the fundamental theorem of polytopes states that it may be written as the convex hull of finitely many points in $\mathbb{R}^n$. That is $$P = \textrm{conv}(p_1,\ldots,p_N), p_i \in \mathbb{R}^n.$$ Writing $P$ in this way is called its $V$-representation. | ||
|
||
Since many polyhedral computations are done through ```polymake```, the structure ```Polyhedron``` contains a pointer ```pm_polytope``` to the corresponding ```polymake``` object. Thus, all functionality of ```Polymake.jl``` is accessible by calling a ```Polymake.jl``` function on this pointer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to use triple backticks here instead of single backticks?
|
||
Since many polyhedral computations are done through ```polymake```, the structure ```Polyhedron``` contains a pointer ```pm_polytope``` to the corresponding ```polymake``` object. Thus, all functionality of ```Polymake.jl``` is accessible by calling a ```Polymake.jl``` function on this pointer. | ||
|
||
**Warning**: Polyhedra in ```polymake``` and ```Polymake.jl``` use homogeneous coordinates. The polyhedra in ```Oscar``` use affine coordinates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be a "warning admonition"? See https://juliadocs.github.io/Documenter.jl/stable/showcase/#Warning-admonition
|
||
A subset $P \subseteq \mathbb{R}^n$ is called a (metric) polyhedron if it can be written as the intersection of finitely many closed affine halfspaces in $\mathbb{R}^n$. | ||
That is, there exists a matrix $A$ and a vector $b$ such that | ||
$$P = P(A,b) = \{ x \in \mathbb{R}^n \mid Ax \leq b\}.$$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe its a bot late, but we should think about xA leq b as well - after all, matrices are supposed to be row matrices...
@@ -87,11 +107,34 @@ Base.length(iter::VertexPointIterator) = nvertices(iter.p) | |||
""" | |||
vertices(P::Polyhedron, [,as::Type{T} = Points]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you considered vertices(::Type{bla}, P)
as an alternative to (P, as = bla)
? Julia odes this for round
, floor
, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, and we also do this elsewhere in Oscar (e.g. for order
of groups, where one specify the desired integer type for the return value). So the caller would write vertices(Points, P)
. And you could still allow vertices(P)
by providing a convenience method to set the default: vertices(P::Polyhedron) = vertices(Points, P)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the first argument is not the type of the return value, so how does this fit with the functions you mention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be in favour of merging and then improving further.
On Thu, Jun 17, 2021 at 03:18:56AM -0700, thofma wrote:
@thofma commented on this pull request.
> @@ -87,11 +107,34 @@ Base.length(iter::VertexPointIterator) = nvertices(iter.p)
"""
vertices(P::Polyhedron, [,as::Type{T} = Points])
Here the first argument is not the type of the return value, so how does this fit with the functions you mention?
Its the spririt: the 1st argument determines the return type
… --
You are receiving this because your review was requested.
Reply to this email directly or view it on GitHub:
#468 (comment)
|
This pr is a draft of the documentation of the Polytopes part of Oscar.jl.