Procedure from library classify.lib (see classify_lib).
classify.lib
Hcode(v); v=intvec
intvec, coding v according to the number of successive repetitions of an entry
Example:
LIB "classify.lib"; intvec v1 = 1,3,5,5,2; Hcode(v1); → 1,0,1,0,2,0,0,1,0 intvec v2 = 1,2,3,4,4,4,4,4,4,4,3,2,1; Hcode(v2); → 1,1,1,7,1,1,1