\(\newcommand{\W}[1]{ \; #1 \; }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }\) \(\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }\) \(\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }\) \(\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }\)
valvector_ctor¶
View page sourceThe valvector Constructors¶
Creates a valvector (called x below).
Syntax¶
valvector
xvalvector
x*( *s )valvector
x*( *v )valvector
x*( { *s0 , s1 , … } )Default¶
The default constructor (no argument) creates the valvector x with one element using the 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 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 scalar_type . This create a valvector with size equal the length of the list and j-th element equal to sj .
Example¶
The file valvector_ctor.cpp is an example and test of these constructors.