Changeset 150

Show
Ignore:
Timestamp:
02/18/10 11:54:10 (5 months ago)
Author:
reed
Message:

begin to support matrix output

Location:
current/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • current/src/CMakeLists.txt

    r134 r150  
    4242  SET(PROJ_MACOSX_BUNDLE MACOSX_BUNDLE) 
    4343ENDIF(APPLE_BUNDLE_APP) 
     44 
     45SET(Boost_ADDITIONAL_VERSIONS 1.45 1.44 1.43 1.42 1.41) 
    4446 
    4547FIND_PACKAGE(Boost 1.34.0 REQUIRED COMPONENTS program_options) 
  • current/src/ngila.cpp

    r147 r150  
    2424#include <boost/foreach.hpp> 
    2525#include <boost/config.hpp> 
     26#include <boost/multi_array.hpp> 
    2627 
    2728#include "ngila_app.h" 
     
    167168        pair_vec pvec; 
    168169        string pairs_keys[] = { string("first"), string("all"), string("each") }; 
     170        seq_db::size_type table_size = mydb.size(); 
    169171        switch(key_switch(arg.pairs, pairs_keys)) 
    170172        { 
    171173        case 0: 
    172174                pvec.push_back(make_pair(0,1)); 
     175                table_size = 2; 
    173176                break; 
    174177        case 1: 
     
    186189        }; 
    187190         
    188         string format_keys[] = { string("aln"), string("fasta") }; 
     191        string format_keys[] = { string("aln"), string("fasta"), string("smat") /*,string("imat")*/ }; 
    189192        int out_format = 0; 
    190193        if(!arg.output.empty()) { 
     
    221224        } 
    222225         
     226        typedef boost::multi_array<float, 2> tabmat; 
     227        tabmat cost_table(boost::extents[table_size][table_size]); 
     228 
    223229        for(pair_vec::const_iterator cit = pvec.begin(); cit != pvec.end(); ++cit) 
    224230        {