Changeset 533


Ignore:
Timestamp:
Mar 3, 2006, 11:29:56 AM (16 years ago)
Author:
Peter
Message:

test for MatrixLookup?. NOTE: consensus_inputranker_test still fails

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/classifier/DataLookup1D.h

    r527 r533  
    2525
    2626    ///
    27     /// Constructor
     27    /// Constructor.
    2828    ///
    29     DataLookup1D(const DataLookup2D&, const size_t,
     29    /// @parameter row_vector if true (default) DataLookup1D is
     30    /// looking into a column of DataLookup2D, otherwise looking into
     31    /// a row.  @parameter index which row/column to look into.
     32    ///
     33    DataLookup1D(const DataLookup2D&, const size_t index,
    3034                 const bool row_vector=true);
    3135
  • trunk/lib/classifier/DataLookup2D.cc

    r531 r533  
    77namespace theplu {
    88namespace classifier {
    9 
    10 
    11   DataLookup2D::DataLookup2D()
    12   {
    13   }
    149
    1510
  • trunk/lib/classifier/DataLookup2D.h

    r531 r533  
    2222    /// Default constructor.
    2323    ///
    24     DataLookup2D(void);
     24    inline DataLookup2D(void) {};
    2525
    2626
  • trunk/lib/classifier/MatrixLookup.cc

    r531 r533  
    2626
    2727
    28   MatrixLookup::MatrixLookup(const MatrixLookup& ml,
    29                      const std::vector<size_t>& row,
    30                      const std::vector<size_t>& col)
    31     : DataLookup2D(ml,row,col), data_(ml.data_)
    32   {
    33   }
    34  
    35 
    36 
    3728  MatrixLookup::MatrixLookup(const gslapi::matrix& data,
    3829                     const std::vector<size_t>& index,
     
    5748  }
    5849
     50
     51
     52  MatrixLookup::MatrixLookup(const MatrixLookup& data,
     53                             const std::vector<size_t>& row,
     54                             const std::vector<size_t>& col)
     55    : DataLookup2D(data,row,col), data_(data.data_)
     56  {
     57  }
     58 
    5959
    6060
  • trunk/lib/classifier/MatrixLookup.h

    r527 r533  
    2424
    2525    ///
    26     /// Constructor
     26    /// Constructor creating a lookup into the whole matrix.
    2727    ///
    2828    explicit MatrixLookup(const gslapi::matrix&);
    2929
    3030    ///
    31     /// Constructor taking the row index vector and column index vector
    32     /// as input.
     31    /// Constructor creating a lookup into parts of matrix. The
     32    /// \f$i\f$th row in constructed lookup is identical to row number
     33    /// row[i] in matrix. The \f$i\f$th column in constructed lookup
     34    /// is identical to column number column[i] in matrix.
    3335    ///
    34     MatrixLookup(const gslapi::matrix&, const std::vector<size_t>&,
    35              const std::vector<size_t>&);
     36    MatrixLookup(const gslapi::matrix&, const std::vector<size_t>& row,
     37             const std::vector<size_t>& column);
    3638
    3739    ///
    38     /// Constructor taking the column (default) or row index vector
    39     /// as input.
     40    /// Constructor taking rows or columns
     41    ///
     42    /// @parameter row_vectors if true (default) the new MatrixLookup
     43    /// will look into a sub-matrix defined by all columns and rows
     44    /// defined by @a index. If not true the new MatrixLookup will
     45    /// look into a sub-matrix defined by all rows and columns defined
     46    /// by @a index.
    4047    ///
    41     MatrixLookup(const gslapi::matrix&, const std::vector<size_t>&,
    42              bool row=false);
     48    MatrixLookup(const gslapi::matrix&, const std::vector<size_t>& index,
     49                 const bool row_vectors=true);
    4350
    4451    ///
  • trunk/test/Makefile.am

    r518 r533  
    44
    55TESTS = alignment_test averager_test consensus_inputranker_test \
    6   crossvalidation_test ensemble_test inputranker_test kernel_test matrix_test \
     6  crossvalidation_test ensemble_test inputranker_test \
     7  kernel_test lookup_test matrix_test \
    78  ncc_test nni_test pca_test regression_test rnd_test score_test \
    89  statistics_test stl_utility_test svd_test svm_test target_test \
     
    2425inputranker_test_SOURCES = inputranker_test.cc
    2526kernel_test_SOURCES = kernel_test.cc
     27lookup_test_SOURCES = lookup_test.cc
    2628matrix_test_SOURCES = matrix_test.cc
    2729ncc_test_SOURCES = ncc_test.cc
Note: See TracChangeset for help on using the changeset viewer.