forked from ZigRazor/CXXGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecord.hpp
More file actions
executable file
·48 lines (42 loc) · 1.68 KB
/
Record.hpp
File metadata and controls
executable file
·48 lines (42 loc) · 1.68 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/***********************************************************/
/*** ______ ____ ______ _ ***/
/*** / ___\ \/ /\ \/ / ___|_ __ __ _ _ __ | |__ ***/
/*** | | \ / \ / | _| '__/ _` | '_ \| '_ \ ***/
/*** | |___ / \ / \ |_| | | | (_| | |_) | | | | ***/
/*** \____/_/\_\/_/\_\____|_| \__,_| .__/|_| |_| ***/
/*** |_| ***/
/***********************************************************/
/*** Header-Only C++ Library for Graph ***/
/*** Representation and Algorithms ***/
/***********************************************************/
/*** Author: ZigRazor ***/
/*** E-Mail: zigrazor@gmail.com ***/
/***********************************************************/
/*** Collaboration: ----------- ***/
/***********************************************************/
/*** License: MPL v2.0 ***/
/***********************************************************/
#ifndef __CXXGRAPH_PARTITIONING_RECORD_H__
#define __CXXGRAPH_PARTITIONING_RECORD_H__
#pragma once
#include <set>
namespace CXXGraph {
namespace Partitioning {
template <typename T>
class Record {
protected:
bool owns_lock = false;
public:
virtual ~Record() = default;
virtual const std::set<int> &getPartitions() const = 0;
virtual void addPartition(const int m) = 0;
virtual bool hasReplicaInPartition(const int m) const = 0;
virtual bool getLock() = 0;
virtual bool releaseLock() = 0;
virtual int getReplicas() const = 0;
virtual int getDegree() const = 0;
virtual void incrementDegree() = 0;
};
} // namespace Partitioning
} // namespace CXXGraph
#endif // __CXXGRAPH_PARTITIONING_RECORD_H__