Home Original page

SimpleWeightMatrix (biojava-legacy 1.9.5 API)

  • java.lang.Object
    • org.biojava.bio.dp.SimpleWeightMatrix
  • All Implemented Interfaces:
    Serializable, WeightMatrix

    public class SimpleWeightMatrix
    extends Object
    implements WeightMatrix, Serializable
    Author:
    Matthew Pocock
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleWeightMatrix​(Distribution[] columns)  
      SimpleWeightMatrix​(Alphabet alpha, int columns, DistributionFactory dFact)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int columns()

      The number of columns modeled by the weight matrix.

      boolean equals​(Object o)  
      Alphabet getAlphabet()

      The alphabet for the sequences that this weight matrix models.

      Distribution getColumn​(int column)

      Retrieve a column as an EmissionState.

      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleWeightMatrix

        public SimpleWeightMatrix​(Alphabet alpha,
                                  int columns,
                                  DistributionFactory dFact)
                           throws IllegalAlphabetException
        Throws:
        IllegalAlphabetException
      • SimpleWeightMatrix

        public SimpleWeightMatrix​(Distribution[] columns)
                           throws IllegalAlphabetException
        Throws:
        IllegalAlphabetException
    • Method Detail

      • getAlphabet

        public Alphabet getAlphabet()

        The alphabet for the sequences that this weight matrix models.

        Specified by:
        getAlphabet in interface WeightMatrix
        Returns:
        the Alphabet
      • columns

        public int columns()

        The number of columns modeled by the weight matrix.

        Specified by:
        columns in interface WeightMatrix
        Returns:
        the number of columns
      • getColumn

        public Distribution getColumn​(int column)

        Retrieve a column as an EmissionState.

        To find the emission probability for Symbol sym at column col use: wm.getColumn(col).getWeight(sym).

        Specified by:
        getColumn in interface WeightMatrix
        Parameters:
        column - the weight matrix column to retrieve
        Returns:
        the EmissionState that represents the individual column
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class Object