{"id":19305116,"url":"https://github.com/erikerlandson/st_tree","last_synced_at":"2025-09-05T21:35:10.913Z","repository":{"id":3064884,"uuid":"944394","full_name":"erikerlandson/st_tree","owner":"erikerlandson","description":"A fast and flexible c++ template class for tree data structures","archived":false,"fork":false,"pushed_at":"2022-03-13T01:03:05.000Z","size":183,"stargazers_count":91,"open_issues_count":6,"forks_count":19,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2024-06-13T23:26:44.180Z","etag":null,"topics":["c-plus-plus","data-structure","data-structures","standard-template-library","stl","stl-container","tree"],"latest_commit_sha":null,"homepage":"https://github.com/erikerlandson/st_tree/wiki","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikerlandson.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":"2010-09-28T02:42:24.000Z","updated_at":"2024-04-02T01:47:55.000Z","dependencies_parsed_at":"2022-08-06T13:15:13.278Z","dependency_job_id":null,"html_url":"https://github.com/erikerlandson/st_tree","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fst_tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fst_tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fst_tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fst_tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikerlandson","download_url":"https://codeload.github.com/erikerlandson/st_tree/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223896601,"owners_count":17221448,"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":["c-plus-plus","data-structure","data-structures","standard-template-library","stl","stl-container","tree"],"created_at":"2024-11-09T23:33:39.219Z","updated_at":"2025-09-05T21:35:10.899Z","avatar_url":"https://github.com/erikerlandson.png","language":"C++","funding_links":[],"categories":["Containers"],"sub_categories":[],"readme":"# st_tree: A fast and flexible c++ template class for tree data structures\n\n![CI Status](https://github.com/erikerlandson/st_tree/actions/workflows/ci.yml/badge.svg?branch=develop)\n\n## Introduction\nThe st_tree library implements a C++ template tree container class for storing data in arbitrary tree structures. st_tree is short for “standard template tree,” and supports STL-compatible interfaces including iterators, allocators and standard STL container methods.\n\nThe st_tree library allows the programmer to easily declare and manipulate data in a tree:\n\n```cpp\n// declare a tree of integers, where children are stored using a vector storage model\ntree\u003cint\u003e t1;  \n\n// declare a tree of strings, where node children are maintained in sorted order\ntree\u003cstring, ordered\u003c\u003e \u003e t2;\n\n// declare a tree of floating point, where children are indexed by a string label\ntree\u003cfloat, keyed\u003cstring\u003e \u003e t3;\n```\n\n## Features\nThe st_tree template container class provides the following features\n\n* Fully featured standard STL container interface, including standard container methods, iterators, typedefs and allocators\n* Common tree-related methods, including `ply()`, `depth()`, `subtree_size()`, `is_root()` and `parent()`\n* Computational efficiency — all operations execute in logarithmic time, except those involving deep copy\n* Configurable storage models for child nodes — children of a node may be managed using a `vector\u003c\u003e` (“raw”), `multiset\u003c\u003e` (“ordered”) or `map\u003c\u003e` (“keyed”) container model.\n* Compiles under standard ANSI C++\n* Unit tested\n* Memory tested with valgrind\n* Open sourced under the Apache 2.0 License\n\n\n## Documentation\nDocumentation for the st_tree template container class and its components can be found here:\nhttps://github.com/erikerlandson/st_tree/wiki/st_tree-documentation\n\nThe st_tree wiki is here:\nhttps://github.com/erikerlandson/st_tree/wiki\n\n## Install\nThe st_tree project home is here:\nhttps://github.com/erikerlandson/st_tree\n\nInstructions for download and install are here:\nhttps://github.com/erikerlandson/st_tree/wiki/st_tree-installation-and-building\n\nQuick start:\n```sh\n# generate makefiles from cmake\n$ cd /path/to/st_tree\n$ cmake .\n\n# generate makefiles to build examples from cmake\n$ cd /path/to/st_tree\n$ cmake . -DBUILD_EXAMPLES=ON\n\n# make examples and tests:\n$ make\n\n# run unit tests\n$ make test\n\n# run unit tests with valgrind memory checking\n# (cmake will create this target if it finds valgrind)\n$ make memtest\n\n# installs header files and cmake integrations to /usr/local\n$ make install\n```\n\nTo build `st_tree` with a particular c++ standard (e.g. c++ 11, 14, 17, etc):\n```sh\n$ cmake -D CMAKE_CXX_STANDARD=14 .\n```\n\n## Examples\nExamples reside in the .../st_tree/examples subdirectory.   You can also view an annotated list here:\nhttps://github.com/erikerlandson/st_tree/wiki/st_tree-examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikerlandson%2Fst_tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikerlandson%2Fst_tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikerlandson%2Fst_tree/lists"}