final case class DiameterIndex(diameter: Double, index: Long)
A simplex carried purely as (diameter, combinatorial index) -- see the class doc above for why equality deliberately ignores diameter. Not private: it's the actual Chain cell type persistentCohomology() returns bars over, so callers need to be able to name the type (e.g. to decode a bar's cells back to Simplex[Int] via SimplexIndexing.apply(index, size) for display or cross-validation).
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.