Lines Matching refs:BASE

61  * operators on a vector of type BASE<T>.
63 * BASE only needs to implement operator[] and size().
64 * By simply inheriting from TVec{Add|Product}Operators<BASE, T> BASE will automatically
68 template <template<typename T> class BASE, typename T>
75 BASE<T>& operator += (const BASE<OTHER>& v) {
76 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
77 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
83 BASE<T>& operator -= (const BASE<OTHER>& v) {
84 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
85 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
94 * to a vector (assuming the BASE<T> allows it).
96 BASE<T>& operator += (const BASE<T>& v) {
97 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
98 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
103 BASE<T>& operator -= (const BASE<T>& v) {
104 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
105 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
116 * (the first one, BASE<T> being known).
124 BASE<T> PURE operator +(const BASE<T>& lv, const BASE<RT>& rv) {
125 return BASE<T>(lv) += rv;
129 BASE<T> PURE operator -(const BASE<T>& lv, const BASE<RT>& rv) {
130 return BASE<T>(lv) -= rv;
134 * i.e.: BASE<T> is known) can be used for implicit conversion on both sides.
137 * the BASE<T> allows it).
140 BASE<T> PURE operator +(const BASE<T>& lv, const BASE<T>& rv) {
141 return BASE<T>(lv) += rv;
144 BASE<T> PURE operator -(const BASE<T>& lv, const BASE<T>& rv) {
145 return BASE<T>(lv) -= rv;
149 template <template<typename T> class BASE, typename T>
156 BASE<T>& operator *= (const BASE<OTHER>& v) {
157 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
158 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
164 BASE<T>& operator /= (const BASE<OTHER>& v) {
165 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
166 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
175 * to a vector (assuming the BASE<T> allows it).
177 BASE<T>& operator *= (const BASE<T>& v) {
178 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
179 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
184 BASE<T>& operator /= (const BASE<T>& v) {
185 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
186 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
197 * (the first one, BASE<T> being known).
205 BASE<T> PURE operator *(const BASE<T>& lv, const BASE<RT>& rv) {
206 return BASE<T>(lv) *= rv;
210 BASE<T> PURE operator /(const BASE<T>& lv, const BASE<RT>& rv) {
211 return BASE<T>(lv) /= rv;
215 * i.e.: BASE<T> is known) can be used for implicit conversion on both sides.
218 * the BASE<T> allows it).
221 BASE<T> PURE operator *(const BASE<T>& lv, const BASE<T>& rv) {
222 return BASE<T>(lv) *= rv;
225 BASE<T> PURE operator /(const BASE<T>& lv, const BASE<T>& rv) {
226 return BASE<T>(lv) /= rv;
231 * TVecUnaryOperators implements unary operators on a vector of type BASE<T>.
233 * BASE only needs to implement operator[] and size().
234 * By simply inheriting from TVecUnaryOperators<BASE, T> BASE will automatically
237 * These operators are implemented as friend functions of TVecUnaryOperators<BASE, T>
239 template <template<typename T> class BASE, typename T>
242 BASE<T>& operator ++ () {
243 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
244 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
249 BASE<T>& operator -- () {
250 BASE<T>& rhs = static_cast<BASE<T>&>(*this);
251 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
256 BASE<T> operator - () const {
257 BASE<T> r(BASE<T>::NO_INIT);
258 BASE<T> const& rv(static_cast<BASE<T> const&>(*this));
259 for (size_t i=0 ; i<BASE<T>::size() ; i++) {
269 * on a vector of type BASE<T>.
271 * BASE only needs to implement operator[] and size().
272 * By simply inheriting from TVecComparisonOperators<BASE, T> BASE will automatically
275 template <template<typename T> class BASE, typename T>
283 * (the first one, BASE<T> being known).
287 bool PURE operator ==(const BASE<T>& lv, const BASE<RT>& rv) {
288 for (size_t i = 0; i < BASE<T>::size(); i++)
296 bool PURE operator !=(const BASE<T>& lv, const BASE<RT>& rv) {
302 bool PURE operator >(const BASE<T>& lv, const BASE<RT>& rv) {
303 for (size_t i = 0; i < BASE<T>::size(); i++)
311 bool PURE operator <=(const BASE<T>& lv, const BASE<RT>& rv) {
317 bool PURE operator <(const BASE<T>& lv, const BASE<RT>& rv) {
318 for (size_t i = 0; i < BASE<T>::size(); i++)
326 bool PURE operator >=(const BASE<T>& lv, const BASE<RT>& rv) {
333 * TVecFunctions implements functions on a vector of type BASE<T>.
335 * BASE only needs to implement operator[] and size().
336 * By simply inheriting from TVecFunctions<BASE, T> BASE will automatically
339 template <template<typename T> class BASE, typename T>
347 * (the first one, BASE<T> being known).
351 T PURE dot(const BASE<T>& lv, const BASE<RT>& rv) {
353 for (size_t i = 0; i < BASE<T>::size(); i++)
359 T PURE length(const BASE<T>& lv) {
365 T PURE distance(const BASE<T>& lv, const BASE<RT>& rv) {
370 BASE<T> PURE normalize(const BASE<T>& lv) {