Package io.github.nhtc2005.alns.memory
Interface SolutionKey<K,S extends Solution<S>>
- Type Parameters:
K- the key typeS- the solution type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Extracts a key identifying a solution's structure, independently of its objective value.
-
Method Summary
-
Method Details
-
keyOf
Returns a key without modifying the solution.Key equality must represent solution identity. The key's equality and hash code must remain stable while stored; snapshot mutable solution data rather than returning a live reference.
- Parameters:
solution- the non-null solution to identify- Returns:
- a non-null key with stable
equalsandhashCodebehavior
-