org.aisb.bio.tools
Class SimilarityMatrixComparator
java.lang.Object
org.aisb.bio.tools.MonomerComparator
org.aisb.bio.tools.SimilarityMatrixComparator
- public class SimilarityMatrixComparator
- extends MonomerComparator
This is a simple implementation of a similarity matrix for
comparing monomers. Today, it only works for amino acids.
- Author:
- Doug DeJulio
Field Summary |
int[][] |
value
|
Method Summary |
int |
compare(Monomer m1,
Monomer m2)
|
void |
loadFromFile(java.io.File file)
Initialize the matrix from a given file. |
void |
loadFromFile(java.lang.String fileName)
For convenience, initialize the matrix from a file with the given name. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
public int[][] value
SimilarityMatrixComparator
public SimilarityMatrixComparator()
loadFromFile
public void loadFromFile(java.io.File file)
throws java.io.IOException
- Initialize the matrix from a given file.
- Parameters:
file
- The file from which to load.
- Throws:
java.io.IOException
loadFromFile
public void loadFromFile(java.lang.String fileName)
throws java.io.IOException
- For convenience, initialize the matrix from a file with the given name.
- Parameters:
fileName
- The name of the file from which to load.
- Throws:
java.io.IOException
compare
public int compare(Monomer m1,
Monomer m2)
- Specified by:
compare
in class MonomerComparator