From 3dc71759b7f52e8c263808243ff8f44f54794553 Mon Sep 17 00:00:00 2001 From: korffmo Date: Thu, 25 Jan 2024 08:39:46 +0100 Subject: [PATCH] added hash method --- .../research/chem/descriptor/flexophore/PPNode.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/actelion/research/chem/descriptor/flexophore/PPNode.java b/src/main/java/com/actelion/research/chem/descriptor/flexophore/PPNode.java index d392df9f..4d463fd8 100644 --- a/src/main/java/com/actelion/research/chem/descriptor/flexophore/PPNode.java +++ b/src/main/java/com/actelion/research/chem/descriptor/flexophore/PPNode.java @@ -38,6 +38,7 @@ import com.actelion.research.calc.ArrayUtilsCalc; import com.actelion.research.chem.descriptor.flexophore.generator.ConstantsFlexophoreGenerator; import com.actelion.research.chem.interactionstatistics.InteractionAtomTypeCalculator; +import com.actelion.research.util.BurtleHasher; import java.util.ArrayList; import java.util.Collections; @@ -214,18 +215,19 @@ public boolean equals(Object o) { PPNode n = (PPNode)o; return equalAtoms(n); } - + + @Override + public int hashCode() { + return BurtleHasher.hashlittle(arrInteractionType, 13); + } + /** * May be called after finishing adding new interaction types. */ public void realize(){ - int sizeBytes = size * getNumBytesEntry(); - arrInteractionType = ArrayUtilsCalc.resize(arrInteractionType, sizeBytes); - sortInteractionTypes(); - calcHasHeteroAtom(); }