Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rapid-mix
RapidLib
Commits
08930a3f
Commit
08930a3f
authored
Nov 28, 2017
by
mzed
Browse files
minor code cleanups
parent
e7a56819
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/fastDTW.cpp
View file @
08930a3f
...
...
@@ -67,9 +67,9 @@ std::vector<std::vector<T> > fastDTW<T>::downsample(const std::vector<std::vecto
}
}
//TODO: implement downsampling by resolution
return
shrunkenSeries
;
return
shrunkenSeries
;
size
()
}
//explicit instantiation
template
class
fastDTW
<
double
>;
template
class
fastDTW
<
float
>;
\ No newline at end of file
template
class
fastDTW
<
float
>;
src/modelSet.cpp
View file @
08930a3f
...
...
@@ -96,8 +96,8 @@ std::vector<T> modelSet<T>::run(const std::vector<T> &inputVector) {
template
<
typename
T
>
std
::
vector
<
T
>
json2vector
(
Json
::
Value
json
)
{
std
::
vector
<
T
>
returnVec
;
for
(
unsigned
int
i
=
0
;
i
<
json
.
size
();
++
i
)
{
returnVec
.
push_back
(
json
[
i
]
.
asDouble
());
for
(
auto
jsonValue
:
json
)
{
returnVec
.
push_back
(
json
Value
.
asDouble
());
}
return
returnVec
;
}
...
...
src/rapidStream.h
View file @
08930a3f
...
...
@@ -9,6 +9,7 @@
#define rapidStream_h
#include <stdint.h>
#include <atomic>
#include "../dependencies/bayesfilter/src/BayesianFilter.h"
template
<
typename
T
>
...
...
@@ -104,7 +105,7 @@ public:
private:
uint32_t
windowSize
;
uint32_t
windowIndex
;
std
::
atomic_
uint32_t
windowIndex
;
T
*
circularWindow
;
T
calcCurrentVel
(
int
i
);
...
...
src/seriesClassification.cpp
View file @
08930a3f
...
...
@@ -30,6 +30,7 @@ bool seriesClassificationTemplate<T>::train(const std::vector<trainingSeriesTemp
allTrainingSeries
=
seriesSet
;
minLength
=
maxLength
=
int
(
allTrainingSeries
[
0
].
input
.
size
());
for
(
int
i
=
0
;
i
<
allTrainingSeries
.
size
();
++
i
)
{
//for (auto trainingSeries : allTrainingSeries)
//Global
int
newLength
=
int
(
allTrainingSeries
[
i
].
input
.
size
());
if
(
newLength
<
minLength
)
{
...
...
@@ -198,4 +199,4 @@ template class seriesClassificationTemplate<float>;
//std::vector<T> seriesClassification::getCosts(const std::vector<trainingExample> &trainingSet) {
// run(trainingSet);
// return allCosts;
//}
\ No newline at end of file
//}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment