ASCII art for segment tree (#2224)
Allow ASCII rendering of segment trees and morphologies for debugging Example `segment_tree` ``` | | +-[-- id=1161 --]-+-[-- id=1709 --]---[-- id=2234 --]-+-[-- id=2625 --]---[-- id=3172 --] | | | | +-[-- id=2928 --]---[-- id=3765 --] | | | | | | | +-[-- id=1721 --]---[-- id=3504 --]---[-- id=3846 --] | | | | | +-[-- id=1867 --] | | | +-[-- id=1451 --]-+-[-- id=2356 --] | +-[-- id=2471 --]---[-- id=2670 --]---[-- id=4031 --] | | +-[-- id=35 --]---[-- id=263 --]-+-[-- id=409 --]-+-[-- id=475 --]---[-- id=1347 --] | | +-[-- id=480 --]-+-[-- id=1764 --]-+-[-- id=1912 --] | | | | +-[-- id=2975 --] | | | | | | | +-[-- id=2047 --] | | | | | +-[-- id=3124 --] | | | +-[-- id=548 --]-+-[-- id=1436 --]---[-- id=1699 --] | | +-[-- id=2194 --] | | +-[-- id=3250 --] | | +-[-- id=3281 --] | | +-[-- id=3589 --] | | | +-[-- id=651 --]-+-[-- id=943 --]-+-[-- id=1024 --]-+-[-- id=1070 --]-+-[-- id=1477 --]-+-[-- id=1939 --] | | | | | | +-[-- id=3457 --] | | | | | | | | | | | +-[-- id=2475 --] | | | | | | | | | +-[-- id=1929 --] | | | | | | | +-[-- id=1314 --]---[-- id=2677 --] | | | | | +-[-- id=1793 --]---[-- id=2792 --] | | | +-[-- id=1391 --]-+-[-- id=2548 --] | +-[-- id=2743 --] | | +-[-- id=1621 --]---[-- id=3879 --] +-[-- id=1914 --]-+-[-- id=2572 --] | +-[-- id=3385 --] | +-[-- id=3991 --] ``` and the same snippet in the equivalent morphology ``` +-<-- id=217 len=1 -->-+-<-- id=301 len=1 -->-+-<-- id=310 len=2 -->-+-<-- id=2246 len=2 --> | | | +-<-- id=2830 len=1 --> | | | | | +-<-- id=323 len=1 -->-+-<-- id=361 len=3 --> | | | +-<-- id=1696 len=1 -->-+-<-- id=2166 len=1 --> | | | | +-<-- id=2260 len=2 --> | | | | | | | +-<-- id=1735 len=1 -->-+-<-- id=1818 len=1 --> | | | | +-<-- id=2118 len=1 --> | | | | | | | +-<-- id=1909 len=3 --> | | | +-<-- id=2772 len=1 --> | | | +-<-- id=3004 len=1 --> | | | | | +-<-- id=344 len=1 -->-+-<-- id=714 len=1 -->-+-<-- id=937 len=2 --> | | | | +-<-- id=1292 len=2 --> | | | | +-<-- id=1698 len=1 -->-+-<-- id=2036 len=1 --> | | | | +-<-- id=2382 len=1 --> | | | | | | | | | | | +-<-- id=864 len=4 --> | | | +-<-- id=2412 len=2 --> | | | | | +-<-- id=1570 len=1 --> | | | +-<-- id=355 len=1 -->-+-<-- id=928 len=1 -->-+-<-- id=2200 len=2 --> | | | +-<-- id=2427 len=1 --> | | | +-<-- id=2523 len=1 --> | | | +-<-- id=2988 len=1 --> | | | | | +-<-- id=1303 len=1 -->-+-<-- id=2169 len=1 -->-+-<-- id=2334 len=1 --> | | | | +-<-- id=2708 len=2 --> | | | | | | | +-<-- id=2647 len=1 --> | | | | | +-<-- id=1399 len=1 --> | | | +-<-- id=704 len=2 --> | +-<-- id=1157 len=2 --> ``` Closes #2132
Showing
- arbor/include/arbor/morph/segment_tree.hpp 1 addition, 2 deletionsarbor/include/arbor/morph/segment_tree.hpp
- arbor/morph/segment_tree.cpp 0 additions, 2 deletionsarbor/morph/segment_tree.cpp
- arborio/CMakeLists.txt 2 additions, 1 deletionarborio/CMakeLists.txt
- arborio/debug.cpp 99 additions, 0 deletionsarborio/debug.cpp
- arborio/include/arborio/debug.hpp 16 additions, 0 deletionsarborio/include/arborio/debug.hpp
- doc/cpp/morphology.rst 66 additions, 3 deletionsdoc/cpp/morphology.rst
- doc/python/morphology.rst 12 additions, 0 deletionsdoc/python/morphology.rst
- python/morphology.cpp 7 additions, 0 deletionspython/morphology.cpp
- test/unit/CMakeLists.txt 1 addition, 0 deletionstest/unit/CMakeLists.txt
- test/unit/test_asc.cpp 0 additions, 3 deletionstest/unit/test_asc.cpp
- test/unit/test_debug.cpp 49 additions, 0 deletionstest/unit/test_debug.cpp
Please register or sign in to comment