{"id":50488324,"url":"https://github.com/salar-shdk/ac3","last_synced_at":"2026-06-02T00:30:24.766Z","repository":{"id":45950960,"uuid":"431729882","full_name":"salar-shdk/AC3","owner":"salar-shdk","description":"cpp AC3 algorithm implementation","archived":false,"fork":false,"pushed_at":"2021-11-26T05:51:53.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-26T22:31:50.023Z","etag":null,"topics":["ac3-algorithm","algorithms","constraint-satisfaction-problem","cpp","cpp17","csp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salar-shdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-25T05:53:46.000Z","updated_at":"2021-12-13T15:46:32.000Z","dependencies_parsed_at":"2022-09-24T18:34:20.499Z","dependency_job_id":null,"html_url":"https://github.com/salar-shdk/AC3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salar-shdk/AC3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salar-shdk%2FAC3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salar-shdk%2FAC3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salar-shdk%2FAC3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salar-shdk%2FAC3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salar-shdk","download_url":"https://codeload.github.com/salar-shdk/AC3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salar-shdk%2FAC3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33800674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ac3-algorithm","algorithms","constraint-satisfaction-problem","cpp","cpp17","csp"],"created_at":"2026-06-02T00:30:23.975Z","updated_at":"2026-06-02T00:30:24.761Z","avatar_url":"https://github.com/salar-shdk.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AC3\nAC3 algorithm cpp implementation.\n\n\n# Usage Example\nDefine your domains as vectors like the given example. Note that position in this vector maters.\n``` cpp\n// domains = {\n//     'a': [0, 2, 4],\n//     'b': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],\n// }\nvector\u003cvector\u003cint\u003e\u003e variable_domain = {\n    {0, 2, 4},\n    {0, 1, 2, 3, 4, 5, 6, 7, 8, 9},\n};\n```\nDefine your constraints as NdArray like the given example. You must have [NumCpp](https://github.com/dpilger26/NumCpp) library installed in your system.\n* Only supports equation as constraints.\n* You must define actions in relevant position like the given example.\n``` cpp\n// constraints:\n//     a + b - 4 = 0\nnc::NdArray\u003cint\u003e equation = {\n    {1, 1, -4},\n};\n\n// actions:\n// = -\u003e 1\n// \u003e -\u003e 2\n// \u003c -\u003e 3\n// \u003e= -\u003e 4\n// \u003c= -\u003e 5\nvector\u003cint\u003e action = {1};\n```\n\nThen Create AC3 object and call calculate. the result is in the same type of the input domains.\n``` cpp\nAC3 ac3(variable_domain, equation, action);\nauto result = ac3.calculate();\n```\n\n# Dependencies\n* I strongly recommend to check these two projects if you have not checked yet.\n\n[NumCpp](https://github.com/dpilger26/NumCpp)\n\n[CppItertools](https://github.com/ryanhaining/cppitertools#enumerate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalar-shdk%2Fac3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalar-shdk%2Fac3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalar-shdk%2Fac3/lists"}