Polymake.jl 0.2.0 released
17 Aug 2019This is a technical release focused on bringing more functionality to Julia.
With Polymake-v0.2.0 we require polymake-3.5.
The main change is the addition of the @pm macro. This macro is the swiss army knife of calls to polymake library (it transforms julia-like syntax to low-level calls to polymake). Therefore nearly all functionality of polymake is now accessible in Polymake.jl in one form or another.
Summary of new features
- All user functions from perl/polymake are available in the appropriate modules, e.g. homology function from topaz can be called as Topaz.homology(…) in julia.
?Topaz.homologybringspolymakedocstring. - Most of the user functions from
polymakeare available asAppname.funcname(...)inPolymake.jl. However, any function from polymakeC++library can be called via@pm Appname.funcname(…)` macro. - All big objects of perl/polymake can be constructed via @pm macro. For example
@pm Tropical.Polytope{Max, QuadraticExtension}(:POINTS=>[1 0 0; 1 1 0; 1 1 1]) - Properties of
polymakebig objects are accessible bybigobject.propertysyntax (as opposed to$bigobject->propertyinpolymake). If there is a missing property (e.g.Polytope.Polytopedoes not haveDIMproperty inPolymake.jl), please check if it can be accessed byAppname.property(object). For example propertyDIMis exposed asPolytope.dim(...)function. - Methods are available as functions in the appropriate modules, with the first argument as the object, i.e.
$bigobj->methodname(...)can be called via Appname.methodname(bigobj, …) - A function in
Polymake.jlcallingpolymakemay return a big or small object, and the generic return (PropertyValue) is transparently converted to one of the native data types (below). If you really care about performance, this conversion can be deactivated by addingkeep_PropertyValue=truekeyword argument to function/method call. polymakedata structures can be converted to appropriate julia types, but are also subtypes of the corresponding julia abstract types, e.g., apm_Vectoris anAbstractVector, and one can call methods that apply toAbstractVectorsonpolymakearrays. The list of available wrapped data structures includes:pm_Integer <: Integer,pm_Rational <: Real,pm_Vector <: AbstractVector,pm_Matrix <: AbstractMatrix,pm_Array <: AbstractVector(it’s a container type without arithmetic),pm_Set <: AbstractSet. Some combinations thereof are available as well, e.g., Sets of Arrays of Integers.
Happy polymaking!