Changeset 77

Show
Ignore:
Timestamp:
11/27/06 23:59:54 (2 years ago)
Author:
t
Message:

literal C++ translation of nway.py ;)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/paircomp/lib/Makefile

    r11 r77  
    1212 
    1313COMMON_OBJS=MutableComparison.o ImmutableComparison.o \ 
    14         algorithms.o algorithms2.o 
     14        algorithms.o algorithms2.o NwayComparison.o 
    1515 
    1616libpaircomp.a: $(COMMON_OBJS) 
  • trunk/paircomp/lib/Makefile.deps

    r42 r77  
    2323MutableComparison.o: MutableComparison.hh Match.hh /usr/include/assert.h 
    2424MutableComparison.o: Comparison.hh 
     25NwayComparison.o: NwayComparison.hh ImmutableComparison.hh Comparison.hh 
     26NwayComparison.o: MutableComparison.hh Match.hh /usr/include/assert.h 
     27NwayComparison.o: /usr/include/features.h /usr/include/sys/cdefs.h 
     28NwayComparison.o: /usr/include/gnu/stubs.h 
    2529algorithms.o: /usr/include/ctype.h /usr/include/features.h 
    2630algorithms.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 
  • trunk/paircomp/tests/nway.py

    r75 r77  
    149149            o = o * path[i].orient 
    150150 
     151        if o == -1: 
     152            bot_pos = int(bot_pos) + self.windowsize - 1 
     153 
    151154        # retrieve the actual comparison & matches 
    152155        cmp = self.cmps[from_seq][to_seq] 
     
    157160        for m in matches: 
    158161            bot = m.bot 
    159  
    160             # correct for orientation 
    161             if o == -1: 
    162                 bot = bot - self.windowsize + 1 
    163162 
    164163            # if we find one, we're golden! 
     
    318317        assert p == p2 
    319318 
     319    if run_all: 
     320        print 'ran all tests' 
     321 
    320322if __name__ == '__main__': 
    321323    test()