Skip to content

Refactor SequenceDistanceMeasurer and SequenceDistanceMeasurerDouble into hierarchy #116

@cicirello

Description

@cicirello

The SequenceDistanceMeasurer and SequenceDistanceMeasurerDouble interfaces are closely related. Any implementation of the former (distances computed as ints) have a natural equivalent of the latter (computed as doubles). This is why there is an abstract base class (with private access) that implements both and is the base class for several of the distance metrics currently in the library. The only thing that abstract base class does, however, is implement the distancef methods of SequenceDistanceMeasurerDouble by delegating to the distance methods of SequenceDistanceMeasurer. i.e., it is really just providing default implementations of the distancef methods.

This Issue proposes to have SequenceDistanceMeasurer extend SequenceDistanceMeasurerDouble, and to move all of the distancef implementations from the existing abstract base class into SequenceDistanceMeasurer as default implementations. Once this is done the abstract base class can be removed. This is a non-breaking change because the abstract base class is currently private so only the library is affected. The classes currently extending that abstract base class will instead simply implement SequenceDistanceMeasurer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions