Decodes an object from an integer-based encoding.
decode(x, x_type = type(x)) decode_pc_set(x) decode_pc_chord_type(x) decode_pc_chord(x)
x | Object to decode. |
---|---|
x_type | (Character scalar)
The type that |
decode
returns an object of class vec
;
the other functions return integer vectors.
The decode
function is vectorised and uses precomputed encodings.
The following functions represent alternative implementations
that are not vectorised and do not rely on precomputed encodings:
decode_pc_set
decode_pc_chord_type
decode_pc_chord
encode
for the reverse operation.