<commit_before>//
//  TimeSeriesPoint.h
//  FastDTW-x
//
//  Created by <NAME> on 12/3/13.
//  Copyright (c) 2013 melo.yao. All rights reserved.
//

#ifndef __FastDTW_x__TimeSeriesPoint__
#define __FastDTW_x__TimeSeriesPoint__
#include "Foundation.h"
#include <algorithm>
#include <vector>
FD_NS_START
using namespace std;
template <typename ValueType>
class TimeSeriesPoint {
    vector<ValueType> _measurements;
    ValueType _sum;
    bool _sumValid;
    
public:
    TimeSeriesPoint(const vector<ValueType> meas):_measurements(meas), _sumValid(false),_sum(0)
    {<commit_msg>Add PointTraits for further optimization.  [1] Put dimension in template to make dimension statical  [2] Specify a simpler structure for dimension = 1 TimeSeries.  [3] Specify dimension=0 stands for dynamic dimension.<commit_after>//
//  TimeSeriesPoint.h
//  FastDTW-x
//
//  Created by <NAME> on 12/3/13.
//  Copyright (c) 2013 melo.yao. All rights reserved.
//

#ifndef __FastDTW_x__TimeSeriesPoint__
#define __FastDTW_x__TimeSeriesPoint__
#include "Foundation.h"
#include <algorithm>
#include <vector>
FD_NS_START
using namespace std;

//Add Traits for further optimize;
template <typename ValueType, JInt dimension>
struct PointTraits
{
    typedef vector<ValueType> point_type;
};

template <typename ValueType>
struct PointTraits<ValueType,1>
{
    typedef ValueType point_type;
};

template <typename ValueType>
class TimeSeriesPoint {
    vector<ValueType> _measurements;
    ValueType _sum;
    bool _sumValid;
    
public:
    TimeSeriesPoint(const vector<ValueType> meas):_measurements(meas), _sumValid(false),_sum(0)
    {
{'fraction_non_alphanumeric': 0.10030959752321982, 'fraction_numerical': 0.01609907120743034, 'mean_word_length': 4.630662020905923, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5316589', 'n_tokens_mistral': 541, 'n_tokens_neox': 522, 'n_words': 142}