IT++ Logo
Classes | Typedefs | Enumerations | Functions | Variables

itpp Namespace Reference

\ More...

Classes

class  Array
 General array class. More...
class  bin
 Binary arithmetic (boolean) class. More...
class  bfstream_base
 Base class for binary file classesThis class serves as a base class for the classes bofstream, bifstream, and bfstream. It controls the endianity (i.e. the byte order of multibyte numbers on the disk) of the inhereted classes. More...
class  bofstream
 Binary Outfile Class. More...
class  bifstream
 Binary Infile Class. More...
class  bfstream
 Binary in/out-file Class. More...
class  Circular_Buffer
 General circular buffer class. More...
class  Factory
 Base class for class factories. More...
class  GF2mat_sparse_alist
 Parameterized "alist" representation of sparse GF(2) matrix. More...
class  GF2mat
 Class for dense GF(2) matrices. More...
class  it_file_base
 Base class for it_ifile and it_file. More...
class  it_ifile
 The IT++ file format reading class. More...
class  it_file
 The IT++ file format reading and writing class. More...
class  Name
 Automatic naming when savingAn easy way to give a variable a name and optionally description when saving. Usage: More...
class  it_file_base_old
 Base class for it_ifile_old and it_file_old. More...
class  it_ifile_old
 The old (version 2) IT++ file format reading class. More...
class  it_file_old
 The old (version 2) IT++ file format reading and writing class. More...
class  Mat
 Matrix Class (Templated) More...
class  Parser
 Argument Parser Class. More...
class  Random_Generator
 Base class for random (stochastic) sources.The Random_Generator class is based on the MersenneTwister MTRand class code in version 1.0 (15 May 2003) by Richard J. Wagner. See http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html for details. More...
class  Bernoulli_RNG
 Bernoulli distribution. More...
class  I_Uniform_RNG
 Integer uniform distributionExample: Generation of random uniformly distributed integers in the interval [0,10]. More...
class  Uniform_RNG
 Uniform distribution. More...
class  Exponential_RNG
 Exponential distribution. More...
class  Normal_RNG
 Normal distributionNormal (Gaussian) random variables, using a simplified Ziggurat method. More...
class  Laplace_RNG
 Laplacian distribution. More...
class  Complex_Normal_RNG
 A Complex Normal Source. More...
class  AR1_Normal_RNG
 Filtered normal distribution. More...
class  Weibull_RNG
 Weibull distribution. More...
class  Rayleigh_RNG
 Rayleigh distribution. More...
class  Rice_RNG
 Rice distribution. More...
class  Sparse_Mat
 Templated Sparse Matrix Class. More...
class  Sort
 Class for sorting of vectors. More...
class  Stack
 General stack class. More...
class  Sparse_Vec
 Templated sparse vector class. More...
class  Timer
 A virtual base class for timers. More...
class  CPU_Timer
 A CPU time timer classMeasures the time spent by the CPU on the current process. If two processes are running concurrently, one real seconds equal 5 CPU seconds per process. The resolution is not very good (in the order of 0.01 seconds). More...
class  Real_Timer
 A real time timer classMeasures real time. More...
class  Vec
 Vector Class (Templated) More...
class  BCH
 Class for binary, narrow-sense BCH codes. More...
class  Fading_Generator
 Fading generator class. More...
class  Independent_Fading_Generator
 Independent (random) fading generator class. More...
class  Static_Fading_Generator
 Static fading generator class. More...
class  Correlated_Fading_Generator
 Correlated (random) fading generator class. More...
class  Rice_Fading_Generator
 Rice type fading generator class. More...
class  FIR_Fading_Generator
 FIR type Fading generator class. More...
class  IFFT_Fading_Generator
 IFFT type Fading generator class. More...
class  Channel_Specification
 General specification of a time-domain multipath channel. More...
class  TDL_Channel
 Tapped Delay Line (TDL) channel model. More...
class  BSC
 A Binary Symetric Channel with crossover probability p. More...
class  AWGN_Channel
 Ordinary AWGN Channel for cvec or vec inputs and outputs. More...
class  Channel_Code
 Generic Channel Code class. More...
class  Dummy_Code
 Dummy Channel Code class. More...
class  Convolutional_Code
 Binary Convolutional rate 1/n class. More...
class  CRC_Code
 Cyclic Redundancy Check Codes. More...
class  Extended_Golay
 Extended Golay code (24,12,8). More...
class  BERC
 Bit Error Rate Counter (BERC) Class. More...
class  BLERC
 Class for counting block error rates. More...
class  GF
 Galois Field GF(q). More...
class  GFX
 Polynomials over GF(q)[x], where q=2^m, m=1,...,16. More...
class  Hamming_Code
 Binary Hamming codes. More...
class  Block_Interleaver
 Block Interleaver Class. More...
class  Cross_Interleaver
 Cross Interleaver Class. More...
class  Sequence_Interleaver
 Sequence Interleaver Class. More...
class  LDPC_Parity
 LDPC parity check matrix generic class. More...
class  LDPC_Parity_Unstructured
 Pure abstract class for unstructured LDPC matrices. More...
class  LDPC_Parity_Irregular
 Irregular LDPC code generator class. More...
class  LDPC_Parity_Regular
 Regular LDPC code generator class. More...
class  BLDPC_Parity
 Block LDPC code parity-check matrix. More...
class  LDPC_Generator
 LDPC Generator pure virtual base class. More...
class  LDPC_Generator_Systematic
 Systematic LDPC Generator class. More...
class  BLDPC_Generator
 Block LDPC Generator class. More...
class  LDPC_Code
 Low-density parity check (LDPC) codec. More...
class  LLR_calc_unit
 Log-likelihood algebra calculation unit. More...
class  Modulator
 General modulator for 1D or 2D signal constellations. More...
class  QAM
 M-ary QAM modulator with square lattice. More...
class  PSK
 M-ary PSK modulator. More...
class  QPSK
 QPSK modulator. More...
class  BPSK_c
 BPSK modulator with complex symbols. More...
class  BPSK
 BPSK modulator with real symbols. More...
class  PAM_c
 M-ary PAM modulator with complex symbols. More...
class  PAM
 M-ary PAM modulator with real symbols. More...
class  Modulator_ND
 Base class for an N-dimensional (ND) vector (MIMO) modulator. More...
class  Modulator_NRD
 Base class for N-dimensional vector (MIMO) channel modulators/demodulators with real-valued components. More...
class  Modulator_NCD
 Base class for vector (MIMO) channel modulator/demodulators with complex valued components. More...
class  ND_UPAM
 Real-valued MIMO channel with uniform PAM along each dimension. More...
class  ND_UQAM
 Complex MIMO channel with uniform QAM per dimension. More...
class  ND_UPSK
class  OFDM
 Class for modulating and demodulation of OFDM signals using the FFT. More...
class  Pulse_Shape
 General FIR Pulse Shape. More...
class  Raised_Cosine
 Raised Cosine (RC) Pulse Shaper. More...
class  Root_Raised_Cosine
 (Square) Root Raised Cosine (RRC) Pulse Shaper More...
class  Punctured_Convolutional_Code
 Binary Punctured Convolutional Code Class. More...
class  Rec_Syst_Conv_Code
 A Recursive Systematic Convolutional Encoder/Decoder class. More...
class  Reed_Solomon
 Reed-Solomon Codes. More...
class  LFSR
 Binary Linear Feedback Shift Register (LFSR)
  • The LFSR is on Fibonacci form (see p. 104 in Peterson, Ziemer and Borth, "Introduction to Spread Spctrum communications", Prentice-Hall, 1995)
  • If the connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r is a primitive polynomial, a Maximum Length Sequence (m-sequence) of length N=2^r-1 is constructed. Use an arbitrary state not equal to zero, to get a phase of the m-sequence
  • For a table of primtive polynomials see p. 117 in the reference above or a suitable book on coding.
More...
class  Gold
 Gold Sequences. More...
class  Spread_1d
 Spreading of float symbols to float output. More...
class  Spread_2d
 Spreading of complex symbols to complex output. More...
class  Multicode_Spread_1d
 Multicode spreading of float symbols. More...
class  Multicode_Spread_2d
 Multicode spreading of complex symbols to complex output. More...
class  Turbo_Codec
 Turbo encoder/decoder ClassTo set up the turbo encoder used in e.g. WCDMA the following code can be used (assuming a code block size of 320 bits): More...
class  CFix
 Complex fixed-point data type. More...
class  CFixed
 Templated complex fixed-point data type. More...
class  Fix
 Fixed-point data type. More...
class  Fix_Base
 Base class for fixed-point data types. More...
class  Fix_Factory
 Class factory for fixed-point data types Fix and CFix. More...
class  ConvertU2T
class  ConvertU2T< T, Array< U > >
 Template specialization for Array<T> More...
class  ConvertU2T< T, Vec< U > >
 Template specialization for Vec<T> More...
class  ConvertU2T< T, Mat< U > >
 Template specialization for Mat<T> More...
class  Convert
class  Convert< CFix >
 Template specialization for CFix. More...
class  Convert< std::complex< T > >
 Template specialization for std::complex<T> More...
class  Convert< Array< T > >
 Template specialization for Array<T> More...
class  Convert< Vec< T > >
 Template specialization for Vec<T> More...
class  Convert< Mat< T > >
 Template specialization for Mat<T> More...
class  Fixed
 Templated fixed-point data type. More...
class  Newton_Search
 Newton Search. More...
class  Line_Search
 Line Search. More...
class  Base_Event
 Base Event Class. More...
struct  Compare_Base_Event_Times
 Compare to events, Returns true if expire time of event1 is larger than the expire time of event2. More...
class  Event_Queue
 Event Queue class. More...
class  Event
 An Event class that executes a function when the event expires. More...
class  Data_Event
 An Event class that executes a function with some data as input when the event expires. More...
class  Front_Drop_Queue
 ADD DOCUMENTATION HERE. More...
class  Packet
class  L3_Packet_Info
class  Link_Packet
class  ACK
class  Packet_Channel
 ADD DOCUMENTATION HERE. More...
class  ACK_Channel
 ADD DOCUMENTATION HERE. More...
class  Packet_Generator
class  Poisson_Packet_Generator
class  Constant_Rate_Packet_Generator
class  Burst_WWW_Packet_Generator
class  Sink
class  Selective_Repeat_ARQ_Sender
class  Selective_Repeat_ARQ_Receiver
class  Signal
 Signals and slots. More...
class  Base_Slot
 Base Slot class. More...
class  Slot
 Slot Class. More...
class  TTimer
class  Sequence_Number
class  TCP_Segment
class  TCP_Packet
class  TCP_Sender
class  TCP_Receiver_Buffer
class  TCP_Receiver
class  TCP_Server_Application
class  TCP_Client_Application
class  Fast_ICA
 Fast_ICA Fast Independent Component Analysis (Fast ICA)The software is based upon original FastICA for Matlab from A. Hyvarinen. Fast and Robust Fixed-Point Algorithms for Independent Component Analysis. IEEE Transactions on Neural Networks, 10(3), pp. 626-634, 1999. More...
class  Filter
 Virtual Filter Base Class.The class is templated as follows: More...
class  MA_Filter
 Moving Average Filter Base Class.This class implements a moving average (MA) filter according to

\[ y(n) = b(0)*x(n) + b(1)*x(n-1) + ... + b(N)*x(n-N) \]

where b is the filter coefficients, x is the input and y is the output. More...

class  AR_Filter
 Autoregressive (AR) Filter Base Class.This class implements a autoregressive (AR) filter according to

\[ a(0)*y(n) = x(n) - a(1)*y(n-1) - ... - a(N)*y(n-N) \]

where a is the filter coefficients, x is the input and y is the output. More...

class  ARMA_Filter
 Autoregressive Moving Average (ARMA) Filter Base Class.This class implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

. More...

class  Freq_Filt
 Freq_Filt Frequency domain filtering using the overlap-add techniqueThe Freq_Filt class implements an FFT based filter using the overlap-add technique. The data is filtered by first transforming the input sequence into the frequency domain with an efficient FFT implementation (i.e. FFTW) and then multiplied with a Fourier transformed version of the impulse response. The resulting data is then inversed Fourier transformed to return a filtered time domain signal. More...
class  Sine_Source
 Sine-wave source. More...
class  Square_Source
 Square-wave source. More...
class  Triangle_Source
 Triangle-wave source. More...
class  Sawtooth_Source
 Sawtooth-wave source. More...
class  Impulse_Source
 Impulse source. More...
class  Pattern_Source
 Pattern source. More...
class  Audio_File
 Base class - do not use this one!ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!! More...
class  SND_Format
 Base class for SND reading classes (the .au format)ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!! More...
class  SND_In_File
 A class to read SND-files (the .au format)ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!! More...
class  SND_Out_File
 A class to write SND-files (the .au format)ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!! More...
class  SND_IO_File
 This class is capable of doing both input and output.ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!! More...
class  GMM
 \ More...
class  Vector_Quantizer
 Class for vector quantization. More...
class  Scalar_Quantizer
 Class for vector quantization. More...
class  Histogram
 Histogram computation class. More...
class  Stat
 A class for sampling a signal and calculating statistics. More...
class  MOG_diag
 Diagonal Mixture of Gaussians (MOG) class. More...
class  MOG_diag_EM_sup
 support class for MOG_diag_ML() and MOG_diag_MAP() More...
class  MOG_diag_kmeans_sup
 support class for MOG_diag_kmeans() More...
class  MOG_generic
 Generic Mixture of Gaussians (MOG) class. Used as a base for other MOG classes. More...

Typedefs

typedef Sparse_Vec< binGF2vec_sparse
 Sparse GF(2) vector.
typedef Sparse_Mat< binGF2mat_sparse
 Sparse GF(2) matrix.
typedef Normal_RNG Gauss_RNG
 Gauss_RNG is the same as Normal Source.
typedef AR1_Normal_RNG AR1_Gauss_RNG
 AR1_Gauss_RNG is the same as AR1_Normal_RNG.
typedef Vec< CFixcfixvec
 Typedef for complex fixed-point vector type.
typedef Mat< CFixcfixmat
 Typedef for complex fixed-point matrix type.
typedef CFixed< 1, TC, WRAP > cfixed1
 Typedefs for CFixed (cfixed1, cfixed2, ..., cfixed64)
typedef CFixed< 3, TC, WRAP > cfixed3
typedef CFixed< 4, TC, WRAP > cfixed4
typedef CFixed< 5, TC, WRAP > cfixed5
typedef CFixed< 6, TC, WRAP > cfixed6
typedef CFixed< 7, TC, WRAP > cfixed7
typedef CFixed< 8, TC, WRAP > cfixed8
typedef CFixed< 9, TC, WRAP > cfixed9
typedef CFixed< 10, TC, WRAP > cfixed10
typedef CFixed< 11, TC, WRAP > cfixed11
typedef CFixed< 12, TC, WRAP > cfixed12
typedef CFixed< 13, TC, WRAP > cfixed13
typedef CFixed< 14, TC, WRAP > cfixed14
typedef CFixed< 15, TC, WRAP > cfixed15
typedef CFixed< 16, TC, WRAP > cfixed16
typedef CFixed< 17, TC, WRAP > cfixed17
typedef CFixed< 18, TC, WRAP > cfixed18
typedef CFixed< 19, TC, WRAP > cfixed19
typedef CFixed< 20, TC, WRAP > cfixed20
typedef CFixed< 21, TC, WRAP > cfixed21
typedef CFixed< 22, TC, WRAP > cfixed22
typedef CFixed< 23, TC, WRAP > cfixed23
typedef CFixed< 24, TC, WRAP > cfixed24
typedef CFixed< 25, TC, WRAP > cfixed25
typedef CFixed< 26, TC, WRAP > cfixed26
typedef CFixed< 27, TC, WRAP > cfixed27
typedef CFixed< 28, TC, WRAP > cfixed28
typedef CFixed< 29, TC, WRAP > cfixed29
typedef CFixed< 30, TC, WRAP > cfixed30
typedef CFixed< 31, TC, WRAP > cfixed31
typedef CFixed< 32, TC, WRAP > cfixed32
typedef CFixed< 33, TC, WRAP > cfixed33
typedef CFixed< 34, TC, WRAP > cfixed34
typedef CFixed< 35, TC, WRAP > cfixed35
typedef CFixed< 36, TC, WRAP > cfixed36
typedef CFixed< 37, TC, WRAP > cfixed37
typedef CFixed< 38, TC, WRAP > cfixed38
typedef CFixed< 39, TC, WRAP > cfixed39
typedef CFixed< 40, TC, WRAP > cfixed40
typedef CFixed< 41, TC, WRAP > cfixed41
typedef CFixed< 42, TC, WRAP > cfixed42
typedef CFixed< 43, TC, WRAP > cfixed43
typedef CFixed< 44, TC, WRAP > cfixed44
typedef CFixed< 45, TC, WRAP > cfixed45
typedef CFixed< 46, TC, WRAP > cfixed46
typedef CFixed< 47, TC, WRAP > cfixed47
typedef CFixed< 48, TC, WRAP > cfixed48
typedef CFixed< 49, TC, WRAP > cfixed49
typedef CFixed< 50, TC, WRAP > cfixed50
typedef CFixed< 51, TC, WRAP > cfixed51
typedef CFixed< 52, TC, WRAP > cfixed52
typedef CFixed< 53, TC, WRAP > cfixed53
typedef CFixed< 54, TC, WRAP > cfixed54
typedef CFixed< 55, TC, WRAP > cfixed55
typedef CFixed< 56, TC, WRAP > cfixed56
typedef CFixed< 57, TC, WRAP > cfixed57
typedef CFixed< 58, TC, WRAP > cfixed58
typedef CFixed< 59, TC, WRAP > cfixed59
typedef CFixed< 60, TC, WRAP > cfixed60
typedef CFixed< 61, TC, WRAP > cfixed61
typedef CFixed< 62, TC, WRAP > cfixed62
typedef CFixed< 63, TC, WRAP > cfixed63
typedef CFixed< 64, TC, WRAP > cfixed64
typedef CFixed< 2, TC, SAT > scfixed2
typedef CFixed< 3, TC, SAT > scfixed3
typedef CFixed< 4, TC, SAT > scfixed4
typedef CFixed< 5, TC, SAT > scfixed5
typedef CFixed< 6, TC, SAT > scfixed6
typedef CFixed< 7, TC, SAT > scfixed7
typedef CFixed< 8, TC, SAT > scfixed8
typedef CFixed< 9, TC, SAT > scfixed9
typedef CFixed< 10, TC, SAT > scfixed10
typedef CFixed< 11, TC, SAT > scfixed11
typedef CFixed< 12, TC, SAT > scfixed12
typedef CFixed< 13, TC, SAT > scfixed13
typedef CFixed< 14, TC, SAT > scfixed14
typedef CFixed< 15, TC, SAT > scfixed15
typedef CFixed< 16, TC, SAT > scfixed16
typedef CFixed< 17, TC, SAT > scfixed17
typedef CFixed< 18, TC, SAT > scfixed18
typedef CFixed< 19, TC, SAT > scfixed19
typedef CFixed< 20, TC, SAT > scfixed20
typedef CFixed< 21, TC, SAT > scfixed21
typedef CFixed< 22, TC, SAT > scfixed22
typedef CFixed< 23, TC, SAT > scfixed23
typedef CFixed< 24, TC, SAT > scfixed24
typedef CFixed< 25, TC, SAT > scfixed25
typedef CFixed< 26, TC, SAT > scfixed26
typedef CFixed< 27, TC, SAT > scfixed27
typedef CFixed< 28, TC, SAT > scfixed28
typedef CFixed< 29, TC, SAT > scfixed29
typedef CFixed< 30, TC, SAT > scfixed30
typedef CFixed< 31, TC, SAT > scfixed31
typedef CFixed< 32, TC, SAT > scfixed32
typedef CFixed< 33, TC, SAT > scfixed33
typedef CFixed< 34, TC, SAT > scfixed34
typedef CFixed< 35, TC, SAT > scfixed35
typedef CFixed< 36, TC, SAT > scfixed36
typedef CFixed< 37, TC, SAT > scfixed37
typedef CFixed< 38, TC, SAT > scfixed38
typedef CFixed< 39, TC, SAT > scfixed39
typedef CFixed< 40, TC, SAT > scfixed40
typedef CFixed< 41, TC, SAT > scfixed41
typedef CFixed< 42, TC, SAT > scfixed42
typedef CFixed< 43, TC, SAT > scfixed43
typedef CFixed< 44, TC, SAT > scfixed44
typedef CFixed< 45, TC, SAT > scfixed45
typedef CFixed< 46, TC, SAT > scfixed46
typedef CFixed< 47, TC, SAT > scfixed47
typedef CFixed< 48, TC, SAT > scfixed48
typedef CFixed< 49, TC, SAT > scfixed49
typedef CFixed< 50, TC, SAT > scfixed50
typedef CFixed< 51, TC, SAT > scfixed51
typedef CFixed< 52, TC, SAT > scfixed52
typedef CFixed< 53, TC, SAT > scfixed53
typedef CFixed< 54, TC, SAT > scfixed54
typedef CFixed< 55, TC, SAT > scfixed55
typedef CFixed< 56, TC, SAT > scfixed56
typedef CFixed< 57, TC, SAT > scfixed57
typedef CFixed< 58, TC, SAT > scfixed58
typedef CFixed< 59, TC, SAT > scfixed59
typedef CFixed< 60, TC, SAT > scfixed60
typedef CFixed< 61, TC, SAT > scfixed61
typedef CFixed< 62, TC, SAT > scfixed62
typedef CFixed< 63, TC, SAT > scfixed63
typedef CFixed< 64, TC, SAT > scfixed64
typedef Vec< Fixfixvec
 Typedef for fixed-point vector type.
typedef Mat< Fixfixmat
 Typedef for fixed-point matrix type.
typedef int64_t fixrep
 Representation for fixed-point data types.
typedef Fixed< 1, TC, WRAP > fixed1
 Typedefs for Fixed (fixed1, fixed2, ..., fixed64)
typedef Fixed< 3, TC, WRAP > fixed3
typedef Fixed< 4, TC, WRAP > fixed4
typedef Fixed< 5, TC, WRAP > fixed5
typedef Fixed< 6, TC, WRAP > fixed6
typedef Fixed< 7, TC, WRAP > fixed7
typedef Fixed< 8, TC, WRAP > fixed8
typedef Fixed< 9, TC, WRAP > fixed9
typedef Fixed< 10, TC, WRAP > fixed10
typedef Fixed< 11, TC, WRAP > fixed11
typedef Fixed< 12, TC, WRAP > fixed12
typedef Fixed< 13, TC, WRAP > fixed13
typedef Fixed< 14, TC, WRAP > fixed14
typedef Fixed< 15, TC, WRAP > fixed15
typedef Fixed< 16, TC, WRAP > fixed16
typedef Fixed< 17, TC, WRAP > fixed17
typedef Fixed< 18, TC, WRAP > fixed18
typedef Fixed< 19, TC, WRAP > fixed19
typedef Fixed< 20, TC, WRAP > fixed20
typedef Fixed< 21, TC, WRAP > fixed21
typedef Fixed< 22, TC, WRAP > fixed22
typedef Fixed< 23, TC, WRAP > fixed23
typedef Fixed< 24, TC, WRAP > fixed24
typedef Fixed< 25, TC, WRAP > fixed25
typedef Fixed< 26, TC, WRAP > fixed26
typedef Fixed< 27, TC, WRAP > fixed27
typedef Fixed< 28, TC, WRAP > fixed28
typedef Fixed< 29, TC, WRAP > fixed29
typedef Fixed< 30, TC, WRAP > fixed30
typedef Fixed< 31, TC, WRAP > fixed31
typedef Fixed< 32, TC, WRAP > fixed32
typedef Fixed< 33, TC, WRAP > fixed33
typedef Fixed< 34, TC, WRAP > fixed34
typedef Fixed< 35, TC, WRAP > fixed35
typedef Fixed< 36, TC, WRAP > fixed36
typedef Fixed< 37, TC, WRAP > fixed37
typedef Fixed< 38, TC, WRAP > fixed38
typedef Fixed< 39, TC, WRAP > fixed39
typedef Fixed< 40, TC, WRAP > fixed40
typedef Fixed< 41, TC, WRAP > fixed41
typedef Fixed< 42, TC, WRAP > fixed42
typedef Fixed< 43, TC, WRAP > fixed43
typedef Fixed< 44, TC, WRAP > fixed44
typedef Fixed< 45, TC, WRAP > fixed45
typedef Fixed< 46, TC, WRAP > fixed46
typedef Fixed< 47, TC, WRAP > fixed47
typedef Fixed< 48, TC, WRAP > fixed48
typedef Fixed< 49, TC, WRAP > fixed49
typedef Fixed< 50, TC, WRAP > fixed50
typedef Fixed< 51, TC, WRAP > fixed51
typedef Fixed< 52, TC, WRAP > fixed52
typedef Fixed< 53, TC, WRAP > fixed53
typedef Fixed< 54, TC, WRAP > fixed54
typedef Fixed< 55, TC, WRAP > fixed55
typedef Fixed< 56, TC, WRAP > fixed56
typedef Fixed< 57, TC, WRAP > fixed57
typedef Fixed< 58, TC, WRAP > fixed58
typedef Fixed< 59, TC, WRAP > fixed59
typedef Fixed< 60, TC, WRAP > fixed60
typedef Fixed< 61, TC, WRAP > fixed61
typedef Fixed< 62, TC, WRAP > fixed62
typedef Fixed< 63, TC, WRAP > fixed63
typedef Fixed< 64, TC, WRAP > fixed64
typedef Fixed< 1, US, WRAP > ufixed1
typedef Fixed< 3, US, WRAP > ufixed3
typedef Fixed< 4, US, WRAP > ufixed4
typedef Fixed< 5, US, WRAP > ufixed5
typedef Fixed< 6, US, WRAP > ufixed6
typedef Fixed< 7, US, WRAP > ufixed7
typedef Fixed< 8, US, WRAP > ufixed8
typedef Fixed< 9, US, WRAP > ufixed9
typedef Fixed< 10, US, WRAP > ufixed10
typedef Fixed< 11, US, WRAP > ufixed11
typedef Fixed< 12, US, WRAP > ufixed12
typedef Fixed< 13, US, WRAP > ufixed13
typedef Fixed< 14, US, WRAP > ufixed14
typedef Fixed< 15, US, WRAP > ufixed15
typedef Fixed< 16, US, WRAP > ufixed16
typedef Fixed< 17, US, WRAP > ufixed17
typedef Fixed< 18, US, WRAP > ufixed18
typedef Fixed< 19, US, WRAP > ufixed19
typedef Fixed< 20, US, WRAP > ufixed20
typedef Fixed< 21, US, WRAP > ufixed21
typedef Fixed< 22, US, WRAP > ufixed22
typedef Fixed< 23, US, WRAP > ufixed23
typedef Fixed< 24, US, WRAP > ufixed24
typedef Fixed< 25, US, WRAP > ufixed25
typedef Fixed< 26, US, WRAP > ufixed26
typedef Fixed< 27, US, WRAP > ufixed27
typedef Fixed< 28, US, WRAP > ufixed28
typedef Fixed< 29, US, WRAP > ufixed29
typedef Fixed< 30, US, WRAP > ufixed30
typedef Fixed< 31, US, WRAP > ufixed31
typedef Fixed< 32, US, WRAP > ufixed32
typedef Fixed< 33, US, WRAP > ufixed33
typedef Fixed< 34, US, WRAP > ufixed34
typedef Fixed< 35, US, WRAP > ufixed35
typedef Fixed< 36, US, WRAP > ufixed36
typedef Fixed< 37, US, WRAP > ufixed37
typedef Fixed< 38, US, WRAP > ufixed38
typedef Fixed< 39, US, WRAP > ufixed39
typedef Fixed< 40, US, WRAP > ufixed40
typedef Fixed< 41, US, WRAP > ufixed41
typedef Fixed< 42, US, WRAP > ufixed42
typedef Fixed< 43, US, WRAP > ufixed43
typedef Fixed< 44, US, WRAP > ufixed44
typedef Fixed< 45, US, WRAP > ufixed45
typedef Fixed< 46, US, WRAP > ufixed46
typedef Fixed< 47, US, WRAP > ufixed47
typedef Fixed< 48, US, WRAP > ufixed48
typedef Fixed< 49, US, WRAP > ufixed49
typedef Fixed< 50, US, WRAP > ufixed50
typedef Fixed< 51, US, WRAP > ufixed51
typedef Fixed< 52, US, WRAP > ufixed52
typedef Fixed< 53, US, WRAP > ufixed53
typedef Fixed< 54, US, WRAP > ufixed54
typedef Fixed< 55, US, WRAP > ufixed55
typedef Fixed< 56, US, WRAP > ufixed56
typedef Fixed< 57, US, WRAP > ufixed57
typedef Fixed< 58, US, WRAP > ufixed58
typedef Fixed< 59, US, WRAP > ufixed59
typedef Fixed< 60, US, WRAP > ufixed60
typedef Fixed< 61, US, WRAP > ufixed61
typedef Fixed< 62, US, WRAP > ufixed62
typedef Fixed< 63, US, WRAP > ufixed63
typedef Fixed< 64, US, WRAP > ufixed64
typedef Fixed< 1, TC, SAT > sfixed1
typedef Fixed< 3, TC, SAT > sfixed3
typedef Fixed< 4, TC, SAT > sfixed4
typedef Fixed< 5, TC, SAT > sfixed5
typedef Fixed< 6, TC, SAT > sfixed6
typedef Fixed< 7, TC, SAT > sfixed7
typedef Fixed< 8, TC, SAT > sfixed8
typedef Fixed< 9, TC, SAT > sfixed9
typedef Fixed< 10, TC, SAT > sfixed10
typedef Fixed< 11, TC, SAT > sfixed11
typedef Fixed< 12, TC, SAT > sfixed12
typedef Fixed< 13, TC, SAT > sfixed13
typedef Fixed< 14, TC, SAT > sfixed14
typedef Fixed< 15, TC, SAT > sfixed15
typedef Fixed< 16, TC, SAT > sfixed16
typedef Fixed< 17, TC, SAT > sfixed17
typedef Fixed< 18, TC, SAT > sfixed18
typedef Fixed< 19, TC, SAT > sfixed19
typedef Fixed< 20, TC, SAT > sfixed20
typedef Fixed< 21, TC, SAT > sfixed21
typedef Fixed< 22, TC, SAT > sfixed22
typedef Fixed< 23, TC, SAT > sfixed23
typedef Fixed< 24, TC, SAT > sfixed24
typedef Fixed< 25, TC, SAT > sfixed25
typedef Fixed< 26, TC, SAT > sfixed26
typedef Fixed< 27, TC, SAT > sfixed27
typedef Fixed< 28, TC, SAT > sfixed28
typedef Fixed< 29, TC, SAT > sfixed29
typedef Fixed< 30, TC, SAT > sfixed30
typedef Fixed< 31, TC, SAT > sfixed31
typedef Fixed< 32, TC, SAT > sfixed32
typedef Fixed< 33, TC, SAT > sfixed33
typedef Fixed< 34, TC, SAT > sfixed34
typedef Fixed< 35, TC, SAT > sfixed35
typedef Fixed< 36, TC, SAT > sfixed36
typedef Fixed< 37, TC, SAT > sfixed37
typedef Fixed< 38, TC, SAT > sfixed38
typedef Fixed< 39, TC, SAT > sfixed39
typedef Fixed< 40, TC, SAT > sfixed40
typedef Fixed< 41, TC, SAT > sfixed41
typedef Fixed< 42, TC, SAT > sfixed42
typedef Fixed< 43, TC, SAT > sfixed43
typedef Fixed< 44, TC, SAT > sfixed44
typedef Fixed< 45, TC, SAT > sfixed45
typedef Fixed< 46, TC, SAT > sfixed46
typedef Fixed< 47, TC, SAT > sfixed47
typedef Fixed< 48, TC, SAT > sfixed48
typedef Fixed< 49, TC, SAT > sfixed49
typedef Fixed< 50, TC, SAT > sfixed50
typedef Fixed< 51, TC, SAT > sfixed51
typedef Fixed< 52, TC, SAT > sfixed52
typedef Fixed< 53, TC, SAT > sfixed53
typedef Fixed< 54, TC, SAT > sfixed54
typedef Fixed< 55, TC, SAT > sfixed55
typedef Fixed< 56, TC, SAT > sfixed56
typedef Fixed< 57, TC, SAT > sfixed57
typedef Fixed< 58, TC, SAT > sfixed58
typedef Fixed< 59, TC, SAT > sfixed59
typedef Fixed< 60, TC, SAT > sfixed60
typedef Fixed< 61, TC, SAT > sfixed61
typedef Fixed< 62, TC, SAT > sfixed62
typedef Fixed< 63, TC, SAT > sfixed63
typedef Fixed< 64, TC, SAT > sfixed64
typedef Fixed< 1, US, SAT > sufixed1
typedef Fixed< 3, US, SAT > sufixed3
typedef Fixed< 4, US, SAT > sufixed4
typedef Fixed< 5, US, SAT > sufixed5
typedef Fixed< 6, US, SAT > sufixed6
typedef Fixed< 7, US, SAT > sufixed7
typedef Fixed< 8, US, SAT > sufixed8
typedef Fixed< 9, US, SAT > sufixed9
typedef Fixed< 10, US, SAT > sufixed10
typedef Fixed< 11, US, SAT > sufixed11
typedef Fixed< 12, US, SAT > sufixed12
typedef Fixed< 13, US, SAT > sufixed13
typedef Fixed< 14, US, SAT > sufixed14
typedef Fixed< 15, US, SAT > sufixed15
typedef Fixed< 16, US, SAT > sufixed16
typedef Fixed< 17, US, SAT > sufixed17
typedef Fixed< 18, US, SAT > sufixed18
typedef Fixed< 19, US, SAT > sufixed19
typedef Fixed< 20, US, SAT > sufixed20
typedef Fixed< 21, US, SAT > sufixed21
typedef Fixed< 22, US, SAT > sufixed22
typedef Fixed< 23, US, SAT > sufixed23
typedef Fixed< 24, US, SAT > sufixed24
typedef Fixed< 25, US, SAT > sufixed25
typedef Fixed< 26, US, SAT > sufixed26
typedef Fixed< 27, US, SAT > sufixed27
typedef Fixed< 28, US, SAT > sufixed28
typedef Fixed< 29, US, SAT > sufixed29
typedef Fixed< 30, US, SAT > sufixed30
typedef Fixed< 31, US, SAT > sufixed31
typedef Fixed< 32, US, SAT > sufixed32
typedef Fixed< 33, US, SAT > sufixed33
typedef Fixed< 34, US, SAT > sufixed34
typedef Fixed< 35, US, SAT > sufixed35
typedef Fixed< 36, US, SAT > sufixed36
typedef Fixed< 37, US, SAT > sufixed37
typedef Fixed< 38, US, SAT > sufixed38
typedef Fixed< 39, US, SAT > sufixed39
typedef Fixed< 40, US, SAT > sufixed40
typedef Fixed< 41, US, SAT > sufixed41
typedef Fixed< 42, US, SAT > sufixed42
typedef Fixed< 43, US, SAT > sufixed43
typedef Fixed< 44, US, SAT > sufixed44
typedef Fixed< 45, US, SAT > sufixed45
typedef Fixed< 46, US, SAT > sufixed46
typedef Fixed< 47, US, SAT > sufixed47
typedef Fixed< 48, US, SAT > sufixed48
typedef Fixed< 49, US, SAT > sufixed49
typedef Fixed< 50, US, SAT > sufixed50
typedef Fixed< 51, US, SAT > sufixed51
typedef Fixed< 52, US, SAT > sufixed52
typedef Fixed< 53, US, SAT > sufixed53
typedef Fixed< 54, US, SAT > sufixed54
typedef Fixed< 55, US, SAT > sufixed55
typedef Fixed< 56, US, SAT > sufixed56
typedef Fixed< 57, US, SAT > sufixed57
typedef Fixed< 58, US, SAT > sufixed58
typedef Fixed< 59, US, SAT > sufixed59
typedef Fixed< 60, US, SAT > sufixed60
typedef Fixed< 61, US, SAT > sufixed61
typedef Fixed< 62, US, SAT > sufixed62
typedef Fixed< 63, US, SAT > sufixed63
typedef Fixed< 64, US, SAT > sufixed64
typedef double Ttype
 64-bit floating point time

Enumerations

enum  error_msg_style { Full, Minimum }
 

Style of assert, error and warning messages.


enum  SORTING_METHOD { INTROSORT = 0, QUICKSORT = 1, HEAPSORT = 2, INSERTSORT = 3 }
 

Sorting algorithms that can be used in a Sort class.

More...
enum  CHANNEL_PROFILE {
  ITU_Vehicular_A, ITU_Vehicular_B, ITU_Pedestrian_A, ITU_Pedestrian_B,
  COST207_RA, COST207_RA6, COST207_TU, COST207_TU6alt,
  COST207_TU12, COST207_TU12alt, COST207_BU, COST207_BU6alt,
  COST207_BU12, COST207_BU12alt, COST207_HT, COST207_HT6alt,
  COST207_HT12, COST207_HT12alt, COST259_TUx, COST259_RAx,
  COST259_HTx
}
 

Predefined channel profiles. Includes LOS and Doppler spectrum settings.


enum  FADING_TYPE { Independent, Static, Correlated }
 

Fading generator type: Independent (default), Static or Correlated.


enum  CORRELATED_METHOD { Rice_MEDS, IFFT, FIR }
 

Correlated fading generation methods: Rice_MEDS (default), IFFT or FIR.


enum  RICE_METHOD { MEDS }
 

Rice fading generation methods: MEDS.


enum  DOPPLER_SPECTRUM {
  Jakes = 0, J = 0, Classic = 0, C = 0,
  GaussI = 1, Gauss1 = 1, GI = 1, G1 = 1,
  GaussII = 2, Gauss2 = 2, GII = 2, G2 = 2
}
 

Predefined Doppler spectra.


enum  CONVOLUTIONAL_CODE_TYPE { MFD, ODS }
 

Type of Convolutional Code.


enum  CONVOLUTIONAL_CODE_METHOD { Trunc, Tail, Tailbite }
 

Encoding and decoding methods for Convolutional codes.


enum  Soft_Method { LOGMAP, APPROX }
 

Soft demodulation methods.

More...
enum  e_mode { TC, US }
 

Sign encoding modes (aligned with SystemC)

More...
enum  o_mode {
  SAT, SAT_ZERO, SAT_SYM, WRAP,
  WRAP_SM
}
 

Overflow modes (aligned with SystemC)

More...
enum  q_mode {
  RND, RND_ZERO, RND_MIN_INF, RND_INF,
  RND_CONV, RND_CONV_ODD, TRN, TRN_ZERO
}
 

Quantization modes (aligned with SystemC)

More...
enum  output_mode { OUTPUT_FIX, OUTPUT_FIX_SHIFT, OUTPUT_FLOAT, OUTPUT_FLOAT_SHIFT }
 

Output modes.

More...
enum  Newton_Search_Method { BFGS }
 

Newton Search method.


enum  Line_Search_Method { Soft, Exact }
 

Line Search method.


Functions

bin mxArray2bin (const mxArray *in)
 Convert the matlab-format mxArray to bin.
short mxArray2short (const mxArray *in)
 Convert the matlab-format mxArray to short.
int mxArray2int (const mxArray *in)
 Convert the matlab-format mxArray to int.
double mxArray2double (const mxArray *in)
 Convert the matlab-format mxArray to double.
std::complex< double > mxArray2double_complex (const mxArray *in)
 Convert the matlab-format mxArray to complex<double>
std::string mxArray2string (const mxArray *in)
 Convert the matlab-format mxArray to string.
bvec mxArray2bvec (const mxArray *in)
 Convert the matlab-format mxArray to bvec.
svec mxArray2svec (const mxArray *in)
 Convert the matlab-format mxArray to svec.
ivec mxArray2ivec (const mxArray *in)
 Convert the matlab-format mxArray to ivec.
vec mxArray2vec (const mxArray *in)
 Convert the matlab-format mxArray to vec.
cvec mxArray2cvec (const mxArray *in)
 Convert the matlab-format mxArray to cvec.
bmat mxArray2bmat (const mxArray *in)
 Convert the matlab-format mxArray to bmat.
smat mxArray2smat (const mxArray *in)
 Convert the matlab-format mxArray to smat.
imat mxArray2imat (const mxArray *in)
 Convert the matlab-format mxArray to imat.
mat mxArray2mat (const mxArray *in)
 Convert the matlab-format mxArray to mat.
cmat mxArray2cmat (const mxArray *in)
 Convert the matlab-format mxArray to cmat.
void bin2mxArray (const bin &in, mxArray *out)
 Convert bin to the matlab-format mxArray.
void short2mxArray (const short &in, mxArray *out)
 Convert short to the matlab-format mxArray.
void int2mxArray (const int &in, mxArray *out)
 Convert int to the matlab-format mxArray.
void double2mxArray (const double &in, mxArray *out)
 Convert double to the matlab-format mxArray.
void double_complex2mxArray (const std::complex< double > &in, mxArray *out)
 Convert complex<double> to the matlab-format mxArray.
void string2mxArray (const std::string &in, mxArray *&out)
 Convert string to the matlab-format mxArray.
void bvec2mxArray (const bvec &in, mxArray *out)
 Convert bvec to the matlab-format mxArray.
void svec2mxArray (const svec &in, mxArray *out)
 Convert svec to the matlab-format mxArray.
void ivec2mxArray (const ivec &in, mxArray *out)
 Convert ivec to the matlab-format mxArray.
void vec2mxArray (const vec &in, mxArray *out)
 Convert vec to the matlab-format mxArray.
void cvec2mxArray (const cvec &in, mxArray *out)
 Convert cvec to the matlab-format mxArray.
void bmat2mxArray (const bmat &in, mxArray *out)
 Convert bmat to the matlab-format mxArray.
void smat2mxArray (const smat &in, mxArray *out)
 Convert smat to the matlab-format mxArray.
void imat2mxArray (const imat &in, mxArray *out)
 Convert imat to the matlab-format mxArray.
void mat2mxArray (const mat &in, mxArray *out)
 Convert mat to the matlab-format mxArray.
void cmat2mxArray (const cmat &in, mxArray *out)
 Convert cmat to the matlab-format mxArray.
void mxArray2Csvec (const mxArray *in, short *out)
 Convert the matlab-format mxArray to C-format pointer to short.
void mxArray2Civec (const mxArray *in, int *out)
 Convert the matlab-format mxArray to C-format pointer to int.
void mxArray2Cvec (const mxArray *in, double *out)
 Convert the matlab-format mxArray to C-format pointer to double.
void mxArray2Ccvec (const mxArray *in, double *out_real, double *out_imag)
 Convert the matlab-format mxArray to C-format pointers to double (real and imaginary parts)
void mxArray2Csmat (const mxArray *in, short **out)
 Convert the matlab-format mxArray to C-format pointer to pointer to short.
void mxArray2Cimat (const mxArray *in, int **out)
 Convert the matlab-format mxArray to C-format pointer to pointer to int.
void mxArray2Cmat (const mxArray *in, double **out)
 Convert the matlab-format mxArray to C-format pointer to pointer to double.
void mxArray2Ccmat (const mxArray *in, double **out_real, double **out_imag)
 Convert the matlab-format mxArray to C-format pointer to pointer to double (real and imaginary parts)
void Csvec2mxArray (short *in, mxArray *out)
 Convert C-format pointer to short to matlab-format mxArray.
void Civec2mxArray (int *in, mxArray *out)
 Convert C-format pointer to int to matlab-format mxArray.
void Cvec2mxArray (double *in, mxArray *out)
 Convert C-format pointer to double to matlab-format mxArray.
void Ccvec2mxArray (double *in_real, double *in_imag, mxArray *out)
 Convert C-format pointers to double (real and imaginary parts) to matlab-format mxArray.
void Csmat2mxArray (short **in, mxArray *out)
 Convert C-format pointer to pointer to short to matlab-format mxArray.
void Cimat2mxArray (int **in, mxArray *out)
 Convert C-format pointer to pointer to int to matlab-format mxArray.
void Cmat2mxArray (double **in, mxArray *out)
 Convert C-format pointer to pointer to double to matlab-format mxArray.
void Ccmat2mxArray (double **in_real, double **in_imag, mxArray *out)
 Convert C-format pointer to pointer to double (real and imaginary parts) to matlab-format mxArray.
template<class T >
const Array< T > concat (const Array< T > &a, const T e)
 Append element e to the end of the Array a.
template<class T >
const Array< T > concat (const T e, const Array< T > &a)
 Append element e to the beginning of the Array a.
template<class T >
const Array< T > concat (const Array< T > &a1, const Array< T > &a2)
 Concat Arrays a1 and a2.
template<class T >
const Array< T > concat (const Array< T > &a1, const Array< T > &a2, const Array< T > &a3)
 Concat Arrays a1, a2 and a3.
double besselj (int nu, double x)
 Bessel function of first kind of order nu for nu integer.
vec besselj (int nu, const vec &x)
 Bessel function of first kind of order nu for nu integer.
double besselj (double nu, double x)
 Bessel function of first kind of order nu. nu is real.
vec besselj (double nu, const vec &x)
 Bessel function of first kind of order nu. nu is real.
double bessely (int nu, double x)
 Bessel function of second kind of order nu. nu is integer.
vec bessely (int nu, const vec &x)
 Bessel function of second kind of order nu. nu is integer.
double bessely (double nu, double x)
 Bessel function of second kind of order nu. nu is real.
vec bessely (double nu, const vec &x)
 Bessel function of second kind of order nu. nu is real.
double besseli (double nu, double x)
 Modified Bessel function of first kind of order nu. nu is double. x is double.
vec besseli (double nu, const vec &x)
 Modified Bessel function of first kind of order nu. nu is double. x is double.
double besselk (int nu, double x)
 Modified Bessel function of second kind of order nu. nu is double. x is double.
vec besselk (int nu, const vec &x)
 Modified Bessel function of second kind of order nu. nu is double. x is double.
std::ostream & operator<< (std::ostream &output, const bin &inbin)
 Output stream of bin.
std::istream & operator>> (std::istream &input, bin &outbin)
 Input stream of bin.
bin abs (const bin &inbin)
 absolute value of bin
template<typename T1 , typename T2 >
void read_endian (T1 &st, T2 &data, bool switch_endian=false)
 Read binary data and optionally switch endianness.
template<typename T1 , typename T2 >
void write_endian (T1 &st, T2 data, bool switch_endian=false)
 Write binary data and optionally switch endianness.
bool exist (const std::string &name)
 Checks if a file named name already exists on the disk.
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.
bvec dec2bin (int length, int index)
 Convert a decimal int index to bvec using length bits in the representation.
bvec dec2bin (int index, bool msb_first=true)
 Convert a decimal int index to bvec with the first bit as MSB if msb_first == true.
void dec2bin (int index, bvec &v)
 Convert a decimal int index to bvec. Value returned in v.
int bin2dec (const bvec &inbvec, bool msb_first=true)
 Convert a bvec to decimal int with the first bit as MSB if msb_first == true.
bvec oct2bin (const ivec &octalindex, short keepzeros=0)
 Convert ivec of octal form to bvec.
ivec bin2oct (const bvec &inbits)
 Convert bvec to octal ivec.
ivec bin2pol (const bvec &inbvec)
 Convert bvec to polar binary representation as ivec.
bvec pol2bin (const ivec &inpol)
 Convert binary polar ivec to bvec.
ivec round_i (const vec &x)
 Round to nearest integer and return ivec.
imat round_i (const mat &x)
 Round to nearest integer and return imat.
ivec ceil_i (const vec &x)
 Round to nearest upper integer.
imat ceil_i (const mat &x)
 Round to nearest upper integer.
ivec floor_i (const vec &x)
 Round to nearest lower integer.
imat floor_i (const mat &x)
 Round to nearest lower integer.
cvec round_to_zero (const cvec &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
cmat round_to_zero (const cmat &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
std::string to_str (const double &i, const int precision)
 Convert double to string.
template bvec to_bvec (const svec &v)
template bvec to_bvec (const ivec &v)
template svec to_svec (const bvec &v)
template svec to_svec (const ivec &v)
template svec to_svec (const vec &v)
template ivec to_ivec (const svec &v)
template ivec to_ivec (const vec &v)
template vec to_vec (const bvec &v)
template vec to_vec (const svec &v)
template vec to_vec (const ivec &v)
template cvec to_cvec (const bvec &v)
template cvec to_cvec (const svec &v)
template cvec to_cvec (const ivec &v)
template cvec to_cvec (const vec &v)
template cvec to_cvec (const bvec &real, const bvec &imag)
template cvec to_cvec (const svec &real, const svec &imag)
template cvec to_cvec (const ivec &real, const ivec &imag)
template cvec to_cvec (const vec &real, const vec &imag)
template bmat to_bmat (const smat &m)
template bmat to_bmat (const imat &m)
template smat to_smat (const bmat &m)
template smat to_smat (const imat &m)
template smat to_smat (const mat &m)
template imat to_imat (const bmat &m)
template imat to_imat (const smat &m)
template imat to_imat (const mat &m)
template mat to_mat (const bmat &m)
template cmat to_cmat (const bmat &m)
template cmat to_cmat (const smat &m)
template cmat to_cmat (const imat &m)
template cmat to_cmat (const mat &m)
template cmat to_cmat (const bmat &real, const bmat &imag)
template cmat to_cmat (const smat &real, const smat &imag)
template cmat to_cmat (const imat &real, const imat &imag)
template cmat to_cmat (const mat &real, const mat &imag)
template<class T >
bvec to_bvec (const Vec< T > &v)
 Converts a Vec<T> to bvec.
template<class T >
svec to_svec (const Vec< T > &v)
 Converts a Vec<T> to svec.
template<class T >
ivec to_ivec (const Vec< T > &v)
 Converts a Vec<T> to ivec.
template<class T >
vec to_vec (const Vec< T > &v)
 Converts a Vec<T> to vec.
template<class T >
cvec to_cvec (const Vec< T > &v)
 Converts a Vec<T> to cvec.
cvec to_cvec (const cvec &v)
 <> inline
template<class T >
cvec to_cvec (const Vec< T > &real, const Vec< T > &imag)
 Converts real and imaginary Vec<T> to cvec.
template<class T >
bmat to_bmat (const Mat< T > &m)
 Converts a Mat<T> to bmat.
template<class T >
smat to_smat (const Mat< T > &m)
 Converts a Mat<T> to smat.
template<class T >
imat to_imat (const Mat< T > &m)
 Converts a Mat<T> to imat.
template<class T >
mat to_mat (const Mat< T > &m)
 Converts a Mat<T> to mat.
template<class T >
cmat to_cmat (const Mat< T > &m)
 Converts a Mat<T> to cmat.
cmat to_cmat (const cmat &m)
 <> inline
template<class T >
cmat to_cmat (const Mat< T > &real, const Mat< T > &imag)
 Converts real and imaginary Mat<T> to cmat.
double rad_to_deg (double x)
 Convert radians to degrees.
double deg_to_rad (double x)
 Convert degrees to radians.
double round (double x)
 Round to nearest integer, return result in double.
vec round (const vec &x)
 Round to nearest integer.
mat round (const mat &x)
 Round to nearest integer.
int round_i (double x)
 Round to nearest integer.
vec ceil (const vec &x)
 Round to nearest upper integer.
mat ceil (const mat &x)
 Round to nearest upper integer.
int ceil_i (double x)
 The nearest larger integer.
vec floor (const vec &x)
 Round to nearest lower integer.
mat floor (const mat &x)
 Round to nearest lower integer.
int floor_i (double x)
 The nearest smaller integer.
double round_to_zero (double x, double threshold=1e-14)
 Round x to zero if abs(x) is smaller than threshold.
std::complex< double > round_to_zero (const std::complex< double > &x, double threshold=1e-14)
 Round each part of x smaller than threshold to zero.
vec round_to_zero (const vec &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
mat round_to_zero (const mat &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
int gray_code (int x)
 Convert to Gray Code.
template<typename T >
std::string to_str (const T &i)
 Convert anything to string.
void copy_vector (const int n, const int *x, int *y)
void copy_vector (const int n, const short *x, short *y)
void copy_vector (const int n, const bin *x, bin *y)
void copy_vector (const int n, const float *x, float *y)
void copy_vector (const int n, const std::complex< float > *x, std::complex< float > *y)
void copy_vector (const int n, const double *x, double *y)
void copy_vector (const int n, const std::complex< double > *x, std::complex< double > *y)
template<class T >
void copy_vector (const int n, const T *x, T *y)
template<class T >
void copy_vector (const int n, const T *x, const int incx, T *y, const int incy)
void swap_vector (const int n, int *x, int *y)
void swap_vector (const int n, short *x, short *y)
void swap_vector (const int n, bin *x, bin *y)
void swap_vector (const int n, float *x, float *y)
void swap_vector (const int n, std::complex< float > *x, std::complex< float > *y)
void swap_vector (const int n, double *x, double *y)
void swap_vector (const int n, std::complex< double > *x, std::complex< double > *y)
template<class T >
void swap_vector (const int n, T *x, T *y)
void swap_vector (const int n, int *x, const int incx, int *y, const int incy)
void swap_vector (const int n, short *x, const int incx, short *y, const int incy)
void swap_vector (const int n, bin *x, const int incx, bin *y, const int incy)
void swap_vector (const int n, float *x, const int incx, float *y, const int incy)
void swap_vector (const int n, std::complex< float > *x, const int incx, std::complex< float > *y, const int incy)
void swap_vector (const int n, double *x, const int incx, double *y, const int incy)
void swap_vector (const int n, std::complex< double > *x, const int incx, std::complex< double > *y, const int incy)
template<class T >
void swap_vector (const int n, T *x, const int incx, T *y, const int incy)
template<typename T >
void scal_vector (int n, T alpha, T *x)
template<typename T >
void scal_vector (int n, T alpha, T *x, int incx)
template<typename T >
void axpy_vector (int n, T alpha, const T *x, T *y)
template<typename T >
void axpy_vector (int n, T alpha, const T *x, int incx, T *y, int incy)
template<class T >
void create_elements (T *&ptr, int n, const Factory &)
 Create an n-length array of T to be used as Array, Vec or Mat elements.
template<>
void create_elements< unsigned char > (unsigned char *&ptr, int n, const Factory &)
 Specialization for unsigned char data arrays (used in GF2Mat)
template<>
void create_elements< bin > (bin *&ptr, int n, const Factory &)
 Specialization for binary data arrays.
template<>
void create_elements< short int > (short int *&ptr, int n, const Factory &)
 Specialization for short integer data arrays.
template<>
void create_elements< int > (int *&ptr, int n, const Factory &)
 Specialization for integer data arrays.
template<>
void create_elements< double > (double *&ptr, int n, const Factory &)
 Specialization for 16-byte aligned double data arrays.
template<>
void create_elements< std::complex< double > > (std::complex< double > *&ptr, int n, const Factory &)
 Specialization for 16-byte aligned complex double data arrays.
template<class T >
void destroy_elements (T *&ptr, int n)
 Destroy an array of Array, Vec or Mat elements.
template<>
void destroy_elements< unsigned char > (unsigned char *&ptr, int)
 Specialization for unsigned char data arrays (used in GF2Mat)
template<>
void destroy_elements< bin > (bin *&ptr, int)
 Specialization for binary data arrays.
template<>
void destroy_elements< short int > (short int *&ptr, int)
 Specialization for short integer data arrays.
template<>
void destroy_elements< int > (int *&ptr, int)
 Specialization for integer data arrays.
template<>
void destroy_elements< double > (double *&ptr, int)
 Specialisation for 16-byte aligned double data arrays.
template<>
void destroy_elements< std::complex< double > > (std::complex< double > *&ptr, int)
 Specialisation for 16-byte aligned complex double data arrays.
template<class T >
void create_elements (Array< T > *&ptr, int n, const Factory &f)
 Create an n-length array of Array<T> to be used as Array elements.
template<class T >
void create_elements (Mat< T > *&ptr, int n, const Factory &f)
 Create an n-length array of Mat<T> to be used as Array elements.
template<class T >
void create_elements (Vec< T > *&ptr, int n, const Factory &f)
 Create an n-length array of Vec<T> to be used as Array elements.
void sub_v_vT_m (mat &m, const vec &v)
 Calculates m=m-v*v'*m.
void sub_m_v_vT (mat &m, const vec &v)
 Calculates m=m-m*v*v'.
GF2mat gf2dense_eye (int m)
 GF(2) Identity matrix.
GF2mat operator* (const GF2mat &X, const GF2mat &Y)
 GF(2) matrix multiplication.
bvec operator* (const GF2mat &X, const bvec &y)
 GF(2) matrix multiplication with "regular" binary vector.
GF2mat mult_trans (const GF2mat &X, const GF2mat &Y)
 Multiplication X*Y' where X and Y are GF(2) matrices.
GF2mat operator+ (const GF2mat &X, const GF2mat &Y)
 GF(2) matrix addition.
std::ostream & operator<< (std::ostream &os, const GF2mat &X)
 Output stream (plain text) operator for dense GF(2) matrices.
it_fileoperator<< (it_file &f, const GF2mat &X)
it_ifileoperator>> (it_ifile &f, GF2mat &X)
template vec apply_function (double(*f)(double), const vec &v)
template cvec apply_function (std::complex< double >(*f)(const std::complex< double > &), const cvec &v)
template svec apply_function (short(*f)(short), const svec &v)
template ivec apply_function (int(*f)(int), const ivec &v)
template bvec apply_function (bin(*f)(bin), const bvec &v)
template mat apply_function (double(*f)(double), const mat &m)
template cmat apply_function (std::complex< double >(*f)(const std::complex< double > &), const cmat &m)
template smat apply_function (short(*f)(short), const smat &m)
template imat apply_function (int(*f)(int), const imat &m)
template bmat apply_function (bin(*f)(bin), const bmat &m)
template vec apply_function (double(*f)(double, double), const double &x, const vec &v)
template cvec apply_function (std::complex< double >(*f)(const std::complex< double > &, const std::complex< double > &), const std::complex< double > &x, const cvec &v)
template svec apply_function (short(*f)(short, short), const short &x, const svec &v)
template ivec apply_function (int(*f)(int, int), const int &x, const ivec &v)
template bvec apply_function (bin(*f)(bin, bin), const bin &x, const bvec &v)
template mat apply_function (double(*f)(double, double), const double &x, const mat &m)
template cmat apply_function (std::complex< double >(*f)(const std::complex< double > &, const std::complex< double > &), const std::complex< double > &x, const cmat &m)
template smat apply_function (short(*f)(short, short), const short &x, const smat &m)
template imat apply_function (int(*f)(int, int), const int &x, const imat &m)
template bmat apply_function (bin(*f)(bin, bin), const bin &x, const bmat &m)
template vec apply_function (double(*f)(double, double), const vec &v, const double &x)
template cvec apply_function (std::complex< double >(*f)(const std::complex< double > &, const std::complex< double > &), const cvec &v, const std::complex< double > &x)
template svec apply_function (short(*f)(short, short), const svec &v, const short &x)
template ivec apply_function (int(*f)(int, int), const ivec &v, const int &x)
template bvec apply_function (bin(*f)(bin, bin), const bvec &v, const bin &x)
template mat apply_function (double(*f)(double, double), const mat &m, const double &x)
template cmat apply_function (std::complex< double >(*f)(const std::complex< double > &, const std::complex< double > &), const cmat &m, const std::complex< double > &x)
template smat apply_function (short(*f)(short, short), const smat &m, const short &x)
template imat apply_function (int(*f)(int, int), const imat &m, const int &x)
template bmat apply_function (bin(*f)(bin, bin), const bmat &m, const bin &x)
template<typename T >
Vec< T > apply_function (T(*f)(T), const Vec< T > &v)
 Help function to call for a function: Vec<T> function(Vec<T>)
template<typename T >
Vec< T > apply_function (T(*f)(const T &), const Vec< T > &v)
 Help function to call for a function: Vec<T> function(const Vec<T>&)
template<typename T >
Mat< T > apply_function (T(*f)(T), const Mat< T > &m)
 Help function to call for a function: Mat<T> function(Mat<T>&)
template<typename T >
Mat< T > apply_function (T(*f)(const T &), const Mat< T > &m)
 Help function to call for a function: Mat<T> function(const Mat<T>&)
template<typename T >
Vec< T > apply_function (T(*f)(T, T), const T &x, const Vec< T > &v)
 Help function to call for a function: Vec<T> function(T, Vec<T>)
template<typename T >
Vec< T > apply_function (T(*f)(const T &, const T &), const T &x, const Vec< T > &v)
 Help function to call for a function: Vec<T> function(const T&, const Vec<T>&)
template<typename T >
Mat< T > apply_function (T(*f)(T, T), const T &x, const Mat< T > &m)
 Help function to call for a function: Mat<T> function(T, Mat<T>)
template<typename T >
Mat< T > apply_function (T(*f)(const T &, const T &), const T &x, const Mat< T > &m)
 Help function to call for a function: Mat<T> function(const T&, const Mat<T>&)
template<typename T >
Vec< T > apply_function (T(*f)(T, T), const Vec< T > &v, const T &x)
 Help function to call for a function: Vec<T> function(Vec<T>, T)
template<typename T >
Vec< T > apply_function (T(*f)(const T &, const T &), const Vec< T > &v, const T &x)
 Help function to call for a function: Vec<T> function(const Vec<T>&, const T&)
template<typename T >
Mat< T > apply_function (T(*f)(T, T), const Mat< T > &m, const T &x)
 Help function to call for a function: Mat<T> function(Mat<T>, T)
template<typename T >
Mat< T > apply_function (T(*f)(const T &, const T &), const Mat< T > &m, const T &x)
 Help function to call for a function: Mat<T> function(const Mat<T>&, const T&)
void it_assert_f (std::string ass, std::string msg, std::string file, int line)
 Helper function for the it_assert and it_assert_debug macros.
void it_error_f (std::string msg, std::string file, int line)
 Helper function for the it_error and it_error_if macros.
void it_info_f (std::string msg)
 Helper function for the it_info and it_info_debug macros.
void it_warning_f (std::string msg, std::string file, int line)
 Helper function for the it_warning macro.
void it_enable_warnings ()
 Enable warnings.
void it_disable_warnings ()
 Disable warnings.
void it_redirect_warnings (std::ostream *warn_stream)
 Redirect warnings to the ostream warn_stream.
void it_error_msg_style (error_msg_style style)
 Set preferred style of assert, error and warning messages.
void it_enable_exceptions (bool on)
 Enable/disable using exceptions for error handling.
it_ifileoperator>> (it_ifile &f, char &v)
 Read the char variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, bool &v)
 Read the bool variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, bin &v)
 Read the binary variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, short &v)
 Read the short variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, int &v)
 Read the integer variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, float &v)
 Read the float variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, double &v)
 Read the double variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, std::complex< float > &v)
 Read the float complex variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, std::complex< double > &v)
 Read the double complex variable v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, bvec &v)
 Read the bvec v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, svec &v)
 Read the svec v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, ivec &v)
 Read the ivec v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, vec &v)
 Read the vec v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, cvec &v)
 Read the cvec v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, std::string &str)
 Read the string str from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, bmat &m)
 Read the bmat m from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, smat &m)
 Read the smat m from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, imat &m)
 Read the imat m from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, mat &m)
 Read the mat m from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, cmat &m)
 Read the cmat m from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< bin > &v)
 Read the binary Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< short > &v)
 Read the short integer Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< int > &v)
 Read the integer Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< float > &v)
 Read the float Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< double > &v)
 Read the double Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< std::complex< float > > &v)
 Read the float complex Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< std::complex< double > > &v)
 Read the double complex Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< bvec > &v)
 Read the bvec Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< svec > &v)
 Read the svec Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< ivec > &v)
 Read the ivec Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< vec > &v)
 Read the vec Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< cvec > &v)
 Read the cvec Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< std::string > &v)
 Read the string Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< bmat > &v)
 Read the bmat Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< smat > &v)
 Read the bmat Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< imat > &v)
 Read the imat Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< mat > &v)
 Read the mat Array v from the it_ifile pointer.
it_ifileoperator>> (it_ifile &f, Array< cmat > &v)
 Read the cmat Array v from the it_ifile pointer.
it_fileoperator<< (it_file &f, char x)
 Write the char variable x to the it_file pointer.
it_fileoperator<< (it_file &f, bool x)
 Write the bool variable x to the it_file pointer.
it_fileoperator<< (it_file &f, bin x)
 Write the binary variable x to the it_file pointer.
it_fileoperator<< (it_file &f, short x)
 Write the short variable x to the it_file pointer.
it_fileoperator<< (it_file &f, int x)
 Write the integer variable x to the it_file pointer.
it_fileoperator<< (it_file &f, float x)
 Write the float variable x to the it_file pointer.
it_fileoperator<< (it_file &f, double x)
 Write the double variable x to the it_file pointer.
it_fileoperator<< (it_file &f, std::complex< float > x)
 Write the float complex variable x to the it_file pointer.
it_fileoperator<< (it_file &f, std::complex< double > x)
 Write the double complex variable x to the it_file pointer.
it_fileoperator<< (it_file &f, const bvec &v)
 Write the bvec v to the it_file pointer.
it_fileoperator<< (it_file &f, const svec &v)
 Write the svec v to the it_file pointer.
it_fileoperator<< (it_file &f, const ivec &v)
 Write the ivec v to the it_file pointer.
it_fileoperator<< (it_file &f, const vec &v)
 Write the vec v to the it_file pointer.
it_fileoperator<< (it_file &f, const cvec &v)
 Write the cvec v to the it_file pointer.
it_fileoperator<< (it_file &f, const std::string &str)
 Write the string str to the it_file pointer.
it_fileoperator<< (it_file &f, const bmat &m)
 Write the bmat m to the it_file pointer.
it_fileoperator<< (it_file &f, const smat &m)
 Write the smat m to the it_file pointer.
it_fileoperator<< (it_file &f, const imat &m)
 Write the imat m to the it_file pointer.
it_fileoperator<< (it_file &f, const mat &m)
 Write the mat m to the it_file pointer.
it_fileoperator<< (it_file &f, const cmat &m)
 Write the cmat m to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< bin > &v)
 Write the bin Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< short > &v)
 Write the short int Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< int > &v)
 Write the int Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< float > &v)
 Write the float Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< double > &v)
 Write the double Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< std::complex< float > > &v)
 Write the float complex Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< std::complex< double > > &v)
 Write the double complex Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< bvec > &v)
 Write the bvec Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< svec > &v)
 Write the svec Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< ivec > &v)
 Write the ivec Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< vec > &v)
 Write the vec Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< cvec > &v)
 Write the cvec Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< std::string > &v)
 Write the string Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< bmat > &v)
 Write the bmat Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< smat > &v)
 Write the smat Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< imat > &v)
 Write the imat Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< mat > &v)
 Write the mat Array v to the it_file pointer.
it_fileoperator<< (it_file &f, const Array< cmat > &v)
 Write the cmat Array v to the it_file pointer.
it_ifile_oldoperator>> (it_ifile_old &f, char &v)
 Read the char variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, bin &v)
 Read the binary variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, short &v)
 Read the short variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, int &v)
 Read the integer variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, double &v)
 Read the double variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, float &v)
 Read the float variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, std::complex< float > &v)
 Read the float complex variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, std::complex< double > &v)
 Read the double complex variable v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, vec &v)
 Read the vec v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, ivec &v)
 Read the ivec v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, bvec &v)
 Read the bvec v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, cvec &v)
 Read the cvec v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, std::string &str)
 Read the string str from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, mat &m)
 Read the mat m from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, imat &m)
 Read the imat m from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, bmat &m)
 Read the bmat m from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, cmat &m)
 Read the cmat m from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< float > &v)
 Read the float Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< double > &v)
 Read the double Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< int > &v)
 Read the integer Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< bin > &v)
 Read the binary Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< std::complex< float > > &v)
 Read the float complex Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< std::complex< double > > &v)
 Read the double complex Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< vec > &v)
 Read the vec Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< ivec > &v)
 Read the ivec Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< bvec > &v)
 Read the bvec Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< cvec > &v)
 Read the cvec Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< std::string > &v)
 Read the string Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< mat > &v)
 Read the mat Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< imat > &v)
 Read the imat Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< bmat > &v)
 Read the bmat Array v from the it_ifile_old pointer.
it_ifile_oldoperator>> (it_ifile_old &f, Array< cmat > &v)
 Read the cmat Array v from the it_ifile_old pointer.
it_file_oldoperator<< (it_file_old &f, char x)
 Write the char variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, bin x)
 Write the binary variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, short x)
 Write the short variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, int x)
 Write the integer variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, float x)
 Write the float variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, double x)
 Write the double variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, std::complex< float > x)
 Write the float complex variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, std::complex< double > x)
 Write the double complex variable x to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const vec &v)
 Write the vec v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const ivec &v)
 Write the ivec v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const bvec &v)
 Write the bvec v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const cvec &v)
 Write the cvec v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const std::string &str)
 Write the string str to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const mat &m)
 Write the mat m to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const imat &m)
 Write the imat m to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const bmat &m)
 Write the bmat m to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const cmat &m)
 Write the cmat m to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< float > &v)
 Write the float Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< double > &v)
 Write the double Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< int > &v)
 Write the int Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< bin > &v)
 Write the bin Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< std::complex< float > > &v)
 Write the float complex Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< std::complex< double > > &v)
 Write the double complex Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< vec > &v)
 Write the vec Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< ivec > &v)
 Write the ivec Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< bvec > &v)
 Write the bvec Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< cvec > &v)
 Write the cvec Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< std::string > &v)
 Write the string Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< mat > &v)
 Write the mat Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< imat > &v)
 Write the imat Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< bmat > &v)
 Write the bmat Array v to the it_file_old pointer.
it_file_oldoperator<< (it_file_old &f, const Array< cmat > &v)
 Write the cmat Array v to the it_file_old pointer.
it_fileflush (it_file &f)
 Flush operatorFlushes the data. Usage:
it_ifileoperator>> (it_ifile &f, const Name &s)
 Finds the variable Name in the it_ifile. Returns file pointer for reading.
it_fileoperator<< (it_file &f, const Name &s)
 Finds the variable Name in the it_file. Returns file pointer for writing.
template<class T >
void it_save_var_as (const T &v, const std::string &name)
 Save the variable v in the file name.it as the name name.
template<class T >
void it_load_var_as (T &v, const std::string &name)
 Load the variable v from the file name.it as the name name.
it_file_oldflush (it_file_old &f)
 Flush operator.Flushes the data. Usage:
it_ifile_oldoperator>> (it_ifile_old &f, const Name &s)
 Finds the variable Name in the it_ifile_old. Returns file pointer for reading.
it_file_oldoperator<< (it_file_old &f, const Name &s)
 Finds the variable Name in the it_file_old. Returns file pointer for writing.
template mat operator+ (const mat &m1, const mat &m2)
template cmat operator+ (const cmat &m1, const cmat &m2)
template imat operator+ (const imat &m1, const imat &m2)
template smat operator+ (const smat &m1, const smat &m2)
template bmat operator+ (const bmat &m1, const bmat &m2)
template mat operator+ (const mat &m, double t)
template cmat operator+ (const cmat &m, std::complex< double > t)
template imat operator+ (const imat &m, int t)
template smat operator+ (const smat &m, short t)
template bmat operator+ (const bmat &m, bin t)
template mat operator+ (double t, const mat &m)
template cmat operator+ (std::complex< double > t, const cmat &m)
template imat operator+ (int t, const imat &m)
template smat operator+ (short t, const smat &m)
template bmat operator+ (bin t, const bmat &m)
template mat operator- (const mat &m1, const mat &m2)
template cmat operator- (const cmat &m1, const cmat &m2)
template imat operator- (const imat &m1, const imat &m2)
template smat operator- (const smat &m1, const smat &m2)
template bmat operator- (const bmat &m1, const bmat &m2)
template mat operator- (const mat &m, double t)
template cmat operator- (const cmat &m, std::complex< double > t)
template imat operator- (const imat &m, int t)
template smat operator- (const smat &m, short t)
template bmat operator- (const bmat &m, bin t)
template mat operator- (double t, const mat &m)
template cmat operator- (std::complex< double > t, const cmat &m)
template imat operator- (int t, const imat &m)
template smat operator- (short t, const smat &m)
template bmat operator- (bin t, const bmat &m)
template mat operator- (const mat &m)
template cmat operator- (const cmat &m)
template imat operator- (const imat &m)
template smat operator- (const smat &m)
template bmat operator- (const bmat &m)
template mat operator* (const mat &m1, const mat &m2)
template cmat operator* (const cmat &m1, const cmat &m2)
template imat operator* (const imat &m1, const imat &m2)
template smat operator* (const smat &m1, const smat &m2)
template bmat operator* (const bmat &m1, const bmat &m2)
template vec operator* (const mat &m, const vec &v)
template cvec operator* (const cmat &m, const cvec &v)
template ivec operator* (const imat &m, const ivec &v)
template svec operator* (const smat &m, const svec &v)
template bvec operator* (const bmat &m, const bvec &v)
template mat operator* (const vec &v, const mat &m)
template cmat operator* (const cvec &v, const cmat &m)
template imat operator* (const ivec &v, const imat &m)
template smat operator* (const svec &v, const smat &m)
template bmat operator* (const bvec &v, const bmat &m)
template mat operator* (const mat &m, double t)
template cmat operator* (const cmat &m, std::complex< double > t)
template imat operator* (const imat &m, int t)
template smat operator* (const smat &m, short t)
template bmat operator* (const bmat &m, bin t)
template mat operator* (double t, const mat &m)
template cmat operator* (std::complex< double > t, const cmat &m)
template imat operator* (int t, const imat &m)
template smat operator* (short t, const smat &m)
template bmat operator* (bin t, const bmat &m)
template mat elem_mult (const mat &m1, const mat &m2)
template cmat elem_mult (const cmat &m1, const cmat &m2)
template imat elem_mult (const imat &m1, const imat &m2)
template smat elem_mult (const smat &m1, const smat &m2)
template bmat elem_mult (const bmat &m1, const bmat &m2)
template void elem_mult_out (const mat &m1, const mat &m2, mat &out)
template void elem_mult_out (const cmat &m1, const cmat &m2, cmat &out)
template void elem_mult_out (const imat &m1, const imat &m2, imat &out)
template void elem_mult_out (const smat &m1, const smat &m2, smat &out)
template void elem_mult_out (const bmat &m1, const bmat &m2, bmat &out)
template void elem_mult_out (const mat &m1, const mat &m2, const mat &m3, mat &out)
template void elem_mult_out (const cmat &m1, const cmat &m2, const cmat &m3, cmat &out)
template void elem_mult_out (const imat &m1, const imat &m2, const imat &m3, imat &out)
template void elem_mult_out (const smat &m1, const smat &m2, const smat &m3, smat &out)
template void elem_mult_out (const bmat &m1, const bmat &m2, const bmat &m3, bmat &out)
template void elem_mult_out (const mat &m1, const mat &m2, const mat &m3, const mat &m4, mat &out)
template void elem_mult_out (const cmat &m1, const cmat &m2, const cmat &m3, const cmat &m4, cmat &out)
template void elem_mult_out (const imat &m1, const imat &m2, const imat &m3, const imat &m4, imat &out)
template void elem_mult_out (const smat &m1, const smat &m2, const smat &m3, const smat &m4, smat &out)
template void elem_mult_out (const bmat &m1, const bmat &m2, const bmat &m3, const bmat &m4, bmat &out)
template void elem_mult_inplace (const mat &m1, mat &m2)
template void elem_mult_inplace (const cmat &m1, cmat &m2)
template void elem_mult_inplace (const imat &m1, imat &m2)
template void elem_mult_inplace (const smat &m1, smat &m2)
template void elem_mult_inplace (const bmat &m1, bmat &m2)
template double elem_mult_sum (const mat &m1, const mat &m2)
template std::complex< double > elem_mult_sum (const cmat &m1, const cmat &m2)
template int elem_mult_sum (const imat &m1, const imat &m2)
template short elem_mult_sum (const smat &m1, const smat &m2)
template bin elem_mult_sum (const bmat &m1, const bmat &m2)
template mat operator/ (const mat &m, double t)
template cmat operator/ (const cmat &m, std::complex< double > t)
template imat operator/ (const imat &m, int t)
template smat operator/ (const smat &m, short t)
template bmat operator/ (const bmat &m, bin t)
template mat elem_div (const mat &m1, const mat &m2)
template cmat elem_div (const cmat &m1, const cmat &m2)
template imat elem_div (const imat &m1, const imat &m2)
template smat elem_div (const smat &m1, const smat &m2)
template bmat elem_div (const bmat &m1, const bmat &m2)
template void elem_div_out (const mat &m1, const mat &m2, mat &out)
template void elem_div_out (const cmat &m1, const cmat &m2, cmat &out)
template void elem_div_out (const imat &m1, const imat &m2, imat &out)
template void elem_div_out (const smat &m1, const smat &m2, smat &out)
template void elem_div_out (const bmat &m1, const bmat &m2, bmat &out)
template double elem_div_sum (const mat &m1, const mat &m2)
template std::complex< double > elem_div_sum (const cmat &m1, const cmat &m2)
template int elem_div_sum (const imat &m1, const imat &m2)
template short elem_div_sum (const smat &m1, const smat &m2)
template bin elem_div_sum (const bmat &m1, const bmat &m2)
template mat concat_horizontal (const mat &m1, const mat &m2)
template cmat concat_horizontal (const cmat &m1, const cmat &m2)
template imat concat_horizontal (const imat &m1, const imat &m2)
template smat concat_horizontal (const smat &m1, const smat &m2)
template bmat concat_horizontal (const bmat &m1, const bmat &m2)
template mat concat_vertical (const mat &m1, const mat &m2)
template cmat concat_vertical (const cmat &m1, const cmat &m2)
template imat concat_vertical (const imat &m1, const imat &m2)
template smat concat_vertical (const smat &m1, const smat &m2)
template bmat concat_vertical (const bmat &m1, const bmat &m2)
template std::ostream & operator<< (std::ostream &os, const mat &m)
template std::ostream & operator<< (std::ostream &os, const cmat &m)
template std::ostream & operator<< (std::ostream &os, const imat &m)
template std::ostream & operator<< (std::ostream &os, const smat &m)
template std::ostream & operator<< (std::ostream &os, const bmat &m)
template std::istream & operator>> (std::istream &is, mat &m)
template std::istream & operator>> (std::istream &is, cmat &m)
template std::istream & operator>> (std::istream &is, imat &m)
template std::istream & operator>> (std::istream &is, smat &m)
template std::istream & operator>> (std::istream &is, bmat &m)
template<class Num_T >
Mat< Num_T > concat_horizontal (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Horizontal concatenation of two matrices.
template<class Num_T >
Mat< Num_T > concat_vertical (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Vertical concatenation of two matrices.
template<class Num_T >
Mat< Num_T > operator+ (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Addition of two matrices.
template<class Num_T >
Mat< Num_T > operator+ (const Mat< Num_T > &m, Num_T t)
 Addition of a matrix and a scalar.
template<class Num_T >
Mat< Num_T > operator+ (Num_T t, const Mat< Num_T > &m)
 Addition of a scalar and a matrix.
template<class Num_T >
Mat< Num_T > operator- (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Subtraction of two matrices.
template<class Num_T >
Mat< Num_T > operator- (const Mat< Num_T > &m, Num_T t)
 Subtraction of matrix and scalar.
template<class Num_T >
Mat< Num_T > operator- (Num_T t, const Mat< Num_T > &m)
 Subtraction of scalar and matrix.
template<class Num_T >
Mat< Num_T > operator- (const Mat< Num_T > &m)
 Negation of matrix.
template<class Num_T >
Mat< Num_T > operator* (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Multiplication of two matrices.
template<class Num_T >
Vec< Num_T > operator* (const Mat< Num_T > &m, const Vec< Num_T > &v)
 Multiplication of matrix and vector.
template<class Num_T >
Mat< Num_T > operator* (const Vec< Num_T > &v, const Mat< Num_T > &m)
 Multiplication of vector and matrix (matrix must be a row vector)
template<class Num_T >
Mat< Num_T > operator* (const Mat< Num_T > &m, Num_T t)
 Multiplication of matrix and scalar.
template<class Num_T >
Mat< Num_T > operator* (Num_T t, const Mat< Num_T > &m)
 Multiplication of scalar and matrix.
template<class Num_T >
Mat< Num_T > elem_mult (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Element wise multiplication of two matrices.
template<class Num_T >
void elem_mult_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, Mat< Num_T > &out)
 Element wise multiplication of two matrices, storing the result in matrix out.
template<class Num_T >
void elem_mult_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, const Mat< Num_T > &m3, Mat< Num_T > &out)
 Element wise multiplication of three matrices, storing the result in matrix out.
template<class Num_T >
void elem_mult_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, const Mat< Num_T > &m3, const Mat< Num_T > &m4, Mat< Num_T > &out)
 Element wise multiplication of four matrices, storing the result in matrix out.
template<class Num_T >
void elem_mult_inplace (const Mat< Num_T > &m1, Mat< Num_T > &m2)
 In-place element wise multiplication of two matrices. Fast version of B = elem_mult(A, B).
template<class Num_T >
Num_T elem_mult_sum (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Element wise multiplication of two matrices, followed by summation of the resultant elements. Fast version of sumsum(elem_mult(A, B)).
template<class Num_T >
Mat< Num_T > operator/ (const Mat< Num_T > &m, Num_T t)
 Division of matrix and scalar.
template<class Num_T >
Mat< Num_T > elem_div (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Element wise division of two matrices.
template<class Num_T >
void elem_div_out (const Mat< Num_T > &m1, const Mat< Num_T > &m2, Mat< Num_T > &out)
 Element wise division of two matrices, storing the result in matrix out.
template<class Num_T >
Num_T elem_div_sum (const Mat< Num_T > &m1, const Mat< Num_T > &m2)
 Element wise division of two matrices, followed by summation of the resultant elements. Fast version of sumsum(elem_div(A, B)).
template<class Num_T >
std::ostream & operator<< (std::ostream &os, const Mat< Num_T > &m)
 Output stream for matrices.
template<class Num_T >
std::istream & operator>> (std::istream &is, Mat< Num_T > &m)
 Input stream for matrices.
cmat sqrtm (const mat &A)
 Square root of the real square matrix A.
cmat sqrtm (const cmat &A)
 Square root of the complex square matrix A.
bool all (const bvec &testvec)
 Returns true if all elements are ones and false otherwise.
bool any (const bvec &testvec)
 Returns true if any element is one and false otherwise.
template int length (const vec &v)
template int length (const cvec &v)
template int length (const svec &v)
template int length (const ivec &v)
template int length (const bvec &v)
template double sum (const vec &v)
template std::complex< double > sum (const cvec &v)
template short sum (const svec &v)
template int sum (const ivec &v)
template bin sum (const bvec &v)
template double sum_sqr (const vec &v)
template std::complex< double > sum_sqr (const cvec &v)
template short sum_sqr (const svec &v)
template int sum_sqr (const ivec &v)
template bin sum_sqr (const bvec &v)
template vec cumsum (const vec &v)
template cvec cumsum (const cvec &v)
template svec cumsum (const svec &v)
template ivec cumsum (const ivec &v)
template bvec cumsum (const bvec &v)
template double prod (const vec &v)
template std::complex< double > prod (const cvec &v)
template short prod (const svec &v)
template int prod (const ivec &v)
template bin prod (const bvec &v)
template vec cross (const vec &v1, const vec &v2)
template cvec cross (const cvec &v1, const cvec &v2)
template ivec cross (const ivec &v1, const ivec &v2)
template svec cross (const svec &v1, const svec &v2)
template bvec cross (const bvec &v1, const bvec &v2)
template vec reverse (const vec &in)
template cvec reverse (const cvec &in)
template svec reverse (const svec &in)
template ivec reverse (const ivec &in)
template bvec reverse (const bvec &in)
template vec zero_pad (const vec &v, int n)
template cvec zero_pad (const cvec &v, int n)
template ivec zero_pad (const ivec &v, int n)
template svec zero_pad (const svec &v, int n)
template bvec zero_pad (const bvec &v, int n)
template vec zero_pad (const vec &v)
template cvec zero_pad (const cvec &v)
template ivec zero_pad (const ivec &v)
template svec zero_pad (const svec &v)
template bvec zero_pad (const bvec &v)
template mat zero_pad (const mat &, int, int)
template cmat zero_pad (const cmat &, int, int)
template imat zero_pad (const imat &, int, int)
template smat zero_pad (const smat &, int, int)
template bmat zero_pad (const bmat &, int, int)
template vec sum (const mat &m, int dim)
template cvec sum (const cmat &m, int dim)
template svec sum (const smat &m, int dim)
template ivec sum (const imat &m, int dim)
template bvec sum (const bmat &m, int dim)
template double sumsum (const mat &X)
template std::complex< double > sumsum (const cmat &X)
template short sumsum (const smat &X)
template int sumsum (const imat &X)
template bin sumsum (const bmat &X)
template vec sum_sqr (const mat &m, int dim)
template cvec sum_sqr (const cmat &m, int dim)
template svec sum_sqr (const smat &m, int dim)
template ivec sum_sqr (const imat &m, int dim)
template bvec sum_sqr (const bmat &m, int dim)
template mat cumsum (const mat &m, int dim)
template cmat cumsum (const cmat &m, int dim)
template smat cumsum (const smat &m, int dim)
template imat cumsum (const imat &m, int dim)
template bmat cumsum (const bmat &m, int dim)
template vec prod (const mat &m, int dim)
template cvec prod (const cmat &v, int dim)
template svec prod (const smat &m, int dim)
template ivec prod (const imat &m, int dim)
template bvec prod (const bmat &m, int dim)
template vec diag (const mat &in)
template cvec diag (const cmat &in)
template void diag (const vec &in, mat &m)
template void diag (const cvec &in, cmat &m)
template mat diag (const vec &v, const int K)
template cmat diag (const cvec &v, const int K)
template mat bidiag (const vec &, const vec &)
template cmat bidiag (const cvec &, const cvec &)
template void bidiag (const vec &, const vec &, mat &)
template void bidiag (const cvec &, const cvec &, cmat &)
template void bidiag (const mat &, vec &, vec &)
template void bidiag (const cmat &, cvec &, cvec &)
template mat tridiag (const vec &main, const vec &, const vec &)
template cmat tridiag (const cvec &main, const cvec &, const cvec &)
template void tridiag (const vec &main, const vec &, const vec &, mat &)
template void tridiag (const cvec &main, const cvec &, const cvec &, cmat &)
template void tridiag (const mat &m, vec &, vec &, vec &)
template void tridiag (const cmat &m, cvec &, cvec &, cvec &)
template double trace (const mat &in)
template std::complex< double > trace (const cmat &in)
template short trace (const smat &in)
template int trace (const imat &in)
template bin trace (const bmat &in)
template void transpose (const mat &m, mat &out)
template void transpose (const cmat &m, cmat &out)
template void transpose (const smat &m, smat &out)
template void transpose (const imat &m, imat &out)
template void transpose (const bmat &m, bmat &out)
template mat transpose (const mat &m)
template cmat transpose (const cmat &m)
template smat transpose (const smat &m)
template imat transpose (const imat &m)
template bmat transpose (const bmat &m)
template void hermitian_transpose (const mat &m, mat &out)
template void hermitian_transpose (const cmat &m, cmat &out)
template void hermitian_transpose (const smat &m, smat &out)
template void hermitian_transpose (const imat &m, imat &out)
template void hermitian_transpose (const bmat &m, bmat &out)
template mat hermitian_transpose (const mat &m)
template cmat hermitian_transpose (const cmat &m)
template smat hermitian_transpose (const smat &m)
template imat hermitian_transpose (const imat &m)
template bmat hermitian_transpose (const bmat &m)
template vec rvectorize (const mat &m)
template cvec rvectorize (const cmat &m)
template ivec rvectorize (const imat &m)
template svec rvectorize (const smat &m)
template bvec rvectorize (const bmat &m)
template vec cvectorize (const mat &m)
template cvec cvectorize (const cmat &m)
template ivec cvectorize (const imat &m)
template svec cvectorize (const smat &m)
template bvec cvectorize (const bmat &m)
template mat reshape (const mat &m, int rows, int cols)
template cmat reshape (const cmat &m, int rows, int cols)
template imat reshape (const imat &m, int rows, int cols)
template smat reshape (const smat &m, int rows, int cols)
template bmat reshape (const bmat &m, int rows, int cols)
template mat reshape (const vec &m, int rows, int cols)
template cmat reshape (const cvec &m, int rows, int cols)
template imat reshape (const ivec &m, int rows, int cols)
template smat reshape (const svec &m, int rows, int cols)
template bmat reshape (const bvec &m, int rows, int cols)
template mat kron (const mat &X, const mat &Y)
template cmat kron (const cmat &X, const cmat &Y)
template imat kron (const imat &X, const imat &Y)
template smat kron (const smat &X, const smat &Y)
template bmat kron (const bmat &X, const bmat &Y)
template vec repmat (const vec &v, int n)
template cvec repmat (const cvec &v, int n)
template ivec repmat (const ivec &v, int n)
template svec repmat (const svec &v, int n)
template bvec repmat (const bvec &v, int n)
template mat repmat (const vec &v, int m, int n, bool transpose)
template cmat repmat (const cvec &v, int m, int n, bool transpose)
template imat repmat (const ivec &v, int m, int n, bool transpose)
template smat repmat (const svec &v, int m, int n, bool transpose)
template bmat repmat (const bvec &v, int m, int n, bool transpose)
template mat repmat (const mat &data, int m, int n)
template cmat repmat (const cmat &data, int m, int n)
template imat repmat (const imat &data, int m, int n)
template smat repmat (const smat &data, int m, int n)
template bmat repmat (const bmat &data, int m, int n)
template<class T >
int length (const Vec< T > &v)
 Length of vector.
template<class T >
int size (const Vec< T > &v)
 Length of vector.
template<class T >
sum (const Vec< T > &v)
 Sum of all elements in the vector.
template<class T >
Vec< T > sum (const Mat< T > &m, int dim=1)
 Sum of elements in the matrix m, either along columns or rows.
template<class T >
sumsum (const Mat< T > &X)
 Sum of all elements in the given matrix. Fast version of sum(sum(X))
template<class T >
sum_sqr (const Vec< T > &v)
 Sum of square of the elements in a vector.
template<class T >
Vec< T > sum_sqr (const Mat< T > &m, int dim=1)
 Sum of the square of elements in the matrix m.
template<class T >
Vec< T > cumsum (const Vec< T > &v)
 Cumulative sum of all elements in the vector.
template<class T >
Mat< T > cumsum (const Mat< T > &m, int dim=1)
 Cumulative sum of elements in the matrix m.
template<class T >
prod (const Vec< T > &v)
 The product of all elements in the vector.
template<class T >
Vec< T > prod (const Mat< T > &m, int dim=1)
 Product of elements in the matrix m.
template<class T >
Vec< T > cross (const Vec< T > &v1, const Vec< T > &v2)
 Vector cross product. Vectors need to be of size 3.
template<class T >
Vec< T > zero_pad (const Vec< T > &v, int n)
 Zero-pad a vector to size n.
template<class T >
Vec< T > zero_pad (const Vec< T > &v)
 Zero-pad a vector to the nearest greater power of two.
template<class T >
Mat< T > zero_pad (const Mat< T > &m, int rows, int cols)
 Zero-pad a matrix to size rows x cols.
template<class T >
index_zero_pad (const Vec< T > &v, const int index)
template<class T >
void transpose (const Mat< T > &m, Mat< T > &out)
 Transposition of the matrix m returning the transposed matrix in out.
template<class T >
Mat< T > transpose (const Mat< T > &m)
 Transposition of the matrix m.
template<class T >
void hermitian_transpose (const Mat< T > &m, Mat< T > &out)
template<class T >
Mat< T > hermitian_transpose (const Mat< T > &m)
 Hermitian transpose (complex conjugate transpose) of the matrix m.
template<class Num_T >
bool is_hermitian (const Mat< Num_T > &X)
 Returns true if matrix X is hermitian, false otherwise.
template<class Num_T >
bool is_unitary (const Mat< Num_T > &X)
 Returns true if matrix X is unitary, false otherwise.
template<class Num_T >
Mat< Num_T > kron (const Mat< Num_T > &X, const Mat< Num_T > &Y)
 Computes the Kronecker product of two matrices.
template<class T >
Mat< T > diag (const Vec< T > &v, const int K=0)
 Create a diagonal matrix using vector v as its diagonal.
template<class T >
void diag (const Vec< T > &v, Mat< T > &m)
 Create a diagonal matrix using vector v as its diagonal.
template<class T >
Vec< T > diag (const Mat< T > &m)
 Get the diagonal elements of the input matrix m.
template<class T >
Mat< T > bidiag (const Vec< T > &main, const Vec< T > &sup)
 Returns a matrix with the elements of the input vector main on the diagonal and the elements of the input vector sup on the diagonal row above.
template<class T >
void bidiag (const Vec< T > &main, const Vec< T > &sup, Mat< T > &m)
 Returns in the output variable m a matrix with the elements of the input vector main on the diagonal and the elements of the input vector sup on the diagonal row above.
template<class T >
void bidiag (const Mat< T > &m, Vec< T > &main, Vec< T > &sup)
 Returns the main diagonal and the diagonal row above in the two output vectors main and sup.
template<class T >
Mat< T > tridiag (const Vec< T > &main, const Vec< T > &sup, const Vec< T > &sub)
 Returns a matrix with the elements of main on the diagonal, the elements of sup on the diagonal row above, and the elements of sub on the diagonal row below.
template<class T >
void tridiag (const Vec< T > &main, const Vec< T > &sup, const Vec< T > &sub, Mat< T > &m)
 Returns in the output matrix m a matrix with the elements of main on the diagonal, the elements of sup on the diagonal row above, and the elements of sub on the diagonal row below.
template<class T >
void tridiag (const Mat< T > &m, Vec< T > &main, Vec< T > &sup, Vec< T > &sub)
 Returns the main diagonal, the diagonal row above, and the diagonal row below int the output vectors main, sup, and sub.
template<class T >
trace (const Mat< T > &m)
 The trace of the matrix m, i.e. the sum of the diagonal elements.
template<class T >
Vec< T > reverse (const Vec< T > &in)
 Reverse the input vector.
template<class T >
Vec< T > rvectorize (const Mat< T > &m)
 Row vectorize the matrix [(0,0) (0,1) ... (N-1,N-2) (N-1,N-1)].
template<class T >
Vec< T > cvectorize (const Mat< T > &m)
 Column vectorize the matrix [(0,0) (1,0) ... (N-2,N-1) (N-1,N-1)].
template<class T >
Mat< T > reshape (const Mat< T > &m, int rows, int cols)
 Reshape the matrix into an rows*cols matrix.
template<class T >
Mat< T > reshape (const Vec< T > &v, int rows, int cols)
 Reshape the vector into an rows*cols matrix.
vec operator+ (const double &s, const ivec &v)
 Addition operator for double and ivec.
vec operator- (const double &s, const ivec &v)
 Subtraction operator for double and ivec.
vec operator* (const double &s, const ivec &v)
 Multiplication operator for double and ivec.
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 std::complex< double > &s, const ivec &v)
 Subtraction operator for complex<double> and ivec.
cvec operator* (const std::complex< double > &s, const ivec &v)
 Multiplication operator for complex<double> and ivec.
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 double &s, const cvec &v)
 Subtraction operator for double and cvec.
cvec operator* (const double &s, const cvec &v)
 Multiplication operator for double and cvec.
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.
cmat operator+ (const double &s, const cmat &m)
 Addition operator for double and cmat.
cmat operator- (const double &s, const cmat &m)
 Subtraction operator for double and cmat.
cmat operator* (const double &s, const cmat &m)
 Multiplication operator for double and cmat.
cmat operator* (const std::complex< double > &s, const mat &m)
 Multiplication operator for complex<double> and mat.
cmat operator/ (const cmat &m, const double &s)
 Division operator for cmat and double.
cvec operator* (const std::complex< double > &s, const vec &v)
 Multiplication operator for complex<double> and vec.
cvec operator* (const vec &v, const std::complex< double > &s)
 Multiplication operator for vec and complex<double>
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.
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.
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.
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.
mat operator+ (const bmat &a, const mat &b)
 Addition operator for bmat and mat.
mat operator+ (const smat &a, const mat &b)
 Addition operator for smat and mat.
mat operator+ (const imat &a, const mat &b)
 Addition operator for imat and mat.
cmat operator+ (const bmat &a, const cmat &b)
 Addition operator for bmat and cmat.
cmat operator+ (const smat &a, const cmat &b)
 Addition operator for smat and cmat.
cmat operator+ (const imat &a, const cmat &b)
 Addition operator for imat and cmat.
cmat operator+ (const mat &a, const cmat &b)
 Addition operator for mat and cmat.
std::complex< double > operator+ (const int &x, const std::complex< double > &y)
 Addition operator for int and complex double.
std::complex< double > operator+ (const float &x, const std::complex< double > &y)
 Addition operator for float and complex double.
std::complex< double > operator+ (const std::complex< double > &x, const int &y)
 Addition operator for int and complex double.
std::complex< double > operator+ (const std::complex< double > &x, const float &y)
 Addition operator for float and complex double.
std::complex< double > operator- (const int &x, const std::complex< double > &y)
 Subtraction operator for int and complex double.
std::complex< double > operator- (const float &x, const std::complex< double > &y)
 Subtraction operator for float and complex double.
std::complex< double > operator- (const std::complex< double > &x, const int &y)
 Subtraction operator for int and complex double.
std::complex< double > operator- (const std::complex< double > &x, const float &y)
 Subtraction operator for float and complex double.
std::complex< double > operator* (const int &x, const std::complex< double > &y)
 Multiplication operator for int and complex double.
std::complex< double > operator* (const float &x, const std::complex< double > &y)
 Multiplication operator for float and complex double.
std::complex< double > operator* (const std::complex< double > &x, const int &y)
 Multiplication operator for int and complex double.
std::complex< double > operator* (const std::complex< double > &x, const float &y)
 Multiplication operator for float and complex double.
std::complex< double > operator/ (const std::complex< double > &x, const int &y)
 Division operator for complex double and int.
std::complex< double > operator/ (const std::complex< double > &x, const float &y)
 Division operator for complex double and float.
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.
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.
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 ivec &v, const double &s)
 Addition operator for ivec and double.
vec operator- (const ivec &v, const double &s)
 Subtraction operator for ivec and double.
vec operator* (const ivec &v, const double &s)
 Multiplication operator for ivec and double.
cvec operator+ (const ivec &v, const std::complex< double > &s)
 Addition operator for ivec and complex<double>
cvec operator- (const ivec &v, const std::complex< double > &s)
 Subtraction operator for ivec and complex<double>
cvec operator* (const ivec &v, const std::complex< double > &s)
 Multiplication operator for ivec and complex<double>
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 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 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 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.
mat operator+ (const float &s, const mat &m)
 Addition operator for float and mat.
mat operator+ (const short &s, const mat &m)
 Addition operator for short and mat.
mat operator+ (const int &s, const mat &m)
 Addition operator for int and mat.
mat operator+ (const mat &m, const float &s)
 Addition operator for mat and float.
mat operator+ (const mat &m, const short &s)
 Addition operator for mat and short.
mat operator+ (const mat &m, const int &s)
 Addition operator for mat and int.
mat operator- (const float &s, const mat &m)
 Subtraction operator for float and mat.
mat operator- (const short &s, const mat &m)
 Subtraction operator for short and mat.
mat operator- (const int &s, const mat &m)
 Subtraction operator for int and mat.
mat operator- (const mat &m, const float &s)
 Subtraction operator for mat and float.
mat operator- (const mat &m, const short &s)
 Subtraction operator for mat and short.
mat operator- (const mat &m, const int &s)
 Subtraction operator for mat and int.
mat operator* (const float &s, const mat &m)
 Multiplication operator for float and mat.
mat operator* (const short &s, const mat &m)
 Multiplication operator for short and mat.
mat operator* (const int &s, const mat &m)
 Multiplication operator for int and mat.
mat operator* (const mat &m, const float &s)
 Multiplication operator for mat and float.
mat operator* (const mat &m, const short &s)
 Multiplication operator for mat and short.
mat operator* (const mat &m, const int &s)
 Multiplication operator for mat and int.
mat operator/ (const mat &m, const float &s)
 Division operator for mat and float.
mat operator/ (const mat &m, const short &s)
 Division operator for mat and short.
mat operator/ (const mat &m, const int &s)
 Division operator for mat and int.
cmat operator* (const mat &m, const std::complex< double > &s)
 Multiplication operator for mat and complex<double>
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 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 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 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.
mat operator+ (const mat &a, const bmat &b)
 Addition operator for mat and bmat.
mat operator+ (const mat &a, const smat &b)
 Addition operator for mat and smat.
mat operator+ (const mat &a, const imat &b)
 Addition operator for mat and imat.
mat operator- (const bmat &a, const mat &b)
 Subtraction operator for bmat and mat.
mat operator- (const smat &a, const mat &b)
 Subtraction operator for smat and mat.
mat operator- (const imat &a, const mat &b)
 Subtraction operator for imat and mat.
mat operator- (const mat &a, const bmat &b)
 Subtraction operator for mat and bmat.
mat operator- (const mat &a, const smat &b)
 Subtraction operator for mat and smat.
mat operator- (const mat &a, const imat &b)
 Subtraction operator for mat and imat.
cmat operator+ (const cmat &a, const bmat &b)
 Addition operator for cmat and bmat.
cmat operator+ (const cmat &a, const smat &b)
 Addition operator for cmat and smat.
cmat operator+ (const cmat &a, const imat &b)
 Addition operator for cmat and imat.
cmat operator+ (const cmat &a, const mat &b)
 Addition operator for cmat and mat.
cmat operator- (const bmat &a, const cmat &b)
 Subtraction operator for bmat and cmat.
cmat operator- (const smat &a, const cmat &b)
 Subtraction operator for smat and cmat.
cmat operator- (const imat &a, const cmat &b)
 Subtraction operator for imat and cmat.
cmat operator- (const mat &a, const cmat &b)
 Subtraction operator for mat and cmat.
cmat operator- (const cmat &a, const bmat &b)
 Subtraction operator for cmat and bmat.
cmat operator- (const cmat &a, const smat &b)
 Subtraction operator for cmat and smat.
cmat operator- (const cmat &a, const imat &b)
 Subtraction operator for cmat and imat.
cmat operator- (const cmat &a, const mat &b)
 Subtraction operator for cmat and mat.
cmat operator* (const mat &a, const cmat &b)
 Multiplication operator for mat and cmat.
cmat operator* (const bmat &a, const cmat &b)
 Multiplication operator for bmat and cmat.
cmat operator* (const smat &a, const cmat &b)
 Multiplication operator for smat and cmat.
cmat operator* (const imat &a, const cmat &b)
 Multiplication operator for imat and cmat.
cmat operator* (const cmat &a, const mat &b)
 Multiplication operator for cmat and mat.
cmat operator* (const cmat &a, const bmat &b)
 Multiplication operator for cmat and bmat.
cmat operator* (const cmat &a, const smat &b)
 Multiplication operator for cmat and smat.
cmat operator* (const cmat &a, const imat &b)
 Multiplication operator for cmat and imat.
void RNG_reset (unsigned int seed)
 Set the seed of the Global Random Number Generator.
void RNG_reset ()
 Set the seed of the Global Random Number Generator to the same as last reset/init.
void RNG_randomize ()
 Set a random seed for the Global Random Number Generator.
void RNG_get_state (ivec &state)
 Save current full state of generator in memory.
void RNG_set_state (ivec &state)
 Resume the state saved in memory.
bin randb (void)
 Generates a random bit (equally likely 0s and 1s)
void randb (int size, bvec &out)
 Generates a random bit vector (equally likely 0s and 1s)
bvec randb (int size)
 Generates a random bit vector (equally likely 0s and 1s)
void randb (int rows, int cols, bmat &out)
 Generates a random bit matrix (equally likely 0s and 1s)
bmat randb (int rows, int cols)
 Generates a random bit matrix (equally likely 0s and 1s)
double randu (void)
 Generates a random uniform (0,1) number.
void randu (int size, vec &out)
 Generates a random uniform (0,1) vector.
vec randu (int size)
 Generates a random uniform (0,1) vector.
void randu (int rows, int cols, mat &out)
 Generates a random uniform (0,1) matrix.
mat randu (int rows, int cols)
 Generates a random uniform (0,1) matrix.
int randi (int low, int high)
 Generates a random integer in the interval [low,high].
ivec randi (int size, int low, int high)
 Generates a random ivec with elements in the interval [low,high].
imat randi (int rows, int cols, int low, int high)
 Generates a random imat with elements in the interval [low,high].
vec randray (int size, double sigma=1.0)
 Generates a random Rayleigh vector.
vec randrice (int size, double sigma=1.0, double s=1.0)
 Generates a random Rice vector (See J.G. Poakis, "Digital Communications, 3rd ed." p.47)
vec randexp (int size, double lambda=1.0)
 Generates a random complex Gaussian vector.
double randn (void)
 Generates a random Gaussian (0,1) variable.
void randn (int size, vec &out)
 Generates a random Gaussian (0,1) vector.
vec randn (int size)
 Generates a random Gaussian (0,1) vector.
void randn (int rows, int cols, mat &out)
 Generates a random Gaussian (0,1) matrix.
mat randn (int rows, int cols)
 Generates a random Gaussian (0,1) matrix.
std::complex< double > randn_c (void)
 Generates a random complex Gaussian (0,1) variable.
void randn_c (int size, cvec &out)
 Generates a random complex Gaussian (0,1) vector.
cvec randn_c (int size)
 Generates a random complex Gaussian (0,1) vector.
void randn_c (int rows, int cols, cmat &out)
 Generates a random complex Gaussian (0,1) matrix.
cmat randn_c (int rows, int cols)
 Generates a random complex Gaussian (0,1) matrix.
template sparse_imat operator+ (const sparse_imat &, const sparse_imat &)
template sparse_mat operator+ (const sparse_mat &, const sparse_mat &)
template sparse_cmat operator+ (const sparse_cmat &, const sparse_cmat &)
template sparse_imat operator* (const sparse_imat &, const sparse_imat &)
template sparse_mat operator* (const sparse_mat &, const sparse_mat &)
template sparse_cmat operator* (const sparse_cmat &, const sparse_cmat &)
template ivec operator* (const ivec &, const sparse_imat &)
template vec operator* (const vec &, const sparse_mat &)
template cvec operator* (const cvec &, const sparse_cmat &)
template ivec operator* (const sparse_imat &, const ivec &)
template vec operator* (const sparse_mat &, const vec &)
template cvec operator* (const sparse_cmat &, const cvec &)
template imat trans_mult (const sparse_imat &)
template mat trans_mult (const sparse_mat &)
template cmat trans_mult (const sparse_cmat &)
template sparse_imat trans_mult_s (const sparse_imat &)
template sparse_mat trans_mult_s (const sparse_mat &)
template sparse_cmat trans_mult_s (const sparse_cmat &)
template sparse_imat trans_mult (const sparse_imat &, const sparse_imat &)
template sparse_mat trans_mult (const sparse_mat &, const sparse_mat &)
template sparse_cmat trans_mult (const sparse_cmat &, const sparse_cmat &)
template ivec trans_mult (const sparse_imat &, const ivec &)
template vec trans_mult (const sparse_mat &, const vec &)
template cvec trans_mult (const sparse_cmat &, const cvec &)
template sparse_imat mult_trans (const sparse_imat &, const sparse_imat &)
template sparse_mat mult_trans (const sparse_mat &, const sparse_mat &)
template sparse_cmat mult_trans (const sparse_cmat &, const sparse_cmat &)
template<class T >
Sparse_Mat< T > operator+ (const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)
 m1+m2 where m1 and m2 are sparse matrices
template<class T >
Sparse_Mat< T > operator* (const T &c, const Sparse_Mat< T > &m)
 c*m where c is a scalar and m is a sparse matrix
template<class T >
Sparse_Mat< T > operator* (const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)
 m1*m2 where m1 and m2 are sparse matrices
template<class T >
Sparse_Vec< T > operator* (const Sparse_Mat< T > &m, const Sparse_Vec< T > &v)
 m*v where m is a sparse matrix and v is a sparse vector
template<class T >
Vec< T > operator* (const Sparse_Mat< T > &m, const Vec< T > &v)
 m*v where m is a sparse matrix and v is a full column vector
template<class T >
Vec< T > operator* (const Vec< T > &v, const Sparse_Mat< T > &m)
 v'*m where m is a sparse matrix and v is a full column vector
template<class T >
Mat< T > trans_mult (const Sparse_Mat< T > &m)
 m'*m where m is a sparse matrix
template<class T >
Sparse_Mat< T > trans_mult_s (const Sparse_Mat< T > &m)
 m'*m where m is a sparse matrix
template<class T >
Sparse_Mat< T > trans_mult (const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)
 m1'*m2 where m1 and m2 are sparse matrices
template<class T >
Vec< T > trans_mult (const Sparse_Mat< T > &m, const Vec< T > &v)
 m'*v where m is a sparse matrix and v is a full column vector
template<class T >
Sparse_Mat< T > mult_trans (const Sparse_Mat< T > &m1, const Sparse_Mat< T > &m2)
 m1*m2' where m1 and m2 are sparse matrices
template<class T >
Sparse_Mat< T > sparse (const Mat< T > &m, T epsilon)
 Convert a dense matrix m into its sparse representation.
template<class T >
Mat< T > full (const Sparse_Mat< T > &s)
 Convert a sparse matrix s into its dense representation.
template<class T >
Sparse_Mat< T > transpose (const Sparse_Mat< T > &s)
 Transpose a sparse matrix s.
ivec find (const bvec &invector)
 Return a integer vector with indicies where bvec == 1.
 CREATE_EYE_FUN (bmat, eye_b, bin(0), bin(1)) CREATE_EYE_FUN(cmat
template void eye (int, bmat &)
 Template instantiation of eye.
template void eye (int, imat &)
 Template instantiation of eye.
template void eye (int, cmat &)
 Template instantiation of eye.
vec ones (int size)
 A float vector of ones.
bvec ones_b (int size)
 A Binary vector of ones.
ivec ones_i (int size)
 A Int vector of ones.
cvec ones_c (int size)
 A float Complex vector of ones.
mat ones (int rows, int cols)
 A float (rows,cols)-matrix of ones.
bmat ones_b (int rows, int cols)
 A Binary (rows,cols)-matrix of ones.
imat ones_i (int rows, int cols)
 A Int (rows,cols)-matrix of ones.
cmat ones_c (int rows, int cols)
 A Double Complex (rows,cols)-matrix of ones.
vec zeros (int size)
 A Double vector of zeros.
bvec zeros_b (int size)
 A Binary vector of zeros.
ivec zeros_i (int size)
 A Int vector of zeros.
cvec zeros_c (int size)
 A Double Complex vector of zeros.
mat zeros (int rows, int cols)
 A Double (rows,cols)-matrix of zeros.
bmat zeros_b (int rows, int cols)
 A Binary (rows,cols)-matrix of zeros.
imat zeros_i (int rows, int cols)
 A Int (rows,cols)-matrix of zeros.
cmat zeros_c (int rows, int cols)
 A Double Complex (rows,cols)-matrix of zeros.
mat eye (int size)
 A Double (size,size) unit matrix.
bmat eye_b (int size)
 A Binary (size,size) unit matrix.
imat eye_i (int size)
 A Int (size,size) unit matrix.
cmat eye_c (int size)
 A Double Complex (size,size) unit matrix.
template<class T >
void eye (int size, Mat< T > &m)
 A non-copying version of the eye function.
vec impulse (int size)
 Impulse vector.
vec linspace (double from, double to, int length=100)
 Linspace (works in the same way as the matlab version)
vec zigzag_space (double t0, double t1, int K=5)
 Zig-zag space function (variation on linspace)
imat hadamard (int size)
 Hadamard matrix.
imat jacobsthal (int p)
 Jacobsthal matrix.
imat conference (int n)
 Conference matrix.
template<typename Num_T >
const Mat< Num_T > 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 > toeplitz (const Vec< Num_T > &c)
 Generate symmetric Toeplitz matrix from vector c.
template<>
const cmat toeplitz (const cvec &c)
 Generate symmetric Toeplitz matrix from vector c (complex valued)
mat rotation_matrix (int dim, int plane1, int plane2, double angle)
 Create a rotation matrix that rotates the given plane angle radians. Note that the order of the planes are important!
void house (const vec &x, vec &v, double &beta)
 Calcualte the Householder vector.
void givens (double a, double b, double &c, double &s)
 Calculate the Givens rotation values.
void givens (double a, double b, mat &m)
 Calculate the Givens rotation matrix.
mat givens (double a, double b)
 Calculate the Givens rotation matrix.
void givens_t (double a, double b, mat &m)
 Calculate the transposed Givens rotation matrix.
mat givens_t (double a, double b)
 Calculate the transposed Givens rotation matrix.
template sparse_ivec operator+ (const sparse_ivec &, const sparse_ivec &)
template sparse_vec operator+ (const sparse_vec &, const sparse_vec &)
template sparse_cvec operator+ (const sparse_cvec &, const sparse_cvec &)
template int operator* (const sparse_ivec &, const sparse_ivec &)
template double operator* (const sparse_vec &, const sparse_vec &)
template std::complex< double > operator* (const sparse_cvec &, const sparse_cvec &)
template int operator* (const sparse_ivec &, const ivec &)
template double operator* (const sparse_vec &, const vec &)
template std::complex< double > operator* (const sparse_cvec &, const cvec &)
template int operator* (const ivec &, const sparse_ivec &)
template double operator* (const vec &, const sparse_vec &)
template std::complex< double > operator* (const cvec &, const sparse_cvec &)
template sparse_ivec elem_mult (const sparse_ivec &, const sparse_ivec &)
template sparse_vec elem_mult (const sparse_vec &, const sparse_vec &)
template sparse_cvec elem_mult (const sparse_cvec &, const sparse_cvec &)
template ivec elem_mult (const sparse_ivec &, const ivec &)
template vec elem_mult (const sparse_vec &, const vec &)
template cvec elem_mult (const sparse_cvec &, const cvec &)
template sparse_ivec elem_mult_s (const sparse_ivec &, const ivec &)
template sparse_vec elem_mult_s (const sparse_vec &, const vec &)
template sparse_cvec elem_mult_s (const sparse_cvec &, const cvec &)
template ivec elem_mult (const ivec &, const sparse_ivec &)
template vec elem_mult (const vec &, const sparse_vec &)
template cvec elem_mult (const cvec &, const sparse_cvec &)
template sparse_ivec elem_mult_s (const ivec &, const sparse_ivec &)
template sparse_vec elem_mult_s (const vec &, const sparse_vec &)
template sparse_cvec elem_mult_s (const cvec &, const sparse_cvec &)
template<class T >
Sparse_Vec< T > operator+ (const Sparse_Vec< T > &v1, const Sparse_Vec< T > &v2)
 v1+v2 where v1 and v2 are sparse vector
template<class T >
operator* (const Sparse_Vec< T > &v1, const Sparse_Vec< T > &v2)
 v1*v2 where v1 and v2 are sparse vectors
template<class T >
operator* (const Sparse_Vec< T > &v1, const Vec< T > &v2)
 v1*v2 where v1 is a sparse vector and v2 is a dense vector
template<class T >
operator* (const Vec< T > &v1, const Sparse_Vec< T > &v2)
 v1*v2 where v1 is a dense vector and v2 is a sparse vector
template<class T >
Sparse_Vec< T > elem_mult (const Sparse_Vec< T > &v1, const Sparse_Vec< T > &v2)
 Elementwise multiplication of two sparse vectors returning a sparse vector.
template<class T >
Vec< T > elem_mult (const Sparse_Vec< T > &v1, const Vec< T > &v2)
 Elementwise multiplication of a sparse vector and a dense vector returning a dense vector.
template<class T >
Sparse_Vec< T > elem_mult_s (const Sparse_Vec< T > &v1, const Vec< T > &v2)
 Elementwise multiplication of a sparse vector and a dense vector returning a sparse vector.
template<class T >
Vec< T > elem_mult (const Vec< T > &v1, const Sparse_Vec< T > &v2)
 Elementwise multiplication of a dense vector and a sparse vector returning a dense vector.
template<class T >
Sparse_Vec< T > elem_mult_s (const Vec< T > &v1, const Sparse_Vec< T > &v2)
 Elementwise multiplication of a dense vector and a sparse vector returning a sparse vector.
template<class T >
Sparse_Vec< T > sparse (const Vec< T > &v)
 Convert a dense vector v into its sparse representation.
template<class T >
Sparse_Vec< T > sparse (const Vec< T > &v, T epsilon)
 Convert a dense vector v into its sparse representation.
template<class T >
Vec< T > full (const Sparse_Vec< T > &s)
 Convert a sparse vector s into its dense representation.
void tic ()
 Reset and start timer.
double toc ()
 Returns the elapsed time since last tic()
void toc_print ()
 Prints the elapsed time since last tic()
void pause (double t=-1)
 pause
template vec operator+ (const vec &v1, const vec &v2)
template cvec operator+ (const cvec &v1, const cvec &v2)
template ivec operator+ (const ivec &v1, const ivec &v2)
template svec operator+ (const svec &v1, const svec &v2)
template bvec operator+ (const bvec &v1, const bvec &v2)
template vec operator+ (const vec &v1, double t)
template cvec operator+ (const cvec &v1, std::complex< double > t)
template ivec operator+ (const ivec &v1, int t)
template svec operator+ (const svec &v1, short t)
template bvec operator+ (const bvec &v1, bin t)
template vec operator+ (double t, const vec &v1)
template cvec operator+ (std::complex< double > t, const cvec &v1)
template ivec operator+ (int t, const ivec &v1)
template svec operator+ (short t, const svec &v1)
template bvec operator+ (bin t, const bvec &v1)
template vec operator- (const vec &v1, const vec &v2)
template cvec operator- (const cvec &v1, const cvec &v2)
template ivec operator- (const ivec &v1, const ivec &v2)
template svec operator- (const svec &v1, const svec &v2)
template bvec operator- (const bvec &v1, const bvec &v2)
template vec operator- (const vec &v, double t)
template cvec operator- (const cvec &v, std::complex< double > t)
template ivec operator- (const ivec &v, int t)
template svec operator- (const svec &v, short t)
template bvec operator- (const bvec &v, bin t)
template vec operator- (double t, const vec &v)
template cvec operator- (std::complex< double > t, const cvec &v)
template ivec operator- (int t, const ivec &v)
template svec operator- (short t, const svec &v)
template bvec operator- (bin t, const bvec &v)
template vec operator- (const vec &v)
template cvec operator- (const cvec &v)
template ivec operator- (const ivec &v)
template svec operator- (const svec &v)
template bvec operator- (const bvec &v)
template double dot (const vec &v1, const vec &v2)
template std::complex< double > dot (const cvec &v1, const cvec &v2)
template int dot (const ivec &v1, const ivec &v2)
template short dot (const svec &v1, const svec &v2)
template bin dot (const bvec &v1, const bvec &v2)
template double operator* (const vec &v1, const vec &v2)
template std::complex< double > operator* (const cvec &v1, const cvec &v2)
template int operator* (const ivec &v1, const ivec &v2)
template short operator* (const svec &v1, const svec &v2)
template bin operator* (const bvec &v1, const bvec &v2)
template mat outer_product (const vec &v1, const vec &v2, bool hermitian)
template imat outer_product (const ivec &v1, const ivec &v2, bool hermitian)
template smat outer_product (const svec &v1, const svec &v2, bool hermitian)
template bmat outer_product (const bvec &v1, const bvec &v2, bool hermitian)
template vec operator* (const vec &v, double t)
template cvec operator* (const cvec &v, std::complex< double > t)
template ivec operator* (const ivec &v, int t)
template svec operator* (const svec &v, short t)
template bvec operator* (const bvec &v, bin t)
template vec operator* (double t, const vec &v)
template cvec operator* (std::complex< double > t, const cvec &v)
template ivec operator* (int t, const ivec &v)
template svec operator* (short t, const svec &v)
template bvec operator* (bin t, const bvec &v)
template vec elem_mult (const vec &a, const vec &b)
template cvec elem_mult (const cvec &a, const cvec &b)
template ivec elem_mult (const ivec &a, const ivec &b)
template svec elem_mult (const svec &a, const svec &b)
template bvec elem_mult (const bvec &a, const bvec &b)
template void elem_mult_out (const vec &a, const vec &b, vec &out)
template void elem_mult_out (const cvec &a, const cvec &b, cvec &out)
template void elem_mult_out (const ivec &a, const ivec &b, ivec &out)
template void elem_mult_out (const svec &a, const svec &b, svec &out)
template void elem_mult_out (const bvec &a, const bvec &b, bvec &out)
template vec elem_mult (const vec &a, const vec &b, const vec &c)
template cvec elem_mult (const cvec &a, const cvec &b, const cvec &c)
template ivec elem_mult (const ivec &a, const ivec &b, const ivec &c)
template svec elem_mult (const svec &a, const svec &b, const svec &c)
template bvec elem_mult (const bvec &a, const bvec &b, const bvec &c)
template void elem_mult_out (const vec &a, const vec &b, const vec &c, vec &out)
template void elem_mult_out (const cvec &a, const cvec &b, const cvec &c, cvec &out)
template void elem_mult_out (const ivec &a, const ivec &b, const ivec &c, ivec &out)
template void elem_mult_out (const svec &a, const svec &b, const svec &c, svec &out)
template void elem_mult_out (const bvec &a, const bvec &b, const bvec &c, bvec &out)
template vec elem_mult (const vec &a, const vec &b, const vec &c, const vec &d)
template cvec elem_mult (const cvec &a, const cvec &b, const cvec &c, const cvec &d)
template ivec elem_mult (const ivec &a, const ivec &b, const ivec &c, const ivec &d)
template svec elem_mult (const svec &a, const svec &b, const svec &c, const svec &d)
template bvec elem_mult (const bvec &a, const bvec &b, const bvec &c, const bvec &d)
template void elem_mult_out (const vec &a, const vec &b, const vec &c, const vec &d, vec &out)
template void elem_mult_out (const cvec &a, const cvec &b, const cvec &c, const cvec &d, cvec &out)
template void elem_mult_out (const ivec &a, const ivec &b, const ivec &c, const ivec &d, ivec &out)
template void elem_mult_out (const svec &a, const svec &b, const svec &c, const svec &d, svec &out)
template void elem_mult_out (const bvec &a, const bvec &b, const bvec &c, const bvec &d, bvec &out)
template void elem_mult_inplace (const vec &a, vec &b)
template void elem_mult_inplace (const cvec &a, cvec &b)
template void elem_mult_inplace (const ivec &a, ivec &b)
template void elem_mult_inplace (const svec &a, svec &b)
template void elem_mult_inplace (const bvec &a, bvec &b)
template double elem_mult_sum (const vec &a, const vec &b)
template std::complex< double > elem_mult_sum (const cvec &a, const cvec &b)
template int elem_mult_sum (const ivec &a, const ivec &b)
template short elem_mult_sum (const svec &a, const svec &b)
template bin elem_mult_sum (const bvec &a, const bvec &b)
template vec operator/ (const vec &v, double t)
template cvec operator/ (const cvec &v, std::complex< double > t)
template ivec operator/ (const ivec &v, int t)
template svec operator/ (const svec &v, short t)
template bvec operator/ (const bvec &v, bin t)
template vec operator/ (double t, const vec &v)
template cvec operator/ (std::complex< double > t, const cvec &v)
template ivec operator/ (int t, const ivec &v)
template svec operator/ (short t, const svec &v)
template bvec operator/ (bin t, const bvec &v)
template vec elem_div (const vec &a, const vec &b)
template cvec elem_div (const cvec &a, const cvec &b)
template ivec elem_div (const ivec &a, const ivec &b)
template svec elem_div (const svec &a, const svec &b)
template bvec elem_div (const bvec &a, const bvec &b)
template vec elem_div (double t, const vec &v)
template cvec elem_div (std::complex< double > t, const cvec &v)
template ivec elem_div (int t, const ivec &v)
template svec elem_div (short t, const svec &v)
template bvec elem_div (bin t, const bvec &v)
template void elem_div_out (const vec &a, const vec &b, vec &out)
template void elem_div_out (const cvec &a, const cvec &b, cvec &out)
template void elem_div_out (const ivec &a, const ivec &b, ivec &out)
template void elem_div_out (const svec &a, const svec &b, svec &out)
template void elem_div_out (const bvec &a, const bvec &b, bvec &out)
template double elem_div_sum (const vec &a, const vec &b)
template std::complex< double > elem_div_sum (const cvec &a, const cvec &b)
template int elem_div_sum (const ivec &a, const ivec &b)
template short elem_div_sum (const svec &a, const svec &b)
template bin elem_div_sum (const bvec &a, const bvec &b)
template vec concat (const vec &v, double a)
template cvec concat (const cvec &v, std::complex< double > a)
template ivec concat (const ivec &v, int a)
template svec concat (const svec &v, short a)
template bvec concat (const bvec &v, bin a)
template vec concat (double a, const vec &v)
template cvec concat (std::complex< double > a, const cvec &v)
template ivec concat (int a, const ivec &v)
template svec concat (short a, const svec &v)
template bvec concat (bin a, const bvec &v)
template vec concat (const vec &v1, const vec &v2)
template cvec concat (const cvec &v1, const cvec &v2)
template ivec concat (const ivec &v1, const ivec &v2)
template svec concat (const svec &v1, const svec &v2)
template bvec concat (const bvec &v1, const bvec &v2)
template vec concat (const vec &v1, const vec &v2, const vec &v3)
template cvec concat (const cvec &v1, const cvec &v2, const cvec &v3)
template ivec concat (const ivec &v1, const ivec &v2, const ivec &v3)
template svec concat (const svec &v1, const svec &v2, const svec &v3)
template bvec concat (const bvec &v1, const bvec &v2, const bvec &v3)
template vec concat (const vec &v1, const vec &v2, const vec &v3, const vec &v4)
template cvec concat (const cvec &v1, const cvec &v2, const cvec &v3, const cvec &v4)
template ivec concat (const ivec &v1, const ivec &v2, const ivec &v3, const ivec &v4)
template svec concat (const svec &v1, const svec &v2, const svec &v3, const svec &v4)
template bvec concat (const bvec &v1, const bvec &v2, const bvec &v3, const bvec &v4)
template vec concat (const vec &v1, const vec &v2, const vec &v3, const vec &v4, const vec &v5)
template cvec concat (const cvec &v1, const cvec &v2, const cvec &v3, const cvec &v4, const cvec &v5)
template ivec concat (const ivec &v1, const ivec &v2, const ivec &v3, const ivec &v4, const ivec &v5)
template svec concat (const svec &v1, const svec &v2, const svec &v3, const svec &v4, const svec &v5)
template bvec concat (const bvec &v1, const bvec &v2, const bvec &v3, const bvec &v4, const bvec &v5)
template std::ostream & operator<< (std::ostream &os, const vec &vect)
template std::ostream & operator<< (std::ostream &os, const cvec &vect)
template std::ostream & operator<< (std::ostream &os, const svec &vect)
template std::ostream & operator<< (std::ostream &os, const ivec &vect)
template std::ostream & operator<< (std::ostream &os, const bvec &vect)
template std::istream & operator>> (std::istream &is, vec &vect)
template std::istream & operator>> (std::istream &is, cvec &vect)
template std::istream & operator>> (std::istream &is, svec &vect)
template std::istream & operator>> (std::istream &is, ivec &vect)
template std::istream & operator>> (std::istream &is, bvec &vect)
template<class Num_T >
Vec< Num_T > operator+ (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Addition of two vectors.
template<class Num_T >
Vec< Num_T > operator+ (const Vec< Num_T > &v, Num_T t)
 Addition of a vector and a scalar.
template<class Num_T >
Vec< Num_T > operator+ (Num_T t, const Vec< Num_T > &v)
 Addition of a scalar and a vector.
template<class Num_T >
Vec< Num_T > operator- (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Subtraction of a vector from a vector.
template<class Num_T >
Vec< Num_T > operator- (const Vec< Num_T > &v, Num_T t)
 Subtraction of a scalar from a vector.
template<class Num_T >
Vec< Num_T > operator- (Num_T t, const Vec< Num_T > &v)
 Subtraction of vector from scalar. Results in a vector.
template<class Num_T >
Vec< Num_T > operator- (const Vec< Num_T > &v)
 Negation of vector.
template<class Num_T >
Num_T dot (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Inner (dot) product of two vectors v1 and v2.
template<class Num_T >
Num_T operator* (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Inner (dot) product of two vectors v1 and v2.
template<class Num_T >
Mat< Num_T > outer_product (const Vec< Num_T > &v1, const Vec< Num_T > &v2, bool hermitian=false)
 Outer product of two vectors v1 and v2.
template<class Num_T >
Vec< Num_T > operator* (const Vec< Num_T > &v, Num_T t)
 Multiplication of a vector and a scalar.
template<class Num_T >
Vec< Num_T > operator* (Num_T t, const Vec< Num_T > &v)
 Multiplication of a scalar and a vector. Results in a vector.
template<class Num_T >
Vec< Num_T > elem_mult (const Vec< Num_T > &a, const Vec< Num_T > &b)
 Element-wise multiplication of two vectors.
template<class Num_T >
Vec< Num_T > elem_mult (const Vec< Num_T > &a, const Vec< Num_T > &b, const Vec< Num_T > &c)
 Element-wise multiplication of three vectors.
template<class Num_T >
Vec< Num_T > elem_mult (const Vec< Num_T > &a, const Vec< Num_T > &b, const Vec< Num_T > &c, const Vec< Num_T > &d)
 Element-wise multiplication of four vectors.
template<class Num_T >
void elem_mult_out (const Vec< Num_T > &a, const Vec< Num_T > &b, Vec< Num_T > &out)
 Element-wise multiplication of two vectors, storing the result in vector out.
template<class Num_T >
void elem_mult_out (const Vec< Num_T > &a, const Vec< Num_T > &b, const Vec< Num_T > &c, Vec< Num_T > &out)
 Element-wise multiplication of three vectors, storing the result in vector out.
template<class Num_T >
void elem_mult_out (const Vec< Num_T > &a, const Vec< Num_T > &b, const Vec< Num_T > &c, const Vec< Num_T > &d, Vec< Num_T > &out)
 Element-wise multiplication of four vectors, storing the result in vector out.
template<class Num_T >
void elem_mult_inplace (const Vec< Num_T > &a, Vec< Num_T > &b)
 In-place element-wise multiplication of two vectors. Faster version of b = elem_mult(a,b).
template<class Num_T >
Num_T elem_mult_sum (const Vec< Num_T > &a, const Vec< Num_T > &b)
 Element-wise multiplication of two vectors, followed by summation of the resultant elements. Fast version of sum(elem_mult(a,b)).
template<class Num_T >
Vec< Num_T > operator/ (const Vec< Num_T > &v, Num_T t)
 Division of all elements in v with t.
template<class Num_T >
Vec< Num_T > operator/ (Num_T t, const Vec< Num_T > &v)
 Division of t with all elements in v.
template<class Num_T >
Vec< Num_T > elem_div (const Vec< Num_T > &a, const Vec< Num_T > &b)
 Elementwise division of two vectors.
template<class Num_T >
Vec< Num_T > elem_div (Num_T t, const Vec< Num_T > &v)
 Elementwise division of scalar t and vector v.
template<class Num_T >
void elem_div_out (const Vec< Num_T > &a, const Vec< Num_T > &b, Vec< Num_T > &out)
 Elementwise division of two vectors, storing the result in vector out.
template<class Num_T >
Num_T elem_div_sum (const Vec< Num_T > &a, const Vec< Num_T > &b)
 Elementwise division of two vectors, followed by summation of the resultant elements. Fast version of sum(elem_div(a,b))
template<class Num_T >
Vec< Num_T > concat (const Vec< Num_T > &v, Num_T a)
 Append element a to the end of the vector v.
template<class Num_T >
Vec< Num_T > concat (Num_T a, const Vec< Num_T > &v)
 Concat element a to the beginning of the vector v.
template<class Num_T >
Vec< Num_T > concat (const Vec< Num_T > &v1, const Vec< Num_T > &v2)
 Concat vectors v1 and v2.
template<class Num_T >
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.
template<class Num_T >
Vec< Num_T > concat (const Vec< Num_T > &v1, const Vec< Num_T > &v2, const Vec< Num_T > &v3, const Vec< Num_T > &v4)
 Concat vectors v1, v2, v3 and v4.
template<class Num_T >
Vec< Num_T > concat (const Vec< Num_T > &v1, const Vec< Num_T > &v2, const Vec< Num_T > &v3, const Vec< Num_T > &v4, const Vec< Num_T > &v5)
 Concat vectors v1, v2 v3, v4 and v5.
template<>
cmat outer_product (const cvec &v1, const cvec &v2, bool hermitian)
 Outer product of two vectors v1 and v2.
template<class Num_T >
std::ostream & operator<< (std::ostream &os, const Vec< Num_T > &v)
 Output stream operator of a vector v.
template<class Num_T >
std::istream & operator>> (std::istream &is, Vec< Num_T > &v)
 Input stream operator to read a vector.
bool chol (const mat &X, mat &F)
 Cholesky factorisation of real symmetric and positive definite matrix.
bool chol (const cmat &X, cmat &F)
 Cholesky factorisation of complex hermitian and positive-definite matrix.
cmat chol (const cmat &X)
 Cholesky factorisation of complex hermitian and positive-definite matrix.
mat chol (const mat &X)
 Cholesky factorisation of real symmetric and positive definite matrix.
double det (const mat &X)
 Determinant of real square matrix.Calculate determinant of the real matrix $\mathbf{X}$.
std::complex< double > det (const cmat &X)
 Determinant of complex square matrix.Calculate determinant of the complex matrix $\mathbf{X}$.
bool eig_sym (const mat &A, vec &d, mat &V)
 Calculates the eigenvalues and eigenvectors of a symmetric real matrix.
bool eig_sym (const mat &A, vec &d)
 Calculates the eigenvalues of a symmetric real matrix.
bool eig_sym (const cmat &A, vec &d, cmat &V)
 Calculates the eigenvalues and eigenvectors of a hermitian complex matrix.
bool eig_sym (const cmat &A, vec &d)
 Calculates the eigenvalues of a hermitian complex matrix.
bool eig (const mat &A, cvec &d, cmat &V)
 Calculates the eigenvalues and eigenvectors of a real non-symmetric matrix.
bool eig (const mat &A, cvec &d)
 Calculates the eigenvalues of a real non-symmetric matrix.
bool eig (const cmat &A, cvec &d, cmat &V)
 Calculates the eigenvalues and eigenvectors of a complex non-hermitian matrix.
bool eig (const cmat &A, cvec &d)
 Calculates the eigenvalues of a complex non-hermitian matrix.
vec eig_sym (const mat &A)
 Calculates the eigenvalues of a symmetric real matrix.
vec eig_sym (const cmat &A)
 Calculates the eigenvalues of a hermitian complex matrix.
cvec eig (const mat &A)
 Calculates the eigenvalues of a real non-symmetric matrix.
cvec eig (const cmat &A)
 Calculates the eigenvalues of a complex non-hermitian matrix.
bool inv (const mat &X, mat &Y)
 Inverse of real square matrix.Calculate the inverse of the real matrix $\mathbf{X}$.
bool inv (const cmat &X, cmat &Y)
 Inverse of complex square matrix.Calculate the inverse of the complex matrix $\mathbf{X}$.
cmat inv (const cmat &X)
 Inverse of real square matrix.Calculate the inverse of the complex matrix $\mathbf{X}$.
mat inv (const mat &X)
 Inverse of real square matrix.Calculate the inverse of the real matrix $\mathbf{X}$.
bool ls_solve_chol (const mat &A, const vec &b, vec &x)
 Solve linear equation system by Cholesky factorisation.
bool ls_solve_chol (const mat &A, const mat &B, mat &X)
 Solve linear equation system by Cholesky factorisation.
bool ls_solve_chol (const cmat &A, const cvec &b, cvec &x)
 Solve linear equation system by Cholesky factorisation.
bool ls_solve_chol (const cmat &A, const cmat &B, cmat &X)
 Solve linear equation system by Cholesky factorisation.
vec ls_solve_chol (const mat &A, const vec &b)
 Solve linear equation system by Cholesky factorisation.
mat ls_solve_chol (const mat &A, const mat &B)
 Solve linear equation system by Cholesky factorisation.
cvec ls_solve_chol (const cmat &A, const cvec &b)
 Solve linear equation system by Cholesky factorisation.
cmat ls_solve_chol (const cmat &A, const cmat &B)
 Solve linear equation system by Cholesky factorisation.
bool ls_solve (const mat &A, const vec &b, vec &x)
 Solve linear equation system by LU factorisation.
bool ls_solve (const mat &A, const mat &B, mat &X)
 Solve multiple linear equations by LU factorisation.
bool ls_solve (const cmat &A, const cvec &b, cvec &x)
 Solve linear equation system by LU factorisation.
bool ls_solve (const cmat &A, const cmat &B, cmat &X)
 Solve multiple linear equations by LU factorisation.
vec ls_solve (const mat &A, const vec &b)
 Solve linear equation system by LU factorisation.
mat ls_solve (const mat &A, const mat &B)
 Solve multiple linear equations by LU factorisation.
cvec ls_solve (const cmat &A, const cvec &b)
 Solve linear equation system by LU factorisation.
cmat ls_solve (const cmat &A, const cmat &B)
 Solve multiple linear equations by LU factorisation.
bool ls_solve_od (const mat &A, const vec &b, vec &x)
 Solves overdetermined linear equation systems.
bool ls_solve_od (const mat &A, const mat &B, mat &X)
 Solves overdetermined linear equation systems.
bool ls_solve_od (const cmat &A, const cvec &b, cvec &x)
 Solves overdetermined linear equation systems.
bool ls_solve_od (const cmat &A, const cmat &B, cmat &X)
 Solves overdetermined linear equation systems.
vec ls_solve_od (const mat &A, const vec &b)
 Solves overdetermined linear equation systems.
mat ls_solve_od (const mat &A, const mat &B)
 Solves overdetermined linear equation systems.
cvec ls_solve_od (const cmat &A, const cvec &b)
 Solves overdetermined linear equation systems.
cmat ls_solve_od (const cmat &A, const cmat &B)
 Solves overdetermined linear equation systems.
bool ls_solve_ud (const mat &A, const vec &b, vec &x)
 Solves underdetermined linear equation systems.
bool ls_solve_ud (const mat &A, const mat &B, mat &X)
 Solves underdetermined linear equation systems.
bool ls_solve_ud (const cmat &A, const cvec &b, cvec &x)
 Solves underdetermined linear equation systems.
bool ls_solve_ud (const cmat &A, const cmat &B, cmat &X)
 Solves underdetermined linear equation systems.
vec ls_solve_ud (const mat &A, const vec &b)
 Solves overdetermined linear equation systems.
mat ls_solve_ud (const mat &A, const mat &B)
 Solves underdetermined linear equation systems.
cvec ls_solve_ud (const cmat &A, const cvec &b)
 Solves overdetermined linear equation systems.
cmat ls_solve_ud (const cmat &A, const cmat &B)
 Solves underdetermined linear equation systems.
bool backslash (const mat &A, const vec &b, vec &x)
 A general linear equation system solver.
vec backslash (const mat &A, const vec &b)
 A general linear equation system solver.
bool backslash (const mat &A, const mat &B, mat &X)
 A general linear equation system solver.
mat backslash (const mat &A, const mat &B)
 A general linear equation system solver.
bool backslash (const cmat &A, const cvec &b, cvec &x)
 A general linear equation system solver.
cvec backslash (const cmat &A, const cvec &b)
 A general linear equation system solver.
bool backslash (const cmat &A, const cmat &B, cmat &X)
 A general linear equation system solver.
cmat backslash (const cmat &A, const cmat &B)
 A general linear equation system solver.
vec forward_substitution (const mat &L, const vec &b)
 Forward substitution of square matrix.
void forward_substitution (const mat &L, const vec &b, vec &x)
 Forward substitution of square matrix.
vec forward_substitution (const mat &L, int p, const vec &b)
 Forward substitution of band matrices.
void forward_substitution (const mat &L, int p, const vec &b, vec &x)
 Forward substitution of band matrices.
vec backward_substitution (const mat &U, const vec &b)
 Backward substitution of square matrix.
void backward_substitution (const mat &U, const vec &b, vec &x)
 Backward substitution of square matrix.
vec backward_substitution (const mat &U, int q, const vec &b)
 Backward substitution of band matrix.
void backward_substitution (const mat &U, int q, const vec &b, vec &x)
 Backward substitution of band matrix.
bool lu (const mat &X, mat &L, mat &U, ivec &p)
 LU factorisation of real matrix.
bool lu (const cmat &X, cmat &L, cmat &U, ivec &p)
 LU factorisation of real matrix.
void interchange_permutations (vec &b, const ivec &p)
 Makes swapping of vector b according to the interchange permutation vector p.
bmat permutation_matrix (const ivec &p)
 Make permutation matrix P from the interchange permutation vector p.
bool qr (const mat &A, mat &Q, mat &R)
 QR factorisation of real matrix.
bool qr (const mat &A, mat &Q, mat &R, bmat &P)
 QR factorisation of real matrix with pivoting.
bool qr (const cmat &A, cmat &Q, cmat &R)
 QR factorisation of a complex matrix.
bool qr (const cmat &A, cmat &Q, cmat &R, bmat &P)
 QR factorisation of a complex matrix with pivoting.
bool schur (const mat &A, mat &U, mat &T)
 Schur decomposition of a real matrix.
bool schur (const cmat &A, cmat &U, cmat &T)
 Schur decomposition of a complex matrix.
mat schur (const mat &A)
 Schur decomposition of a real matrix.
cmat schur (const cmat &A)
 Schur decomposition of a complex matrix.
bool svd (const mat &A, vec &s)
 Get singular values s of a real matrix A using SVD.
bool svd (const cmat &A, vec &s)
 Get singular values s of a complex matrix A using SVD.
bool svd (const mat &A, mat &U, vec &s, mat &V)
 Perform Singular Value Decomposition (SVD) of a real matrix A.
bool svd (const cmat &A, cmat &U, vec &s, cmat &V)
 Perform Singular Value Decomposition (SVD) of a complex matrix A.
vec svd (const mat &A)
 Return singular values of a real matrix A using SVD.
vec svd (const cmat &A)
 Return singular values of a complex matrix A using SVD.
vec sqr (const cvec &x)
 Absolute square of elements.
mat sqr (const cmat &x)
 Absolute square of elements.
vec abs (const cvec &x)
 Absolute value.
mat abs (const cmat &x)
 Absolute value.
double fact (int index)
 Calculates factorial coefficient for index <= 170.
double binom (int n, int k)
 Compute the binomial coefficient "n over k".
int binom_i (int n, int k)
 Compute the binomial coefficient "n over k".
double log_binom (int n, int k)
 Compute the base 10 logarithm of the binomial coefficient "n over k".
int gcd (int a, int b)
 Compute the greatest common divisor (GCD) g of the elements a and b.
vec real (const cvec &x)
 Real part of complex values.
mat real (const cmat &x)
 Real part of complex values.
vec imag (const cvec &x)
 Imaginary part of complex values.
mat imag (const cmat &x)
 Imaginary part of complex values.
vec arg (const cvec &x)
 Argument (angle)
mat arg (const cmat &x)
 Argument (angle)
double sqr (double x)
 Square of x.
double sqr (const std::complex< double > &x)
 Absolute square of complex-valued x, ||x||^2.
vec sqr (const vec &x)
 Square of elements.
mat sqr (const mat &x)
 Square of elements.
vec abs (const vec &x)
 Absolute value.
mat abs (const mat &x)
 Absolute value.
ivec abs (const ivec &x)
 Absolute value.
imat abs (const imat &x)
 Absolute value.
double sign (double x)
 Signum function.
vec sign (const vec &x)
 Signum function.
mat sign (const mat &x)
 Signum function.
double sgn (double x)
 Signum function.
vec sgn (const vec &x)
 Signum function.
mat sgn (const mat &x)
 Signum function.
int sign_i (int x)
 Signum function.
ivec sign_i (const ivec &x)
 Signum function.
imat sign_i (const imat &x)
 Signum function.
int sgn_i (int x)
 Signum function.
ivec sgn_i (const ivec &x)
 Signum function.
imat sgn_i (const imat &x)
 Signum function.
int sign_i (double x)
 Signum function.
vec sqrt (const vec &x)
 Square root of the elements.
mat sqrt (const mat &x)
 Square root of the elements.
double gamma (double x)
 Deprecated gamma function - please use tgamma() instead.
vec gamma (const vec &x)
 Deprecated gamma function for vectors. Will be changed to tgamma().
mat gamma (const mat &x)
 Deprecated gamma function for matrices. Will be changed to tgamma().
double rem (double x, double y)
 The reminder of the division x/y.
vec rem (const vec &x, double y)
 Elementwise reminder of the division x/y for vec and double.
vec rem (double x, const vec &y)
 Elementwise reminder of the division x/y for double and vec.
mat rem (const mat &x, double y)
 Elementwise reminder of the division x/y for mat and double.
mat rem (double x, const mat &y)
 Elementwise reminder of the division x/y for double and mat.
int mod (int k, int n)
 Calculates the modulus, i.e. the signed reminder after division.
vec angle (const cvec &x)
 Angle.
mat angle (const cmat &x)
 Angle.
cvec conj (const cvec &x)
 Conjugate of complex value.
cmat conj (const cmat &x)
 Conjugate of complex value.
std::complex< double > cerfc_continued_fraction (const std::complex< double > &z)
std::complex< double > cerf_continued_fraction (const std::complex< double > &z)
 Complementary function to cerfc_continued_fraction.
std::complex< double > cerf_series (const std::complex< double > &z)
std::complex< double > cerf_rybicki (const std::complex< double > &z)
std::complex< double > erf (const std::complex< double > &z)
 Error function for complex argument.
double erfinv (double x)
 Inverse of error function.
double Qfunc (double x)
 Q-function.
vec erf (const vec &x)
 Error function.
mat erf (const mat &x)
 Error function.
cvec erf (const cvec &x)
 Error function.
cmat erf (const cmat &x)
 Error function.
vec erfinv (const vec &x)
 Inverse of error function.
mat erfinv (const mat &x)
 Inverse of error function.
vec erfc (const vec &x)
 Complementary error function.
mat erfc (const mat &x)
 Complementary error function.
vec Qfunc (const vec &x)
 Q-function.
mat Qfunc (const mat &x)
 Q-function.
double quadstep (double(*f)(double), double a, double b, double fa, double fm, double fb, double is)
 quadstep function
double quad (double(*f)(double), double a, double b, double tol)
double quadlstep (double(*f)(double), double a, double b, double fa, double fb, double is)
 quadlstep function
double quadl (double(*f)(double), double a, double b, double tol)
double logb (double b, double x)
 Base-b logarithm.
int pow2i (int x)
 Calculate two to the power of x (2^x); x is integer.
double pow2 (double x)
 Calculate two to the power of x (2^x)
double pow10 (double x)
 Calculate ten to the power of x (10^x)
double dB (double x)
 Decibel of x (10*log10(x))
double inv_dB (double x)
 Inverse of decibel of x.
int int2bits (int n)
 Calculate the number of bits needed to represent an inteager n.
int levels2bits (int n)
 Calculate the number of bits needed to represent n different values (levels).
int needed_bits (int n)
 Deprecated function. Please use int2bits() or levels2bits() instead.
double trunc_log (double x)
 Truncated natural logarithm function.
double trunc_exp (double x)
 Truncated exponential function.
double log_add (double log_a, double log_b)
 Safe substitute for log(exp(log_a) + exp(log_b))
vec exp (const vec &x)
 Exp of the elements of a vector x.
cvec exp (const cvec &x)
 Exp of the elements of a complex vector x.
mat exp (const mat &m)
 Exp of the elements of a matrix m.
cmat exp (const cmat &m)
 Exp of the elements of a complex matrix m.
vec pow (const double x, const vec &y)
 Calculates x to the power of y (x^y)
mat pow (const double x, const mat &y)
 Calculates x to the power of y (x^y)
vec pow (const vec &x, const double y)
 Calculates x to the power of y (x^y)
mat pow (const mat &x, const double y)
 Calculates x to the power of y (x^y)
vec pow2 (const vec &x)
 Calculates two to the power of x (2^x)
mat pow2 (const mat &x)
 Calculates two to the power of x (2^x)
vec pow10 (const vec &x)
 Calculates ten to the power of x (10^x)
mat pow10 (const mat &x)
 Calculates ten to the power of x (10^x)
vec log (const vec &x)
 The natural logarithm of the elements.
mat log (const mat &x)
 The natural logarithm of the elements.
cvec log (const cvec &x)
 The natural logarithm of the elements.
cmat log (const cmat &x)
 The natural logarithm of the elements.
vec log2 (const vec &x)
 log-2 of the elements
mat log2 (const mat &x)
 log-2 of the elements
vec log10 (const vec &x)
 log-10 of the elements
mat log10 (const mat &x)
 log-10 of the elements
vec logb (double b, const vec &x)
 log-b of x
mat logb (double b, const mat &x)
 log-b of x
vec dB (const vec &x)
 Calculates 10*log10(x)
mat dB (const mat &x)
 Calculates 10*log10(x)
vec inv_dB (const vec &x)
 Calulates the inverse of dB, 10^(x/10)
mat inv_dB (const mat &x)
 Calculates the inverse of dB, 10^(x/10)
ivec needed_bits (const ivec &v)
 Deprecated function. Please use int2bits() or levels2bits() instead.
ivec int2bits (const ivec &v)
 Calculate the number of bits needed to represent each inteager in a vector.
ivec levels2bits (const ivec &v)
 Calculate the number of bits needed to represent a numer of levels saved in a vector.
template<class T >
max (const Vec< T > &v)
 Maximum value of vector.
template<class T >
max (const Vec< T > &v, int &index)
 Maximum value of vector, also returns the index position of max value.
template<class T >
Vec< T > max (const Mat< T > &m, int dim=1)
template<class T >
Vec< T > max (const Mat< T > &m, ivec &index, int dim=1)
template<class T >
min (const Vec< T > &in)
 Minimum value of vector.
template<class T >
min (const Vec< T > &in, int &index)
 Minimum value of vector, also returns the index position of min value.
template<class T >
Vec< T > min (const Mat< T > &m, int dim=1)
template<class T >
Vec< T > min (const Mat< T > &m, ivec &index, int dim=1)
template<class T >
int max_index (const Vec< T > &in)
 Return the postion of the maximum element in the vector.
template<class T >
void max_index (const Mat< T > &m, int &row, int &col)
 Return the postion of the maximum element in the matrix.
template<class T >
int min_index (const Vec< T > &in)
 Return the postion of the minimum element in the vector.
template<class T >
void min_index (const Mat< T > &m, int &row, int &col)
 Return the postion of the minimum element in the matrix.
std::string itpp_version ()
 Returns IT++ library version number, e.g. "3.7.1".
bool check_big_endianness ()
 Returns machine endianness: big-endian = true; little-endian = false.
bool is_int (double x)
 Return true if x is an integer.
bool is_even (int x)
 Return true if x is an even integer.
double sinc (double x)
 Sinc function: sinc(x) = sin(pi*x)/pi*x.
vec sin (const vec &x)
 Sine function.
mat sin (const mat &x)
 Sine function.
vec cos (const vec &x)
 Cosine function.
mat cos (const mat &x)
 Cosine function.
vec tan (const vec &x)
 Tan function.
mat tan (const mat &x)
 Tan function.
vec asin (const vec &x)
 Inverse sine function.
mat asin (const mat &x)
 Inverse sine function.
vec acos (const vec &x)
 Inverse cosine function.
mat acos (const mat &x)
 Inverse cosine function.
vec atan (const vec &x)
 Inverse tan function.
mat atan (const mat &x)
 Inverse tan function.
vec sinc (const vec &x)
 Sinc function, sin(pi*x)/(pi*x)
mat sinc (const mat &x)
 Sinc function, sin(pi*x)/(pi*x)
vec sinh (const vec &x)
 Sine hyperbolic function.
mat sinh (const mat &x)
 Sine hyperbolic function.
vec cosh (const vec &x)
 Cosine hyperbolic function.
mat cosh (const mat &x)
 Cosine hyperbolic function.
vec tanh (const vec &x)
 Tan hyperbolic function.
mat tanh (const mat &x)
 Tan hyperbolic function.
vec asinh (const vec &x)
 Inverse sine hyperbolic function.
mat asinh (const mat &x)
 Inverse sine hyperbolic function.
vec acosh (const vec &x)
 Inverse cosine hyperbolic function.
mat acosh (const mat &x)
 Inverse cosine hyperbolic function.
vec atanh (const vec &x)
 Inverse tan hyperbolic function.
mat atanh (const mat &x)
 Inverse tan hyperbolic function.
bmat graycode (int m)
 Generate Gray code of blocklength m.The codes are contained as binary codewords {0,1} in the rows of the returned matrix. See also the gray() function in math/scalfunc.h.
int hamming_distance (const bvec &a, const bvec &b)
 Calculate the Hamming distance between a and b.
int weight (const bvec &a)
 Calculate the Hamming weight of a.
vec waterfilling (const vec &alpha, double P)
 Compute the water-filling solutionThis function computes the solution of the water-filling problem

\[ \max_{p_0,...,p_{n-1}} \sum_{i=0}^{n-1} \log\left(1+p_i\alpha_i\right) \]

subject to

\[ \sum_{i=0}^{n-1} p_i \le P \]

.

void get_MFD_gen_pol (int n, int K, ivec &gen)
void get_ODS_gen_pol (int n, int K, ivec &gen)
int reverse_int (int length, int in)
int weight_int (int length, int in)
int compare_spectra (ivec v1, ivec v2)
int compare_spectra (ivec v1, ivec v2, vec weight_profile)
std::ostream & operator<< (std::ostream &os, const GF &ingf)
 Output stream operator for GF.
std::ostream & operator<< (std::ostream &os, const GFX &ingfx)
 Output stream operator for GFX.
GFX divgfx (const GFX &c, const GFX &g)
 Division of two GFX (local help function)
GFX modgfx (const GFX &a, const GFX &b)
 Modulo function of two GFX (local help function)
GFX operator* (const GF &ingf, const GFX &ingfx)
 Multiplication of GF and GFX.
GFX operator* (const GFX &ingfx, const GF &ingf)
 Multiplication of GFX and GF.
GFX operator/ (const GFX &ingfx, const GF &ingf)
 Division of GFX by GF.
std::ostream & operator<< (std::ostream &os, const LDPC_Code &C)
 Print some properties of the LDPC codec in plain text.
std::ostream & operator<< (std::ostream &os, const LLR_calc_unit &lcu)
 Print some properties of the LLR calculation unit in plain text.
std::ostream & operator<< (std::ostream &os, const Modulator_NRD &m)
 Print some properties of the MIMO modulator (mainly to aid debugging)
std::ostream & operator<< (std::ostream &os, const Modulator_NCD &m)
 Print some properties of the MIMO modulator (mainly to aid debugging)
double max (double x, double y)
 \// This wrapper is because "com_log = std::max;" below caused an error
GFX formal_derivate (const GFX &f)
 Local help function.
smat wcdma_spreading_codes (int SF)
 Generates the OVSF (orthogonal variable spreading factor) spreading codes used in WCDMA.The codes are written row-wise in the return matrix.
ivec wcdma_turbo_interleaver_sequence (int interleaver_size)
 Generates the interleaver sequence for the internal turbo encoder interleaver used in WCDMA.
int assert_shifts (const CFix &x, const CFix &y)
 Check that x.shift==y.shift OR x==0 OR y==0 and return the shift (for the non-zero argument)
int assert_shifts (const CFix &x, const Fix &y)
 Check that x.shift==y.shift OR x==0 OR y==0 and return the shift (for the non-zero argument)
int assert_shifts (const CFix &x, int y)
 Check that x.shift==0 OR x==0 OR y==0 and return x.shift.
std::istream & operator>> (std::istream &is, CFix &x)
 Input bit representation and, optionally, the shift.
std::ostream & operator<< (std::ostream &os, const CFix &x)
 Output bit representation and, optionally, the shift.
int assert_shifts (const Fix &x, const Fix &y)
 Check that x.shift==y.shift OR x==0 OR y==0 and return the shift (for the non-zero argument)
int assert_shifts (const Fix &x, int y)
 Check that x.shift==0 OR x==0 OR y==0 and return x.shift.
std::istream & operator>> (std::istream &is, Fix &x)
 Input bit representation and, optionally, the shift.
std::ostream & operator<< (std::ostream &os, const Fix &x)
 Output bit representation and, optionally, the shift.
std::ostream & operator<< (std::ostream &os, const output_mode &o)
 Set output mode.
template<>
void create_elements< Fix > (Fix *&ptr, const int n, const Factory &f)
 Create an n-length array of Fix using Fix_Factory f.
template<>
void create_elements< CFix > (CFix *&ptr, const int n, const Factory &f)
 Create an n-length array of CFix using Fix_Factory f.
const Fix_Factory FIX1 (1, TC, WRAP)
 Fix_Factories for signed Fix/CFix with wrap-around (FIX1, FIX2, ..., FIX64)
const Fix_Factory FIX3 (3, TC, WRAP)
 Fix_Factory FIX2(2, TC, WRAP);
const Fix_Factory FIX4 (4, TC, WRAP)
const Fix_Factory FIX5 (5, TC, WRAP)
const Fix_Factory FIX6 (6, TC, WRAP)
const Fix_Factory FIX7 (7, TC, WRAP)
const Fix_Factory FIX8 (8, TC, WRAP)
const Fix_Factory FIX9 (9, TC, WRAP)
const Fix_Factory FIX10 (10, TC, WRAP)
const Fix_Factory FIX11 (11, TC, WRAP)
const Fix_Factory FIX12 (12, TC, WRAP)
const Fix_Factory FIX13 (13, TC, WRAP)
const Fix_Factory FIX14 (14, TC, WRAP)
const Fix_Factory FIX15 (15, TC, WRAP)
const Fix_Factory FIX16 (16, TC, WRAP)
const Fix_Factory FIX17 (17, TC, WRAP)
const Fix_Factory FIX18 (18, TC, WRAP)
const Fix_Factory FIX19 (19, TC, WRAP)
const Fix_Factory FIX20 (20, TC, WRAP)
const Fix_Factory FIX21 (21, TC, WRAP)
const Fix_Factory FIX22 (22, TC, WRAP)
const Fix_Factory FIX23 (23, TC, WRAP)
const Fix_Factory FIX24 (24, TC, WRAP)
const Fix_Factory FIX25 (25, TC, WRAP)
const Fix_Factory FIX26 (26, TC, WRAP)
const Fix_Factory FIX27 (27, TC, WRAP)
const Fix_Factory FIX28 (28, TC, WRAP)
const Fix_Factory FIX29 (29, TC, WRAP)
const Fix_Factory FIX30 (30, TC, WRAP)
const Fix_Factory FIX31 (31, TC, WRAP)
const Fix_Factory FIX32 (32, TC, WRAP)
const Fix_Factory FIX33 (33, TC, WRAP)
const Fix_Factory FIX34 (34, TC, WRAP)
const Fix_Factory FIX35 (35, TC, WRAP)
const Fix_Factory FIX36 (36, TC, WRAP)
const Fix_Factory FIX37 (37, TC, WRAP)
const Fix_Factory FIX38 (38, TC, WRAP)
const Fix_Factory FIX39 (39, TC, WRAP)
const Fix_Factory FIX40 (40, TC, WRAP)
const Fix_Factory FIX41 (41, TC, WRAP)
const Fix_Factory FIX42 (42, TC, WRAP)
const Fix_Factory FIX43 (43, TC, WRAP)
const Fix_Factory FIX44 (44, TC, WRAP)
const Fix_Factory FIX45 (45, TC, WRAP)
const Fix_Factory FIX46 (46, TC, WRAP)
const Fix_Factory FIX47 (47, TC, WRAP)
const Fix_Factory FIX48 (48, TC, WRAP)
const Fix_Factory FIX49 (49, TC, WRAP)
const Fix_Factory FIX50 (50, TC, WRAP)
const Fix_Factory FIX51 (51, TC, WRAP)
const Fix_Factory FIX52 (52, TC, WRAP)
const Fix_Factory FIX53 (53, TC, WRAP)
const Fix_Factory FIX54 (54, TC, WRAP)
const Fix_Factory FIX55 (55, TC, WRAP)
const Fix_Factory FIX56 (56, TC, WRAP)
const Fix_Factory FIX57 (57, TC, WRAP)
const Fix_Factory FIX58 (58, TC, WRAP)
const Fix_Factory FIX59 (59, TC, WRAP)
const Fix_Factory FIX60 (60, TC, WRAP)
const Fix_Factory FIX61 (61, TC, WRAP)
const Fix_Factory FIX62 (62, TC, WRAP)
const Fix_Factory FIX63 (63, TC, WRAP)
const Fix_Factory FIX64 (64, TC, WRAP)
const Fix_Factory UFIX1 (1, US, WRAP)
const Fix_Factory UFIX3 (3, US, WRAP)
 Fix_Factory UFIX2(2, US, WRAP);
const Fix_Factory UFIX4 (4, US, WRAP)
const Fix_Factory UFIX5 (5, US, WRAP)
const Fix_Factory UFIX6 (6, US, WRAP)
const Fix_Factory UFIX7 (7, US, WRAP)
const Fix_Factory UFIX8 (8, US, WRAP)
const Fix_Factory UFIX9 (9, US, WRAP)
const Fix_Factory UFIX10 (10, US, WRAP)
const Fix_Factory UFIX11 (11, US, WRAP)
const Fix_Factory UFIX12 (12, US, WRAP)
const Fix_Factory UFIX13 (13, US, WRAP)
const Fix_Factory UFIX14 (14, US, WRAP)
const Fix_Factory UFIX15 (15, US, WRAP)
const Fix_Factory UFIX16 (16, US, WRAP)
const Fix_Factory UFIX17 (17, US, WRAP)
const Fix_Factory UFIX18 (18, US, WRAP)
const Fix_Factory UFIX19 (19, US, WRAP)
const Fix_Factory UFIX20 (20, US, WRAP)
const Fix_Factory UFIX21 (21, US, WRAP)
const Fix_Factory UFIX22 (22, US, WRAP)
const Fix_Factory UFIX23 (23, US, WRAP)
const Fix_Factory UFIX24 (24, US, WRAP)
const Fix_Factory UFIX25 (25, US, WRAP)
const Fix_Factory UFIX26 (26, US, WRAP)
const Fix_Factory UFIX27 (27, US, WRAP)
const Fix_Factory UFIX28 (28, US, WRAP)
const Fix_Factory UFIX29 (29, US, WRAP)
const Fix_Factory UFIX30 (30, US, WRAP)
const Fix_Factory UFIX31 (31, US, WRAP)
const Fix_Factory UFIX32 (32, US, WRAP)
const Fix_Factory UFIX33 (33, US, WRAP)
const Fix_Factory UFIX34 (34, US, WRAP)
const Fix_Factory UFIX35 (35, US, WRAP)
const Fix_Factory UFIX36 (36, US, WRAP)
const Fix_Factory UFIX37 (37, US, WRAP)
const Fix_Factory UFIX38 (38, US, WRAP)
const Fix_Factory UFIX39 (39, US, WRAP)
const Fix_Factory UFIX40 (40, US, WRAP)
const Fix_Factory UFIX41 (41, US, WRAP)
const Fix_Factory UFIX42 (42, US, WRAP)
const Fix_Factory UFIX43 (43, US, WRAP)
const Fix_Factory UFIX44 (44, US, WRAP)
const Fix_Factory UFIX45 (45, US, WRAP)
const Fix_Factory UFIX46 (46, US, WRAP)
const Fix_Factory UFIX47 (47, US, WRAP)
const Fix_Factory UFIX48 (48, US, WRAP)
const Fix_Factory UFIX49 (49, US, WRAP)
const Fix_Factory UFIX50 (50, US, WRAP)
const Fix_Factory UFIX51 (51, US, WRAP)
const Fix_Factory UFIX52 (52, US, WRAP)
const Fix_Factory UFIX53 (53, US, WRAP)
const Fix_Factory UFIX54 (54, US, WRAP)
const Fix_Factory UFIX55 (55, US, WRAP)
const Fix_Factory UFIX56 (56, US, WRAP)
const Fix_Factory UFIX57 (57, US, WRAP)
const Fix_Factory UFIX58 (58, US, WRAP)
const Fix_Factory UFIX59 (59, US, WRAP)
const Fix_Factory UFIX60 (60, US, WRAP)
const Fix_Factory UFIX61 (61, US, WRAP)
const Fix_Factory UFIX62 (62, US, WRAP)
const Fix_Factory UFIX63 (63, US, WRAP)
const Fix_Factory UFIX64 (64, US, WRAP)
const Fix_Factory SFIX1 (1, TC, SAT)
const Fix_Factory SFIX3 (3, TC, SAT)
 Fix_Factory SFIX2(2, TC, SAT);
const Fix_Factory SFIX4 (4, TC, SAT)
const Fix_Factory SFIX5 (5, TC, SAT)
const Fix_Factory SFIX6 (6, TC, SAT)
const Fix_Factory SFIX7 (7, TC, SAT)
const Fix_Factory SFIX8 (8, TC, SAT)
const Fix_Factory SFIX9 (9, TC, SAT)
const Fix_Factory SFIX10 (10, TC, SAT)
const Fix_Factory SFIX11 (11, TC, SAT)
const Fix_Factory SFIX12 (12, TC, SAT)
const Fix_Factory SFIX13 (13, TC, SAT)
const Fix_Factory SFIX14 (14, TC, SAT)
const Fix_Factory SFIX15 (15, TC, SAT)
const Fix_Factory SFIX16 (16, TC, SAT)
const Fix_Factory SFIX17 (17, TC, SAT)
const Fix_Factory SFIX18 (18, TC, SAT)
const Fix_Factory SFIX19 (19, TC, SAT)
const Fix_Factory SFIX20 (20, TC, SAT)
const Fix_Factory SFIX21 (21, TC, SAT)
const Fix_Factory SFIX22 (22, TC, SAT)
const Fix_Factory SFIX23 (23, TC, SAT)
const Fix_Factory SFIX24 (24, TC, SAT)
const Fix_Factory SFIX25 (25, TC, SAT)
const Fix_Factory SFIX26 (26, TC, SAT)
const Fix_Factory SFIX27 (27, TC, SAT)
const Fix_Factory SFIX28 (28, TC, SAT)
const Fix_Factory SFIX29 (29, TC, SAT)
const Fix_Factory SFIX30 (30, TC, SAT)
const Fix_Factory SFIX31 (31, TC, SAT)
const Fix_Factory SFIX32 (32, TC, SAT)
const Fix_Factory SFIX33 (33, TC, SAT)
const Fix_Factory SFIX34 (34, TC, SAT)
const Fix_Factory SFIX35 (35, TC, SAT)
const Fix_Factory SFIX36 (36, TC, SAT)
const Fix_Factory SFIX37 (37, TC, SAT)
const Fix_Factory SFIX38 (38, TC, SAT)
const Fix_Factory SFIX39 (39, TC, SAT)
const Fix_Factory SFIX40 (40, TC, SAT)
const Fix_Factory SFIX41 (41, TC, SAT)
const Fix_Factory SFIX42 (42, TC, SAT)
const Fix_Factory SFIX43 (43, TC, SAT)
const Fix_Factory SFIX44 (44, TC, SAT)
const Fix_Factory SFIX45 (45, TC, SAT)
const Fix_Factory SFIX46 (46, TC, SAT)
const Fix_Factory SFIX47 (47, TC, SAT)
const Fix_Factory SFIX48 (48, TC, SAT)
const Fix_Factory SFIX49 (49, TC, SAT)
const Fix_Factory SFIX50 (50, TC, SAT)
const Fix_Factory SFIX51 (51, TC, SAT)
const Fix_Factory SFIX52 (52, TC, SAT)
const Fix_Factory SFIX53 (53, TC, SAT)
const Fix_Factory SFIX54 (54, TC, SAT)
const Fix_Factory SFIX55 (55, TC, SAT)
const Fix_Factory SFIX56 (56, TC, SAT)
const Fix_Factory SFIX57 (57, TC, SAT)
const Fix_Factory SFIX58 (58, TC, SAT)
const Fix_Factory SFIX59 (59, TC, SAT)
const Fix_Factory SFIX60 (60, TC, SAT)
const Fix_Factory SFIX61 (61, TC, SAT)
const Fix_Factory SFIX62 (62, TC, SAT)
const Fix_Factory SFIX63 (63, TC, SAT)
const Fix_Factory SFIX64 (64, TC, SAT)
const Fix_Factory SUFIX1 (1, US, SAT)
const Fix_Factory SUFIX3 (3, US, SAT)
 Fix_Factory SUFIX2(2, US, SAT);
const Fix_Factory SUFIX4 (4, US, SAT)
const Fix_Factory SUFIX5 (5, US, SAT)
const Fix_Factory SUFIX6 (6, US, SAT)
const Fix_Factory SUFIX7 (7, US, SAT)
const Fix_Factory SUFIX8 (8, US, SAT)
const Fix_Factory SUFIX9 (9, US, SAT)
const Fix_Factory SUFIX10 (10, US, SAT)
const Fix_Factory SUFIX11 (11, US, SAT)
const Fix_Factory SUFIX12 (12, US, SAT)
const Fix_Factory SUFIX13 (13, US, SAT)
const Fix_Factory SUFIX14 (14, US, SAT)
const Fix_Factory SUFIX15 (15, US, SAT)
const Fix_Factory SUFIX16 (16, US, SAT)
const Fix_Factory SUFIX17 (17, US, SAT)
const Fix_Factory SUFIX18 (18, US, SAT)
const Fix_Factory SUFIX19 (19, US, SAT)
const Fix_Factory SUFIX20 (20, US, SAT)
const Fix_Factory SUFIX21 (21, US, SAT)
const Fix_Factory SUFIX22 (22, US, SAT)
const Fix_Factory SUFIX23 (23, US, SAT)
const Fix_Factory SUFIX24 (24, US, SAT)
const Fix_Factory SUFIX25 (25, US, SAT)
const Fix_Factory SUFIX26 (26, US, SAT)
const Fix_Factory SUFIX27 (27, US, SAT)
const Fix_Factory SUFIX28 (28, US, SAT)
const Fix_Factory SUFIX29 (29, US, SAT)
const Fix_Factory SUFIX30 (30, US, SAT)
const Fix_Factory SUFIX31 (31, US, SAT)
const Fix_Factory SUFIX32 (32, US, SAT)
const Fix_Factory SUFIX33 (33, US, SAT)
const Fix_Factory SUFIX34 (34, US, SAT)
const Fix_Factory SUFIX35 (35, US, SAT)
const Fix_Factory SUFIX36 (36, US, SAT)
const Fix_Factory SUFIX37 (37, US, SAT)
const Fix_Factory SUFIX38 (38, US, SAT)
const Fix_Factory SUFIX39 (39, US, SAT)
const Fix_Factory SUFIX40 (40, US, SAT)
const Fix_Factory SUFIX41 (41, US, SAT)
const Fix_Factory SUFIX42 (42, US, SAT)
const Fix_Factory SUFIX43 (43, US, SAT)
const Fix_Factory SUFIX44 (44, US, SAT)
const Fix_Factory SUFIX45 (45, US, SAT)
const Fix_Factory SUFIX46 (46, US, SAT)
const Fix_Factory SUFIX47 (47, US, SAT)
const Fix_Factory SUFIX48 (48, US, SAT)
const Fix_Factory SUFIX49 (49, US, SAT)
const Fix_Factory SUFIX50 (50, US, SAT)
const Fix_Factory SUFIX51 (51, US, SAT)
const Fix_Factory SUFIX52 (52, US, SAT)
const Fix_Factory SUFIX53 (53, US, SAT)
const Fix_Factory SUFIX54 (54, US, SAT)
const Fix_Factory SUFIX55 (55, US, SAT)
const Fix_Factory SUFIX56 (56, US, SAT)
const Fix_Factory SUFIX57 (57, US, SAT)
const Fix_Factory SUFIX58 (58, US, SAT)
const Fix_Factory SUFIX59 (59, US, SAT)
const Fix_Factory SUFIX60 (60, US, SAT)
const Fix_Factory SUFIX61 (61, US, SAT)
const Fix_Factory SUFIX62 (62, US, SAT)
const Fix_Factory SUFIX63 (63, US, SAT)
const Fix_Factory SUFIX64 (64, US, SAT)
vec to_vec (const fixvec &v)
 Converts a fixvec to vec.
cvec to_cvec (const cfixvec &v)
 Converts a cfixvec to cvec.
mat to_mat (const fixmat &m)
 Converts a fixmat to mat.
cmat to_cmat (const cfixmat &m)
 Converts a cfixmat to cmat.
Fix abs (const Fix &x)
 Absolute value.
Fix real (const CFix &x)
 Real part of complex value.
Fix imag (const CFix &x)
 Imaginary part of complex value.
CFix conj (const CFix &x)
 Conjugate of complex value.
template<class T >
bool is_fix (const T &)
 Return true only if argument is of type Fix or CFix (or an Array/Vec/Mat of Fix or CFix)
template<>
bool is_fix (const Fix &)
 Return true only if argument is of type Fix or CFix (or an Array/Vec/Mat of Fix or CFix)
template<>
bool is_fix (const fixvec &)
 Return true only if argument is of type Fix or CFix (or an Array/Vec/Mat of Fix or CFix)
template<>
bool is_fix (const fixmat &)
 Return true only if argument is of type Fix or CFix (or an Array/Vec/Mat of Fix or CFix)
template<>
bool is_fix (const CFix &)
 Return true only if argument is of type Fix or CFix (or an Array/Vec/Mat of Fix or CFix)
template<class T >
bool is_fix (const Array< T > &)
 Return true only if argument is of type Fix or CFix (or an Array/Vec/Mat of Fix or CFix)
void set_fix (Fix &y, double x, int n)
 Set y = x * pow2(n) using the quantization mode of y.
void set_fix (Fix &y, double x, int n, q_mode q)
 Set y = x * pow2(n) using the specified quantization mode q.
void set_fix (fixvec &y, const vec &x, int n)
 Set y = x * pow2(n) using the quantization mode of y.
void set_fix (fixvec &y, const vec &x, int n, q_mode q)
 Set y = x * pow2(n) using the specified quantization mode q.
void set_fix (fixmat &y, const mat &x, int n)
 Set y = x * pow2(n) using the quantization mode of y.
void set_fix (fixmat &y, const mat &x, int n, q_mode q)
 Set y = x * pow2(n) using the specified quantization mode q.
void set_fix (double &y, double x, int)
 Set y = x. Useful in templated code.
void set_fix (double &y, double x, int, q_mode)
 Set y = x. Useful in templated code.
void set_fix (vec &y, const vec &x, int)
 Set y = x. Useful in templated code.
void set_fix (vec &y, const vec &x, int, q_mode)
 Set y = x. Useful in templated code.
void set_fix (mat &y, const mat &x, int)
 Set y = x. Useful in templated code.
void set_fix (mat &y, const mat &x, int, q_mode)
 Set y = x. Useful in templated code.
void set_fix (CFix &y, std::complex< double > x, int n)
 Set y = x * pow2(n) using the quantization mode of y.
void set_fix (CFix &y, double real, double imag, int n)
 Set y = (real + i*imag) * pow2(n) using the quantization mode of y.
void set_fix (CFix &y, std::complex< double > x, int n, q_mode q)
 Set y = x * pow2(n) using the specified quantization mode q.
void set_fix (CFix &y, double real, double imag, int n, q_mode q)
 Set y = (real + i*imag) * pow2(n) using the specified quantization mode q.
void set_fix (cfixvec &y, const cvec &x, int n)
 Set y = x * pow2(n) using the quantization mode of y.
void set_fix (cfixvec &y, const vec &real, const vec &imag, int n)
 Set y = (real + i*imag) * pow2(n) using the quantization mode of y.
void set_fix (cfixvec &y, const cvec &x, int n, q_mode q)
 Set y = x * pow2(n) using the specified quantization mode q.
void set_fix (cfixvec &y, const vec &real, const vec &imag, int n, q_mode q)
 Set y = (real + i*imag) * pow2(n) using the specified quantization mode q.
void set_fix (cfixmat &y, const cmat &x, int n)
 Set y = x * pow2(n) using the quantization mode of y.
void set_fix (cfixmat &y, const mat &real, const mat &imag, int n)
 Set y = (real + i*imag) * pow2(n) using the quantization mode of y.
void set_fix (cfixmat &y, const cmat &x, int n, q_mode q)
 Set y = x * pow2(n) using the specified quantization mode q.
void set_fix (cfixmat &y, const mat &real, const mat &imag, int n, q_mode q)
 Set y = (real + i*imag) * pow2(n) using the specified quantization mode q.
void set_fix (std::complex< double > &y, const std::complex< double > &x, int)
 Set y = x. Useful in templated code.
void set_fix (std::complex< double > &y, double real, double imag, int)
 Set y = real + i*imag. Useful in templated code.
void set_fix (std::complex< double > &y, const std::complex< double > &x, int, q_mode)
 Set y = x. Useful in templated code.
void set_fix (std::complex< double > &y, double real, double imag, int, q_mode)
 Set y = real + i*imag. Useful in templated code.
void set_fix (cvec &y, const cvec &x, int)
 Set y = x. Useful in templated code.
void set_fix (cvec &y, const vec &real, const vec &imag, int)
 Set y = real + i*imag. Useful in templated code.
void set_fix (cvec &y, const cvec &x, int, q_mode)
 Set y = x. Useful in templated code.
void set_fix (cvec &y, const vec &real, const vec &imag, int, q_mode)
 Set y = real + i*imag. Useful in templated code.
void set_fix (cmat &y, const cmat &x, int)
 Set y = x. Useful in templated code.
void set_fix (cmat &y, const mat &real, const mat &imag, int)
 Set y = real + i*imag. Useful in templated code.
void set_fix (cmat &y, const cmat &x, int, q_mode)
 Set y = x. Useful in templated code.
void set_fix (cmat &y, const mat &real, const mat &imag, int, q_mode)
 Set y = real + i*imag. Useful in templated code.
template<class T1 , class T2 >
void set_fix (Array< T1 > &y, const Array< T2 > &x, int n)
 Call set_fix for each Array element.
template<class T1 , class T2 >
void set_fix (Array< T1 > &y, const Array< T2 > &real, const Array< T2 > &imag, int n)
 Call set_fix for each Array element.
template<class T1 , class T2 >
void set_fix (Array< T1 > &y, const Array< T2 > &x, int n, q_mode q)
 Call set_fix for each Array element.
template<class T1 , class T2 >
void set_fix (Array< T1 > &y, const Array< T2 > &real, const Array< T2 > &imag, int n, q_mode q)
 Call set_fix for each Array element.
void lshift_fix (Fix &y, int n)
 Left shift n bits.
void rshift_fix (Fix &y, int n)
 Right shift n bits using the quantization mode of y.
void rshift_fix (Fix &y, int n, q_mode q)
 Right shift n bits using the specified quantization mode q.
void lshift_fix (fixvec &y, int n)
 Left shift n bits.
void rshift_fix (fixvec &y, int n)
 Right shift n bits using the quantization mode of y.
void rshift_fix (fixvec &y, int n, q_mode q)
 Right shift n bits using the specified quantization mode q.
void lshift_fix (fixmat &y, int n)
 Left shift n bits.
void rshift_fix (fixmat &y, int n)
 Right shift n bits using the quantization mode of y.
void rshift_fix (fixmat &y, int n, q_mode q)
 Right shift n bits using the specified quantization mode q.
void lshift_fix (double &, int)
 Dummy function useful in templated code.
void rshift_fix (double &, int)
 Dummy function useful in templated code.
void rshift_fix (double &, int, q_mode)
 Dummy function useful in templated code.
void lshift_fix (vec &, int)
 Dummy function useful in templated code.
void rshift_fix (vec &, int)
 Dummy function useful in templated code.
void rshift_fix (vec &, int, q_mode)
 Dummy function useful in templated code.
void lshift_fix (mat &, int)
 Dummy function useful in templated code.
void rshift_fix (mat &, int)
 Dummy function useful in templated code.
void rshift_fix (mat &, int, q_mode)
 Dummy function useful in templated code.
void lshift_fix (CFix &y, int n)
 Left shift n bits.
void rshift_fix (CFix &y, int n)
 Right shift n bits using the quantization mode of y.
void rshift_fix (CFix &y, int n, q_mode q)
 Right shift n bits using the specified quantization mode q.
void lshift_fix (std::complex< double > &, int)
 Dummy function useful in templated code.
void rshift_fix (std::complex< double > &, int)
 Dummy function useful in templated code.
void rshift_fix (std::complex< double > &, int, q_mode)
 Dummy function useful in templated code.
void lshift_fix (cvec &, int)
 Dummy function useful in templated code.
void rshift_fix (cvec &, int)
 Dummy function useful in templated code.
void rshift_fix (cvec &, int, q_mode)
 Dummy function useful in templated code.
void lshift_fix (cmat &, int)
 Dummy function useful in templated code.
void rshift_fix (cmat &, int)
 Dummy function useful in templated code.
void rshift_fix (cmat &, int, q_mode)
 Dummy function useful in templated code.
template<class T >
void lshift_fix (Array< T > &y, int n)
 Call lshift_fix for each Array element.
template<class T >
void rshift_fix (Array< T > &y, int n)
 Call rshift_fix for each Array element.
template<class T >
void rshift_fix (Array< T > &y, int n, q_mode q)
 Call rshift_fix for each Array element.
void assert_fixshift (double, int)
 If x is a fixed-point variable, assert that x has the specified shift value, otherwise do nothing.
void assert_fixshift (const std::complex< double > &, int)
 If x is a fixed-point variable, assert that x has the specified shift value, otherwise do nothing.
void assert_fixshift (const Fix &x, int shift)
 If x is a fixed-point variable, assert that x has the specified shift value, otherwise do nothing.
void assert_fixshift (const CFix &x, int shift)
 If x is a fixed-point variable, assert that x has the specified shift value, otherwise do nothing.
template<class T >
to (double x)
template<class T >
to (const Fix &x)
 Convert Fix to T.
template<class T >
to (const std::complex< double > &x)
 Convert std::complex<double> to T.
template<class T >
to (const CFix &x)
 Convert CFix to T.
template<class T >
to (double real, double imag)
 Convert double (real and imaginary parts) to T.
template<class T >
to (const Fix &real, const Fix &imag)
 Convert Fix (real and imaginary parts) to T.
template<class T , class U >
Vec< T > to (const Vec< U > &x)
 Convert Vec<U> to Vec<T>
template<>
vec to< double > (const vec &x)
 Convert vec to vec.
template<>
cvec to< std::complex< double > > (const cvec &x)
 Convert cvec to cvec.
template<>
fixvec to< Fix > (const fixvec &x)
 Convert fixvec to fixvec.
template<>
cfixvec to< CFix > (const cfixvec &x)
 Convert cfixvec to cfixvec.
template<class T , class U >
Vec< T > to (const Vec< U > &real, const Vec< U > &imag)
 Convert Vec<U> (real and imaginary parts) to Vec<T>
template<class T , class U >
Mat< T > to (const Mat< U > &x)
 Convert Mat<U> to Mat<T>
template<>
mat to< double > (const mat &x)
 Convert mat to mat.
template<>
cmat to< std::complex< double > > (const cmat &x)
 Convert cmat to cmat.
template<>
fixmat to< Fix > (const fixmat &x)
 Convert fixmat to fixmat.
template<>
cfixmat to< CFix > (const cfixmat &x)
 Convert cfixmat to cfixmat.
template<class T , class U >
Mat< T > to (const Mat< U > &real, const Mat< U > &imag)
 Convert Mat<U> (real and imaginary parts) to Mat<T>
template<class T , class U >
Array< typename ConvertU2T< T,
U >::result > 
to (const Array< U > &x)
 Convert Array<U>, where U can be an Array/Vec/Mat, to a corresponding Array with T elements.
template<class T , class U >
Array< typename ConvertU2T< T,
U >::result > 
to (const Array< U > &real, const Array< U > &imag)
 Convert Array<U> (real and imaginary parts), where U can be an Array/Vec/Mat, to a corresponding Array with T elements.
double unfix (const Fix &x)
 Convert Fix to double by multiplying the bit representation with pow2(-shift)
std::complex< double > unfix (const CFix &x)
 Convert CFix to std::complex<double> by multiplying the bit representation with pow2(-shift)
vec unfix (const fixvec &x)
 Convert fixvec to vec by multiplying the bit representations with pow2(-shift)
mat unfix (const fixmat &x)
 Convert fixmat to mat by multiplying the bit representations with pow2(-shift)
double unfix (double x)
 Convert double to double i.e. do nothing.
std::complex< double > unfix (const std::complex< double > &x)
 Convert std::complex<double> to std::complex<double> i.e. do nothing.
vec unfix (const vec &x)
 Convert vec to vec i.e. do nothing.
cvec unfix (const cvec &x)
 Convert cvec to cvec i.e. do nothing.
mat unfix (const mat &x)
 Convert mat to mat i.e. do nothing.
cmat unfix (const cmat &x)
 Convert cmat to cmat i.e. do nothing.
template<class T >
Array< typename Convert< T >
::to_double > 
unfix (const Array< T > &x)
Fix operator+ (const Fix &x, const Fix &y)
 Fix + Fix.
Fix operator- (const Fix &x, const Fix &y)
 Fix - Fix.
Fix operator* (const Fix &x, const Fix &y)
 Fix * Fix.
Fix operator/ (const Fix &x, const Fix &y)
 Fix / Fix using quantization mode TRN.
Fix operator+ (const Fix &x, const int y)
 Fix + int.
Fix operator- (const Fix &x, const int y)
 Fix - int.
Fix operator* (const Fix &x, const int y)
 Fix * int.
Fix operator/ (const Fix &x, const int y)
 Fix / int using quantization mode TRN.
Fix operator+ (const int x, const Fix &y)
 int + Fix
Fix operator- (const int x, const Fix &y)
 int - Fix
Fix operator* (const int x, const Fix &y)
 int * Fix
Fix operator/ (const int x, const Fix &y)
 int / Fix using quantization mode TRN
fixvec operator+ (const fixvec &a, const ivec &b)
 fixvec + ivec
Fix operator* (const fixvec &a, const ivec &b)
 fixvec * ivec
fixmat operator+ (const fixmat &a, const imat &b)
 fixmat + imat
fixmat operator* (const fixmat &a, const imat &b)
 fixmat * imat
CFix operator+ (const CFix &x, const CFix &y)
 CFix + CFix.
CFix operator- (const CFix &x, const CFix &y)
 CFix - CFix.
CFix operator* (const CFix &x, const CFix &y)
 CFix * CFix.
CFix operator/ (const CFix &x, const CFix &y)
 CFix / CFix using quantization mode TRN.
CFix operator+ (const CFix &x, const Fix &y)
 CFix + Fix.
CFix operator- (const CFix &x, const Fix &y)
 CFix - Fix.
CFix operator* (const CFix &x, const Fix &y)
 CFix * Fix.
CFix operator/ (const CFix &x, const Fix &y)
 CFix / Fix using quantization mode TRN.
CFix operator+ (const Fix &x, const CFix &y)
 Fix + CFix.
CFix operator- (const Fix &x, const CFix &y)
 Fix - CFix.
CFix operator* (const Fix &x, const CFix &y)
 Fix * CFix.
CFix operator/ (const Fix &x, const CFix &y)
 Fix / CFix using quantization mode TRN.
CFix operator+ (const CFix &x, const int y)
 CFix + int.
CFix operator- (const CFix &x, const int y)
 CFix - int.
CFix operator* (const CFix &x, const int y)
 CFix * int.
CFix operator/ (const CFix &x, const int y)
 CFix / int using quantization mode TRN.
CFix operator+ (const int x, const CFix &y)
 int + CFix
CFix operator- (const int x, const CFix &y)
 int - CFix
CFix operator* (const int x, const CFix &y)
 int * CFix
CFix operator/ (const int x, const CFix &y)
 int / CFix using quantization mode TRN
cfixvec operator+ (const cfixvec &a, const fixvec &b)
 cfixvec + fixvec
CFix operator* (const cfixvec &a, const fixvec &b)
 cfixvec * fixvec
cfixmat operator+ (const cfixmat &a, const fixmat &b)
 cfixmat + fixmat
cfixmat operator* (const cfixmat &a, const fixmat &b)
 cfixmat * fixmat
fixvec operator+ (const fixvec &v, const int s)
 fixvec + int
fixvec operator+ (const int s, const fixvec &v)
 int + fixvec
fixvec operator- (const fixvec &v, const int s)
 fixvec - int
fixvec operator- (const int s, const fixvec &v)
 int - fixvec
fixvec operator* (const fixvec &v, const int s)
 fixvec * int
fixvec operator* (const int s, const fixvec &v)
 int * fixvec
fixvec operator/ (const fixvec &v, const int s)
 fixvec / int using quantization mode TRN
fixmat operator+ (const fixmat &v, const int s)
 fixmat + int
fixmat operator+ (const int s, const fixmat &v)
 int + fixmat
fixmat operator- (const fixmat &v, const int s)
 fixmat - int
fixmat operator- (const int s, const fixmat &v)
 int - fixmat
fixmat operator* (const fixmat &v, const int s)
 fixmat * int
fixmat operator* (const int s, const fixmat &v)
 int * fixmat
fixmat operator/ (const fixmat &v, const int s)
 fixmat / int using quantization mode TRN
fixvec operator+ (const ivec &a, const fixvec &b)
 ivec + fixvec
fixvec operator- (const fixvec &a, const ivec &b)
 fixvec - ivec
fixvec operator- (const ivec &a, const fixvec &b)
 ivec - fixvec
Fix operator* (const ivec &a, const fixvec &b)
 ivec * fixvec
fixmat operator+ (const imat &a, const fixmat &b)
 imat + fixmat
fixmat operator- (const fixmat &a, const imat &b)
 fixmat - imat
fixmat operator- (const imat &a, const fixmat &b)
 imat - fixmat
fixmat operator* (const imat &a, const fixmat &b)
 imat * fixmat
cfixvec operator+ (const fixvec &v, const CFix &s)
 fixvec + CFix
cfixvec operator+ (const CFix &s, const fixvec &v)
 CFix + fixvec.
cfixvec operator- (const fixvec &v, const CFix &s)
 fixvec - CFix
cfixvec operator- (const CFix &s, const fixvec &v)
 CFix - fixvec.
cfixvec operator* (const fixvec &v, const CFix &s)
 fixvec * CFix
cfixvec operator* (const CFix &s, const fixvec &v)
 CFix * fixvec.
cfixvec operator/ (const fixvec &v, const CFix &s)
 fixvec / CFix using quantization mode TRN
cfixmat operator+ (const fixmat &m, const CFix &s)
 fixmat + CFix
cfixmat operator+ (const CFix &s, const fixmat &m)
 CFix + fixmat.
cfixmat operator- (const fixmat &m, const CFix &s)
 fixmat - CFix
cfixmat operator- (const CFix &s, const fixmat &m)
 CFix - fixmat.
cfixmat operator* (const fixmat &m, const CFix &s)
 fixmat * CFix
cfixmat operator* (const CFix &s, const fixmat &m)
 CFix * fixmat.
cfixmat operator/ (const fixmat &m, const CFix &s)
 fixmat / CFix using quantization mode TRN
cfixvec operator+ (const ivec &v, const CFix &s)
 ivec + CFix
cfixvec operator+ (const CFix &s, const ivec &v)
 CFix + ivec.
cfixvec operator- (const ivec &v, const CFix &s)
 ivec - CFix
cfixvec operator- (const CFix &s, const ivec &v)
 CFix - ivec.
cfixvec operator* (const ivec &v, const CFix &s)
 ivec * CFix
cfixvec operator* (const CFix &s, const ivec &v)
 CFix * ivec.
cfixvec operator/ (const ivec &v, const CFix &s)
 ivec / CFix using quantization mode TRN
cfixmat operator+ (const imat &m, const CFix &s)
 imat + CFix
cfixmat operator+ (const CFix &s, const imat &m)
 CFix + imat.
cfixmat operator- (const imat &m, const CFix &s)
 imat - CFix
cfixmat operator- (const CFix &s, const imat &m)
 CFix - imat.
cfixmat operator* (const imat &m, const CFix &s)
 imat * CFix
cfixmat operator* (const CFix &s, const imat &m)
 CFix * imat.
cfixmat operator/ (const imat &m, const CFix &s)
 imat / CFix using quantization mode TRN
cfixvec operator+ (const cfixvec &v, const Fix &s)
 cfixvec + Fix
cfixvec operator+ (const Fix &s, const cfixvec &v)
 Fix + cfixvec.
cfixvec operator- (const cfixvec &v, const Fix &s)
 cfixvec - Fix
cfixvec operator- (const Fix &s, const cfixvec &v)
 Fix - cfixvec.
cfixvec operator* (const cfixvec &v, const Fix &s)
 cfixvec * Fix
cfixvec operator* (const Fix &s, const cfixvec &v)
 Fix * cfixvec.
cfixvec operator/ (const cfixvec &v, const Fix &s)
 cfixvec / Fix using quantization mode TRN
cfixmat operator+ (const cfixmat &m, const Fix &s)
 cfixmat + Fix
cfixmat operator+ (const Fix &s, const cfixmat &m)
 Fix + cfixmat.
cfixmat operator- (const cfixmat &m, const Fix &s)
 cfixmat - Fix
cfixmat operator- (const Fix &s, const cfixmat &m)
 Fix - cfixmat.
cfixmat operator* (const cfixmat &m, const Fix &s)
 cfixmat * Fix
cfixmat operator* (const Fix &s, const cfixmat &m)
 Fix * cfixmat.
cfixmat operator/ (const cfixmat &m, const Fix &s)
 cfixmat / Fix using quantization mode TRN
cfixvec operator- (const cfixvec &a, const fixvec &b)
 cfixvec - fixvec
cfixmat operator- (const cfixmat &a, const fixmat &b)
 cfixmat - fixmat
vec fminunc (double(*function)(const vec &), vec(*gradient)(const vec &), const vec &x0)
 Unconstrained minimization.
bool in_sequence (const int a, const int b, const int L)
int min (int opd1, int opd2)
int max (int opd1, int opd2)
double round (const double value, const double granularity)
std::ostream & operator<< (std::ostream &os, const TCP_Segment &segment)
std::ostream & operator<< (std::ostream &out, TCP_Packet &msg)
const Sequence_Numbermin (const Sequence_Number &n1, const Sequence_Number &n2)
 ADD DOCUMENTATION HERE.
const Sequence_Numbermax (const Sequence_Number &n1, const Sequence_Number &n2)
 ADD DOCUMENTATION HERE.
vec fir1 (int N, double cutoff)
 Design a Nth order FIR filter with cut-off frequency cutoff using the window method.
void filter_design_autocorrelation (const int N, const vec &f, const vec &m, vec &R)
 Calculate autocorrelation from the specified frequency-response (suitable for filter design)
void modified_yule_walker (const int m, const int n, const int N, const vec &R, vec &a)
 Estimation of AR-part in an ARMA model given the autocorrelation.
void arma_estimator (const int m, const int n, const vec &R, vec &b, vec &a)
 Estimation of ARMA model given the autocorrelation.
void yulewalk (const int N, const vec &f, const vec &m, vec &b, vec &a)
 ARMA filter design using a least-squares fit to the specified frequency-response.
template vec repeat (const vec &v, int norepeats)
 Extern Template instantiation of repeat.
template cvec repeat (const cvec &v, int norepeats)
 Extern Template instantiation of repeat.
template svec repeat (const svec &v, int norepeats)
 Extern Template instantiation of repeat.
template ivec repeat (const ivec &v, int norepeats)
 Extern Template instantiation of repeat.
template bvec repeat (const bvec &v, int norepeats)
 Extern Template instantiation of repeat.
template mat repeat (const mat &m, int norepeats)
 Extern Template instantiation of repeat.
template cmat repeat (const cmat &m, int norepeats)
 Extern Template instantiation of repeat.
template smat repeat (const smat &m, int norepeats)
 Extern Template instantiation of repeat.
template imat repeat (const imat &m, int norepeats)
 Extern Template instantiation of repeat.
template bmat repeat (const bmat &m, int norepeats)
 Extern Template instantiation of repeat.
template vec upsample (const vec &v, int usf)
 Extern Template instantiation of upsample.
template cvec upsample (const cvec &v, int usf)
 Extern Template instantiation of upsample.
template svec upsample (const svec &v, int usf)
 Extern Template instantiation of upsample.
template ivec upsample (const ivec &v, int usf)
 Extern Template instantiation of upsample.
template bvec upsample (const bvec &v, int usf)
 Extern Template instantiation of upsample.
template mat upsample (const mat &v, int usf)
 Extern Template instantiation of upsample.
template cmat upsample (const cmat &v, int usf)
 Extern Template instantiation of upsample.
template smat upsample (const smat &v, int usf)
 Extern Template instantiation of upsample.
template imat upsample (const imat &v, int usf)
 Extern Template instantiation of upsample.
template bmat upsample (const bmat &v, int usf)
 Extern Template instantiation of upsample.
template void upsample (const vec &v, int usf, vec &u)
 Extern Template instantiation of upsample.
template void upsample (const cvec &v, int usf, cvec &u)
 Extern Template instantiation of upsample.
template void upsample (const svec &v, int usf, svec &u)
 Extern Template instantiation of upsample.
template void upsample (const ivec &v, int usf, ivec &u)
 Extern Template instantiation of upsample.
template void upsample (const bvec &v, int usf, bvec &u)
 Extern Template instantiation of upsample.
template void upsample (const mat &v, int usf, mat &u)
 Extern Template instantiation of upsample.
template void upsample (const cmat &v, int usf, cmat &u)
 Extern Template instantiation of upsample.
template void upsample (const smat &v, int usf, smat &u)
 Extern Template instantiation of upsample.
template void upsample (const imat &v, int usf, imat &u)
 Extern Template instantiation of upsample.
template void upsample (const bmat &v, int usf, bmat &u)
 Extern Template instantiation of upsample.
template vec lininterp (const vec &v, int usf)
 Extern Template instantiation of liniterp.
template cvec lininterp (const cvec &v, int usf)
 Extern Template instantiation of liniterp.
template mat lininterp (const mat &v, int usf)
 Extern Template instantiation of liniterp.
template cmat lininterp (const cmat &v, int usf)
 Extern Template instantiation of liniterp.
template void lininterp (const vec &v, int usf, vec &u)
 Extern Template instantiation of liniterp.
template void lininterp (const cvec &v, int usf, cvec &u)
 Extern Template instantiation of liniterp.
template void lininterp (const mat &v, int usf, mat &u)
 Extern Template instantiation of liniterp.
template void lininterp (const cmat &v, int usf, cmat &u)
 Extern Template instantiation of liniterp.
template mat lininterp (const mat &m, double f_base, double f_ups, int nrof_samples, double t_start)
 Extern Template instantiation of liniterp.
template cmat lininterp (const cmat &m, double f_base, double f_ups, int nrof_samples, double t_start)
 Extern Template instantiation of liniterp.
template vec lininterp (const vec &v, double f_base, double f_ups, int nrof_samples, double t_start)
 Extern Template instantiation of liniterp.
template cvec lininterp (const cvec &v, double f_base, double f_ups, int nrof_samples, double t_start)
 Extern Template instantiation of liniterp.
template<class T >
Vec< T > repeat (const Vec< T > &v, int norepeats)
 Repeat each element in the vector norepeats times in sequence.
template<class T >
Mat< T > repeat (const Mat< T > &m, int norepeats)
 Repeats each column norepeats times in sequence.
template<class T >
void upsample (const Vec< T > &v, int usf, Vec< T > &u)
 Upsample a vector by inserting (usf-1) zeros after each sample.
template<class T >
Vec< T > upsample (const Vec< T > &v, int usf)
 Upsample a vector by inserting (usf-1) zeros after each sample.
template<class T >
void upsample (const Mat< T > &v, int usf, Mat< T > &u)
 Upsample each column by inserting (usf-1) zeros after each column.
template<class T >
Mat< T > upsample (const Mat< T > &v, int usf)
 Upsample each column by inserting (usf-1) zeros after each column.
template<class T >
void lininterp (const Mat< T > &m, int usf, Mat< T > &u)
 Upsample each column by a factor of (usf-1) by linear interpolation.
template<class T >
Mat< T > lininterp (const Mat< T > &m, double f_base, double f_ups, int nrof_samples, double t_start=0)
 Upsample each column of matrix m to achieve f_ups frequency using linear interpolation.
template<class T >
Mat< T > lininterp (const Mat< T > &m, int usf)
 Upsample each column by a factor of (usf-1) by linear interpolation.
template<class T >
void lininterp (const Vec< T > &v, int usf, Vec< T > &u)
 Upsample by a factor of (usf-1) by linear interpolation.
template<class T >
Vec< T > lininterp (const Vec< T > &v, int usf)
 Upsample by a factor of (usf-1) by linear interpolation.
template<class T >
Vec< T > lininterp (const Vec< T > &v, double f_base, double f_ups, int nrof_samples, double t_start=0)
 Upsample vector v to achieve f_ups frequency using linear interpolation.
cvec xcorr (const cvec &x, const int max_lag=-1, const std::string scaleopt="none")
 Cross Correlation.
cvec xcorr (const cvec &x, const cvec &y, const int max_lag=-1, const std::string scaleopt="none")
 Cross Correlation.
void xcorr (const cvec &x, const cvec &y, cvec &out, const int max_lag=-1, const std::string scaleopt="none", bool autoflag=true)
 Cross Correlation.
mat cov (const mat &X, bool is_zero_mean=false)
 Covariance matrix calculation.
vec spectrum (const vec &v, int nfft=256, int noverlap=0)
 Power spectrum calculation.
vec spectrum (const vec &v, const vec &w, int noverlap=0)
 Power spectrum calculation.
vec filter_spectrum (const vec &a, int nfft=256)
 Power spectrum calculation of a filter.
vec filter_spectrum (const vec &a, const vec &b, int nfft=256)
 Power spectrum calculation of a filter.
void fft (const cvec &in, cvec &out)
 Fast Fourier Transform.
void ifft (const cvec &in, cvec &out)
 Inverse Fast Fourier Transform.
void fft_real (const vec &in, cvec &out)
 Real Fast Fourier Transform.
void ifft_real (const cvec &in, vec &out)
 Inverse Real Fast Fourier Transform. Assumes even size.
void dct (const vec &in, vec &out)
 Discrete Cosine Transform (DCT)
void idct (const vec &in, vec &out)
 Inverse Discrete Cosine Transform (IDCT)
cvec fft (const cvec &in)
 Fast Fourier Transform.
cvec fft (const cvec &in, const int N)
 Fast Fourier Transform, with zero-padding up to size N.
cvec ifft (const cvec &in)
 Inverse Fast Fourier Transform.
cvec ifft (const cvec &in, const int N)
 Inverse Fast Fourier Transform, with zero-padding up to size N.
cvec fft_real (const vec &in)
 Real Fast Fourier Transform.
cvec fft_real (const vec &in, const int N)
 Real Fast Fourier Transform, with zero-padding up to size N.
vec ifft_real (const cvec &in)
 Inverse Real Fast Fourier Transform. Assumes even size.
vec ifft_real (const cvec &in, const int N)
 Inverse Real Fast Fourier Transform, with zero-padding up to size N.
vec dct (const vec &in)
 Discrete Cosine Transform (DCT)
vec idct (const vec &in)
 Inverse Discrete Cosine Transform (IDCT)
template vec dht (const vec &v)
template cvec dht (const cvec &v)
template void dht (const vec &vin, vec &vout)
template void dht (const cvec &vin, cvec &vout)
template void self_dht (vec &v)
template void self_dht (cvec &v)
template vec dwht (const vec &v)
template cvec dwht (const cvec &v)
template void dwht (const vec &vin, vec &vout)
template void dwht (const cvec &vin, cvec &vout)
template void self_dwht (vec &v)
template void self_dwht (cvec &v)
template mat dht2 (const mat &m)
template cmat dht2 (const cmat &m)
template mat dwht2 (const mat &m)
template cmat dwht2 (const cmat &m)
template<class T >
Vec< T > dht (const Vec< T > &v)
 Fast Hadamard Transform.
template<class T >
void dht (const Vec< T > &vin, Vec< T > &vout)
 Fast Hadamard Transform.
template<class T >
void self_dht (Vec< T > &v)
 Fast Hadamard Transform - memory efficient. Stores the result in v.
template<class T >
Vec< T > dwht (const Vec< T > &v)
 Fast Walsh Hadamard Transform.
template<class T >
void dwht (const Vec< T > &vin, Vec< T > &vout)
 Fast Walsh Hadamard Transform.
template<class T >
void self_dwht (Vec< T > &v)
 Fast Walsh Hadamard Transform - memory efficient (result in v)
template<class T >
Mat< T > dht2 (const Mat< T > &m)
 Fast 2D Hadamard Transform.
template<class T >
Mat< T > dwht2 (const Mat< T > &m)
 Fast 2D Walsh Hadamard Transform.
template<class T >
void bitrv (Vec< T > &out)
 Bit reverse.
vec hamming (int size)
 Hamming window.
vec hanning (int n)
 Hanning window.
vec hann (int n)
 Hanning window compatible with matlab.
vec blackman (int n)
 Blackman window.
vec triang (int n)
 Triangular window.
vec sqrt_win (int n)
 Square root window.
static short double_to_short (double x)
static signed char double_to_char (double x)
bool raw16le_read (const char *fname, vec &v)
 Read raw 16-bin little endian audio data.
bool raw16le_read (const char *fname, vec &v, int beg, int len)
 Read raw 16-bin little endian audio data.
bool raw16le_write (const char *fname, const vec &v, bool append=false)
 Write raw 16-bin little endian audio data.
bool raw16be_read (const char *fname, vec &v)
 Read raw 16-bin big endian audio data.
bool raw16be_read (const char *fname, vec &v, int beg, int len)
 Read raw 16-bin big endian audio data.
bool raw16be_write (const char *fname, const vec &v, bool append=false)
 Write raw 16-bin big endian audio data.
bool snd_read (const char *fname, vec &v)
 Read SND audio data.
bool snd_read (const char *fname, vec &v, int beg, int len)
 Read SND audio data.
bool snd_write (const char *fname, const vec &v, int rate=8000, SND_Format::data_encoding e=SND_Format::enc_linear16)
 Write SND audio data.
template<typename T >
read_endian (std::istream &s, bool switch_endian=false)
 Read binary data and optionally switch endianness.
template<typename T >
void write_endian (std::ostream &s, T data, bool switch_endian=false)
 Write binary data and optionally switch endianness.
GMM gmmtrain (Array< vec > &TrainingData, int M, int NOITER, bool VERBOSE)
vec ac2rc (const vec &ac)
 ac2rc - Autocorrelation sequence to reflection coefficients conversion.
vec ac2poly (const vec &ac)
 ac2poly - Autocorrelation sequence to prediction polynomial conversion.
vec is2rc (const vec &is)
 is2rc - Inverse sine parameters to reflection coefficients conversion.
vec rc2ac (const vec &rc)
 rc2ac - Reflection coefficients to autocorrelation sequence conversion.
vec rc2is (const vec &rc)
 rc2is - Reflection coefficients to inverse sine parameters conversion.
vec autocorr (const vec &x, int order)
 Computes the autocorrelation function.
vec levinson (const vec &R2, int order)
 Levinson - Levinson-Durbin recursion.
vec lpc (const vec &x, int order)
 lpc - Linear Predictive Coefficients using autocorrelation method.
vec poly2ac (const vec &poly)
 poly2ac - Prediction polynomial to autocorrelation sequence conversion.
vec poly2rc (const vec &poly)
 poly2rc - Prediction polynomial to reflection coefficients conversion.
vec rc2poly (const vec &rc)
 rc2poly - Reflection coefficients to prediction polynomial conversion.
vec rc2lar (const vec &rc)
 rc2lar - Reflection coefficients to log area ratios conversion.
vec lar2rc (const vec &lar)
 lar2rc - Log area ratios to reflection coefficients conversion.
double FNevChebP_double (double x, const double c[], int n)
double FNevChebP (double x, const double c[], int n)
vec poly2lsf (const vec &poly)
 poly2lsf - Prediction polynomial to line spectral frequencies conversion.
vec lsf2poly (const vec &lsf)
 lsf2poly - Line spectral frequencies to prediction polynomial conversion.
vec poly2cepstrum (const vec &a)
 poly2cepstrum - Prediction polynomial to cepstrum conversion.
vec poly2cepstrum (const vec &a, int num)
 poly2cepstrum - Prediction polynomial to cepstrum conversion, to the specified order.
vec cepstrum2poly (const vec &c)
 cepstrum2poly - Cepstrum to prediction polynomial conversion.
vec chirp (const vec &a, double factor)
 Returns a chirped version of the input vector.
vec schurrc (const vec &R, int order)
 schurrc - Schur algorithm.
vec lerouxguegenrc (const vec &R, int order)
 Computes reflection coefficients from autocorrelation, using the Le-Roux-Guegen algorithm.
double sd (const vec &In1, const vec &In2)
 Spectral distortion between two vectors, in dB.
double sd (const vec &In1, const vec &In2, double highestfreq)
 Spectral distortion between two vectors, in dB, up to highest frequency highestfreq.
static void pnm_read_comments (istream &i, string &comments)
static void pnm_write_comments (ostream &o, const string &comments)
static bool pnm_read_header (ifstream &file, char &pnm_type, int &width, int &height, int &max_val, string &comments, char pnm_type_required= '0')
static bool pnm_write_header (ofstream &file, char type, int width, int height, int max_val, const string &comments)
char pnm_type (const std::string &filename)
 Determines the type of a PNM file, based on magic numbers. The returned value is a character between '1' and '6'. If an error occured, the returned value is the character '0'.
bool pnm_info (const std::string &filename, char &pnm_type, int &width, int &height, int &max_val, std::string &comments)
 Retrieve some information about an pnm file.
bool pgm_read (const std::string &filename, imat &m, std::string &comments)
 Read the entire graymap into the matrix m or return false if the function failed.
imat pgm_read (const std::string &filename)
 Read a pgm file of name filename and return the corresponding matrix of integers. Return a void matrix if an error ocurred.
bool pgm_read (const std::string &filename, imat &m, int r1, int r2, int c1, int c2)
 Read a part of the graymap into the matrix m.
bool pgm_write (const std::string &filename, const imat &m, const std::string &comments="Generated by IT++ (http://itpp.sourceforge.net)")
 Create an image file from the matrix of integer.
bool ppm_read (const std::string &filename, imat &r, imat &g, imat &b, std::string &comments)
 Read the color image file in the format ppm. The image is retrieved as a set of three matrices, each of whom is a plan of RGB component.
bool ppm_read (const std::string &filename, imat &r, imat &g, imat &b)
 Read the color image file in the PPM format.
bool ppm_read (const std::string &filename, imat &r, imat &g, imat &b, int r1, int r2, int c1, int c2)
 Read a part of the pixmap into the matrix m. The parameters r1, r2, c1 and c2 are the rows and columns (inclusive) of the subimage.
bool ppm_write (const std::string &filename, const imat &r, const imat &g, const imat &b, const std::string &comments="Generated by IT++ (http://itpp.sourceforge.net)", int max_val=255)
 Write the matrix m as a pixmap.
imat img_double2int (const mat &m, int max_val=255, double double_min=0, double double_max=1)
 Prepare a matrix of double to be writted as an image.
mat img_int2double (const imat &m, int max_val=255, double double_min=0, double double_max=1)
 Return a matrix of double which is a scaled version of the input matrix m of integers.
ifstream & operator>> (ifstream &ifs, vec &v)
int scalar_encode (double x, vec &Levels)
 ADD DOCUMENTATION HERE.
ivec scalar_encode (vec &x, vec &Levels)
 ADD DOCUMENTATION HERE.
double scalar_quantize (double x, vec &Levels)
 ADD DOCUMENTATION HERE.
vec scalar_quantize (vec &x, vec &Levels)
 ADD DOCUMENTATION HERE.
double kmeansiter (Array< vec > &DB, mat &codebook)
 ADD DOCUMENTATION HERE.
mat kmeans (Array< vec > &DB, int SIZE, int NOITER=9999, bool VERBOSE=true)
 ADD DOCUMENTATION HERE.
mat lbg (Array< vec > &DB, int SIZE, int NOITER=9999, bool VERBOSE=true)
 ADD DOCUMENTATION HERE.
mat vqtrain (Array< vec > &DB, int SIZE, int NOITER, double STARTSTEP=0.2, bool VERBOSE=true)
 Function for vector quantization training.
vec sqtrain (const vec &inDB, int SIZE)
 ADD DOCUMENTATION HERE.
ivec bitalloc (const vec &variances, int nobits)
 ADD DOCUMENTATION HERE.
double mean (const vec &v)
 The mean value.
std::complex< double > mean (const cvec &v)
 The mean value.
double mean (const svec &v)
 The mean value.
double mean (const ivec &v)
 The mean value.
double mean (const mat &m)
 The mean value.
std::complex< double > mean (const cmat &m)
 The mean value.
double mean (const smat &m)
 The mean value.
double mean (const imat &m)
 The mean value.
double norm (const cvec &v)
 Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2))
double norm (const cvec &v, int p)
 Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p)
double norm (const cvec &v, const std::string &s)
 Calculate the frobeniuos norm for s = "fro" (equal to 2-norm)
double norm (const mat &m, int p)
double norm (const cmat &m, int p)
double norm (const mat &m, const std::string &s)
 Calculate the frobeniuos norm of a matrix for s = "fro".
double norm (const cmat &m, const std::string &s)
 Calculate the frobeniuos norm of a matrix for s = "fro".
double variance (const cvec &v)
 The variance of the elements in the vector. Normalized with N-1 to be unbiased.
double moment (const vec &x, const int r)
 Calculate the central moment of vector x.
double skewness (const vec &x)
 Calculate the skewness excess of the input vector x.
double kurtosisexcess (const vec &x)
 Calculate the kurtosis excess of the input vector x.
template<class T >
double geometric_mean (const Vec< T > &v)
 The geometric mean of a vector.
template<class T >
double geometric_mean (const Mat< T > &m)
 The geometric mean of a matrix.
template<class T >
double median (const Vec< T > &v)
 The median.
template<class T >
double norm (const Vec< T > &v)
 Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2))
template<class T >
double norm (const Vec< T > &v, int p)
 Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p)
template<class T >
double norm (const Vec< T > &v, const std::string &s)
 Calculate the frobeniuos norm for s = "fro" (equal to 2-norm)
template<class T >
double variance (const Vec< T > &v)
 The variance of the elements in the vector. Normalized with N-1 to be unbiased.
template<class T >
double energy (const Vec< T > &v)
 Calculate the energy: squared 2-norm. energy(v)=sum(abs(v).^2)
bool within_tolerance (double x, double xref, double tol=1e-14)
 Return true if the input value x is within the tolerance tol of the reference value xref.
bool within_tolerance (std::complex< double > x, std::complex< double > xref, double tol=1e-14)
 Return true if the input value x is within the tolerance tol of the reference value xref.
bool within_tolerance (const vec &x, const vec &xref, double tol=1e-14)
 Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref.
bool within_tolerance (const cvec &x, const cvec &xref, double tol=1e-14)
 Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref.
bool within_tolerance (const mat &X, const mat &Xref, double tol=1e-14)
 Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref.
bool within_tolerance (const cmat &X, const cmat &Xref, double tol=1e-14)
 Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref.
double kurtosis (const vec &x)
 Calculate the kurtosis of the input vector x.
void MOG_diag_ML (MOG_diag &model_in, Array< vec > &X_in, int max_iter_in, double var_floor_in, double weight_floor_in, bool verbose_in)
void MOG_diag_MAP (MOG_diag &, MOG_diag &, Array< vec > &, int, double, double, double, bool)
void MOG_diag_kmeans (MOG_diag &model_in, Array< vec > &X_in, int max_iter_in, double trust_in, bool normalise_in, bool verbose_in)
vec filter (const vec &b, const vec &a, const vec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const vec &b, const vec &a, const cvec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const cvec &a, const cvec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const cvec &a, const vec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

vec filter (const vec &b, const int one, const vec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const vec &b, const int one, const cvec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const int one, const cvec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const int one, const vec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

vec filter (const int one, const vec &a, const vec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const int one, const vec &a, const cvec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const int one, const cvec &a, const cvec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const int one, const cvec &a, const vec &input)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

vec filter (const vec &b, const vec &a, const vec &input, const vec &state_in, vec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const vec &b, const vec &a, const cvec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const cvec &a, const cvec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const cvec &a, const vec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

vec filter (const vec &b, const int one, const vec &input, const vec &state_in, vec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const vec &b, const int one, const cvec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const int one, const cvec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const cvec &b, const int one, const vec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

vec filter (const int one, const vec &a, const vec &input, const vec &state_in, vec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const int one, const vec &a, const cvec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const int one, const cvec &a, const cvec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

cvec filter (const int one, const cvec &a, const vec &input, const cvec &state_in, cvec &state_out)
 ARMA filter functionThese functions implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

.

void polystab (const vec &a, vec &out)
 Polynomial Stabilization.
void polystab (const cvec &a, cvec &out)
 Polynomial Stabilization.
vec polystab (const vec &a)
 Polynomial Stabilization.
cvec polystab (const cvec &a)
 Polynomial Stabilization.
void freqz (const cvec &b, const cvec &a, const int N, cvec &h, vec &w)
 Frequency response of filter.
cvec freqz (const cvec &b, const cvec &a, const int N)
 Frequency response of filter.
cvec freqz (const cvec &b, const cvec &a, const vec &w)
 Frequency response of filter.
void freqz (const vec &b, const vec &a, const int N, cvec &h, vec &w)
 Frequency response of filter.
cvec freqz (const vec &b, const vec &a, const int N)
 Frequency response of filter.
cvec freqz (const vec &b, const vec &a, const vec &w)
 Frequency response of filter.
void poly (const vec &r, vec &p)
 Create a polynomial of the given rootsCreate a polynomial p with roots r.
void poly (const cvec &r, cvec &p)
 Create a polynomial of the given rootsCreate a polynomial p with roots r.
vec poly (const vec &r)
 Create a polynomial of the given rootsCreate a polynomial p with roots r.
cvec poly (const cvec &r)
 Create a polynomial of the given rootsCreate a polynomial p with roots r.
void roots (const vec &p, cvec &r)
 Calculate the roots of the polynomialCalculate the roots r of the polynomial p.
void roots (const cvec &p, cvec &r)
 Calculate the roots of the polynomialCalculate the roots r of the polynomial p.
cvec roots (const vec &p)
 Calculate the roots of the polynomialCalculate the roots r of the polynomial p.
cvec roots (const cvec &p)
 Calculate the roots of the polynomialCalculate the roots r of the polynomial p.
vec polyval (const vec &p, const vec &x)
 Evaluate polynomialEvaluate the polynomial p (of length $N+1$ at the points x The output is given by

\[ p_0 x^N + p_1 x^{N-1} + \ldots + p_{N-1} x + p_N \]

.

cvec polyval (const vec &p, const cvec &x)
 Evaluate polynomialEvaluate the polynomial p (of length $N+1$ at the points x The output is given by

\[ p_0 x^N + p_1 x^{N-1} + \ldots + p_{N-1} x + p_N \]

.

cvec polyval (const cvec &p, const vec &x)
 Evaluate polynomialEvaluate the polynomial p (of length $N+1$ at the points x The output is given by

\[ p_0 x^N + p_1 x^{N-1} + \ldots + p_{N-1} x + p_N \]

.

cvec polyval (const cvec &p, const cvec &x)
 Evaluate polynomialEvaluate the polynomial p (of length $N+1$ at the points x The output is given by

\[ p_0 x^N + p_1 x^{N-1} + \ldots + p_{N-1} x + p_N \]

.

vec xcorr_old (const vec &x, const int max_lag=-1, const std::string scaleopt="none")
 Auto-correlation calculation.
vec xcorr (const vec &x, const int max_lag, const std::string scaleopt)
 Auto-correlation calculation.
vec xcorr (const vec &x, const vec &y, const int max_lag, const std::string scaleopt)
 Cross-correlation calculation.
vec xcorr_old (const vec &x, const vec &y, const int max_lag=-1, const std::string scaleopt="none")
 Cross-correlation calculation.
void xcorr (const vec &x, const vec &y, vec &out, const int max_lag, const std::string scaleopt)
 Cross-correlation calculation.
void xcorr_old (const vec &x, const vec &y, vec &out, const int max_lag=-1, const std::string scaleopt="none")
 Cross-correlation calculation.

Variables

const Factory DEFAULT_FACTORY
 Default (dummy) factory.
static bool file_line_info_enabled = true
 bool warnings_enabled = true;
static std::ostream * warn = &std::cerr
 eye_c
Real_Timer __tic_toc_timer
 Global object for tic and toc functions.
const double log_double_max = std::log(std::numeric_limits<double>::max())
 Constant definition to speed up trunc_log() and trunc_exp()
const double log_double_min = std::log(std::numeric_limits<double>::min())
 Constant definition to speed up trunc_log(), trunc_exp() and log_add()
const double pi = 3.14159265358979323846
 Constant Pi.
const double m_2pi = 2 * pi
 Constant 2*Pi.
const double eps = std::numeric_limits<double>::epsilon()
 Constant eps.
int Conv_Code_MFD_2 [15][2]
 \
int Conv_Code_MFD_3 [15][3]
int Conv_Code_MFD_4 [15][4]
int Conv_Code_MFD_5 [9][5]
int Conv_Code_MFD_6 [9][6]
int Conv_Code_MFD_7 [9][7]
int Conv_Code_MFD_8 [9][8]
int maxK_Conv_Code_MFD [9] = {0, 0, 14, 14, 14, 8, 8, 8, 8}
int Conv_Code_ODS_2 [17][2]
int Conv_Code_ODS_3 [14][3]
int Conv_Code_ODS_4 [12][4]
int maxK_Conv_Code_ODS [5] = {0, 0, 16, 13, 11}
std::string crccode [18][2]
 \
static const int LDPC_binary_file_version = 2
 Version of the binary file with generator and decoder data.
double(* com_log )(double, double) = NULL
 Pointer to logarithmic branch metric function.
const int MAX_WORDLEN = 64
 Max word length.
const uint64_t UINT64_POW2 [64]
 Table for fast multiplication or division by 2^n.
const double DOUBLE_POW2 [128]
 Table for fast multiplication by 2^(n-64)
const double TCP_STIMERGRAN = 0.2
const double TCP_SWSATIMERVALUE = 0.2
const double TCP_MAXRTO = std::numeric_limits<double>::max()
const int TCP_BUFFERSIZE = std::numeric_limits<int>::max() / 4
const double TCP_ACKDELAYTIME = 0.2
const int TCP_MAXUSERBLOCKSIZE = std::numeric_limits<int>::max() / 4

Detailed Description

\

itpp namespace


Typedef Documentation

typedef CFixed< 1, TC, WRAP > itpp::cfixed1

Typedefs for CFixed (cfixed1, cfixed2, ..., cfixed64)

Typedefs for saturated CFixed (scfixed1, scfixed2, ..., scfixed64)

Definition at line 111 of file cfixed.h.

typedef Fixed<1, US, WRAP> itpp::ufixed1

Typedefs for unsigned Fixed (ufixed1, ufixed2, ..., ufixed64)

Definition at line 154 of file fixed.h.

typedef Fixed<1, TC, SAT> itpp::sfixed1

Typedefs for saturated Fixed (sfixed1, sfixed2, ..., sfixed64)

Definition at line 221 of file fixed.h.

typedef Fixed<1, US, SAT> itpp::sufixed1

Typedefs for saturated unsigned Fixed (sufixed1, sufixed2, ..., sufixed64)

Definition at line 288 of file fixed.h.


Enumeration Type Documentation

Sorting algorithms that can be used in a Sort class.

  • Introsort (the default and the fastest method in most cases)
  • Quicksort
  • Heapsort
  • Insertion Sort (suitable for very short vectors)

Definition at line 49 of file sort.h.


Function Documentation

template<class T >
const Array< T > itpp::concat ( const T  e,
const Array< T > &  a 
)

Append element e to the beginning of the Array a.

Concat element e to the beginning of the Array a.

Definition at line 499 of file array.h.

References itpp::Array< T >::size().

GF2mat operator* ( const GF2mat &  X,
const GF2mat &  Y 
)

GF(2) matrix multiplication.

Multiplication operator.

Definition at line 848 of file gf2mat.cpp.

References it_assert, mult_trans(), and itpp::GF2mat::transpose().

Referenced by operator*().

bvec operator* ( const GF2mat &  X,
const bvec y 
)

GF(2) matrix multiplication with "regular" binary vector.

Multiplication operator with binary vector.

Definition at line 874 of file gf2mat.cpp.

References it_assert, and mult_trans().

GF2mat operator+ ( const GF2mat &  X,
const GF2mat &  Y 
)

GF(2) matrix addition.

Addition operator.

Subtraction is not implemented because it is equivalent to addition.

Definition at line 949 of file gf2mat.cpp.

References it_assert.

std::ostream & operator<< ( std::ostream &  os,
const GF2mat &  X 
)

Output stream (plain text) operator for dense GF(2) matrices.

Output stream operator (plain text)

Definition at line 1002 of file gf2mat.cpp.

References itpp::GF2mat::density(), and itpp::GF2mat::get().

it_file & itpp::operator<< ( it_file &  f,
const GF2mat &  X 
)

/relatesalso GF2mat /brief Write GF(2) matrix to file.

Definition at line 1033 of file gf2mat.cpp.

References itpp::it_file::low_level_write(), and itpp::it_file::write_data_header().

it_ifile & itpp::operator>> ( it_ifile &  f,
GF2mat &  X 
)
template<class Num_T >
Mat< Num_T > itpp::concat_horizontal ( const Mat< Num_T > &  m1,
const Mat< Num_T > &  m2 
)

Horizontal concatenation of two matrices.

Concatenate the matrices m1 and m2 horizontally.

Definition at line 1226 of file mat.h.

References itpp::Mat< Num_T >::data, it_assert_debug, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::concat_vertical ( const Mat< Num_T > &  m1,
const Mat< Num_T > &  m2 
)

Vertical concatenation of two matrices.

Concatenate the matrices m1 and m2 vertically.

Definition at line 1248 of file mat.h.

References itpp::Mat< Num_T >::data, it_assert_debug, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator+ ( const Mat< Num_T > &  m,
Num_T  t 
)

Addition of a matrix and a scalar.

Addition of matrix and scalar.

Definition at line 1356 of file mat.h.

References itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::datasize, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator+ ( Num_T  t,
const Mat< Num_T > &  m 
)

Addition of a scalar and a matrix.

Addition of scalar and matrix.

Definition at line 1367 of file mat.h.

References itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::datasize, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator- ( const Mat< Num_T > &  m1,
const Mat< Num_T > &  m2 
)

Subtraction of two matrices.

Subtraction of m2 from m1.

Definition at line 1407 of file mat.h.

References itpp::Mat< Num_T >::data, it_assert_debug, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator- ( const Mat< Num_T > &  m,
Num_T  t 
)

Subtraction of matrix and scalar.

Subtraction of scalar from matrix.

Definition at line 1435 of file mat.h.

References itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator- ( Num_T  t,
const Mat< Num_T > &  m 
)

Subtraction of scalar and matrix.

Subtract matrix from scalar.

Definition at line 1452 of file mat.h.

References itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator- ( const Mat< Num_T > &  m)

Negation of matrix.

Subtraction of matrix.

Definition at line 1469 of file mat.h.

References itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Vec< Num_T > itpp::operator* ( const Mat< Num_T > &  m,
const Vec< Num_T > &  v 
)

Multiplication of matrix and vector.

Multiplication of matrix m and vector v (column vector)

Definition at line 1564 of file mat.h.

References itpp::Mat< Num_T >::data, it_assert_debug, itpp::Mat< Num_T >::no_cols, itpp::Mat< Num_T >::no_rows, and itpp::Vec< Num_T >::size().

template<class Num_T >
Mat< Num_T > itpp::operator* ( const Vec< Num_T > &  v,
const Mat< Num_T > &  m 
)

Multiplication of vector and matrix (matrix must be a row vector)

Multiplication of vector v and matrix m with only one row.

This operator multiplies a column vector v times matrix m that consists of only one row. Thus, the result of this operator is exactly the same as the result of the outer product of two vectors, i.e.: outer_product(v, m.get_col(0)).

Note:
This operator is deprecated and might be removed or changed in future releases of IT++.

Definition at line 1584 of file mat.h.

References itpp::Mat< Num_T >::get_row(), it_assert, it_warning, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
Mat< Num_T > itpp::operator/ ( const Mat< Num_T > &  m,
Num_T  t 
)

Division of matrix and scalar.

Division of matrix with scalar.

Definition at line 1688 of file mat.h.

References itpp::Mat< Num_T >::data, itpp::Mat< Num_T >::datasize, itpp::Mat< Num_T >::no_cols, and itpp::Mat< Num_T >::no_rows.

template<class Num_T >
std::istream & itpp::operator>> ( std::istream &  is,
Mat< Num_T > &  m 
)

Input stream for matrices.

The input can be on the form "1 2 3; 4 5 6" or "[[1 2 3][4 5 6]]", i.e. with brackets or semicolons as row delimiters. The first form is compatible with the set method, while the second form is compatible with the ostream operator. The elements on a row can be separated by blank space or commas. Rows that are shorter than the longest row are padded with zero elements. "[]" means an empty matrix.

Definition at line 1786 of file mat.h.

References itpp::Mat< Num_T >::set(), and itpp::Mat< Num_T >::set_size().

template<class T >
Sparse_Mat< T > itpp::operator+ ( const Sparse_Mat< T > &  m1,
const Sparse_Mat< T > &  m2 
)

m1+m2 where m1 and m2 are sparse matrices

Addition m1+m2 where m1 and m2 are sparse matrices.

Definition at line 767 of file smat.h.

References it_assert_debug.

template<class T >
Sparse_Mat< T > itpp::operator* ( const T &  c,
const Sparse_Mat< T > &  m 
)

c*m where c is a scalar and m is a sparse matrix

Multiplication c*m where c is a scalar and m is a sparse matrix.

Definition at line 781 of file smat.h.

References itpp::Sparse_Mat< T >::set_new().

template<class T >
Sparse_Mat< T > itpp::operator* ( const Sparse_Mat< T > &  m1,
const Sparse_Mat< T > &  m2 
)

m1*m2 where m1 and m2 are sparse matrices

Multiplication m1*m2 where m1 and m2 are sparse matrices.

Definition at line 796 of file smat.h.

References itpp::Sparse_Mat< T >::compact(), itpp::Sparse_Vec< T >::get_nz_data(), itpp::Sparse_Vec< T >::get_nz_index(), it_assert_debug, and itpp::Sparse_Vec< T >::nnz().

template<class T >
Sparse_Vec< T > itpp::operator* ( const Sparse_Mat< T > &  m,
const Sparse_Vec< T > &  v 
)

m*v where m is a sparse matrix and v is a sparse vector

Multiplication m*v where m is a sparse matrix and v is a sparse vector.

Definition at line 867 of file smat.h.

References itpp::Sparse_Vec< T >::get_nz_data(), itpp::Sparse_Vec< T >::get_nz_index(), it_assert_debug, itpp::Sparse_Vec< T >::nnz(), and itpp::Sparse_Vec< T >::size().

template<class T >
Vec< T > itpp::operator* ( const Sparse_Mat< T > &  m,
const Vec< T > &  v 
)

m*v where m is a sparse matrix and v is a full column vector

Multiplication m*v where m is a sparse matrix and v is a full column vector.

Definition at line 893 of file smat.h.

References it_assert_debug, and itpp::Vec< Num_T >::size().

template<class T >
Vec< T > itpp::operator* ( const Vec< T > &  v,
const Sparse_Mat< T > &  m 
)

v'*m where m is a sparse matrix and v is a full column vector

Multiplication v'*m where m is a sparse matrix and v is a full column vector.

Definition at line 909 of file smat.h.

References it_assert_debug, and itpp::Vec< Num_T >::size().

template<class T >
Mat< T > itpp::trans_mult ( const Sparse_Mat< T > &  m)

m'*m where m is a sparse matrix

Multiplication m'*m where m is a sparse matrix. Returns a full, dense matrix.

Definition at line 923 of file smat.h.

References itpp::Mat< Num_T >::cols().

template<class T >
Sparse_Mat< T > itpp::trans_mult_s ( const Sparse_Mat< T > &  m)

m'*m where m is a sparse matrix

Multiplication m'*m where m is a sparse matrix, Returns a sparse matrix.

Definition at line 941 of file smat.h.

template<class T >
Sparse_Mat< T > itpp::trans_mult ( const Sparse_Mat< T > &  m1,
const Sparse_Mat< T > &  m2 
)

m1'*m2 where m1 and m2 are sparse matrices

Multiplication m1'*m2 where m1 and m2 are sparse matrices.

Definition at line 964 of file smat.h.

References it_assert_debug.

template<class T >
Vec< T > itpp::trans_mult ( const Sparse_Mat< T > &  m,
const Vec< T > &  v 
)

m'*v where m is a sparse matrix and v is a full column vector

Multiplication m'*v where m is a sparse matrix and v is a full column vector.

Definition at line 980 of file smat.h.

template<class T >
Sparse_Mat< T > itpp::mult_trans ( const Sparse_Mat< T > &  m1,
const Sparse_Mat< T > &  m2 
)

m1*m2' where m1 and m2 are sparse matrices

Multiplication m1*m2' where m1 and m2 are sparse matrices.

Definition at line 990 of file smat.h.

References itpp::Sparse_Mat< T >::transpose().

template<class T >
Sparse_Vec< T > itpp::operator+ ( const Sparse_Vec< T > &  v1,
const Sparse_Vec< T > &  v2 
)

v1+v2 where v1 and v2 are sparse vector

Addition v1+v2 where v1 and v2 are sparse vector.

Definition at line 1168 of file svec.h.

References itpp::Sparse_Vec< T >::compact(), it_assert_debug, and itpp::Sparse_Vec< T >::resize_data().

template<class T >
T itpp::operator* ( const Sparse_Vec< T > &  v1,
const Sparse_Vec< T > &  v2 
)

v1*v2 where v1 and v2 are sparse vectors

Scalar product v1*v2 where v1 and v2 are sparse vectors.

Definition at line 1038 of file svec.h.

References itpp::Sparse_Vec< T >::full(), and it_assert_debug.

template<class T >
T itpp::operator* ( const Sparse_Vec< T > &  v1,
const Vec< T > &  v2 
)

v1*v2 where v1 is a sparse vector and v2 is a dense vector

Scalar product v1*v2 where v1 is a sparse vector and v2 is a dense vector.

Definition at line 1054 of file svec.h.

References it_assert_debug, itpp::Vec< Num_T >::size(), and itpp::Sparse_Vec< T >::size().

template<class T >
T itpp::operator* ( const Vec< T > &  v1,
const Sparse_Vec< T > &  v2 
)

v1*v2 where v1 is a dense vector and v2 is a sparse vector

Scalar product v1*v2 where v1 is a dense vector and v2 is a sparse vector.

Definition at line 1066 of file svec.h.

References it_assert_debug, itpp::Sparse_Vec< T >::size(), and itpp::Vec< Num_T >::size().

template<class T >
Sparse_Vec< T > itpp::elem_mult ( const Sparse_Vec< T > &  v1,
const Sparse_Vec< T > &  v2 
)

Elementwise multiplication of two sparse vectors returning a sparse vector.

Element wise multiplication of two sparse vectors.

Definition at line 1078 of file svec.h.

References itpp::Sparse_Vec< T >::compact(), it_assert_debug, and itpp::Sparse_Vec< T >::resize_data().

template<class T >
Vec< T > itpp::elem_mult ( const Sparse_Vec< T > &  v1,
const Vec< T > &  v2 
)

Elementwise multiplication of a sparse vector and a dense vector returning a dense vector.

Element wise multiplication of a sparse vector and a dense vector.

Definition at line 1102 of file svec.h.

References it_assert_debug, and itpp::Vec< Num_T >::size().

template<class T >
Sparse_Vec< T > itpp::elem_mult_s ( const Sparse_Vec< T > &  v1,
const Vec< T > &  v2 
)

Elementwise multiplication of a sparse vector and a dense vector returning a sparse vector.

Element wise multiplication of a sparse vector and a dense vector returning a sparse vector.

Definition at line 1115 of file svec.h.

References it_assert_debug, and itpp::Vec< Num_T >::size().

template<class T >
Vec< T > itpp::elem_mult ( const Vec< T > &  v1,
const Sparse_Vec< T > &  v2 
)

Elementwise multiplication of a dense vector and a sparse vector returning a dense vector.

Element wise multiplication of a a dense vector and a sparse vector.

Definition at line 1135 of file svec.h.

References it_assert_debug, and itpp::Vec< Num_T >::size().

template<class T >
Sparse_Vec< T > itpp::elem_mult_s ( const Vec< T > &  v1,
const Sparse_Vec< T > &  v2 
)

Elementwise multiplication of a dense vector and a sparse vector returning a sparse vector.

Element wise multiplication of a a dense vector and a sparse vector returning a sparse vector.

Definition at line 1148 of file svec.h.

References it_assert_debug, and itpp::Vec< Num_T >::size().

template<class Num_T >
Vec< Num_T > itpp::operator- ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
)

Subtraction of a vector from a vector.

Subtraction of v2 from v1.

Definition at line 918 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::operator- ( const Vec< Num_T > &  v,
Num_T  t 
)

Subtraction of a scalar from a vector.

Subtraction of scalar from vector.

Definition at line 931 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::operator- ( Num_T  t,
const Vec< Num_T > &  v 
)

Subtraction of vector from scalar. Results in a vector.

Subtraction of vector from scalar.

Definition at line 943 of file vec.h.

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

template<class Num_T >
Num_T itpp::dot ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
)

Inner (dot) product of two vectors v1 and v2.

Inner (dot) product.

Definition at line 996 of file vec.h.

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

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

Inner (dot) product of two vectors v1 and v2.

Inner (dot) product.

Definition at line 1009 of file vec.h.

template<class Num_T >
Mat< Num_T > itpp::outer_product ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
bool  hermitian = false 
)

Outer product of two vectors v1 and v2.

When v1 and v2 are complex vectors (cvec), the third boolean argument hermitian can be set to true to conjugate v2 (Matlab's v1 * v2' operation). This parameter is ignored for types other then cvec.

Definition at line 1079 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::operator* ( const Vec< Num_T > &  v,
Num_T  t 
)

Multiplication of a vector and a scalar.

Elementwise multiplication of vector and scalar.

Definition at line 1097 of file vec.h.

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

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

Multiplication of a scalar and a vector. Results in a vector.

Elementwise multiplication of vector and scalar.

Definition at line 1108 of file vec.h.

References operator*().

template<class Num_T >
Vec< Num_T > itpp::elem_mult ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b 
) [inline]

Element-wise multiplication of two vectors.

Elementwise multiplication.

Definition at line 1114 of file vec.h.

template<class Num_T >
Vec< Num_T > itpp::elem_mult ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b,
const Vec< Num_T > &  c 
) [inline]

Element-wise multiplication of three vectors.

Elementwise multiplication of three vectors.

Definition at line 1122 of file vec.h.

template<class Num_T >
Vec< Num_T > itpp::elem_mult ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b,
const Vec< Num_T > &  c,
const Vec< Num_T > &  d 
) [inline]

Element-wise multiplication of four vectors.

Elementwise multiplication of four vectors.

Definition at line 1131 of file vec.h.

template<class Num_T >
void itpp::elem_mult_out ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b,
Vec< Num_T > &  out 
)

Element-wise multiplication of two vectors, storing the result in vector out.

Elementwise multiplication, storing the result in vector out.

Definition at line 1140 of file vec.h.

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

template<class Num_T >
void itpp::elem_mult_out ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b,
const Vec< Num_T > &  c,
Vec< Num_T > &  out 
)

Element-wise multiplication of three vectors, storing the result in vector out.

Elementwise multiplication of three vectors, storing the result in vector out.

Definition at line 1150 of file vec.h.

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

template<class Num_T >
void itpp::elem_mult_out ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b,
const Vec< Num_T > &  c,
const Vec< Num_T > &  d,
Vec< Num_T > &  out 
)

Element-wise multiplication of four vectors, storing the result in vector out.

Elementwise multiplication of four vectors, storing the result in vector out.

Definition at line 1161 of file vec.h.

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

template<class Num_T >
void itpp::elem_mult_inplace ( const Vec< Num_T > &  a,
Vec< Num_T > &  b 
) [inline]

In-place element-wise multiplication of two vectors. Faster version of b = elem_mult(a,b).

In-place element-wise multiplication of two vectors. Fast version of b = elem_mult(a,b).

Definition at line 1176 of file vec.h.

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

template<class Num_T >
Num_T itpp::elem_mult_sum ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b 
) [inline]

Element-wise multiplication of two vectors, followed by summation of the resultant elements. Fast version of sum(elem_mult(a,b)).

Element-wise multiplication of two vectors, followed by summation of the resultant elements. Fast version of sum(elem_mult(a,b))

Definition at line 1185 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::operator/ ( const Vec< Num_T > &  v,
Num_T  t 
)

Division of all elements in v with t.

Elementwise division.

Definition at line 1196 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::operator/ ( Num_T  t,
const Vec< Num_T > &  v 
)

Division of t with all elements in v.

Elementwise division.

Definition at line 1208 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::elem_div ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b 
) [inline]

Elementwise division of two vectors.

Elementwise division.

Definition at line 1239 of file vec.h.

template<class Num_T >
Vec< Num_T > itpp::elem_div ( Num_T  t,
const Vec< Num_T > &  v 
)

Elementwise division of scalar t and vector v.

Elementwise division.

Definition at line 1247 of file vec.h.

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

template<class Num_T >
void itpp::elem_div_out ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b,
Vec< Num_T > &  out 
)

Elementwise division of two vectors, storing the result in vector out.

Elementwise division.

Definition at line 1259 of file vec.h.

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

template<class Num_T >
Num_T itpp::elem_div_sum ( const Vec< Num_T > &  a,
const Vec< Num_T > &  b 
) [inline]

Elementwise division of two vectors, followed by summation of the resultant elements. Fast version of sum(elem_div(a,b))

Elementwise division, followed by summation of the resultant elements. Fast version of sum(elem_mult(a,b))

Definition at line 1269 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::concat ( const Vec< Num_T > &  v,
Num_T  a 
)

Append element a to the end of the vector v.

Append element t to the end of the vector v.

Definition at line 1395 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::concat ( Num_T  a,
const Vec< Num_T > &  v 
)

Concat element a to the beginning of the vector v.

Insert element t at the beginning of the vector v.

Definition at line 1405 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::concat ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2 
)

Concat vectors v1 and v2.

Concatenate vectors v1 and v2.

Definition at line 1415 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::concat ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
const Vec< Num_T > &  v3 
)

Concat vectors v1, v2 and v3.

Concatenate vectors v1, v2 and v3.

Definition at line 1426 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::concat ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
const Vec< Num_T > &  v3,
const Vec< Num_T > &  v4 
)

Concat vectors v1, v2, v3 and v4.

Concatenate vectors v1, v2, v3 and v4.

Definition at line 1440 of file vec.h.

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

template<class Num_T >
Vec< Num_T > itpp::concat ( const Vec< Num_T > &  v1,
const Vec< Num_T > &  v2,
const Vec< Num_T > &  v3,
const Vec< Num_T > &  v4,
const Vec< Num_T > &  v5 
)

Concat vectors v1, v2 v3, v4 and v5.

Concatenate vectors v1, v2, v3, v4 and v5.

Definition at line 1456 of file vec.h.

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

std::complex<double> itpp::cerfc_continued_fraction ( const std::complex< double > &  z)

Abramowitz and Stegun: Eq. (7.1.14) gives this continued fraction for erfc(z)

erfc(z) = sqrt(pi).exp(-z^2). 1 1/2 1 3/2 2 5/2 --- --- --- --- --- --- ... z + z + z + z + z + z +

This is evaluated using Lentz's method, as described in the narative of Numerical Recipes in C.

The continued fraction is true providing real(z) > 0. In practice we like real(z) to be significantly greater than 0, say greater than 0.5.

Definition at line 143 of file error.cpp.

References abs(), eps, exp(), min(), pi, and sqrt().

Referenced by cerf_continued_fraction().

std::complex<double> itpp::cerf_series ( const std::complex< double > &  z)

Abramawitz and Stegun: Eq. (7.1.5) gives a series for erf(z) good for all z, but converges faster for smallish abs(z), say abs(z) < 2.

Definition at line 191 of file error.cpp.

References abs(), min(), pi, and sqrt().

Referenced by erf().

std::complex<double> itpp::cerf_rybicki ( const std::complex< double > &  z)

Numerical Recipes quotes a formula due to Rybicki for evaluating Dawson's Integral:

exp(-x^2) integral exp(t^2).dt = 1/sqrt(pi) lim sum exp(-(z-n.h)^2) / n 0 to x h->0 n odd

This can be adapted to erf(z).

Definition at line 215 of file error.cpp.

References exp(), and pi.

Referenced by erf().

int itpp::reverse_int ( int  length,
int  in 
) [related]

Reverses the bitrepresentation of in (of size length) and converts to an integer

Definition at line 1439 of file convcode.cpp.

Referenced by itpp::Rec_Syst_Conv_Code::set_generator_polynomials().

int itpp::weight_int ( int  length,
int  in 
) [related]

Calculate the Hamming weight of the binary representation of in of size length

Definition at line 1457 of file convcode.cpp.

int itpp::compare_spectra ( ivec  v1,
ivec  v2 
) [related]

Compare two distance spectra. Return 1 if v1 is less, 0 if v2 less, and -1 if equal.

Definition at line 1469 of file convcode.cpp.

int itpp::compare_spectra ( ivec  v1,
ivec  v2,
vec  weight_profile 
) [related]

Compare two distance spectra using a weight profile.

Return 1 if v1 is less, 0 if v2 less, and -1 if equal.

Definition at line 1489 of file convcode.cpp.

std::ostream& itpp::operator<< ( std::ostream &  os,
const GF &  ingf 
)

Output stream operator for GF.

Output stream for GF(q)

Definition at line 93 of file galois.cpp.

std::ostream& itpp::operator<< ( std::ostream &  os,
const GFX &  ingfx 
)

Output stream operator for GFX.

Output stream.

Definition at line 103 of file galois.cpp.

GFX itpp::operator* ( const GF &  ingf,
const GFX &  ingfx 
) [inline]

Multiplication of GF and GFX.

Multiply a GF element with a GF(q)[x].

Definition at line 531 of file galois.h.

References itpp::GF::get_size(), and it_assert_debug.

GFX itpp::operator* ( const GFX &  ingfx,
const GF &  ingf 
) [inline]

Multiplication of GFX and GF.

Multiply a GF(q)[x] with a GF element.

Definition at line 540 of file galois.h.

GFX itpp::operator/ ( const GFX &  ingfx,
const GF &  ingf 
) [inline]

Division of GFX by GF.

Divide a GF(q)[x] with a GF element.

Definition at line 545 of file galois.h.

References itpp::GF::get_size(), and it_assert_debug.

std::ostream & operator<< ( std::ostream &  os,
const LDPC_Code &  C 
)
std::ostream & operator<< ( std::ostream &  os,
const Modulator_NRD &  mod 
)

Print some properties of the MIMO modulator (mainly to aid debugging)

Output some properties of the MIMO modulator (mainly to aid debugging)

Definition at line 329 of file modulator_nd.cpp.

References itpp::Modulator_ND::bitmap, itpp::Modulator_ND::get_llrcalc(), itpp::Modulator_ND::k, itpp::Array< T >::left(), itpp::Modulator_ND::M, itpp::Modulator_ND::nt, and itpp::Modulator_NRD::symbols.

const Fix_Factory itpp::UFIX1 ( ,
US  ,
WRAP   
)

Fix_Factories for unsigned Fix/CFix with wrap-around (UFIX1, UFIX2, ..., UFIX64)

const Fix_Factory itpp::SFIX1 ( ,
TC  ,
SAT   
)

Fix_Factories for unsigned Fix/CFix with wrap-around (SFIX1, SFIX2, ..., SFIX64)

const Fix_Factory itpp::SUFIX1 ( ,
US  ,
SAT   
)

Fix_Factories for unsigned Fix/CFix with saturation (SUFIX1, SUFIX2, ..., SUFIX64)

void itpp::MOG_diag_MAP ( MOG_diag &  model_in,
MOG_diag &  prior_model_in,
Array< vec > &  X_in,
int  max_iter_in = 10,
double  alpha_in = 0.5,
double  var_floor_in = 0.0,
double  weight_floor_in = 0.0,
bool  verbose_in = false 
)

NOT YET IMPLEMENTED. Maximum a Posteriori (MAP) Expectation Maximisation optimiser for Mixtures of Gaussians.

Parameters:
model_inThe model to optimise (MOG_diag)
prior_model_inThe model representing the prior
X_inThe training data (array of vectors)
max_iter_inMaximum number of iterations
alpha_inCoefficient for combining the parameters with the prior. 0 <= _alpha <= 1.
var_floor_inVariance floor (lowest allowable variance). Set to 0.0 to use the default.
weight_floor_inWeight floor (lowest allowable weight). Set to 0.0 to use the default.
verbose_inADD DOCUMENTATION HERE
Note:
NOT YET IMPLEMENTED.
The variance and weight floors are set to std::numeric_limits<double>::min() if they are below that value. The largest allowable weight floor is 1/K, where K is the number of Gaussians.

Definition at line 323 of file mog_diag_em.cpp.

References it_error.


Variable Documentation

Initial value:
 {
  {0, 0},
  {0, 0},
  {0, 0},
  {05, 07},
  {015, 017},
  {023, 035},
  {053, 075},
  {0133, 0171},
  {0247, 0371},
  {0561, 0753},
  {01167, 01545},
  {02335, 03661},
  {04335, 05723},
  {010533, 017661},
  {021675, 027123},
}

\

Definition at line 268 of file convcode.cpp.

int itpp::Conv_Code_MFD_3[15][3]
Initial value:
 {
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {05, 07, 07},
  {013, 015, 017},
  {025, 033, 037},
  {047, 053, 075},
  {0133, 0145, 0175},
  {0225, 0331, 0367},
  {0557, 0663, 0711},
  {0117, 01365, 01633},
  {02353, 02671, 03175},
  {04767, 05723, 06265},
  {010533, 010675, 017661},
  {021645, 035661, 037133},
}

Definition at line 287 of file convcode.cpp.

int itpp::Conv_Code_MFD_4[15][4]
Initial value:
 {
  {0, 0, 0, 0},
  {0, 0, 0, 0},
  {0, 0, 0, 0},
  {05, 07, 07, 07},
  {013, 015, 015, 017},
  {025, 027, 033, 037},
  {053, 067, 071, 075},
  {0135, 0135, 0147, 0163},
  {0235, 0275, 0313, 0357},
  {0463, 0535, 0733, 0745},
  {0117, 01365, 01633, 01653},
  {02327, 02353, 02671, 03175},
  {04767, 05723, 06265, 07455},
  {011145, 012477, 015573, 016727},
  {021113, 023175, 035527, 035537},
}

Definition at line 306 of file convcode.cpp.

int itpp::Conv_Code_MFD_5[9][5]
Initial value:
 {
  {0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0},
  {07, 07, 07, 05, 05},
  {017, 017, 013, 015, 015},
  {037, 027, 033, 025, 035},
  {075, 071, 073, 065, 057},
  {0175, 0131, 0135, 0135, 0147},
  {0257, 0233, 0323, 0271, 0357},
}

Definition at line 326 of file convcode.cpp.

int itpp::Conv_Code_MFD_6[9][6]
Initial value:
 {
  {0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0},
  {07, 07, 07, 07, 05, 05},
  {017, 017, 013, 013, 015, 015},
  {037, 035, 027, 033, 025, 035},
  {073, 075, 055, 065, 047, 057},
  {0173, 0151, 0135, 0135, 0163, 0137},
  {0253, 0375, 0331, 0235, 0313, 0357},
}

Definition at line 339 of file convcode.cpp.

int itpp::Conv_Code_MFD_7[9][7]
Initial value:
 {
  {0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0},
  {07, 07, 07, 07, 05, 05, 05},
  {017, 017, 013, 013, 013, 015, 015},
  {035, 027, 025, 027, 033, 035, 037},
  {053, 075, 065, 075, 047, 067, 057},
  {0165, 0145, 0173, 0135, 0135, 0147, 0137},
  {0275, 0253, 0375, 0331, 0235, 0313, 0357},
}

Definition at line 352 of file convcode.cpp.

int itpp::Conv_Code_MFD_8[9][8]
Initial value:
 {
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {07, 07, 05, 05, 05, 07, 07, 07},
  {017, 017, 013, 013, 013, 015, 015, 017},
  {037, 033, 025, 025, 035, 033, 027, 037},
  {057, 073, 051, 065, 075, 047, 067, 057},
  {0153, 0111, 0165, 0173, 0135, 0135, 0147, 0137},
  {0275, 0275, 0253, 0371, 0331, 0235, 0313, 0357},
}

Definition at line 365 of file convcode.cpp.

int itpp::Conv_Code_ODS_2[17][2]
Initial value:
 {
  {0, 0},
  {0, 0},
  {0, 0},
  {05, 07},
  {015, 017},
  {023, 035},
  {053, 075},
  {0133, 0171},
  {0247, 0371},
  {0561, 0753},
  {01151, 01753},
  {03345, 03613},
  {05261, 07173},
  {012767, 016461},
  {027251, 037363},
  {063057, 044735},
  {0126723, 0152711},
}

Definition at line 446 of file convcode.cpp.

int itpp::Conv_Code_ODS_3[14][3]
Initial value:
 {
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {05, 07, 07},
  {013, 015, 017},
  {025, 033, 037},
  {047, 053, 075},
  {0133, 0165, 0171},
  {0225, 0331, 0367},
  {0575, 0623, 0727},
  {01233, 01375, 01671},
  {02335, 02531, 03477},
  {05745, 06471, 07553},
  {013261, 015167, 017451},
}

Definition at line 467 of file convcode.cpp.

int itpp::Conv_Code_ODS_4[12][4]
Initial value:
 {
  {0, 0, 0, 0},
  {0, 0, 0, 0},
  {0, 0, 0, 0},
  {05, 05, 07, 07},
  {013, 015, 015, 017},
  {025, 027, 033, 037},
  {051, 055, 067, 077},
  {0117, 0127, 0155, 0171},
  {0231, 0273, 0327, 0375},
  {0473, 0513, 0671, 0765},
  {01173, 01325, 01467, 01751},
  {02565, 02747, 03311, 03723},
}

Definition at line 485 of file convcode.cpp.

std::string itpp::crccode[18][2]
Initial value:
 {
  {"CRC-4", "1 1 1 1 1"},
  {"CRC-7", "1 1 0 1 0 0 0 1"},
  {"CRC-8", "1 1 1 0 1 0 1 0 1"},
  {"CRC-12", "1 1 0 0 0 0 0 0 0 1 1 1 1"},
  {"CRC-24", "1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1"},
  {"CRC-32", "1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 1 1 0 0 0 1 0"},
  {"CCITT-4", "1 0 0 1 1"},
  {"CCITT-5", "1 1 0 1 0 1"},
  {"CCITT-6", "1 0 0 0 0 1 1"},
  {"CCITT-16", "1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1"},
  {"CCITT-32", "1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 1"},
  {"WCDMA-8", "1 1 0 0 1 1 0 1 1"},
  {"WCDMA-12", "1 1 0 0 0 0 0 0 0 1 1 1 1"},
  {"WCDMA-16", "1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1"},
  {"WCDMA-24", "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1"},
  {"ATM-8", "1 0 0 0 0 0 1 1 1"},
  {"ANSI-16", "1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1"},
  {"SDLC-16", "1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 1 1"},
}

\

Definition at line 47 of file crc.cpp.

Referenced by itpp::CRC_Code::set_code().

const int itpp::LDPC_binary_file_version = 2 [static]

Version of the binary file with generator and decoder data.

This has to be global since it is used in LDPC_Generator and LDPC_Code classes

Definition at line 43 of file ldpc.cpp.

Referenced by itpp::BLDPC_Generator::load(), itpp::LDPC_Generator_Systematic::load(), itpp::LDPC_Code::load_code(), itpp::BLDPC_Generator::save(), itpp::LDPC_Generator_Systematic::save(), and itpp::LDPC_Code::save_code().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SourceForge Logo

Generated on Wed Feb 9 2011 13:47:27 for IT++ by Doxygen 1.7.3