---------------------------------------------------------------- lines 399-429 of file: include/cppad/example/valvector/class.hpp ---------------------------------------------------------------- {xrst_begin valvector_element} Accessing Elements of a valvector ################################# Returns a reference to the specified element of this valvector. Prototype ********* {xrst_literal , // BEGIN_ELEMENT , // END_ELEMENT // BEGIN_CONST_ELEMENT , // END_CONST_ELEMENT } j * This is the index of the element we are accessing. #. If the size this valvector is one, *j* can have any value and the return is the single element in this valvector. #. If the size of this valvector is not one, *j* must be less than its size and the return is the j-th element in this valvector. {xrst_toc_hidden example/valvector/element.cpp } Example ======= The file :ref:`valvector_element.cpp-name` is an example and test of valvector element access. {xrst_end valvector_element}