public StandardCodesFactory(IDecoder decoder, IListDecoder listDecoder) { if (decoder == null) { throw new ArgumentNullException(nameof(decoder)); } if (listDecoder == null) { throw new ArgumentNullException(nameof(listDecoder)); } _decoder = decoder; _listDecoder = listDecoder; }
public StandardCodesFactory(IGeneratingPolynomialsBuilder generatingPolynomialsBuilder, IDecoder decoder, IListDecoder listDecoder) { if (generatingPolynomialsBuilder == null) { throw new ArgumentNullException(nameof(generatingPolynomialsBuilder)); } if (decoder == null) { throw new ArgumentNullException(nameof(decoder)); } if (listDecoder == null) { throw new ArgumentNullException(nameof(listDecoder)); } _generatingPolynomialsBuilder = generatingPolynomialsBuilder; _decoder = decoder; _listDecoder = listDecoder; }
internal StandardReedSolomonCode( GaloisField field, int codewordLength, int informationWordLength, IDecoder decoder, IListDecoder listDecoder) { Field = field; CodewordLength = codewordLength; InformationWordLength = informationWordLength; CodeDistance = CodewordLength - InformationWordLength + 1; _decoder = decoder; _listDecoder = listDecoder; _preparedPoints = Enumerable.Range(0, CodewordLength) .Select(x => Field.CreateElement(Field.GetGeneratingElementPower(x))) .ToArray(); _maxListDecodingRadius = (int)Math.Ceiling(CodewordLength - Math.Sqrt(CodewordLength * (CodewordLength - CodeDistance)) - 1); }
internal FixedDistanceWaveletCode( int codewordLength, int informationWordLength, int codeDistance, Polynomial generatingPolynomial, IDecoder decoder, IListDecoder listDecoder) { Field = generatingPolynomial.Field; CodewordLength = codewordLength; InformationWordLength = informationWordLength; CodeDistance = codeDistance; _generatingPolynomial = generatingPolynomial; _decoder = decoder; _listDecoder = listDecoder; _modularPolynomial = new Polynomial(Field, 1).RightShift(CodewordLength) + new Polynomial(Field, Field.InverseForAddition(1)); _preparedPoints = Enumerable.Range(0, CodewordLength) .Select(x => Field.CreateElement(Field.GetGeneratingElementPower(x))) .ToArray(); _maxListDecodingRadius = (int)Math.Ceiling(CodewordLength - Math.Sqrt(CodewordLength * (CodewordLength - CodeDistance)) - 1); }