spread.h
Go to the documentation of this file.
#ifndef SPREAD_H
#define SPREAD_H
#include <itpp/base/vec.h>
#include <itpp/base/mat.h>
#include <itpp/itexports.h>
namespace itpp
{
class ITPP_EXPORT Spread_1d
{
public:
Spread_1d() { }
Spread_1d(const vec &incode);
void spread(const vec &symbols, vec &out);
vec spread(const vec &symbols) { vec out; spread(symbols, out); return out; }
void despread(const vec &rec_signal, vec &out, int timing);
vec despread(const vec &rec_signal, int timing)
{ vec out; despread(rec_signal, out, timing); return out; }
void set_code(const vec &incode);
vec get_code();
int get_period() { return N; }
protected:
vec code;
int N;
};
class ITPP_EXPORT Spread_2d
{
public:
Spread_2d() { }
Spread_2d(const vec &incodeI, const vec &incodeQ);
void spread(const cvec &symbols, cvec &out);
cvec spread(const cvec &symbols) { cvec out; spread(symbols, out); return out; }
void despread(const cvec &rec_signal, cvec &out, int timing);
cvec despread(const cvec &rec_signal, int timing)
{ cvec out; despread(rec_signal, out, timing); return out; }
void set_code(const vec &incodeI, const vec &incodeQ);
vec get_codeI();
vec get_codeQ();
int get_period() { return spreadI.get_period(); }
protected:
Spread_1d spreadI, spreadQ;
};
class ITPP_EXPORT Multicode_Spread_1d
{
public:
Multicode_Spread_1d() { }
Multicode_Spread_1d(const mat &incodes);
vec spread(const vec &symbols);
vec despread(const vec &receivedsignal, int timing);
void set_codes(const mat &incodes);
mat get_codes();
int get_period() { return N; }
int get_nocodes() { return L; }
protected:
mat codes;
int L;
int N;
};
class ITPP_EXPORT Multicode_Spread_2d
{
public:
Multicode_Spread_2d() { }
Multicode_Spread_2d(const mat &incodesI, const mat &incodesQ);
cvec spread(const cvec &symbols);
cvec despread(const cvec &receivedsignal, int timing);
void set_codes(const mat &incodesI, const mat &incodesQ);
mat get_codesI();
mat get_codesQ();
int get_period() { return mcspreadI.get_period(); }
protected:
Multicode_Spread_1d mcspreadI, mcspreadQ;
};
} // namespace itpp
#endif // #ifndef SPREAD_H
itpp::Array
General array class.
Definition array.h:105
itpp::Multicode_Spread_1d
Multicode spreading of float symbols.
Definition spread.h:200
itpp::Multicode_Spread_1d::get_period
int get_period()
Returns the spreading factor.
Definition spread.h:215
itpp::Multicode_Spread_1d::L
int L
The number of multi-codes.
Definition spread.h:222
itpp::Multicode_Spread_1d::N
int N
The spreading factor.
Definition spread.h:224
itpp::Multicode_Spread_1d::Multicode_Spread_1d
Multicode_Spread_1d()
Constructor.
Definition spread.h:203
itpp::Multicode_Spread_1d::get_nocodes
int get_nocodes()
Returns the number of multi-codes used.
Definition spread.h:217
itpp::Multicode_Spread_1d::codes
mat codes
The spreading codes used size ( )
Definition spread.h:220
itpp::Multicode_Spread_2d
Multicode spreading of complex symbols to complex output.
Definition spread.h:248
itpp::Multicode_Spread_2d::mcspreadI
Multicode_Spread_1d mcspreadI
Definition spread.h:274
itpp::Multicode_Spread_2d::Multicode_Spread_2d
Multicode_Spread_2d()
Constructor.
Definition spread.h:251
itpp::Multicode_Spread_2d::get_period
int get_period()
Returns the spreading factor.
Definition spread.h:270
itpp::Spread_1d
Spreading of float symbols to float output.
Definition spread.h:100
itpp::Spread_1d::despread
vec despread(const vec &rec_signal, int timing)
Despreading of signal. timing is the start position of the first symbol, given in number of samples.
Definition spread.h:117
itpp::Spread_1d::N
int N
The spreading factor.
Definition spread.h:129
itpp::Spread_1d::code
vec code
The spreading code.
Definition spread.h:127
itpp::Spread_1d::Spread_1d
Spread_1d()
Constructor.
Definition spread.h:103
itpp::Spread_1d::get_period
int get_period()
Get the period of the code (length of code vector).
Definition spread.h:124
itpp::Spread_1d::spread
vec spread(const vec &symbols)
Spreading of signal.
Definition spread.h:109
itpp::Spread_2d
Spreading of complex symbols to complex output.
Definition spread.h:153
itpp::Spread_2d::spreadI
Spread_1d spreadI
Definition spread.h:183
itpp::Spread_2d::spread
cvec spread(const cvec &symbols)
Spreading of signal.
Definition spread.h:162
itpp::Spread_2d::Spread_2d
Spread_2d()
Constructor.
Definition spread.h:156
itpp::Spread_2d::get_period
int get_period()
Get the period of the code (length of code vector).
Definition spread.h:179
itpp::Spread_2d::despread
cvec despread(const cvec &rec_signal, int timing)
Despreading of signal. timing is the start position of the first symbol, given in number of samples.
Definition spread.h:170
mat.h
Matrix Class Definitions.
itpp
itpp namespace
Definition itmex.h:37
vec.h
Templated Vector Class Definitions.

Generated on Mon Jun 10 2024 11:49:22 for IT++ by Doxygen 1.9.8