23 template<
typename T >
class SExpr;
33 explicit Sample( std::size_t size );
43 Sample( std::vector<Scalar> );
58 template<
typename T >
inline
61 template<
typename T >
inline
67 void resize( std::size_t size );
70 inline std::size_t
size()
const {
return size_; }
76 void setCategoricalThreshold( std::size_t index );
79 Scalar& operator[]( std::size_t index );
82 Scalar operator[]( std::size_t index )
const;
95 bool equals(
const Sample& )
const;
144 void alloc( std::size_t size );
146 void copy( std::size_t size,
Scalar const * values );
170 return !lhs.
equals( rhs );
173 template<
typename T >
182 template<
typename T >
186 if ( this->
size_ != rhs.size() ) {
194 while ( meIter !=
end() ) {
dllexp std::istream & operator>>(std::istream &, Sample &)
const_iterator begin() const
double Scalar
Type of map values.
bool equals(const Sample &) const
dllexp bool operator==(const Sample &lhs, const Sample &rhs)
dllexp bool operator!=(const Sample &lhs, const Sample &rhs)
void alloc(std::size_t size)
const_iterator end() const
Scalar const * const_iterator
Sample & operator=(const Sample &rhs)
dllexp std::ostream & operator<<(std::ostream &, const Sample &)