49 template <
typename C1>
56 size_t size()
const {
return d_num.size(); }
65 {
return *
this=*
this+
v; }
71 {
return *
this=*
this-
v; }
76 template <
typename C1>
79 template <
typename C1>
83 template <
typename C1>
86 template <
typename C1>
106 template <
typename C1>
109 return w.
dot(d_num)/(C)d_denom;
124 template<
typename C1,
typename C2>
129 template<
typename C1,
typename C2>
134 template<
typename C1,
typename C2>
138 v.numerator() += M*v.numerator();
139 return (v/=2).normalize();
143 template<
typename C1,
typename C2>
148 return (v/=2).normalize();
bool operator==(const RationalVector &a) const
Definition: ratvec.cpp:35
C1 dot(const Vector< C1 > &v) const
Definition: matrix.cpp:147
RationalVector & operator+=(const RationalVector &v)
Definition: ratvec.h:64
Vector< C1 > right_prod(const Vector< C1 > &) const
Definition: matrix.cpp:359
Definition: arithmetic.h:54
RationalVector< C2 > & symmetrise(const matrix::Matrix< C1 > &M, RationalVector< C2 > &v)
Definition: ratvec.h:136
V d_num
Definition: ratvec.h:40
RationalVector operator-(const RationalVector &v) const
Definition: ratvec.h:68
V & numerator()
Definition: ratvec.h:114
RationalVector & operator/=(C n)
Definition: ratvec.cpp:88
RationalVector operator+(const RationalVector &v) const
Definition: ratvec.cpp:55
bool operator<(const RationalVector &a) const
Definition: ratvec.cpp:42
Vector & subtract(I b, C c)
Definition: matrix.h:84
RationalVector & operator-=(const RationalVector &v)
Definition: ratvec.h:70
const V & numerator() const
Definition: ratvec.h:55
RationalVector & operator%=(C n)
Definition: ratvec.cpp:102
bool operator!=(const RationalVector &a) const
Definition: ratvec.h:59
arithmetic::Denom_t d_denom
Definition: ratvec.h:41
C dot(const matrix::Vector< C1 > &w) const
Definition: ratvec.h:107
C denominator() const
Definition: ratvec.h:54
RationalVector & operator+=(const matrix::Vector< C1 > &v)
Definition: ratvec.h:77
RationalVector & normalize()
Definition: ratvec.cpp:135
unsigned long long int Denom_t
Definition: Atlas.h:69
size_t size() const
Definition: ratvec.h:56
RationalVector(size_t r)
Definition: ratvec.h:46
RationalVector operator-(const matrix::Vector< C1 > &v) const
Definition: ratvec.h:87
RationalVector & operator-=(const matrix::Vector< C1 > &v)
Definition: ratvec.h:80
RationalVector & operator*=(C n)
Definition: ratvec.cpp:69
RationalVector operator-() const
Definition: ratvec.h:66
matrix::Vector< C > V
Definition: ratvec.h:38
unsigned long n
Definition: axis.cpp:77
Element of lattice tensored with rational numbers.
Definition: Atlas.h:83
RationalVector operator*(const arithmetic::Rational &r) const
Definition: ratvec.cpp:115
RationalVector operator+(const matrix::Vector< C1 > &v) const
Definition: ratvec.h:84
RationalVector operator/(const arithmetic::Rational &r) const
Definition: ratvec.cpp:128
Vertex v
Definition: graph.cpp:116