MCPcopy Create free account
hub / github.com/coin-or/CppAD / resize

Method resize

include/cppad/example/valvector/class.hpp:279–288  ·  view source on GitHub ↗

---------------------------------------------------------------------------- {xrst_begin valvector_resize} {xrst_spell valvectors } Resize a valvector ################## Sets the size of this valvector. Prototype ********* {xrst_literal , // BEGIN_RESIZE , // END_RESIZE } Use *** This size of a valvector directly after its :ref:`constructor<

Source from the content-addressed store, hash-verified

277 */
278 // BEGIN_RESIZE
279 void resize(size_t n)
280 // END_RESIZE
281 { assert( n != 0 );
282 if( n == size() )
283 return;
284 if( n == 1 )
285 vec_.clear();
286 else
287 vec_.resize(n);
288 }
289 /*
290 ----------------------------------------------------------------------------
291 {xrst_begin valvector_assign}

Callers 15

hes_sparsityMethod · 0.45
jac_sparsityMethod · 0.45
extend_odeMethod · 0.45
jac_sparsityMethod · 0.45
reverse_oneMethod · 0.45
hes_sparsityMethod · 0.45
jac_sparsityMethod · 0.45
reverseMethod · 0.45
jac_sparsityMethod · 0.45
hes_sparsityMethod · 0.45
forwardMethod · 0.45
jac_sparsityMethod · 0.45

Calls 2

sizeFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected