All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ggp.base.util.hashing.ZHashContext Maven / Gradle / Ivy

package org.ggp.base.util.hashing;

import java.util.Set;

import org.ggp.base.util.gdl.grammar.GdlSentence;

public interface ZHashContext {
	long getHashComponent(GdlSentence sentence);

	default long getHashForFullState(Set contents) {
		long hash = 0L;
		for (GdlSentence sentence : contents) {
			hash ^= getHashComponent(sentence);
		}
		return hash;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy