GrayCodePosition
Documentation for GrayCodePosition.
GrayCodePosition.GrayCode
GrayCodePosition.GrayCodePositions
GrayCodePosition.gray
GrayCodePosition.graytransient
GrayCodePosition.signedgraytransient
GrayCodePosition.GrayCode
— TypeGrayCode(n::Integer) Represents the Gray code over n
bits. n
must be positive. GrayCode implements iteration to generate all codewords.
GrayCodePosition.GrayCodePositions
— TypeGrayCodePositions[{signed::Bool}](code::GrayCode)
Represents the sequence of transient indices of a Gray code. The i
th transient index is the position of the bit of code[i]
that is flipped to obtain code[i+1]
. The entire sequence can be generated by iteration. The optional signed
type parameter (default false
) gives the signed transient sequence, a positive (negative) sign indicating the bit is set (reset).
Note: The returned transient indices are 1
-based.
GrayCodePosition.gray
— Methodgray(n::Integer)
Compute the n
th Gray codeword.
GrayCodePosition.graytransient
— Methodgraytransient(n::Integer)
Compute the n
th Gray code transient index, in 1
-based indexing.
GrayCodePosition.signedgraytransient
— Methodsignedgraytransient(n::Integer)
Compute the n
th signed Gray code transient index, in 1
-based indexing.