Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rgijsen committed Jul 16, 2019
1 parent 02c6492 commit 524407c
Show file tree
Hide file tree
Showing 12 changed files with 3,753 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
Language: Cpp
#AccessModifierOffset: 0
AlignTrailingComments: true
AlwaysBreakTemplateDeclarations: true
BreakBeforeBraces: Allman
ColumnLimit: 0
FixNamespaceComments: false
IndentWidth: 2
NamespaceIndentation: All
PointerBindsToType: true
SortIncludes: false
SpaceAfterTemplateKeyword: false
SpaceBeforeParens: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/VPTree",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files.associations": {
"fstream": "cpp"
},
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools"
}
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.10)
project(VPTree)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -w")

set(CMAKE_VERBOSE_MAKEFILE ON)

#put all in one directory...
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

#====================================
macro(copy_file_to_target_dir arg0 arg1)
add_custom_command(TARGET ${ARGV0} PRE_BUILD # Adds a post-build event to project name
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
${ARGV1}
$<TARGET_FILE_DIR:${PROJECT_NAME}> # <--this is out-file path
)
endmacro(copy_file_to_target_dir)
#=========================

add_subdirectory(src)
22 changes: 22 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
== Generic VPTree

.build status
Ubuntu 18.10, GNU GCC 8.3: image:https://rgijsen.visualstudio.com/vptree/_apis/build/status/rgijsen.vptree?branchName=master["Build Status",
link=https://rgijsen.visualstudio.com/vptree/_build/latest?definitionId=1&branchName=master]
=== Description
Generic Vantage Point Tree (VPTree) is a space partitioning algorithm. +
This code is based on link:http://stevehanov.ca/blog/index.php?id=130[] and link:https://fribbels.github.io/vptree/writeup[]
This implementation allows for generic point type (instead of only vector type points). Even aggregated point types are allowed.
Requirements for the point type are:
* Must have operator[] to access the elements
* Must have size() function to return dimensional size
The distance metric is a binary function of type: distance(point1, point2) +
Supplied metrics are:
* Euclidean full device metric
* Euclidean periodic boundary condition, PBC, metric
31 changes: 31 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# https://aka.ms/yaml

resources:
containers:
- container: gcc
image: magellan2/gcc8:1.1

variables:
poolImage: 'ubuntu-latest'

trigger:
- master

stages:
- stage: build
jobs:
- job: Build
container: gcc
pool:
vmImage: $(poolImage)
steps:
- script: |
uname -a
gcc --version
cmake --version
rm -rf build
mkdir build
cd build
cmake ..
make
Loading

0 comments on commit 524407c

Please sign in to comment.