---------------------------------------------------------------- lines 136-188 of file: include/cppad/example/valvector/class.hpp ---------------------------------------------------------------- {xrst_begin valvector_ctor} {xrst_spell initializer sj } The valvector Constructors ########################## Creates a valvector (called *x* below). Syntax ****** | ``valvector`` *x* | ``valvector`` *x*( *s* ) | ``valvector`` *x*( *v* ) | ``valvector`` *x*( { *s0* , *s1* , ... } ) Default ******* The default constructor (no argument) creates the valvector *x* with one element using the :ref:`valvector@scalar_type` default constructor. Scalar ****** The scalar constructor (argument is *s* ) creates the valvector *x* with one element that is equal to *scalar_type* ( *s* ), where *s* has type :ref:`valvector@scalar_type` , `int``, ``long int``, ``double``, ``long_double`` or ``size_t`` . Vector ****** The vector constructor (argument is *v*) creates a copy of the valvector *v* . List **** In the standard initializer list constructor ( argument is { *s0* , *s1* , .. } ) *s0* , *s1* , have valvector :ref:`valvector@scalar_type` . This create a valvector with size equal the length of the list and j-th element equal to *sj* . {xrst_toc_hidden example/valvector/ctor.cpp } Example ======= The file :ref:`valvector_ctor.cpp-name` is an example and test of these constructors. {xrst_end valvector_ctor}