Description Usage Arguments Details Value Examples
This function is a helper function which helps the user to create different permutation
vectors. With the argument type
the user can choose one of 6 different interleaver types.
Some interleaver need additional informations in the args
argument.
1 2 | TurboGetPermutation(message.length, coder.info, type = "RANDOM",
args = NULL, visualize = FALSE)
|
message.length |
Length of message which will be encoded. |
coder.info |
Coder which will be used for encoding and decoding. |
type |
Type of the interleaver, possibilities: RANDOM, PRIMITIVE, CYCLIC, BLOCK HELICAL, DIAGONAL. |
args |
Arguments for some interleaver. (must be a list) |
visualize |
Flag to visualize the resulting permutation matrix/vector. |
RANDOM: Creates a random permutation vector. No arguments in args
.
PRIMITIVE: Shift the initial vector (c(1,2,3,...)
) so that the args$root
value is the index of the 1.
CYCLIC: Creates a initial matrix with the arguments args$cols
, args$rows
and shift each row of the matrix by the index of the row multiplied by the args$distance
.
The resulting permutation vector is read out from top to bottom from each column of the matrix.
BLOCK: This is a type of interleaver in which the bits are read in from left to right in each row from the matrix
and read out from top to bottom each column. With the arguments args$cols
, args$rows
the user can change the matrix size.
HELICAL: This is a type of interleaver in which the bits are read in from left to right in each row from the matrix
and read out from left top to bottom right. When the last row of the matrix is arrived
then the next bit is read out from the first row but from the next column. With the arguments args$cols
, args$rows
the user can change the matrix size.
DIAGNOAL: The difference to the HELICAL interleaver is that when the last row is arrived
the next bit is in the first row and the first unused column. With the arguments args$cols
, args$rows
the user can change the matrix size.
Created permutation vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | input <- c(1,0,1,1,0,1)
coder <- ConvGenerateRscEncoder(2, 2, c(5, 7))
#RANDOM
permutation <- TurboGetPermutation(length(input), coder, "RANDOM")
#PRIMITIV
permutation <- TurboGetPermutation(length(input), coder, "PRIMITIVE", list(root=2))
#CYCLIC
permutation <- TurboGetPermutation(length(input), coder, "CYCLIC", list(cols=2, rows=4, distance=2))
#BLOCK
permutation <- TurboGetPermutation(length(input), coder, "BLOCK", list(cols=2, rows=4))
#HELICAL
permutation <- TurboGetPermutation(length(input), coder, "HELICAL", list(cols=2, rows=4))
#DIAGONAL
permutation <- TurboGetPermutation(length(input), coder, "DIAGONAL", list(cols=2, rows=4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.