A generic library used for determining the longest sequence that a calculation on partially ordered sets meets a threshold value