com.wcohen.ss
Class MemoMatrix

java.lang.Object
  extended by com.wcohen.ss.MemoMatrix
Direct Known Subclasses:
AffineGap.MatrixTrio, AffineGap.MatrixTrio.InsertSMatrix, AffineGap.MatrixTrio.InsertTMatrix, ApproxMemoMatrix

public abstract class MemoMatrix
extends java.lang.Object

A matrix of doubles, defined recursively by the compute(i,j) method, that will not be recomputed more than necessary.


Field Summary
protected  java.lang.String cellFormat
           
protected  boolean printNegativeValues
           
protected  StringWrapper s
           
protected  StringWrapper t
           
 
Method Summary
protected static double max3(double x, double y, double z)
          Return max of three numbers.
protected static double max4(double w, double x, double y, double z)
          Return max of four numbers.
protected  char sAt(int i)
          Get i-th char of s, indexing s from 1..n
protected  char tAt(int i)
          Get i-th char of t, indexing s from 1..n
 java.lang.String toString()
          Print the matrix, for debugging and/or explanation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

protected StringWrapper s

t

protected StringWrapper t

cellFormat

protected java.lang.String cellFormat

printNegativeValues

protected boolean printNegativeValues
Method Detail

sAt

protected final char sAt(int i)
Get i-th char of s, indexing s from 1..n


tAt

protected final char tAt(int i)
Get i-th char of t, indexing s from 1..n


toString

public java.lang.String toString()
Print the matrix, for debugging and/or explanation.

Overrides:
toString in class java.lang.Object

max3

protected static final double max3(double x,
                                   double y,
                                   double z)
Return max of three numbers.


max4

protected static final double max4(double w,
                                   double x,
                                   double y,
                                   double z)
Return max of four numbers.