distanceMaxRelRDI function

Measure distance between current and previous state in terms of RDI