Skip to content

Commit

Permalink
added hash method
Browse files Browse the repository at this point in the history
  • Loading branch information
korffmo committed Jan 25, 2024
1 parent 8dfd914 commit 3dc7175
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 3dc7175

Please sign in to comment.