-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPartitionManager.h
More file actions
32 lines (25 loc) · 935 Bytes
/
PartitionManager.h
File metadata and controls
32 lines (25 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Created on 17.02.13.
// Copyright (c) 2013 Christoph Schaefer. All rights reserved.
//
#ifndef __BitmapIndex__PartitionManager__
#define __BitmapIndex__PartitionManager__
#include <iostream>
#include "forward.h"
class PartitionManager {
public:
PartitionManager(const std::string& partitionPath);
void addSourceTargetScore(const std::string& source,
const std::string& target,
float score);
void flushSourceTargetScore();
StringVecPtr getTargets(const std::string& source, const std::string& target);
void loadPartitions();
private:
void writeSubPartitionToDisc(const wchar_t& partitionName);
PartitionMap _partitions;
std::string _partitionPath;
wchar_t _lastAddedPartitionKey;
BitmapManagerPtr _lastAddedBitmapManager;
bool _isFirstAddSourceTargetScore;
};
#endif /* defined(__BitmapIndex__PartitionManager__) */