int QccChannelNormalize(QccChannel *channel);
int QccChannelDenormalize(QccChannel *channel);
QccChannelNormalize() provides the shifting of positive and negative symbols into nonnegative symbols. Assume that the channel symbols originally have range -N to N; consequently, channel->alphabet_size is 2*N + 1. QccChannelNormalize() adds channel->alphabet_size/2 to each symbol in channel->channel_symbols so the the range of the new symbols is 0 through channel->channel_symbols - 1. These new symbols can then be written to a CHN-format file with QccChannelWriteBlock(3) or QccChannelWriteWholefile(3) .
QccChannelDenormalize() performs the opposite action: channel->alphabet_size/2 is subtracted from each symbol in channel->channel_symbols so that the symbols are shifted back to their original range of -N to N. QccChannelDenormalize() would typically be called after QccChannelReadBlock(3) or QccChannelReadWholefile(3) .
Prior to calling these routines, channel->channel_length, channel->access_block_size, and channel->alphabet_size must contain valid values and channel->channel_symbols must be allocated to the appropriate size.