Learn R Programming

volesti (version 1.0.0)

InnerBall: Compute an inscribed ball of a convex polytope

Description

For a H-polytope described by a \(m\times d\) matrix \(A\) and a \(m\)-dimensional vector \(b\), s.t.: \(Ax\leq b\), this function computes the largest inscribed ball (Chebychev ball) by solving the corresponding linear program. For a V-polytope \(d+1\) vertices, that define a full dimensional simplex, picked at random and the largest inscribed ball of the simplex is computed. For a zonotope \(P\) we compute the minimum \(r\) s.t.: \( r e_i \in P\) for all \(i=1, \dots ,d\). Then the ball centered at the origin with radius \(r/ \sqrt{d}\) is an inscribed ball.

Usage

InnerBall(P)

Arguments

P

A convex polytope. It is an object from class (a) Hpolytope or (b) Vpolytope or (c) Zonotope.

Value

A \(d+1\)-dimensional vector that describes the inscribed ball. The first \(d\) coordinates corresponds to the center of the ball and the last one to the radius.

Examples

Run this code
# NOT RUN {
# compute the Chebychev ball of the 2d unit simplex
P = GenSimplex(2,'H')
ball_vec = InnerBall(P)

# compute an inscribed ball of the 3-dimensional unit cube in V-representation
P = GenCube(3, 'V')
ball_vec = InnerBall(P)
# }

Run the code above in your browser using DataLab