{"id":18008988,"url":"https://github.com/koide3/caratheodory2","last_synced_at":"2025-03-26T13:31:43.302Z","repository":{"id":110284892,"uuid":"606076148","full_name":"koide3/caratheodory2","owner":"koide3","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-07T04:23:08.000Z","size":13,"stargazers_count":36,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T22:21:53.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/koide3.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-24T14:45:54.000Z","updated_at":"2024-10-09T15:37:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"908c203b-cdf8-4c9c-881a-9d08644bbea3","html_url":"https://github.com/koide3/caratheodory2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fcaratheodory2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fcaratheodory2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fcaratheodory2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koide3%2Fcaratheodory2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koide3","download_url":"https://codeload.github.com/koide3/caratheodory2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245662927,"owners_count":20652099,"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":[],"created_at":"2024-10-30T02:08:29.597Z","updated_at":"2025-03-26T13:31:43.297Z","avatar_url":"https://github.com/koide3.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# caratheodory2\n\nThis is a supplementary matrial for our IROS2023 paper to reproduce the numerical validation experiment.\n\n## Build\n\n```bash\ngit clone https://github.com/koide3/caratheodory2\nmkdir caratheodory2/build \u0026\u0026 cd caratheodory2/build\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake -j\n```\n\n## Run\n\n```bash\ncd build\n./caratheodory_test\n```\n\n## Result\n\n```bash\nN=30000\nk=64\nM=256\n|g|=206  time=7.62872[msec]\n|g|=209  time=7.69499[msec]\n|g|=206  time=7.63177[msec]\n...\n\n|g|=208  time=7.60994[msec]\n|g|=207  time=7.65339[msec]\n|g|=206  time=7.61943[msec]\nmax_error=3.27418e-11\n```\n\n## Implemented functions\n\n```cpp\n/**\n * @brief Fast-Caratheodory-Matrix (Algorithm 2 in [Maalouf, NeurIPS2019])\n *        This function finds a weighted subset of P such that P^T*P = S^T*S\n * @param P       [in]  Input matrix R^{N x D}\n * @param k       [in]  Number of clusters for Fast-Caratheodory\n * @param indices [out] Indices of selected rows in P\n * @param w       [out] Weights for the selected rows\n * @param S       [out] Weighted subset of P (= w * P[indices])\n * @param N       [in]  Target output size\n*/\nvoid fast_caratheodory_matrix(const Eigen::MatrixXd\u0026 P, int k, Eigen::VectorXi\u0026 indices, Eigen::VectorXd\u0026 w, Eigen::MatrixXd\u0026 S, int N);\n\n/**\n * @brief Fast-Caratheodory-Quadratic (Algorithm 3 in [Koide, IROS2023]).\n *        This function finds a weighted subset of input residuals that exactly recovers the original quadratic error function.\n *\n *        i.e.,\n *        H = H_, b = b_, c = c_,\n *        where,\n *        H = J^T * J, b = J^T * e, c = e^T * e,\n *        H_ = S^T * W * S, b_ = S^T * W * q, c_ = q^T * W * q,\n *        S = J[indices], q = e[indices], W = w.asDiagonal()\n *\n * @param J        [in]  Jacobian matrix R^{N x 6}\n * @param e        [in]  Residual vector R^N\n * @param k        [in]  Number of clusters for Fast-Caratheodory (e.g., 64)\n * @param indices  [out] Indices of selected residuals\n * @param w        [out] Weights for the selected residuals\n * @param target_N [in]  Target output size (must be \u003e= 29)\n*/\nvoid fast_caratheodory_quadratic(const Eigen::Matrix\u003cdouble, -1, 6\u003e\u0026 J, const Eigen::VectorXd\u0026 e, int k, Eigen::VectorXi\u0026 indices, Eigen::VectorXd\u0026 w, int target_N);\n```\n\n## Related work\n\nKenji Koide, Shuji Oishi, Masashi Yokozuka, and Atsuhiko Banno, Exact Point Cloud Downsampling for Fast and Accurate Global Trajectory Optimization, IROS2023, [[Paper]](https://arxiv.org/abs/2307.02948)\n\n\n## Contact\n\nKenji Koide (k.koide@aist.go.jp), AIST, Japan\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoide3%2Fcaratheodory2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoide3%2Fcaratheodory2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoide3%2Fcaratheodory2/lists"}