IT++ Logo Newcom Logo

itpp::Vec< Num_T > Class Template Reference

Templated vectors. More...

#include <itpp/base/vec.h>

List of all members.

Public Types

typedef Num_T value_type
 The type of the vector values.

Public Member Functions

 Vec (const Factory &f=DEFAULT_FACTORY)
 Default constructor. An element factory f can be specified.
 Vec (const int size, const Factory &f=DEFAULT_FACTORY)
 Constructor. An element factory f can be specified.
 Vec (const Vec< Num_T > &v)
 Copy constructor.
 Vec (const Vec< Num_T > &v, const Factory &f)
 Constructor, similar to the copy constructor, but also takes an element factory f as argument.
 Vec (const char *values, const Factory &f=DEFAULT_FACTORY)
 Constructor. An element factory f can be specified.
 Vec (const std::string &values, const Factory &f=DEFAULT_FACTORY)
 Constructor. An element factory f can be specified.
 Vec (Num_T *c_array, const int size, const Factory &f=DEFAULT_FACTORY)
 Constructor taking a C-array as input. Copies all data. An element factory f can be specified.
 ~Vec ()
 Destructor.
int length () const
 The size of the vector.
int size () const
 The size of the vector.
void set_length (const int size, const bool copy=false)
 Set length of vector. if copy = true then keeping the old values.
void set_size (const int size, const bool copy=false)
 Set length of vector. if copy = true then keeping the old values.
void zeros ()
 Set the vector to the all zero vector.
void clear ()
 Set the vector to the all zero vector.
void ones ()
 Set the vector to the all one vector.
bool set (const char *str)
 Set the vector equal to the values in the str string.
bool set (const std::string &str)
 Set the vector equal to the values in the str string.
const Num_T & operator[] (const int i) const
 C-style index operator. First element is 0.
const Num_T & operator() (const int i) const
 Index operator. First element is 0.
Num_T & operator[] (const int i)
 C-style index operator. First element is 0.
Num_T & operator() (const int i)
 Index operator. First element is 0.
const Vec< Num_T > operator() (const int i1, const int i2) const
 Sub-vector with elements from i1 to i2. Index -1 indicates the last element.
const Vec< Num_T > operator() (const Vec< int > &indexlist) const
 Sub-vector where the elements are given by the list indexlist.
const Num_T & get (const int i) const
 Accessor-style method. First element is 0.
const Vec< Num_T > get (const int i1, const int i2) const
 Sub-vector with elements from i1 to i2. Index -1 indicates the last element.
void set (const int i, const Num_T &v)
 Modifier-style method. First element is 0.
Mat< Num_T > transpose () const
 Matrix transpose. Converts to a matrix with the vector in the first row.
Mat< Num_T > T () const
 Matrix transpose. Converts to a matrix with the vector in the first row.
Mat< Num_T > hermitian_transpose () const
 Hermitian matrix transpose. Converts to a matrix with the conjugate of the vector in the first row.
Mat< Num_T > H () const
 Hermitian matrix transpose. Converts to a matrix with the conjugate of the vector in the first row.
Vec< Num_T > & operator+= (const Vec< Num_T > &v)
 Addition of vector.
Vec< Num_T > & operator+= (const Num_T t)
 Addition of scalar.
Vec< Num_T > & operator-= (const Vec< Num_T > &v)
 Subtraction of vector.
Vec< Num_T > & operator-= (const Num_T t)
 Subtraction of scalar.
Vec< Num_T > & operator *= (const Num_T t)
 Multiply with a scalar.
Vec< Num_T > & operator/= (const Num_T t)
 Elementwise division.
Vec< Num_T > & operator/= (const Vec< Num_T > &v)
 Elementwise division.
Vec< Num_T > get (const Vec< bin > &binlist) const
 Get the elements in the vector where binlist is 1.
Vec< Num_T > right (const int nr) const
 Get the right nr elements from the vector.
Vec< Num_T > left (const int nr) const
 Get the left nr elements from the vector.
Vec< Num_T > mid (const int start, const int nr) const
 Get the middle part of vector from start including nr elements.
Vec< Num_T > split (const int pos)
 Split the vector into two parts at element pos. Return the first part and keep the second.
void shift_right (const Num_T In, const int n=1)
 Shift in element In at position 0 n times.
void shift_right (const Vec< Num_T > &In)
 Shift in vector In at position 0.
void shift_left (const Num_T In, const int n=1)
 Shift out the n left elements and a the same time shift in the element at last position n times.
void shift_left (const Vec< Num_T > &In)
 Shift in vector In at last position.
void set_subvector (int i1, int i2, const Vec< Num_T > &v)
 Set subvector defined by indicies i1 to i2 to vector v.
void set_subvector (const int i, const Vec< Num_T > &v)
 Set subvector defined by first index i and size of vector v to v.
void set_subvector (int i1, int i2, const Num_T t)
 Set subvector defined by indicies i1 to i2 to constant t.
void replace_mid (const int pos, const Vec< Num_T > &v)
 Replace the elements from pos by the vector v.
void del (const int index)
 Delete element number index.
void del (const int i1, const int i2)
 Delete elements from i1 to i2.
void ins (const int index, const Num_T in)
 Insert element in at index.
void ins (const int index, const Vec< Num_T > &in)
 Insert vector in at index.
Vec< Num_T > & operator= (const Num_T t)
 Assign all elements in vector to t.
Vec< Num_T > & operator= (const Vec< Num_T > &v)
 Assign vector the value and length of v.
Vec< Num_T > & operator= (const Mat< Num_T > &m)
 Assign vector equal to the 1-dimensional matrix m.
Vec< Num_T > & operator= (const char *values)
 Assign vector the values in the string values.
Vec< binoperator== (const Num_T value) const
 Elementwise equal to the scalar.
Vec< binoperator!= (const Num_T value) const
 Elementwise not-equal to the scalar.
Vec< binoperator< (const Num_T value) const
 Elementwise less than the scalar.
Vec< binoperator<= (const Num_T value) const
 Elementwise less than and equal to the scalar.
Vec< binoperator> (const Num_T value) const
 Elementwise greater than the scalar.
Vec< binoperator>= (const Num_T value) const
 Elementwise greater than and equal to the scalar.
bool operator== (const Vec< Num_T > &v) const
 Compare two vectors. False if wrong sizes or different values.
bool operator!= (const Vec< Num_T > &v) const
 Compare two vectors. True if different.
Num_T & _elem (const int i)
 Index operator without boundary check. Not recommended to use.
const Num_T & _elem (const int i) const
 Index operator without boundary check. Not recommended to use.
Num_T * _data ()
 Get the pointer to the internal structure. Not recommended to use.
const Num_T * _data () const
 Get the pointer to the internal structure. Not recommended to use.
template<>
bool set (const char *values)
template<>
bool set (const char *values)

Protected Member Functions

void alloc (const int size)
 Allocate storage for a vector of length size.
void free ()
 Free the storage space allocated by the vector.

Protected Attributes

int datasize
 The current number of elements in the vector.
Num_T * data
 A pointer to the data area.
const Factoryfactory
 Element factory (set to DEFAULT_FACTORY to use Num_T default constructors only).

Friends

const Vec< Num_T > operator+ (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Addition of two vectors.
const Vec< Num_T > operator+ (const Vec< Num_T > &v, const Num_T t)
 Addition of a vector and a scalar.
const Vec< Num_T > operator+ (const Num_T t, const Vec< Num_T > &v)
 Addition of a scalar and a vector.
const Vec< Num_T > operator- (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Subtraction of v2 from v1.
const Vec< Num_T > operator- (const Vec< Num_T > &v, const Num_T t)
 Subtraction of scalar from vector.
const Vec< Num_T > operator- (const Num_T t, const Vec< Num_T > &v)
 Sutraction of vector from scalar.
const Vec< Num_T > operator- (const Vec< Num_T > &v)
 Negation of vector.
Num_T operator * (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Inner (dot) product.
Num_T dot (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Inner (dot) product.
const Mat< Num_T > outer_product (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Outer product of two vectors v1 and v2.
const Vec< Num_T > operator * (const Vec< Num_T > &v, const Num_T t)
 Elementwise multiplication of vector and scalar.
const Vec< Num_T > operator * (const Num_T t, const Vec< Num_T > &v)
 Elementwise multiplication of vector and scalar.
const Vec< Num_T > elem_mult (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Elementwise multiplication.
const Vec< Num_T > elem_mult (const Vec< Num_T > &v1, const Vec< Num_T > &v2, const Vec< Num_T > &v3)
 Elementwise multiplication of three vectors.
const Vec< Num_T > elem_mult (const Vec< Num_T > &v1, const Vec< Num_T > &v2, const Vec< Num_T > &v3, const Vec< Num_T > &v4)
 Elementwise multiplication of four vectors.
const Vec< Num_T > operator/ (const Vec< Num_T > &v, const Num_T t)
 Elementwise division.
const Vec< Num_T > operator/ (const Num_T t, const Vec< Num_T > &v)
 Elementwise division.
const Vec< Num_T > elem_div (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Elementwise division.
const Vec< Num_T > elem_div (const Num_T t, const Vec< Num_T > &v)
 Elementwise division.
const Vec< Num_T > concat (const Vec< Num_T > &v, const Num_T a)
 Append element a to the end of the vector v.
const Vec< Num_T > concat (const Num_T a, const Vec< Num_T > &v)
 Concat element a to the beginning of the vector v.
const Vec< Num_T > concat (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Concat vectors v1 and v2.
const Vec< Num_T > concat (const Vec< Num_T > &v1, const Vec< Num_T > &v2, const Vec< Num_T > &v3)
 Concat vectors v1, v2 and v3.

Related Functions

(Note that these are not member functions.)

typedef Vec< double > vec
 Definition of double vector type.
typedef Vec< std::complex<
double > > 
cvec
 Definition of complex<double> vector type.
typedef Vec< int > ivec
 Definition of integer vector type.
typedef Vec< short int > svec
 Definition of short vector type.
typedef Vec< binbvec
 Definition of binary vector type.
bvec to_bvec (const Vec< T > &v)
 Converts a Vec<T> to bvec.
svec to_svec (const Vec< T > &v)
 Converts a Vec<T> to svec.
ivec to_ivec (const Vec< T > &v)
 Converts a Vec<T> to ivec.
vec to_vec (const Vec< T > &v)
 Converts a Vec<T> to vec.
cvec to_cvec (const Vec< T > &v)
 Converts a Vec<T> to cvec.
cvec to_cvec (const Vec< T > &real, const Vec< T > &imag)
 Converts real and imaginary Vec<T> to cvec.
ivec to_ivec (int s)
 Converts an int to ivec.
vec to_vec (double s)
 Converts an double to vec.
cvec to_cvec (double real, double imag)
 Converts real and imaginary double to cvec.
vec operator+ (const float &s, const vec &v)
 Addition operator for float and vec.
vec operator+ (const short &s, const vec &v)
 Addition operator for short and vec.
vec operator+ (const int &s, const vec &v)
 Addition operator for int and vec.
vec operator+ (const vec &v, const float &s)
 Addition operator for vec and float.
vec operator+ (const vec &v, const short &s)
 Addition operator for vec and short.
vec operator+ (const vec &v, const int &s)
 Addition operator for vec and int.
vec operator- (const float &s, const vec &v)
 Subtraction operator for float and vec.
vec operator- (const short &s, const vec &v)
 Subtraction operator for short and vec.
vec operator- (const int &s, const vec &v)
 Subtraction operator for int and vec.
vec operator- (const vec &v, const float &s)
 Subtraction operator for vec and float.
vec operator- (const vec &v, const short &s)
 Subtraction operator for vec and short.
vec operator- (const vec &v, const int &s)
 Subtraction operator for vec and int.
vec operator * (const float &s, const vec &v)
 Multiplication operator for float and vec.
vec operator * (const short &s, const vec &v)
 Multiplication operator for short and vec.
vec operator * (const int &s, const vec &v)
 Multiplication operator for int and vec.
cvec operator * (const std::complex< double > &s, const vec &v)
 Multiplication operator for complex<double> and vec.
vec operator * (const vec &v, const float &s)
 Multiplication operator for vec and float.
vec operator * (const vec &v, const short &s)
 Multiplication operator for vec and short.
vec operator * (const vec &v, const int &s)
 Multiplication operator for vec and int.
cvec operator * (const vec &v, const std::complex< double > &s)
 Multiplication operator for vec and complex<double>.
vec operator/ (const vec &v, const float &s)
 Division operator for vec and float.
vec operator/ (const vec &v, const short &s)
 Division operator for vec and short.
vec operator/ (const vec &v, const int &s)
 Division operator for vec and int.
vec operator+ (const double &s, const ivec &v)
 Addition operator for double and ivec.
vec operator+ (const ivec &v, const double &s)
 Addition operator for ivec and double.
vec operator- (const double &s, const ivec &v)
 Subtraction operator for double and ivec.
vec operator- (const ivec &v, const double &s)
 Subtraction operator for ivec and double.
vec operator * (const double &s, const ivec &v)
 Multiplication operator for double and ivec.
vec operator * (const ivec &v, const double &s)
 Multiplication operator for ivec and double.
vec operator/ (const double &s, const ivec &v)
 Division operator for double and ivec.
vec operator/ (const ivec &v, const double &s)
 Division operator for ivec and double.
cvec operator+ (const std::complex< double > &s, const ivec &v)
 Addition operator for complex<double> and ivec.
cvec operator+ (const ivec &v, const std::complex< double > &s)
 Addition operator for ivec and complex<double>.
cvec operator- (const std::complex< double > &s, const ivec &v)
 Subtraction operator for complex<double> and ivec.
cvec operator- (const ivec &v, const std::complex< double > &s)
 Subtraction operator for ivec and complex<double>.
cvec operator * (const std::complex< double > &s, const ivec &v)
 Multiplication operator for complex<double> and ivec.
cvec operator * (const ivec &v, const std::complex< double > &s)
 Multiplication operator for ivec and complex<double>.
cvec operator/ (const std::complex< double > &s, const ivec &v)
 Division operator for complex<double> and ivec.
cvec operator/ (const ivec &v, const std::complex< double > &s)
 Division operator for ivec and complex<double>.
cvec operator+ (const double &s, const cvec &v)
 Addition operator for double and cvec.
cvec operator+ (const float &s, const cvec &v)
 Addition operator for float and cvec.
cvec operator+ (const short &s, const cvec &v)
 Addition operator for short and cvec.
cvec operator+ (const int &s, const cvec &v)
 Addition operator for int and cvec.
cvec operator+ (const cvec &v, const float &s)
 Addition operator for cvec and float.
cvec operator+ (const cvec &v, const double &s)
 Addition operator for cvec and double.
cvec operator+ (const cvec &v, const short &s)
 Addition operator for cvec and short.
cvec operator+ (const cvec &v, const int &s)
 Addition operator for cvec and int.
cvec operator- (const double &s, const cvec &v)
 Subtraction operator for double and cvec.
cvec operator- (const float &s, const cvec &v)
 Subtraction operator for float and cvec.
cvec operator- (const short &s, const cvec &v)
 Subtraction operator for short and cvec.
cvec operator- (const int &s, const cvec &v)
 Subtraction operator for int and cvec.
cvec operator- (const cvec &v, const float &s)
 Subtraction operator for cvec and float.
cvec operator- (const cvec &v, const double &s)
 Subtraction operator for cvec and double.
cvec operator- (const cvec &v, const short &s)
 Subtraction operator for cvec and short.
cvec operator- (const cvec &v, const int &s)
 Subtraction operator for cvec and int.
cvec operator * (const double &s, const cvec &v)
 Multiplication operator for double and cvec.
cvec operator * (const float &s, const cvec &v)
 Multiplication operator for float and cvec.
cvec operator * (const short &s, const cvec &v)
 Multiplication operator for short and cvec.
cvec operator * (const int &s, const cvec &v)
 Multiplication operator for int and cvec.
cvec operator * (const cvec &v, const float &s)
 Multiplication operator for cvec and float.
cvec operator * (const cvec &v, const double &s)
 Multiplication operator for cvec and double.
cvec operator * (const cvec &v, const short &s)
 Multiplication operator for cvec and short.
cvec operator * (const cvec &v, const int &s)
 Multiplication operator for cvec and int.
cvec operator/ (const cvec &v, const double &s)
 Division operator for cvec and double.
cvec operator/ (const double &s, const cvec &v)
 Division operator for double and cvec.
cvec operator/ (const cvec &v, const float &s)
 Division operator for cvec and float.
cvec operator/ (const cvec &v, const short &s)
 Division operator for cvec and short.
cvec operator/ (const cvec &v, const int &s)
 Division operator for cvec and int.
vec operator+ (const bvec &a, const vec &b)
 Addition operator for bvec and vec.
vec operator+ (const svec &a, const vec &b)
 Addition operator for svec and vec.
vec operator+ (const ivec &a, const vec &b)
 Addition operator for ivec and vec.
vec operator+ (const vec &a, const bvec &b)
 Addition operator for vec and bvec.
vec operator+ (const vec &a, const svec &b)
 Addition operator for vec and svec.
vec operator+ (const vec &a, const ivec &b)
 Addition operator for vec and ivec.
vec operator- (const bvec &a, const vec &b)
 Subtraction operator for bvec and vec.
vec operator- (const svec &a, const vec &b)
 Subtraction operator for svec and vec.
vec operator- (const ivec &a, const vec &b)
 Subtraction operator for ivec and vec.
vec operator- (const vec &a, const bvec &b)
 Subtraction operator for vec and bvec.
vec operator- (const vec &a, const svec &b)
 Subtraction operator for vec and svec.
vec operator- (const vec &a, const ivec &b)
 Subtraction operator for vec and ivec.
double operator * (const bvec &a, const vec &b)
 Multiplication operator for bvec and vec.
double operator * (const svec &a, const vec &b)
 Multiplication operator for svec and vec.
double operator * (const ivec &a, const vec &b)
 Multiplication operator for ivec and vec.
double operator * (const vec &a, const bvec &b)
 Multiplication operator for vec and bvec.
double operator * (const vec &a, const svec &b)
 Multiplication operator for vec and svec.
double operator * (const vec &a, const ivec &b)
 Multiplication operator for vec and ivec.
cvec operator+ (const bvec &a, const cvec &b)
 Addition operator for bvec and cvec.
cvec operator+ (const svec &a, const cvec &b)
 Addition operator for svec and cvec.
cvec operator+ (const ivec &a, const cvec &b)
 Addition operator for ivec and cvec.
cvec operator+ (const cvec &a, const bvec &b)
 Addition operator for cvec and bvec.
cvec operator+ (const cvec &a, const svec &b)
 Addition operator for cvec and svec.
cvec operator+ (const cvec &a, const ivec &b)
 Addition operator for cvec and ivec.
cvec operator- (const bvec &a, const cvec &b)
 Subtraction operator for bvec and cvec.
cvec operator- (const svec &a, const cvec &b)
 Subtraction operator for svec and cvec.
cvec operator- (const ivec &a, const cvec &b)
 Subtraction operator for ivec and cvec.
cvec operator- (const cvec &a, const bvec &b)
 Subtraction operator for cvec and bvec.
cvec operator- (const cvec &a, const svec &b)
 Subtraction operator for cvec and svec.
cvec operator- (const cvec &a, const ivec &b)
 Subtraction operator for cvec and ivec.
std::complex< double > operator * (const bvec &a, const cvec &b)
 Multiplication operator for bvec and cvec.
std::complex< double > operator * (const svec &a, const cvec &b)
 Multiplication operator for svec and cvec.
std::complex< double > operator * (const ivec &a, const cvec &b)
 Multiplication operator for ivec and cvec.
std::complex< double > operator * (const cvec &a, const bvec &b)
 Multiplication operator for cvec and bvec.
std::complex< double > operator * (const cvec &a, const svec &b)
 Multiplication operator for cvec and svec.
std::complex< double > operator * (const cvec &a, const ivec &b)
 Multiplication operator for cvec and ivec.
void sort (Vec< T > &data)
 Sort the data vector in increasing order.
ivec sort_index (const Vec< T > &data)
 Return an index vector corresponding to a sorted vector data (increasing order).
void QS (int low, int high, Vec< T > &data)
 Quick sort function of a subset of a vector data.
void QSindex (int low, int high, ivec &indexlist, const Vec< T > &data)
 Quick sort function, which gives a sorted index vector indexlist.
Vec< T > vec_1 (T v0)
 Vector of length 1.
Vec< T > vec_2 (T v0, T v1)
 Vector of length 2.
Vec< T > vec_3 (T v0, T v1, T v2)
 Vector of length 3.
std::ostream & operator<< (std::ostream &os, const Vec< Num_T > &v)
 Stream output of vector.
std::istream & operator>> (std::istream &is, Vec< Num_T > &v)
 Stream input of vector.


Detailed Description

template<class Num_T>
class itpp::Vec< Num_T >

Templated vectors.

Author:
Tony Ottosson and Tobias Ringstrom
Vectors can be of arbitrarily types, but conversions and functions are prepared for bin, short, int, double, and complex<double> vectors and these are predefined as: bvec, svec, ivec, vec, and cvec. double and complex<double> are double and complex<double> respectively.

Examples:

Vector Constructors: When constructing a vector without a length (memory) use

 vec temp; 
For construction of a vector of a given length use
 vec temp(length); 
It is also possible to assign the constructed vector the value and size of another vector by
 vec temp(invector); 
If you have explicit values you would like to assign to the vector it is possible to do this using strings as:
    vec a("0 0.7 5 9.3"); // that is a = [0, 0.7, 5, 9.3]
    vec a="0 0.7 5 9.3";  // the constructor are called implicitly
    ivec b="0:5";  // that is b = [0, 1, 2, 3, 4, 5]
    vec c="3:2.5:13";  // that is c = [3, 5.5, 8, 10.5, 13]
It is also possible to change length by
 temp.set_size(new_length, false); 
where false is used to indicate that the old values in temp is not copied. If you like to preserve the values use true.

There are a number of methods to access parts of a vector. Examples are

    a(5);     // Element number 5
    a(5,9);  // Elements 5, 6, 7, 8, and 9
    a.left(10);  // The 10 most left elements (the first)
    a.right(10); // The 10 most right elements (the last)
    a.mid(5, 7); // 7 elements starting from element 5

It is also possible to modify parts of a vector as e.g. in

    a.del(5);    // deletes element number 5
    a.ins(3.4, 9); // inserts the element 3.4 at position 9
    a.replace_mid(12, b); // replaces elements from 12 with the vector b

It is of course also possible to perform the common linear algebra methods such as addition, subtraction, and scalar product (*). Observe though, that vectors are assumed to be column-vectors in operations with matrices.

Most elementary functions such as sin(), cosh(), log(), abs(), ..., are available as operations on the individual elements of the vectors. Please see the individual functions for more details.

By default, the Vec elements are created using the default constructor for the element type. This can be changed by specifying a suitable Factory in the Vec constructor call; see Detailed Description for Factory.

Definition at line 185 of file vec.h.


Member Typedef Documentation

template<class Num_T>
typedef Num_T itpp::Vec< Num_T >::value_type

The type of the vector values.

Definition at line 188 of file vec.h.


Constructor & Destructor Documentation

template<class Num_T>
itpp::Vec< Num_T >::Vec ( const Factory f = DEFAULT_FACTORY  )  [inline, explicit]

Default constructor. An element factory f can be specified.

Definition at line 190 of file vec.h.

template<class Num_T>
itpp::Vec< Num_T >::Vec ( const int  size,
const Factory f = DEFAULT_FACTORY 
) [inline, explicit]

Constructor. An element factory f can be specified.

Definition at line 192 of file vec.h.

template<class Num_T>
itpp::Vec< Num_T >::Vec ( const Vec< Num_T > &  v  )  [inline]

Copy constructor.

Definition at line 493 of file vec.h.

References itpp::Vec< Num_T >::alloc(), itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
itpp::Vec< Num_T >::Vec ( const Vec< Num_T > &  v,
const Factory f 
) [inline]

Constructor, similar to the copy constructor, but also takes an element factory f as argument.

Definition at line 501 of file vec.h.

References itpp::Vec< Num_T >::alloc(), itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
itpp::Vec< Num_T >::Vec ( const char *  values,
const Factory f = DEFAULT_FACTORY 
) [inline]

Constructor. An element factory f can be specified.

Definition at line 198 of file vec.h.

template<class Num_T>
itpp::Vec< Num_T >::Vec ( const std::string &  values,
const Factory f = DEFAULT_FACTORY 
) [inline]

Constructor. An element factory f can be specified.

Definition at line 200 of file vec.h.

template<class Num_T>
itpp::Vec< Num_T >::Vec ( Num_T *  c_array,
const int  size,
const Factory f = DEFAULT_FACTORY 
) [inline]

Constructor taking a C-array as input. Copies all data. An element factory f can be specified.

Definition at line 202 of file vec.h.

template<class Num_T>
itpp::Vec< Num_T >::~Vec (  )  [inline]

Destructor.

Definition at line 205 of file vec.h.


Member Function Documentation

template<class Num_T>
int itpp::Vec< Num_T >::length (  )  const [inline]

The size of the vector.

Definition at line 208 of file vec.h.

Referenced by itpp::all(), itpp::any(), itpp::apply_function(), itpp::Sequence_Interleaver< T >::deinterleave(), itpp::Cross_Interleaver< T >::deinterleave(), itpp::Block_Interleaver< T >::deinterleave(), itpp::Freq_Filt< Num_T >::filter(), itpp::Vec< Num_T >::get(), itpp::Vec< Num_T >::ins(), itpp::Sequence_Interleaver< T >::interleave(), itpp::Cross_Interleaver< T >::interleave(), itpp::Block_Interleaver< T >::interleave(), itpp::length(), itpp::lininterp(), itpp::Mat< Num_T >::Mat(), itpp::max(), itpp::max_index(), itpp::median(), itpp::min(), itpp::min_index(), itpp::Vec< Num_T >::operator!=(), itpp::Vec< Num_T >::operator()(), itpp::Filter< T1, T2, T3 >::operator()(), itpp::Vec< Num_T >::operator<(), itpp::operator<<(), itpp::Vec< Num_T >::operator<=(), itpp::Vec< Num_T >::operator==(), itpp::Vec< Num_T >::operator>(), itpp::Vec< Num_T >::operator>=(), itpp::repeat(), itpp::Vec< Num_T >::replace_mid(), itpp::reverse(), itpp::Mat< Num_T >::set_col(), itpp::Mat< Num_T >::set_row(), itpp::size(), itpp::Vec< Num_T >::sort_index(), itpp::sum(), itpp::sum_sqr(), itpp::to(), itpp::to_bvec(), itpp::to_cvec(), itpp::to_ivec(), itpp::to_svec(), itpp::to_vec(), and itpp::upsample().

template<class Num_T>
int itpp::Vec< Num_T >::size (  )  const [inline]

The size of the vector.

Definition at line 210 of file vec.h.

Referenced by itpp::Sparse_Vec< T >::add(), itpp::bidiag(), itpp::bitrv(), itpp::concat(), itpp::cross(), itpp::cumsum(), itpp::dht(), itpp::diag(), itpp::dwht(), itpp::elem_mult(), itpp::elem_mult_s(), itpp::Vec< Num_T >::get(), itpp::Mat< Num_T >::get_cols(), itpp::Pulse_Shape< T1, T2, T3 >::get_filter_length(), itpp::Mat< Num_T >::get_rows(), itpp::ARMA_Filter< T1, T2, T3 >::get_state(), itpp::AR_Filter< T1, T2, T3 >::get_state(), itpp::MA_Filter< T1, T2, T3 >::get_state(), itpp::index_zero_pad(), itpp::Vec< Num_T >::ins(), itpp::Mat< Num_T >::ins_col(), itpp::Mat< Num_T >::ins_row(), itpp::lshift_fix(), itpp::norm(), itpp::operator *(), itpp::operator+(), itpp::Sparse_Vec< T >::operator+=(), itpp::Sparse_Vec< T >::operator-=(), itpp::Sparse_Vec< T >::operator=(), itpp::Mat< Num_T >::operator=(), itpp::prod(), itpp::Circular_Buffer< T >::put(), itpp::reshape(), itpp::rshift_fix(), itpp::self_dht(), itpp::ARMA_Filter< T1, T2, T3 >::set_coeffs(), itpp::AR_Filter< T1, T2, T3 >::set_coeffs(), itpp::MA_Filter< T1, T2, T3 >::set_coeffs(), itpp::Mat< Num_T >::set_col(), itpp::set_fix(), itpp::Sparse_Vec< T >::set_new(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Raised_Cosine< T1 >::set_pulse_shape(), itpp::Pulse_Shape< T1, T2, T3 >::set_pulse_shape(), itpp::Mat< Num_T >::set_row(), itpp::ARMA_Filter< T1, T2, T3 >::set_state(), itpp::AR_Filter< T1, T2, T3 >::set_state(), itpp::MA_Filter< T1, T2, T3 >::set_state(), itpp::Pulse_Shape< T1, T2, T3 >::shape_samples(), itpp::Pulse_Shape< T1, T2, T3 >::shape_symbols(), itpp::Vec< Num_T >::sort(), itpp::Sparse_Vec< T >::Sparse_Vec(), itpp::tridiag(), itpp::variance(), and itpp::zero_pad().

template<class Num_T>
void itpp::Vec< Num_T >::set_length ( const int  size,
const bool  copy = false 
) [inline]

Set length of vector. if copy = true then keeping the old values.

Definition at line 213 of file vec.h.

Referenced by itpp::Sequence_Interleaver< T >::deinterleave(), itpp::Cross_Interleaver< T >::interleave(), and itpp::Block_Interleaver< T >::interleave().

template<class Num_T>
void itpp::Vec< Num_T >::set_size ( const int  size,
const bool  copy = false 
)

Set length of vector. if copy = true then keeping the old values.

Definition at line 509 of file vec.h.

References itpp::Vec< Num_T >::alloc(), itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

Referenced by itpp::bidiag(), itpp::Cross_Interleaver< T >::Cross_Interleaver(), itpp::Sequence_Interleaver< T >::deinterleave(), itpp::Cross_Interleaver< T >::deinterleave(), itpp::Block_Interleaver< T >::deinterleave(), itpp::Vec< Num_T >::del(), itpp::dht(), itpp::Sparse_Vec< T >::full(), itpp::Circular_Buffer< T >::get(), itpp::Vec< Num_T >::ins(), itpp::Sequence_Interleaver< T >::interleave(), itpp::lininterp(), itpp::max(), itpp::min(), itpp::Vec< Num_T >::operator=(), itpp::operator>>(), itpp::Circular_Buffer< T >::peek(), itpp::Circular_Buffer< T >::peek_reverse(), itpp::Vec< Num_T >::set(), itpp::ARMA_Filter< T1, T2, T3 >::set_coeffs(), itpp::AR_Filter< T1, T2, T3 >::set_coeffs(), itpp::MA_Filter< T1, T2, T3 >::set_coeffs(), itpp::set_fix(), itpp::ND_UPAM::set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), itpp::Vec< ivec >::set_length(), itpp::Cross_Interleaver< T >::set_order(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Raised_Cosine< T1 >::set_pulse_shape(), itpp::sum(), itpp::sum_sqr(), itpp::tridiag(), and itpp::upsample().

template<class Num_T>
void itpp::Vec< Num_T >::zeros (  )  [inline]

Set the vector to the all zero vector.

Definition at line 217 of file vec.h.

Referenced by itpp::Vec< ivec >::clear().

template<class Num_T>
void itpp::Vec< Num_T >::clear (  )  [inline]

Set the vector to the all zero vector.

Definition at line 219 of file vec.h.

Referenced by itpp::ARMA_Filter< T1, T2, T3 >::clear(), itpp::AR_Filter< T1, T2, T3 >::clear(), itpp::MA_Filter< std::complex< double >, double, std::complex< double > >::clear(), itpp::Sequence_Interleaver< T >::deinterleave(), itpp::Cross_Interleaver< T >::deinterleave(), itpp::Block_Interleaver< T >::deinterleave(), itpp::Sequence_Interleaver< T >::interleave(), itpp::Cross_Interleaver< T >::interleave(), itpp::Block_Interleaver< T >::interleave(), itpp::ARMA_Filter< T1, T2, T3 >::set_coeffs(), itpp::AR_Filter< T1, T2, T3 >::set_coeffs(), itpp::MA_Filter< T1, T2, T3 >::set_coeffs(), and itpp::upsample().

template<class Num_T>
void itpp::Vec< Num_T >::ones (  )  [inline]

Set the vector to the all one vector.

Definition at line 221 of file vec.h.

template<class Num_T>
bool itpp::Vec< Num_T >::set ( const std::string &  str  ) 

Set the vector equal to the values in the str string.

Definition at line 592 of file vec.h.

References itpp::Vec< Num_T >::set().

template<class Num_T>
const Num_T& itpp::Vec< Num_T >::operator[] ( const int  i  )  const [inline]

C-style index operator. First element is 0.

Definition at line 228 of file vec.h.

template<class Num_T>
const Num_T& itpp::Vec< Num_T >::operator() ( const int  i  )  const [inline]

Index operator. First element is 0.

Definition at line 230 of file vec.h.

template<class Num_T>
Num_T& itpp::Vec< Num_T >::operator[] ( const int  i  )  [inline]

C-style index operator. First element is 0.

Definition at line 232 of file vec.h.

template<class Num_T>
Num_T& itpp::Vec< Num_T >::operator() ( const int  i  )  [inline]

Index operator. First element is 0.

Definition at line 234 of file vec.h.

template<class Num_T>
const Vec< Num_T > itpp::Vec< Num_T >::operator() ( const int  i1,
const int  i2 
) const [inline]

Sub-vector with elements from i1 to i2. Index -1 indicates the last element.

Definition at line 598 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
const Vec< Num_T > itpp::Vec< Num_T >::operator() ( const Vec< int > &  indexlist  )  const

Sub-vector where the elements are given by the list indexlist.

Definition at line 621 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
const Num_T& itpp::Vec< Num_T >::get ( const int  i  )  const [inline]

Accessor-style method. First element is 0.

Definition at line 241 of file vec.h.

template<class Num_T>
const Vec< Num_T > itpp::Vec< Num_T >::get ( const int  i1,
const int  i2 
) const [inline]

Sub-vector with elements from i1 to i2. Index -1 indicates the last element.

Definition at line 615 of file vec.h.

template<class Num_T>
void itpp::Vec< Num_T >::set ( const int  i,
const Num_T &  v 
) [inline]

Modifier-style method. First element is 0.

Definition at line 245 of file vec.h.

template<class Num_T>
Mat< Num_T > itpp::Vec< Num_T >::transpose (  )  const

Matrix transpose. Converts to a matrix with the vector in the first row.

Definition at line 632 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

Referenced by itpp::Vec< ivec >::T().

template<class Num_T>
Mat<Num_T> itpp::Vec< Num_T >::T (  )  const [inline]

Matrix transpose. Converts to a matrix with the vector in the first row.

Definition at line 250 of file vec.h.

template<class Num_T>
Mat< Num_T > itpp::Vec< Num_T >::hermitian_transpose (  )  const

Hermitian matrix transpose. Converts to a matrix with the conjugate of the vector in the first row.

Definition at line 645 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

Referenced by itpp::Vec< ivec >::H().

template<class Num_T>
Mat<Num_T> itpp::Vec< Num_T >::H (  )  const [inline]

Hermitian matrix transpose. Converts to a matrix with the conjugate of the vector in the first row.

Definition at line 254 of file vec.h.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator+= ( const Vec< Num_T > &  v  )  [inline]

Addition of vector.

Definition at line 655 of file vec.h.

References itpp::Vec< Num_T >::alloc(), itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator+= ( const Num_T  t  )  [inline]

Addition of scalar.

Definition at line 673 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator-= ( const Vec< Num_T > &  v  )  [inline]

Subtraction of vector.

Definition at line 718 of file vec.h.

References itpp::Vec< Num_T >::alloc(), itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator-= ( const Num_T  t  )  [inline]

Subtraction of scalar.

Definition at line 736 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator *= ( const Num_T  t  )  [inline]

Multiply with a scalar.

Definition at line 793 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator/= ( const Num_T  t  )  [inline]

Elementwise division.

Definition at line 927 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator/= ( const Vec< Num_T > &  v  )  [inline]

Elementwise division.

Definition at line 935 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
Vec< Num_T > itpp::Vec< Num_T >::get ( const Vec< bin > &  binlist  )  const

Get the elements in the vector where binlist is 1.

Definition at line 972 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, itpp::Vec< Num_T >::length(), and itpp::Vec< Num_T >::size().

template<class Num_T>
Vec< Num_T > itpp::Vec< Num_T >::right ( const int  nr  )  const [inline]

Get the right nr elements from the vector.

Definition at line 989 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

Referenced by itpp::Turbo_Codec::decode_block(), itpp::Sequence_Interleaver< T >::deinterleave(), itpp::Cross_Interleaver< T >::deinterleave(), itpp::Block_Interleaver< T >::deinterleave(), itpp::Sequence_Interleaver< T >::interleave(), itpp::Cross_Interleaver< T >::interleave(), and itpp::Block_Interleaver< T >::interleave().

template<class Num_T>
Vec< Num_T > itpp::Vec< Num_T >::left ( const int  nr  )  const [inline]

Get the left nr elements from the vector.

Definition at line 1000 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

Referenced by itpp::Turbo_Codec::decode_block(), itpp::Turbo_Codec::decode_n3(), itpp::Cross_Interleaver< T >::deinterleave(), and itpp::Cross_Interleaver< T >::interleave().

template<class Num_T>
Vec< Num_T > itpp::Vec< Num_T >::mid ( const int  start,
const int  nr 
) const [inline]

Get the middle part of vector from start including nr elements.

Definition at line 1011 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

Referenced by itpp::Cross_Interleaver< T >::deinterleave(), and itpp::Cross_Interleaver< T >::interleave().

template<class Num_T>
Vec< Num_T > itpp::Vec< Num_T >::split ( const int  pos  ) 

Split the vector into two parts at element pos. Return the first part and keep the second.

Definition at line 1023 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
void itpp::Vec< Num_T >::shift_right ( const Num_T  In,
const int  n = 1 
)

Shift in element In at position 0 n times.

Definition at line 1041 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
void itpp::Vec< Num_T >::shift_right ( const Vec< Num_T > &  In  ) 

Shift in vector In at position 0.

Definition at line 1053 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
void itpp::Vec< Num_T >::shift_left ( const Num_T  In,
const int  n = 1 
)

Shift out the n left elements and a the same time shift in the element at last position n times.

Definition at line 1064 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
void itpp::Vec< Num_T >::shift_left ( const Vec< Num_T > &  In  ) 

Shift in vector In at last position.

Definition at line 1076 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
void itpp::Vec< Num_T >::set_subvector ( int  i1,
int  i2,
const Vec< Num_T > &  v 
) [inline]

Set subvector defined by indicies i1 to i2 to vector v.

Definition at line 1193 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
void itpp::Vec< Num_T >::set_subvector ( const int  i,
const Vec< Num_T > &  v 
) [inline]

Set subvector defined by first index i and size of vector v to v.

Definition at line 1206 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
void itpp::Vec< Num_T >::set_subvector ( int  i1,
int  i2,
const Num_T  t 
)

Set subvector defined by indicies i1 to i2 to constant t.

Definition at line 1214 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and it_assert1.

template<class Num_T>
void itpp::Vec< Num_T >::replace_mid ( const int  pos,
const Vec< Num_T > &  v 
)

Replace the elements from pos by the vector v.

Definition at line 1227 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, and itpp::Vec< Num_T >::length().

Referenced by itpp::Turbo_Codec::decode_n3().

template<class Num_T>
void itpp::Vec< Num_T >::del ( const int  index  ) 

Delete element number index.

Definition at line 1234 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, and itpp::Vec< Num_T >::set_size().

template<class Num_T>
void itpp::Vec< Num_T >::del ( const int  i1,
const int  i2 
)

Delete elements from i1 to i2.

Definition at line 1250 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, and itpp::Vec< Num_T >::set_size().

template<class Num_T>
void itpp::Vec< Num_T >::ins ( const int  index,
const Num_T  in 
)

Insert element in at index.

Definition at line 1262 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, and itpp::Vec< Num_T >::set_size().

template<class Num_T>
void itpp::Vec< Num_T >::ins ( const int  index,
const Vec< Num_T > &  in 
)

Insert vector in at index.

Definition at line 1274 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, itpp::Vec< Num_T >::length(), itpp::Vec< Num_T >::set_size(), and itpp::Vec< Num_T >::size().

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator= ( const Num_T  t  )  [inline]

Assign all elements in vector to t.

Definition at line 1286 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator= ( const Vec< Num_T > &  v  )  [inline]

Assign vector the value and length of v.

Definition at line 1294 of file vec.h.

References itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, and itpp::Vec< Num_T >::set_size().

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator= ( const Mat< Num_T > &  m  )  [inline]

Assign vector equal to the 1-dimensional matrix m.

Definition at line 1304 of file vec.h.

References itpp::Mat< Num_T >::_data(), itpp::Mat< Num_T >::cols(), itpp::Vec< Num_T >::data, itpp::Vec< Num_T >::datasize, it_assert1, it_error, itpp::Mat< Num_T >::rows(), and itpp::Vec< Num_T >::set_size().

template<class Num_T>
Vec< Num_T > & itpp::Vec< Num_T >::operator= ( const char *  values  )  [inline]

Assign vector the values in the string values.

Definition at line 1321 of file vec.h.

References itpp::Vec< Num_T >::set().

template<class Num_T>
bvec itpp::Vec< Num_T >::operator== ( const Num_T  value  )  const

Elementwise equal to the scalar.

Definition at line 1331 of file vec.h.

References itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
bvec itpp::Vec< Num_T >::operator!= ( const Num_T  value  )  const

Elementwise not-equal to the scalar.

Definition at line 1347 of file vec.h.

References itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
bvec itpp::Vec< Num_T >::operator< ( const Num_T  value  )  const

Elementwise less than the scalar.

Definition at line 1363 of file vec.h.

References itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
bvec itpp::Vec< Num_T >::operator<= ( const Num_T  value  )  const

Elementwise less than and equal to the scalar.

Definition at line 1379 of file vec.h.

References itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
bvec itpp::Vec< Num_T >::operator> ( const Num_T  value  )  const

Elementwise greater than the scalar.

Definition at line 1395 of file vec.h.

References itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
bvec itpp::Vec< Num_T >::operator>= ( const Num_T  value  )  const

Elementwise greater than and equal to the scalar.

Definition at line 1411 of file vec.h.

References itpp::Vec< Num_T >::datasize, it_assert, and itpp::Vec< Num_T >::length().

template<class Num_T>
bool itpp::Vec< Num_T >::operator== ( const Vec< Num_T > &  v  )  const

Compare two vectors. False if wrong sizes or different values.

Definition at line 1424 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
bool itpp::Vec< Num_T >::operator!= ( const Vec< Num_T > &  v  )  const

Compare two vectors. True if different.

Definition at line 1435 of file vec.h.

References itpp::Vec< Num_T >::data, and itpp::Vec< Num_T >::datasize.

template<class Num_T>
Num_T& itpp::Vec< Num_T >::_elem ( const int  i  )  [inline]

Index operator without boundary check. Not recommended to use.

Definition at line 385 of file vec.h.

template<class Num_T>
const Num_T& itpp::Vec< Num_T >::_elem ( const int  i  )  const [inline]

Index operator without boundary check. Not recommended to use.

Definition at line 387 of file vec.h.

template<class Num_T>
Num_T* itpp::Vec< Num_T >::_data (  )  [inline]

Get the pointer to the internal structure. Not recommended to use.

Definition at line 390 of file vec.h.

Referenced by itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::get_row(), itpp::Mat< Num_T >::ins_col(), itpp::Mat< Num_T >::ins_row(), itpp::operator *(), itpp::Mat< Num_T >::set_col(), itpp::Mat< Num_T >::set_row(), and itpp::variance().

template<class Num_T>
const Num_T* itpp::Vec< Num_T >::_data (  )  const [inline]

Get the pointer to the internal structure. Not recommended to use.

Definition at line 393 of file vec.h.

template<class Num_T>
void itpp::Vec< Num_T >::alloc ( const int  size  )  [inline, protected]

Allocate storage for a vector of length size.

Definition at line 397 of file vec.h.

Referenced by itpp::Vec< Num_T >::operator+=(), itpp::Vec< Num_T >::operator-=(), itpp::Vec< Num_T >::set(), itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::Vec(), and itpp::Vec< ivec >::Vec().

template<class Num_T>
void itpp::Vec< Num_T >::free (  )  [inline, protected]

Free the storage space allocated by the vector.

Definition at line 410 of file vec.h.

Referenced by itpp::Vec< ivec >::alloc(), and itpp::Vec< ivec >::~Vec().


Friends And Related Function Documentation

template<class Num_T>
typedef Vec<double> vec [related]

Definition of double vector type.

Definition at line 431 of file vec.h.

template<class Num_T>
typedef Vec<std::complex<double> > cvec [related]

Definition of complex<double> vector type.

Definition at line 437 of file vec.h.

template<class Num_T>
typedef Vec<int> ivec [related]

Definition of integer vector type.

Definition at line 443 of file vec.h.

template<class Num_T>
typedef Vec<short int> svec [related]

Definition of short vector type.

Definition at line 449 of file vec.h.

template<class Num_T>
typedef Vec<bin> bvec [related]

Definition of binary vector type.

Definition at line 455 of file vec.h.

template<class Num_T>
const Vec<Num_T> operator+ ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Addition of two vectors.

template<class Num_T>
const Vec<Num_T> operator+ ( const Vec< Num_T > &  v,
const Num_T  t 
) [friend]

Addition of a vector and a scalar.

template<class Num_T>
const Vec<Num_T> operator+ ( const Num_T  t,
const Vec< Num_T > &  v 
) [friend]

Addition of a scalar and a vector.

template<class Num_T>
const Vec<Num_T> operator- ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Subtraction of v2 from v1.

template<class Num_T>
const Vec<Num_T> operator- ( const Vec< Num_T > &  v,
const Num_T  t 
) [friend]

Subtraction of scalar from vector.

template<class Num_T>
const Vec<Num_T> operator- ( const Num_T  t,
const Vec< Num_T > &  v 
) [friend]

Sutraction of vector from scalar.

template<class Num_T>
const Vec<Num_T> operator- ( const Vec< Num_T > &  v  )  [friend]

Negation of vector.

template<class Num_T>
Num_T operator * ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Inner (dot) product.

Definition at line 81 of file vec.h.

template<class Num_T>
Num_T dot ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Inner (dot) product.

template<class Num_T>
const Mat<Num_T> outer_product ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Outer product of two vectors v1 and v2.

template<class Num_T>
const Vec<Num_T> operator * ( const Vec< Num_T > &  v,
const Num_T  t 
) [friend]

Elementwise multiplication of vector and scalar.

template<class Num_T>
const Vec<Num_T> operator * ( const Num_T  t,
const Vec< Num_T > &  v 
) [friend]

Elementwise multiplication of vector and scalar.

template<class Num_T>
const Vec<Num_T> elem_mult ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Elementwise multiplication.

template<class Num_T>
const Vec<Num_T> elem_mult ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
const Vec< Num_T > &  v3 
) [friend]

Elementwise multiplication of three vectors.

template<class Num_T>
const Vec<Num_T> elem_mult ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
const Vec< Num_T > &  v3,
const Vec< Num_T > &  v4 
) [friend]

Elementwise multiplication of four vectors.

template<class Num_T>
const Vec<Num_T> operator/ ( const Vec< Num_T > &  v,
const Num_T  t 
) [friend]

Elementwise division.

template<class Num_T>
const Vec<Num_T> operator/ ( const Num_T  t,
const Vec< Num_T > &  v 
) [friend]

Elementwise division.

template<class Num_T>
const Vec<Num_T> elem_div ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Elementwise division.

template<class Num_T>
const Vec<Num_T> elem_div ( const Num_T  t,
const Vec< Num_T > &  v 
) [friend]

Elementwise division.

template<class Num_T>
const Vec<Num_T> concat ( const Vec< Num_T > &  v,
const Num_T  a 
) [friend]

Append element a to the end of the vector v.

template<class Num_T>
const Vec<Num_T> concat ( const Num_T  a,
const Vec< Num_T > &  v 
) [friend]

Concat element a to the beginning of the vector v.

template<class Num_T>
const Vec<Num_T> concat ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
) [friend]

Concat vectors v1 and v2.

template<class Num_T>
const Vec<Num_T> concat ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
const Vec< Num_T > &  v3 
) [friend]

Concat vectors v1, v2 and v3.

template<class Num_T>
vec operator+ ( const float &  s,
const vec v 
) [related]

Addition operator for float and vec.

Definition at line 84 of file operators.h.

template<class Num_T>
vec operator+ ( const short &  s,
const vec v 
) [related]

Addition operator for short and vec.

Definition at line 90 of file operators.h.

template<class Num_T>
vec operator+ ( const int &  s,
const vec v 
) [related]

Addition operator for int and vec.

Definition at line 96 of file operators.h.

template<class Num_T>
vec operator+ ( const vec v,
const float &  s 
) [related]

Addition operator for vec and float.

Definition at line 102 of file operators.h.

template<class Num_T>
vec operator+ ( const vec v,
const short &  s 
) [related]

Addition operator for vec and short.

Definition at line 108 of file operators.h.

template<class Num_T>
vec operator+ ( const vec v,
const int &  s 
) [related]

Addition operator for vec and int.

Definition at line 114 of file operators.h.

template<class Num_T>
vec operator- ( const float &  s,
const vec v 
) [related]

Subtraction operator for float and vec.

Definition at line 120 of file operators.h.

template<class Num_T>
vec operator- ( const short &  s,
const vec v 
) [related]

Subtraction operator for short and vec.

Definition at line 126 of file operators.h.

template<class Num_T>
vec operator- ( const int &  s,
const vec v 
) [related]

Subtraction operator for int and vec.

Definition at line 132 of file operators.h.

template<class Num_T>
vec operator- ( const vec v,
const float &  s 
) [related]

Subtraction operator for vec and float.

Definition at line 138 of file operators.h.

template<class Num_T>
vec operator- ( const vec v,
const short &  s 
) [related]

Subtraction operator for vec and short.

Definition at line 144 of file operators.h.

template<class Num_T>
vec operator- ( const vec v,
const int &  s 
) [related]

Subtraction operator for vec and int.

Definition at line 150 of file operators.h.

template<class Num_T>
vec operator * ( const float &  s,
const vec v 
) [related]

Multiplication operator for float and vec.

Definition at line 156 of file operators.h.

template<class Num_T>
vec operator * ( const short &  s,
const vec v 
) [related]

Multiplication operator for short and vec.

Definition at line 162 of file operators.h.

template<class Num_T>
vec operator * ( const int &  s,
const vec v 
) [related]

Multiplication operator for int and vec.

Definition at line 168 of file operators.h.

template<class Num_T>
cvec operator * ( const std::complex< double > &  s,
const vec v 
) [related]

Multiplication operator for complex<double> and vec.

template<class Num_T>
vec operator * ( const vec v,
const float &  s 
) [related]

Multiplication operator for vec and float.

Definition at line 180 of file operators.h.

template<class Num_T>
vec operator * ( const vec v,
const short &  s 
) [related]

Multiplication operator for vec and short.

Definition at line 186 of file operators.h.

template<class Num_T>
vec operator * ( const vec v,
const int &  s 
) [related]

Multiplication operator for vec and int.

Definition at line 192 of file operators.h.

template<class Num_T>
cvec operator * ( const vec v,
const std::complex< double > &  s 
) [related]

Multiplication operator for vec and complex<double>.

template<class Num_T>
vec operator/ ( const vec v,
const float &  s 
) [related]

Division operator for vec and float.

Definition at line 204 of file operators.h.

template<class Num_T>
vec operator/ ( const vec v,
const short &  s 
) [related]

Division operator for vec and short.

Definition at line 210 of file operators.h.

template<class Num_T>
vec operator/ ( const vec v,
const int &  s 
) [related]

Division operator for vec and int.

Definition at line 216 of file operators.h.

template<class Num_T>
vec operator+ ( const double &  s,
const ivec v 
) [related]

Addition operator for double and ivec.

template<class Num_T>
vec operator+ ( const ivec v,
const double &  s 
) [related]

Addition operator for ivec and double.

Definition at line 231 of file operators.h.

template<class Num_T>
vec operator- ( const double &  s,
const ivec v 
) [related]

Subtraction operator for double and ivec.

template<class Num_T>
vec operator- ( const ivec v,
const double &  s 
) [related]

Subtraction operator for ivec and double.

Definition at line 243 of file operators.h.

template<class Num_T>
vec operator * ( const double &  s,
const ivec v 
) [related]

Multiplication operator for double and ivec.

template<class Num_T>
vec operator * ( const ivec v,
const double &  s 
) [related]

Multiplication operator for ivec and double.

Definition at line 255 of file operators.h.

template<class Num_T>
vec operator/ ( const double &  s,
const ivec v 
) [related]

Division operator for double and ivec.

template<class Num_T>
vec operator/ ( const ivec v,
const double &  s 
) [related]

Division operator for ivec and double.

template<class Num_T>
cvec operator+ ( const std::complex< double > &  s,
const ivec v 
) [related]

Addition operator for complex<double> and ivec.

template<class Num_T>
cvec operator+ ( const ivec v,
const std::complex< double > &  s 
) [related]

Addition operator for ivec and complex<double>.

Definition at line 279 of file operators.h.

template<class Num_T>
cvec operator- ( const std::complex< double > &  s,
const ivec v 
) [related]

Subtraction operator for complex<double> and ivec.

template<class Num_T>
cvec operator- ( const ivec v,
const std::complex< double > &  s 
) [related]

Subtraction operator for ivec and complex<double>.

Definition at line 291 of file operators.h.

template<class Num_T>
cvec operator * ( const std::complex< double > &  s,
const ivec v 
) [related]

Multiplication operator for complex<double> and ivec.

template<class Num_T>
cvec operator * ( const ivec v,
const std::complex< double > &  s 
) [related]

Multiplication operator for ivec and complex<double>.

Definition at line 303 of file operators.h.

template<class Num_T>
cvec operator/ ( const std::complex< double > &  s,
const ivec v 
) [related]

Division operator for complex<double> and ivec.

template<class Num_T>
cvec operator/ ( const ivec v,
const std::complex< double > &  s 
) [related]

Division operator for ivec and complex<double>.

template<class Num_T>
cvec operator+ ( const double &  s,
const cvec v 
) [related]

Addition operator for double and cvec.

template<class Num_T>
cvec operator+ ( const float &  s,
const cvec v 
) [related]

Addition operator for float and cvec.

Definition at line 329 of file operators.h.

template<class Num_T>
cvec operator+ ( const short &  s,
const cvec v 
) [related]

Addition operator for short and cvec.

Definition at line 335 of file operators.h.

template<class Num_T>
cvec operator+ ( const int &  s,
const cvec v 
) [related]

Addition operator for int and cvec.

Definition at line 341 of file operators.h.

template<class Num_T>
cvec operator+ ( const cvec v,
const float &  s 
) [related]

Addition operator for cvec and float.

Definition at line 347 of file operators.h.

template<class Num_T>
cvec operator+ ( const cvec v,
const double &  s 
) [related]

Addition operator for cvec and double.

Definition at line 353 of file operators.h.

template<class Num_T>
cvec operator+ ( const cvec v,
const short &  s 
) [related]

Addition operator for cvec and short.

Definition at line 359 of file operators.h.

template<class Num_T>
cvec operator+ ( const cvec v,
const int &  s 
) [related]

Addition operator for cvec and int.

Definition at line 365 of file operators.h.

template<class Num_T>
cvec operator- ( const double &  s,
const cvec v 
) [related]

Subtraction operator for double and cvec.

template<class Num_T>
cvec operator- ( const float &  s,
const cvec v 
) [related]

Subtraction operator for float and cvec.

Definition at line 377 of file operators.h.

template<class Num_T>
cvec operator- ( const short &  s,
const cvec v 
) [related]

Subtraction operator for short and cvec.

Definition at line 383 of file operators.h.

template<class Num_T>
cvec operator- ( const int &  s,
const cvec v 
) [related]

Subtraction operator for int and cvec.

Definition at line 389 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec v,
const float &  s 
) [related]

Subtraction operator for cvec and float.

Definition at line 395 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec v,
const double &  s 
) [related]

Subtraction operator for cvec and double.

Definition at line 401 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec v,
const short &  s 
) [related]

Subtraction operator for cvec and short.

Definition at line 407 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec v,
const int &  s 
) [related]

Subtraction operator for cvec and int.

Definition at line 413 of file operators.h.

template<class Num_T>
cvec operator * ( const double &  s,
const cvec v 
) [related]

Multiplication operator for double and cvec.

template<class Num_T>
cvec operator * ( const float &  s,
const cvec v 
) [related]

Multiplication operator for float and cvec.

Definition at line 425 of file operators.h.

template<class Num_T>
cvec operator * ( const short &  s,
const cvec v 
) [related]

Multiplication operator for short and cvec.

Definition at line 431 of file operators.h.

template<class Num_T>
cvec operator * ( const int &  s,
const cvec v 
) [related]

Multiplication operator for int and cvec.

Definition at line 437 of file operators.h.

template<class Num_T>
cvec operator * ( const cvec v,
const float &  s 
) [related]

Multiplication operator for cvec and float.

Definition at line 443 of file operators.h.

template<class Num_T>
cvec operator * ( const cvec v,
const double &  s 
) [related]

Multiplication operator for cvec and double.

Definition at line 449 of file operators.h.

template<class Num_T>
cvec operator * ( const cvec v,
const short &  s 
) [related]

Multiplication operator for cvec and short.

Definition at line 455 of file operators.h.

template<class Num_T>
cvec operator * ( const cvec v,
const int &  s 
) [related]

Multiplication operator for cvec and int.

Definition at line 461 of file operators.h.

template<class Num_T>
cvec operator/ ( const cvec v,
const double &  s 
) [related]

Division operator for cvec and double.

template<class Num_T>
cvec operator/ ( const double &  s,
const cvec v 
) [related]

Division operator for double and cvec.

template<class Num_T>
cvec operator/ ( const cvec v,
const float &  s 
) [related]

Division operator for cvec and float.

Definition at line 479 of file operators.h.

template<class Num_T>
cvec operator/ ( const cvec v,
const short &  s 
) [related]

Division operator for cvec and short.

Definition at line 485 of file operators.h.

template<class Num_T>
cvec operator/ ( const cvec v,
const int &  s 
) [related]

Division operator for cvec and int.

Definition at line 491 of file operators.h.

template<class Num_T>
vec operator+ ( const bvec a,
const vec b 
) [related]

Addition operator for bvec and vec.

template<class Num_T>
vec operator+ ( const svec a,
const vec b 
) [related]

Addition operator for svec and vec.

template<class Num_T>
vec operator+ ( const ivec a,
const vec b 
) [related]

Addition operator for ivec and vec.

template<class Num_T>
vec operator+ ( const vec a,
const bvec b 
) [related]

Addition operator for vec and bvec.

Definition at line 688 of file operators.h.

template<class Num_T>
vec operator+ ( const vec a,
const svec b 
) [related]

Addition operator for vec and svec.

Definition at line 694 of file operators.h.

template<class Num_T>
vec operator+ ( const vec a,
const ivec b 
) [related]

Addition operator for vec and ivec.

Definition at line 700 of file operators.h.

template<class Num_T>
vec operator- ( const bvec a,
const vec b 
) [related]

Subtraction operator for bvec and vec.

Definition at line 706 of file operators.h.

template<class Num_T>
vec operator- ( const svec a,
const vec b 
) [related]

Subtraction operator for svec and vec.

Definition at line 712 of file operators.h.

template<class Num_T>
vec operator- ( const ivec a,
const vec b 
) [related]

Subtraction operator for ivec and vec.

Definition at line 718 of file operators.h.

template<class Num_T>
vec operator- ( const vec a,
const bvec b 
) [related]

Subtraction operator for vec and bvec.

Definition at line 724 of file operators.h.

template<class Num_T>
vec operator- ( const vec a,
const svec b 
) [related]

Subtraction operator for vec and svec.

Definition at line 730 of file operators.h.

template<class Num_T>
vec operator- ( const vec a,
const ivec b 
) [related]

Subtraction operator for vec and ivec.

Definition at line 736 of file operators.h.

template<class Num_T>
double operator * ( const bvec a,
const vec b 
) [related]

Multiplication operator for bvec and vec.

template<class Num_T>
double operator * ( const svec a,
const vec b 
) [related]

Multiplication operator for svec and vec.

template<class Num_T>
double operator * ( const ivec a,
const vec b 
) [related]

Multiplication operator for ivec and vec.

template<class Num_T>
double operator * ( const vec a,
const bvec b 
) [related]

Multiplication operator for vec and bvec.

Definition at line 760 of file operators.h.

template<class Num_T>
double operator * ( const vec a,
const svec b 
) [related]

Multiplication operator for vec and svec.

Definition at line 766 of file operators.h.

template<class Num_T>
double operator * ( const vec a,
const ivec b 
) [related]

Multiplication operator for vec and ivec.

Definition at line 772 of file operators.h.

template<class Num_T>
cvec operator+ ( const bvec a,
const cvec b 
) [related]

Addition operator for bvec and cvec.

template<class Num_T>
cvec operator+ ( const svec a,
const cvec b 
) [related]

Addition operator for svec and cvec.

template<class Num_T>
cvec operator+ ( const ivec a,
const cvec b 
) [related]

Addition operator for ivec and cvec.

template<class Num_T>
cvec operator+ ( const cvec a,
const bvec b 
) [related]

Addition operator for cvec and bvec.

Definition at line 798 of file operators.h.

template<class Num_T>
cvec operator+ ( const cvec a,
const svec b 
) [related]

Addition operator for cvec and svec.

Definition at line 804 of file operators.h.

template<class Num_T>
cvec operator+ ( const cvec a,
const ivec b 
) [related]

Addition operator for cvec and ivec.

Definition at line 810 of file operators.h.

template<class Num_T>
cvec operator- ( const bvec a,
const cvec b 
) [related]

Subtraction operator for bvec and cvec.

Definition at line 816 of file operators.h.

template<class Num_T>
cvec operator- ( const svec a,
const cvec b 
) [related]

Subtraction operator for svec and cvec.

Definition at line 822 of file operators.h.

template<class Num_T>
cvec operator- ( const ivec a,
const cvec b 
) [related]

Subtraction operator for ivec and cvec.

Definition at line 828 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec a,
const bvec b 
) [related]

Subtraction operator for cvec and bvec.

Definition at line 834 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec a,
const svec b 
) [related]

Subtraction operator for cvec and svec.

Definition at line 840 of file operators.h.

template<class Num_T>
cvec operator- ( const cvec a,
const ivec b 
) [related]

Subtraction operator for cvec and ivec.

Definition at line 846 of file operators.h.

template<class Num_T>
std::complex< double > operator * ( const bvec a,
const cvec b 
) [related]

Multiplication operator for bvec and cvec.

template<class Num_T>
std::complex< double > operator * ( const svec a,
const cvec b 
) [related]

Multiplication operator for svec and cvec.

template<class Num_T>
std::complex< double > operator * ( const ivec a,
const cvec b 
) [related]

Multiplication operator for ivec and cvec.

template<class Num_T>
std::complex< double > operator * ( const cvec a,
const bvec b 
) [related]

Multiplication operator for cvec and bvec.

Definition at line 870 of file operators.h.

template<class Num_T>
std::complex< double > operator * ( const cvec a,
const svec b 
) [related]

Multiplication operator for cvec and svec.

Definition at line 876 of file operators.h.

template<class Num_T>
std::complex< double > operator * ( const cvec a,
const ivec b 
) [related]

Multiplication operator for cvec and ivec.

Definition at line 882 of file operators.h.

template<class Num_T>
void sort ( Vec< T > &  data  )  [related]

Sort the data vector in increasing order.

Definition at line 46 of file sort.h.

References itpp::Vec< Num_T >::size().

Referenced by pcamat().

template<class Num_T>
ivec sort_index ( const Vec< T > &  data  )  [related]

Return an index vector corresponding to a sorted vector data (increasing order).

Definition at line 57 of file sort.h.

References itpp::Vec< Num_T >::length().

template<class Num_T>
void QS ( int  low,
int  high,
Vec< T > &  data 
) [related]

Quick sort function of a subset of a vector data.

Parameters:
low Start index of a subvector to be sorted
high End index of a subvector to be sorted
data Data vector, in which a part of it is to be sorted
Note:
This function uses recurence.

Definition at line 80 of file sort.h.

template<class Num_T>
void QSindex ( int  low,
int  high,
ivec indexlist,
const Vec< T > &  data 
) [related]

Quick sort function, which gives a sorted index vector indexlist.

Parameters:
low Start index of a subvector to be sorted
high End index of a subvector to be sorted
data Data vector, in which a part of it is to be sorted
indexlist Result of sorting in the form of sorted indexes
Note:
This function uses recurence.

Definition at line 120 of file sort.h.

template<class Num_T>
Vec< T > vec_1 ( v0  )  [related]

Vector of length 1.

Definition at line 222 of file specmat.h.

template<class Num_T>
Vec< T > vec_2 ( v0,
v1 
) [related]

Vector of length 2.

Definition at line 234 of file specmat.h.

template<class Num_T>
Vec< T > vec_3 ( v0,
v1,
v2 
) [related]

Vector of length 3.

Definition at line 247 of file specmat.h.

template<class Num_T>
std::ostream & operator<< ( std::ostream &  os,
const Vec< Num_T > &  v 
) [related]

Stream output of vector.

Definition at line 1445 of file vec.h.

template<class Num_T>
std::istream & operator>> ( std::istream &  is,
Vec< Num_T > &  v 
) [related]

Stream input of vector.

The input can be on the form "1 2 3" or "[1 2 3]", i.e. with or without brackets. The first form is compatible with the set method, while the second form is compatible with the ostream operator. The elements can be separated by blank space or commas. "[]" means an empty vector. "1:4" means "1 2 3 4". "1:3:10" means every third integer from 1 to 10, i.e. "1 4 7 10".

Definition at line 1461 of file vec.h.


Member Data Documentation

template<class Num_T>
int itpp::Vec< Num_T >::datasize [protected]

The current number of elements in the vector.

Definition at line 413 of file vec.h.

Referenced by itpp::Vec< ivec >::alloc(), itpp::Vec< Num_T >::del(), itpp::dot(), itpp::elem_div(), itpp::elem_mult(), itpp::Vec< Num_T >::get(), itpp::Vec< ivec >::get(), itpp::Vec< Num_T >::hermitian_transpose(), itpp::Vec< Num_T >::ins(), itpp::Vec< Num_T >::left(), itpp::Vec< ivec >::length(), itpp::Vec< Num_T >::mid(), itpp::Vec< ivec >::ones(), itpp::operator *(), itpp::Vec< Num_T >::operator *=(), itpp::Vec< Num_T >::operator!=(), itpp::Vec< Num_T >::operator()(), itpp::Vec< ivec >::operator()(), itpp::operator+(), itpp::Vec< Num_T >::operator+=(), itpp::operator-(), itpp::Vec< Num_T >::operator-=(), itpp::operator/(), itpp::Vec< Num_T >::operator/=(), itpp::Vec< Num_T >::operator<(), itpp::Vec< Num_T >::operator<=(), itpp::Vec< Num_T >::operator=(), itpp::Vec< Num_T >::operator==(), itpp::Vec< Num_T >::operator>(), itpp::Vec< Num_T >::operator>=(), itpp::Vec< ivec >::operator[](), itpp::outer_product(), itpp::Vec< Num_T >::replace_mid(), itpp::Vec< Num_T >::right(), itpp::Vec< ivec >::set(), itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::set_subvector(), itpp::Vec< Num_T >::shift_left(), itpp::Vec< Num_T >::shift_right(), itpp::Vec< ivec >::size(), itpp::Vec< Num_T >::split(), itpp::Vec< Num_T >::transpose(), itpp::Vec< Num_T >::Vec(), and itpp::Vec< ivec >::zeros().

template<class Num_T>
Num_T* itpp::Vec< Num_T >::data [protected]

A pointer to the data area.

Definition at line 415 of file vec.h.

Referenced by itpp::Vec< ivec >::_data(), itpp::Vec< ivec >::_elem(), itpp::Vec< ivec >::alloc(), itpp::Vec< Num_T >::del(), itpp::dot(), itpp::elem_div(), itpp::elem_mult(), itpp::Vec< ivec >::free(), itpp::Vec< Num_T >::get(), itpp::Vec< ivec >::get(), itpp::Vec< Num_T >::hermitian_transpose(), itpp::Vec< Num_T >::ins(), itpp::Vec< Num_T >::left(), itpp::Vec< Num_T >::mid(), itpp::Vec< ivec >::ones(), itpp::operator *(), itpp::Vec< Num_T >::operator *=(), itpp::Vec< Num_T >::operator!=(), itpp::Vec< Num_T >::operator()(), itpp::Vec< ivec >::operator()(), itpp::operator+(), itpp::Vec< Num_T >::operator+=(), itpp::operator-(), itpp::Vec< Num_T >::operator-=(), itpp::operator/(), itpp::Vec< Num_T >::operator/=(), itpp::Vec< Num_T >::operator=(), itpp::Vec< Num_T >::operator==(), itpp::Vec< ivec >::operator[](), itpp::outer_product(), itpp::Vec< Num_T >::replace_mid(), itpp::Vec< Num_T >::right(), itpp::Vec< ivec >::set(), itpp::Vec< Num_T >::set(), itpp::Vec< Num_T >::set_size(), itpp::Vec< Num_T >::set_subvector(), itpp::Vec< Num_T >::shift_left(), itpp::Vec< Num_T >::shift_right(), itpp::Vec< Num_T >::split(), itpp::Vec< Num_T >::transpose(), itpp::Vec< Num_T >::Vec(), itpp::Vec< ivec >::Vec(), and itpp::Vec< ivec >::zeros().

template<class Num_T>
const Factory& itpp::Vec< Num_T >::factory [protected]

Element factory (set to DEFAULT_FACTORY to use Num_T default constructors only).

Definition at line 417 of file vec.h.

Referenced by itpp::Vec< ivec >::alloc().


The documentation for this class was generated from the following files:
SourceForge Logo

Generated on Thu Apr 19 14:15:02 2007 for IT++ by Doxygen 1.5.1