Skip to content

Commit

Permalink
doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
aaalgo committed Jun 22, 2016
1 parent e8cbdbd commit 5e4e5e4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Expand Up @@ -5,11 +5,13 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -msse2 -O3")

find_package(OpenMP)
find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()

find_package(Boost REQUIRED COMPONENTS timer chrono system program_options)

set(LIB_SRC kgraph.cpp metric.cpp)
include_directories(${KGRAPH_SOURCE_DIR})
add_library(kgraph SHARED ${LIB_SRC})
Expand All @@ -19,7 +21,7 @@ add_executable(index index.cpp)
add_executable(search search.cpp)
set(TOOLS index search)
foreach(TOOL ${TOOLS})
target_link_libraries(${TOOL} kgrapha boost_timer boost_chrono boost_system boost_program_options)
target_link_libraries(${TOOL} kgrapha ${Boost_LIBRARIES})
endforeach(TOOL)
install (FILES kgraph.h kgraph-data.h DESTINATION include)
install (TARGETS kgraph kgrapha
Expand Down
6 changes: 3 additions & 3 deletions Doxyfile
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = doc
OUTPUT_DIRECTORY = gh-pages/kgraph/doc

# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand All @@ -68,7 +68,7 @@ OUTPUT_DIRECTORY = doc
# performance problems for the file system.
# The default value is: NO.

CREATE_SUBDIRS = YES
CREATE_SUBDIRS = NO

# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
Expand Down Expand Up @@ -1540,7 +1540,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
# The default value is: YES.

GENERATE_LATEX = YES
GENERATE_LATEX = NO

# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down
15 changes: 10 additions & 5 deletions README.md
Expand Up @@ -19,10 +19,15 @@ and Angular distances on rows of NumPy matrices.

# Building and Installation

KGraph depends on a recent version of GCC with C++11 support, and the
Boost library. A Makefile is provided which produces libkgraph.a,
libkgraph.so and a few utility functions. To install, copy *.h to
files to /usr/local/include and libkgraph.* to /usr/local/lib.
KGraph depends on a recent version of GCC with C++11 support, cmake
and the Boost library. The package can be built and installed with
```sh
cmake -DCMAKE_BUILD_TYPE=release .
make
sudo make install
```

A Makefile.plain is also provided in case cmake is not available.

The Python API can be installed with
```
Expand Down Expand Up @@ -115,7 +120,7 @@ index->search(oracle, params, &knn[0]);
delete index;
```

[Doxygen documentation](http://aaalgo.github.io/kgraph/doc/html/annotated.html)

http://www.kgraph.org/

3 changes: 3 additions & 0 deletions kgraph-data.h
Expand Up @@ -46,6 +46,7 @@ namespace kgraph {
/// L2 square distance.
struct l2sqr {
template <typename T>
/// L2 square distance.
static float apply (T const *t1, T const *t2, unsigned dim) {
float r = 0;
for (unsigned i = 0; i < dim; ++i) {
Expand All @@ -56,6 +57,7 @@ namespace kgraph {
return r;
}

/// inner product.
template <typename T>
static float dot (T const *t1, T const *t2, unsigned dim) {
float r = 0;
Expand All @@ -65,6 +67,7 @@ namespace kgraph {
return r;
}

/// L2 norm.
template <typename T>
static float norm2 (T const *t1, unsigned dim) {
float r = 0;
Expand Down
10 changes: 10 additions & 0 deletions update-doc.sh
@@ -0,0 +1,10 @@
#!/bin/bash

rm -rf gh-pages
mkdir gh-pages
pushd gh-pages
git clone -b gh-pages https://github.com/aaalgo/kgraph
popd
doxygen
pushd gh-pages/kgraph
git push

0 comments on commit 5e4e5e4

Please sign in to comment.