Commit edd8dc38 authored by mzed's avatar mzed
Browse files

more includes and typenames for C++14 and Linux

parent e95badb7
......@@ -10,7 +10,8 @@
#include <vector>
#include <cmath>
#include <cassert>
#include "dtw.h"
#include <limits>
#include "dtw.h"
template<typename T>
dtw<T>::dtw() {};
......
......@@ -29,7 +29,7 @@ numOutputs(-1)
template<typename T>
modelSet<T>::~modelSet() {
for (typename std::vector<baseModel<T>*>::iterator i = myModelSet.begin(); i != myModelSet.end(); ++i) {
for (typename std::vector<baseModel<T>*>::const_iterator i = myModelSet.cbegin(); i != myModelSet.cend(); ++i) {
delete *i;
}
};
......@@ -64,7 +64,7 @@ bool modelSet<T>::train(const std::vector<trainingExampleTemplate<T> > &training
template<typename T>
bool modelSet<T>::reset() {
for (typename std::vector<baseModel<T>*>::iterator i = myModelSet.begin(); i != myModelSet.end(); ++i) {
for (typename std::vector<baseModel<T>*>::const_iterator i = myModelSet.cbegin(); i != myModelSet.cend(); ++i) {
delete *i;
}
myModelSet.clear();
......
......@@ -6,6 +6,7 @@
* @copyright Copyright © 2017 Goldsmiths. All rights reserved.
*/
#include <limits>
#include "searchWindow.h"
template<typename T>
......
......@@ -9,6 +9,8 @@
#include <vector>
#include <cassert>
#include <limits>
#include <algorithm>
#include "seriesClassification.h"
#ifdef EMSCRIPTEN
#include "emscripten/seriesClassificationEmbindings.h"
......@@ -163,7 +165,7 @@ int seriesClassificationTemplate<T>::getMaxLength(std::string label) const {
}
template<typename T>
seriesClassificationTemplate<T>::minMax<T> seriesClassificationTemplate<T>::calculateCosts(std::string label) const {
typename seriesClassificationTemplate<T>::template minMax<T> seriesClassificationTemplate<T>::calculateCosts(std::string label) const {
minMax<T> calculatedMinMax;
bool foundSeries = false;
std::vector<T> labelCosts;
......@@ -188,7 +190,7 @@ seriesClassificationTemplate<T>::minMax<T> seriesClassificationTemplate<T>::calc
}
template<typename T>
seriesClassificationTemplate<T>::minMax<T> seriesClassificationTemplate<T>::calculateCosts(std::string label1, std::string label2) const {
typename seriesClassificationTemplate<T>::template minMax<T> seriesClassificationTemplate<T>::calculateCosts(std::string label1, std::string label2) const {
minMax<T> calculatedMinMax;
bool foundSeries = false;
std::vector<T> labelCosts;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment