PLearn 0.1
|
#include <PP.h>
Public Types | |
typedef T | element_type |
The type of the element this smart pointer points to. | |
Public Member Functions | |
PP () | |
empty constructor | |
PP (const T *the_ptr) | |
copie constructor with ordinary ptr | |
PP (const PP< T > &other) | |
copie constructor with same type PP | |
template<class U > | |
PP (const PP< U > &other) | |
copie constructor with other type PP | |
bool | isNull () const |
bool | isNotNull () const |
operator T * () const | |
conversion to ordinary ptr | |
T * | operator-> () const |
access to PPointable methods | |
T & | operator* () const |
access to the pointed object | |
PP< T > & | operator= (const T *otherptr) |
affectation operator to ordinary ptr | |
PP< T > & | operator= (const PP< T > &other) |
affectation operator to same type PP | |
bool | operator== (const PP< T > &other) const |
bool | operator== (const T *other) const |
~PP () | |
Protected Attributes | |
T * | ptr |
typedef T PLearn::PP< T >::element_type |
PLearn::PP< T >::PP | ( | ) | [inline] |
PLearn::PP< T >::PP | ( | const T * | the_ptr | ) | [inline] |
PLearn::PP< T >::PP | ( | const PP< T > & | other | ) | [inline] |
PLearn::PP< T >::PP | ( | const PP< U > & | other | ) | [inline, explicit] |
copie constructor with other type PP
this line is to make sure at compile time that U and T are compatible (one is a subclass of the other)
this line is to make sure at execution time that the true class of other.ptr is compatible with T, i.e. other.ptr is a T or a subclass of (otherwise return ptr = 0).
Note that dynamic_cast<T*>(const_cast<T*>(static_cast<const T*>((U*)other))) does not work properly (the dynamic_cast returns non-null when it should return 0, when the dynamic type is not correct).
PLearn::PP< T >::~PP | ( | ) | [inline] |
bool PLearn::PP< T >::isNotNull | ( | ) | const [inline] |
Definition at line 155 of file PP.h.
Referenced by PLearn::YMDDatedVMatrix::build_(), PLearn::TransformationLearner::build_(), PLearn::MultiMaxVariable::build_(), PLearn::LocalGaussianClassifier::build_(), PLearn::Kernel::computeGramMatrix(), PLearn::Kernel::computePartialGramMatrix(), PLearn::PLS::computeResidVariance(), PLearn::diff(), PLearn::LocallyMagnifiedDistribution::forget(), PLearn::BasisSelectionRegressor::forget(), PLearn::DiverseComponentAnalysis::getVarGradient(), PLearn::DiverseComponentAnalysis::getVarValue(), PLearn::Kernel::hasData(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::Optimizer::remote_optimizeN(), PLearn::RunCommand::run(), PLearn::MemoryCachedKernel::setDataForKernelMatrix(), PLearn::KNNClassifier::setTrainingSet(), PLearn::smartLoadObject(), PLearn::toObjectPtr(), and PLearn::LocallyMagnifiedDistribution::train().
{ return ptr!=0; }
bool PLearn::PP< T >::isNull | ( | ) | const [inline] |
Definition at line 152 of file PP.h.
Referenced by PLearn::VarArray::accumulateGradientFrom(), PLearn::VarArray::accumulateGradientTo(), PLearn::VarArray::accumulateTo(), PLearn::BasisSelectionRegressor::appendKernelFunctions(), PLearn::DeepReconstructorNet::build(), PLearn::VPLProcessor::build_(), PLearn::VPLPreprocessedLearner2::build_(), PLearn::VPLCombinedLearner::build_(), PLearn::VecStatsCollector::build_(), PLearn::TextSenseSequenceVMatrix::build_(), PLearn::PLearnerDiagonalKernel::build_(), PLearn::ObjectGenerator::build_(), PLearn::NeighborhoodBoxVolumeDensityEstimator::build_(), PLearn::LocallyMagnifiedDistribution::build_(), PLearn::KNNVMatrix::build_(), PLearn::InferenceRBM::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::EntropyContrast::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::BestAveragingPLearner::build_(), PLearn::PLearnerDiagonalKernel::computeGramMatrix(), PLearn::BasisSelectionRegressor::computeOutputFromFeaturevec(), PLearn::VarArray::copyFrom(), PLearn::VarArray::copyGradientFrom(), PLearn::VarArray::copyGradientTo(), PLearn::VarArray::copyMaxValueTo(), PLearn::VarArray::copyMinValueTo(), PLearn::VarArray::copyRValueFrom(), PLearn::VarArray::copyRValueTo(), PLearn::VarArray::copyTo(), PLearn::VVMatrix::createPreproVMat(), PLearn::deepCopy(), PLearn::diff(), PLearn::PLearnerDiagonalKernel::evaluate(), PLearn::DeepReconstructorNet::fineTuningFor1Epoch(), PLearn::SaltPepperNoiseVariable::fprop(), PLearn::RandomForcedValuesVariable::fprop(), PLearn::MultiSampleVariable::fprop(), PLearn::BernoulliSampleVariable::fprop(), PLearn::AdditiveGaussianNoiseVariable::fprop(), PLearn::ObjectGenerator::generateAllObjects(), PLearn::NNet::getCost(), PLearn::getDataSet(), PLearn::PrecomputedVMatrix::getNewRow(), PLearn::SequentialSplitter::getSplit(), PLearn::PLearnService::instance(), PLearn::VarArray::makeSharedGradient(), PLearn::VarArray::makeSharedRValue(), PLearn::VarArray::makeSharedValue(), PLearn::RemotePLearnServer::newObject(), PLearn::RemotePLearnServer::newObjectAsync(), PLearn::SequentialSplitter::nsplits(), PLearn::operator+=(), PLearn::operator-=(), PLearn::operator>>(), PLearn::HyperRetrain::optimize(), PLearn::PLearnService::reserveServers(), PLearn::NNet::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::MultiInstanceNNet::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::HyperLearner::train(), PLearn::DistRepNNet::train(), PLearn::DeepFeatureExtractorNNet::train(), and PLearn::ConditionalDensityNet::train().
{ return ptr==0; }
PLearn::PP< T >::operator T * | ( | ) | const [inline] |
T& PLearn::PP< T >::operator* | ( | ) | const [inline] |
T* PLearn::PP< T >::operator-> | ( | ) | const [inline] |
PP<T>& PLearn::PP< T >::operator= | ( | const PP< T > & | other | ) | [inline] |
affectation operator to same type PP
Definition at line 185 of file PP.h.
Referenced by PLearn::PP< Storage< PP< OnlineLearningModule > > >::operator=().
{ return operator=((T*)other); }
PP<T>& PLearn::PP< T >::operator= | ( | const T * | otherptr | ) | [inline] |
bool PLearn::PP< T >::operator== | ( | const PP< T > & | other | ) | const [inline] |
bool PLearn::PP< T >::operator== | ( | const T * | other | ) | const [inline] |
T* PLearn::PP< T >::ptr [protected] |
Definition at line 93 of file PP.h.
Referenced by PLearn::PP< Storage< PP< OnlineLearningModule > > >::isNotNull(), PLearn::PP< Storage< PP< OnlineLearningModule > > >::isNull(), PLearn::PP< X >::operator X *(), PLearn::Set::operator!=(), PLearn::RandomVar::operator!=(), PLearn::PP< Storage< PP< OnlineLearningModule > > >::operator*(), PLearn::PP< Storage< PP< OnlineLearningModule > > >::operator->(), PLearn::PP< Storage< PP< OnlineLearningModule > > >::operator=(), PLearn::Set::operator==(), PLearn::RandomVar::operator==(), PLearn::operator==(), PLearn::PP< Storage< PP< OnlineLearningModule > > >::operator==(), PLearn::PP< Storage< PP< OnlineLearningModule > > >::PP(), and PLearn::PP< Storage< PP< OnlineLearningModule > > >::~PP().