openModeller  Version 1.5.0
Sample Class Reference

#include <Sample.hh>

Collaboration diagram for Sample:
Collaboration graph

Public Types

typedef Scalariterator
 
typedef Scalar const * const_iterator
 

Public Member Functions

 Sample ()
 
 Sample (std::size_t size)
 
 Sample (std::size_t size, Scalar value)
 
 Sample (std::size_t size, Scalar const *values)
 
 Sample (std::vector< Scalar >)
 
 Sample (const Sample &rhs)
 
 ~Sample ()
 
Sampleoperator= (const Sample &rhs)
 
template<typename T >
 Sample (const SExpr< T > &rhs)
 
template<typename T >
Sampleoperator= (const SExpr< T > &rhs)
 
void resize (std::size_t size)
 
std::size_t size () const
 
void setCategoricalThreshold (std::size_t index)
 
Scalaroperator[] (std::size_t index)
 
Scalar operator[] (std::size_t index) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool equals (const Sample &) const
 
void dump () const
 
Sampleoperator+= (const Sample &)
 
Sampleoperator+= (const Scalar &)
 
Sampleoperator-= (const Sample &)
 
Sampleoperator-= (const Scalar &)
 
Sampleoperator*= (const Sample &)
 
Sampleoperator*= (const Scalar &)
 
Sampleoperator/= (const Sample &)
 
Sampleoperator/= (const Scalar &)
 
Sampleoperator&= (const Sample &)
 
Sampleoperator|= (const Sample &)
 
Samplesqr ()
 
Samplesqrt ()
 
Scalar norm () const
 
Scalar dotProduct (const Sample &rhs) const
 

Private Member Functions

void alloc (std::size_t size)
 
void copy (std::size_t size, Scalar const *values)
 

Private Attributes

std::size_t size_
 
Scalarvalue_
 
std::size_t start_
 

Detailed Description

Definition at line 25 of file Sample.hh.

Member Typedef Documentation

Definition at line 90 of file Sample.hh.

Definition at line 86 of file Sample.hh.

Constructor & Destructor Documentation

Sample::Sample ( )

Definition at line 38 of file Sample.cpp.

Sample::Sample ( std::size_t  size)
explicit
Sample::Sample ( std::size_t  size,
Scalar  value 
)

Definition at line 61 of file Sample.cpp.

References alloc(), size(), and value_.

Here is the call graph for this function:

Sample::Sample ( std::size_t  size,
Scalar const *  values 
)
Sample::Sample ( std::vector< Scalar values)

Definition at line 89 of file Sample.cpp.

References alloc(), end(), size_, and value_.

Here is the call graph for this function:

Sample::Sample ( const Sample rhs)

Definition at line 112 of file Sample.cpp.

References alloc(), copy(), size_, and value_.

Here is the call graph for this function:

Sample::~Sample ( )

Definition at line 124 of file Sample.cpp.

References value_.

template<typename T >
Sample::Sample ( const SExpr< T > &  rhs)
inline

Definition at line 175 of file Sample.hh.

References operator=().

Here is the call graph for this function:

Member Function Documentation

void Sample::alloc ( std::size_t  size)
private

Definition at line 199 of file Sample.cpp.

References size(), size_, start_, and value_.

Referenced by operator=(), and Sample().

Here is the call graph for this function:

const_iterator Sample::begin ( ) const
inline

Definition at line 91 of file Sample.hh.

void Sample::copy ( std::size_t  size,
Scalar const *  values 
)
private

Definition at line 212 of file Sample.cpp.

References size(), and value_.

Referenced by operator=(), and Sample().

Here is the call graph for this function:

Scalar Sample::dotProduct ( const Sample rhs) const

Definition at line 470 of file Sample.cpp.

References begin(), end(), norm(), and start_.

Here is the call graph for this function:

void Sample::dump ( ) const

Definition at line 274 of file Sample.cpp.

References Log::info(), Log::instance(), size_, and value_.

Referenced by OccurrenceImpl::dump().

Here is the call graph for this function:

const_iterator Sample::end ( ) const
inline

Definition at line 92 of file Sample.hh.

bool Sample::equals ( const Sample rhs) const
Scalar Sample::norm ( ) const

Definition at line 457 of file Sample.cpp.

References begin(), end(), and start_.

Referenced by EnvironmentalDistance::_distance(), dotProduct(), MinimumDistance::findDist(), and DistanceToAverage::getValue().

Here is the call graph for this function:

Sample & Sample::operator&= ( const Sample rhs)

Definition at line 397 of file Sample.cpp.

References min(), size_, start_, and value_.

Here is the call graph for this function:

Sample & Sample::operator*= ( const Sample rhs)

Definition at line 343 of file Sample.cpp.

References min(), size_, start_, and value_.

Here is the call graph for this function:

Sample & Sample::operator*= ( const Scalar rhs)

Definition at line 357 of file Sample.cpp.

References size_, start_, and value_.

Sample & Sample::operator+= ( const Sample rhs)

Definition at line 290 of file Sample.cpp.

References min(), size_, start_, and value_.

Here is the call graph for this function:

Sample & Sample::operator+= ( const Scalar rhs)

Definition at line 305 of file Sample.cpp.

References begin(), end(), and start_.

Here is the call graph for this function:

Sample & Sample::operator-= ( const Sample rhs)

Definition at line 317 of file Sample.cpp.

References min(), size_, start_, and value_.

Here is the call graph for this function:

Sample & Sample::operator-= ( const Scalar rhs)

Definition at line 331 of file Sample.cpp.

References begin(), end(), and start_.

Here is the call graph for this function:

Sample & Sample::operator/= ( const Sample rhs)

Definition at line 370 of file Sample.cpp.

References min(), size_, start_, and value_.

Here is the call graph for this function:

Sample & Sample::operator/= ( const Scalar rhs)

Definition at line 384 of file Sample.cpp.

References size_, start_, and value_.

Sample & Sample::operator= ( const Sample rhs)

Definition at line 132 of file Sample.cpp.

References alloc(), copy(), size_, start_, and value_.

Referenced by Sample().

Here is the call graph for this function:

template<typename T >
Sample & Sample::operator= ( const SExpr< T > &  rhs)
inline

Definition at line 184 of file Sample.hh.

References alloc(), begin(), end(), size_, and value_.

Here is the call graph for this function:

Scalar & Sample::operator[] ( std::size_t  index)

Definition at line 221 of file Sample.cpp.

References size_, and value_.

Scalar Sample::operator[] ( std::size_t  index) const

Definition at line 235 of file Sample.cpp.

References size_, and value_.

Sample & Sample::operator|= ( const Sample rhs)

Definition at line 415 of file Sample.cpp.

References min(), size_, start_, and value_.

Here is the call graph for this function:

void Sample::setCategoricalThreshold ( std::size_t  index)

Definition at line 191 of file Sample.cpp.

References min(), size_, and start_.

Referenced by EnvironmentImpl::getNormalized(), and OccurrenceImpl::normalize().

Here is the call graph for this function:

Sample & Sample::sqr ( )

Definition at line 433 of file Sample.cpp.

References begin(), end(), and start_.

Here is the call graph for this function:

Sample & Sample::sqrt ( )

Definition at line 445 of file Sample.cpp.

References begin(), end(), and start_.

Referenced by NicheMosaic::computeMeanDeviation(), MeanVarianceNormalizer::computeNormalization(), Bioclim::computeStats(), and VirtualNicheGenerator::iterate().

Here is the call graph for this function:

Member Data Documentation

std::size_t Sample::start_
private

The documentation for this class was generated from the following files: