Visual Servoing Platform  version 3.0.0
vpColVector.cpp
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Provide some simple operation on column vectors.
32  *
33  * Authors:
34  * Eric Marchand
35  *
36  *****************************************************************************/
37 
38 
45 #include <stdio.h>
46 #include <string.h>
47 #include <stdlib.h>
48 #include <cmath> // std::fabs
49 #include <limits> // numeric_limits
50 #include <string.h>
51 #include <math.h>
52 #include <sstream>
53 #include <assert.h>
54 
55 #include <visp3/core/vpColVector.h>
56 #include <visp3/core/vpException.h>
57 #include <visp3/core/vpMath.h>
58 #include <visp3/core/vpDebug.h>
59 #include <visp3/core/vpRotationVector.h>
60 
61 
65 {
66  if (getRows() != v.getRows() ) {
68  "Cannot add (%dx1) column vector to (%dx1) column vector",
69  getRows(), v.getRows())) ;
70  }
72 
73  for (unsigned int i=0;i<rowNum;i++)
74  r[i] = (*this)[i] + v[i];
75  return r;
76 }
77 
81 {
82  if (getRows() != v.getRows() ) {
84  "Cannot add (%dx1) column vector to (%dx1) column vector",
85  getRows(), v.getRows())) ;
86  }
87 
88  for (unsigned int i=0;i<rowNum;i++)
89  (*this)[i] += v[i];
90  return (*this);
91 }
95 {
96  if (getRows() != v.getRows() ) {
98  "Cannot substract (%dx1) column vector to (%dx1) column vector",
99  getRows(), v.getRows())) ;
100  }
101 
102  for (unsigned int i=0;i<rowNum;i++)
103  (*this)[i] -= v[i];
104  return (*this);
105 }
106 
107 
115 double
117 {
118  if (size() != v.size()) {
120  "Cannot compute the dot product between column vectors with different dimensions (%d) and (%d)",
121  size(), v.size()));
122  }
123  double r = 0 ;
124 
125  for (unsigned int i=0;i<rowNum;i++)
126  r += (*this)[i] * v[i];
127  return r;
128 }
129 
140 {
141  vpMatrix M(rowNum, v.getCols());
142  for (unsigned int i=0; i<rowNum; i++) {
143  for (unsigned int j=0; j<v.getCols(); j++) {
144  M[i][j] = (*this)[i] * v[j];
145  }
146  }
147  return M;
148 }
149 
152 {
153  if (getRows() != m.getRows() ) {
155  "Bad size during vpColVector (%dx1) and vpColVector (%dx1) substraction",
156  getRows(), m.getRows())) ;
157  }
158  vpColVector v(rowNum);
159 
160  for (unsigned int i=0;i<rowNum;i++)
161  v[i] = (*this)[i] - m[i];
162  return v;
163 }
164 
177 vpColVector::vpColVector (const vpColVector &v, unsigned int r, unsigned int nrows)
178  : vpArray2D<double>(nrows, 1)
179 {
180  init(v, r, nrows);
181 }
182 
218 void
219 vpColVector::init(const vpColVector &v, unsigned int r, unsigned int nrows)
220 {
221  unsigned int rnrows = r+nrows ;
222 
223  if (rnrows > v.getRows())
225  "Bad row dimension (%d > %d) used to initialize vpColVector",
226  rnrows, v.getRows()));
227  resize(nrows);
228 
229  if (this->rowPtrs == NULL) // Fix coverity scan: explicit null dereferenced
230  return; // Noting to do
231  for (unsigned int i=r ; i < rnrows; i++)
232  (*this)[i-r] = v[i];
233 }
234 
236  : vpArray2D<double>(v.size(), 1)
237 {
238  for (unsigned int i=0; i< v.size(); i++)
239  (*this)[i] = v[i];
240 }
241 
243  : vpArray2D<double>(p.size(), 1)
244 {
245  for (unsigned int i=0; i< p.size(); i++)
246  (*this)[i] = p[i];
247 }
248 
250  : vpArray2D<double>(v.size(), 1)
251 {
252  for (unsigned int i=0; i< v.size(); i++)
253  (*this)[i] = v[i];
254 }
255 
257 vpColVector::vpColVector (const vpMatrix &M, unsigned int j)
258  : vpArray2D<double>(M.getRows(), 1)
259 {
260  for(unsigned int i=0; i< M.getCols(); i++)
261  (*this)[i] = M[i][j];
262 }
263 
270  : vpArray2D<double>(M.getRows(), 1)
271 {
272  if(M.getCols()!=1) {
274  "Cannot construct a (%dx1) row vector from a (%dx%d) matrix",
275  M.getRows(), M.getRows(), M.getCols())) ;
276  }
277 
278  for(unsigned int i=0; i< M.getRows(); i++)
279  (*this)[i] = M[i][0];
280 }
281 
285 vpColVector::vpColVector (const std::vector<double> &v)
286  : vpArray2D<double>(1, (unsigned int)v.size())
287 {
288  for(unsigned int i=0; i< v.size(); i++)
289  (*this)[i] = v[i];
290 }
294 vpColVector::vpColVector (const std::vector<float> &v)
295  : vpArray2D<double>(1, (unsigned int)v.size())
296 {
297  for(unsigned int i=0; i< v.size(); i++)
298  (*this)[i] = (double)(v[i]);
299 }
300 
312 {
313  vpColVector A ;
314  try {
315  A.resize(rowNum) ;
316  }
317  catch(vpException &/*e*/)
318  {
319  vpERROR_TRACE("Error caught") ;
320  throw ;
321  }
322 
323  double *vd = A.data ; double *d = data ;
324 
325  for (unsigned int i=0; i<rowNum; i++)
326  *(vd++)= - (*d++);
327 
328  return A;
329 }
330 
351 {
352  vpColVector v(rowNum);
353 
354  double *vd = v.data ; double *d = data ;
355 
356  for (unsigned int i=0;i<rowNum;i++)
357  *(vd++) = (*d++) * x;
358  return v;
359 }
360 
379 {
380  for (unsigned int i=0;i<rowNum;i++)
381  (*this)[i] *= x;
382  return (*this);
383 }
384 
403 {
404  for (unsigned int i=0;i<rowNum;i++)
405  (*this)[i] /= x;
406  return (*this);
407 }
408 
429 {
430  vpColVector v(rowNum);
431 
432  double *vd = v.data ; double *d = data ;
433 
434  for (unsigned int i=0;i<rowNum;i++)
435  *(vd++) = (*d++) / x;
436  return v;
437 }
438 
445 {
446  if (M.getCols() !=1) {
448  "Cannot transform a (%dx%d) matrix into a column vector",
449  M.getRows(), M.getCols()));
450  }
451 
452  try {
453  resize(M.getRows());
454  }
455  catch(...) {
456  throw ;
457  }
458 
459  memcpy(data, M.data, rowNum*sizeof(double)) ;
460 
461  return (*this);
462 }
463 
467 vpColVector & vpColVector::operator=(const std::vector<double> &v)
468 {
469  resize((unsigned int)v.size());
470  for(unsigned int i=0; i<v.size(); i++)
471  (*this)[i] = v[i];
472  return *this;
473 }
477 vpColVector & vpColVector::operator=(const std::vector<float> &v)
478 {
479  resize((unsigned int)v.size());
480  for(unsigned int i=0; i<v.size(); i++)
481  (*this)[i] = (float)v[i];
482  return *this;
483 }
484 
486 {
487  unsigned int k = v.rowNum ;
488  if (rowNum != k){
489  try {
490  resize(k);
491  }
492  catch(...)
493  {
494  throw ;
495  }
496  }
497 
498  memcpy(data, v.data, rowNum*sizeof(double)) ;
499  return *this;
500 }
501 
506 {
507  unsigned int k = tv.getRows() ;
508  if (rowNum != k){
509  try {
510  resize(k);
511  }
512  catch(...)
513  {
514  throw ;
515  }
516  }
517 
518  memcpy(data, tv.data, rowNum*sizeof(double)) ;
519  return *this;
520 }
525 {
526  unsigned int k = rv.getRows() ;
527  if (rowNum != k){
528  try {
529  resize(k);
530  }
531  catch(...)
532  {
533  throw ;
534  }
535  }
536 
537  memcpy(data, rv.data, rowNum*sizeof(double)) ;
538  return *this;
539 }
544 {
545  unsigned int k = p.getRows() ;
546  if (rowNum != k){
547  try {
548  resize(k);
549  }
550  catch(...)
551  {
552  throw ;
553  }
554  }
555 
556  memcpy(data, p.data, rowNum*sizeof(double)) ;
557  return *this;
558 }
559 
581 {
582  *this = v;
583  return *this;
584 }
585 
611 {
612  for (unsigned int i=0; i<rowNum; i++) {
613  for (unsigned int j=0; j<colNum; j++) {
614  rowPtrs[i][j] = *x++;
615  }
616  }
617  return *this;
618 }
619 
622 {
623  double *d = data ;
624 
625  for (unsigned int i=0;i<rowNum;i++)
626  *(d++)= x ;
627  return *this;
628 }
629 
634 {
635  vpRowVector v(rowNum);
636  memcpy(v.data, data, rowNum*sizeof(double)) ;
637  return v;
638 }
639 
645 {
646  return t();
647 }
648 
654 {
655  v = t();
656 }
657 
658 
663 vpColVector operator*(const double &x, const vpColVector &v)
664 {
665  vpColVector vout ;
666  vout = v*x ;
667  return vout ;
668 }
669 
676 double
678 {
679  if (a.data==NULL) {
681  "Cannot compute the dot product: first vector empty")) ;
682  }
683  if (b.data==NULL) {
685  "Cannot compute the dot product: second vector empty")) ;
686  }
687  if (a.size() != b.size()) {
689  "Cannot compute the dot product between column vectors with different dimensions (%d) and (%d)",
690  a.size(), b.size()));
691  }
692 
693  double *ad = a.data ; double *bd = b.data ;
694 
695  double c = 0 ;
696  for (unsigned int i=0 ; i < a.getRows() ; i++)
697  c += *(ad++)* *(bd++) ;
698  // vpMatrix c = (a.t() * b);
699  // return c[0][0];
700  return c ;
701 }
702 
711  {
712  x = x/sqrt(x.sumSquare());
713 
714  return x;
715  }
716 
717 
726 {
727 
728  double sum_square = sumSquare();
729 
730  //if (sum != 0.0)
731  if (std::fabs(sum_square) > std::numeric_limits<double>::epsilon())
732  *this /= sqrt(sum_square) ;
733 
734  // If sum = 0, we have a nul vector. So we return just.
735  return *this;
736 }
737 
744 {
745  if (v.data==NULL) {
747  "Cannot sort content of column vector: vector empty")) ;
748  }
749  vpColVector tab ;
750  tab = v ;
751  unsigned int nb_permutation = 1 ;
752  unsigned int i = 0 ;
753  while (nb_permutation !=0 )
754  {
755  nb_permutation = 0 ;
756  for (unsigned int j = v.getRows()-1 ; j >= i+1 ; j--)
757  {
758  if ((tab[j]>tab[j-1]))
759  {
760  double tmp = tab[j] ;
761  tab[j] = tab[j-1] ;
762  tab[j-1] = tmp ;
763  nb_permutation++ ;
764  }
765  }
766  i++ ;
767  }
768 
769  return tab ;
770 }
771 
778 {
779  if (v.data==NULL) {
781  "Cannot sort content of column vector: vector empty")) ;
782  }
783  vpColVector tab ;
784  tab = v ;
785  unsigned int nb_permutation = 1 ;
786  unsigned int i = 0 ;
787  while (nb_permutation !=0 )
788  {
789  nb_permutation = 0 ;
790  for (unsigned int j = v.getRows()-1 ; j >= i+1 ; j--)
791  {
792  if ((tab[j]<tab[j-1]))
793  {
794  double tmp = tab[j] ;
795  tab[j] = tab[j-1] ;
796  tab[j-1] = tmp ;
797  nb_permutation++ ;
798  }
799  }
800  i++ ;
801  }
802 
803  return tab ;
804 }
805 
822 void vpColVector::stack(const double &d)
823 {
824  this->resize(rowNum+1,false);
825  (*this)[rowNum-1] = d;
826 }
827 
848 {
849  *this = vpColVector::stack(*this, v);
850 }
851 
871 {
872  vpColVector C;
873  vpColVector::stack(A, B, C);
874  return C;
875 }
876 
896 {
897  unsigned int nrA = A.getRows();
898  unsigned int nrB = B.getRows();
899 
900  if (nrA == 0 && nrB == 0) {
901  C.resize(0);
902  return;
903  }
904 
905  if (nrB == 0) {
906  C = A;
907  return;
908  }
909 
910  if (nrA == 0) {
911  C = B;
912  return;
913  }
914 
915  // General case
916  C.resize(nrA + nrB);
917 
918  for (unsigned int i=0; i<nrA; i++)
919  C[i] = A[i];
920 
921  for (unsigned int i=0; i<nrB; i++)
922  C[nrA+i] = B[i];
923 }
924 
929 {
930  if (v.data==NULL) {
932  "Cannot compute column vector mean: vector empty")) ;
933  }
934  double mean = 0 ;
935  double *vd = v.data ;
936  for (unsigned int i=0 ; i < v.getRows() ; i++)
937  mean += *(vd++) ;
938 
939  return mean/v.getRows();
940 }
941 
945 double
947 {
948  if (v.data==NULL) {
950  "Cannot compute column vector median: vector empty")) ;
951  }
952 
953  std::vector<double> vectorOfDoubles(v.size());
954  for(unsigned int i = 0; i < v.size(); i++) {
955  vectorOfDoubles[i] = v[i];
956  }
957 
958  return vpMath::getMedian(vectorOfDoubles);
959 }
960 
964 double
965 vpColVector::stdev(const vpColVector &v, const bool useBesselCorrection)
966 {
967  if (v.data==NULL) {
969  "Cannot compute column vector stdev: vector empty")) ;
970  }
971 
972  double mean_value = mean(v);
973  double sum_squared_diff = 0.0;
974  for(unsigned int i = 0; i < v.size(); i++) {
975  sum_squared_diff += (v[i]-mean_value) * (v[i]-mean_value);
976  }
977 
978  double divisor = (double) v.size();
979  if(useBesselCorrection && v.size() > 1) {
980  divisor = divisor-1;
981  }
982 
983  return std::sqrt(sum_squared_diff / divisor);
984 }
985 
1000 vpMatrix
1002 {
1003  vpMatrix M ;
1004  if (v.getRows() != 3) {
1006  "Cannot compute skew vector of a non 3-dimention vector (%d)",
1007  v.getRows())) ;
1008  }
1009 
1010  M.resize(3,3) ;
1011  M[0][0] = 0 ; M[0][1] = -v[2] ; M[0][2] = v[1] ;
1012  M[1][0] = v[2] ; M[1][1] = 0 ; M[1][2] = -v[0] ;
1013  M[2][0] = -v[1] ; M[2][1] = v[0] ; M[2][2] = 0 ;
1014 
1015  return M ;
1016 }
1017 
1028 {
1029  if (a.getRows() != 3 || b.getRows() != 3) {
1031  "Cannot compute the cross product between column vector with dimension %d and %d",
1032  a.getRows(), b.getRows()));
1033  }
1034 
1035  return vpColVector::skew(a) * b;
1036 }
1037 
1038 
1045 vpMatrix vpColVector::reshape(const unsigned int &nrows,const unsigned int &ncols){
1046  vpMatrix M(nrows, ncols);
1047  reshape(M, nrows, ncols);
1048  return M;
1049 }
1050 
1057 void vpColVector::reshape(vpMatrix & M,const unsigned int &nrows,const unsigned int &ncols){
1058  if(dsize!=nrows*ncols) {
1060  "Cannot reshape (%dx1) column vector in (%dx%d) matrix",
1061  rowNum, M.getRows(), M.getCols())) ;
1062  }
1063  try {
1064  if ((M.getRows() != nrows) || (M.getCols() != ncols)) M.resize(nrows,ncols);
1065  }
1066  catch(...) {
1067  throw ;
1068  }
1069 
1070  for(unsigned int j =0; j< ncols; j++)
1071  for(unsigned int i =0; i< nrows; i++)
1072  M[i][j]=data[j*ncols+i];
1073 }
1074 
1107 void vpColVector::insert(unsigned int i, const vpColVector &v)
1108 {
1109  if (i+v.size() > this->size())
1110  throw(vpException(vpException::dimensionError, "Unable to insert a column vector"));
1111  for (unsigned int j=0; j < v.size(); j++)
1112  (*this)[i+j] = v[j];
1113 }
1114 
1134 int
1135 vpColVector::print(std::ostream& s, unsigned int length, char const* intro) const
1136 {
1137  typedef std::string::size_type size_type;
1138 
1139  unsigned int m = getRows();
1140  unsigned int n = 1;
1141 
1142  std::vector<std::string> values(m*n);
1143  std::ostringstream oss;
1144  std::ostringstream ossFixed;
1145  std::ios_base::fmtflags original_flags = oss.flags();
1146 
1147  // ossFixed <<std::fixed;
1148  ossFixed.setf ( std::ios::fixed, std::ios::floatfield );
1149 
1150  size_type maxBefore=0; // the length of the integral part
1151  size_type maxAfter=0; // number of decimals plus
1152  // one place for the decimal point
1153  for (unsigned int i=0;i<m;++i) {
1154  oss.str("");
1155  oss << (*this)[i];
1156  if (oss.str().find("e")!=std::string::npos){
1157  ossFixed.str("");
1158  ossFixed << (*this)[i];
1159  oss.str(ossFixed.str());
1160  }
1161 
1162  values[i]=oss.str();
1163  size_type thislen=values[i].size();
1164  size_type p=values[i].find('.');
1165 
1166  if (p==std::string::npos){
1167  maxBefore=vpMath::maximum(maxBefore, thislen);
1168  // maxAfter remains the same
1169  } else{
1170  maxBefore=vpMath::maximum(maxBefore, p);
1171  maxAfter=vpMath::maximum(maxAfter, thislen-p-1);
1172  }
1173 
1174  }
1175 
1176  size_type totalLength=length;
1177  // increase totalLength according to maxBefore
1178  totalLength=vpMath::maximum(totalLength,maxBefore);
1179  // decrease maxAfter according to totalLength
1180  maxAfter=std::min(maxAfter, totalLength-maxBefore);
1181  if (maxAfter==1) maxAfter=0;
1182 
1183  // the following line is useful for debugging
1184  //std::cerr <<totalLength <<" " <<maxBefore <<" " <<maxAfter <<"\n";
1185 
1186  if (intro) s <<intro;
1187  s <<"["<<m<<","<<n<<"]=\n";
1188 
1189  for (unsigned int i=0;i<m;i++) {
1190  s <<" ";
1191  size_type p=values[i].find('.');
1192  s.setf(std::ios::right, std::ios::adjustfield);
1193  s.width((std::streamsize)maxBefore);
1194  s <<values[i].substr(0,p).c_str();
1195 
1196  if (maxAfter>0){
1197  s.setf(std::ios::left, std::ios::adjustfield);
1198  if (p!=std::string::npos){
1199  s.width((std::streamsize)maxAfter);
1200  s <<values[i].substr(p,maxAfter).c_str();
1201  } else{
1202  assert(maxAfter>1);
1203  s.width((std::streamsize)maxAfter);
1204  s <<".0";
1205  }
1206  }
1207 
1208  s <<' ';
1209 
1210  s <<std::endl;
1211  }
1212 
1213  s.flags(original_flags); // restore s to standard state
1214 
1215  return (int)(maxBefore+maxAfter);
1216 }
1217 
1224 {
1225  double sum_square=0.0;
1226  double x ;
1227 
1228  for (unsigned int i=0;i<rowNum;i++) {
1229  x=rowPtrs[i][0];
1230  sum_square += x*x;
1231  }
1232 
1233  return sum_square;
1234 }
1235 
1243 {
1244  double norm=0.0;
1245  double x ;
1246  for (unsigned int i=0;i<dsize;i++) {
1247  x = *(data +i); norm += x*x;
1248  }
1249 
1250  return sqrt(norm);
1251 }
1252 
1264 {
1265  double norm=0.0;
1266  double x ;
1267  for (unsigned int i=0;i<rowNum;i++){
1268  x = fabs ( (*this)[i] ) ;
1269  if (x > norm) {
1270  norm = x;
1271  }
1272  }
1273  return norm;
1274 }
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:92
Implementation of a generic rotation vector.
vp_deprecated void init()
Definition: vpColVector.h:286
static vpColVector invSort(const vpColVector &v)
void stack(const double &d)
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
Definition: vpArray2D.h:167
static vpColVector sort(const vpColVector &v)
static double stdev(const vpColVector &v, const bool useBesselCorrection=false)
double euclideanNorm() const
Implementation of row vector and the associated operations.
Definition: vpRowVector.h:70
static double getMedian(const std::vector< double > &v)
Definition: vpMath.cpp:217
vpColVector operator*(const double &x, const vpColVector &v)
vpColVector operator/(const double x) const
#define vpERROR_TRACE
Definition: vpDebug.h:391
vpColVector operator+(const vpColVector &v) const
Operator that allows to add two column vectors.
Definition: vpColVector.cpp:64
error that can be emited by ViSP classes.
Definition: vpException.h:73
Type * data
Address of the first element of the data array.
Definition: vpArray2D.h:84
Implementation of a generic 2D array used as vase class of matrices and vectors.
Definition: vpArray2D.h:70
vpColVector & operator*=(double x)
unsigned int size() const
Return the number of elements of the 2D array.
Definition: vpArray2D.h:156
unsigned int getCols() const
Return the number of columns of the 2D array.
Definition: vpArray2D.h:154
vpColVector operator-() const
static double median(const vpColVector &v)
static Type maximum(const Type &a, const Type &b)
Definition: vpMath.h:141
vpColVector & operator/=(double x)
int print(std::ostream &s, unsigned int length, char const *intro=0) const
unsigned int rowNum
Number of rows in the array.
Definition: vpArray2D.h:74
double infinityNorm() const
vpColVector & normalize()
vpRowVector t() const
vpColVector & operator<<(const vpColVector &v)
static double mean(const vpColVector &v)
unsigned int getRows() const
Return the number of rows of the 2D array.
Definition: vpArray2D.h:152
vpColVector & operator-=(vpColVector v)
Operator that allows to substract two column vectors.
Definition: vpColVector.cpp:94
unsigned int colNum
Number of columns in the array.
Definition: vpArray2D.h:76
void insert(unsigned int i, const vpColVector &v)
double sumSquare() const
vpColVector & operator=(const vpColVector &v)
Copy operator. Allow operation such as A = v.
vpColVector & operator+=(vpColVector v)
Operator that allows to add two column vectors.
Definition: vpColVector.cpp:80
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
static double dotProd(const vpColVector &a, const vpColVector &b)
vpRowVector transpose() const
Implementation of a pose vector and operations on poses.
Definition: vpPoseVector.h:93
vpColVector()
Basic constructor that creates an empty 0-size column vector.
Definition: vpColVector.h:78
static vpMatrix skew(const vpColVector &v)
unsigned int dsize
Current array size (rowNum * colNum)
Definition: vpArray2D.h:80
void reshape(vpMatrix &M, const unsigned int &nrows, const unsigned int &ncols)
static vpColVector crossProd(const vpColVector &a, const vpColVector &b)
double operator*(const vpColVector &x) const
Class that consider the case of a translation vector.
double ** rowPtrs
Address of the first element of each rows.
Definition: vpArray2D.h:78
void resize(const unsigned int i, const bool flagNullify=true)
Definition: vpColVector.h:217