\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
vector_ctor#
View page sourceCppAD Py Vector Constructors#
Syntax#
C++#
cppad_py::vec_bool bv ( n )cppad_py::vec_int iv ( n )cppad_py::vec_double dv ( n )cppad_py::vec_a_double av ( n )Python#
bv =
cppad_py.vec_bool ( n )iv =
cppad_py.vec_int ( n )dv =
cppad_py.vec_double ( n )av =
cppad_py.vec_a_double ( n )Purpose#
Creates a vector with n elements.
n#
The argument n is a non-negative integer with default value zero;
i.e., if it is not present, zero is used.
(It has c++ prototype size_t n .)
vec_bool#
This result bv is a vector with elements of type bool
vec_int#
This result bv is a vector with elements of type int
vec_double#
This result bv is a vector with elements of type double
vec_a_double#
This result av is a vector with elements of type
a_double.
Example#
All of the other vector examples use the vector constructors.