OpenMesh
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
VectorT_inc.hh
1 /* ========================================================================= *
2  * *
3  * OpenMesh *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openmesh.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenMesh. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39  * *
40  * ========================================================================= */
41 
42 
43 
44 /*===========================================================================*\
45  * *
46  * $Revision$ *
47  * $Date$ *
48  * *
49 \*===========================================================================*/
50 
51 // Set template keywords and class names properly when
52 // parsing with doxygen. This only seems to work this way since
53 // the scope of preprocessor defines is limited to one file in doxy.
54 #ifdef DOXYGEN
55 
56 // Only used for correct doxygen parsing
57 #define OPENMESH_VECTOR_HH
58 
59 #define DIM N
60 #define TEMPLATE_HEADER template <typename Scalar, int N>
61 #define CLASSNAME VectorT
62 #define DERIVED VectorDataT<Scalar,N>
63 #define unroll(expr) for (int i=0; i<N; ++i) expr(i)
64 
65 #endif
66 
67 #if defined( OPENMESH_VECTOR_HH )
68 
69 // ----------------------------------------------------------------------------
70 
71 TEMPLATE_HEADER
72 class CLASSNAME : public DERIVED
73 {
74 private:
75  typedef DERIVED Base;
76 public:
77 
78  //---------------------------------------------------------------- class info
79 
81  typedef Scalar value_type;
82 
85 
87  static inline int dim() { return DIM; }
88 
90  static inline size_t size() { return DIM; }
91 
92  static const size_t size_ = DIM;
93 
94 
95  //-------------------------------------------------------------- constructors
96 
98  inline VectorT() {}
99 
100 #if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
101  explicit inline VectorT(const Scalar &v) {
102  vectorize(v);
103  }
104 
105  template<typename... T,
106  typename = typename std::enable_if<sizeof...(T) == DIM>::type,
107  typename = typename std::enable_if<are_convertible_to<Scalar, T...>::value>::type>
108  constexpr VectorT(T... vs) : Base { static_cast<Scalar>(vs)...}
109  { }
110 
111  template<int D = DIM, typename = typename std::enable_if<D == DIM>::type>
112  typename std::enable_if<D==4, VectorT>::type
113  homogenized() const {
114  return VectorT(
115  Base::values_[0]/Base::values_[3],
116  Base::values_[1]/Base::values_[3],
117  Base::values_[2]/Base::values_[3],
118  1);
119  }
120 
121 #else
122  explicit inline VectorT(const Scalar& v) {
124 // assert(DIM==1);
125 // values_[0] = v0;
126  vectorize(v);
127  }
128 
129 #if DIM == 2
130  inline VectorT(const Scalar v0, const Scalar v1) {
132  Base::values_[0] = v0; Base::values_[1] = v1;
133  }
134 #endif
135 
136 #if DIM == 3
137  inline VectorT(const Scalar v0, const Scalar v1, const Scalar v2) {
139  Base::values_[0]=v0; Base::values_[1]=v1; Base::values_[2]=v2;
140  }
141 #endif
142 
143 #if DIM == 4
144  inline VectorT(const Scalar v0, const Scalar v1,
146  const Scalar v2, const Scalar v3) {
147  Base::values_[0]=v0; Base::values_[1]=v1; Base::values_[2]=v2; Base::values_[3]=v3;
148  }
149 
150  VectorT homogenized() const { return VectorT(Base::values_[0]/Base::values_[3], Base::values_[1]/Base::values_[3], Base::values_[2]/Base::values_[3], 1); }
151 #endif
152 
153 #if DIM == 5
154  inline VectorT(const Scalar v0, const Scalar v1, const Scalar v2,
156  const Scalar v3, const Scalar v4) {
157  Base::values_[0]=v0; Base::values_[1]=v1;Base::values_[2]=v2; Base::values_[3]=v3; Base::values_[4]=v4;
158  }
159 #endif
160 
161 #if DIM == 6
162  inline VectorT(const Scalar v0, const Scalar v1, const Scalar v2,
164  const Scalar v3, const Scalar v4, const Scalar v5) {
165  Base::values_[0]=v0; Base::values_[1]=v1; Base::values_[2]=v2;
166  Base::values_[3]=v3; Base::values_[4]=v4; Base::values_[5]=v5;
167  }
168 #endif
169 #endif
170 
172  explicit inline VectorT(const Scalar _values[DIM]) {
173  memcpy(data(), _values, DIM*sizeof(Scalar));
174  }
175 
176 
177 #ifdef OM_CC_MIPS
178  // mipspro need this method
180  inline vector_type& operator=(const vector_type& _rhs) {
181  memcpy(Base::values_, _rhs.Base::values_, DIM*sizeof(Scalar));
182  return *this;
183  }
184 #endif
185 
186 
188  template<typename otherScalarType>
189  explicit inline VectorT(const VectorT<otherScalarType,DIM>& _rhs) {
190  operator=(_rhs);
191  }
192 
193 
194 
195 
196  //--------------------------------------------------------------------- casts
197 
199  template<typename otherScalarType>
200  inline vector_type& operator=(const VectorT<otherScalarType,DIM>& _rhs) {
201 #define expr(i) Base::values_[i] = (Scalar)_rhs[i];
202  unroll(expr);
203 #undef expr
204  return *this;
205  }
206 
207 // /// cast to Scalar array
208 // inline operator Scalar*() { return Base::values_; }
209 
210 // /// cast to const Scalar array
211 // inline operator const Scalar*() const { return Base::values_; }
212 
213 #if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)
214  inline Scalar* data() { return Base::values_.data(); }
216 
218  inline const Scalar*data() const { return Base::values_.data(); }
219 #else
220  inline Scalar* data() { return Base::values_; }
222 
224  inline const Scalar*data() const { return Base::values_; }
225 #endif
226 
227 
228 
229 
230  //----------------------------------------------------------- element access
231 
232 // /// get i'th element read-write
233 // inline Scalar& operator[](int _i) {
234 // assert(_i>=0 && _i<DIM); return Base::values_[_i];
235 // }
236 
237 // /// get i'th element read-only
238 // inline const Scalar& operator[](int _i) const {
239 // assert(_i>=0 && _i<DIM); return Base::values_[_i];
240 // }
241 
243  inline Scalar& operator[](size_t _i) {
244  assert(_i<DIM); return Base::values_[_i];
245  }
246 
248  inline const Scalar& operator[](size_t _i) const {
249  assert(_i<DIM); return Base::values_[_i];
250  }
251 
252 
253 
254 
255  //---------------------------------------------------------------- comparsion
256 
258  inline bool operator==(const vector_type& _rhs) const {
259 #define expr(i) if(Base::values_[i]!=_rhs.Base::values_[i]) return false;
260  unroll(expr);
261 #undef expr
262  return true;
263  }
264 
266  inline bool operator!=(const vector_type& _rhs) const {
267  return !(*this == _rhs);
268  }
269 
270 
271 
272 
273  //---------------------------------------------------------- scalar operators
274 
276  inline vector_type& operator*=(const Scalar& _s) {
277 #define expr(i) Base::values_[i] *= _s;
278  unroll(expr);
279 #undef expr
280  return *this;
281  }
282 
285  inline vector_type& operator/=(const Scalar& _s) {
286 #define expr(i) Base::values_[i] /= _s;
287  unroll(expr);
288 #undef expr
289  return *this;
290  }
291 
292 
294  inline vector_type operator*(const Scalar& _s) const {
295 #if DIM==N
296  return vector_type(*this) *= _s;
297 #else
298 #define expr(i) Base::values_[i] * _s
299  return vector_type(unroll_csv(expr));
300 #undef expr
301 #endif
302  }
303 
304 
306  inline vector_type operator/(const Scalar& _s) const {
307 #if DIM==N
308  return vector_type(*this) /= _s;
309 #else
310 #define expr(i) Base::values_[i] / _s
311  return vector_type(unroll_csv(expr));
312 #undef expr
313 #endif
314  }
315 
316 
317 
318 
319 
320 
321  //---------------------------------------------------------- vector operators
322 
324  inline vector_type& operator*=(const vector_type& _rhs) {
325 #define expr(i) Base::values_[i] *= _rhs[i];
326  unroll(expr);
327 #undef expr
328  return *this;
329  }
330 
332  inline vector_type& operator/=(const vector_type& _rhs) {
333 #define expr(i) Base::values_[i] /= _rhs[i];
334  unroll(expr);
335 #undef expr
336  return *this;
337  }
338 
340  inline vector_type& operator-=(const vector_type& _rhs) {
341 #define expr(i) Base::values_[i] -= _rhs[i];
342  unroll(expr);
343 #undef expr
344  return *this;
345  }
346 
348  inline vector_type& operator+=(const vector_type& _rhs) {
349 #define expr(i) Base::values_[i] += _rhs[i];
350  unroll(expr);
351 #undef expr
352  return *this;
353  }
354 
355 
357  inline vector_type operator*(const vector_type& _v) const {
358 #if DIM==N
359  return vector_type(*this) *= _v;
360 #else
361 #define expr(i) Base::values_[i] * _v.Base::values_[i]
362  return vector_type(unroll_csv(expr));
363 #undef expr
364 #endif
365  }
366 
367 
369  inline vector_type operator/(const vector_type& _v) const {
370 #if DIM==N
371  return vector_type(*this) /= _v;
372 #else
373 #define expr(i) Base::values_[i] / _v.Base::values_[i]
374  return vector_type(unroll_csv(expr));
375 #undef expr
376 #endif
377  }
378 
379 
381  inline vector_type operator+(const vector_type& _v) const {
382 #if DIM==N
383  return vector_type(*this) += _v;
384 #else
385 #define expr(i) Base::values_[i] + _v.Base::values_[i]
386  return vector_type(unroll_csv(expr));
387 #undef expr
388 #endif
389  }
390 
391 
393  inline vector_type operator-(const vector_type& _v) const {
394 #if DIM==N
395  return vector_type(*this) -= _v;
396 #else
397 #define expr(i) Base::values_[i] - _v.Base::values_[i]
398  return vector_type(unroll_csv(expr));
399 #undef expr
400 #endif
401  }
402 
403 
405  inline vector_type operator-(void) const {
406  vector_type v;
407 #define expr(i) v.Base::values_[i] = -Base::values_[i];
408  unroll(expr);
409 #undef expr
410  return v;
411  }
412 
413 
416  inline VectorT<Scalar,3> operator%(const VectorT<Scalar,3>& _rhs) const
417 #if DIM==3
418  {
419  return
420  VectorT<Scalar,3>(Base::values_[1]*_rhs.Base::values_[2]-Base::values_[2]*_rhs.Base::values_[1],
421  Base::values_[2]*_rhs.Base::values_[0]-Base::values_[0]*_rhs.Base::values_[2],
422  Base::values_[0]*_rhs.Base::values_[1]-Base::values_[1]*_rhs.Base::values_[0]);
423  }
424 #else
425  ;
426 #endif
427 
428 
431  inline Scalar operator|(const vector_type& _rhs) const {
432  Scalar p(0);
433 #define expr(i) p += Base::values_[i] * _rhs.Base::values_[i];
434  unroll(expr);
435 #undef expr
436  return p;
437  }
438 
439 
440 
441 
442 
443  //------------------------------------------------------------ euclidean norm
444 
446 
447  inline Scalar norm() const { return (Scalar)sqrt(sqrnorm()); }
449  inline Scalar length() const { return norm(); } // OpenSG interface
450 
452  inline Scalar sqrnorm() const
453  {
454 #if DIM==N
455  Scalar s(0);
456 #define expr(i) s += Base::values_[i] * Base::values_[i];
457  unroll(expr);
458 #undef expr
459  return s;
460 #else
461 #define expr(i) Base::values_[i]*Base::values_[i]
462  return (unroll_comb(expr, +));
463 #undef expr
464 #endif
465  }
466 
470  inline vector_type& normalize()
471  {
472  *this /= norm();
473  return *this;
474  }
475 
479  inline const vector_type normalized() const
480  {
481  return *this / norm();
482  }
483 
486  inline vector_type& normalize_cond()
487  {
488  Scalar n = norm();
489  if (n != (Scalar)0.0)
490  {
491  *this /= n;
492  }
493  return *this;
494  }
495 
497 
498  //------------------------------------------------------------ euclidean norm
499 
501 
502 
504  inline Scalar l1_norm() const
505  {
506 #if DIM==N
507  Scalar s(0);
508 #define expr(i) s += std::abs(Base::values_[i]);
509  unroll(expr);
510 #undef expr
511  return s;
512 #else
513 #define expr(i) std::abs(Base::values_[i])
514  return (unroll_comb(expr, +));
515 #undef expr
516 #endif
517  }
518 
520  inline Scalar l8_norm() const
521  {
522  return max_abs();
523  }
524 
526 
527  //------------------------------------------------------------ max, min, mean
528 
530 
531 
533  inline Scalar max() const
534  {
535  Scalar m(Base::values_[0]);
536  for(int i=1; i<DIM; ++i) if(Base::values_[i]>m) m=Base::values_[i];
537  return m;
538  }
539 
541  inline Scalar max_abs() const
542  {
543  Scalar m(std::abs(Base::values_[0]));
544  for(int i=1; i<DIM; ++i)
545  if(std::abs(Base::values_[i])>m)
546  m=std::abs(Base::values_[i]);
547  return m;
548  }
549 
550 
552  inline Scalar min() const
553  {
554  Scalar m(Base::values_[0]);
555  for(int i=1; i<DIM; ++i) if(Base::values_[i]<m) m=Base::values_[i];
556  return m;
557  }
558 
560  inline Scalar min_abs() const
561  {
562  Scalar m(std::abs(Base::values_[0]));
563  for(int i=1; i<DIM; ++i)
564  if(std::abs(Base::values_[i])<m)
565  m=std::abs(Base::values_[i]);
566  return m;
567  }
568 
570  inline Scalar mean() const {
571  Scalar m(Base::values_[0]);
572  for(int i=1; i<DIM; ++i) m+=Base::values_[i];
573  return m/Scalar(DIM);
574  }
575 
577  inline Scalar mean_abs() const {
578  Scalar m(std::abs(Base::values_[0]));
579  for(int i=1; i<DIM; ++i) m+=std::abs(Base::values_[i]);
580  return m/Scalar(DIM);
581  }
582 
583 
585  inline vector_type& minimize(const vector_type& _rhs) {
586 #define expr(i) if (_rhs[i] < Base::values_[i]) Base::values_[i] = _rhs[i];
587  unroll(expr);
588 #undef expr
589  return *this;
590  }
591 
593  inline bool minimized(const vector_type& _rhs) {
594  bool result(false);
595 #define expr(i) if (_rhs[i] < Base::values_[i]) { Base::values_[i] = _rhs[i]; result = true; }
596  unroll(expr);
597 #undef expr
598  return result;
599  }
600 
602  inline vector_type& maximize(const vector_type& _rhs) {
603 #define expr(i) if (_rhs[i] > Base::values_[i]) Base::values_[i] = _rhs[i];
604  unroll(expr);
605 #undef expr
606  return *this;
607  }
608 
610  inline bool maximized(const vector_type& _rhs) {
611  bool result(false);
612 #define expr(i) if (_rhs[i] > Base::values_[i]) { Base::values_[i] =_rhs[i]; result = true; }
613  unroll(expr);
614 #undef expr
615  return result;
616  }
617 
619  inline vector_type min(const vector_type& _rhs) const {
620  return vector_type(*this).minimize(_rhs);
621  }
622 
624  inline vector_type max(const vector_type& _rhs) const {
625  return vector_type(*this).maximize(_rhs);
626  }
627 
629 
630  //------------------------------------------------------------ misc functions
631 
633  template<typename Functor>
634  inline vector_type apply(const Functor& _func) const {
635  vector_type result;
636 #define expr(i) result[i] = _func(Base::values_[i]);
637  unroll(expr);
638 #undef expr
639  return result;
640  }
641 
643  vector_type& vectorize(const Scalar& _s) {
644 #define expr(i) Base::values_[i] = _s;
645  unroll(expr);
646 #undef expr
647  return *this;
648  }
649 
650 
652  static vector_type vectorized(const Scalar& _s) {
653  return vector_type().vectorize(_s);
654  }
655 
656 
658  bool operator<(const vector_type& _rhs) const {
659 #define expr(i) if (Base::values_[i] != _rhs.Base::values_[i]) \
660  return (Base::values_[i] < _rhs.Base::values_[i]);
661  unroll(expr);
662 #undef expr
663  return false;
664  }
665 };
666 
667 
668 
670 TEMPLATE_HEADER
671 inline std::istream&
672 operator>>(std::istream& is, VectorT<Scalar,DIM>& vec)
673 {
674 #define expr(i) is >> vec[i];
675  unroll(expr);
676 #undef expr
677  return is;
678 }
679 
680 
682 TEMPLATE_HEADER
683 inline std::ostream&
684 operator<<(std::ostream& os, const VectorT<Scalar,DIM>& vec)
685 {
686 #if DIM==N
687  for(int i=0; i<N-1; ++i) os << vec[i] << " ";
688  os << vec[N-1];
689 #else
690 #define expr(i) vec[i]
691  os << unroll_comb(expr, << " " <<);
692 #undef expr
693 #endif
694 
695  return os;
696 }
697 
698 
699 // ----------------------------------------------------------------------------
700 #endif // included by VectorT.hh
701 //=============================================================================
vector_type operator+(const vector_type &_v) const
component-wise vector addition
Definition: VectorT_inc.hh:381
vector_type operator/(const Scalar &_s) const
component-wise division by with scalar
Definition: VectorT_inc.hh:306
vector_type & operator/=(const vector_type &_rhs)
component-wise self-division
Definition: VectorT_inc.hh:332
vector_type & operator-=(const vector_type &_rhs)
vector difference from this
Definition: VectorT_inc.hh:340
vector_type & operator+=(const vector_type &_rhs)
vector self-addition
Definition: VectorT_inc.hh:348
VectorT(const Scalar _values[N])
construct from a value array (explicit)
Definition: VectorT_inc.hh:172
Scalar mean_abs() const
return absolute arithmetic mean
Definition: VectorT_inc.hh:577
bool operator==(const vector_type &_rhs) const
component-wise comparison
Definition: VectorT_inc.hh:258
vector_type & operator=(const VectorT< otherScalarType, N > &_rhs)
cast from vector with a different scalar type
Definition: VectorT_inc.hh:200
vector_type operator/(const vector_type &_v) const
component-wise vector division
Definition: VectorT_inc.hh:369
vector_type operator*(const Scalar &_s) const
component-wise multiplication with scalar
Definition: VectorT_inc.hh:294
Scalar sqrnorm() const
compute squared euclidean norm
Definition: VectorT_inc.hh:452
Scalar l8_norm() const
compute l8_norm
Definition: VectorT_inc.hh:520
Scalar max_abs() const
return the maximal absolute component
Definition: VectorT_inc.hh:541
vector_type & operator*=(const vector_type &_rhs)
component-wise self-multiplication
Definition: VectorT_inc.hh:324
static size_t size()
returns dimension of the vector
Definition: VectorT_inc.hh:90
static int dim()
returns dimension of the vector (deprecated)
Definition: VectorT_inc.hh:87
const Scalar * data() const
access to const Scalar array
Definition: VectorT_inc.hh:224
Scalar & operator[](size_t _i)
get i'th element read-write
Definition: VectorT_inc.hh:243
Scalar max() const
return the maximal component
Definition: VectorT_inc.hh:533
Scalar operator|(const vector_type &_rhs) const
compute scalar product
Definition: VectorT_inc.hh:431
Definition: VectorT_inc.hh:72
vector_type apply(const Functor &_func) const
component-wise apply function object with Scalar operator()(Scalar).
Definition: VectorT_inc.hh:634
vector_type & maximize(const vector_type &_rhs)
maximize values: same as *this = max(*this, _rhs), but faster
Definition: VectorT_inc.hh:602
VectorT(const VectorT< otherScalarType, N > &_rhs)
copy & cast constructor (explicit)
Definition: VectorT_inc.hh:189
const vector_type normalized() const
return normalized vector
Definition: VectorT_inc.hh:479
vector_type operator*(const vector_type &_v) const
component-wise vector multiplication
Definition: VectorT_inc.hh:357
VectorT()
default constructor creates uninitialized values.
Definition: VectorT_inc.hh:98
bool operator!=(const vector_type &_rhs) const
component-wise comparison
Definition: VectorT_inc.hh:266
vector_type operator-(const vector_type &_v) const
component-wise vector difference
Definition: VectorT_inc.hh:393
vector_type operator-(void) const
unary minus
Definition: VectorT_inc.hh:405
static vector_type vectorized(const Scalar &_s)
store the same value in each component
Definition: VectorT_inc.hh:652
VectorT< Scalar, N > vector_type
type of this vector
Definition: VectorT_inc.hh:84
vector_type & minimize(const vector_type &_rhs)
minimize values: same as *this = min(*this, _rhs), but faster
Definition: VectorT_inc.hh:585
vector_type & vectorize(const Scalar &_s)
store the same value in each component (e.g. to clear all entries)
Definition: VectorT_inc.hh:643
vector_type & operator*=(const Scalar &_s)
component-wise self-multiplication with scalar
Definition: VectorT_inc.hh:276
vector_type & normalize()
normalize vector, return normalized vector
Definition: VectorT_inc.hh:470
bool operator<(const vector_type &_rhs) const
lexicographical comparison
Definition: VectorT_inc.hh:658
Scalar length() const
compute euclidean norm
Definition: VectorT_inc.hh:449
Scalar min_abs() const
return the minimal absolute component
Definition: VectorT_inc.hh:560
Scalar value_type
the type of the scalar used in this template
Definition: VectorT_inc.hh:81
bool maximized(const vector_type &_rhs)
maximize values and signalize coordinate maximization
Definition: VectorT_inc.hh:610
Scalar l1_norm() const
compute L1 (Manhattan) norm
Definition: VectorT_inc.hh:504
vector_type & normalize_cond()
normalize vector, return normalized vector and avoids div by zero
Definition: VectorT_inc.hh:486
const Scalar & operator[](size_t _i) const
get i'th element read-only
Definition: VectorT_inc.hh:248
bool minimized(const vector_type &_rhs)
minimize values and signalize coordinate minimization
Definition: VectorT_inc.hh:593
vector_type & operator/=(const Scalar &_s)
component-wise self-division by scalar
Definition: VectorT_inc.hh:285
Scalar min() const
return the minimal component
Definition: VectorT_inc.hh:552
vector_type max(const vector_type &_rhs) const
component-wise max
Definition: VectorT_inc.hh:624
vector_type min(const vector_type &_rhs) const
component-wise min
Definition: VectorT_inc.hh:619
Scalar mean() const
return arithmetic mean
Definition: VectorT_inc.hh:570

Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .