function offset(a,b,va,vb) {
				return abOffset[a * N + b] + va * params[b].n + vb;
			}
Helper that calculates the offset into the occurs array
for a given combination of a,b and the values of a and b.