{"library":"passagemath-cddlib","title":"passagemath-cddlib","description":"Python binding for cddlib, implementing double description method for convex polyhedra (V- and H-representation). Part of the passagemath ecosystem. Current version 10.8.4, requires Python >=3.11 <3.15. Release cadence is irregular, following the passagemath umbrella releases.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install passagemath-cddlib"],"cli":null},"imports":["from passagemath.cddlib import cdd","from passagemath.cddlib.cdd import Polyhedron"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from passagemath.cddlib import cdd\nimport os\n# Create a polytope from H-representation (inequalities)\n# Example: nonnegative orthant in 2D\nmat = [\n    [1.0, 0.0],  # 1*x >= 0? Actually line: 1*x + 0*y >= 0\n    [0.0, 1.0],  # 0*x + 1*y >= 0\n]\nlin = [1, 1]  # all inequalities are linear (not inequalities but equalities? use linearity)\n# Actually define inequalities: x >= 0, y >= 0\n# But cdd uses row major: each row is [b, -A]\n# For standard form Ax <= b, we need to convert.\n# Let's use a simpler example: simplex\n# Represent the triangle with vertices (0,0), (1,0), (0,1) in V-rep\nV = cdd.matrix_from_array([\n    [0, 0, 1],  # (0,0) with 1 for inhomogeneous\n    [1, 0, 1],\n    [0, 1, 1]\n])\nV.rep_type = cdd.RepType.GENERATOR\npoly = cdd.Polyhedron(V)\n# Check H-representation\nH = poly.get_inequalities()\nprint('H-representation:')\nprint(H.array)","lang":"python","description":"Create a polyhedron from V-representation and print its H-representation. Uses the cddlib matrix convention.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}