{"id":16506726,"url":"https://github.com/garrison/eigen3-hdf5","last_synced_at":"2025-09-20T07:32:48.303Z","repository":{"id":11173949,"uuid":"13549556","full_name":"garrison/eigen3-hdf5","owner":"garrison","description":"Bare-bones hdf5 serialization of Eigen matrices and vectors","archived":false,"fork":false,"pushed_at":"2021-08-27T02:45:15.000Z","size":50,"stargazers_count":66,"open_issues_count":2,"forks_count":19,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-09-10T08:04:18.064Z","etag":null,"topics":["eigen3","hdf5"],"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/garrison.png","metadata":{"files":{"readme":"README.rst","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":"2013-10-14T00:53:42.000Z","updated_at":"2025-02-03T04:20:58.000Z","dependencies_parsed_at":"2022-09-07T06:50:22.602Z","dependency_job_id":null,"html_url":"https://github.com/garrison/eigen3-hdf5","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/garrison/eigen3-hdf5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Feigen3-hdf5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Feigen3-hdf5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Feigen3-hdf5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Feigen3-hdf5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garrison","download_url":"https://codeload.github.com/garrison/eigen3-hdf5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Feigen3-hdf5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276064262,"owners_count":25578997,"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-09-20T02:00:10.207Z","response_time":63,"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":["eigen3","hdf5"],"created_at":"2024-10-11T15:21:36.774Z","updated_at":"2025-09-20T07:32:48.254Z","avatar_url":"https://github.com/garrison.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"eigen3-hdf5\n===========\n\n.. image:: https://github.com/garrison/eigen3-hdf5/actions/workflows/main.yml/badge.svg\n    :target: https://github.com/garrison/eigen3-hdf5/actions\n\nEasy serialization of C++ `Eigen \u003chttp://eigen.tuxfamily.org/\u003e`_\nmatrices using `HDF5 \u003chttp://www.hdfgroup.org/HDF5/\u003e`_.\n\nThe library is meant to be bare-bones (at least for now).  It gets me\n90% of what I want/need in a few hundred lines of code.  It may also\nget you 90% (or even 100%) of what you need.\n\nRequirements\n------------\n\n* Eigen3 (tested on 3.1 and 3.2 branches)\n* HDF5 C++ wrapper library \u003e= 1.8.12 (yes, this is a very recent\n  version)\n\nBecause ``eigen3-hdf5`` is a template library, there is nothing to link\nagainst (besides the HDF5 libraries).\n\nAPI\n---\n\nSupports saving and restoring Eigen matrices and vectors of ``float``,\n``double``, ``long double``, ``int``, ``unsigned int``, and\n``std::complex\u003c\u003e``.\n\n.. code:: c++\n\n    #include \u003ceigen3-hdf5.hpp\u003e\n\n    void save_matrix()\n    {\n        Eigen::Matrix3d mat;\n        mat \u003c\u003c 1, 2, 3, 4, 5, 6, 7, 8, 9;\n        H5::H5File file(\"filename1.h5\", H5F_ACC_TRUNC);\n        EigenHDF5::save(file, \"MatrixDataSetName\", mat);\n    }\n\n    void load_vector()\n    {\n        Eigen::Vector4i vec;\n        H5::H5File file(\"filename2.h5\", H5F_ACC_RDONLY);\n        EigenHDF5::load(file, \"VectorDataSetName\", vec);\n    }\n\nSee the `unittests \u003cunittests/\u003e`_ directory for more examples.\n\nUnit tests\n----------\n\nI am using `premake4 \u003chttp://industriousone.com/premake\u003e`_ and\n`googletest \u003chttps://code.google.com/p/googletest/\u003e`_ because I am\nfamiliar with them.\n\nThe unit tests currently write to specific files in the current\ndirectory.  This could change, eventually.\n\nThe GitHub Action can be approximated locally by installing `act\n\u003chttps://github.com/nektos/act\u003e`_ and running::\n\n    act -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04\n\nLicense\n-------\n\nMIT license.\n\nNext steps\n----------\n\n* Support more fundamental data types\n\nThoughts/notes\n--------------\n\n* Using the HDF5 C++ wrapper library supposedly means it `won't work\n  with parallel hdf5\n  \u003chttp://www.hdfgroup.org/hdf5-quest.html#p5thread\u003e`_.  If I were to\n  do it again, I would write ``eigen3-hdf5`` using the regular C HDF5\n  API, not the C++ wrapper.  Patches are welcome. :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrison%2Feigen3-hdf5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarrison%2Feigen3-hdf5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrison%2Feigen3-hdf5/lists"}