Skip to content

Commit

Permalink
More fingerprints need the getFingerprint comptability method.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Apr 1, 2017
1 parent 257fccc commit fe745dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Expand Up @@ -46,7 +46,7 @@
*
* @see org.openscience.cdk.fingerprint.Fingerprinter
*/
public class ExtendedFingerprinter implements IFingerprinter {
public class ExtendedFingerprinter extends Fingerprinter implements IFingerprinter {

private final int RESERVED_BITS = 25;

Expand Down
Expand Up @@ -80,7 +80,7 @@
* @cdk.githash
*
*/
public class ShortestPathFingerprinter extends RandomNumber implements IFingerprinter, Serializable {
public class ShortestPathFingerprinter extends AbstractFingerprinter implements IFingerprinter, Serializable {

/**
* The default length of created fingerprints.
Expand All @@ -94,6 +94,8 @@ public class ShortestPathFingerprinter extends RandomNumber implements IFingerpr
private static ILoggingTool logger = LoggingToolFactory
.createLoggingTool(ShortestPathFingerprinter.class);

private final RandomNumber rand = new RandomNumber();

/**
* Creates a fingerprint generator of length
* <code>DEFAULT_SIZE</code>
Expand Down Expand Up @@ -264,6 +266,6 @@ public ICountFingerprint getCountFingerprint(IAtomContainer iac) throws CDKExcep
* Returns a random number for a given object
*/
private int getRandomNumber(Integer hashValue) {
return generateMersenneTwisterRandomNumber(fingerprintLength, hashValue);
return rand.generateMersenneTwisterRandomNumber(fingerprintLength, hashValue);
}
}
Expand Up @@ -364,7 +364,7 @@
* @cdk.module fingerprint
* @cdk.githash
*/
public class SubstructureFingerprinter implements IFingerprinter {
public class SubstructureFingerprinter extends AbstractFingerprinter implements IFingerprinter {

private String[] smarts;

Expand Down

0 comments on commit fe745dc

Please sign in to comment.