How to use this book? ********************************************* .. epigraph:: Sharpen the knife before cutting the wood! -- Lun Yu Build The Source Code ================================= The source code of this book can be downloaded at `SEIN Github Repo `_. To run the code, you need to install google test. In Ubuntu, just run: .. code-block:: sudo apt install libgtest-dev Then, please use git to clone the repo, and run this: .. code-block:: sudo cp ./source/ch1-intro/sein.hpp /usr/local/include/ Both CMake and Bazel build are supported. Build With CMake ^^^^^^^^^^^^^^^^^ .. code-block:: mkdir build cd build cmake .. make -j `nproc` Build With Bazel ^^^^^^^^^^^^^^^^^ Debug The Source Code ==================================== To debug the source code line by line, I recommend using `CLion `_. CLion can automatically detect the test cases so that you can start to debug right away by clicking a button in the GUI. .. figure:: clion.png :align: center :name: CLion GUI Debug with CLion How this book is structured? ===================================== Algorithm ^^^^^^^^^^^^^^^^^^^^^^^^ How do I wrote this book? ===================================== Chapter page template: .. code-block:: none Chapter Title ********************** .. toctree:: :maxdepth: 2 section_1 section_2 questions Questions page template: .. code-block:: none Questions ========================================= Question Title ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: none Question contents ... ---- Solution .. only:: html - http://www.wu-99.com Test code template: .. code-block:: none #include #include namespace ns_abc{ //... } using namespace ns_abc; TEST(_abc, a) { EXPECT_TRUE(1); } Take :numref:`graph` as an example.