## org.biojava.bio.dp
Class SimpleWeightMatrix

    java.lang.Object
      |
      +--org.biojava.bio.dp.SimpleWeightMatrix

public class SimpleWeightMatrix
extends java.lang.Object
implements WeightMatrix, java.io.Serializable

See Also:
  Serialized Form

Constructor Summary
`SimpleWeightMatrix(Alphabet alpha, int columns, DistributionFactory dFact)`
`SimpleWeightMatrix(Distribution[] columns)`

Method Summary
`int` `columns()` The number of columns modeled by the weight matrix.
`Alphabet` `getAlphabet()` The alphabet for the sequences that this weight matrix models.
`Distribution` `getColumn(int column)` Retrieve a column as an EmissionState.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleWeightMatrix

    public SimpleWeightMatrix(Alphabet alpha,
                              int columns,
                              DistributionFactory dFact)
                       throws IllegalAlphabetException

### SimpleWeightMatrix

    public SimpleWeightMatrix(Distribution[] columns)
                       throws IllegalAlphabetException

Method Detail

### getAlphabet

    public Alphabet getAlphabet()

  Description copied from interface: WeightMatrix
  The alphabet for the sequences that this weight matrix models.
  Specified by:
    getAlphabet in interface WeightMatrix
  Tags copied from interface: WeightMatrix
  Returns:
    the Alphabet

### columns

    public int columns()

  Description copied from interface: WeightMatrix
  The number of columns modeled by the weight matrix.
  Specified by:
    columns in interface WeightMatrix
  Tags copied from interface: WeightMatrix
  Returns:
    the number of columns

### getColumn

    public Distribution getColumn(int column)

  Description copied from interface: WeightMatrix
  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
  Tags copied from interface: WeightMatrix
  Parameters:
    `column` - the weight matrix column to retrieve
  Returns:
    the EmissionState that represents the individual column
  Throws:
    java.lang.IndexOutOfBoundsException - if column is not between 0 and columns()-1