Skip to content

a minimalist c++ algorithms library for competitive programmers

License

Notifications You must be signed in to change notification settings

icaromag/compendium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp-compendium

Requirements

  • Recommended OS: Linux Ubuntu 14.04.4 LTS 64-bit
  • Dependencies: g++, git, doxygen, make
  • Generate documentation: doxygen, texlive, abntex, texlive-latex-extra, texlive-lang-portuguese, texlive-math-extra
    $ sudo apt-get install build-essential git make
    $ sudo apt-get install doxygen texlive abntex texlive-latex-extra texlive-lang-portuguese texlive-math-extra

Environment

  • Setup system environment variables
  • The path $HOME/Workspace is relative to your system
    $ export COMPENDIUM_PROJECT_PATH=$HOME/Workspace/compendium/
    $ sudo sed "/COMPENDIUM_PROJECT_PATH/ d" -i /etc/profile
    $ sudo sed "\$aCOMPENDIUM_PROJECT_PATH=$COMPENDIUM_PROJECT_PATH" -i /etc/profile
    $ mkdir -p $COMPENDIUM_PROJECT_PATH

Sources

  • Clone the repository
    $ cd $COMPENDIUM_PROJECT_PATH
    $ git clone https://github.com/icaromag/compendium-lib

Installation

  • Run the following commands
    $ cd $COMPENDIUM_PROJECT_PATH/compendium-lib/
    $ make
    $ sudo make install

Documentation

  • To generate documentation using doxygen
    $ cd $COMPENDIUM_PROJECT_PATH/compendium-lib/
    $ make doc
    # open documentation in html format
    $ firefox ./doc/html/index.html
    # open documentation in pdf format
    $ gnome-open ./doc/latex/refman.pdf

Example

  • To use the shared library add the following flags to the compiler
    -I /usr/local/include/compendium/core/ -L /usr/local/lib/compendium/core/ -lcompendium main.cpp -o a.out
  • Include the library header in your cpp source code
    #include <compendium.h>

Tests

  • Compile and run tests
    $ cd $COMPENDIUM_PROJECT_PATH/compendium-lib/
    $ make build
    $ make run

Contributors

About

a minimalist c++ algorithms library for competitive programmers

Resources

License

Stars

Watchers

Forks