source: trunk/lib/classifier/MatrixView.cc @ 455

Last change on this file since 455 was 455, checked in by Markus Ringnér, 17 years ago

Adding classes to support general views of matrices (and kernels). Will be useful for cross-validation and ensembles of classifiers

File size: 572 bytes
Line 
1// $Id$
2
3#include <c++_tools/classifier/MatrixView.h>
4
5#include <vector>
6
7namespace theplu {
8namespace classifier {
9
10
11  MatrixView::MatrixView(const std::vector<size_t>& row, 
12                         const std::vector<size_t>& col)
13    : row_index_(row),column_index_(col)
14  {
15  }
16
17  MatrixView::MatrixView(const std::vector<size_t>& index, bool row)
18  {
19    if(row)
20      row_index_=index;
21    else
22      column_index_=index;
23  }
24
25 
26  MatrixView::MatrixView(const MatrixView& mv)
27    : row_index_(mv.row_index_),column_index_(mv.column_index_)
28  {
29  }
30
31
32}} // of namespace classifier and namespace theplu
Note: See TracBrowser for help on using the repository browser.