diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /ml/dlib/dlib/array/array_tools.h | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/dlib/dlib/array/array_tools.h')
-rw-r--r-- | ml/dlib/dlib/array/array_tools.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/ml/dlib/dlib/array/array_tools.h b/ml/dlib/dlib/array/array_tools.h deleted file mode 100644 index fce634396..000000000 --- a/ml/dlib/dlib/array/array_tools.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2013 Davis E. King (davis@dlib.net) -// License: Boost Software License See LICENSE.txt for the full license. -#ifndef DLIB_ARRAY_tOOLS_H_ -#define DLIB_ARRAY_tOOLS_H_ - -#include "../assert.h" -#include "array_tools_abstract.h" - -namespace dlib -{ - template <typename T> - void split_array ( - T& a, - T& b, - double frac - ) - { - // make sure requires clause is not broken - DLIB_ASSERT(0 <= frac && frac <= 1, - "\t void split_array()" - << "\n\t frac must be between 0 and 1." - << "\n\t frac: " << frac - ); - - const unsigned long asize = static_cast<unsigned long>(a.size()*frac); - const unsigned long bsize = a.size()-asize; - - b.resize(bsize); - for (unsigned long i = 0; i < b.size(); ++i) - { - swap(b[i], a[i+asize]); - } - a.resize(asize); - } -} - -#endif // DLIB_ARRAY_tOOLS_H_ - |