itpp::Gold Class Reference
Communications Module » Sequences

Gold Sequences. More...

`#include <itpp/comm/sequence.h>`

## Public Member Functions

| Gold (int degree)
| Class constructor.
| Gold (const bvec &mseq1_connections, const bvec &mseq2_connections)
| Input connect_polynomials=1+g1*D+g2*D^2+...+gr*D^r in bvec format [g0,g1,...,gr].
| Gold (const ivec &mseq1_connections, const ivec &mseq2_connections)
| Input connect_polynomials=1+g1*D+g2*D^2+...+gr*D^r in octal format.
void | set_state (const bvec &state1, const bvec &state2)
| Set state (contents in the shift registers) in bvec format.
void | set_state (const ivec &state1, const ivec &state2)
| Set state (contents in the shift registers) in octal format.
bin | shift (void)
| Shift one step and output binary symbol.
bvec | shift (int no_shifts)
| Shift no_shifts steps and output bvec.
int | get_sequence_length (void)
| Returns the length (period) of a Gold-sequence.
bmat | get_family (void)
| Returns the code family.

## Detailed Description

Gold Sequences.

Definition at line 86 of file sequence.h.

## Constructor & Destructor Documentation

## Gold() [1/3]

itpp::Gold::Gold | ( | int | degree | ) |

Class constructor.

Automatic selection of a preferred pair of connections. Just give the degree where . Only one pair is available for each degree.

Definition at line 86 of file sequence.cpp.

References itpp::LFSR::get_length(), it_error, itpp::pow2i(), and itpp::LFSR::set_connections().

## Gold() [2/3]

itpp::Gold::Gold | ( | const bvec & | mseq1_connections,
|  | const bvec & | mseq2_connections
| ) |  |

Input connect_polynomials=1+g1*D+g2*D^2+...+gr*D^r in bvec format [g0,g1,...,gr].

Definition at line 114 of file sequence.cpp.

References itpp::LFSR::get_length(), it_assert, itpp::pow2i(), itpp::LFSR::set_connections(), and itpp::Array< T >::size().

## Gold() [3/3]

itpp::Gold::Gold | ( | const ivec & | mseq1_connections,
|  | const ivec & | mseq2_connections
| ) |  |

Input connect_polynomials=1+g1*D+g2*D^2+...+gr*D^r in octal format.

Definition at line 122 of file sequence.cpp.

References itpp::LFSR::get_length(), it_assert, itpp::pow2i(), and itpp::LFSR::set_connections().

## Member Function Documentation

## set_state() [1/2]

void itpp::Gold::set_state | ( | const bvec & | state1,
|  | const bvec & | state2
| ) |  |

Set state (contents in the shift registers) in bvec format.

Definition at line 130 of file sequence.cpp.

References itpp::LFSR::set_state().

Referenced by get_family().

## set_state() [2/2]

void itpp::Gold::set_state | ( | const ivec & | state1,
|  | const ivec & | state2
| ) |  |

Set state (contents in the shift registers) in octal format.

Definition at line 136 of file sequence.cpp.

References itpp::LFSR::set_state().

## shift() [1/2]

bin itpp::Gold::shift | ( | void |  | ) |

inline

Shift one step and output binary symbol.

Definition at line 129 of file sequence.h.

References itpp::LFSR::shift().

Referenced by shift().

## shift() [2/2]

bvec itpp::Gold::shift | ( | int | no_shifts | ) |

Shift no_shifts steps and output bvec.

Definition at line 142 of file sequence.cpp.

References it_assert, and shift().

## get_sequence_length()

int itpp::Gold::get_sequence_length | ( | void |  | ) |

inline

Returns the length (period) of a Gold-sequence.

Definition at line 130 of file sequence.h.

## get_family()

bmat itpp::Gold::get_family | ( | void |  | ) |

Returns the code family.

The Gold code family is defined by the two m-sequences (mseq1 and mseq2 ) and the sum of mseq1 and all time shifts of mseq2. The return matric thus contain N + 2 rows and N columns, where N is the length of the m-sequences.

Definition at line 152 of file sequence.cpp.

References itpp::concat(), itpp::dec2bin(), itpp::LFSR::get_length(), set_state(), and itpp::LFSR::shift().

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

- itpp/comm/sequence.h
- itpp/comm/sequence.cpp

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