openModeller
Version 1.5.0
|
#include <Sample.hh>
Public Types | |
typedef Scalar * | iterator |
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 () | |
Sample & | operator= (const Sample &rhs) |
template<typename T > | |
Sample (const SExpr< T > &rhs) | |
template<typename T > | |
Sample & | operator= (const SExpr< T > &rhs) |
void | resize (std::size_t size) |
std::size_t | size () const |
void | setCategoricalThreshold (std::size_t index) |
Scalar & | operator[] (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 |
Sample & | operator+= (const Sample &) |
Sample & | operator+= (const Scalar &) |
Sample & | operator-= (const Sample &) |
Sample & | operator-= (const Scalar &) |
Sample & | operator*= (const Sample &) |
Sample & | operator*= (const Scalar &) |
Sample & | operator/= (const Sample &) |
Sample & | operator/= (const Scalar &) |
Sample & | operator&= (const Sample &) |
Sample & | operator|= (const Sample &) |
Sample & | sqr () |
Sample & | sqrt () |
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_ |
Scalar * | value_ |
std::size_t | start_ |
typedef Scalar const* Sample::const_iterator |
typedef Scalar* Sample::iterator |
Sample::Sample | ( | ) |
Definition at line 38 of file Sample.cpp.
|
explicit |
Sample::Sample | ( | std::size_t | size, |
Scalar | value | ||
) |
Definition at line 61 of file Sample.cpp.
References alloc(), size(), and value_.
Sample::Sample | ( | std::size_t | size, |
Scalar const * | values | ||
) |
Sample::Sample | ( | std::vector< Scalar > | values | ) |
Sample::Sample | ( | const Sample & | rhs | ) |
Sample::~Sample | ( | ) |
Definition at line 124 of file Sample.cpp.
References value_.
|
inline |
Definition at line 175 of file Sample.hh.
References operator=().
|
private |
Definition at line 199 of file Sample.cpp.
References size(), size_, start_, and value_.
Referenced by operator=(), and Sample().
|
inline |
Definition at line 87 of file Sample.hh.
Referenced by Regression::calculateParameters(), dotProduct(), LogitRule::getStrength(), EnvironmentImpl::getUnnormalizedInternal(), norm(), operator+=(), operator-=(), operator<<(), operator=(), operator>>(), sqr(), and sqrt().
|
inline |
|
private |
Definition at line 212 of file Sample.cpp.
References size(), and value_.
Referenced by operator=(), and Sample().
void Sample::dump | ( | ) | const |
Definition at line 274 of file Sample.cpp.
References Log::info(), Log::instance(), size_, and value_.
Referenced by OccurrenceImpl::dump().
|
inline |
Definition at line 88 of file Sample.hh.
Referenced by Regression::calculateParameters(), dotProduct(), LogitRule::getStrength(), norm(), operator+=(), operator-=(), operator<<(), operator=(), Sample(), sqr(), and sqrt().
|
inline |
bool Sample::equals | ( | const Sample & | rhs | ) | const |
Definition at line 249 of file Sample.cpp.
Referenced by SamplerImpl::environmentallyUnique(), SamplerImpl::isEnvironmentallyUnique(), operator!=(), and operator==().
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().
Definition at line 357 of file Sample.cpp.
Definition at line 305 of file Sample.cpp.
References begin(), end(), and start_.
Definition at line 331 of file Sample.cpp.
References begin(), end(), and start_.
Definition at line 384 of file Sample.cpp.
Scalar & Sample::operator[] | ( | std::size_t | index | ) |
Definition at line 221 of file Sample.cpp.
Scalar Sample::operator[] | ( | std::size_t | index | ) | const |
Definition at line 235 of file Sample.cpp.
void Sample::resize | ( | std::size_t | size | ) |
Definition at line 153 of file Sample.cpp.
References min(), size(), size_, start_, and value_.
Referenced by EnvironmentalDistance::_init_distance_type(), ConsensusAlgorithm::_setConfiguration(), NicheMosaic::computeMeanDeviation(), MeanVarianceNormalizer::computeNormalization(), ScaleNormalizer::computeNormalization(), Bioclim::computeStats(), EnvironmentImpl::getExtremes(), EnvironmentImpl::getUnnormalizedInternal(), DistanceToAverage::initialize(), MinimumDistance::initialize(), ConsensusAlgorithm::initialize(), and operator>>().
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().
|
inline |
Definition at line 70 of file Sample.hh.
Referenced by AquaMaps::_calculateEnvelopes(), RocCurve::_loadPredictions(), AquaMaps::_logEnvelope(), RfAlgorithm::_sampleToLine(), MinimumDistance::_setConfiguration(), EnvironmentalDistance::_setConfiguration(), Garp::_setConfiguration(), alloc(), ConfusionMatrix::calculate(), NicheMosaic::cleanOccurrences(), NicheMosaic::computeMeanDeviation(), Bioclim::computeStats(), copy(), Projector::createMap(), draw_occur(), VirtualNicheGenerator::dump(), OccurrenceImpl::environment(), get_values(), SamplerImpl::getPseudoAbsenceOutsideInterval(), SamplerImpl::getPseudoPresenceInsideInterval(), EnvironmentImpl::getRandom(), VirtualNicheGenerator::getValue(), Bioclim::getValue(), EnvelopeScore::getValue(), AquaMaps::getValue(), OpenModeller::getValue(), OccurrenceImpl::hasEnvironment(), VirtualNicheGenerator::iterate(), Bioclim::logEnvelope(), EnvelopeScore::logEnvelope(), main(), MeanVarianceNormalizer::normalize(), ScaleNormalizer::normalize(), operator<<(), resize(), Sample(), OccurrencesImpl::setEnvironment(), and ConfusionMatrix::setLowestTrainingThreshold().
Sample & Sample::sqr | ( | ) |
Definition at line 433 of file Sample.cpp.
References begin(), end(), and start_.
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().
|
private |
Definition at line 139 of file Sample.hh.
Referenced by alloc(), dump(), equals(), operator&=(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator[](), operator|=(), resize(), Sample(), and setCategoricalThreshold().
|
private |
Definition at line 142 of file Sample.hh.
Referenced by alloc(), dotProduct(), norm(), operator&=(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator|=(), resize(), setCategoricalThreshold(), sqr(), and sqrt().
|
private |
Definition at line 140 of file Sample.hh.
Referenced by alloc(), copy(), dump(), equals(), operator&=(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator[](), operator|=(), resize(), Sample(), and ~Sample().