searchWindow.h 822 Bytes
Newer Older
mzed's avatar
mzed committed
1
2
3
4
5
6
7
/**
 * @file    searchWindow.h
 * RapidLib
 * @author  Michael Zbyszynski
 * @date    14 Sep 2017
 * @copyright Copyright © 2017 Goldsmiths. All rights reserved.
 */
8
9
10
11
12
13
14

#ifndef searchWindow_h
#define searchWindow_h

#include <vector>
#include "warpPath.h"

mzed's avatar
mzed committed
15
16
17
/** For fastDTW, a window of cells to calculate costs for.
 * These are cells within a specified search radius of a lower resolution path.
 */
mzed's avatar
mzed committed
18
template<typename T>
19
20
class searchWindow {
public:
mzed's avatar
mzed committed
21
22
23
24
    searchWindow(const int seriesXSize,
                 const int seriesYSize,
                 const warpPath &shrunkenWarpPath,
                 const int searchRadius);
mzed's avatar
mzed committed
25
    
26
     std::vector< std::pair<int, int> > minMaxValues;
mzed's avatar
mzed committed
27
    
mzed's avatar
mzed committed
28
private:
29
30
31
32
    int maxY;
    void markVisited(int col, int row);
    void expandWindow(int searchRadius);
};
mzed's avatar
mzed committed
33

34
#endif /* searchWindow_h */