Learn R Programming

volesti (version 1.1.0)

file_to_polytope: function to get an ine or an ext file and returns the corresponding polytope

Description

For an ".ine" file it generates the corresponding H-polytope. For an ".ext" file it generates the corresponding V-polytope or zonotope. For more details on those file formats see https://github.com/GeomScale/volume_approximation/blob/develop/doc/cpp_interface.md#polytope-input.

Usage

file_to_polytope(path, zonotope)

Arguments

path

A string that containes the path to an ine or a ext file. The ine file desrcibes a H-polytope and ext file describes a V-polytope or a zonotope.

zonotope

A boolean parameter. It has to be TRUE when the path leads to an .ext file that describes a zonotope.

Value

A polytope class. If the path corresponds to an ine file then the return value represents a H-polytope. If it corresponds to an ext file the return value represents a V-polytope (default choice) or a zonotope if the second argument is TRUE.

Examples

Run this code
# NOT RUN {
# give the path to birk4.ine
path = system.file('extdata', package = 'volesti')
P = file_to_polytope(paste0(path,'/birk4.ine'))
# }

Run the code above in your browser using DataLab