VF_subvectorVD_subvectorVE_subvector
VCF_subvectorVCD_subvectorVCE_subvector
VPF_subvectorVPD_subvectorVPE_subvector
VI_subvectorVBI_subvectorVSI_subvectorVLI_subvectorVQI_subvector 
VU_subvectorVUB_subvectorVUS_subvectorVUL_subvectorVUQ_subvectorVUI_subvector
FunctionExtract a sub-vector from the input vector
Syntax C/C++#include <VFstd.h>
void VF_subvector( fVector Y, ui subsize, fVector X, int samp );
C++ VecObj#include <OptiVec.h>
void vector<T>::subvector( const vector<T>& X, int samp, ui start=0 );
Pascal/Delphiuses VFstd;
procedure VF_subvector( Y:fVector; sizey:UIntSize; X:fVector; samp:Integer );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_subvector( fVector d_Y, ui subsize, fVector d_X, int samp );
void VFcu_subvector( fVector h_Y, ui subsize, fVector h_X, int samp );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_subvector( d_Y:fVector; sizey:UIntSize; d_X:fVector; samp:Integer ): IntBool;
procedure VFcu_subvector( h_Y:fVector; sizey:UIntSize; h_X:fVector; samp:Integer );
DescriptionYi = Xi*samp
A sub-vector Y is extracted from X with a sampling interval samp. This means that every samp'th element is taken, up to a total of subsize elements, starting with the zero'th element of X. Since X may be an expression like XX+1000 (C/C++) or VF_Pelement( XX, 1000 ) (Pascal/Delphi), samp does not always need to be positive, but may also take on negative values (or the trivial value of 0). X and Y have to be distinct. Instead of using a samp of 0, 1, or −1, one should use VF_equC,   VF_equV, or VF_rev, respectively.
The VecObj version is called with an additional argument start, denoting the element of X to start with. This is necessary to avoid input expressions like XX+1000, which are possible only with pointers, but would be mis-interpreted as the operator + in the class-based object-oriented interface.
Error handlingnone
Return valuenone
See alsoVF_indpick,   VF_CtoRe

VectorLib Table of Contents  OptiVec home