{"id":23274625,"url":"https://github.com/adversing/levicivita.cpp","last_synced_at":"2025-08-22T06:09:40.370Z","repository":{"id":260694753,"uuid":"882087191","full_name":"Adversing/LeviCivita.cpp","owner":"Adversing","description":"A simple approach to the Levi-Civita tensor.","archived":false,"fork":false,"pushed_at":"2024-11-01T21:51:13.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T04:24:22.004Z","etag":null,"topics":["cpp","differential-geometry","levi-civita","linear-algebra","mathematical-programming","scientific-computing","tensor-analysis"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adversing.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T21:21:38.000Z","updated_at":"2024-11-02T01:15:31.000Z","dependencies_parsed_at":"2024-11-01T22:28:54.494Z","dependency_job_id":"7e24f052-1524-4957-9090-a99118bf3eea","html_url":"https://github.com/Adversing/LeviCivita.cpp","commit_stats":null,"previous_names":["adversing/levicivita.cpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Adversing/LeviCivita.cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adversing%2FLeviCivita.cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adversing%2FLeviCivita.cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adversing%2FLeviCivita.cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adversing%2FLeviCivita.cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adversing","download_url":"https://codeload.github.com/Adversing/LeviCivita.cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adversing%2FLeviCivita.cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271594377,"owners_count":24786707,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"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":["cpp","differential-geometry","levi-civita","linear-algebra","mathematical-programming","scientific-computing","tensor-analysis"],"created_at":"2024-12-19T20:14:43.586Z","updated_at":"2025-08-22T06:09:40.349Z","avatar_url":"https://github.com/Adversing.png","language":"C++","readme":"# LeviCivita.cpp\nA simple approach to the [Levi-Civita tensor](https://en.wikipedia.org/wiki/Levi-Civita_symbol).\n\n## 📚 Example Usage:\n\n```cpp\n#include \"levi_civita.hpp\"\n#include \u003ciostream\u003e\n#include \u003ciomanip\u003e\n\nvoid printTensorValue(const tensor::LeviCivita\u0026 tensor, const std::vector\u003csize_t\u003e\u0026 indices) {\n    std::cout \u003c\u003c \"ε_\";\n    for (size_t idx : indices) {\n        std::cout \u003c\u003c (idx + 1);\n    }\n    std::cout \u003c\u003c \" = \" \u003c\u003c (int)tensor.get(indices) \u003c\u003c std::endl;\n}\n\nint main() {\n    try {\n        // Test 2D tensor\n        tensor::LeviCivita tensor2d(2);\n        std::cout \u003c\u003c \"2D Levi-Civita tensor:\\n\";\n        printTensorValue(tensor2d, {0, 1});\n        printTensorValue(tensor2d, {1, 0});\n        printTensorValue(tensor2d, {0, 0});\n        \n        std::cout \u003c\u003c \"\\n3D Levi-Civita tensor:\\n\";\n        // Test 3D tensor\n        tensor::LeviCivita tensor3d(3);\n        printTensorValue(tensor3d, {0, 1, 2});\n        printTensorValue(tensor3d, {1, 2, 0});\n        printTensorValue(tensor3d, {2, 0, 1});\n        printTensorValue(tensor3d, {1, 0, 2});\n        printTensorValue(tensor3d, {0, 2, 1});\n        printTensorValue(tensor3d, {2, 1, 0});\n        printTensorValue(tensor3d, {0, 0, 1});\n        \n        std::cout \u003c\u003c \"\\n4D Levi-Civita tensor:\\n\";\n        // Test 4D tensor\n        tensor::LeviCivita tensor4d(4);\n        printTensorValue(tensor4d, {0, 1, 2, 3});\n        printTensorValue(tensor4d, {3, 2, 1, 0});\n        printTensorValue(tensor4d, {0, 1, 1, 2});\n\n    } catch (const std::exception\u0026 e) {\n        std::cerr \u003c\u003c \"Error: \" \u003c\u003c e.what() \u003c\u003c std::endl;\n        return 1;\n    }\n    \n    return 0;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadversing%2Flevicivita.cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadversing%2Flevicivita.cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadversing%2Flevicivita.cpp/lists"}