Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
How to install Discreture as a user in a CoCalc project
Install Discreture
The aim is to install Discreture, a modern C++ library for efficiently and easily iterating through common combinatorial objects, such as combinations, subsets, partitions and more.
The code repository for Discreture is at: https://github.com/mraggi/discreture
Step by step
Boost prerequisites
Check that Boost is present:
boost
In Boost we need iterator functions:
function_output_iterator.hpp
generator_iterator.hpp
iterator
iterator.hpp
iterator_adaptors.hpp
shared_container_iterator.hpp
token_iterator.hpp
More specifically, we need Boost's facade iterator:
iterator_facade.hpp
All Boost prerequisistes are there. Let us proceed.
Clone the github repo
Cloning into 'discreture'...
remote: Counting objects: 1849, done.
remote: Compressing objects: 100% (253/253), done.
remote: Total 1849 (delta 237), reused 232 (delta 117), pack-reused 1477
Receiving objects: 100% (1849/1849), 2.77 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1260/1260), done.
Checking connectivity... done.
Benchmarks README.md cppcheck-helper.sh logoterelimpio.pdf
CMakeLists.txt clang-tidy-helper.sh examples logoterelimpio.png
LICENSE cmake include logoterelimpio.svg
PKGBUILD combvsgsl.png logotere.svg tests
Here we use the flag -DCMAKE_INSTALL_PREFIX=/home/user
.
When installing as root, remove this, and the installation will go to /usr/local
.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 8%] Built target combinations_reverse
[ 16%] Built target multisets
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 25%] Built target combinations_tree
[ 33%] Built target combinations_tree_reverse
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 41%] Built target setpartitions
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 50%] Built target combinations
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 58%] Built target dyck
[ 66%] Built target permutations
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 75%] Built target number_range
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 83%] Built target discreture_benchmark
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
[ 91%] Built target partitions
[100%] Built target motzkin
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /home/user/include
-- Installing: /home/user/include/Discreture
-- Installing: /home/user/include/Discreture/CombinationsTree.hpp
-- Installing: /home/user/include/Discreture/NaturalNumber.hpp
-- Installing: /home/user/include/Discreture/TimeHelpers.hpp
-- Installing: /home/user/include/Discreture/NumberRange.hpp
-- Installing: /home/user/include/Discreture/old
-- Installing: /home/user/include/Discreture/old/oldstuff.hpp
-- Installing: /home/user/include/Discreture/Misc.hpp
-- Installing: /home/user/include/Discreture/VectorHelpers.hpp
-- Installing: /home/user/include/Discreture/Partitions.hpp
-- Installing: /home/user/include/Discreture/combinations_tree_bf.hpp
-- Installing: /home/user/include/Discreture/SetPartitions.hpp
-- Installing: /home/user/include/Discreture/Combinations.hpp
-- Installing: /home/user/include/Discreture/DyckPaths.hpp
-- Installing: /home/user/include/Discreture/Probability.hpp
-- Installing: /home/user/include/Discreture/Permutations.hpp
-- Installing: /home/user/include/Discreture/Multisets.hpp
-- Installing: /home/user/include/Discreture/combinations_bf.hpp
-- Installing: /home/user/include/Discreture/Sequences.hpp
-- Installing: /home/user/include/Discreture/Motzkin.hpp
-- Installing: /home/user/include/Discreture/CombinationsTreePrunned.hpp
-- Installing: /home/user/include/discreture.hpp
Check that the result whas installed where we asked.
When installing as root, we would instead run:
Discreture discreture.hpp
Everything went well. Done.
Running an example
CMakeCache.txt combinations_tree multisets
CMakeFiles combinations_tree_reverse number_range
Makefile discreture_benchmark partitions
cmake_install.cmake dyck permutations
combinations install_manifest.txt setpartitions
combinations_reverse motzkin
This looks fine.