This repository has been archived by the owner on Nov 23, 2019. It is now read-only.
forked from yayahjb/ncdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BasisBase.h
62 lines (51 loc) · 1.78 KB
/
BasisBase.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef BASISBASE_H
#define BASISBASE_H
#include <string>
#include <vector>
class LRL_Cell;
class C3;
class S6;
class D7;
class B4;
class G6;
class VecN;
template<typename T, typename TELEMENT=double>
class BasisBase {
public:
BasisBase() {}
virtual ~BasisBase(void) {}
virtual T& operator= (const std::string& s) = 0;
virtual T& operator= (const D7& v) = 0;
virtual T& operator= (const S6& v) = 0;
virtual T& operator= (const B4& v) = 0;
virtual T& operator= (const LRL_Cell& v) = 0;
virtual T& operator= (const G6& v) = 0;
virtual T& operator= (const C3& v) = 0;
virtual T& operator/= (const double d) = 0;
virtual T& operator*= (const double d) = 0;
virtual T operator+ (const T& v) const = 0;
virtual T operator- (const T& v) const = 0;
virtual T operator* (const double d) const = 0;
virtual T operator/ (const double d) const = 0;
virtual T operator- (void) const = 0; // unary
virtual T& operator+= (const T& v) = 0;
virtual T& operator-= (const T& v) = 0;
virtual bool operator== (const T& v) const = 0;
virtual bool operator!= (const T& v) const = 0;
virtual TELEMENT operator[](const size_t n) const = 0;
virtual TELEMENT& operator[](const size_t n) = 0;
virtual double DistanceBetween(const T& v1, const T& v2) = 0;
virtual size_t size(void) const = 0;
virtual double norm() const = 0;
virtual double norm(const T& t) const = 0;
virtual double Norm() const = 0;
virtual double Norm(const T& t) const = 0;
virtual std::vector<TELEMENT> GetVector(void) const = 0;
virtual void SetVector(const std::vector<TELEMENT>& v) = 0;
virtual void SetValid(const bool b) = 0;
virtual TELEMENT at(const size_t n) const {
return (*this)[n];
}
virtual TELEMENT* data(void) const = 0;
};
#endif // BASISBASE_H