Changeset 766 for trunk/yat/classifier
- Timestamp:
- Feb 22, 2007, 4:11:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookup1D.cc
r720 r766 25 25 #include "DataLookup2D.h" 26 26 #include "MatrixLookup.h" 27 28 #include "yat/utility/matrix.h" 29 #include "yat/utility/vector.h" 27 30 28 31 #include <cassert> … … 54 57 matrix_(other.matrix_), owner_(false) 55 58 { 59 } 60 61 62 DataLookup1D::DataLookup1D(const utility::vector& v, 63 const std::vector<size_t>& index) 64 : column_vector_(true), index_(0), owner_(true) 65 { 66 utility::matrix* m = new utility::matrix(1,index.size()); 67 for (size_t i=0; i<index.size(); ++i){ 68 assert(index[i]<v.size()); 69 (*m)(0,i)=v(index[i]); 70 } 71 matrix_ = new MatrixLookup(*m, true); 56 72 } 57 73
Note: See TracChangeset
for help on using the changeset viewer.