{"id":19526637,"url":"https://github.com/zju-fast-lab/sdlp","last_synced_at":"2025-04-26T10:31:24.144Z","repository":{"id":44351340,"uuid":"328171520","full_name":"ZJU-FAST-Lab/SDLP","owner":"ZJU-FAST-Lab","description":"Seidel's LP Algorithm: Linear-Complexity Linear Programming for Small-Dimensional Variables","archived":false,"fork":false,"pushed_at":"2022-07-09T14:54:46.000Z","size":56,"stargazers_count":81,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T11:46:42.691Z","etag":null,"topics":["computational-geometry","linear-programming","polytope"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZJU-FAST-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-09T14:19:26.000Z","updated_at":"2025-03-28T02:41:30.000Z","dependencies_parsed_at":"2022-07-09T20:17:10.103Z","dependency_job_id":null,"html_url":"https://github.com/ZJU-FAST-Lab/SDLP","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FSDLP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FSDLP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FSDLP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZJU-FAST-Lab%2FSDLP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZJU-FAST-Lab","download_url":"https://codeload.github.com/ZJU-FAST-Lab/SDLP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250972803,"owners_count":21516429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computational-geometry","linear-programming","polytope"],"created_at":"2024-11-11T01:11:10.531Z","updated_at":"2025-04-26T10:31:23.807Z","avatar_url":"https://github.com/ZJU-FAST-Lab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDLP\n\nSeidel's LP Algorithm: Linear-Complexity Linear Programming (LP) for Small-Dimensions\n\n# About\n\n1. This solver is super efficient for small-dimensional LP with any constraint number, mostly encountered in computational geometry. It enjoys [__linear complexity about the constraint number__](https://dl.acm.org/doi/10.1145/2422.322418).\n\n2. The speed is __at least an order of magnitude__ faster than [GLPK](https://en.wikipedia.org/wiki/GNU_Linear_Programming_Kit) in small-dimensional LP (\u003c10) with a large constraints number (\u003e100).\n\n3. This solver is adapted from the [linear-fractional programming (LFP)](https://en.wikipedia.org/wiki/Linear-fractional_programming) from Mike Hohmeyer at UC Berkeley based on [Raimund Seidel's algorithm](https://link.springer.com/article/10.1007/BF02574699). Kernel functions are reorganized. Previously-existed bugs are fixed here. An easy-to-use interface for LP via [Eigen](http://eigen.tuxfamily.org) is also added.\n\n4. Only [a header file](https://github.com/ZJU-FAST-Lab/SDLP/blob/main/include/sdlp/sdlp.hpp) is all you need.\n\n# Interface\n\nTo solve a linear programming:\n\n        min cTx, \n        s.t. Ax\u003c=b,\n\nwhere x and c are d-dimensional vectors, b an m-dimensional vector and A an mxd matrix. It is assumed that d is small (\u003c10) while m can be arbitrary value (1\u003c= m \u003c= 1e+8).\n\nOnly one function is all you need:\n\n    template \u003cint d\u003e\n    double linprog(const Eigen::Matrix\u003cdouble, d, 1\u003e \u0026c,\n                   const Eigen::Matrix\u003cdouble, -1, d\u003e \u0026A,\n                   const Eigen::Matrix\u003cdouble, -1, 1\u003e \u0026b,\n                   Eigen::Matrix\u003cdouble, d, 1\u003e \u0026x);\n\nInput:\n\n        c: objective coefficient\n        A: constraint matrix\n        b: constraint bound\n\nOutput:\n\n        x: optimal solution if solved\n        return: finite value if solved\n                -infinity if unbounded\n                infinity if infeasible\n\n# Reference\n\n1. Megiddo, N., 1984. Linear programming in linear time when the dimension is fixed. Journal of the ACM (JACM), 31(1), pp.114-127.\n2. Seidel, R., 1991. Small-dimensional linear programming and convex hulls made easy. Discrete \u0026 Computational Geometry, 6(3), pp.423-434.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzju-fast-lab%2Fsdlp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzju-fast-lab%2Fsdlp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzju-fast-lab%2Fsdlp/lists"}