-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #468 from oscar-system/docs/Polytopes
Polytopes: Initial documentation
- Loading branch information
Showing
22 changed files
with
1,400 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
```@meta | ||
CurrentModule = Oscar | ||
``` | ||
|
||
```@setup oscar | ||
using Oscar | ||
``` | ||
|
||
```@contents | ||
Pages = ["pg.md"] | ||
``` | ||
|
||
# Introduction | ||
|
||
The polyhedral geometry part of OSCAR provides functionality for handling | ||
- convex polytopes, unbounded polyhedra and cones | ||
- linear programs | ||
|
||
General textbooks offering details on theory and algorithms include: | ||
- [JT13](@cite) | ||
- [Zie95](@cite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
```@meta | ||
CurrentModule = Oscar | ||
``` | ||
|
||
```@setup oscar | ||
using Oscar | ||
``` | ||
|
||
```@contents | ||
Pages = ["pg_cones.md"] | ||
``` | ||
|
||
# Cones | ||
|
||
## Introduction | ||
|
||
## Constructions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
```@meta | ||
CurrentModule = Oscar | ||
``` | ||
|
||
```@setup oscar | ||
using Oscar | ||
``` | ||
|
||
```@contents | ||
Pages = ["pg_linear_programs.md"] | ||
``` | ||
|
||
# Linear programs | ||
|
||
## Introduction | ||
|
||
## Constructions | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
```@meta | ||
CurrentModule = Oscar | ||
``` | ||
|
||
```@setup oscar | ||
using Oscar | ||
``` | ||
|
||
```@contents | ||
Pages = ["pg_polyhedra.md"] | ||
``` | ||
|
||
# Polyhedra | ||
|
||
## Introduction | ||
|
||
A set $P \subseteq \mathbb{R}^n$ is called a (convex) 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\}.$$ | ||
Writing $P$ as above is called an $H$-representation of $P$. | ||
|
||
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. | ||
That is $$P = \textrm{conv}(p_1,\ldots,p_N), p_i \in \mathbb{R}^n.$$ | ||
Writing $P$ in this way is called a $V$-representation. | ||
Polytopes are necessarily compact, i.e., they form convex bodies. | ||
|
||
Each polytope has a unique $V$-representation which is minimal with respect to inclusion (or cardinality). | ||
Conversely, a polyhedron which is full-dimensional, has a unique minimal $H$-representation. | ||
If the polyhedron is not full-dimensional, then there is no canonical choice of an $H$-representation. | ||
|
||
|
||
## Construction | ||
|
||
Based on the definition of an $H$-representation, the constructor of `Polyhedron` can be used: | ||
|
||
```@docs | ||
Polyhedron(A::Union{Oscar.MatElem,AbstractMatrix}, b) | ||
``` | ||
|
||
The following defines a polytope, as a `Polyhedron`, via a $V$-representation by calling the following function: | ||
|
||
```@docs | ||
convex_hull(::AnyVecOrMat) | ||
``` | ||
|
||
### Computing convex hulls | ||
|
||
This is a standard triangle, defined via a (redundant) $V$-representation and its unique minimal $H$-representation: | ||
|
||
```@repl oscar | ||
T = convex_hull([ 0 0 ; 1 0 ; 0 1; 0 1/2 ]) | ||
facets_as_halfspace_matrix_pair(T) | ||
``` | ||
|
||
## `Polyhedron` and `polymake`'s `Polytope` | ||
|
||
Many polyhedral computations are done through `polymake`. | ||
This is visible in the structure `Polyhedron` via a pointer `pm_polytope` to the corresponding `polymake` object. | ||
This allows to apply all functionality of `polymake` by calling a suitable `Polymake.jl` function on this pointer. | ||
|
||
To allow both `Oscar`'s and `polymake`'s functionality to be applicable to a polyhedron object, it can be converted back and forth: | ||
|
||
```@docs | ||
Polyhedron(::Polymake.BigObject) | ||
pm_polytope(::Polyhedron) | ||
``` | ||
|
||
There are several design differences between `polymake` and `Oscar`. | ||
|
||
!!! warning | ||
Polyhedra in `polymake` and `Polymake.jl` use homogeneous coordinates. The polyhedra in `Oscar` use affine coordinates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Welcome to Oscar | ||
|
||
Oscar is a new computer algebra system under development. | ||
Oscar is a new computer algebra system. | ||
While it is still under development it can already be used. | ||
|
||
Oscar features functions for groups, rings, and fields as well as linear and commutative algebra, number theory, algebraic and polyhedral geometry, and more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.