├── .github └── workflows │ ├── generate_docs.yml │ ├── test_cpp.yml │ └── test_python.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── Readme.md ├── docs ├── .nojekyll ├── Doxyfile ├── Doxyfile.bak ├── Makefile ├── _static │ └── custom.css ├── conf.py ├── cpp.rst ├── html │ ├── .buildinfo │ ├── _sources │ │ ├── api │ │ │ ├── classFastIVM.rst.txt │ │ │ ├── classGreedy.rst.txt │ │ │ ├── classIVM.rst.txt │ │ │ ├── classIndependentSetImprovement.rst.txt │ │ │ ├── classKernel.rst.txt │ │ │ ├── classKernelWrapper.rst.txt │ │ │ ├── classMatrix.rst.txt │ │ │ ├── classPyKernel.rst.txt │ │ │ ├── classPySubmodularFunction.rst.txt │ │ │ ├── classRBFKernel.rst.txt │ │ │ ├── classRandom.rst.txt │ │ │ ├── classSalsa.rst.txt │ │ │ ├── classSalsa_1_1Dense.rst.txt │ │ │ ├── classSalsa_1_1FixedThreshold.rst.txt │ │ │ ├── classSalsa_1_1HighLowThreshold.rst.txt │ │ │ ├── classSieveStreaming.rst.txt │ │ │ ├── classSieveStreamingPP.rst.txt │ │ │ ├── classSieveStreamingPP_1_1Sieve.rst.txt │ │ │ ├── classSieveStreaming_1_1Sieve.rst.txt │ │ │ ├── classSubmodularFunction.rst.txt │ │ │ ├── classSubmodularFunctionWrapper.rst.txt │ │ │ ├── classSubmodularOptimizer.rst.txt │ │ │ ├── classThreeSieves.rst.txt │ │ │ ├── class_view_hierarchy.rst.txt │ │ │ ├── dir_include.rst.txt │ │ │ ├── dir_include_functions.rst.txt │ │ │ ├── dir_include_functions_kernels.rst.txt │ │ │ ├── file_include_DataTypeHandling.h.rst.txt │ │ │ ├── file_include_Greedy.h.rst.txt │ │ │ ├── file_include_IndependentSetImprovement.h.rst.txt │ │ │ ├── file_include_Python.cpp.rst.txt │ │ │ ├── file_include_Random.h.rst.txt │ │ │ ├── file_include_Salsa.h.rst.txt │ │ │ ├── file_include_SieveStreaming.h.rst.txt │ │ │ ├── file_include_SieveStreamingPP.h.rst.txt │ │ │ ├── file_include_SubmodularFunction.h.rst.txt │ │ │ ├── file_include_SubmodularOptimizer.h.rst.txt │ │ │ ├── file_include_ThreeSieves.h.rst.txt │ │ │ ├── file_include_functions_FastIVM.h.rst.txt │ │ │ ├── file_include_functions_IVM.h.rst.txt │ │ │ ├── file_include_functions_Matrix.h.rst.txt │ │ │ ├── file_include_functions_kernels_Kernel.h.rst.txt │ │ │ ├── file_include_functions_kernels_RBFKernel.h.rst.txt │ │ │ ├── file_view_hierarchy.rst.txt │ │ │ ├── function_Matrix_8h_1a2e9d8f00fc452e60c75013b7f37e43cb.rst.txt │ │ │ ├── function_Matrix_8h_1a38ada3e60db87205c68a8cd27bb53754.rst.txt │ │ │ ├── function_Matrix_8h_1a49f276b01293b9c7cd6ed4bff13dad70.rst.txt │ │ │ ├── function_Matrix_8h_1a5be908feb53890de249ca868e91435e0.rst.txt │ │ │ ├── function_Matrix_8h_1a6742cc24af1c654c44907d62a8bf743e.rst.txt │ │ │ ├── function_Matrix_8h_1a6ad25ab35e59ad08b5a13aabfe166a11.rst.txt │ │ │ ├── function_Matrix_8h_1aaf9bc56a53b9a334621531b0e32ed04b.rst.txt │ │ │ ├── function_Python_8cpp_1ab3974db34051dddb4d81e89a8f347071.rst.txt │ │ │ ├── function_SieveStreaming_8h_1a4a3dfc0d6b302bb7a0969f52f70016fe.rst.txt │ │ │ ├── library_root.rst.txt │ │ │ ├── program_listing_file_include_DataTypeHandling.h.rst.txt │ │ │ ├── program_listing_file_include_Greedy.h.rst.txt │ │ │ ├── program_listing_file_include_IndependentSetImprovement.h.rst.txt │ │ │ ├── program_listing_file_include_Python.cpp.rst.txt │ │ │ ├── program_listing_file_include_Random.h.rst.txt │ │ │ ├── program_listing_file_include_Salsa.h.rst.txt │ │ │ ├── program_listing_file_include_SieveStreaming.h.rst.txt │ │ │ ├── program_listing_file_include_SieveStreamingPP.h.rst.txt │ │ │ ├── program_listing_file_include_SubmodularFunction.h.rst.txt │ │ │ ├── program_listing_file_include_SubmodularOptimizer.h.rst.txt │ │ │ ├── program_listing_file_include_ThreeSieves.h.rst.txt │ │ │ ├── program_listing_file_include_functions_FastIVM.h.rst.txt │ │ │ ├── program_listing_file_include_functions_IVM.h.rst.txt │ │ │ ├── program_listing_file_include_functions_Matrix.h.rst.txt │ │ │ ├── program_listing_file_include_functions_kernels_Kernel.h.rst.txt │ │ │ ├── program_listing_file_include_functions_kernels_RBFKernel.h.rst.txt │ │ │ ├── structIndependentSetImprovement_1_1Pair.rst.txt │ │ │ ├── typedef_DataTypeHandling_8h_1ae08b1e8a0b68c4dd03930dcb7eee61c6.rst.txt │ │ │ ├── typedef_DataTypeHandling_8h_1aebd6d4f4d1878f967fc3873d39646e74.rst.txt │ │ │ ├── unabridged_api.rst.txt │ │ │ └── unabridged_orphan.rst.txt │ │ ├── cpp.rst.txt │ │ ├── index.rst.txt │ │ ├── python.rst.txt │ │ └── root.rst.txt │ ├── _static │ │ ├── basic.css │ │ ├── collapsible-lists │ │ │ ├── LICENSE.md │ │ │ ├── css │ │ │ │ ├── button-closed.png │ │ │ │ ├── button-open.png │ │ │ │ ├── button.png │ │ │ │ ├── list-item-contents.png │ │ │ │ ├── list-item-last-open.png │ │ │ │ ├── list-item-last.png │ │ │ │ ├── list-item-open.png │ │ │ │ ├── list-item-root.png │ │ │ │ ├── list-item.png │ │ │ │ └── tree_view.css │ │ │ └── js │ │ │ │ ├── CollapsibleLists.compressed.js │ │ │ │ └── apply-collapsible-lists.js │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── fonts │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ └── lato-normal.woff2 │ │ │ └── theme.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── fonts │ │ │ ├── Inconsolata-Bold.ttf │ │ │ ├── Inconsolata-Regular.ttf │ │ │ ├── Inconsolata.ttf │ │ │ ├── Lato-Bold.ttf │ │ │ ├── Lato-Regular.ttf │ │ │ ├── Lato │ │ │ │ ├── lato-bold.eot │ │ │ │ ├── lato-bold.ttf │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-bolditalic.eot │ │ │ │ ├── lato-bolditalic.ttf │ │ │ │ ├── lato-bolditalic.woff │ │ │ │ ├── lato-bolditalic.woff2 │ │ │ │ ├── lato-italic.eot │ │ │ │ ├── lato-italic.ttf │ │ │ │ ├── lato-italic.woff │ │ │ │ ├── lato-italic.woff2 │ │ │ │ ├── lato-regular.eot │ │ │ │ ├── lato-regular.ttf │ │ │ │ ├── lato-regular.woff │ │ │ │ └── lato-regular.woff2 │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ ├── RobotoSlab │ │ │ │ ├── roboto-slab-v7-bold.eot │ │ │ │ ├── roboto-slab-v7-bold.ttf │ │ │ │ ├── roboto-slab-v7-bold.woff │ │ │ │ ├── roboto-slab-v7-bold.woff2 │ │ │ │ ├── roboto-slab-v7-regular.eot │ │ │ │ ├── roboto-slab-v7-regular.ttf │ │ │ │ ├── roboto-slab-v7-regular.woff │ │ │ │ └── roboto-slab-v7-regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── jquery-3.5.1.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── badge_only.js │ │ │ ├── html5shiv-printshiv.min.js │ │ │ ├── html5shiv.min.js │ │ │ ├── modernizr.min.js │ │ │ └── theme.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── pyssm-logo-bw.png │ │ ├── searchtools.js │ │ ├── underscore-1.13.1.js │ │ └── underscore.js │ ├── api │ │ ├── classFastIVM.html │ │ ├── classGreedy.html │ │ ├── classIVM.html │ │ ├── classIndependentSetImprovement.html │ │ ├── classKernel.html │ │ ├── classKernelWrapper.html │ │ ├── classMatrix.html │ │ ├── classPyKernel.html │ │ ├── classPySubmodularFunction.html │ │ ├── classRBFKernel.html │ │ ├── classRandom.html │ │ ├── classSalsa.html │ │ ├── classSalsa_1_1Dense.html │ │ ├── classSalsa_1_1FixedThreshold.html │ │ ├── classSalsa_1_1HighLowThreshold.html │ │ ├── classSieveStreaming.html │ │ ├── classSieveStreamingPP.html │ │ ├── classSieveStreamingPP_1_1Sieve.html │ │ ├── classSieveStreaming_1_1Sieve.html │ │ ├── classSubmodularFunction.html │ │ ├── classSubmodularFunctionWrapper.html │ │ ├── classSubmodularOptimizer.html │ │ ├── classThreeSieves.html │ │ ├── class_view_hierarchy.html │ │ ├── dir_include.html │ │ ├── dir_include_functions.html │ │ ├── dir_include_functions_kernels.html │ │ ├── file_include_DataTypeHandling.h.html │ │ ├── file_include_Greedy.h.html │ │ ├── file_include_IndependentSetImprovement.h.html │ │ ├── file_include_Python.cpp.html │ │ ├── file_include_Random.h.html │ │ ├── file_include_Salsa.h.html │ │ ├── file_include_SieveStreaming.h.html │ │ ├── file_include_SieveStreamingPP.h.html │ │ ├── file_include_SubmodularFunction.h.html │ │ ├── file_include_SubmodularOptimizer.h.html │ │ ├── file_include_ThreeSieves.h.html │ │ ├── file_include_functions_FastIVM.h.html │ │ ├── file_include_functions_IVM.h.html │ │ ├── file_include_functions_Matrix.h.html │ │ ├── file_include_functions_kernels_Kernel.h.html │ │ ├── file_include_functions_kernels_RBFKernel.h.html │ │ ├── file_view_hierarchy.html │ │ ├── function_Matrix_8h_1a2e9d8f00fc452e60c75013b7f37e43cb.html │ │ ├── function_Matrix_8h_1a38ada3e60db87205c68a8cd27bb53754.html │ │ ├── function_Matrix_8h_1a49f276b01293b9c7cd6ed4bff13dad70.html │ │ ├── function_Matrix_8h_1a5be908feb53890de249ca868e91435e0.html │ │ ├── function_Matrix_8h_1a6742cc24af1c654c44907d62a8bf743e.html │ │ ├── function_Matrix_8h_1a6ad25ab35e59ad08b5a13aabfe166a11.html │ │ ├── function_Matrix_8h_1aaf9bc56a53b9a334621531b0e32ed04b.html │ │ ├── function_Python_8cpp_1ab3974db34051dddb4d81e89a8f347071.html │ │ ├── function_SieveStreaming_8h_1a4a3dfc0d6b302bb7a0969f52f70016fe.html │ │ ├── library_root.html │ │ ├── program_listing_file_include_DataTypeHandling.h.html │ │ ├── program_listing_file_include_Greedy.h.html │ │ ├── program_listing_file_include_IndependentSetImprovement.h.html │ │ ├── program_listing_file_include_Python.cpp.html │ │ ├── program_listing_file_include_Random.h.html │ │ ├── program_listing_file_include_Salsa.h.html │ │ ├── program_listing_file_include_SieveStreaming.h.html │ │ ├── program_listing_file_include_SieveStreamingPP.h.html │ │ ├── program_listing_file_include_SubmodularFunction.h.html │ │ ├── program_listing_file_include_SubmodularOptimizer.h.html │ │ ├── program_listing_file_include_ThreeSieves.h.html │ │ ├── program_listing_file_include_functions_FastIVM.h.html │ │ ├── program_listing_file_include_functions_IVM.h.html │ │ ├── program_listing_file_include_functions_Matrix.h.html │ │ ├── program_listing_file_include_functions_kernels_Kernel.h.html │ │ ├── program_listing_file_include_functions_kernels_RBFKernel.h.html │ │ ├── structIndependentSetImprovement_1_1Pair.html │ │ ├── typedef_DataTypeHandling_8h_1ae08b1e8a0b68c4dd03930dcb7eee61c6.html │ │ ├── typedef_DataTypeHandling_8h_1aebd6d4f4d1878f967fc3873d39646e74.html │ │ ├── unabridged_api.html │ │ └── unabridged_orphan.html │ ├── cpp.html │ ├── genindex.html │ ├── index.html │ ├── objects.inv │ ├── python.html │ ├── root.html │ ├── search.html │ └── searchindex.js ├── index.rst ├── pyssm-logo-bw.png ├── pyssm-logo-green.png ├── pyssm_logo.svg ├── python.rst └── root.rst ├── environment.yml ├── experiments ├── abc │ ├── init.py │ ├── init.sh │ └── run.py ├── creditfraud │ ├── init.sh │ └── run.py ├── examiner │ ├── init.py │ ├── init.sh │ └── run.py ├── fact-highlevel │ ├── init.py │ └── run.py ├── fact-lowlevel │ ├── init.sh │ └── run.py ├── forestcover │ ├── init.sh │ └── run.py ├── kddcup99 │ ├── init.sh │ ├── run.cpp │ └── run.py └── stream51 │ ├── init.py │ ├── init.sh │ └── run.py ├── explore_results.ipynb ├── include ├── DataTypeHandling.h ├── Greedy.h ├── IndependentSetImprovement.h ├── Python.cpp ├── Random.h ├── Salsa.h ├── SieveStreaming.h ├── SieveStreamingPP.h ├── SubmodularFunction.h ├── SubmodularOptimizer.h ├── ThreeSieves.h └── functions │ ├── FastIVM.h │ ├── IVM.h │ ├── Matrix.h │ └── kernels │ ├── Kernel.h │ └── RBFKernel.h ├── setup.py └── tests ├── main.cpp └── main.py /.github/workflows/generate_docs.yml: -------------------------------------------------------------------------------- 1 | name: Building docs 2 | on: 3 | push: 4 | branches: [master] 5 | 6 | jobs: 7 | test-cpp: 8 | runs-on: "ubuntu-latest" 9 | name: Generate docs 10 | #shell: bash -l {0} 11 | defaults: 12 | run: 13 | shell: bash -l {0} 14 | steps: 15 | - uses: actions/checkout@v2 16 | with: 17 | submodules: recursive 18 | - uses: conda-incubator/setup-miniconda@v2 19 | with: 20 | miniconda-version: "latest" 21 | activate-environment: pyssm 22 | environment-file: environment.yml 23 | - name: Generate the docs 24 | run: | 25 | cd docs/ 26 | make html 27 | rm -rf api html latex _static _templates xml make.bat Doxyfile.bat 28 | mv _build/html html 29 | rm -rf _build 30 | - name: Commit documentation # transfer the new html files back into the repository 31 | run: | 32 | git config --local user.name "sbuschjaeger" 33 | git add docs/* 34 | git commit -m "Added documentation" || echo "Nothing to update" 35 | - name: Push changes # push the output folder to your repo 36 | uses: ad-m/github-push-action@master 37 | with: 38 | github_token: ${{ secrets.GITHUB_TOKEN }} 39 | 40 | # test-python: 41 | # runs-on: "ubuntu-latest" 42 | # name: Prepare conda environment and test python interface 43 | # #shell: bash -l {0} 44 | # defaults: 45 | # run: 46 | # shell: bash -l {0} 47 | # steps: 48 | # - uses: actions/checkout@v2 49 | # - uses: conda-incubator/setup-miniconda@v2 50 | # with: 51 | # miniconda-version: "latest" 52 | # activate-environment: pyssm 53 | # environment-file: environment.yml 54 | # - run: | 55 | # cd tests 56 | # ./main.py 57 | # - name: Commit files # transfer the new html files back into the repository 58 | # run: | 59 | # git config --local user.name "sbuschjaeger" 60 | # git add PyPruning/tests/accuracy_digits.csv 61 | # git commit -m "Added latest accuracy on digits to repository" 62 | # - name: Push changes # push the output folder to your repo 63 | # uses: ad-m/github-push-action@master 64 | # with: 65 | # github_token: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/test_cpp.yml: -------------------------------------------------------------------------------- 1 | name: C++ tests 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | test-cpp: 9 | runs-on: "ubuntu-latest" 10 | name: Test cpp code 11 | #shell: bash -l {0} 12 | defaults: 13 | run: 14 | shell: bash -l {0} 15 | steps: 16 | - uses: actions/checkout@v2 17 | with: 18 | submodules: recursive 19 | - uses: conda-incubator/setup-miniconda@v2 20 | with: 21 | miniconda-version: "latest" 22 | activate-environment: pyssm 23 | environment-file: environment.yml 24 | - name: Test CPP Code 25 | run: | 26 | cd build 27 | cmake .. 28 | make 29 | ./main 30 | -------------------------------------------------------------------------------- /.github/workflows/test_python.yml: -------------------------------------------------------------------------------- 1 | name: Python tests 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | test-cpp: 9 | runs-on: "ubuntu-latest" 10 | name: Test python code 11 | #shell: bash -l {0} 12 | defaults: 13 | run: 14 | shell: bash -l {0} 15 | steps: 16 | - uses: actions/checkout@v2 17 | with: 18 | submodules: recursive 19 | - uses: conda-incubator/setup-miniconda@v2 20 | with: 21 | miniconda-version: "latest" 22 | activate-environment: pyssm 23 | environment-file: environment.yml 24 | - name: Test Python code 25 | run: | 26 | cd tests 27 | ./main.py 28 | 29 | # test-python: 30 | # runs-on: "ubuntu-latest" 31 | # name: Prepare conda environment and test python interface 32 | # #shell: bash -l {0} 33 | # defaults: 34 | # run: 35 | # shell: bash -l {0} 36 | # steps: 37 | # - uses: actions/checkout@v2 38 | # - uses: conda-incubator/setup-miniconda@v2 39 | # with: 40 | # miniconda-version: "latest" 41 | # activate-environment: pyssm 42 | # environment-file: environment.yml 43 | # - run: | 44 | # cd tests 45 | # ./main.py 46 | # - name: Commit files # transfer the new html files back into the repository 47 | # run: | 48 | # git config --local user.name "sbuschjaeger" 49 | # git add PyPruning/tests/accuracy_digits.csv 50 | # git commit -m "Added latest accuracy on digits to repository" 51 | # - name: Push changes # push the output folder to your repo 52 | # uses: ad-m/github-push-action@master 53 | # with: 54 | # github_token: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | .vscode 3 | *.so 4 | PySSM.egg-info/ 5 | data/ 6 | *tar.gz 7 | *.csv 8 | *.mat 9 | *.pdf 10 | *.npy 11 | *.json 12 | *.jsonl 13 | docs/_api 14 | docs/api 15 | # docs/html 16 | docs/_build 17 | docs/latex 18 | docs/templates 19 | docs/xml 20 | docs/make.bat -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "pybind11"] 2 | path = pybind11 3 | url = https://github.com/pybind/pybind11.git 4 | branch = master 5 | [submodule "experiment_runner"] 6 | path = experiment_runner 7 | url = git@github.com:sbuschjaeger/experiment_runner.git 8 | branch = master 9 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13 FATAL_ERROR) 2 | project(StreamingSubmodularOptimization LANGUAGES CXX) 3 | # find_package(OpenMP) 4 | 5 | # Include pybind11 6 | # add_subdirectory(lib/pybind11) 7 | 8 | ################################################################### 9 | # TARGET CONFIGURATION 10 | ################################################################### 11 | 12 | SET(CMAKE_CXX_STANDARD 17) 13 | SET(CMAKE_CXX_STANDARD_REQUIRED ON) 14 | # SET(CMAKE_CXX_EXTENSIONS OFF) 15 | # SET(CMAKE_POSITION_INDEPENDENT_CODE ON) 16 | 17 | if(NOT CMAKE_BUILD_TYPE) 18 | set(CMAKE_BUILD_TYPE Release) 19 | endif() 20 | 21 | set(CMAKE_CXX_FLAGS "-Wall -Wextra") 22 | set(CMAKE_CXX_FLAGS_DEBUG "-g") 23 | set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -march=native -mtune=native") 24 | 25 | ################################################################### 26 | # TARGETS 27 | ################################################################### 28 | 29 | include_directories("./include") 30 | 31 | add_executable(run_kddcup ${SOURCES} experiments/kddcup99/run.cpp) 32 | 33 | add_executable(main tests/main.cpp) 34 | 35 | add_subdirectory(pybind11) 36 | pybind11_add_module(PySSM include/Python.cpp) 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Sebastian Buschjäger 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/.nojekyll -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: 75% !important; 3 | } 4 | 5 | .wy-side-nav-search, .wy-nav-top { 6 | background: #32a852; 7 | } -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, os.path.abspath('.')) 16 | 17 | 18 | # -- Project information ----------------------------------------------------- 19 | 20 | project = 'SubmodularStreamMaximization' 21 | copyright = '2021, Sebastian Buschjäger' 22 | author = 'Sebastian Buschjäger' 23 | 24 | # -- General configuration --------------------------------------------------- 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be 27 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 28 | # ones. 29 | extensions = [ 30 | "breathe", 31 | "exhale", 32 | "sphinx_rtd_theme", 33 | ] 34 | 35 | breathe_projects = { 36 | "SubmodularStreamMaximization":"xml" 37 | } 38 | 39 | # Breathe Configuration 40 | breathe_default_project = "SubmodularStreamMaximization" 41 | 42 | # Setup the exhale extension 43 | exhale_args = { 44 | # These arguments are required 45 | "containmentFolder": "./api", 46 | "rootFileName": "library_root.rst", 47 | "rootFileTitle": "Library API", 48 | "doxygenStripFromPath": "..", 49 | # Suggested optional arguments 50 | "createTreeView": True, 51 | # TIP: if using the sphinx-bootstrap-theme, you need 52 | # "treeViewIsBootstrap": True, 53 | "exhaleExecutesDoxygen": True, 54 | "exhaleDoxygenStdin": "INPUT = ../include" 55 | } 56 | 57 | # Tell sphinx what the primary language being documented is. 58 | primary_domain = 'cpp' 59 | 60 | # Tell sphinx what the pygments highlight language should be. 61 | highlight_language = 'cpp' 62 | 63 | # Add any paths that contain templates here, relative to this directory. 64 | templates_path = ['_templates'] 65 | 66 | # List of patterns, relative to source directory, that match files and 67 | # directories to ignore when looking for source files. 68 | # This pattern also affects html_static_path and html_extra_path. 69 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 70 | 71 | 72 | # -- Options for HTML output ------------------------------------------------- 73 | 74 | # The theme to use for HTML and HTML Help pages. See the documentation for 75 | # a list of builtin themes. 76 | # 77 | html_theme = 'sphinx_rtd_theme' 78 | 79 | # Add any paths that contain custom static files (such as style sheets) here, 80 | # relative to this directory. They are copied after the builtin static files, 81 | # so a file named "default.css" will overwrite the builtin "default.css". 82 | html_static_path = ['_static'] 83 | 84 | html_theme_options = { 85 | 'sticky_navigation': True, 86 | 'style_external_links': True 87 | } 88 | 89 | html_context = { 90 | 'display_github': True, 91 | 'github_user': 'sbuschjaeger', 92 | 'github_repo': 'pypruning', 93 | 'github_version': 'master/docs/', 94 | } 95 | 96 | html_css_files = [ 97 | 'custom.css' 98 | ] 99 | 100 | # html_logo = 'ls8-logo.svg' 101 | html_logo = 'pyssm-logo-bw.png' -------------------------------------------------------------------------------- /docs/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: a2bc32487e58fc34d71a694b8327424a 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/html/_sources/api/classFastIVM.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classFastIVM: 2 | 3 | Class FastIVM 4 | ============= 5 | 6 | - Defined in :ref:`file_include_functions_FastIVM.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public IVM`` (:ref:`exhale_class_classIVM`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: FastIVM 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classGreedy.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classGreedy: 2 | 3 | Class Greedy 4 | ============ 5 | 6 | - Defined in :ref:`file_include_Greedy.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: Greedy 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classIVM.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classIVM: 2 | 3 | Class IVM 4 | ========= 5 | 6 | - Defined in :ref:`file_include_functions_IVM.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public SubmodularFunction`` (:ref:`exhale_class_classSubmodularFunction`) 16 | 17 | 18 | Derived Type 19 | ************ 20 | 21 | - ``public FastIVM`` (:ref:`exhale_class_classFastIVM`) 22 | 23 | 24 | Class Documentation 25 | ------------------- 26 | 27 | 28 | .. doxygenclass:: IVM 29 | :members: 30 | :protected-members: 31 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classIndependentSetImprovement.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classIndependentSetImprovement: 2 | 3 | Class IndependentSetImprovement 4 | =============================== 5 | 6 | - Defined in :ref:`file_include_IndependentSetImprovement.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | 13 | Nested Types 14 | ************ 15 | 16 | - :ref:`exhale_struct_structIndependentSetImprovement_1_1Pair` 17 | 18 | 19 | Inheritance Relationships 20 | ------------------------- 21 | 22 | Base Type 23 | ********* 24 | 25 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 26 | 27 | 28 | Class Documentation 29 | ------------------- 30 | 31 | 32 | .. doxygenclass:: IndependentSetImprovement 33 | :members: 34 | :protected-members: 35 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classKernel.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classKernel: 2 | 3 | Class Kernel 4 | ============ 5 | 6 | - Defined in :ref:`file_include_functions_kernels_Kernel.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Derived Types 13 | ************* 14 | 15 | - ``public KernelWrapper`` (:ref:`exhale_class_classKernelWrapper`) 16 | - ``public PyKernel`` (:ref:`exhale_class_classPyKernel`) 17 | - ``public RBFKernel`` (:ref:`exhale_class_classRBFKernel`) 18 | 19 | 20 | Class Documentation 21 | ------------------- 22 | 23 | 24 | .. doxygenclass:: Kernel 25 | :members: 26 | :protected-members: 27 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classKernelWrapper.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classKernelWrapper: 2 | 3 | Class KernelWrapper 4 | =================== 5 | 6 | - Defined in :ref:`file_include_functions_kernels_Kernel.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public Kernel`` (:ref:`exhale_class_classKernel`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: KernelWrapper 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classMatrix.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classMatrix: 2 | 3 | Class Matrix 4 | ============ 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Class Documentation 10 | ------------------- 11 | 12 | 13 | .. doxygenclass:: Matrix 14 | :members: 15 | :protected-members: 16 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classPyKernel.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classPyKernel: 2 | 3 | Class PyKernel 4 | ============== 5 | 6 | - Defined in :ref:`file_include_Python.cpp` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public Kernel`` (:ref:`exhale_class_classKernel`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: PyKernel 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classPySubmodularFunction.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classPySubmodularFunction: 2 | 3 | Class PySubmodularFunction 4 | ========================== 5 | 6 | - Defined in :ref:`file_include_Python.cpp` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public SubmodularFunction`` (:ref:`exhale_class_classSubmodularFunction`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: PySubmodularFunction 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classRBFKernel.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classRBFKernel: 2 | 3 | Class RBFKernel 4 | =============== 5 | 6 | - Defined in :ref:`file_include_functions_kernels_RBFKernel.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public Kernel`` (:ref:`exhale_class_classKernel`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: RBFKernel 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classRandom.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classRandom: 2 | 3 | Class Random 4 | ============ 5 | 6 | - Defined in :ref:`file_include_Random.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: Random 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSalsa.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSalsa: 2 | 3 | Class Salsa 4 | =========== 5 | 6 | - Defined in :ref:`file_include_Salsa.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | 13 | Nested Types 14 | ************ 15 | 16 | - :ref:`exhale_class_classSalsa_1_1Dense` 17 | - :ref:`exhale_class_classSalsa_1_1FixedThreshold` 18 | - :ref:`exhale_class_classSalsa_1_1HighLowThreshold` 19 | 20 | 21 | Inheritance Relationships 22 | ------------------------- 23 | 24 | Base Type 25 | ********* 26 | 27 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 28 | 29 | 30 | Class Documentation 31 | ------------------- 32 | 33 | 34 | .. doxygenclass:: Salsa 35 | :members: 36 | :protected-members: 37 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSalsa_1_1Dense.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSalsa_1_1Dense: 2 | 3 | Class Salsa::Dense 4 | ================== 5 | 6 | - Defined in :ref:`file_include_Salsa.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | This class is a nested type of :ref:`exhale_class_classSalsa`. 13 | 14 | 15 | Inheritance Relationships 16 | ------------------------- 17 | 18 | Base Type 19 | ********* 20 | 21 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 22 | 23 | 24 | Class Documentation 25 | ------------------- 26 | 27 | 28 | .. doxygenclass:: Salsa::Dense 29 | :members: 30 | :protected-members: 31 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSalsa_1_1FixedThreshold.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSalsa_1_1FixedThreshold: 2 | 3 | Class Salsa::FixedThreshold 4 | =========================== 5 | 6 | - Defined in :ref:`file_include_Salsa.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | This class is a nested type of :ref:`exhale_class_classSalsa`. 13 | 14 | 15 | Inheritance Relationships 16 | ------------------------- 17 | 18 | Base Type 19 | ********* 20 | 21 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 22 | 23 | 24 | Class Documentation 25 | ------------------- 26 | 27 | 28 | .. doxygenclass:: Salsa::FixedThreshold 29 | :members: 30 | :protected-members: 31 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSalsa_1_1HighLowThreshold.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSalsa_1_1HighLowThreshold: 2 | 3 | Class Salsa::HighLowThreshold 4 | ============================= 5 | 6 | - Defined in :ref:`file_include_Salsa.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | This class is a nested type of :ref:`exhale_class_classSalsa`. 13 | 14 | 15 | Inheritance Relationships 16 | ------------------------- 17 | 18 | Base Type 19 | ********* 20 | 21 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 22 | 23 | 24 | Class Documentation 25 | ------------------- 26 | 27 | 28 | .. doxygenclass:: Salsa::HighLowThreshold 29 | :members: 30 | :protected-members: 31 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSieveStreaming.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSieveStreaming: 2 | 3 | Class SieveStreaming 4 | ==================== 5 | 6 | - Defined in :ref:`file_include_SieveStreaming.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | 13 | Nested Types 14 | ************ 15 | 16 | - :ref:`exhale_class_classSieveStreaming_1_1Sieve` 17 | 18 | 19 | Inheritance Relationships 20 | ------------------------- 21 | 22 | Base Type 23 | ********* 24 | 25 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 26 | 27 | 28 | Class Documentation 29 | ------------------- 30 | 31 | 32 | .. doxygenclass:: SieveStreaming 33 | :members: 34 | :protected-members: 35 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSieveStreamingPP.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSieveStreamingPP: 2 | 3 | Class SieveStreamingPP 4 | ====================== 5 | 6 | - Defined in :ref:`file_include_SieveStreamingPP.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | 13 | Nested Types 14 | ************ 15 | 16 | - :ref:`exhale_class_classSieveStreamingPP_1_1Sieve` 17 | 18 | 19 | Inheritance Relationships 20 | ------------------------- 21 | 22 | Base Type 23 | ********* 24 | 25 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 26 | 27 | 28 | Class Documentation 29 | ------------------- 30 | 31 | 32 | .. doxygenclass:: SieveStreamingPP 33 | :members: 34 | :protected-members: 35 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSieveStreamingPP_1_1Sieve.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSieveStreamingPP_1_1Sieve: 2 | 3 | Class SieveStreamingPP::Sieve 4 | ============================= 5 | 6 | - Defined in :ref:`file_include_SieveStreamingPP.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | This class is a nested type of :ref:`exhale_class_classSieveStreamingPP`. 13 | 14 | 15 | Inheritance Relationships 16 | ------------------------- 17 | 18 | Base Type 19 | ********* 20 | 21 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 22 | 23 | 24 | Class Documentation 25 | ------------------- 26 | 27 | 28 | .. doxygenclass:: SieveStreamingPP::Sieve 29 | :members: 30 | :protected-members: 31 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSieveStreaming_1_1Sieve.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSieveStreaming_1_1Sieve: 2 | 3 | Class SieveStreaming::Sieve 4 | =========================== 5 | 6 | - Defined in :ref:`file_include_SieveStreaming.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | This class is a nested type of :ref:`exhale_class_classSieveStreaming`. 13 | 14 | 15 | Inheritance Relationships 16 | ------------------------- 17 | 18 | Base Type 19 | ********* 20 | 21 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 22 | 23 | 24 | Class Documentation 25 | ------------------- 26 | 27 | 28 | .. doxygenclass:: SieveStreaming::Sieve 29 | :members: 30 | :protected-members: 31 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSubmodularFunction.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSubmodularFunction: 2 | 3 | Class SubmodularFunction 4 | ======================== 5 | 6 | - Defined in :ref:`file_include_SubmodularFunction.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Derived Types 13 | ************* 14 | 15 | - ``public IVM`` (:ref:`exhale_class_classIVM`) 16 | - ``public PySubmodularFunction`` (:ref:`exhale_class_classPySubmodularFunction`) 17 | - ``public SubmodularFunctionWrapper`` (:ref:`exhale_class_classSubmodularFunctionWrapper`) 18 | 19 | 20 | Class Documentation 21 | ------------------- 22 | 23 | 24 | .. doxygenclass:: SubmodularFunction 25 | :members: 26 | :protected-members: 27 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSubmodularFunctionWrapper.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSubmodularFunctionWrapper: 2 | 3 | Class SubmodularFunctionWrapper 4 | =============================== 5 | 6 | - Defined in :ref:`file_include_SubmodularFunction.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public SubmodularFunction`` (:ref:`exhale_class_classSubmodularFunction`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: SubmodularFunctionWrapper 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classSubmodularOptimizer.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classSubmodularOptimizer: 2 | 3 | Class SubmodularOptimizer 4 | ========================= 5 | 6 | - Defined in :ref:`file_include_SubmodularOptimizer.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Derived Types 13 | ************* 14 | 15 | - ``public Greedy`` (:ref:`exhale_class_classGreedy`) 16 | - ``public IndependentSetImprovement`` (:ref:`exhale_class_classIndependentSetImprovement`) 17 | - ``public Random`` (:ref:`exhale_class_classRandom`) 18 | - ``public Salsa`` (:ref:`exhale_class_classSalsa`) 19 | - ``public Salsa::Dense`` (:ref:`exhale_class_classSalsa_1_1Dense`) 20 | - ``public Salsa::FixedThreshold`` (:ref:`exhale_class_classSalsa_1_1FixedThreshold`) 21 | - ``public Salsa::HighLowThreshold`` (:ref:`exhale_class_classSalsa_1_1HighLowThreshold`) 22 | - ``public SieveStreaming`` (:ref:`exhale_class_classSieveStreaming`) 23 | - ``public SieveStreamingPP`` (:ref:`exhale_class_classSieveStreamingPP`) 24 | - ``public ThreeSieves`` (:ref:`exhale_class_classThreeSieves`) 25 | 26 | 27 | Class Documentation 28 | ------------------- 29 | 30 | 31 | .. doxygenclass:: SubmodularOptimizer 32 | :members: 33 | :protected-members: 34 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/classThreeSieves.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_class_classThreeSieves: 2 | 3 | Class ThreeSieves 4 | ================= 5 | 6 | - Defined in :ref:`file_include_ThreeSieves.h` 7 | 8 | 9 | Inheritance Relationships 10 | ------------------------- 11 | 12 | Base Type 13 | ********* 14 | 15 | - ``public SubmodularOptimizer`` (:ref:`exhale_class_classSubmodularOptimizer`) 16 | 17 | 18 | Class Documentation 19 | ------------------- 20 | 21 | 22 | .. doxygenclass:: ThreeSieves 23 | :members: 24 | :protected-members: 25 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/class_view_hierarchy.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Class Hierarchy 3 | --------------- 4 | 5 | 6 | .. raw:: html 7 | 8 | 15 | 16 | .. end raw html for treeView 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/html/_sources/api/dir_include.rst.txt: -------------------------------------------------------------------------------- 1 | .. _dir_include: 2 | 3 | 4 | Directory include 5 | ================= 6 | 7 | 8 | *Directory path:* ``include`` 9 | 10 | Subdirectories 11 | -------------- 12 | 13 | - :ref:`dir_include_functions` 14 | 15 | 16 | Files 17 | ----- 18 | 19 | - :ref:`file_include_DataTypeHandling.h` 20 | - :ref:`file_include_Greedy.h` 21 | - :ref:`file_include_IndependentSetImprovement.h` 22 | - :ref:`file_include_Python.cpp` 23 | - :ref:`file_include_Random.h` 24 | - :ref:`file_include_Salsa.h` 25 | - :ref:`file_include_SieveStreaming.h` 26 | - :ref:`file_include_SieveStreamingPP.h` 27 | - :ref:`file_include_SubmodularFunction.h` 28 | - :ref:`file_include_SubmodularOptimizer.h` 29 | - :ref:`file_include_ThreeSieves.h` 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/html/_sources/api/dir_include_functions.rst.txt: -------------------------------------------------------------------------------- 1 | .. _dir_include_functions: 2 | 3 | 4 | Directory functions 5 | =================== 6 | 7 | 8 | |exhale_lsh| :ref:`Parent directory ` (``include``) 9 | 10 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 11 | 12 | *Directory path:* ``include/functions`` 13 | 14 | Subdirectories 15 | -------------- 16 | 17 | - :ref:`dir_include_functions_kernels` 18 | 19 | 20 | Files 21 | ----- 22 | 23 | - :ref:`file_include_functions_FastIVM.h` 24 | - :ref:`file_include_functions_IVM.h` 25 | - :ref:`file_include_functions_Matrix.h` 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/html/_sources/api/dir_include_functions_kernels.rst.txt: -------------------------------------------------------------------------------- 1 | .. _dir_include_functions_kernels: 2 | 3 | 4 | Directory kernels 5 | ================= 6 | 7 | 8 | |exhale_lsh| :ref:`Parent directory ` (``include/functions``) 9 | 10 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 11 | 12 | *Directory path:* ``include/functions/kernels`` 13 | 14 | 15 | Files 16 | ----- 17 | 18 | - :ref:`file_include_functions_kernels_Kernel.h` 19 | - :ref:`file_include_functions_kernels_RBFKernel.h` 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_DataTypeHandling.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_DataTypeHandling.h: 3 | 4 | File DataTypeHandling.h 5 | ======================= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/DataTypeHandling.h``) 16 | ------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_DataTypeHandling.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``vector`` 33 | 34 | 35 | 36 | Included By 37 | ----------- 38 | 39 | 40 | - :ref:`file_include_functions_FastIVM.h` 41 | 42 | - :ref:`file_include_functions_IVM.h` 43 | 44 | - :ref:`file_include_functions_kernels_Kernel.h` 45 | 46 | - :ref:`file_include_functions_kernels_RBFKernel.h` 47 | 48 | - :ref:`file_include_functions_Matrix.h` 49 | 50 | - :ref:`file_include_Greedy.h` 51 | 52 | - :ref:`file_include_IndependentSetImprovement.h` 53 | 54 | - :ref:`file_include_Random.h` 55 | 56 | - :ref:`file_include_Salsa.h` 57 | 58 | - :ref:`file_include_SieveStreaming.h` 59 | 60 | - :ref:`file_include_SieveStreamingPP.h` 61 | 62 | - :ref:`file_include_SubmodularFunction.h` 63 | 64 | - :ref:`file_include_ThreeSieves.h` 65 | 66 | 67 | 68 | 69 | Typedefs 70 | -------- 71 | 72 | 73 | - :ref:`exhale_typedef_DataTypeHandling_8h_1ae08b1e8a0b68c4dd03930dcb7eee61c6` 74 | 75 | - :ref:`exhale_typedef_DataTypeHandling_8h_1aebd6d4f4d1878f967fc3873d39646e74` 76 | 77 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_Greedy.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_Greedy.h: 3 | 4 | File Greedy.h 5 | ============= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/Greedy.h``) 16 | --------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_Greedy.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularOptimizer.h`` (:ref:`file_include_SubmodularOptimizer.h`) 35 | 36 | - ``algorithm`` 37 | 38 | - ``numeric`` 39 | 40 | 41 | 42 | Included By 43 | ----------- 44 | 45 | 46 | - :ref:`file_include_Python.cpp` 47 | 48 | 49 | 50 | 51 | Classes 52 | ------- 53 | 54 | 55 | - :ref:`exhale_class_classGreedy` 56 | 57 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_IndependentSetImprovement.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_IndependentSetImprovement.h: 3 | 4 | File IndependentSetImprovement.h 5 | ================================ 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/IndependentSetImprovement.h``) 16 | ---------------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_IndependentSetImprovement.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularOptimizer.h`` (:ref:`file_include_SubmodularOptimizer.h`) 35 | 36 | - ``algorithm`` 37 | 38 | - ``iostream`` 39 | 40 | - ``numeric`` 41 | 42 | - ``queue`` 43 | 44 | - ``random`` 45 | 46 | - ``string`` 47 | 48 | - ``unordered_set`` 49 | 50 | 51 | 52 | Included By 53 | ----------- 54 | 55 | 56 | - :ref:`file_include_Python.cpp` 57 | 58 | 59 | 60 | 61 | Classes 62 | ------- 63 | 64 | 65 | - :ref:`exhale_struct_structIndependentSetImprovement_1_1Pair` 66 | 67 | - :ref:`exhale_class_classIndependentSetImprovement` 68 | 69 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_Python.cpp.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_Python.cpp: 3 | 4 | File Python.cpp 5 | =============== 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/Python.cpp``) 16 | ----------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_Python.cpp.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``Greedy.h`` (:ref:`file_include_Greedy.h`) 33 | 34 | - ``IndependentSetImprovement.h`` (:ref:`file_include_IndependentSetImprovement.h`) 35 | 36 | - ``Random.h`` (:ref:`file_include_Random.h`) 37 | 38 | - ``Salsa.h`` (:ref:`file_include_Salsa.h`) 39 | 40 | - ``SieveStreaming.h`` (:ref:`file_include_SieveStreaming.h`) 41 | 42 | - ``SieveStreamingPP.h`` (:ref:`file_include_SieveStreamingPP.h`) 43 | 44 | - ``SubmodularFunction.h`` (:ref:`file_include_SubmodularFunction.h`) 45 | 46 | - ``ThreeSieves.h`` (:ref:`file_include_ThreeSieves.h`) 47 | 48 | - ``functions/FastIVM.h`` (:ref:`file_include_functions_FastIVM.h`) 49 | 50 | - ``functions/IVM.h`` (:ref:`file_include_functions_IVM.h`) 51 | 52 | - ``functions/kernels/Kernel.h`` (:ref:`file_include_functions_kernels_Kernel.h`) 53 | 54 | - ``functions/kernels/RBFKernel.h`` (:ref:`file_include_functions_kernels_RBFKernel.h`) 55 | 56 | - ``pybind11/functional.h`` 57 | 58 | - ``pybind11/operators.h`` 59 | 60 | - ``pybind11/pybind11.h`` 61 | 62 | - ``pybind11/stl.h`` 63 | 64 | 65 | 66 | 67 | 68 | 69 | Classes 70 | ------- 71 | 72 | 73 | - :ref:`exhale_class_classPyKernel` 74 | 75 | - :ref:`exhale_class_classPySubmodularFunction` 76 | 77 | 78 | Functions 79 | --------- 80 | 81 | 82 | - :ref:`exhale_function_Python_8cpp_1ab3974db34051dddb4d81e89a8f347071` 83 | 84 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_Random.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_Random.h: 3 | 4 | File Random.h 5 | ============= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/Random.h``) 16 | --------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_Random.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularOptimizer.h`` (:ref:`file_include_SubmodularOptimizer.h`) 35 | 36 | - ``algorithm`` 37 | 38 | - ``numeric`` 39 | 40 | - ``random`` 41 | 42 | - ``unordered_set`` 43 | 44 | 45 | 46 | Included By 47 | ----------- 48 | 49 | 50 | - :ref:`file_include_Python.cpp` 51 | 52 | 53 | 54 | 55 | Classes 56 | ------- 57 | 58 | 59 | - :ref:`exhale_class_classRandom` 60 | 61 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_Salsa.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_Salsa.h: 3 | 4 | File Salsa.h 5 | ============ 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/Salsa.h``) 16 | -------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_Salsa.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SieveStreaming.h`` (:ref:`file_include_SieveStreaming.h`) 35 | 36 | - ``SubmodularOptimizer.h`` (:ref:`file_include_SubmodularOptimizer.h`) 37 | 38 | - ``algorithm`` 39 | 40 | - ``numeric`` 41 | 42 | - ``random`` 43 | 44 | - ``unordered_set`` 45 | 46 | 47 | 48 | Included By 49 | ----------- 50 | 51 | 52 | - :ref:`file_include_Python.cpp` 53 | 54 | 55 | 56 | 57 | Classes 58 | ------- 59 | 60 | 61 | - :ref:`exhale_class_classSalsa` 62 | 63 | - :ref:`exhale_class_classSalsa_1_1Dense` 64 | 65 | - :ref:`exhale_class_classSalsa_1_1FixedThreshold` 66 | 67 | - :ref:`exhale_class_classSalsa_1_1HighLowThreshold` 68 | 69 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_SieveStreaming.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_SieveStreaming.h: 3 | 4 | File SieveStreaming.h 5 | ===================== 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/SieveStreaming.h``) 16 | ----------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_SieveStreaming.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularOptimizer.h`` (:ref:`file_include_SubmodularOptimizer.h`) 35 | 36 | - ``algorithm`` 37 | 38 | - ``numeric`` 39 | 40 | - ``random`` 41 | 42 | - ``unordered_set`` 43 | 44 | 45 | 46 | Included By 47 | ----------- 48 | 49 | 50 | - :ref:`file_include_Python.cpp` 51 | 52 | - :ref:`file_include_Salsa.h` 53 | 54 | - :ref:`file_include_SieveStreamingPP.h` 55 | 56 | 57 | 58 | 59 | Classes 60 | ------- 61 | 62 | 63 | - :ref:`exhale_class_classSieveStreaming` 64 | 65 | - :ref:`exhale_class_classSieveStreaming_1_1Sieve` 66 | 67 | 68 | Functions 69 | --------- 70 | 71 | 72 | - :ref:`exhale_function_SieveStreaming_8h_1a4a3dfc0d6b302bb7a0969f52f70016fe` 73 | 74 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_SieveStreamingPP.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_SieveStreamingPP.h: 3 | 4 | File SieveStreamingPP.h 5 | ======================= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/SieveStreamingPP.h``) 16 | ------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_SieveStreamingPP.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SieveStreaming.h`` (:ref:`file_include_SieveStreaming.h`) 35 | 36 | - ``algorithm`` 37 | 38 | - ``numeric`` 39 | 40 | - ``unordered_set`` 41 | 42 | - ``vector`` 43 | 44 | 45 | 46 | Included By 47 | ----------- 48 | 49 | 50 | - :ref:`file_include_Python.cpp` 51 | 52 | 53 | 54 | 55 | Classes 56 | ------- 57 | 58 | 59 | - :ref:`exhale_class_classSieveStreamingPP` 60 | 61 | - :ref:`exhale_class_classSieveStreamingPP_1_1Sieve` 62 | 63 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_SubmodularFunction.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_SubmodularFunction.h: 3 | 4 | File SubmodularFunction.h 5 | ========================= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/SubmodularFunction.h``) 16 | --------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_SubmodularFunction.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``cassert`` 35 | 36 | - ``functional`` 37 | 38 | - ``memory`` 39 | 40 | - ``stdexcept`` 41 | 42 | - ``utility`` 43 | 44 | - ``vector`` 45 | 46 | 47 | 48 | Included By 49 | ----------- 50 | 51 | 52 | - :ref:`file_include_functions_FastIVM.h` 53 | 54 | - :ref:`file_include_functions_IVM.h` 55 | 56 | - :ref:`file_include_Python.cpp` 57 | 58 | - :ref:`file_include_SubmodularOptimizer.h` 59 | 60 | 61 | 62 | 63 | Classes 64 | ------- 65 | 66 | 67 | - :ref:`exhale_class_classSubmodularFunction` 68 | 69 | - :ref:`exhale_class_classSubmodularFunctionWrapper` 70 | 71 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_SubmodularOptimizer.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_SubmodularOptimizer.h: 3 | 4 | File SubmodularOptimizer.h 5 | ========================== 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/SubmodularOptimizer.h``) 16 | ---------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_SubmodularOptimizer.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``SubmodularFunction.h`` (:ref:`file_include_SubmodularFunction.h`) 33 | 34 | - ``cassert`` 35 | 36 | - ``functional`` 37 | 38 | - ``memory`` 39 | 40 | - ``optional`` 41 | 42 | - ``stdexcept`` 43 | 44 | - ``utility`` 45 | 46 | - ``vector`` 47 | 48 | 49 | 50 | Included By 51 | ----------- 52 | 53 | 54 | - :ref:`file_include_Greedy.h` 55 | 56 | - :ref:`file_include_IndependentSetImprovement.h` 57 | 58 | - :ref:`file_include_Random.h` 59 | 60 | - :ref:`file_include_Salsa.h` 61 | 62 | - :ref:`file_include_SieveStreaming.h` 63 | 64 | - :ref:`file_include_ThreeSieves.h` 65 | 66 | 67 | 68 | 69 | Classes 70 | ------- 71 | 72 | 73 | - :ref:`exhale_class_classSubmodularOptimizer` 74 | 75 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_ThreeSieves.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_ThreeSieves.h: 3 | 4 | File ThreeSieves.h 5 | ================== 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/ThreeSieves.h``) 16 | -------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_ThreeSieves.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularOptimizer.h`` (:ref:`file_include_SubmodularOptimizer.h`) 35 | 36 | - ``algorithm`` 37 | 38 | - ``numeric`` 39 | 40 | - ``random`` 41 | 42 | - ``string`` 43 | 44 | - ``unordered_set`` 45 | 46 | 47 | 48 | Included By 49 | ----------- 50 | 51 | 52 | - :ref:`file_include_Python.cpp` 53 | 54 | 55 | 56 | 57 | Classes 58 | ------- 59 | 60 | 61 | - :ref:`exhale_class_classThreeSieves` 62 | 63 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_functions_FastIVM.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_functions_FastIVM.h: 3 | 4 | File FastIVM.h 5 | ============== 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include/functions``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/functions/FastIVM.h``) 16 | -------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_functions_FastIVM.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularFunction.h`` (:ref:`file_include_SubmodularFunction.h`) 35 | 36 | - ``cassert`` 37 | 38 | - ``functional`` 39 | 40 | - ``functions/IVM.h`` (:ref:`file_include_functions_IVM.h`) 41 | 42 | - ``math.h`` 43 | 44 | - ``mutex`` 45 | 46 | - ``numeric`` 47 | 48 | - ``vector`` 49 | 50 | 51 | 52 | Included By 53 | ----------- 54 | 55 | 56 | - :ref:`file_include_Python.cpp` 57 | 58 | 59 | 60 | 61 | Classes 62 | ------- 63 | 64 | 65 | - :ref:`exhale_class_classFastIVM` 66 | 67 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_functions_IVM.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_functions_IVM.h: 3 | 4 | File IVM.h 5 | ========== 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include/functions``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/functions/IVM.h``) 16 | ---------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_functions_IVM.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``SubmodularFunction.h`` (:ref:`file_include_SubmodularFunction.h`) 35 | 36 | - ``cassert`` 37 | 38 | - ``functional`` 39 | 40 | - ``functions/Matrix.h`` (:ref:`file_include_functions_Matrix.h`) 41 | 42 | - ``kernels/Kernel.h`` (:ref:`file_include_functions_kernels_Kernel.h`) 43 | 44 | - ``math.h`` 45 | 46 | - ``mutex`` 47 | 48 | - ``vector`` 49 | 50 | 51 | 52 | Included By 53 | ----------- 54 | 55 | 56 | - :ref:`file_include_functions_FastIVM.h` 57 | 58 | - :ref:`file_include_Python.cpp` 59 | 60 | 61 | 62 | 63 | Classes 64 | ------- 65 | 66 | 67 | - :ref:`exhale_class_classIVM` 68 | 69 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_functions_Matrix.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_functions_Matrix.h: 3 | 4 | File Matrix.h 5 | ============= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include/functions``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/functions/Matrix.h``) 16 | ------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_functions_Matrix.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``immintrin.h`` 35 | 36 | - ``vector`` 37 | 38 | 39 | 40 | Included By 41 | ----------- 42 | 43 | 44 | - :ref:`file_include_functions_IVM.h` 45 | 46 | 47 | 48 | 49 | Classes 50 | ------- 51 | 52 | 53 | - :ref:`exhale_class_classMatrix` 54 | 55 | 56 | Functions 57 | --------- 58 | 59 | 60 | - :ref:`exhale_function_Matrix_8h_1a6ad25ab35e59ad08b5a13aabfe166a11` 61 | 62 | - :ref:`exhale_function_Matrix_8h_1a49f276b01293b9c7cd6ed4bff13dad70` 63 | 64 | - :ref:`exhale_function_Matrix_8h_1a2e9d8f00fc452e60c75013b7f37e43cb` 65 | 66 | - :ref:`exhale_function_Matrix_8h_1a38ada3e60db87205c68a8cd27bb53754` 67 | 68 | - :ref:`exhale_function_Matrix_8h_1a5be908feb53890de249ca868e91435e0` 69 | 70 | - :ref:`exhale_function_Matrix_8h_1a6742cc24af1c654c44907d62a8bf743e` 71 | 72 | - :ref:`exhale_function_Matrix_8h_1aaf9bc56a53b9a334621531b0e32ed04b` 73 | 74 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_functions_kernels_Kernel.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_functions_kernels_Kernel.h: 3 | 4 | File Kernel.h 5 | ============= 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include/functions/kernels``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/functions/kernels/Kernel.h``) 16 | --------------------------------------------------- 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_functions_kernels_Kernel.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``cassert`` 35 | 36 | 37 | 38 | Included By 39 | ----------- 40 | 41 | 42 | - :ref:`file_include_functions_IVM.h` 43 | 44 | - :ref:`file_include_functions_kernels_RBFKernel.h` 45 | 46 | - :ref:`file_include_Python.cpp` 47 | 48 | 49 | 50 | 51 | Classes 52 | ------- 53 | 54 | 55 | - :ref:`exhale_class_classKernel` 56 | 57 | - :ref:`exhale_class_classKernelWrapper` 58 | 59 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_include_functions_kernels_RBFKernel.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _file_include_functions_kernels_RBFKernel.h: 3 | 4 | File RBFKernel.h 5 | ================ 6 | 7 | |exhale_lsh| :ref:`Parent directory ` (``include/functions/kernels``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. contents:: Contents 12 | :local: 13 | :backlinks: none 14 | 15 | Definition (``include/functions/kernels/RBFKernel.h``) 16 | ------------------------------------------------------ 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 1 21 | 22 | program_listing_file_include_functions_kernels_RBFKernel.h.rst 23 | 24 | 25 | 26 | 27 | 28 | Includes 29 | -------- 30 | 31 | 32 | - ``DataTypeHandling.h`` (:ref:`file_include_DataTypeHandling.h`) 33 | 34 | - ``algorithm`` 35 | 36 | - ``cassert`` 37 | 38 | - ``functions/kernels/Kernel.h`` (:ref:`file_include_functions_kernels_Kernel.h`) 39 | 40 | - ``numeric`` 41 | 42 | - ``vector`` 43 | 44 | - ``x86intrin.h`` 45 | 46 | 47 | 48 | Included By 49 | ----------- 50 | 51 | 52 | - :ref:`file_include_Python.cpp` 53 | 54 | 55 | 56 | 57 | Classes 58 | ------- 59 | 60 | 61 | - :ref:`exhale_class_classRBFKernel` 62 | 63 | -------------------------------------------------------------------------------- /docs/html/_sources/api/file_view_hierarchy.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | File Hierarchy 3 | -------------- 4 | 5 | 6 | .. raw:: html 7 | 8 | 15 | 16 | .. end raw html for treeView 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1a2e9d8f00fc452e60c75013b7f37e43cb.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1a2e9d8f00fc452e60c75013b7f37e43cb: 2 | 3 | Function log_det(Matrix const&, unsigned int) 4 | ============================================= 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: log_det(Matrix const&, unsigned int) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1a38ada3e60db87205c68a8cd27bb53754.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1a38ada3e60db87205c68a8cd27bb53754: 2 | 3 | Function log_det(Matrix const&) 4 | =============================== 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: log_det(Matrix const&) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1a49f276b01293b9c7cd6ed4bff13dad70.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1a49f276b01293b9c7cd6ed4bff13dad70: 2 | 3 | Function cholesky(Matrix const&) 4 | ================================ 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: cholesky(Matrix const&) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1a5be908feb53890de249ca868e91435e0.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1a5be908feb53890de249ca868e91435e0: 2 | 3 | Function log_det_from_cholesky 4 | ============================== 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: log_det_from_cholesky(Matrix const&) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1a6742cc24af1c654c44907d62a8bf743e.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1a6742cc24af1c654c44907d62a8bf743e: 2 | 3 | Function to_string(Matrix const&) 4 | ================================= 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: to_string(Matrix const&) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1a6ad25ab35e59ad08b5a13aabfe166a11.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1a6ad25ab35e59ad08b5a13aabfe166a11: 2 | 3 | Function cholesky(Matrix const&, unsigned int) 4 | ============================================== 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: cholesky(Matrix const&, unsigned int) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Matrix_8h_1aaf9bc56a53b9a334621531b0e32ed04b.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Matrix_8h_1aaf9bc56a53b9a334621531b0e32ed04b: 2 | 3 | Function to_string(Matrix const&, unsigned int) 4 | =============================================== 5 | 6 | - Defined in :ref:`file_include_functions_Matrix.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: to_string(Matrix const&, unsigned int) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_Python_8cpp_1ab3974db34051dddb4d81e89a8f347071.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_Python_8cpp_1ab3974db34051dddb4d81e89a8f347071: 2 | 3 | Function PYBIND11_MODULE 4 | ======================== 5 | 6 | - Defined in :ref:`file_include_Python.cpp` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: PYBIND11_MODULE(PySSM, m) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/function_SieveStreaming_8h_1a4a3dfc0d6b302bb7a0969f52f70016fe.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_function_SieveStreaming_8h_1a4a3dfc0d6b302bb7a0969f52f70016fe: 2 | 3 | Function thresholds 4 | =================== 5 | 6 | - Defined in :ref:`file_include_SieveStreaming.h` 7 | 8 | 9 | Function Documentation 10 | ---------------------- 11 | 12 | 13 | .. doxygenfunction:: thresholds(data_t, data_t, data_t) 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/library_root.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Library API 3 | =========== 4 | 5 | .. include:: class_view_hierarchy.rst 6 | 7 | .. include:: file_view_hierarchy.rst 8 | 9 | .. include:: unabridged_api.rst 10 | 11 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_DataTypeHandling.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_DataTypeHandling.h: 3 | 4 | Program Listing for File DataTypeHandling.h 5 | =========================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/DataTypeHandling.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef DATATYPEHANDLING_H_ 14 | #define DATATYPEHANDLING_H_ 15 | 16 | #include 17 | 18 | // Float data-typed used in the entire project. If you find a hardcoded "float" / "double" its probably a good idea to replace it with data_t 19 | typedef double data_t; 20 | 21 | // Index data-typed used in the entire project. If you find a hardcoded "size_t" / "unsigned int" etc. its probably a good idea to replace it with idx_t 22 | typedef long idx_t; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_Greedy.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_Greedy.h: 3 | 4 | Program Listing for File Greedy.h 5 | ================================= 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/Greedy.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef GREEDY_H 14 | #define GREEDY_H 15 | 16 | #include "DataTypeHandling.h" 17 | #include "SubmodularOptimizer.h" 18 | #include 19 | #include 20 | 21 | class Greedy : public SubmodularOptimizer { 22 | public: 23 | 24 | Greedy(unsigned int K, SubmodularFunction & f) : SubmodularOptimizer(K,f) {} 25 | 26 | 27 | Greedy(unsigned int K, std::function> const &)> f) : SubmodularOptimizer(K,f) {} 28 | 29 | void fit(std::vector> const & X, std::vector const & ids, unsigned int iterations = 1) { 30 | //void fit(std::vector> const & X, unsigned int iterations = 1) { 31 | std::vector remaining(X.size()); 32 | std::iota(remaining.begin(), remaining.end(), 0); 33 | data_t fcur = 0; 34 | 35 | while(solution.size() < K && remaining.size() > 0) { 36 | std::vector fvals; 37 | fvals.reserve(remaining.size()); 38 | 39 | // Technically the Greedy algorithms picks that element with largest gain. This is equivalent to picking that 40 | // element which results in the largest function value. There is no need to explicitly compute the gain 41 | for (auto i : remaining) { 42 | data_t ftmp = f->peek(solution, X[i], solution.size()); 43 | fvals.push_back(ftmp); 44 | } 45 | 46 | unsigned int max_element = std::distance(fvals.begin(),std::max_element(fvals.begin(), fvals.end())); 47 | fcur = fvals[max_element]; 48 | unsigned int max_idx = remaining[max_element]; 49 | 50 | // Copy new vector into solution vector 51 | f->update(solution, X[max_idx], solution.size()); 52 | //solution.push_back(std::vector(X[max_idx])); 53 | solution.push_back(X[max_idx]); 54 | if (ids.size() >= max_idx) { 55 | this->ids.push_back(max_idx); 56 | } 57 | remaining.erase(remaining.begin()+max_element); 58 | } 59 | 60 | fval = fcur; 61 | is_fitted = true; 62 | } 63 | 64 | void fit(std::vector> const & X, unsigned int iterations = 1) { 65 | std::vector ids; 66 | fit(X,ids,iterations); 67 | } 68 | 69 | 70 | void next(std::vector const &x, std::optional id = std::nullopt) { 71 | throw std::runtime_error("Greedy does not support streaming data, please use fit()."); 72 | } 73 | 74 | 75 | }; 76 | 77 | #endif // GREEDY_H 78 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_IndependentSetImprovement.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_IndependentSetImprovement.h: 3 | 4 | Program Listing for File IndependentSetImprovement.h 5 | ==================================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/IndependentSetImprovement.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef INDEPENDENT_SET_IMPROVEMENT_H 14 | #define INDEPENDENT_SET_IMPROVEMENT_H 15 | 16 | #include "DataTypeHandling.h" 17 | #include "SubmodularOptimizer.h" 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | class IndependentSetImprovement : public SubmodularOptimizer { 28 | 29 | protected: 30 | 31 | struct Pair { 32 | // The weight 33 | data_t weight; 34 | 35 | // The index in the summary 36 | unsigned int idx; 37 | 38 | Pair(data_t _weight, unsigned int _idx) { 39 | weight = _weight; 40 | idx = _idx; 41 | } 42 | 43 | bool operator < (const Pair &other) const { 44 | return weight > other.weight; 45 | } 46 | }; 47 | 48 | // The priority queue 49 | std::priority_queue weights; 50 | public: 51 | 52 | IndependentSetImprovement(unsigned int K, SubmodularFunction & f) : SubmodularOptimizer(K,f) { 53 | } 54 | 55 | IndependentSetImprovement(unsigned int K, std::function> const &)> f) : SubmodularOptimizer(K,f) { 56 | } 57 | 58 | 59 | void next(std::vector const &x, std::optional const id = std::nullopt) { 60 | unsigned int Kcur = solution.size(); 61 | 62 | if (Kcur < K) { 63 | data_t w = f->peek(solution, x, solution.size()) - fval; 64 | f->update(solution, x, solution.size()); 65 | solution.push_back(x); 66 | if (id.has_value()) ids.push_back(id.value()); 67 | weights.push(Pair(w, Kcur)); 68 | } else { 69 | Pair to_replace = weights.top(); 70 | data_t w = f->peek(solution, x, solution.size()) - fval; 71 | if (w > 2*to_replace.weight) { 72 | f->update(solution, x, to_replace.idx); 73 | solution[to_replace.idx] = x; 74 | if (id.has_value()) ids[to_replace.idx] = id.value(); 75 | weights.pop(); 76 | weights.push(Pair(w, to_replace.idx)); 77 | } 78 | } 79 | fval = f->operator()(solution); 80 | is_fitted = true; 81 | } 82 | }; 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_Random.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_Random.h: 3 | 4 | Program Listing for File Random.h 5 | ================================= 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/Random.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef RANDOM_H 14 | #define RANDOM_H 15 | 16 | #include "DataTypeHandling.h" 17 | #include "SubmodularOptimizer.h" 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | class Random : public SubmodularOptimizer { 25 | protected: 26 | unsigned int cnt = 0; 27 | std::default_random_engine generator; 28 | 29 | static inline std::vector sample_without_replacement(int k, int N, std::default_random_engine& gen) { 30 | // Create an unordered set to store the samples 31 | std::unordered_set samples; 32 | 33 | // Sample and insert values into samples 34 | for (int r = N - k; r < N; ++r) { 35 | idx_t v = std::uniform_int_distribution<>(1, r)(gen); 36 | if (!samples.insert(v).second) samples.insert(r - 1); 37 | } 38 | 39 | // Copy samples into vector 40 | std::vector result(samples.begin(), samples.end()); 41 | 42 | // Shuffle vector 43 | std::shuffle(result.begin(), result.end(), gen); 44 | 45 | return result; 46 | }; 47 | 48 | public: 49 | 50 | Random(unsigned int K, SubmodularFunction & f, unsigned long seed = 0) : SubmodularOptimizer(K,f), generator(seed) {} 51 | 52 | Random(unsigned int K, std::function> const &)> f, unsigned long seed = 0) : SubmodularOptimizer(K,f), generator(seed) {} 53 | 54 | void fit(std::vector> const & X, std::vector const & ids, unsigned int iterations = 1) { 55 | if (X.size() < K) { 56 | K = X.size(); 57 | } 58 | std::vector indices = sample_without_replacement(K, X.size(), generator); 59 | 60 | for (auto i : indices) { 61 | f->update(solution, X[i], solution.size()); 62 | solution.push_back(X[i]); 63 | if (ids.size() >= i) { 64 | this->ids.push_back(ids[i]); 65 | } 66 | //solution.push_back(std::vector(X[i])); 67 | } 68 | 69 | cnt = X.size(); 70 | fval = f->operator()(solution); 71 | is_fitted = true; 72 | } 73 | 74 | void fit(std::vector> const & X, unsigned int iterations = 1) { 75 | std::vector ids; 76 | fit(X,ids,iterations); 77 | } 78 | 79 | void next(std::vector const &x, std::optional const id = std::nullopt) { 80 | if (solution.size() < K) { 81 | // Just add the first K elements 82 | f->update(solution, x, solution.size()); 83 | solution.push_back(x); 84 | if (id.has_value()) ids.push_back(id.value()); 85 | } else { 86 | // Sample the replacement-index with decreasing probability 87 | unsigned int j = std::uniform_int_distribution<>(1, cnt)(generator); 88 | if (j <= K) { 89 | f->update(solution, x, j - 1); 90 | if (id.has_value()) ids[j-1] = id.value(); 91 | solution[j - 1] = x; 92 | } 93 | } 94 | 95 | // Update the current function value 96 | fval = f->operator()(solution); 97 | is_fitted = true; 98 | ++cnt; 99 | } 100 | }; 101 | 102 | #endif // RANDOM_H 103 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_SieveStreamingPP.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_SieveStreamingPP.h: 3 | 4 | Program Listing for File SieveStreamingPP.h 5 | =========================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/SieveStreamingPP.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef SIEVESTREAMINGPP_H 14 | #define SIEVESTREAMINGPP_H 15 | 16 | #include "DataTypeHandling.h" 17 | #include "SieveStreaming.h" 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | class SieveStreamingPP : public SubmodularOptimizer { 24 | private: 25 | 26 | class Sieve : public SubmodularOptimizer { 27 | public: 28 | // The threshold 29 | data_t threshold; 30 | 31 | Sieve(unsigned int K, SubmodularFunction & f, data_t threshold) : SubmodularOptimizer(K,f), threshold(threshold) {} 32 | 33 | Sieve(unsigned int K, std::function> const &)> f, data_t threshold) : SubmodularOptimizer(K,f), threshold(threshold) { 34 | } 35 | 36 | void fit(std::vector> const & X, unsigned int iterations = 1) { 37 | throw std::runtime_error("Sieves are only meant to be used through SieveStreaming and therefore do not require the implementation of `fit'"); 38 | } 39 | 40 | void next(std::vector const &x, std::optional const id = std::nullopt) { 41 | unsigned int Kcur = solution.size(); 42 | if (Kcur < K) { 43 | data_t fdelta = f->peek(solution, x, solution.size()) - fval; 44 | 45 | if (fdelta >= threshold) { 46 | f->update(solution, x, solution.size()); 47 | solution.push_back(x); 48 | if (id.has_value()) ids.push_back(id.value()); 49 | fval += fdelta; 50 | } 51 | } 52 | is_fitted = true; 53 | } 54 | }; 55 | 56 | // The lower bound from which threshold should be sampled. This is per default 0 and will be changed when a new, better lower_bound occurs 57 | data_t lower_bound; 58 | 59 | // Maximum singleton item value 60 | data_t m; 61 | 62 | // Epsilon parameter used to sample thresholds according to the "SieveStreaming" rule 63 | data_t epsilon; 64 | 65 | public: 66 | // The list of sieves managed by SieveStreamingPP 67 | std::vector> sieves; 68 | 69 | SieveStreamingPP(unsigned int K, SubmodularFunction & f, data_t m, data_t epsilon) 70 | : SubmodularOptimizer(K,f), lower_bound(0), m(m), epsilon(epsilon) { 71 | // std::vector ts = thresholds(m/(1.0 + epsilon), K * m, epsilon); 72 | 73 | // for (auto t : ts) { 74 | // sieves.push_back(std::make_unique(K, *this->f, t)); 75 | // } 76 | } 77 | 78 | SieveStreamingPP(unsigned int K, std::function> const &)> f, data_t m, data_t epsilon) 79 | : SubmodularOptimizer(K,f), lower_bound(0), m(m), epsilon(epsilon) { 80 | // std::vector ts = thresholds(m/(1.0 + epsilon), K * m, epsilon); 81 | 82 | // for (auto t : ts) { 83 | // sieves.push_back(std::make_unique(K, *this->f, t)); 84 | // } 85 | } 86 | 87 | unsigned int get_num_candidate_solutions() const { 88 | return sieves.size(); 89 | } 90 | 91 | unsigned long get_num_elements_stored() const { 92 | unsigned long num_elements = 0; 93 | for (auto const & s : sieves) { 94 | num_elements += s->get_solution().size(); 95 | } 96 | 97 | return num_elements; 98 | } 99 | 100 | void next(std::vector const &x, std::optional const id = std::nullopt) { 101 | if (lower_bound != fval || sieves.size() == 0) { 102 | lower_bound = fval; 103 | data_t tau_min = std::max(lower_bound, m) / static_cast(2.0*K); 104 | auto no_sieves_before = sieves.size(); 105 | 106 | auto res = std::remove_if(sieves.begin(), sieves.end(), 107 | [tau_min](auto const &s) { return s->threshold < tau_min; } 108 | ); 109 | sieves.erase(res, sieves.end()); 110 | 111 | if (no_sieves_before > sieves.size() || no_sieves_before == 0) { 112 | std::vector ts = thresholds(tau_min/(1.0 + epsilon), K * m, epsilon); 113 | 114 | for (auto t : ts) { 115 | bool any = std::any_of(sieves.begin(), sieves.end(), 116 | [t](auto const &s){ return s->threshold == t; } 117 | ); 118 | if (!any) { 119 | sieves.push_back(std::make_unique(K, *f, t)); 120 | } 121 | } 122 | } 123 | } 124 | 125 | // std::cout << sieves.size() << std::endl; 126 | for (auto &s : sieves) { 127 | s->next(x, id); 128 | if (s->get_fval() > fval) { 129 | fval = s->get_fval(); 130 | // TODO THIS IS A COPY AT THE MOMENT 131 | solution = s->solution; 132 | } 133 | } 134 | is_fitted = true; 135 | }; 136 | }; 137 | 138 | #endif 139 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_SubmodularFunction.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_SubmodularFunction.h: 3 | 4 | Program Listing for File SubmodularFunction.h 5 | ============================================= 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/SubmodularFunction.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef SUBMODULARFUNCTION_H 14 | #define SUBMODULARFUNCTION_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "DataTypeHandling.h" 24 | 25 | 26 | class SubmodularFunction { 27 | public: 28 | // TODO THIS SHOULD NOT BE NEEDED. WHY DO WE HAVE THIS?!?! 29 | virtual data_t operator()(std::vector> const &cur_solution) const = 0; 30 | 31 | virtual data_t peek(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) = 0; 32 | 33 | virtual void update(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) = 0; 34 | 35 | virtual std::shared_ptr clone() const = 0; 36 | 37 | virtual ~SubmodularFunction() {} 38 | }; 39 | 40 | class SubmodularFunctionWrapper : public SubmodularFunction { 41 | protected: 42 | // The std::function which implements the actual submodular function 43 | std::function> const &)> f; 44 | 45 | public: 46 | 47 | SubmodularFunctionWrapper(std::function> const &)> f) : f(f) {} 48 | 49 | data_t operator()(std::vector> const &cur_solution) const { 50 | return f(cur_solution); 51 | } 52 | 53 | data_t peek(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) { 54 | std::vector> tmp(cur_solution); 55 | 56 | if (pos >= cur_solution.size()) { 57 | tmp.push_back(x); 58 | } else { 59 | tmp[pos] = x; 60 | } 61 | 62 | data_t ftmp = this->operator()(tmp); 63 | return ftmp; 64 | } 65 | 66 | void update(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) {} 67 | 68 | std::shared_ptr clone() const { 69 | return std::shared_ptr(new SubmodularFunctionWrapper(f)); 70 | } 71 | 72 | ~SubmodularFunctionWrapper() {} 73 | }; 74 | 75 | #endif // SUBMODULARFUNCTION_H 76 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_SubmodularOptimizer.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_SubmodularOptimizer.h: 3 | 4 | Program Listing for File SubmodularOptimizer.h 5 | ============================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/SubmodularOptimizer.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef SUBMODULAROPTIMIZER_H 14 | #define SUBMODULAROPTIMIZER_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "SubmodularFunction.h" 26 | 27 | class SubmodularOptimizer { 28 | private: 29 | 30 | protected: 31 | // The cardinality constraint you of the optimization problem, that is the number of items selected. 32 | unsigned int K; 33 | 34 | //std::unique_ptr f; 35 | std::shared_ptr f; 36 | 37 | // true if fit() or next() has been called. 38 | bool is_fitted; 39 | 40 | public: 41 | // The current solution of this optimizer 42 | std::vector> solution; 43 | std::vector ids; 44 | 45 | // The current function value of this optimizer 46 | data_t fval; 47 | 48 | SubmodularOptimizer(unsigned int K, SubmodularFunction & f) 49 | : K(K), f(f.clone()) { 50 | is_fitted = false; 51 | fval = 0; 52 | // assert(("K should at-least be 1 or greater.", K >= 1)); 53 | } 54 | 55 | SubmodularOptimizer(unsigned int K, std::function> const &)> f) 56 | : K(K), f(std::unique_ptr(new SubmodularFunctionWrapper(f))) { 57 | is_fitted = false; 58 | fval = 0; 59 | // assert(("K should at-least be 1 or greater.", K >= 1)); 60 | } 61 | 62 | virtual void fit(std::vector> const & X, std::vector const & ids, unsigned int iterations = 1) { 63 | assert(X.size() == ids.size()); 64 | 65 | for (unsigned int i = 0; i < iterations; ++i) { 66 | for (unsigned int j = 0; j < X.size(); ++j) { 67 | next(X[j], ids[j]); 68 | // It is very likely that the lower threshold sieves will fill up early and thus we will probably find a full sieve early on 69 | // This likely results in a very bad function value. However, only iterating once over the entire data-set may lead to a very 70 | // weird situation where no sieve is full yet (e.g. for very small datasets). Thus, we re-iterate as often as needed and early 71 | // exit if we have seen every item at-least once 72 | if (solution.size() == K && i > 0) { 73 | return; 74 | } 75 | } 76 | } 77 | } 78 | 79 | virtual void fit(std::vector> const & X, unsigned int iterations = 1) { 80 | for (unsigned int i = 0; i < iterations; ++i) { 81 | for (auto &x : X) { 82 | next(x); 83 | // It is very likely that the lower threshold sieves will fill up early and thus we will probably find a full sieve early on 84 | // This likely results in a very bad function value. However, only iterating once over the entire data-set may lead to a very 85 | // weird situation where no sieve is full yet (e.g. for very small datasets). Thus, we re-iterate as often as needed and early 86 | // exit if we have seen every item at-least once 87 | if (solution.size() == K && i > 0) { 88 | return; 89 | } 90 | } 91 | } 92 | } 93 | 94 | virtual void next(std::vector const &x, std::optional const id = std::nullopt) = 0; 95 | 96 | 97 | std::vector>const & get_solution() const { 98 | if (!this->is_fitted) { 99 | throw std::runtime_error("Optimizer was not fitted yet! Please call fit() or next() before calling get_solution()"); 100 | } else { 101 | return solution; 102 | } 103 | } 104 | 105 | std::vector const &get_ids() const { 106 | if (!this->is_fitted) { 107 | throw std::runtime_error("Optimizer was not fitted yet! Please call fit() or next() before calling get_ids()"); 108 | } else { 109 | return ids; 110 | } 111 | } 112 | 113 | virtual unsigned int get_num_candidate_solutions() const { 114 | return 1; 115 | } 116 | 117 | virtual unsigned long get_num_elements_stored() const { 118 | return this->get_solution().size(); 119 | } 120 | 121 | data_t get_fval() const { 122 | return fval; 123 | } 124 | 125 | virtual ~SubmodularOptimizer() {} 126 | }; 127 | 128 | #endif // THREESIEVES_SUBMODULAROPTIMIZER_H 129 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_ThreeSieves.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_ThreeSieves.h: 3 | 4 | Program Listing for File ThreeSieves.h 5 | ====================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/ThreeSieves.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef THREESIEVES_H 14 | #define THREESIEVES_H 15 | 16 | #include "DataTypeHandling.h" 17 | #include "SubmodularOptimizer.h" 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | class ThreeSieves : public SubmodularOptimizer { 25 | 26 | public: 27 | enum THRESHOLD_STRATEGY { 28 | SIEVE, 29 | CONSTANT 30 | }; 31 | 32 | // the current threshold 33 | data_t threshold; 34 | 35 | // the epsilon parameter for the threshold strategy 36 | data_t epsilon; 37 | 38 | // the actual threshold strategy 39 | THRESHOLD_STRATEGY strategy; 40 | 41 | // maximum number of tries 42 | unsigned int T; 43 | 44 | // current number of tries 45 | unsigned int t; 46 | 47 | ThreeSieves(unsigned int K, SubmodularFunction & f, data_t m, data_t epsilon, std::string const & strategy, unsigned int T) : SubmodularOptimizer(K,f), threshold(K*m), epsilon(epsilon),T(T), t(0) { 48 | // assert(("T should at-least be 1 or greater.", T >= 1)); 49 | std::string lower_case(strategy); 50 | std::transform(lower_case.begin(), lower_case.end(), lower_case.begin(), 51 | [](unsigned char c){ return std::tolower(c); }); 52 | 53 | if (lower_case == "sieve") { 54 | this->strategy = THRESHOLD_STRATEGY::SIEVE; 55 | } else { 56 | this->strategy = THRESHOLD_STRATEGY::CONSTANT; 57 | } 58 | } 59 | 60 | ThreeSieves(unsigned int K, std::function> const &)> f, data_t m, data_t epsilon, std::string const & strategy, unsigned int T) : SubmodularOptimizer(K,f), threshold(K*m), epsilon(epsilon), T(T), t(0) { 61 | std::string lower_case(strategy); 62 | std::transform(lower_case.begin(), lower_case.end(), lower_case.begin(), 63 | [](unsigned char c){ return std::tolower(c); }); 64 | 65 | if (lower_case == "sieve") { 66 | this->strategy = THRESHOLD_STRATEGY::SIEVE; 67 | } else { 68 | this->strategy = THRESHOLD_STRATEGY::CONSTANT; 69 | } 70 | // assert(("T should at-least be 1 or greater.", T >= 1)); 71 | } 72 | 73 | ThreeSieves(unsigned int K, SubmodularFunction & f, data_t m, data_t epsilon, THRESHOLD_STRATEGY strategy, unsigned int T) : SubmodularOptimizer(K,f), threshold(K*m), epsilon(epsilon), strategy(strategy), T(T), t(0) { 74 | // assert(("T should at-least be 1 or greater.", T >= 1)); 75 | } 76 | 77 | ThreeSieves(unsigned int K, std::function> const &)> f, data_t m, data_t epsilon, THRESHOLD_STRATEGY strategy, unsigned int T) : SubmodularOptimizer(K,f), threshold(K*m), epsilon(epsilon), strategy(strategy), T(T), t(0) { 78 | // assert(("T should at-least be 1 or greater.", T >= 1)); 79 | } 80 | 81 | void next(std::vector const &x, std::optional const id = std::nullopt) { 82 | unsigned int Kcur = solution.size(); 83 | if (Kcur < K) { 84 | if (t >= T) { 85 | switch(strategy) { 86 | case THRESHOLD_STRATEGY::SIEVE: 87 | { 88 | data_t tmp = std::log(threshold) / std::log(1.0 + epsilon); 89 | int i; 90 | if (tmp == std::floor(tmp) || std::abs(tmp - std::floor(tmp)) < 1e-7) { 91 | i = std::floor(tmp) - 1; 92 | } else { 93 | i = std::floor(tmp); 94 | } 95 | threshold = std::pow(1+epsilon, i); 96 | break; 97 | } 98 | case THRESHOLD_STRATEGY::CONSTANT: 99 | { 100 | threshold -= threshold - epsilon; 101 | break; 102 | } 103 | } 104 | t = 0; 105 | } 106 | 107 | data_t fdelta = f->peek(solution, x, solution.size()) - fval; 108 | data_t tau = (threshold / 2.0 - fval) / static_cast(K - Kcur); 109 | 110 | if (fdelta >= tau) { 111 | f->update(solution, x, solution.size()); 112 | solution.push_back(x); 113 | if (id.has_value()) ids.push_back(id.value()); 114 | fval += fdelta; 115 | t = 0; 116 | } else { 117 | ++t; 118 | } 119 | } 120 | is_fitted = true; 121 | } 122 | }; 123 | 124 | #endif 125 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_functions_FastIVM.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_functions_FastIVM.h: 3 | 4 | Program Listing for File FastIVM.h 5 | ================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/functions/FastIVM.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef FAST_IVM_H 14 | #define FAST_IVM_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "DataTypeHandling.h" 24 | #include "SubmodularFunction.h" 25 | #include "functions/IVM.h" 26 | 27 | class FastIVM : public IVM { 28 | private: 29 | 30 | protected: 31 | // Number of items added so far. Required to maintain consistent access to kmat and L 32 | unsigned int added; 33 | 34 | // The kernel matrix \Sigma. 35 | Matrix kmat; 36 | 37 | // The lower triangle matrix of the cholesky decomposition. Note that it stores K x K elements, even though only 1/2 * K * K + K are required for a lower triangle matrix 38 | Matrix L; 39 | 40 | // The current function value 41 | data_t fval; 42 | 43 | public: 44 | 45 | FastIVM(unsigned int K, Kernel const &kernel, data_t sigma) : IVM(kernel, sigma), kmat(K+1), L(K+1) { 46 | added = 0; 47 | fval = 0; 48 | } 49 | 50 | FastIVM(unsigned int K, std::function const &, std::vector const &)> kernel, data_t sigma) 51 | : IVM(kernel, sigma), kmat(K+1), L(K+1) { 52 | added = 0; 53 | fval = 0; 54 | } 55 | 56 | data_t peek(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) override { 57 | if (pos >= added) { 58 | // Peek function value for last line 59 | 60 | for (unsigned int i = 0; i < added; ++i) { 61 | data_t kval = kernel->operator()(cur_solution[i], x); 62 | 63 | kmat(i, added) = kval; 64 | kmat(added, i) = kval; 65 | } 66 | data_t kval = kernel->operator()(x, x); 67 | kmat(added, added) = sigma * 1.0 + kval; 68 | 69 | for (size_t j = 0; j <= added; j++) { 70 | //data_t s = std::inner_product(&L[added * K], &L[added * K] + j, &L[j * K], static_cast(0)); 71 | data_t s = std::inner_product(&L(added, 0), &L(added, j), &L(j,0), static_cast(0)); 72 | if (added == j) { 73 | L(added, j) = std::sqrt(kmat(added, j) - s); 74 | } else { 75 | L(added, j) = (1.0f / L(j, j) * (kmat(added, j) - s)); 76 | } 77 | L(j, added) = L(added, j); // Symmetric update 78 | } 79 | return fval + 2.0 * std::log(L(added, added)); 80 | } else { 81 | Matrix tmp(kmat, added); 82 | for (unsigned int i = 0; i < cur_solution.size(); ++i) { 83 | if (i == pos) { 84 | data_t kval = kernel->operator()(x, x); 85 | tmp(pos, pos) = sigma * 1.0 + kval; 86 | } else { 87 | data_t kval = kernel->operator()(cur_solution[i], x); 88 | tmp(i, pos) = kval; 89 | tmp(pos, i) = kval; 90 | } 91 | } 92 | 93 | return log_det(tmp); 94 | } 95 | } 96 | 97 | void update(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) override { 98 | if (pos >= added) { 99 | // TODO We often have the peek () -> update() pattern. This call can be optimized since we now basically peek twice 100 | fval = peek(cur_solution, x, pos); 101 | added++; 102 | } else { 103 | for (unsigned int i = 0; i < cur_solution.size(); ++i) { 104 | if (i == pos) { 105 | data_t kval = kernel->operator()(x, x); 106 | kmat(pos, pos) = sigma * 1.0 + kval; 107 | } else { 108 | data_t kval = kernel->operator()(cur_solution[i], x); 109 | kmat(i, pos) = kval; 110 | kmat(pos, i) = kval; 111 | } 112 | } 113 | L = cholesky(kmat, added); 114 | fval = log_det_from_cholesky(L); 115 | } 116 | 117 | } 118 | 119 | data_t operator()(std::vector> const &cur_solution) const override { 120 | return fval; 121 | } 122 | 123 | std::shared_ptr clone() const override { 124 | // We want to store k elements. To allow for efficient peeking we will reserve space for K + 1 elements in kmat and L. 125 | // Thus we need to call the constructor with one element less 126 | return std::make_shared(kmat.size() - 1, *kernel, sigma); 127 | } 128 | }; 129 | 130 | #endif // FAST_IVM_H 131 | 132 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_functions_IVM.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_functions_IVM.h: 3 | 4 | Program Listing for File IVM.h 5 | ============================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/functions/IVM.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef INFORMATIVE_VECTOR_MACHINE_H 14 | #define INFORMATIVE_VECTOR_MACHINE_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include "DataTypeHandling.h" 22 | #include "SubmodularFunction.h" 23 | #include "kernels/Kernel.h" 24 | #include "functions/Matrix.h" 25 | 26 | class IVM : public SubmodularFunction { 27 | protected: 28 | 29 | inline Matrix compute_kernel(std::vector> const &X, data_t sigma) const { 30 | unsigned int K = X.size(); 31 | Matrix mat(K); 32 | 33 | for (unsigned int i = 0; i < K; ++i) { 34 | for (unsigned int j = i; j < K; ++j) { 35 | data_t kval = kernel->operator()(X[i], X[j]); 36 | if (i == j) { 37 | mat(i,j) = sigma * 1.0 + kval; 38 | } else { 39 | mat(i,j) = kval; 40 | mat(j,i) = kval; 41 | } 42 | } 43 | } 44 | 45 | // TODO CHECK IF THIS USES MOVE 46 | return mat; 47 | } 48 | 49 | // The kernel 50 | std::shared_ptr kernel; 51 | 52 | // The scaling constant 53 | data_t sigma; 54 | 55 | public: 56 | 57 | IVM(Kernel const &kernel, data_t sigma) : kernel(kernel.clone()), sigma(sigma) { 58 | assert(("The sigma value of the IVM should be greater than 0!", sigma > 0)); 59 | } 60 | 61 | IVM(std::function const &, std::vector const &)> kernel, data_t sigma) 62 | : kernel(std::unique_ptr(new KernelWrapper(kernel))), sigma(sigma) { 63 | assert(("The sigma value of the IVM should be greater than 0!", sigma > 0)); 64 | } 65 | 66 | data_t peek(std::vector> const& cur_solution, std::vector const &x, unsigned int pos) override { 67 | std::vector> tmp(cur_solution); 68 | 69 | if (pos >= cur_solution.size()) { 70 | tmp.push_back(x); 71 | } else { 72 | tmp[pos] = x; 73 | } 74 | 75 | data_t ftmp = this->operator()(tmp); 76 | return ftmp; 77 | } 78 | 79 | void update(std::vector> const &cur_solution, std::vector const &x, unsigned int pos) override {} 80 | 81 | data_t operator()(std::vector> const &X) const override { 82 | // This is the most basic implementations which recomputes everything with each call 83 | // I would not use this for any real-world problems. 84 | 85 | Matrix kernel_mat = compute_kernel(X, sigma); 86 | return log_det(kernel_mat); 87 | } 88 | 89 | std::shared_ptr clone() const override { 90 | return std::make_shared(*kernel, sigma); 91 | } 92 | 93 | ~IVM() {/* Nothing do to, since the shared_pointer should clean-up itself*/ } 94 | }; 95 | 96 | #endif // INFORMATIVE_VECTOR_MACHINE_H 97 | 98 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_functions_Matrix.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_functions_Matrix.h: 3 | 4 | Program Listing for File Matrix.h 5 | ================================= 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/functions/Matrix.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef MATRIX_H 14 | #define MATRIX_H 15 | 16 | #include 17 | #include 18 | 19 | #include "DataTypeHandling.h" 20 | 21 | class Matrix { 22 | private: 23 | 24 | // The size of the matrix 25 | unsigned int N; 26 | 27 | // There are two main reasons why we use an std::vector here instead of a raw pointer 28 | // (1) std::vector is the more modern c++ style and raw pointers are somewhat discouraged (see next comment) 29 | // (2) It turns our there is a good reason why we should not use raw pointers. It makes it really difficult to implement appropriate copy / move constructors. I would sometimes run into weird memory issues, because the compiler provided an implicit copy / move c'tor. Of course it would be possible to properly implement move/copy/assignment operators (rule of 0/3/5 https://en.cppreference.com/w/cpp/language/rule_of_three) but that's more work than I need. 30 | std::vector data; 31 | 32 | public: 33 | 34 | Matrix(Matrix const &other, unsigned int N_sub) : N(N_sub), data(N_sub * N_sub) { 35 | for (unsigned int i = 0; i < N_sub; ++i) { 36 | for (unsigned int j = 0; j < N_sub; ++j) { 37 | this->operator()(i, j) = other(i,j); 38 | } 39 | } 40 | } 41 | 42 | Matrix(unsigned int _size) : N(_size), data(_size * _size, 0){} 43 | 44 | ~Matrix() { } 45 | 46 | inline unsigned int size() const { return N; } 47 | 48 | void replace_row(unsigned int row, data_t const * const x) { 49 | for (unsigned int i = 0; i < N; ++i) { 50 | this->operator()(i, row) = x[i]; 51 | } 52 | } 53 | 54 | void replace_column(unsigned int col, data_t const * const x) { 55 | for (unsigned int i = 0; i < N; ++i) { 56 | this->operator()(col, i) = x[i]; 57 | } 58 | } 59 | 60 | void rank_one_update(unsigned int j, data_t const * const x) { 61 | for (unsigned int i = 0; i < N; ++i) { 62 | if (j == i) { 63 | this->operator()(i,i) += x[i]; 64 | } else { 65 | this->operator()(i,j) += x[i]; 66 | this->operator()(j,i) += x[i]; 67 | } 68 | } 69 | } 70 | 71 | data_t & operator [](int i) {return data[i*N];} 72 | 73 | data_t operator [](int i) const {return data[i*N];} 74 | 75 | data_t & operator()(int i, int j) { return data[i*N+j]; } 76 | 77 | data_t operator()(int i, int j) const { return data[i*N+j]; } 78 | }; 79 | 80 | inline std::string to_string(Matrix const &mat, unsigned int N_sub) { 81 | std::string s = "["; 82 | 83 | for (unsigned int i = 0; i < N_sub; ++i) { 84 | s += "["; 85 | for (unsigned int j = 0; j < N_sub; ++j) { 86 | if (j < N_sub - 1) { 87 | s += std::to_string(mat(i,j)) + ","; 88 | } else { 89 | s += std::to_string(mat(i,j)); 90 | } 91 | } 92 | 93 | if (i < N_sub - 1) { 94 | s += "],\n"; 95 | } else { 96 | s += "]"; 97 | } 98 | } 99 | 100 | return s + "]"; 101 | } 102 | 103 | inline std::string to_string(Matrix const &mat) { 104 | return to_string(mat,mat.size()); 105 | } 106 | 107 | inline Matrix cholesky(Matrix const &in, unsigned int N_sub) { 108 | Matrix L(in, N_sub); 109 | 110 | for (unsigned int j = 0; j < N_sub; ++j) { 111 | data_t sum = 0.0; 112 | 113 | for (unsigned int k = 0; k < j; ++k) { 114 | sum += L(j,k)*L(j,k); 115 | } 116 | 117 | L(j,j) = std::sqrt(in(j,j) - sum); 118 | 119 | for (unsigned int i = j + 1; i < N_sub; ++i) { 120 | data_t sum = 0.0; 121 | 122 | for (unsigned int k = 0; k < j; ++k) { 123 | sum += L(i,k) * L(j,k); 124 | } 125 | L(i,j) = (in(i,j) - sum) / L(j,j); 126 | } 127 | } 128 | return L; 129 | } 130 | 131 | inline Matrix cholesky(Matrix const &in) {return cholesky(in, in.size()); } 132 | 133 | inline data_t log_det_from_cholesky(Matrix const &L) { 134 | data_t det = 0; 135 | 136 | for (size_t i = 0; i < L.size(); ++i) { 137 | det += std::log(L(i,i)); 138 | } 139 | 140 | return 2*det; 141 | } 142 | 143 | inline data_t log_det(Matrix const &mat, unsigned int N_sub) { 144 | Matrix L = cholesky(mat, N_sub); 145 | return log_det_from_cholesky(L); 146 | } 147 | 148 | inline data_t log_det(Matrix const &mat) { 149 | return log_det(mat, mat.size()); 150 | } 151 | 152 | #endif 153 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_functions_kernels_Kernel.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_functions_kernels_Kernel.h: 3 | 4 | Program Listing for File Kernel.h 5 | ================================= 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/functions/kernels/Kernel.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef KERNEL_H 14 | #define KERNEL_H 15 | 16 | #include 17 | #include "DataTypeHandling.h" 18 | 19 | class Kernel { 20 | 21 | public: 22 | 23 | virtual inline data_t operator()(const std::vector& x1, const std::vector& x2) const = 0; 24 | 25 | virtual std::shared_ptr clone() const = 0; 26 | 27 | virtual ~Kernel() {} 28 | }; 29 | 30 | class KernelWrapper : public Kernel { 31 | protected: 32 | std::function const &, std::vector const &)> f; 33 | 34 | public: 35 | 36 | KernelWrapper(std::function const &, std::vector const &)> f) : f(f) {} 37 | 38 | inline data_t operator()(const std::vector& x1, const std::vector& x2) const override { 39 | return f(x1, x2); 40 | } 41 | 42 | std::shared_ptr clone() const override { 43 | return std::shared_ptr(new KernelWrapper(f)); 44 | } 45 | 46 | }; 47 | 48 | #endif // RBF_KERNEL_H 49 | -------------------------------------------------------------------------------- /docs/html/_sources/api/program_listing_file_include_functions_kernels_RBFKernel.h.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _program_listing_file_include_functions_kernels_RBFKernel.h: 3 | 4 | Program Listing for File RBFKernel.h 5 | ==================================== 6 | 7 | |exhale_lsh| :ref:`Return to documentation for file ` (``include/functions/kernels/RBFKernel.h``) 8 | 9 | .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS 10 | 11 | .. code-block:: cpp 12 | 13 | #ifndef RBF_KERNEL_H 14 | #define RBF_KERNEL_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "DataTypeHandling.h" 23 | #include "functions/kernels/Kernel.h" 24 | 25 | /* These are remains of an AVX implementation for the euclidean distance. However, it was not much faster (sometimes slower) 26 | * then the code snippet used from the STL. Also, it only supports float at the moment. 27 | * 28 | */ 29 | // // From https://gist.github.com/matsui528/583925f88fcb08240319030202588c74 30 | // // reads 0 <= d < 4 floats as __m128 31 | // static inline __m128 masked_read (int d, const float *x) { 32 | // assert (0 <= d && d < 4); 33 | // __attribute__((__aligned__(16))) float buf[4] = {0, 0, 0, 0}; 34 | // switch (d) { 35 | // case 3: 36 | // buf[2] = x[2]; 37 | // case 2: 38 | // buf[1] = x[1]; 39 | // case 1: 40 | // buf[0] = x[0]; 41 | // } 42 | // return _mm_load_ps (buf); 43 | // // cannot use AVX2 _mm_mask_set1_epi32 44 | // } 45 | 46 | // template 47 | // T squared_distance(const float * x, const float * y, unsigned int d); 48 | 49 | // template<> 50 | // float squared_distance(const float * x, const float * y, unsigned int d) { 51 | // __m256 msum1 = _mm256_setzero_ps(); 52 | 53 | // while (d >= 8) { 54 | // __m256 mx = _mm256_loadu_ps (x); x += 8; 55 | // __m256 my = _mm256_loadu_ps (y); y += 8; 56 | // const __m256 a_m_b1 = mx - my; 57 | // msum1 += a_m_b1 * a_m_b1; 58 | // d -= 8; 59 | // } 60 | 61 | // __m128 msum2 = _mm256_extractf128_ps(msum1, 1); 62 | // msum2 += _mm256_extractf128_ps(msum1, 0); 63 | 64 | // if (d >= 4) { 65 | // __m128 mx = _mm_loadu_ps (x); x += 4; 66 | // __m128 my = _mm_loadu_ps (y); y += 4; 67 | // const __m128 a_m_b1 = mx - my; 68 | // msum2 += a_m_b1 * a_m_b1; 69 | // d -= 4; 70 | // } 71 | 72 | // if (d > 0) { 73 | // __m128 mx = masked_read (d, x); 74 | // __m128 my = masked_read (d, y); 75 | // __m128 a_m_b1 = mx - my; 76 | // msum2 += a_m_b1 * a_m_b1; 77 | // } 78 | 79 | // msum2 = _mm_hadd_ps (msum2, msum2); 80 | // msum2 = _mm_hadd_ps (msum2, msum2); 81 | // return _mm_cvtss_f32 (msum2); 82 | // } 83 | 84 | // template<> 85 | // double squared_distance(const float * x, const float * y, unsigned int d) { 86 | 87 | // } 88 | 89 | class RBFKernel : public Kernel { 90 | private: 91 | data_t sigma = 1.0; 92 | 93 | data_t scale = 1.0; 94 | 95 | public: 96 | RBFKernel() = default; 97 | 98 | RBFKernel(data_t sigma) : RBFKernel(sigma, 1.0) { 99 | } 100 | 101 | RBFKernel(data_t sigma, data_t scale) : sigma(sigma), scale(scale){ 102 | assert(("The scale of an RBF Kernel should be greater than 0!", scale > 0)); 103 | assert(("The sigma value of an RBF Kernel should be greater than 0!", sigma > 0)); 104 | }; 105 | 106 | inline data_t operator()(const std::vector& x1, const std::vector& x2) const override { 107 | data_t distance = 0; 108 | if (x1 != x2) { 109 | // This is the fastest stl-compatible version I could find / come up with. I am not sure how much 110 | // vectorization this utilizes, but for now this shall be enough 111 | distance = std::inner_product(x1.begin(), x1.end(), x2.begin(), data_t(0), 112 | std::plus(), [](data_t x,data_t y){return (y-x)*(y-x);} 113 | ); 114 | // for (unsigned int i = 0; i < x1.size(); ++i) { 115 | // auto const d = x1[i] - x2[i]; 116 | // distance += d * d; 117 | // } 118 | distance /= sigma; 119 | } 120 | return scale * std::exp(-distance); 121 | } 122 | 123 | std::shared_ptr clone() const override { 124 | return std::shared_ptr(new RBFKernel(sigma, scale)); 125 | } 126 | }; 127 | 128 | #endif // RBF_KERNEL_H 129 | -------------------------------------------------------------------------------- /docs/html/_sources/api/structIndependentSetImprovement_1_1Pair.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_struct_structIndependentSetImprovement_1_1Pair: 2 | 3 | Struct IndependentSetImprovement::Pair 4 | ====================================== 5 | 6 | - Defined in :ref:`file_include_IndependentSetImprovement.h` 7 | 8 | 9 | Nested Relationships 10 | -------------------- 11 | 12 | This struct is a nested type of :ref:`exhale_class_classIndependentSetImprovement`. 13 | 14 | 15 | Struct Documentation 16 | -------------------- 17 | 18 | 19 | .. doxygenstruct:: IndependentSetImprovement::Pair 20 | :members: 21 | :protected-members: 22 | :undoc-members: -------------------------------------------------------------------------------- /docs/html/_sources/api/typedef_DataTypeHandling_8h_1ae08b1e8a0b68c4dd03930dcb7eee61c6.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_typedef_DataTypeHandling_8h_1ae08b1e8a0b68c4dd03930dcb7eee61c6: 2 | 3 | Typedef data_t 4 | ============== 5 | 6 | - Defined in :ref:`file_include_DataTypeHandling.h` 7 | 8 | 9 | Typedef Documentation 10 | --------------------- 11 | 12 | 13 | .. doxygentypedef:: data_t 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/typedef_DataTypeHandling_8h_1aebd6d4f4d1878f967fc3873d39646e74.rst.txt: -------------------------------------------------------------------------------- 1 | .. _exhale_typedef_DataTypeHandling_8h_1aebd6d4f4d1878f967fc3873d39646e74: 2 | 3 | Typedef idx_t 4 | ============= 5 | 6 | - Defined in :ref:`file_include_DataTypeHandling.h` 7 | 8 | 9 | Typedef Documentation 10 | --------------------- 11 | 12 | 13 | .. doxygentypedef:: idx_t 14 | -------------------------------------------------------------------------------- /docs/html/_sources/api/unabridged_api.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | Full API 3 | -------- 4 | 5 | Classes and Structs 6 | ******************* 7 | 8 | 9 | .. toctree:: 10 | :maxdepth: 5 11 | 12 | structIndependentSetImprovement_1_1Pair.rst 13 | 14 | .. toctree:: 15 | :maxdepth: 5 16 | 17 | classFastIVM.rst 18 | 19 | .. toctree:: 20 | :maxdepth: 5 21 | 22 | classGreedy.rst 23 | 24 | .. toctree:: 25 | :maxdepth: 5 26 | 27 | classIndependentSetImprovement.rst 28 | 29 | .. toctree:: 30 | :maxdepth: 5 31 | 32 | classIVM.rst 33 | 34 | .. toctree:: 35 | :maxdepth: 5 36 | 37 | classKernel.rst 38 | 39 | .. toctree:: 40 | :maxdepth: 5 41 | 42 | classKernelWrapper.rst 43 | 44 | .. toctree:: 45 | :maxdepth: 5 46 | 47 | classMatrix.rst 48 | 49 | .. toctree:: 50 | :maxdepth: 5 51 | 52 | classPyKernel.rst 53 | 54 | .. toctree:: 55 | :maxdepth: 5 56 | 57 | classPySubmodularFunction.rst 58 | 59 | .. toctree:: 60 | :maxdepth: 5 61 | 62 | classRandom.rst 63 | 64 | .. toctree:: 65 | :maxdepth: 5 66 | 67 | classRBFKernel.rst 68 | 69 | .. toctree:: 70 | :maxdepth: 5 71 | 72 | classSalsa.rst 73 | 74 | .. toctree:: 75 | :maxdepth: 5 76 | 77 | classSalsa_1_1Dense.rst 78 | 79 | .. toctree:: 80 | :maxdepth: 5 81 | 82 | classSalsa_1_1FixedThreshold.rst 83 | 84 | .. toctree:: 85 | :maxdepth: 5 86 | 87 | classSalsa_1_1HighLowThreshold.rst 88 | 89 | .. toctree:: 90 | :maxdepth: 5 91 | 92 | classSieveStreaming.rst 93 | 94 | .. toctree:: 95 | :maxdepth: 5 96 | 97 | classSieveStreaming_1_1Sieve.rst 98 | 99 | .. toctree:: 100 | :maxdepth: 5 101 | 102 | classSieveStreamingPP.rst 103 | 104 | .. toctree:: 105 | :maxdepth: 5 106 | 107 | classSieveStreamingPP_1_1Sieve.rst 108 | 109 | .. toctree:: 110 | :maxdepth: 5 111 | 112 | classSubmodularFunction.rst 113 | 114 | .. toctree:: 115 | :maxdepth: 5 116 | 117 | classSubmodularFunctionWrapper.rst 118 | 119 | .. toctree:: 120 | :maxdepth: 5 121 | 122 | classSubmodularOptimizer.rst 123 | 124 | .. toctree:: 125 | :maxdepth: 5 126 | 127 | classThreeSieves.rst 128 | 129 | Functions 130 | ********* 131 | 132 | 133 | .. toctree:: 134 | :maxdepth: 5 135 | 136 | function_Matrix_8h_1a6ad25ab35e59ad08b5a13aabfe166a11.rst 137 | 138 | .. toctree:: 139 | :maxdepth: 5 140 | 141 | function_Matrix_8h_1a49f276b01293b9c7cd6ed4bff13dad70.rst 142 | 143 | .. toctree:: 144 | :maxdepth: 5 145 | 146 | function_Matrix_8h_1a2e9d8f00fc452e60c75013b7f37e43cb.rst 147 | 148 | .. toctree:: 149 | :maxdepth: 5 150 | 151 | function_Matrix_8h_1a38ada3e60db87205c68a8cd27bb53754.rst 152 | 153 | .. toctree:: 154 | :maxdepth: 5 155 | 156 | function_Matrix_8h_1a5be908feb53890de249ca868e91435e0.rst 157 | 158 | .. toctree:: 159 | :maxdepth: 5 160 | 161 | function_Python_8cpp_1ab3974db34051dddb4d81e89a8f347071.rst 162 | 163 | .. toctree:: 164 | :maxdepth: 5 165 | 166 | function_SieveStreaming_8h_1a4a3dfc0d6b302bb7a0969f52f70016fe.rst 167 | 168 | .. toctree:: 169 | :maxdepth: 5 170 | 171 | function_Matrix_8h_1aaf9bc56a53b9a334621531b0e32ed04b.rst 172 | 173 | .. toctree:: 174 | :maxdepth: 5 175 | 176 | function_Matrix_8h_1a6742cc24af1c654c44907d62a8bf743e.rst 177 | 178 | Typedefs 179 | ******** 180 | 181 | 182 | .. toctree:: 183 | :maxdepth: 5 184 | 185 | typedef_DataTypeHandling_8h_1ae08b1e8a0b68c4dd03930dcb7eee61c6.rst 186 | 187 | .. toctree:: 188 | :maxdepth: 5 189 | 190 | typedef_DataTypeHandling_8h_1aebd6d4f4d1878f967fc3873d39646e74.rst 191 | -------------------------------------------------------------------------------- /docs/html/_sources/api/unabridged_orphan.rst.txt: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | 4 | Full API 5 | ======== 6 | 7 | Directories 8 | *********** 9 | 10 | 11 | .. toctree:: 12 | :maxdepth: 5 13 | 14 | dir_include.rst 15 | 16 | .. toctree:: 17 | :maxdepth: 5 18 | 19 | dir_include_functions.rst 20 | 21 | .. toctree:: 22 | :maxdepth: 5 23 | 24 | dir_include_functions_kernels.rst 25 | 26 | Files 27 | ***** 28 | 29 | 30 | .. toctree:: 31 | :maxdepth: 5 32 | 33 | file_include_DataTypeHandling.h.rst 34 | 35 | .. toctree:: 36 | :maxdepth: 5 37 | 38 | file_include_functions_FastIVM.h.rst 39 | 40 | .. toctree:: 41 | :maxdepth: 5 42 | 43 | file_include_Greedy.h.rst 44 | 45 | .. toctree:: 46 | :maxdepth: 5 47 | 48 | file_include_IndependentSetImprovement.h.rst 49 | 50 | .. toctree:: 51 | :maxdepth: 5 52 | 53 | file_include_functions_IVM.h.rst 54 | 55 | .. toctree:: 56 | :maxdepth: 5 57 | 58 | file_include_functions_kernels_Kernel.h.rst 59 | 60 | .. toctree:: 61 | :maxdepth: 5 62 | 63 | file_include_functions_Matrix.h.rst 64 | 65 | .. toctree:: 66 | :maxdepth: 5 67 | 68 | file_include_Python.cpp.rst 69 | 70 | .. toctree:: 71 | :maxdepth: 5 72 | 73 | file_include_Random.h.rst 74 | 75 | .. toctree:: 76 | :maxdepth: 5 77 | 78 | file_include_functions_kernels_RBFKernel.h.rst 79 | 80 | .. toctree:: 81 | :maxdepth: 5 82 | 83 | file_include_Salsa.h.rst 84 | 85 | .. toctree:: 86 | :maxdepth: 5 87 | 88 | file_include_SieveStreaming.h.rst 89 | 90 | .. toctree:: 91 | :maxdepth: 5 92 | 93 | file_include_SieveStreamingPP.h.rst 94 | 95 | .. toctree:: 96 | :maxdepth: 5 97 | 98 | file_include_SubmodularFunction.h.rst 99 | 100 | .. toctree:: 101 | :maxdepth: 5 102 | 103 | file_include_SubmodularOptimizer.h.rst 104 | 105 | .. toctree:: 106 | :maxdepth: 5 107 | 108 | file_include_ThreeSieves.h.rst 109 | -------------------------------------------------------------------------------- /docs/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | SubmodularStreamMaximization 2 | ============================ 3 | 4 | .. toctree:: 5 | :hidden: 6 | :maxdepth: 2 7 | 8 | root 9 | python 10 | cpp 11 | api/library_root 12 | -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/LICENSE.md: -------------------------------------------------------------------------------- 1 | This code is the fruit of Kate Morley's labor, taken from here: 2 | 3 | - http://code.iamkate.com/javascript/collapsible-lists/ 4 | 5 | She includes a generous CC0 1.0 license for all materials on her site: 6 | 7 | - http://code.iamkate.com/ 8 | -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/button-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/button-closed.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/button-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/button-open.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/button.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/list-item-contents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/list-item-contents.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/list-item-last-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/list-item-last-open.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/list-item-last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/list-item-last.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/list-item-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/list-item-open.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/list-item-root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/list-item-root.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/list-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/collapsible-lists/css/list-item.png -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/css/tree_view.css: -------------------------------------------------------------------------------- 1 | /* Source taken directly from: 2 | * view-source:http://code.iamkate.com/javascript/collapsible-lists/ 3 | * 4 | * Kate Morley's license for this code is CC0: 5 | * Created by [Kate Morley](http://iamkate.com/). Except where explicitly 6 | * stated otherwise, all content is released under the terms of the 7 | * [CC0 1.0 Universal legal code](http://creativecommons.org/publicdomain/zero/1.0/legalcode). 8 | */ 9 | .treeView{ 10 | -moz-user-select:none; 11 | position:relative; 12 | } 13 | 14 | .treeView ul{ 15 | margin:0 0 0 -1.5em ! important; 16 | padding:0 0 0 1.5em ! important; 17 | } 18 | 19 | .treeView ul ul{ 20 | background:url('list-item-contents.png') repeat-y left ! important; 21 | } 22 | 23 | .treeView li.lastChild > ul{ 24 | background-image:none ! important; 25 | } 26 | 27 | .treeView li{ 28 | margin:0 ! important; 29 | padding:0 ! important; 30 | background:url('list-item-root.png') no-repeat top left ! important; 31 | list-style-position:inside ! important; 32 | list-style-image:url('button.png') ! important; 33 | cursor:auto; 34 | } 35 | 36 | .treeView li.collapsibleListOpen{ 37 | list-style-image:url('button-open.png') ! important; 38 | cursor:pointer; 39 | } 40 | 41 | .treeView li.collapsibleListClosed{ 42 | list-style-image:url('button-closed.png') ! important; 43 | cursor:pointer; 44 | } 45 | 46 | .treeView li li{ 47 | background-image:url('list-item.png') ! important; 48 | padding-left:1.5em ! important; 49 | } 50 | 51 | .treeView li.lastChild{ 52 | background-image:url('list-item-last.png') ! important; 53 | } 54 | 55 | .treeView li.collapsibleListOpen{ 56 | background-image:url('list-item-open.png') ! important; 57 | } 58 | 59 | .treeView li.collapsibleListOpen.lastChild{ 60 | background-image:url('list-item-last-open.png') ! important; 61 | } 62 | -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/js/CollapsibleLists.compressed.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | CollapsibleLists.js 4 | 5 | An object allowing lists to dynamically expand and collapse 6 | 7 | Created by Kate Morley - http://code.iamkate.com/ - and released under 8 | the terms of the CC0 1.0 Universal legal code: 9 | 10 | http://creativecommons.org/publicdomain/zero/1.0/legalcode 11 | 12 | */ 13 | 14 | var CollapsibleLists=new function(){ 15 | this.apply=function(_1){ 16 | var _2=document.getElementsByTagName("ul"); 17 | for(var _3=0;_3<_2.length;_3++){ 18 | if(_2[_3].className.match(/(^| )collapsibleList( |$)/)){ 19 | this.applyTo(_2[_3],true); 20 | if(!_1){ 21 | var _4=_2[_3].getElementsByTagName("ul"); 22 | for(var _5=0;_5<_4.length;_5++){ 23 | _4[_5].className+=" collapsibleList"; 24 | } 25 | } 26 | } 27 | } 28 | }; 29 | this.applyTo=function(_6,_7){ 30 | var _8=_6.getElementsByTagName("li"); 31 | for(var _9=0;_9<_8.length;_9++){ 32 | if(!_7||_6==_8[_9].parentNode){ 33 | if(_8[_9].addEventListener){ 34 | _8[_9].addEventListener("mousedown",function(e){ 35 | e.preventDefault(); 36 | },false); 37 | }else{ 38 | _8[_9].attachEvent("onselectstart",function(){ 39 | event.returnValue=false; 40 | }); 41 | } 42 | if(_8[_9].addEventListener){ 43 | _8[_9].addEventListener("click",_a(_8[_9]),false); 44 | }else{ 45 | _8[_9].attachEvent("onclick",_a(_8[_9])); 46 | } 47 | _b(_8[_9]); 48 | } 49 | } 50 | }; 51 | function _a(_c){ 52 | return function(e){ 53 | if(!e){ 54 | e=window.event; 55 | } 56 | var _d=(e.target?e.target:e.srcElement); 57 | while(_d.nodeName!="LI"){ 58 | _d=_d.parentNode; 59 | } 60 | if(_d==_c){ 61 | _b(_c); 62 | } 63 | }; 64 | }; 65 | function _b(_e){ 66 | var _f=_e.className.match(/(^| )collapsibleListClosed( |$)/); 67 | var uls=_e.getElementsByTagName("ul"); 68 | for(var _10=0;_100){ 79 | _e.className+=" collapsibleList"+(_f?"Open":"Closed"); 80 | } 81 | }; 82 | }(); 83 | 84 | -------------------------------------------------------------------------------- /docs/html/_static/collapsible-lists/js/apply-collapsible-lists.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | CollapsibleLists.apply(); 3 | }); 4 | -------------------------------------------------------------------------------- /docs/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/html/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: 75% !important; 3 | } 4 | 5 | .wy-side-nav-search, .wy-nav-top { 6 | background: #32a852; 7 | } -------------------------------------------------------------------------------- /docs/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/file.png -------------------------------------------------------------------------------- /docs/html/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/html/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/html/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/html/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/html/_static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sbuschjaeger/SubmodularStreamingMaximization/c3e573f8297012c1b73caa5798fcadfb4070b0ce/docs/html/_static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/html/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t 5 | 6 | // Float data-typed used in the entire project. If you find a hardcoded "float" / "double" its probably a good idea to replace it with data_t 7 | typedef double data_t; 8 | 9 | // Index data-typed used in the entire project. If you find a hardcoded "size_t" / "unsigned int" etc. its probably a good idea to replace it with idx_t 10 | typedef long idx_t; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/functions/kernels/Kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef KERNEL_H 2 | #define KERNEL_H 3 | 4 | #include 5 | #include "DataTypeHandling.h" 6 | 7 | /** 8 | * @brief Virtual base class for Kernels. Usually, I would try to make this a little easier / more accessible 9 | * and use raw function pointer / std::function for kernels. However, sometimes kernels have parameters or may hold a state. Thus I decided to use (simple) classes. To circumvent writing new classes for each kernel, you can use the KernelWrapper to wrap functions / lambdas into this object. 10 | */ 11 | class Kernel { 12 | 13 | public: 14 | 15 | /** 16 | * @brief Evaluates the kernel on the two given parameters x1, x2 17 | * @param x1: The first parameter of the kernel. 18 | * @param x2: The second parameter of the kernel. 19 | */ 20 | virtual inline data_t operator()(const std::vector& x1, const std::vector& x2) const = 0; 21 | 22 | /** 23 | * @brief Clones the current kernel object and returns a shared pointer to the copy. 24 | * @note Clones should be a deep copy of the object, because a SubmodularOptimizer might generate multiple copies of this kernel if required. 25 | */ 26 | virtual std::shared_ptr clone() const = 0; 27 | 28 | /** 29 | * @brief Destroys the current kernel. 30 | */ 31 | virtual ~Kernel() {} 32 | }; 33 | 34 | /** 35 | * @brief A simple wrapper, which wraps a `std::function' into the kernel object. This allows us to use lambdas / std::functions instead of writing a new class for a new Kernel. For example: 36 | KernelWrapper kernel([](const std::vector& x1, const std::vector& x2) { 37 | data_t distance = 0; 38 | if (x1 != x2) { 39 | for (unsigned int i = 0; i < x1.size(); ++i) { 40 | distance += (x1[i]-x2[i])*(x1[i]-x2[i]); 41 | } 42 | distance /= 1.0; 43 | } 44 | return 1.0 * std::exp(-distance); 45 | }) 46 | */ 47 | class KernelWrapper : public Kernel { 48 | protected: 49 | /** 50 | * @brief The wrapped function. 51 | * @param &: First parameter for evaluation. 52 | * @param &: Second parameter for evaluation. 53 | */ 54 | std::function const &, std::vector const &)> f; 55 | 56 | public: 57 | 58 | /** 59 | * @brief Creates a new KernelWrapper object. 60 | * @note The supplied std::function is moved into this wrapper. There is no copy involved. 61 | * @param f: The std::function to be wrapped. 62 | */ 63 | KernelWrapper(std::function const &, std::vector const &)> f) : f(f) {} 64 | 65 | /** 66 | * @brief Evaluates the wrapped kernel on the given parameters. 67 | * @param x1: First parameter for evaluation. 68 | * @param x2: Second parameter for evaluation. 69 | */ 70 | inline data_t operator()(const std::vector& x1, const std::vector& x2) const override { 71 | return f(x1, x2); 72 | } 73 | 74 | /** 75 | * @brief Clones this objet. 76 | * @note This is _not_ a deep copy. The internal std::function is moved into the new object 77 | */ 78 | std::shared_ptr clone() const override { 79 | return std::shared_ptr(new KernelWrapper(f)); 80 | } 81 | 82 | }; 83 | 84 | #endif // RBF_KERNEL_H 85 | -------------------------------------------------------------------------------- /include/functions/kernels/RBFKernel.h: -------------------------------------------------------------------------------- 1 | #ifndef RBF_KERNEL_H 2 | #define RBF_KERNEL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "DataTypeHandling.h" 11 | #include "functions/kernels/Kernel.h" 12 | 13 | /* These are remains of an AVX implementation for the euclidean distance. However, it was not much faster (sometimes slower) 14 | * then the code snippet used from the STL. Also, it only supports float at the moment. 15 | * 16 | */ 17 | // // From https://gist.github.com/matsui528/583925f88fcb08240319030202588c74 18 | // // reads 0 <= d < 4 floats as __m128 19 | // static inline __m128 masked_read (int d, const float *x) { 20 | // assert (0 <= d && d < 4); 21 | // __attribute__((__aligned__(16))) float buf[4] = {0, 0, 0, 0}; 22 | // switch (d) { 23 | // case 3: 24 | // buf[2] = x[2]; 25 | // case 2: 26 | // buf[1] = x[1]; 27 | // case 1: 28 | // buf[0] = x[0]; 29 | // } 30 | // return _mm_load_ps (buf); 31 | // // cannot use AVX2 _mm_mask_set1_epi32 32 | // } 33 | 34 | // template 35 | // T squared_distance(const float * x, const float * y, unsigned int d); 36 | 37 | // template<> 38 | // float squared_distance(const float * x, const float * y, unsigned int d) { 39 | // __m256 msum1 = _mm256_setzero_ps(); 40 | 41 | // while (d >= 8) { 42 | // __m256 mx = _mm256_loadu_ps (x); x += 8; 43 | // __m256 my = _mm256_loadu_ps (y); y += 8; 44 | // const __m256 a_m_b1 = mx - my; 45 | // msum1 += a_m_b1 * a_m_b1; 46 | // d -= 8; 47 | // } 48 | 49 | // __m128 msum2 = _mm256_extractf128_ps(msum1, 1); 50 | // msum2 += _mm256_extractf128_ps(msum1, 0); 51 | 52 | // if (d >= 4) { 53 | // __m128 mx = _mm_loadu_ps (x); x += 4; 54 | // __m128 my = _mm_loadu_ps (y); y += 4; 55 | // const __m128 a_m_b1 = mx - my; 56 | // msum2 += a_m_b1 * a_m_b1; 57 | // d -= 4; 58 | // } 59 | 60 | // if (d > 0) { 61 | // __m128 mx = masked_read (d, x); 62 | // __m128 my = masked_read (d, y); 63 | // __m128 a_m_b1 = mx - my; 64 | // msum2 += a_m_b1 * a_m_b1; 65 | // } 66 | 67 | // msum2 = _mm_hadd_ps (msum2, msum2); 68 | // msum2 = _mm_hadd_ps (msum2, msum2); 69 | // return _mm_cvtss_f32 (msum2); 70 | // } 71 | 72 | // template<> 73 | // double squared_distance(const float * x, const float * y, unsigned int d) { 74 | 75 | // } 76 | 77 | /** 78 | * @brief The RBF Kernel: 79 | * \f[ 80 | * k(x_1, x_2) = scale \cdot \exp\left(- \frac{\|x_1 - x_2 \|_2^2}{sigma}\right) 81 | * \f] 82 | * where \f$ scale > 0\f$ and \f$sigma > 0\f$. 83 | */ 84 | class RBFKernel : public Kernel { 85 | private: 86 | /** 87 | * Sigma hyperparameter. Should be > 0 88 | */ 89 | data_t sigma = 1.0; 90 | 91 | /** 92 | * Scale hyperparameter. Should be > 0 93 | */ 94 | data_t scale = 1.0; 95 | 96 | public: 97 | /** 98 | * @brief The default constructor for this kernel. The sigma value is 1.0 and the scale is 1.0 99 | */ 100 | RBFKernel() = default; 101 | 102 | /** 103 | * @brief Creates a new RBFKernel with the given sigma parameter and scale 1.0. 104 | * @param sigma: The sigma parameter > 0. 105 | */ 106 | RBFKernel(data_t sigma) : RBFKernel(sigma, 1.0) { 107 | } 108 | 109 | /** 110 | * @brief Creates a new RBFKernel with the given sigma and scale parameter. 111 | * @note This constructor uses assert to make sure that scale/sigma has the correct range. This may lead to warnings during compilation. 112 | * @param sigma: The sigma value > 0. 113 | * @param scale: The scale value > 0. 114 | */ 115 | RBFKernel(data_t sigma, data_t scale) : sigma(sigma), scale(scale){ 116 | assert(("The scale of an RBF Kernel should be greater than 0!", scale > 0)); 117 | assert(("The sigma value of an RBF Kernel should be greater than 0!", sigma > 0)); 118 | }; 119 | 120 | /** 121 | * @brief Computes the RBF Kernel at the given points x1, x2: 122 | * \f$k(x_1, x_2) = scale * \exp(- \frac{\|x_1 - x_2 \|_2^2}{sigma)\f$ 123 | * where \f$scale > 0\f$ and \f$sigma > 0\f$ 124 | * @param x1: First argument for the kernel. 125 | * @param x2: Second argument for the kernel 126 | */ 127 | inline data_t operator()(const std::vector& x1, const std::vector& x2) const override { 128 | data_t distance = 0; 129 | if (x1 != x2) { 130 | // This is the fastest stl-compatible version I could find / come up with. I am not sure how much 131 | // vectorization this utilizes, but for now this shall be enough 132 | distance = std::inner_product(x1.begin(), x1.end(), x2.begin(), data_t(0), 133 | std::plus(), [](data_t x,data_t y){return (y-x)*(y-x);} 134 | ); 135 | // for (unsigned int i = 0; i < x1.size(); ++i) { 136 | // auto const d = x1[i] - x2[i]; 137 | // distance += d * d; 138 | // } 139 | distance /= sigma; 140 | } 141 | return scale * std::exp(-distance); 142 | } 143 | 144 | /** 145 | * @brief Returns a clone of this kernel. 146 | * @note The clone is a deep copy of this kernel. 147 | */ 148 | std::shared_ptr clone() const override { 149 | return std::shared_ptr(new RBFKernel(sigma, scale)); 150 | } 151 | }; 152 | 153 | #endif // RBF_KERNEL_H 154 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import multiprocessing 2 | import os 3 | import platform 4 | import re 5 | import subprocess 6 | import sys 7 | from distutils.version import LooseVersion 8 | from setuptools import setup, Extension 9 | from setuptools.command.build_ext import build_ext 10 | 11 | 12 | class CMakeExtension(Extension): 13 | def __init__(self, name, sourcedir=''): 14 | Extension.__init__(self, name, sources=[]) 15 | self.sourcedir = os.path.abspath(sourcedir) 16 | 17 | 18 | class CMakeBuild(build_ext): 19 | def run(self): 20 | try: 21 | out = subprocess.check_output(['cmake', '--version']) 22 | except OSError: 23 | raise RuntimeError("CMake must be installed to build the following extensions: " + 24 | ", ".join(e.name for e in self.extensions)) 25 | 26 | if platform.system() == "Windows": 27 | cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', out.decode()).group(1)) 28 | if cmake_version < '3.1.0': 29 | raise RuntimeError("CMake >= 3.1.0 is required on Windows") 30 | 31 | for ext in self.extensions: 32 | self.build_extension(ext) 33 | 34 | def build_extension(self, ext): 35 | extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) 36 | cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, 37 | '-DPYTHON_EXECUTABLE=' + sys.executable] 38 | 39 | self.debug = False 40 | cfg = 'Debug' if self.debug else 'Release' 41 | build_args = ['--config', cfg] 42 | 43 | if platform.system() == "Windows": 44 | cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format(cfg.upper(), extdir)] 45 | if sys.maxsize > 2 ** 32: 46 | cmake_args += ['-A', 'x64'] 47 | build_args += ['--', '/m'] 48 | else: 49 | cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] 50 | build_args += ['--', '-j', str(multiprocessing.cpu_count())] 51 | 52 | # CMake does not really respect CC / CXX environment variables. Anaconda on the other hand sets these variables 53 | # if a compiler is installed inside the enviroment. If they are set, then lets just use whatever is set in CC / CXX 54 | if "CC" in os.environ: 55 | cmake_args += ['-DCMAKE_C_COMPILER=' + os.environ["CC"]] 56 | 57 | if "CXX" in os.environ: 58 | cmake_args += ['-DCMAKE_CXX_COMPILER=' + os.environ["CXX"]] 59 | 60 | env = os.environ.copy() 61 | env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''), 62 | self.distribution.get_version()) 63 | if not os.path.exists(self.build_temp): 64 | os.makedirs(self.build_temp) 65 | subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) 66 | subprocess.check_call(['cmake', '--build', '.', '--target', 'PySSM'] + build_args, cwd=self.build_temp) 67 | 68 | # Python SubmodularStreamMaximization (PySSM) 69 | setup( 70 | name='PySSM', 71 | version='0.1', 72 | author='Sebastian Buschjäger and Philipp-Jan Honysz', 73 | author_email='sebastian.buschjaeger@tu-dortmund.de, philipp.honysz@udo.edu', 74 | description='SubmodularStreamingMaximization for Python (PySSM)', 75 | long_description='', 76 | ext_modules=[CMakeExtension('PySSM')], 77 | cmdclass=dict(build_ext=CMakeBuild), 78 | zip_safe=False 79 | ) 80 | --------------------------------------------------------------------------------