story.scheherazade.analysis
Class NWAlignment

java.lang.Object
  extended by story.scheherazade.analysis.NWAlignment

public class NWAlignment
extends java.lang.Object

Perform Needleman-Wunch alignment on two stories.


Field Summary
static int GAP_PENALTY
           
static int PATH_END
           
static int PATH_HORIZONTAL_GAP
           
static int PATH_MATCH
           
static int PATH_VERTICAL_GAP
           
 
Constructor Summary
NWAlignment(double[][] scores, int[][] paths, java.util.Vector<SCHIntersection> story1, java.util.Vector<SCHIntersection> story2)
           
 
Method Summary
static NWAlignment alignNW(int story1, int story2, java.util.Vector<SCHIntersection> index1, java.util.Vector<SCHIntersection> index2, SCHIntersection[][] pairwise)
          Run a variation of the Needleman-Wunsch algorithm on two stories
 double overallScore()
           
 java.lang.StringBuffer render()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GAP_PENALTY

public static final int GAP_PENALTY
See Also:
Constant Field Values

PATH_END

public static final int PATH_END
See Also:
Constant Field Values

PATH_VERTICAL_GAP

public static final int PATH_VERTICAL_GAP
See Also:
Constant Field Values

PATH_HORIZONTAL_GAP

public static final int PATH_HORIZONTAL_GAP
See Also:
Constant Field Values

PATH_MATCH

public static final int PATH_MATCH
See Also:
Constant Field Values
Constructor Detail

NWAlignment

public NWAlignment(double[][] scores,
                   int[][] paths,
                   java.util.Vector<SCHIntersection> story1,
                   java.util.Vector<SCHIntersection> story2)
            throws Scheherexception
Throws:
Scheherexception
Method Detail

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Throws:
Scheherexception

overallScore

public double overallScore()

alignNW

public static NWAlignment alignNW(int story1,
                                  int story2,
                                  java.util.Vector<SCHIntersection> index1,
                                  java.util.Vector<SCHIntersection> index2,
                                  SCHIntersection[][] pairwise)
                           throws Scheherexception
Run a variation of the Needleman-Wunsch algorithm on two stories

Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.