This repo contains some algorithms retrieved from literature and implemented in C++ and Python, with the idea of performing analysis and benchmarking in order to help us gain insights to build a Python library that will work with trajectories (in GeoJSON format) to mainly find similarity measures between them.
For building the C++ libraries that the src
directory will contain the
Makefile
needs to be modified and executed:
make
Notice that this should create the dynamic library that will be used by the
Python library cppyy
.
g++ -fPIC -Wall -o <Dynamic library with .so extension> <C++ file>
make clean
will clean compiled files.
For future development we should consider using
cmake
.
To integrate with python, requirements.txt
should be installed via pip:
pip install -r requirements.txt
Having done this now you can import cppyy
into your code:
import cppyy
cppyy.include('src/your_header_file.h') # Enables calls
cppyy.load_library('your_dynamic_lib.so') # Executes calls
lib = cppyy.gbl # To shorten library calls, i.e.: lib.your_function()
cppyy
will meant to be used only for testing!
Install requirements-jupyter.txt
dependencies:
pip install -r requirements-jupyter.txt
This will contain requirements.txt
dependencies. Make sure to match same
dependencies versions! In order not to get versions conflicts.
In order to view, modify or work with the notebooks you only need to run:
jupyter lab
This will open the jupyter host in your default browser.
Below find the proposed structure for this repository:
.
├── .github/workflows # Github Actions
├── docs # Sphinx documentation generator directory
├── examples # Some useful examples
├── notebooks # Jupyter notebooks
├── similarity_measures_b106# The python test module (library)
├── src # C++ source code
└── tests # Tests (C++/Python) to ensure expected outcomes