Prev Next

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} }@)@
Size of a Vector

Syntax
n = v.size()

v
The object v has one of the following prototypes:
     const vec_bool&      
v
     const vec_int&       
v
     const vec_double&    
v
     const vec_a_double&  
v

n
The result has prototype
     size_t 
n
i.e., it is a positive integer. Its value is the number of elements in the vector v .

Example
C++ , Octave , Perl , Python .
Input File: lib/vector.omh