forked from NikitaS4/UI_lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISet.h
30 lines (28 loc) · 1.37 KB
/
ISet.h
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
#ifndef ISET_H
#define ISET_H
#include "ILogger.h"
#include "IVector.h"
class ISet {
public:
static ISet* createSet(ILogger* pLogger);
virtual~ISet() = 0;
virtual RESULT_CODE insert(const IVector* pVector,IVector::NORM norm, double tolerance) = 0;
virtual RESULT_CODE get(IVector*& pVector, size_t index)const = 0;
virtual RESULT_CODE get(IVector*& pVector, IVector const* pSample, IVector::NORM norm, double tolerance)const = 0;
virtual size_t getDim() const = 0; //space dimension
virtual size_t getSize() const = 0; //num elements in set
virtual void clear() = 0; // delete all
virtual RESULT_CODE erase(size_t index) = 0;
virtual RESULT_CODE erase(IVector const* pSample, IVector::NORM norm, double tolerance) = 0;
virtual ISet* clone()const = 0;
static ISet* add(ISet const* pOperand1, ISet const* pOperand2, IVector::NORM norm, double tolerance, ILogger* pLogger);
static ISet* intersect(ISet const* pOperand1, ISet const* pOperand2, IVector::NORM norm, double tolerance, ILogger* pLogger);
static ISet* sub(ISet const* pOperand1, ISet const* pOperand2, IVector::NORM norm, double tolerance, ILogger* pLogger);
static ISet* symSub(ISet const* pOperand1, ISet const* pOperand2, IVector::NORM norm, double tolerance, ILogger* pLogger);
protected:
ISet() = default;
private:
ISet(ISet const& set) = delete;
ISet& operator=(ISet const& vector) = delete;
};
#endif //ISET_H