IT++ 4.3.1
|
Functions | |
ITPP_EXPORT vec | itpp::ones (int size) |
A float vector of ones. | |
ITPP_EXPORT bvec | itpp::ones_b (int size) |
A Binary vector of ones. | |
ITPP_EXPORT ivec | itpp::ones_i (int size) |
A Int vector of ones. | |
ITPP_EXPORT cvec | itpp::ones_c (int size) |
A float Complex vector of ones. | |
ITPP_EXPORT mat | itpp::ones (int rows, int cols) |
A float (rows,cols)-matrix of ones. | |
ITPP_EXPORT bmat | itpp::ones_b (int rows, int cols) |
A Binary (rows,cols)-matrix of ones. | |
ITPP_EXPORT imat | itpp::ones_i (int rows, int cols) |
A Int (rows,cols)-matrix of ones. | |
ITPP_EXPORT cmat | itpp::ones_c (int rows, int cols) |
A Double Complex (rows,cols)-matrix of ones. | |
ITPP_EXPORT vec | itpp::zeros (int size) |
A Double vector of zeros. | |
ITPP_EXPORT bvec | itpp::zeros_b (int size) |
A Binary vector of zeros. | |
ITPP_EXPORT ivec | itpp::zeros_i (int size) |
A Int vector of zeros. | |
ITPP_EXPORT cvec | itpp::zeros_c (int size) |
A Double Complex vector of zeros. | |
ITPP_EXPORT mat | itpp::zeros (int rows, int cols) |
A Double (rows,cols)-matrix of zeros. | |
ITPP_EXPORT bmat | itpp::zeros_b (int rows, int cols) |
A Binary (rows,cols)-matrix of zeros. | |
ITPP_EXPORT imat | itpp::zeros_i (int rows, int cols) |
A Int (rows,cols)-matrix of zeros. | |
ITPP_EXPORT cmat | itpp::zeros_c (int rows, int cols) |
A Double Complex (rows,cols)-matrix of zeros. | |
ITPP_EXPORT mat | itpp::eye (int size) |
A Double (size,size) unit matrix. | |
ITPP_EXPORT bmat | itpp::eye_b (int size) |
A Binary (size,size) unit matrix. | |
ITPP_EXPORT imat | itpp::eye_i (int size) |
A Int (size,size) unit matrix. | |
ITPP_EXPORT cmat | itpp::eye_c (int size) |
A Double Complex (size,size) unit matrix. | |
template<class T> | |
void | itpp::eye (int size, Mat< T > &m) |
A non-copying version of the eye function. | |
vec | itpp::impulse (int size) |
Impulse vector. | |
vec | itpp::linspace (double from, double to, int length=100) |
linspace (works in the same way as the MATLAB version) | |
template<class T> | |
Vec< T > | itpp::linspace_fixed_step (T from, T to, T step=1) |
linspace_fixed_step (works in the same way as "from:step:to" in MATLAB) | |
vec | itpp::zigzag_space (double t0, double t1, int K=5) |
Zig-zag space function (variation on linspace) | |
imat | itpp::hadamard (int size) |
Hadamard matrix. | |
imat | itpp::jacobsthal (int p) |
Jacobsthal matrix. | |
imat | itpp::conference (int n) |
Conference matrix. | |
template<typename Num_T> | |
const Mat< Num_T > | itpp::toeplitz (const Vec< Num_T > &c, const Vec< Num_T > &r) |
Generate Toeplitz matrix from two vectors c and r . | |
template<typename Num_T> | |
const Mat< Num_T > | itpp::toeplitz (const Vec< Num_T > &c) |
Generate symmetric Toeplitz matrix from vector c . | |
const cmat | itpp::toeplitz (const cvec &c) |
Generate symmetric Toeplitz matrix from vector c (complex valued) | |
void itpp::eye | ( | int | size, |
Mat< T > & | m ) |
A non-copying version of the eye function.
Definition at line 100 of file specmat.h.
References itpp::Mat< Num_T >::set_size(), and size().
ITPP_EXPORT vec itpp::impulse | ( | int | size | ) |
Impulse vector.
Definition at line 98 of file specmat.cpp.
References impulse(), and size().
Referenced by impulse().
ITPP_EXPORT vec itpp::linspace | ( | double | from, |
double | to, | ||
int | points ) |
linspace (works in the same way as the MATLAB version)
Definition at line 106 of file specmat.cpp.
References to().
Referenced by arma_estimator(), chebwin(), itpp::LDPC_Parity_Unstructured::compute_CR(), itpp::LDPC_Parity::display_stats(), freqz(), freqz(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::Rice_Fading_Generator::init_MEDS(), itpp::Histogram< Num_T >::setup(), xcorr(), and zigzag_space().
Vec< T > itpp::linspace_fixed_step | ( | T | from, |
T | to, | ||
T | step = 1 ) |
ITPP_EXPORT vec itpp::zigzag_space | ( | double | t0, |
double | t1, | ||
int | K = 5 ) |
Zig-zag space function (variation on linspace)
This function is a variation on linspace(). It traverses the points in different order. For example
gives the vector
and
gives the vector
and so on.
I.e. the function samples the interval [t0,t1] with finer and finer density and with points uniformly distributed over the interval, rather than from left to right (as does linspace).
The result is a vector of length 1+2^K.
Definition at line 125 of file specmat.cpp.
References concat(), it_assert, length(), linspace(), and zeros().
ITPP_EXPORT imat itpp::hadamard | ( | int | size | ) |
ITPP_EXPORT imat itpp::jacobsthal | ( | int | p | ) |
Jacobsthal matrix.
Constructs an p by p matrix Q where p is a prime (not checked). The elements in Q {qij} is given by qij=X(j-i), where X(x) is the Legendre symbol given as:
See Wicker "Error Control Systems for digital communication and storage", p. 134 for more information on these topics. Do not check that p is a prime.
Definition at line 172 of file specmat.cpp.
Referenced by conference().
ITPP_EXPORT imat itpp::conference | ( | int | n | ) |
Conference matrix.
Constructs an n by n matrix C, where n=p^m+1=2 (mod 4) and p is a odd prime (not checked). This code only work with m=1, that is n=p+1 and p odd prime. The valid sizes of n is then n=6, 14, 18, 30, 38, ... (and not 10, 26, ...). C has the property that C*C'=(n-1)I, that is it has orthogonal rows and columns in the same way as Hadamard matricies. However, one element in each row (on the diagonal) is zeros. The others are {-1,+1}.
For more details see pp. 55-58 in MacWilliams & Sloane "The theory of error correcting codes", North-Holland, 1977.
Definition at line 196 of file specmat.cpp.
References it_assert_debug, and jacobsthal().
const Mat< Num_T > itpp::toeplitz | ( | const Vec< Num_T > & | c, |
const Vec< Num_T > & | r ) |
Generate Toeplitz matrix from two vectors c
and r
.
Returns the Toeplitz matrix constructed given the first column C, and (optionally) the first row R. If the first element of C is not the same as the first element of R, the first element of C is used. If the second argument is omitted, the first row is taken to be the same as the first column and a symmetric (Hermitian) Toeplitz matrix is created.
An example square Toeplitz matrix has the form:
* c(0) r(1) r(2) ... r(n) * c(1) c(0) r(1) r(n-1) * c(2) c(1) c(0) r(n-2) * . . * . . * . . * * c(n) c(n-1) c(n-2) ... c(0) *
Definition at line 229 of file specmat.h.
References itpp::Vec< Num_T >::size().
Generate symmetric Toeplitz matrix from vector c
.
Definition at line 251 of file specmat.h.
References itpp::Vec< Num_T >::size().
ITPP_EXPORT const cmat itpp::toeplitz | ( | const cvec & | c | ) |
Generate symmetric Toeplitz matrix from vector c
(complex valued)
Definition at line 210 of file specmat.cpp.
References conj().
Referenced by arma_estimator(), and modified_yule_walker().