Skip to content

Commit

Permalink
Remove trailing spaces everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
amoudgl committed Mar 29, 2017
1 parent f412872 commit d279cd6
Show file tree
Hide file tree
Showing 31 changed files with 373 additions and 373 deletions.
78 changes: 39 additions & 39 deletions CMake/ARMA_FindARPACK.cmake
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# - Try to find ARPACK
# Once done this will define
#
# ARPACK_FOUND - system has ARPACK
# ARPACK_LIBRARY - Link this to use ARPACK


find_library(ARPACK_LIBRARY
NAMES arpack
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)


if (ARPACK_LIBRARY)
set(ARPACK_FOUND YES)
else ()
# Search for PARPACK.
find_library(ARPACK_LIBRARY
NAMES parpack
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)

if (ARPACK_LIBRARY)
set(ARPACK_FOUND YES)
else ()
set(ARPACK_FOUND NO)
endif ()
endif ()


if (ARPACK_FOUND)
if (NOT ARPACK_FIND_QUIETLY)
message(STATUS "Found an ARPACK library: ${ARPACK_LIBRARY}")
endif ()
else ()
if (ARPACK_FIND_REQUIRED)
message(FATAL_ERROR "Could not find an ARPACK library")
endif ()
endif ()
# - Try to find ARPACK
# Once done this will define
#
# ARPACK_FOUND - system has ARPACK
# ARPACK_LIBRARY - Link this to use ARPACK


find_library(ARPACK_LIBRARY
NAMES arpack
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)


if (ARPACK_LIBRARY)
set(ARPACK_FOUND YES)
else ()
# Search for PARPACK.
find_library(ARPACK_LIBRARY
NAMES parpack
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)

if (ARPACK_LIBRARY)
set(ARPACK_FOUND YES)
else ()
set(ARPACK_FOUND NO)
endif ()
endif ()


if (ARPACK_FOUND)
if (NOT ARPACK_FIND_QUIETLY)
message(STATUS "Found an ARPACK library: ${ARPACK_LIBRARY}")
endif ()
else ()
if (ARPACK_FIND_REQUIRED)
message(FATAL_ERROR "Could not find an ARPACK library")
endif ()
endif ()
38 changes: 19 additions & 19 deletions doc/tutorials/approx_kfn/approx_kfn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ neighbor search:
- \c mlpack_kfn, for exact and approximate tree-based approaches

These two programs allow a large number of algorithms to be used to find
approximate furthest neighbors. Note that the \c mlpack_kfn program is also
approximate furthest neighbors. Note that the \c mlpack_kfn program is also
documented by the \ref cli_nstut section of the \ref nstutorial page, as it
shares options with the \c mlpack_knn program.

Expand All @@ -170,7 +170,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 5 -n n.csv -d d.csv
[INFO ] Search complete.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ] Saving CSV data to 'd.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: ds
[INFO ] calculate_error: false
Expand All @@ -188,7 +188,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 5 -n n.csv -d d.csv
[INFO ] reference_file: refs.csv
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] drusilla_select_construct: 0.000342s
[INFO ] drusilla_select_search: 0.000780s
Expand Down Expand Up @@ -231,7 +231,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 4 -n n.csv -d d.csv -t 10 -
[INFO ] Search complete.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ] Saving CSV data to 'd.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: ds
[INFO ] calculate_error: false
Expand All @@ -249,7 +249,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 4 -n n.csv -d d.csv -t 10 -
[INFO ] reference_file: refs.csv
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] drusilla_select_construct: 0.000645s
[INFO ] drusilla_select_search: 0.000551s
Expand All @@ -276,7 +276,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 3 -n n.csv -d d.csv -a qdaf
[INFO ] Search complete.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ] Saving CSV data to 'd.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: qdafn
[INFO ] calculate_error: false
Expand All @@ -294,7 +294,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 3 -n n.csv -d d.csv -a qdaf
[INFO ] reference_file: refs.csv
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] loading_data: 0.008380s
[INFO ] qdafn_construct: 0.003399s
Expand Down Expand Up @@ -326,7 +326,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 1 -e -q -n n.csv
[INFO ] Average error: 1.08417.
[INFO ] Maximum error: 1.28712.
[INFO ] Minimum error: 1.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: ds
[INFO ] calculate_error: true
Expand All @@ -344,7 +344,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -v -k 1 -e -q -n n.csv
[INFO ] reference_file: refs.csv
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] computing_neighbors: 0.001476s
[INFO ] drusilla_select_construct: 0.000309s
Expand Down Expand Up @@ -391,7 +391,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -k 1 -e -x exact.csv -n n.csv -v
[INFO ] Maximum error: 1.67407.
[INFO ] Minimum error: 1.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: qdafn
[INFO ] calculate_error: true
Expand All @@ -409,7 +409,7 @@ $ mlpack_approx_kfn -q queries.csv -r refs.csv -k 1 -e -x exact.csv -n n.csv -v
[INFO ] reference_file: refs.csv
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] loading_data: 0.010348s
[INFO ] qdafn_construct: 0.000318s
Expand Down Expand Up @@ -443,7 +443,7 @@ $ mlpack_kfn -q queries.csv -r refs.csv -v -k 3 -e 0.5 -n n.csv -d d.csv
[INFO ] Search complete.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ] Saving CSV data to 'd.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: dual_tree
[INFO ] distances_file: d.csv
Expand All @@ -467,7 +467,7 @@ $ mlpack_kfn -q queries.csv -r refs.csv -v -k 3 -e 0.5 -n n.csv -d d.csv
[INFO ] true_neighbors_file: ""
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] computing_neighbors: 0.000442s
[INFO ] loading_data: 0.008060s
Expand Down Expand Up @@ -503,7 +503,7 @@ mlpack_kfn -q queries.csv -r refs.csv -v -k 3 -e 0.1 -n n.csv -d d.csv -a single
[INFO ] Search complete.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ] Saving CSV data to 'd.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: single_tree
[INFO ] distances_file: d.csv
Expand All @@ -527,7 +527,7 @@ mlpack_kfn -q queries.csv -r refs.csv -v -k 3 -e 0.1 -n n.csv -d d.csv -a single
[INFO ] true_neighbors_file: ""
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] computing_neighbors: 0.000850s
[INFO ] loading_data: 0.007858s
Expand All @@ -554,7 +554,7 @@ $ mlpack_approx_kfn -r refs.csv -t 5 -p 10 -v -M model.bin
[INFO ] Loading 'refs.csv' as CSV data. Size is 3 x 1000.
[INFO ] Building DrusillaSelect model...
[INFO ] Model built.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: ds
[INFO ] calculate_error: false
Expand All @@ -572,7 +572,7 @@ $ mlpack_approx_kfn -r refs.csv -t 5 -p 10 -v -M model.bin
[INFO ] reference_file: refs.csv
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] drusilla_select_construct: 0.000321s
[INFO ] loading_data: 0.004700s
Expand All @@ -589,7 +589,7 @@ $ mlpack_approx_kfn -m model.bin -q queries.csv -k 3 -d d.csv -n n.csv -v
[INFO ] Search complete.
[INFO ] Saving CSV data to 'n.csv'.
[INFO ] Saving CSV data to 'd.csv'.
[INFO ]
[INFO ]
[INFO ] Execution parameters:
[INFO ] algorithm: ds
[INFO ] calculate_error: false
Expand All @@ -607,7 +607,7 @@ $ mlpack_approx_kfn -m model.bin -q queries.csv -k 3 -d d.csv -n n.csv -v
[INFO ] reference_file: ""
[INFO ] verbose: true
[INFO ] version: false
[INFO ]
[INFO ]
[INFO ] Program timers:
[INFO ] drusilla_select_search: 0.000878s
[INFO ] loading_data: 0.004599s
Expand Down
32 changes: 16 additions & 16 deletions src/mlpack/core/arma_extend/fn_ind2sub.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
// -------------------------------------------------------------------
//
// Written by Conrad Sanderson - http://conradsanderson.id.au

#if (ARMA_VERSION_MAJOR < 6 || \
(ARMA_VERSION_MAJOR == 6 && ARMA_VERSION_MINOR < 399))
inline
uvec
ind2sub(const SizeMat& s, const uword i)
{
arma_extra_debug_sigprint();

arma_debug_check( (i >= (s.n_rows * s.n_cols) ), "ind2sub(): index out of range" );

uvec out(2);

out[0] = i % s.n_rows;
out[1] = i / s.n_rows;

return out;
}

Expand All @@ -31,22 +31,22 @@
ind2sub(const SizeCube& s, const uword i)
{
arma_extra_debug_sigprint();

arma_debug_check( (i >= (s.n_rows * s.n_cols * s.n_slices) ), "ind2sub(): index out of range" );

const uword n_elem_slice = s.n_rows * s.n_cols;

const uword slice = i / n_elem_slice;
const uword j = i - (slice * n_elem_slice);
const uword row = j % s.n_rows;
const uword col = j / s.n_rows;

uvec out(3);

out[0] = row;
out[1] = col;
out[2] = slice;

return out;
}

Expand All @@ -56,9 +56,9 @@
sub2ind(const SizeMat& s, const uword row, const uword col)
{
arma_extra_debug_sigprint();

arma_debug_check( ((row >= s.n_rows) || (col >= s.n_cols)), "sub2ind(): subscript out of range" );

return uword(row + col*s.n_rows);
}

Expand All @@ -68,11 +68,11 @@
sub2ind(const SizeCube& s, const uword row, const uword col, const uword slice)
{
arma_extra_debug_sigprint();

arma_debug_check( ((row >= s.n_rows) || (col >= s.n_cols) || (slice >= s.n_slices)), "sub2ind(): subscript out of range" );

return uword( (slice * s.n_rows * s.n_cols) + (col * s.n_rows) + row );
}
#endif


6 changes: 3 additions & 3 deletions src/mlpack/core/boost_backport/bernoulli.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ namespace boost { namespace math{
#include "detail/unchecked_bernoulli.hpp"
#include "detail/bernoulli_details.hpp"

namespace boost { namespace math {
namespace boost { namespace math {

namespace detail {

template <class T, class OutputIterator, class Policy, int N>
Expand All @@ -60,7 +60,7 @@ OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std::
*out = unchecked_bernoulli_imp<T>(i, tag);
++out;
}

for(std::size_t i = (std::max)(static_cast<std::size_t>(max_bernoulli_b2n<T>::value + 1), start); i < start + n; ++i)
{
// We must overflow:
Expand Down
Loading

0 comments on commit d279cd6

Please sign in to comment.