spLib
Loading...
Searching...
No Matches
spDVector Class Reference

Vector type that contains the elements of double type. More...

#include <sp/vector.h>

Collaboration diagram for spDVector:
Collaboration graph

Public Member Functions

Text I/O for Vector (<sp/fileio.h>)
spBool dvreaddvector_txt (const char *filename, spDVector vector)
 
spDVector xdvreaddvector_txt (const char *filename)
 
spBool dvreadcol_txt (const char *filename, int col, spDVector vector)
 
spDVector xdvreadcol_txt (const char *filename, int col)
 
spBool dvwritedvector_txt (const char *filename, spDVector vector)
 
Vector Modification for I/O (<sp/fileio.h>)
double dvmaxamp (spDVector vec)
 
double dvadjustamp (spDVector vec, double amp)
 
double dvlimitamp (spDVector vec, double amp)
 
spDVector xdvextractchannel (spDVector x, int channel, int num_channel)
 
Vector Dump (<sp/fileio.h>)
void dvdump (spDVector vec)
 
void dvfdump (spDVector vec, FILE *fp)
 
void dvnfdump (FILE *fp,...)
 
Memory Allocation and Deallocation
spDVector xdvalloc (long length)
 
void xdvfree (spDVector vector)
 
spDVector xdvallocul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvalloculfromv (spDVector x, long length)
 
void dvrfree (spDVector x)
 
void dvialloc (spDVector x)
 
void dvifree (spDVector x)
 
spDVector xdvriallocul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvrialloc (long length)
 
spDVector xdvrealloc (spDVector x, long length)
 
Lock and Unlock
spBool dvisplugincomputable (spDVector x)
 
spBool dvislocked (spDVector x)
 
spBool dvlock (spDVector x)
 
spBool dvunlock (spDVector x)
 
spBool dvsetlock (spDVector x, spBool lock)
 
spBool dvsync (spDVector x)
 
Complex Number Handling
spDVector xdvcplx (spDVector xr, spDVector xi)
 
void dvreal (spDVector x)
 
void dvimag (spDVector x)
 
spDVector xdvreal (spDVector x)
 
spDVector xdvimag (spDVector x)
 
void dvconj (spDVector x)
 
spDVector xdvconj (spDVector x)
 
void dvriswap (spDVector x)
 
spDVector xdvriswap (spDVector x)
 
Data Copy
void dvcopy (spDVector y, spDVector x)
 
void dvrcopyi (spDVector y, spDVector x)
 
void dvicopyr (spDVector y, spDVector x)
 
long dvcopyfromarray (spDVector y, long y_offset, double *data, long length)
 
long dvcopyfromriarray (spDVector y, long y_offset, double *data, double *imag, long length)
 
long dvcopytoarray (spDVector x, long x_offset, double *data, long length)
 
long dvcopytoriarray (spDVector x, long x_offset, double *data, double *imag, long length)
 
spSVector xdvtos (spDVector x)
 
spLVector xdvtol (spDVector x)
 
spFVector xdvtof (spDVector x)
 
spDVector xdvclone (spDVector x)
 
spDVector xdvcat (spDVector x, spDVector y)
 
void dvcat (spDVector x, spDVector y)
 
Data Initialization
spBool dvinit (spDVector x, double m, double incr, double n)
 
spDVector xdvinit (double m, double incr, double n)
 
spDVector xdvinitul (spPlugin *plugin, double m, double incr, double n, spBool unlock_flag)
 
spBool dviinit (spDVector x, double m, double incr, double n)
 
spBool dvriinit (spDVector x, double m, double incr, double n)
 
spDVector xdvriinit (double m, double incr, double n)
 
spDVector xdvriinitul (spPlugin *plugin, double m, double incr, double n, spBool unlock_flag)
 
Data Editing
spDVector xdvcut (spDVector x, long offset, long length)
 
long dvpaste (spDVector y, spDVector x, long y_offset, long x_length, spBool overlap)
 
long dvadd (spDVector y, long y_offset, spDVector x, long x_offset, long x_length, spBool overlap)
 
void dverase (spDVector x, long offset, long length, spBool inv)
 
Data Modification
void dvset (spDVector x, double *data, long length)
 
void dviset (spDVector x, double *imag, long length)
 
spDVector xdvsetve (spPlugin *plugin, double *data, long length)
 
spDVector xdvset (double *data, long length)
 
spDVector xdvsetnew (double *data, long length)
 
spBool dvsetval (spDVector x, long index, double value)
 
spBool dvsetival (spDVector x, long index, double value)
 
Absolute Value (<sp/vmath.h>)
void dvabs (spDVector x)
 
spDVector xdvabs (spDVector x)
 
Square Root (<sp/vmath.h>)
void dvsqrt (spDVector x)
 
spDVector xdvsqrt (spDVector x)
 
Square (<sp/vmath.h>)
void dvsquare (spDVector x)
 
spDVector xdvsquare (spDVector x)
 
Sign Function (<sp/vmath.h>)
void dvsign (spDVector x)
 
spDVector xdvsign (spDVector x)
 
Cumulative Sum (<sp/vmath.h>)
void dvcumsum (spDVector x)
 
spDVector xdvcumsum (spDVector x)
 
Cumulative Product (<sp/vmath.h>)
void dvcumprod (spDVector x)
 
spDVector xdvcumprod (spDVector x)
 
Differences (<sp/vmath.h>)
void dvcodiff (spDVector x, double coef)
 
spDVector xdvcodiff (spDVector x, double coef)
 
#define dvdiff(x)   dvcodiff(x, 1.0);
 
#define xdvdiff(x)   xdvcodiff(x, 1.0);
 
Sum (<sp/vmath.h>)
double dvsum (spDVector x)
 
double dvisum (spDVector x)
 
double dvsqsum (spDVector x)
 
double dvabssum (spDVector x)
 
Product (<sp/vmath.h>)
double dvprod (spDVector x)
 
double dvriprod (spDVector x, double *oiprod)
 
Norm (<sp/vmath.h>)
double dvnorm (spDVector x, long p)
 
Dot Product (<sp/vmath.h>)
double dvdot (spDVector x, spDVector y)
 
void dvcplxdot (spDVector x, spDVector y, double *re, double *im)
 
Mean and Variance (<sp/vmath.h>)
double dvvar (spDVector x, double *mean)
 
double dvstd (spDVector x, double *mean)
 
#define dvmean(x)   (dvsum(x) / (double)x->length)
 
Minimum and Maximum (<sp/vmath.h>)
double dvmin (spDVector x, long *index)
 
double dvmax (spDVector x, long *index)
 
void dvscmin (spDVector x, double a)
 
void dvscmax (spDVector x, double a)
 
void dvelmin (spDVector x, spDVector y)
 
void dvelmax (spDVector x, spDVector y)
 
Sort and Median (<sp/vmath.h>)
void dvsort (spDVector x)
 
spDVector xdvsort (spDVector x)
 
spLVector xdvsortidx (spDVector x)
 
double dvmedian (spDVector x)
 
spDVector xdvmedian (spDVector x, double *median)
 
Zero-Crossing Count (<sp/vmath.h>)
long dvzerocross (spDVector x, int slope_sign)
 
Phase Angle (<sp/vmath.h>)
void dvangle (spDVector x)
 
spDVector xdvangle (spDVector x)
 
Trigonometric functions (<sp/vmath.h>)
void dvcos (spDVector x)
 
spDVector xdvcos (spDVector x)
 
void dvsin (spDVector x)
 
spDVector xdvsin (spDVector x)
 
void dvtan (spDVector x)
 
spDVector xdvtan (spDVector x)
 
void dvcosh (spDVector x)
 
spDVector xdvcosh (spDVector x)
 
void dvsinh (spDVector x)
 
spDVector xdvsinh (spDVector x)
 
void dvtanh (spDVector x)
 
spDVector xdvtanh (spDVector x)
 
void dvacos (spDVector x)
 
spDVector xdvacos (spDVector x)
 
void dvasin (spDVector x)
 
spDVector xdvasin (spDVector x)
 
void dvatan (spDVector x)
 
spDVector xdvatan (spDVector x)
 
void dvatan2 (spDVector y, spDVector x, spBool reverse)
 
spDVector xdvatan2 (spDVector y, spDVector x)
 
Exponents and Logarithms (<sp/vmath.h>)
void dvexp (spDVector x)
 
spDVector xdvexp (spDVector x)
 
void dvlog (spDVector x)
 
spDVector xdvlog (spDVector x)
 
void dvlog10 (spDVector x)
 
spDVector xdvlog10 (spDVector x)
 
void dvdecibela (spDVector x)
 
spDVector xdvdecibela (spDVector x)
 
void dvdecibelp (spDVector x)
 
spDVector xdvdecibelp (spDVector x)
 
void dvundecibelp (spDVector x)
 
spDVector xdvundecibelp (spDVector x)
 
void dvdecibel (spDVector x)
 
spDVector xdvdecibel (spDVector x)
 
void dvundecibel (spDVector x)
 
spDVector xdvundecibel (spDVector x)
 
Random Number (<sp/vmath.h>)
void dvrandun (spDVector x)
 
spDVector xdvrandunul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvrandun (long length)
 
void dvgauss (spDVector x, double mu, double sigma)
 
spDVector xdvgaussul (spPlugin *plugin, long length, double mu, double sigma, spBool unlock_flag)
 
spDVector xdvgauss (long length, double mu, double sigma)
 
void dvrandn (spDVector x)
 
spDVector xdvrandnul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvrandn (long length)
 
Vector Operation (<sp/voperate.h>)
void dvoper (spDVector a, const char *op, spDVector b)
 
spDVector xdvoper (spDVector a, const char *op, spDVector b)
 
void dvscoper (spDVector a, const char *op, double t)
 
spDVector xdvscoper (spDVector a, const char *op, double t)
 
void dvcplxoper (spDVector a, const char *op, double tr, double ti)
 
spDVector xdvcplxoper (spDVector a, const char *op, double tr, double ti)
 
Element Reorder (<sp/voperate.h>)
spDVector xdvremap (spDVector x, spLVector map)
 
Element Extraction (<sp/voperate.h>)
spLVector xdvfind (spDVector x)
 
spDVector xdvfindv (spDVector x)
 
Element Comparison (<sp/voperate.h>)
void dvsceval (spDVector x, const char *op, double t)
 
spDVector xdvsceval (spDVector x, const char *op, double t)
 
spLVector xdvscfind (spDVector x, const char *op, double t)
 
spDVector xdvscfindv (spDVector x, const char *op, double t)
 
Blackman Window for Vector (<sp/window.h>)
spDVector xdvblackmanul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvblackman (long length)
 
spDVector xdvnblackmanul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvnblackman (long length)
 
Hamming Window for Vector (<sp/window.h>)
spDVector xdvhammingul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvhamming (long length)
 
spDVector xdvnhammingul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvnhamming (long length)
 
Hanning Window for Vector (<sp/window.h>)
spDVector xdvhanningul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvhanning (long length)
 
spDVector xdvnhanningul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvnhanning (long length)
 
Hann Window for Vector (<sp/window.h>)
spDVector xdvhannul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvhann (long length)
 
spDVector xdvnhannul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvnhann (long length)
 
Gaussian Window for Vector (<sp/window.h>)
spDVector xdvgausswinexul (spPlugin *plugin, long length, double alpha, spBool unlock_flag)
 
spDVector xdvgausswinex (long length, double alpha)
 
spDVector xdvgausswinul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvgausswin (long length)
 
spDVector xdvngausswinexul (spPlugin *plugin, long length, double alpha, spBool unlock_flag)
 
spDVector xdvngausswinex (long length, double alpha)
 
spDVector xdvngausswinul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvngausswin (long length)
 
Rectangular Window for Vector (<sp/window.h>)
spDVector xdvnboxcarul (spPlugin *plugin, long length, spBool unlock_flag)
 
spDVector xdvnboxcar (long length)
 

Data Fields

long length
 
double * data
 
double * imag
 

Related Symbols

(Note that these are not member symbols.)

#define dvnums(x, length, value)   dvinit(x, (double)(value), 0.0, (double)(length))
 
#define dvzeros(x, length)   dvnums(x, length, 0.0)
 
#define dvones(x, length)   dvnums(x, length, 1.0)
 
#define dvinums(x, length, value)   dviinit(x, (double)(value), 0.0, (double)(length))
 
#define dvizeros(x, length)   dvinums(x, length, 0.0)
 
#define dviones(x, length)   dvinums(x, length, 1.0)
 
#define dvrinums(x, length, value)   dvriinit(x, (double)(value), 0.0, (double)(length))
 
#define dvrizeros(x, length)   dvrinums(x, length, 0.0)
 
#define dvriones(x, length)   dvrinums(x, length, 1.0)
 
#define xdvnums(length, value)   xdvinit((double)(value), 0.0, (double)(length))
 
#define xdvnumsul(plugin, length, value, unlock_flag)   xdvinitul(plugin, (double)(value), 0.0, (double)(length), unlock_flag)
 
#define xdvzeros(length)   xdvnums(length, 0.0)
 
#define xdvzerosul(plugin, length, unlock_flag)   xdvnumsul(plugin, length, 0.0, unlock_flag)
 
#define xdvones(length)   xdvnums(length, 1.0)
 
#define xdvonesul(plugin, length, unlock_flag)   xdvnumsul(plugin, length, 1.0, unlock_flag)
 
#define xdvnull()   xdvalloc(0)
 
#define xdvnullul(plugin, unlock_flag)   xdvallocul(plugin, 0, unlock_flag)
 
#define xdvrinums(length, value)   xdvriinit((double)(value), 0.0, (double)(length))
 
#define xdvrinumsul(plugin, length, value, unlock_flag)   xdvriinitul(plugin, (double)(value), 0.0, (double)(length), unlock_flag)
 
#define xdvrizeros(length)   xdvrinums(length, 0.0)
 
#define xdvrizerosul(plugin, length, unlock_flag)   xdvrinumsul(plugin, length, 0.0, unlock_flag)
 
#define xdvriones(length)   xdvrinums(length, 1.0)
 
#define xdvrionesul(plugin, length, unlock_flag)   xdvrinumsul(plugin, length, 1.0, unlock_flag)
 
#define dvunset(x)   dvset(x, NULL, 0)
 
#define dviunset(x)   dviset(x, NULL, 0)
 

File I/O for Vector (<sp/fileio.h>)

spDVector xdvreaddsignal (const char *filename, long headlen, int swap)
 
spDVector xdvreadssignal (const char *filename, long headlen, int swap)
 
spDVector xdvreadlsignal (const char *filename, long headlen, int swap)
 
spDVector xdvreadfsignal (const char *filename, long headlen, int swap)
 
spBool dvwritedsignal (const char *filename, spDVector vector, int swap)
 
spBool dvwritessignal (const char *filename, spDVector vector, int swap)
 
spBool dvwritelsignal (const char *filename, spDVector vector, int swap)
 
spBool dvwritefsignal (const char *filename, spDVector vector, int swap)
 
#define xdvreaddvector(filename, swap)   xdvreaddsignal((filename), 0, (swap))
 
#define xdvreadsvector(filename, swap)   xdvreadssignal((filename), 0, (swap))
 
#define xdvreadlvector(filename, swap)   xdvreadlsignal((filename), 0, (swap))
 
#define xdvreadfvector(filename, swap)   xdvreadfsignal((filename), 0, (swap))
 
#define dvwritedvector(filename, vector, swap)   dvwritedsignal(filename, vector, swap)
 
#define dvwritesvector(filename, vector, swap)   dvwritessignal(filename, vector, swap)
 
#define dvwritelvector(filename, vector, swap)   dvwritelsignal(filename, vector, swap)
 
#define dvwritefvector(filename, vector, swap)   dvwritefsignal(filename, vector, swap)
 

Detailed Description

Vector type that contains the elements of double type.

Actually, This is a typedefed type by typedef struct _spDVector *spDVector;. To allocate memory for spDVector, call a function with prefix xdv such as xdvalloc() , xdvinit() , etc. To deallocate memory, call xdvfree() .

Examples
fftvec.c, filtertest.c, interptest.c, lpctest.c, mattest.c, vectest.c, and windowtest.c.

Member Function Documentation

◆ xdvalloc()

spDVector xdvalloc ( long length)

Allocates memory for spDVector.

◆ xdvfree()

void xdvfree ( spDVector vector)

Deallocates memory for spDVector.

◆ xdvallocul()

spDVector xdvallocul ( spPlugin * plugin,
long length,
spBool unlock_flag )

Allocates memory for spDVector and sets it in the lock/unlock state.

◆ xdvalloculfromv()

spDVector xdvalloculfromv ( spDVector x,
long length )

Allocates memory for spDVector and updates its lock/unlock state by using the status of the input vector.

◆ dvrfree()

void dvrfree ( spDVector x)

Deallocates memory of the real part for spDVector.

◆ dvialloc()

void dvialloc ( spDVector x)

Allocates memory of the imaginary part for spDVector.

◆ dvifree()

void dvifree ( spDVector x)

Deallocates memory of the imaginary part for spDVector.

◆ xdvriallocul()

spDVector xdvriallocul ( spPlugin * plugin,
long length,
spBool unlock_flag )

Allocates memory of both the real and imaginary parts for spDVector and sets it in the lock/unlock state.

◆ xdvrialloc()

spDVector xdvrialloc ( long length)

Allocates memory of both the real and imaginary parts for spDVector.

◆ xdvrealloc()

spDVector xdvrealloc ( spDVector x,
long length )

Expands the size of the vector and resets the expanded elements to 0.

Returns
The address of x for success, SP_NODATA for failure.

◆ dvisplugincomputable()

spBool dvisplugincomputable ( spDVector x)

Checks whether the vector is ready for plugin-based computation.

◆ dvislocked()

spBool dvislocked ( spDVector x)

Checks whether the vector is in the locked state.

◆ dvlock()

spBool dvlock ( spDVector x)

Sets the vector in the locked state.

◆ dvunlock()

spBool dvunlock ( spDVector x)

Sets the vector in the unlocked state.

◆ dvsetlock()

spBool dvsetlock ( spDVector x,
spBool lock )

Sets the vector in the locked/unlocked state without data synchronization.

◆ dvsync()

spBool dvsync ( spDVector x)

Synchronizes the vector data (->data and ->imag) with the internal data without changing the locked/unlocked state.

◆ xdvcplx()

spDVector xdvcplx ( spDVector xr,
spDVector xi )

Creates a new vector whose real and imaginary parts are xr and xi , respectively.

◆ dvreal()

void dvreal ( spDVector x)

Deallocates the imaginary part of x if it exists.

◆ dvimag()

void dvimag ( spDVector x)

Sets the imaginary part of x as the real part.

◆ xdvreal()

spDVector xdvreal ( spDVector x)

Copies the real part of x to that of a new vector.

◆ xdvimag()

spDVector xdvimag ( spDVector x)

Copies the imaginary part of x to the real part of a new vector.

◆ dvconj()

void dvconj ( spDVector x)

Takes the complex conjugate of x.

◆ xdvconj()

spDVector xdvconj ( spDVector x)

Creates a new vector which is the complex conjugate of x.

◆ dvriswap()

void dvriswap ( spDVector x)

Swaps the real part of x for the imaginary part.

◆ xdvriswap()

spDVector xdvriswap ( spDVector x)

Creates a new vector whose real and imaginary parts are the imaginary and real parts of x respectively.

◆ dvcopy()

void dvcopy ( spDVector y,
spDVector x )

Copies data of x to y . The imaginary part of x is not copied unless y->imag != NULL.

◆ dvrcopyi()

void dvrcopyi ( spDVector y,
spDVector x )

Copies data of the real part of x to the imaginary part of y .

◆ dvicopyr()

void dvicopyr ( spDVector y,
spDVector x )

Copies data of the imaginary part of x to the real part of y .

◆ dvcopyfromarray()

long dvcopyfromarray ( spDVector y,
long y_offset,
double * data,
long length )

Copies data of the array data to the target location y_offset of y .

◆ dvcopyfromriarray()

long dvcopyfromriarray ( spDVector y,
long y_offset,
double * data,
double * imag,
long length )

Copies the complex array of the real part data and the imaginary part imag to the target location y_offset of y .

◆ dvcopytoarray()

long dvcopytoarray ( spDVector x,
long x_offset,
double * data,
long length )

Copies data extracted from x_offset of x to the array data .

◆ dvcopytoriarray()

long dvcopytoriarray ( spDVector x,
long x_offset,
double * data,
double * imag,
long length )

Copies data extracted from x_offset of x to the complex array of the real part data and the imaginary part imag .

◆ xdvtos()

spSVector xdvtos ( spDVector x)

Copies data of x to a new vector with a different type.

◆ xdvtol()

spLVector xdvtol ( spDVector x)

Copies data of x to a new vector with a different type.

◆ xdvtof()

spFVector xdvtof ( spDVector x)

Copies data of x to a new vector with a different type.

◆ xdvclone()

spDVector xdvclone ( spDVector x)

Copies data of x to a new vector.

◆ xdvcat()

spDVector xdvcat ( spDVector x,
spDVector y )

Appends data of y to a new vector which is a clone of x.

◆ dvcat()

void dvcat ( spDVector x,
spDVector y )

Appends data of y to x.

◆ dvinit()

spBool dvinit ( spDVector x,
double m,
double incr,
double n )

Initialize the vector x so that the elements range from m to n using incr as the increment between elements.

◆ xdvinit()

spDVector xdvinit ( double m,
double incr,
double n )

Creates a new vector ranging from m to n using incr as the increment between elements.

◆ xdvinitul()

spDVector xdvinitul ( spPlugin * plugin,
double m,
double incr,
double n,
spBool unlock_flag )

Creates a new plugin-based vector ranging from m to n using incr as the increment between elements.

◆ dviinit()

spBool dviinit ( spDVector x,
double m,
double incr,
double n )

Initialize the imaginary part of the vector x so that the elements range from m to n using incr as the increment between elements.

◆ dvriinit()

spBool dvriinit ( spDVector x,
double m,
double incr,
double n )

Initialize the real and imaginary parts of the vector x so that the elements of both parts range from m to n using incr as the increment between elements.

◆ xdvriinit()

spDVector xdvriinit ( double m,
double incr,
double n )

Creates a new vector whose real and imaginary parts range from m to n using incr as the increment between elements.

◆ xdvriinitul()

spDVector xdvriinitul ( spPlugin * plugin,
double m,
double incr,
double n,
spBool unlock_flag )

Creates a new plugin-based vector whose real and imaginary parts range from m to n using incr as the increment between elements.

◆ xdvcut()

spDVector xdvcut ( spDVector x,
long offset,
long length )

Extracts data of length from offset of x .

◆ dvpaste()

long dvpaste ( spDVector y,
spDVector x,
long y_offset,
long x_length,
spBool overlap )

Pastes data of x cropped with x_length to the target location y_offset of y . The argument overlap determines whether the overlap addition is performed in pasting data.

◆ dvadd()

long dvadd ( spDVector y,
long y_offset,
spDVector x,
long x_offset,
long x_length,
spBool overlap )

Pastes data of x_length extracted from x_offset of x to the target location y_offset of y . The argument overlap determines whether the overlap addition is performed in pasting data.

◆ dverase()

void dverase ( spDVector x,
long offset,
long length,
spBool inv )

Erases data of length from offset . The argument inv determines whether the erasing location is inverted.

◆ dvset()

void dvset ( spDVector x,
double * data,
long length )

Sets the address of data to x->data .

◆ dviset()

void dviset ( spDVector x,
double * imag,
long length )

Sets the address of imag to x->imag .

◆ xdvsetve()

spDVector xdvsetve ( spPlugin * plugin,
double * data,
long length )

Sets the address of data to data of a plugin-based new vector.

◆ xdvset()

spDVector xdvset ( double * data,
long length )

Sets the address of data to data of a new vector.

◆ xdvsetnew()

spDVector xdvsetnew ( double * data,
long length )

Creates a new vector whose real part is a clone of data .

◆ dvsetval()

spBool dvsetval ( spDVector x,
long index,
double value )

Copies a value to the location of index of the real part of x .

◆ dvsetival()

spBool dvsetival ( spDVector x,
long index,
double value )

Copies a value to the location of index of the imaginary part of x .

Friends And Related Symbol Documentation

◆ dvnums

#define dvnums ( x,
length,
value )   dvinit(x, (double)(value), 0.0, (double)(length))
related

Initialize the vector x so that the elements within length are all value .

◆ dvzeros

#define dvzeros ( x,
length )   dvnums(x, length, 0.0)
related

Initialize the vector x so that the elements within length are all zeros.

◆ dvones

#define dvones ( x,
length )   dvnums(x, length, 1.0)
related

Initialize the vector x so that the elements within length are all ones.

◆ dvinums

#define dvinums ( x,
length,
value )   dviinit(x, (double)(value), 0.0, (double)(length))
related

Initialize the imaginary part of the vector x so that the elements within length are all value .

◆ dvizeros

#define dvizeros ( x,
length )   dvinums(x, length, 0.0)
related

Initialize the imaginary part of the vector x so that the elements within length are all zeros.

◆ dviones

#define dviones ( x,
length )   dvinums(x, length, 1.0)
related

Initialize the imaginary part of the vector x so that the elements within length are all ones.

◆ dvrinums

#define dvrinums ( x,
length,
value )   dvriinit(x, (double)(value), 0.0, (double)(length))
related

Initialize the real and imaginary parts of the vector x so that the elements of both parts are all value .

◆ dvrizeros

#define dvrizeros ( x,
length )   dvrinums(x, length, 0.0)
related

Initialize the real and imaginary parts of the vector x so that the elements of both parts are all zeros.

◆ dvriones

#define dvriones ( x,
length )   dvrinums(x, length, 1.0)
related

Initialize the real and imaginary parts of the vector x so that the elements of both parts are all ones.

◆ xdvnums

#define xdvnums ( length,
value )   xdvinit((double)(value), 0.0, (double)(length))
related

Creates a new vector whose elements within length are all value .

◆ xdvnumsul

#define xdvnumsul ( plugin,
length,
value,
unlock_flag )   xdvinitul(plugin, (double)(value), 0.0, (double)(length), unlock_flag)
related

Creates a new plugin-based vector whose elements within length are all value .

◆ xdvzeros

#define xdvzeros ( length)    xdvnums(length, 0.0)
related

Creates a new vector whose elements within length are all zeros.

◆ xdvzerosul

#define xdvzerosul ( plugin,
length,
unlock_flag )   xdvnumsul(plugin, length, 0.0, unlock_flag)
related

Creates a new plugin-based vector whose elements within length are all zeros.

◆ xdvones

#define xdvones ( length)    xdvnums(length, 1.0)
related

Creates a new vector whose elements within length are all ones.

◆ xdvonesul

#define xdvonesul ( plugin,
length,
unlock_flag )   xdvnumsul(plugin, length, 1.0, unlock_flag)
related

Creates a new plugin-based vector whose elements within length are all ones.

◆ xdvnull

#define xdvnull ( )    xdvalloc(0)
related

Creates a new null vector.

◆ xdvnullul

#define xdvnullul ( plugin,
unlock_flag )   xdvallocul(plugin, 0, unlock_flag)
related

Creates a new null plugin-based vector.

◆ xdvrinums

#define xdvrinums ( length,
value )   xdvriinit((double)(value), 0.0, (double)(length))
related

Creates a new vector whose real and imaginary parts are all value .

◆ xdvrinumsul

#define xdvrinumsul ( plugin,
length,
value,
unlock_flag )   xdvriinitul(plugin, (double)(value), 0.0, (double)(length), unlock_flag)
related

Creates a new plugin-based vector whose real and imaginary parts are all value .

◆ xdvrizeros

#define xdvrizeros ( length)    xdvrinums(length, 0.0)
related

Creates a new vector whose real and imaginary parts are all zeros.

◆ xdvrizerosul

#define xdvrizerosul ( plugin,
length,
unlock_flag )   xdvrinumsul(plugin, length, 0.0, unlock_flag)
related

Creates a new plugin-based vector whose real and imaginary parts are all zeros.

◆ xdvriones

#define xdvriones ( length)    xdvrinums(length, 1.0)
related

Creates a new vector whose real and imaginary parts are all ones.

◆ xdvrionesul

#define xdvrionesul ( plugin,
length,
unlock_flag )   xdvrinumsul(plugin, length, 1.0, unlock_flag)
related

Creates a new plugin-based vector whose real and imaginary parts are all ones.

◆ dvunset

#define dvunset ( x)    dvset(x, NULL, 0)
related

Sets x->data to NULL.

◆ dviunset

#define dviunset ( x)    dviset(x, NULL, 0)
related

Sets x->imag to NULL.

Field Documentation

◆ length

long length

The number of elements of spDVector. You can access the number of elements as x->length for the memory allocated x of spDVector.

Examples
fftvec.c, filtertest.c, interptest.c, lpctest.c, mattest.c, and vectest.c.

◆ data

double* data

Data of the real part of spDVector. You can access the 0-th element of the data as x->data[0] for the memory allocated x of spDVector.

Examples
filtertest.c, interptest.c, lpctest.c, and mattest.c.

◆ imag

double* imag

Data of the imaginary part of spDVector. You can access the 0-th element of the data as x->imag[0] for the memory allocated x of spDVector. If no imaginary part exists, this member can be NULL.

Examples
mattest.c.