Ignore:
Timestamp:
Dec 26, 2006, 7:21:36 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Fixes #170. Almost all inlines removed, some classes have no cc file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/DataLookup1D.cc

    r680 r720  
    4242  }
    4343 
     44
    4445  DataLookup1D::DataLookup1D(const size_t size, const double value)
    4546    : column_vector_(false), index_(0), owner_(true)
     
    4748    matrix_ = new MatrixLookup(1,size,value);
    4849  }
     50
    4951
    5052  DataLookup1D::DataLookup1D(const DataLookup1D& other)
     
    5456  }
    5557
     58
    5659  DataLookup1D::~DataLookup1D()
    5760  {
    5861    if (owner_)
    5962      delete matrix_;
     63  }
     64
     65
     66  size_t DataLookup1D::size(void) const
     67  {
     68    return column_vector_ ? matrix_->rows() : matrix_->columns();
     69  }
     70
     71
     72  double DataLookup1D::operator()(const size_t i) const
     73  {
     74    assert(i<size());
     75    return column_vector_ ? (*matrix_)(i,index_) : (*matrix_)(index_,i);
     76  }
     77
     78
     79  double DataLookup1D::operator[](const size_t i) const
     80  {
     81    return this->operator()(i);
    6082  }
    6183
Note: See TracChangeset for help on using the changeset viewer.