VF_insertVD_insertVE_insert
VCF_insertVCD_insertVCE_insert
VPF_insertVPD_insertVPE_insert
VI_insertVBI_insertVSI_insertVLI_insertVQI_insert 
VU_insertVUB_insertVUS_insertVUL_insertVUQ_insertVUI_insert
FunctionInsert an element into a vector
Syntax C/C++#include <VFstd.h>
void VF_insert( fVector X, ui size, ui pos, float C );
C++ VecObj#include <OptiVec.h>
void vector<T>::insert( ui pos, const T& C );
Pascal/Delphiuses VFstd;
procedure VF_insert( X:fVector; size, pos:UIntSize; C:Single );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_insert( fVector d_X, ui size, ui pos, float C );
int cusdVF_insert( fVector d_X, ui size, ui pos, float *d_C );
void VFcu_insert( fVector h_X, ui size, ui pos, float C );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_insert( d_X:fVector; size, pos:UIntSize; C:Single ): IntBool;
function cusdVF_insert( d_X:fVector; size, pos:UIntSize; d_C:PSingle ): IntBool;
procedure VFcu_insert( h_X:fVector; size, pos:UIntSize; C:Single );

   (no VFcu_indput function available - neither for C/C++ nor for Pascal/Delphi!)
DescriptionThis is one of the few functions where the input vector is changed itself (instead of being mapped onto an output vector). A new element is inserted at the position pos and has the value C. Elements before pos are unchanged, elements from pos on are shifted one position higher; the last element is lost. (If you wish to save the last element, choose size big enough to have a dummy element at the end of the vector; now it will be the dummy that gets lost.)
Error handlingnone
Return valuenone
See alsoVF_delete,   VF_rotate

VectorLib Table of Contents  OptiVec home