public abstract class SimpleFrameworkAssociation<T> extends Object implements FrameworkIndex<T>, Serializable
FrameworkIndex
with retrieval.Modifier | Constructor and Description |
---|---|
protected |
SimpleFrameworkAssociation()
Construct.
|
Modifier and Type | Method and Description |
---|---|
int |
frameworkIndex(int level,
T framework)
Retrieve or create a unique ID for a framework.
|
T |
getFrameworkForIndex(int index)
Get a stored framework.
|
ImmutableList<T> |
getFrameworks()
Get all frameworks.
|
protected abstract Map<T,Integer> |
getFrameworkToIndexMapping(int level)
Index mapping for a level.
|
protected abstract Map<T,Integer> getFrameworkToIndexMapping(int level)
level
- Cluster levelpublic int frameworkIndex(int level, T framework)
FrameworkIndex
frameworkIndex
in interface FrameworkIndex<T>
level
- Framework level. 0
used for the first (immediate) level. This parameter might be ignored.
A typical Bemis-Murcko clustering implementation will consider this parameter while a typical scaffold tree
clustering implementation will ignore it.framework
- The framework at given levelpublic T getFrameworkForIndex(int index)
index
- Index of clusterpublic ImmutableList<T> getFrameworks()