Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::TVec< T > Class Template Reference

#include <TVec_decl.h>

Inheritance diagram for PLearn::TVec< T >:

Inheritance graph
[legend]
Collaboration diagram for PLearn::TVec< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T value_type
typedef int size_type
typedef T * iterator
typedef const T * const_iterator

Public Member Functions

iterator begin () const
iterator end () const
 TVec (const vector< T > &vec)
 TVec ()
 TVec (int the_length)
 TVec (int the_length, const T &init_value)
 Builds a Vec of specified length with all values initialised with the given value.

 TVec (const T &start, const T &stop, const T &step)
 Builds a Vec containing values ranging from start to stop with step e.g., Vec(0,n-1,1) returns a vector of length() n, with 0,1,...n-1.

 TVec (int the_length, T *the_data)
 Builds a TVec which data is the_data.

 TVec (const TVec< T > &other)
 NOTE: COPY CONSTRUCTOR COPIES THE TVec STRUCTURE BUT NOT THE DATA.

const TVec< T > & operator= (const TVec< T > &other)
 NOTE: operator= COPIES THE TVec STRUCTURE BUT NOT THE DATA (use operator<< to copy data).

 operator vector () const
bool hasMissing () const
int size () const
int length () const
int capacity () const
int offset () const
PP< Storage< T > > getStorage () const
void compact ()
 Makes sure the allocated memory for this vector is exactly length().

 operator char * () const
 used by Hash (VERY DIRTY: TO BE REMOVED [Pascal])

size_t byteLength () const
void resize (int newlength, int extrabytes=0)
void write (PStream &out) const
 writes the Vec to the PStream: Note that users should rather use the form out << v;

void read (PStream &in)
 reads the Vec from the PStream: Note that users should rather use the form in >> v;

void save (const string &filename) const
void load (const string &filename)
TVec< T > subVec (int newstart, int newlength) const
 Returns a sub-TVector.

void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
TVec< T > deepCopy (map< const void *, void * > &copies) const
TVec< T > subVec (Range r)
void concat (const TVec< T > &input1, const TVec< T > &input2)
 Returns a TVector made up of the two (or more) input TVec.

void concat (const TVec< T > &input1, const TVec< T > &input2, const TVec< T > &input3)
void concat (const TVec< T > &input1, const TVec< T > &input2, const TVec< T > &input3, const TVec< T > &input4)
TMat< T > toMat (int newlength, int newwidth) const
 The returned TMat will view the same data.

TVec< T > copy () const
 returns a newly created copy of this TVec

void copyFrom (const T *x, int n) const
 copy from a C TVector starting at x of length() n

void copyTo (T *x) const
 copy to a C TVec starting at x

void makeSharedValue (T *x, int n)
bool isNull () const
bool isNotNull () const
bool isEmpty () const
bool isNotEmpty () const
bool operator! () const
 To allow if(!v) statements.

TVec< T > * operator-> ()
void fill (const T &value) const
 Fills the vector with the given value; no-op if vector is null.

void fill (const T &startval, const T &step)
 Fills the vector, putting startval in its first element and increments of step in subsequent elements.

void operator= (const T &f) const
 same as fill(f)

void clear () const
void insert (int position, T value)
 inserts element at position (actually between values at position-1 and posiion). Length is increased by 1.

void remove (int position)
 removes element at position, Length is decreased by 1

int findSorted (T value)
void insertSorted (T value, bool uniq)
void removeSorted (T value)
void append (const T &newval)
void append (const vector< T > &newvec)
 for compatibility with Array

void appendIfNotThereAlready (const T &newval)
 for compatibility with Array

void push_back (const T &newval)
 stl compatibility

void pop_back ()
void push (const T &newval)
 stack interface compatibility

pop ()
T & top () const
void append (const TVec< T > &values)
T & operator[] (int i) const
T & operator[] (unsigned int i) const
T & lastElement () const
T & firstElement () const
T & front () const
T & back () const
T & first () const
T & last () const
template<class I> void operator() (const TVec< I > &indices, TVec< T > &destination) const
 Deprecated: use the select function instead.

template<class I> TVec< T > operator() (const TVec< I > &indices) const
T * data () const
 Returns a pointer to the beginning of the TVector data.

void swap ()
 swaps first and last element, second and second last, etc... (mirror symmetry).

TVec< booloperator== (const T &value) const
 return a vector with 1's when (*this)[i]==value for all i, 0 otherwise

bool operator== (const TVec< T > &value) const
 return true if (*this)[i]==value[i] for all i, 0 otherwise

bool operator!= (const TVec< T > &value) const
bool contains (const T &element) const
 return true if element is in the TVec and false otherwise.

TVec< T > findIndices (const T &element)
 return the set of indices whose corresponding values are "element".

TVec< T > findIndices (const TVec< T > &elements)
int find (const T &element, int start=0) const
 Returns the position of the first occurence of element in the vector or -1 if it never occurs.

TVec< T > find (TVec< T > elements)
void print (ostream &out=cout) const
 the data is printed on a single row, no newline

void println (ostream &out=cout) const
 same with newline

void printcol (ostream &out=cout) const
 printed as a column

void print (ostream &out, const string &separator) const
 each value is printed with the given separator string between them

void input (istream &in=cin) const
void debugPrint ()
void operator<< (const string &datastring) const

Protected Attributes

int length_
int offset_
PP< Storage< T > > storage

Friends

class TMat< T >

template<class T>
class PLearn::TVec< T >


Member Typedef Documentation

template<class T>
typedef const T* PLearn::TVec< T >::const_iterator
 

Definition at line 93 of file TVec_decl.h.

template<class T>
typedef T* PLearn::TVec< T >::iterator
 

Reimplemented in PLearn::Array< T >, PLearn::VarArray, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 92 of file TVec_decl.h.

Referenced by PLearn::TVec< T >::TVec().

template<class T>
typedef int PLearn::TVec< T >::size_type
 

Definition at line 91 of file TVec_decl.h.

template<class T>
typedef T PLearn::TVec< T >::value_type
 

Definition at line 90 of file TVec_decl.h.


Constructor & Destructor Documentation

template<class T>
PLearn::TVec< T >::TVec const vector< T > &  vec  )  [inline]
 

Definition at line 107 of file TVec_decl.h.

template<class T>
PLearn::TVec< T >::TVec  )  [inline]
 

Definition at line 115 of file TVec_decl.h.

template<class T>
PLearn::TVec< T >::TVec int  the_length  )  [inline, explicit]
 

Definition at line 119 of file TVec_decl.h.

template<class T>
PLearn::TVec< T >::TVec int  the_length,
const T &  init_value
[inline]
 

Builds a Vec of specified length with all values initialised with the given value.

Definition at line 125 of file TVec_decl.h.

template<class T>
PLearn::TVec< T >::TVec const T &  start,
const T &  stop,
const T &  step
 

Builds a Vec containing values ranging from start to stop with step e.g., Vec(0,n-1,1) returns a vector of length() n, with 0,1,...n-1.

creates range (start, start+step, ..., stop)

Definition at line 69 of file TMat_impl.h.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), PLearn::TVec< T >::iterator, resize(), and val.

template<class T>
PLearn::TVec< T >::TVec int  the_length,
T *  the_data
[inline]
 

Builds a TVec which data is the_data.

Definition at line 136 of file TVec_decl.h.

template<class T>
PLearn::TVec< T >::TVec const TVec< T > &  other  )  [inline]
 

NOTE: COPY CONSTRUCTOR COPIES THE TVec STRUCTURE BUT NOT THE DATA.

Definition at line 142 of file TVec_decl.h.


Member Function Documentation

template<class T>
void PLearn::TVec< T >::append const TVec< T > &  values  )  [inline]
 

Definition at line 575 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::append const vector< T > &  newvec  )  [inline]
 

for compatibility with Array

Definition at line 534 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::append const T &  newval  )  [inline]
 

Definition at line 527 of file TVec_decl.h.

Referenced by PLearn::FinancePreprocVMatrix::build_(), PLearn::DatedJoinVMatrix::build_(), PLearn::ConcatRowsVMatrix::findCommonFields(), PLearn::TVec< pair< real, real > >::findIndices(), PLearn::ObjectGenerator::generateAllObjects(), PLearn::StatsCollector::getAllValuesMapping(), PLearn::StatsCollector::getBinMapping(), PLearn::TrainValidTestSplitter::getSplit(), PLearn::ToBagSplitter::getSplit(), PLearn::KFoldSplitter::getSplit(), PLearn::FilterSplitter::getSplit(), PLearn::DBSplitter::getSplit(), PLearn::SequentialModelSelector::getTestCostNames(), PLearn::KernelProjection::getTestCostNames(), PLearn::AddCostToLearner::getTestCostNames(), PLearn::loadUCIMLDB(), PLearn::SequentialModelSelector::matlabSave(), PLearn::matlabSave(), PLearn::operator &(), PLearn::operator &=(), PLearn::PDistribution::setConditionalFlagsWithoutUpdate(), PLearn::GeodesicDistanceKernel::setDataForKernelMatrix(), PLearn::SequentialModelSelector::test(), and PLearn::vmatmain().

template<class T>
void PLearn::TVec< T >::appendIfNotThereAlready const T &  newval  )  [inline]
 

for compatibility with Array

Definition at line 546 of file TVec_decl.h.

template<class T>
T& PLearn::TVec< T >::back  )  const [inline]
 

Definition at line 614 of file TVec_decl.h.

Referenced by PLearn::StatsCollector::getBinMapping().

template<class T>
iterator PLearn::TVec< T >::begin  )  const [inline]
 

Definition at line 95 of file TVec_decl.h.

Referenced by PLearn::addprepostfix(), PLearn::RealMapping::buildOrderedMapping(), PLearn::TVec< pair< real, real > >::end(), PLearn::TVec< pair< real, real > >::fill(), PLearn::fill_random_discrete(), PLearn::fill_random_normal(), PLearn::fill_random_uniform(), PLearn::TVec< pair< real, real > >::findSorted(), PLearn::VecExtendedVMatrix::getNewRow(), PLearn::JulianizeVMatrix::getNewRow(), PLearn::TVec< pair< real, real > >::hasMissing(), PLearn::GraphicalBiText::init(), PLearn::loadAscii(), PLearn::saveAscii(), PLearn::sortElements(), PLearn::swap(), PLearn::TVec< T >::TVec(), and PLearn::viewVMat().

template<class T>
size_t PLearn::TVec< T >::byteLength  )  const [inline]
 

Reimplemented in PLearn::Array< T >, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 203 of file TVec_decl.h.

template<class T>
int PLearn::TVec< T >::capacity  )  const [inline]
 

Definition at line 181 of file TVec_decl.h.

Referenced by PLearn::TVec< pair< real, real > >::resize().

template<class T>
void PLearn::TVec< T >::clear  )  const [inline]
 

Definition at line 471 of file TVec_decl.h.

Referenced by PLearn::AdaptGradientOptimizer::adaptLearningRateVariance(), PLearn::add(), PLearn::averageAcrossRowsAndColumns(), PLearn::RowMapSparseValueMatrix< T >::averageAcrossRowsAndColumns(), PLearn::RowMapSparseMatrix< real >::averageAcrossRowsAndColumns(), PLearn::ProjectionErrorVariable::bprop(), PLearn::AdaptGradientOptimizer::build_(), PLearn::Variable::clearDiagHessian(), PLearn::Variable::clearGradient(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::GraphicalBiText::compute_pMC(), PLearn::GraphicalBiText::compute_pTC(), PLearn::computeInputMean(), PLearn::computeInputMeanAndCovar(), PLearn::computeInputMeanAndVariance(), PLearn::computeMean(), PLearn::computeMeanAndCovar(), PLearn::computeMeanAndVariance(), PLearn::Optimizer::computeRepartition(), PLearn::computeWeightedMean(), PLearn::computeWeightedMeanAndCovar(), PLearn::diagonalizeSubspace(), PLearn::MultinomialRandomVariable::EMEpochInitialize(), PLearn::MixtureRandomVariable::EMEpochInitialize(), PLearn::DiagonalNormalRandomVariable::EMEpochInitialize(), PLearn::MinusRandomVariable::EMEpochInitialize(), PLearn::PlusRandomVariable::EMEpochInitialize(), PLearn::VMatrix::evaluateKernelWeightedTargetSum(), PLearn::VMatrix::evaluateSumOfFbprop(), PLearn::VMatrix::evaluateSumOfFprop(), PLearn::GaussMix::expectation(), PLearn::SumOverBagsVariable::fbprop(), PLearn::SumOfVariable::fbprop(), PLearn::VMatrix::forcePutRow(), PLearn::UnfoldedSumOfVariable::fprop(), PLearn::SumOverBagsVariable::fprop(), PLearn::SumOfVariable::fprop(), PLearn::RowSumVariable::fprop(), PLearn::RowAtPositionVariable::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::IndexAtPositionVariable::fprop(), PLearn::ElementAtPositionVariable::fprop(), PLearn::ColumnSumVariable::fprop(), PLearn::getList(), PLearn::SparseVMatrix::getNewRow(), PLearn::DatedJoinVMatrix::getNewRow(), PLearn::GraphicalBiText::init(), PLearn::GaussMix::kmeans(), PLearn::loadAscii(), PLearn::SmoothedProbSparseMatrix::normalizeCondBackoff(), PLearn::operator+(), PLearn::ScaledGradientOptimizer::optimize(), PLearn::GradientOptimizer::optimize(), PLearn::ConjGradientOptimizer::optimize(), PLearn::ConjGradientOptimizer::optimizeN(), PLearn::SumOfVariable::printInfo(), PLearn::MatrixSumOfVariable::printInfo(), PLearn::SparseMatrix::product(), PLearn::ElementAtPositionVariable::rfprop(), PLearn::GaussMix::train(), PLearn::ConstantRegressor::train(), PLearn::ConditionalDensityNet::train(), PLearn::transposeProduct(), PLearn::GraphicalBiText::update_WSD_model(), and PLearn::Variable::updateAndClear().

template<class T>
void PLearn::TVec< T >::compact  )  [inline]
 

Makes sure the allocated memory for this vector is exactly length().

Definition at line 187 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::concat const TVec< T > &  input1,
const TVec< T > &  input2,
const TVec< T > &  input3,
const TVec< T > &  input4
[inline]
 

Definition at line 360 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::concat const TVec< T > &  input1,
const TVec< T > &  input2,
const TVec< T > &  input3
[inline]
 

Definition at line 349 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::concat const TVec< T > &  input1,
const TVec< T > &  input2
[inline]
 

Returns a TVector made up of the two (or more) input TVec.

Definition at line 340 of file TVec_decl.h.

template<class T>
bool PLearn::TVec< T >::contains const T &  element  )  const [inline]
 

return true if element is in the TVec and false otherwise.

< get start of data

Definition at line 684 of file TVec_decl.h.

Referenced by PLearn::FinancePreprocVMatrix::getNewRow(), and PLearn::grep().

template<class T>
TVec<T> PLearn::TVec< T >::copy  )  const [inline]
 

returns a newly created copy of this TVec

Definition at line 377 of file TVec_decl.h.

Referenced by PLearn::CompactVMatrix::append(), PLearn::TVec< pair< real, real > >::compact(), PLearn::CompactVMatrix::CompactVMatrix(), PLearn::grep(), PLearn::Gnuplot::plotcdf(), PLearn::Gnuplot::plotdensity(), and PLearn::Function::verifyGradient().

template<class T>
void PLearn::TVec< T >::copyFrom const T *  x,
int  n
const [inline]
 

copy from a C TVector starting at x of length() n

< get data start

Definition at line 385 of file TVec_decl.h.

Referenced by PLearn::RowBufferedVMatrix::getRow(), PLearn::MemoryVMatrix::getRow(), PLearn::RowBufferedVMatrix::getSubRow(), and PLearn::MemoryVMatrix::getSubRow().

template<class T>
void PLearn::TVec< T >::copyTo T *  x  )  const [inline]
 

copy to a C TVec starting at x

Definition at line 397 of file TVec_decl.h.

Referenced by PLearn::MemoryVMatrix::putRow(), and PLearn::MemoryVMatrix::putSubRow().

template<class T>
T* PLearn::TVec< T >::data  )  const [inline]
 

Returns a pointer to the beginning of the TVector data.

Definition at line 640 of file TVec_decl.h.

Referenced by PLearn::VarArray::accumulateGradientFrom(), PLearn::VarArray::accumulateGradientTo(), PLearn::VarArray::accumulateTo(), PLearn::add(), PLearn::RowMapSparseMatrix< real >::add2Rows(), PLearn::addIfNonMissing(), PLearn::addToDiagonal(), PLearn::addXandX2IfNonMissing(), PLearn::TVec< pair< real, real > >::append(), PLearn::IntVecFile::append(), PLearn::TVec< pair< real, real > >::appendIfNotThereAlready(), PLearn::FileVMatrix::appendRow(), PLearn::DiskVMatrix::appendRow(), PLearn::apply(), PLearn::argmax(), PLearn::argmin(), PLearn::averageAcrossRowsAndColumns(), PLearn::RowMapSparseValueMatrix< T >::averageAcrossRowsAndColumns(), PLearn::RowMapSparseMatrix< real >::averageAcrossRowsAndColumns(), PLearn::avgdev(), PLearn::binread(), PLearn::binread_double(), PLearn::binwrite(), PLearn::binwrite_double(), PLearn::Max2Variable::bprop(), PLearn::bprop_tanh(), PLearn::bpropCholeskySolve(), PLearn::choleskySolve(), PLearn::TVec< pair< real, real > >::clear(), PLearn::complement_indices(), PLearn::VecCompressor::compressVec(), PLearn::compute_fastsigmoid(), PLearn::compute_fasttanh(), PLearn::compute_inverse_sigmoid(), PLearn::compute_log(), PLearn::compute_safelog(), PLearn::compute_sigmoid(), PLearn::compute_sqrt(), PLearn::compute_tanh(), PLearn::computeBasicStats(), PLearn::computeMeanAndCovar(), PLearn::computeXYPositions(), PLearn::concat(), PLearn::TVec< pair< real, real > >::contains(), PLearn::VarArray::copyFrom(), PLearn::TVec< pair< real, real > >::copyFrom(), PLearn::VarArray::copyGradientFrom(), PLearn::VarArray::copyGradientTo(), PLearn::VarArray::copyMaxValueTo(), PLearn::VarArray::copyMinValueTo(), PLearn::VarArray::copyRValueFrom(), PLearn::VarArray::copyRValueTo(), PLearn::VarArray::copyTo(), PLearn::TVec< pair< real, real > >::copyTo(), PLearn::covariance(), PLearn::Variable::defineGradientLocation(), PLearn::diag(), PLearn::SparseMatrix::diag(), PLearn::RowMapSparseMatrix< real >::diag(), PLearn::diagonalizedFactorsProduct(), PLearn::diagonalizedFactorsProductBprop(), PLearn::diagonalizedFactorsProductTranspose(), PLearn::diagonalizedFactorsProductTransposeBprop(), PLearn::diagonalizedFactorsTransposeProduct(), PLearn::diagonalizedFactorsTransposeProductBprop(), PLearn::diagonalizedFactorsTransposeProductTranspose(), PLearn::diagonalizedFactorsTransposeProductTransposeBprop(), PLearn::diagonalOfSquare(), PLearn::SparseMatrix::diagonalOfSquare(), PLearn::RowMapSparseMatrix< real >::diagonalOfSquare(), PLearn::diffSquareMultiplyAcc(), PLearn::diffSquareMultiplyScaledAcc(), PLearn::displayHistogram(), PLearn::divide(), PLearn::dot(), PLearn::SparseVMatrix::dot(), PLearn::MemoryVMatrix::dot(), PLearn::CompactVMatrix::dot(), PLearn::SparseMatrix::dotColumn(), PLearn::RowMapSparseMatrix< real >::dotColumn(), PLearn::RowMapSparseMatrix< real >::dotRow(), PLearn::eigenSparseNonSymmMat(), PLearn::eigenSparseSymmMat(), PLearn::elementsEqualTo(), PLearn::MultinomialRandomVariable::EMBprop(), PLearn::MixtureRandomVariable::EMBprop(), PLearn::ProductRandomVariable::EMBprop(), PLearn::CompactVMatrix::encodeAndPutRow(), PLearn::equals(), PLearn::SquaredErrorCostFunction::evaluate(), PLearn::ScaledLaplacianKernel::evaluate(), PLearn::ScaledGeneralizedDistanceRBFKernel::evaluate(), PLearn::LaplacianKernel::evaluate(), PLearn::GaussianKernel::evaluate(), PLearn::ConvexBasisKernel::evaluate(), PLearn::exp(), PLearn::exponentialMovingAverageUpdate(), PLearn::exponentialMovingSquareUpdate(), PLearn::exponentialMovingVarianceUpdate(), PLearn::externalProduct(), PLearn::externalProductAcc(), PLearn::externalProductScaleAcc(), PLearn::SumOfVariable::fbprop(), PLearn::TVec< pair< real, real > >::fill(), PLearn::TVec< pair< real, real > >::find(), PLearn::TVec< pair< real, real > >::findIndices(), PLearn::SumOfVariable::fprop(), PLearn::Max2Variable::fprop(), PLearn::gaussian_mixture_mu_sigma(), PLearn::geometric_mean(), PLearn::SparseVMatrix::getNewRow(), PLearn::PairsVMatrix::getNewRow(), PLearn::FileVMatrix::getNewRow(), PLearn::DiskVMatrix::getNewRow(), PLearn::CompactVMatrix::getNewRow(), PLearn::getQuantiles(), PLearn::RowBufferedVMatrix::getRow(), PLearn::RowBufferedVMatrix::getSubRow(), PLearn::ByteMemoryVMatrix::getSubRow(), PLearn::IntVecFile::getVec(), PLearn::harmonic_mean(), PLearn::ifThenElse(), PLearn::TVec< T >::input(), PLearn::TVec< pair< real, real > >::insert(), PLearn::inverted(), PLearn::invertElements(), PLearn::isLargerThan(), PLearn::isLargerThanOrEqualTo(), PLearn::isSmallerThan(), PLearn::isSmallerThanOrEqualTo(), PLearn::lapackEIGEN(), PLearn::lapackGeneralizedEIGEN(), PLearn::lapackSolveLinearSystem(), PLearn::lapackSVD(), PLearn::loadADVec(), PLearn::loadAsciiWithoutSize(), PLearn::SparseMatrix::loadFortran(), PLearn::loadPVec(), PLearn::loadSNVec(), PLearn::logadd(), PLearn::logOfCompactGaussian(), PLearn::LU_decomposition(), PLearn::Variable::makeDeepCopyFromShallowCopy(), PLearn::Variable::makeSharedGradient(), PLearn::Variable::makeSharedRValue(), PLearn::Variable::makeSharedValue(), PLearn::TVec< pair< real, real > >::makeSharedValue(), PLearn::matColumnDotVec(), PLearn::matRowDotVec(), PLearn::matRowsDots(), PLearn::matRowsDotsAcc(), PLearn::max(), PLearn::maxabs(), PLearn::Variable::maxUpdate(), PLearn::mean(), PLearn::min(), PLearn::minabs(), PLearn::multinomial_sample(), PLearn::multiply(), PLearn::multiplyAcc(), PLearn::multiplyAdd(), PLearn::multiplyScaledAdd(), PLearn::negateElements(), PLearn::nonZero(), PLearn::nonZeroIndices(), PLearn::ProbVector::normalize(), PLearn::operator *=(), PLearn::TVec< pair< real, real > >::operator char *(), PLearn::Array< char * >::operator char *(), PLearn::TVec< pair< real, real > >::operator vector(), PLearn::operator+(), PLearn::operator+=(), PLearn::operator-(), PLearn::operator-=(), PLearn::operator/(), PLearn::operator/=(), PLearn::Array< char * >::operator<(), PLearn::Array< char * >::operator<=(), PLearn::Array< char * >::operator=(), PLearn::TVec< pair< real, real > >::operator==(), PLearn::Array< char * >::operator==(), PLearn::Array< char * >::operator>(), PLearn::Array< char * >::operator>=(), PLearn::CompactVMatrix::perturb(), PLearn::positionOfClosestElement(), PLearn::positionOfkthOrderedElement(), PLearn::positiveValues(), PLearn::powdistance(), PLearn::pownorm(), PLearn::TVec< T >::print(), PLearn::Array< char * >::print(), PLearn::TVec< T >::printcol(), PLearn::product(), PLearn::SparseMatrix::product(), PLearn::RowMapSparseMatrix< real >::product(), PLearn::productAcc(), PLearn::FileVMatrix::putSubRow(), PLearn::CompactVMatrix::putSubRow(), PLearn::VecCompressor::readCompressedVec(), PLearn::rebalanceNClasses(), PLearn::TVec< pair< real, real > >::remove(), PLearn::remove_missing(), PLearn::Variable::resize(), PLearn::Variable::resizeDiagHessian(), PLearn::Variable::resizeRValue(), PLearn::VMatLanguage::run(), PLearn::RGBImageVMatrix::sample(), PLearn::saveAsciiWithoutSize(), PLearn::SparseMatrix::saveFortran(), PLearn::saveGnuplot(), PLearn::savePVec(), PLearn::saveSNVec(), PLearn::select(), PLearn::selectAndOrder(), PLearn::selectColumns(), PLearn::selectElements(), PLearn::selectRows(), PLearn::shuffleElements(), PLearn::ProbVector::smoothNormalize(), PLearn::softmax(), PLearn::SparseMatrix::SparseMatrix(), PLearn::SparseVMatrix::SparseVMatrix(), PLearn::square(), PLearn::squareAcc(), PLearn::squareMultiplyAcc(), PLearn::squareroot(), PLearn::squareSubtract(), PLearn::Array< char * >::subArray(), PLearn::substract(), PLearn::sum(), PLearn::sum_of_log(), PLearn::TVec< pair< real, real > >::swap(), PLearn::swap(), PLearn::tanh(), PLearn::Learner::test(), PLearn::SparseMatrix::toMat(), PLearn::RealMapping::transform(), PLearn::transposeProduct(), PLearn::transposeProductAcc(), PLearn::VecCompressor::uncompressVec(), PLearn::Variable::update(), PLearn::MaxStatsIterator::update(), PLearn::MinStatsIterator::update(), PLearn::Variable::Variable(), PLearn::variance(), PLearn::vec_counts(), PLearn::vec_find(), PLearn::weighted_mean(), PLearn::weighted_powdistance(), PLearn::weighted_variance(), and PLearn::VecCompressor::writeCompressedVec().

template<class T>
void PLearn::TVec< T >::debugPrint  )  [inline]
 

Definition at line 763 of file TVec_decl.h.

template<class T>
TVec< T > PLearn::TVec< T >::deepCopy map< const void *, void * > &  copies  )  const
 

Notice that deepCopy of a Vec returns a Vec rather than a Vec*. The reason for this being that a Vec is already some kind of "smart pointer" to an underlying Storage

Definition at line 70 of file TVec_impl.h.

References PLearn::TVec< T >::makeDeepCopyFromShallowCopy().

Referenced by PLearn::deepCopy().

template<class T>
iterator PLearn::TVec< T >::end  )  const [inline]
 

Definition at line 101 of file TVec_decl.h.

Referenced by PLearn::addprepostfix(), PLearn::RealMapping::buildOrderedMapping(), PLearn::TVec< pair< real, real > >::fill(), PLearn::fill_random_discrete(), PLearn::fill_random_normal(), PLearn::fill_random_uniform(), PLearn::TVec< pair< real, real > >::findSorted(), PLearn::VecExtendedVMatrix::getNewRow(), PLearn::JulianizeVMatrix::getNewRow(), PLearn::TVec< pair< real, real > >::hasMissing(), PLearn::loadAscii(), PLearn::saveAscii(), PLearn::sortElements(), PLearn::swap(), PLearn::TVec< T >::TVec(), and PLearn::viewVMat().

template<class T>
void PLearn::TVec< T >::fill const T &  startval,
const T &  step
[inline]
 

Fills the vector, putting startval in its first element and increments of step in subsequent elements.

Definition at line 459 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::fill const T &  value  )  const [inline]
 

Fills the vector with the given value; no-op if vector is null.

Definition at line 451 of file TVec_decl.h.

Referenced by PLearn::RemoveDuplicateVMatrix::build_(), PLearn::NeuralNet::build_(), PLearn::AdaptGradientOptimizer::build_(), PLearn::complement_indices(), PLearn::EntropyContrast::compute_df_dx(), PLearn::EntropyContrast::compute_diversity_cost(), PLearn::computeBasicStats(), PLearn::MultiInstanceNNet::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::MultiInstanceNNet::computeOutputAndCosts(), PLearn::computeRange(), PLearn::GaussMix::computeWeights(), PLearn::fill_one_hot(), PLearn::Variable::fillGradient(), PLearn::GaussMix::generateFromGaussian(), PLearn::ExtendedVMatrix::getNewRow(), PLearn::DatedJoinVMatrix::getNewRow(), PLearn::EntropyContrast::initialize_NNcontinuous(), PLearn::ConditionalDensityNet::initializeParams(), PLearn::IntStreamVMatrix::IntStreamVMatrix(), PLearn::loadAscii(), PLearn::loadUCIMLDB(), PLearn::operator<<(), PLearn::ScaledGradientOptimizer::optimize(), PLearn::ReconstructionWeightsKernel::reconstruct(), PLearn::ScaledGradientOptimizer::ScaledGradientOptimizer(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), PLearn::GeodesicDistanceKernel::setDataForKernelMatrix(), PLearn::DivisiveNormalizationKernel::setDataForKernelMatrix(), PLearn::AdditiveNormalizationKernel::setDataForKernelMatrix(), PLearn::SDBVMOutputCoder::setOutput(), PLearn::LimitedGaussianSmoother::smooth(), PLearn::PLearner::test(), PLearn::GaussMix::train(), PLearn::EntropyContrast::train(), PLearn::ConditionalDensityNet::train(), and PLearn::AdaBoost::train().

template<class T>
TVec<T> PLearn::TVec< T >::find TVec< T >  elements  )  [inline]
 

Definition at line 739 of file TVec_decl.h.

template<class T>
int PLearn::TVec< T >::find const T &  element,
int  start = 0
const [inline]
 

Returns the position of the first occurence of element in the vector or -1 if it never occurs.

Definition at line 729 of file TVec_decl.h.

template<class T>
TVec<T> PLearn::TVec< T >::findIndices const TVec< T > &  elements  )  [inline]
 

Definition at line 710 of file TVec_decl.h.

template<class T>
TVec<T> PLearn::TVec< T >::findIndices const T &  element  )  [inline]
 

return the set of indices whose corresponding values are "element".

TODO Olivier: hmm, looks like it should return TVec<int>, no ? (same for other find methods)

Definition at line 697 of file TVec_decl.h.

template<class T>
int PLearn::TVec< T >::findSorted value  )  [inline]
 

Definition at line 501 of file TVec_decl.h.

template<class T>
T& PLearn::TVec< T >::first  )  const [inline]
 

Definition at line 617 of file TVec_decl.h.

Referenced by PLearn::Grapher::computeAutoGridrange(), PLearn::computeNearestNeighbors(), PLearn::RealMapping::getCutPoints(), and PLearn::FractionSplitter::getSplit().

template<class T>
T& PLearn::TVec< T >::firstElement  )  const [inline]
 

Definition at line 610 of file TVec_decl.h.

Referenced by PLearn::TVec< pair< real, real > >::first(), and PLearn::TVec< pair< real, real > >::front().

template<class T>
T& PLearn::TVec< T >::front  )  const [inline]
 

Definition at line 613 of file TVec_decl.h.

template<class T>
PP< Storage<T> > PLearn::TVec< T >::getStorage  )  const [inline]
 

Definition at line 184 of file TVec_decl.h.

Referenced by PLearn::TVec< pair< real, real > >::write().

template<class T>
bool PLearn::TVec< T >::hasMissing  )  const [inline]
 

Definition at line 169 of file TVec_decl.h.

Referenced by PLearn::filter(), PLearn::SDBVMatrix::getRow(), PLearn::MovingAverage::test(), PLearn::EmbeddedSequentialLearner::test(), and PLearn::MovingAverage::train().

template<class T>
void PLearn::TVec< T >::input istream &  in = cin  )  const
 

Definition at line 104 of file TMat_impl.h.

References PLearn::TVec< T >::data(), PLearn::TVec< T >::length(), and PLERROR.

Referenced by PLearn::operator>>().

template<class T>
void PLearn::TVec< T >::insert int  position,
value
[inline]
 

inserts element at position (actually between values at position-1 and posiion). Length is increased by 1.

Definition at line 475 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::insertSorted value,
bool  uniq
[inline]
 

Definition at line 512 of file TVec_decl.h.

Referenced by PLearn::RemoveRowsVMatrix::remove().

template<class T>
bool PLearn::TVec< T >::isEmpty  )  const [inline]
 

Definition at line 427 of file TVec_decl.h.

Referenced by PLearn::YMDDatedVMatrix::build_(), PLearn::TVec< pair< real, real > >::findIndices(), PLearn::TVec< pair< real, real > >::findSorted(), PLearn::TVec< pair< real, real > >::operator!(), PLearn::TVec< pair< real, real > >::operator==(), PLearn::PDistribution::setConditionalFlagsWithoutUpdate(), and PLearn::GhostScript::setdash().

template<class T>
bool PLearn::TVec< T >::isNotEmpty  )  const [inline]
 

Definition at line 430 of file TVec_decl.h.

Referenced by PLearn::PDistribution::finishConditionalBuild(), and PLearn::matlabSave().

template<class T>
bool PLearn::TVec< T >::isNotNull  )  const [inline]
 

Definition at line 424 of file TVec_decl.h.

template<class T>
bool PLearn::TVec< T >::isNull  )  const [inline]
 

Definition at line 421 of file TVec_decl.h.

Referenced by PLearn::TVec< pair< real, real > >::clear(), PLearn::TVec< pair< real, real > >::operator char *(), and PLearn::Array< char * >::operator char *().

template<class T>
T& PLearn::TVec< T >::last  )  const [inline]
 

Definition at line 618 of file TVec_decl.h.

template<class T>
T& PLearn::TVec< T >::lastElement  )  const [inline]
 

Definition at line 607 of file TVec_decl.h.

Referenced by PLearn::TVec< pair< real, real > >::append(), PLearn::TVec< pair< real, real > >::back(), PLearn::RemapLastColumnVMatrix::getNewRow(), PLearn::TVec< pair< real, real > >::last(), PLearn::TVec< pair< real, real > >::pop(), and PLearn::TVec< pair< real, real > >::top().

template<class T>
int PLearn::TVec< T >::length  )  const [inline]
 

Reimplemented in PLearn::RVArray, and PLearn::RVInstanceArray.

Definition at line 180 of file TVec_decl.h.

Referenced by PLearn::VarArray::accumulateGradientFrom(), PLearn::VarArray::accumulateGradientTo(), PLearn::VarArray::accumulateTo(), PLearn::add(), PLearn::GaussianKernel::addDataForKernelMatrix(), PLearn::addIfNonMissing(), PLearn::addToDiagonal(), PLearn::addXandX2IfNonMissing(), PLearn::TVec< pair< real, real > >::append(), PLearn::IntVecFile::append(), PLearn::TVec< pair< real, real > >::appendIfNotThereAlready(), PLearn::TMat< T >::appendRow(), PLearn::FileVMatrix::appendRow(), PLearn::DiskVMatrix::appendRow(), PLearn::AsciiVMatrix::appendRow(), PLearn::apply(), PLearn::argmax(), PLearn::argmin(), PLearn::AsciiVMatrix::AsciiVMatrix(), PLearn::avgdev(), PLearn::binary_search(), PLearn::binwrite(), PLearn::binwrite_double(), PLearn::SquareRootVariable::bprop(), PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::bprop_tanh(), PLearn::UniformizeVMatrix::build_(), PLearn::UniformDistribution::build_(), PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::RepeatSplitter::build_(), PLearn::NeuralNet::build_(), PLearn::ManualBinner::build_(), PLearn::KNNVMatrix::build_(), PLearn::TVec< pair< real, real > >::byteLength(), PLearn::ByteMemoryVMatrix::ByteMemoryVMatrix(), PLearn::HistogramDistribution::calc_density_from_survival(), PLearn::HistogramDistribution::calc_survival_from_density(), PLearn::choleskySolve(), PLearn::TVec< pair< real, real > >::clear(), PLearn::columnArgmax(), PLearn::columnArgmin(), PLearn::columnmatrix(), PLearn::columnMax(), PLearn::columnMean(), PLearn::columnMin(), PLearn::TMat< pair< real, real > >::columns(), PLearn::columnSum(), PLearn::columnSumOfSquares(), PLearn::columnVariance(), PLearn::columnWeightedMean(), PLearn::columnWeightedVariance(), PLearn::TVec< pair< real, real > >::compact(), PLearn::complement_indices(), PLearn::VecCompressor::compressVec(), PLearn::compute_fastsigmoid(), PLearn::compute_fasttanh(), PLearn::compute_inverse_sigmoid(), PLearn::compute_log(), PLearn::compute_safelog(), PLearn::compute_sigmoid(), PLearn::compute_sqrt(), PLearn::compute_tanh(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::computeBasicStats(), PLearn::computeConditionalMeans(), PLearn::SelectInputSubsetLearner::computeCostsFromOutputs(), PLearn::Learner::computeCostsFromOutputs(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::computeMeanAndCovar(), PLearn::computeMeanAndStddev(), PLearn::computeNearestNeighbors(), PLearn::SelectInputSubsetLearner::computeOutput(), PLearn::PConditionalDistribution::computeOutput(), PLearn::PCA::computeOutput(), PLearn::LinearRegressor::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::AdaBoost::computeOutput(), PLearn::SelectInputSubsetLearner::computeOutputAndCosts(), PLearn::computeOutputFields(), PLearn::computePrincipalComponents(), PLearn::computeRanges(), PLearn::Optimizer::computeRepartition(), PLearn::computeWeightedMean(), PLearn::TVec< pair< real, real > >::concat(), PLearn::concat(), PLearn::ConjGradientOptimizer::conjpomdp(), PLearn::constrainedLinearRegression(), PLearn::TVec< pair< real, real > >::contains(), PLearn::SDBVMField::convertMissing(), PLearn::TVec< pair< real, real > >::copy(), PLearn::VVec::copyFrom(), PLearn::VarArray::copyFrom(), PLearn::TVec< pair< real, real > >::copyFrom(), PLearn::VarArray::copyGradientFrom(), PLearn::VarArray::copyGradientTo(), PLearn::VarArray::copyMaxValueTo(), PLearn::VarArray::copyMinValueTo(), PLearn::VarArray::copyRValueFrom(), PLearn::VarArray::copyRValueTo(), PLearn::VarArray::copyTo(), PLearn::TVec< pair< real, real > >::copyTo(), PLearn::correlation(), PLearn::covariance(), PLearn::VVMatrix::createPreproVMat(), PLearn::ConjGradientOptimizer::daiYuan(), PLearn::VMatrix::declareFieldNames(), PLearn::SparseMatrix::diag(), PLearn::diagonalizedFactorsProduct(), PLearn::diagonalizedFactorsProductBprop(), PLearn::diagonalizedFactorsProductTranspose(), PLearn::diagonalizedFactorsProductTransposeBprop(), PLearn::diagonalizedFactorsTransposeProduct(), PLearn::diagonalizedFactorsTransposeProductBprop(), PLearn::diagonalizedFactorsTransposeProductTranspose(), PLearn::diagonalizedFactorsTransposeProductTransposeBprop(), PLearn::diagonalmatrix(), PLearn::SparseMatrix::diagonalOfSquare(), PLearn::diffSquareMultiplyAcc(), PLearn::diffSquareMultiplyScaledAcc(), PLearn::displayDecisionSurface(), PLearn::displayHistogram(), PLearn::divide(), PLearn::VMatrix::dot(), PLearn::dot(), PLearn::TemporalHorizonVMatrix::dot(), PLearn::SparseVMatrix::dot(), PLearn::RowBufferedVMatrix::dot(), PLearn::MemoryVMatrix::dot(), PLearn::ConcatColumnsVMatrix::dot(), PLearn::CompactVMatrix::dot(), PLearn::SparseMatrix::dotColumn(), PLearn::RowMapSparseMatrix< real >::dotColumn(), PLearn::RowMapSparseMatrix< real >::dotRow(), PLearn::DX_write_2D_fields(), PLearn::eigen_SymmMat(), PLearn::elementsEqualTo(), PLearn::MixtureRandomVariable::ElogP(), PLearn::TVec< pair< real, real > >::end(), PLearn::equals(), PLearn::estimatedCumProb(), PLearn::Kernel::estimateHistograms(), PLearn::WeightedCostFunction::evaluate(), PLearn::SquaredErrorCostFunction::evaluate(), PLearn::ScaledLaplacianKernel::evaluate(), PLearn::ScaledGeneralizedDistanceRBFKernel::evaluate(), PLearn::NegLogProbCostFunction::evaluate(), PLearn::MulticlassErrorCostFunction::evaluate(), PLearn::LogOfGaussianDensityKernel::evaluate(), PLearn::LiftBinaryCostFunction::evaluate(), PLearn::LaplacianKernel::evaluate(), PLearn::GeneralizedDistanceRBFKernel::evaluate(), PLearn::GaussianKernel::evaluate(), PLearn::GaussianDensityKernel::evaluate(), PLearn::DirectNegativeCostFunction::evaluate(), PLearn::DifferenceKernel::evaluate(), PLearn::ConvexBasisKernel::evaluate(), PLearn::ClassMarginCostFunction::evaluate(), PLearn::ClassErrorCostFunction::evaluate(), PLearn::ClassDistanceProportionCostFunction::evaluate(), PLearn::Kernel::evaluate_all_i_x(), PLearn::Kernel::evaluate_all_x_i(), PLearn::VMatrix::evaluateKernel(), PLearn::VMatrix::evaluateSumOfFbprop(), PLearn::VMatrix::evaluateSumOfFprop(), PLearn::exponentialMovingAverageUpdate(), PLearn::exponentialMovingSquareUpdate(), PLearn::exponentialMovingVarianceUpdate(), PLearn::externalProduct(), PLearn::externalProductAcc(), PLearn::externalProductScaleAcc(), PLearn::fastsigmoid(), PLearn::fasttanh(), PLearn::SumOfVariable::fbprop(), PLearn::TVec< pair< real, real > >::fill(), PLearn::fill_one_hot(), PLearn::fill_random_discrete(), PLearn::fill_random_normal(), PLearn::VMatrix::find(), PLearn::TVec< pair< real, real > >::find(), PLearn::HistogramDistribution::find_bin(), PLearn::ConcatRowsVMatrix::findCommonFields(), PLearn::TVec< pair< real, real > >::findIndices(), PLearn::QuantilesStatsIterator::finish(), PLearn::StderrStatsIterator::finish(), PLearn::StddevStatsIterator::finish(), PLearn::ExpMeanStatsIterator::finish(), PLearn::MeanStatsIterator::finish(), PLearn::PDistribution::finishConditionalBuild(), PLearn::SumOfVariable::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::SumOverBagsVariable::fpropOneBag(), PLearn::gaussian_mixture_mu_sigma(), PLearn::EntropyContrast::gen_normal_0_1(), PLearn::GeneralizedOneHotVMatrix::GeneralizedOneHotVMatrix(), PLearn::UniformDistribution::generate(), PLearn::GaussianDistribution::generate(), PLearn::GaussMix::generateFromGaussian(), PLearn::geometric_mean(), PLearn::EntropyContrast::get_gen_grad_variance_wrt_f(), PLearn::EntropyContrast::get_real_grad_variance_wrt_f(), PLearn::VMatrix::getColumn(), PLearn::VecExtendedVMatrix::getNewRow(), PLearn::UniformizeVMatrix::getNewRow(), PLearn::ThresholdVMatrix::getNewRow(), PLearn::TextSenseSequenceVMatrix::getNewRow(), PLearn::SubInputVMatrix::getNewRow(), PLearn::SparseVMatrix::getNewRow(), PLearn::RemapLastColumnVMatrix::getNewRow(), PLearn::RegularGridVMatrix::getNewRow(), PLearn::PLearnerOutputVMatrix::getNewRow(), PLearn::OneHotVMatrix::getNewRow(), PLearn::MovingAverageVMatrix::getNewRow(), PLearn::GeneralizedOneHotVMatrix::getNewRow(), PLearn::FinancePreprocVMatrix::getNewRow(), PLearn::FileVMatrix::getNewRow(), PLearn::ExtendedVMatrix::getNewRow(), PLearn::DiskVMatrix::getNewRow(), PLearn::CumVMatrix::getNewRow(), PLearn::CompressedVMatrix::getNewRow(), PLearn::CompactVMatrix::getNewRow(), PLearn::AutoSDBVMatrix::getNewRow(), PLearn::AsciiVMatrix::getNewRow(), PLearn::getQuantiles(), PLearn::TextSenseSequenceVMatrix::getRestrictedRow(), PLearn::VMatrix::getRow(), PLearn::CrossReferenceVMatrix::getRow(), PLearn::RemoveRowsVMatrix::getrownum(), PLearn::ToBagSplitter::getSplit(), PLearn::TestInTrainSplitter::getSplit(), PLearn::FractionSplitter::getSplit(), PLearn::VMatrixFromDistribution::getSubRow(), PLearn::VMatrix::getSubRow(), PLearn::UniformVMatrix::getSubRow(), PLearn::SubVMatrix::getSubRow(), PLearn::ShiftAndRescaleVMatrix::getSubRow(), PLearn::SelectColumnsVMatrix::getSubRow(), PLearn::RowBufferedVMatrix::getSubRow(), PLearn::NistDB::getSubRow(), PLearn::MemoryVMatrix::getSubRow(), PLearn::KernelVMatrix::getSubRow(), PLearn::InterleaveVMatrix::getSubRow(), PLearn::ConcatRowsVMatrix::getSubRow(), PLearn::ByteMemoryVMatrix::getSubRow(), PLearn::PLearner::getTestCostIndex(), PLearn::GaussianProcessRegressor::getTestCostIndex(), PLearn::SequentialModelSelector::getTestCostNames(), PLearn::PLearner::getTrainCostIndex(), PLearn::GaussianProcessRegressor::getTrainCostIndex(), PLearn::harmonic_mean(), PLearn::ConjGradientOptimizer::hestenesStiefel(), PLearn::histogram(), PLearn::Gnuplot::histoplot(), PLearn::ICBCpartition(), PLearn::ifThenElse(), PLearn::QuantilesStatsIterator::init(), PLearn::TVec< T >::input(), PLearn::UniformDistribution::inputsize(), PLearn::GaussianDistribution::inputsize(), PLearn::TVec< pair< real, real > >::insert(), PLearn::TVec< pair< real, real > >::insertSorted(), PLearn::interactiveDisplayCDF(), PLearn::inverse_sigmoid(), PLearn::inverted(), PLearn::invertElements(), PLearn::isLargerThan(), PLearn::isLargerThanOrEqualTo(), PLearn::isSmallerThan(), PLearn::isSmallerThanOrEqualTo(), PLearn::KS_test(), PLearn::lapackSolveLinearSystem(), PLearn::TVec< pair< real, real > >::lastElement(), PLearn::YMDDatedVMatrix::lengthInDates(), PLearn::linearRegression(), PLearn::loadAscii(), PLearn::loadAsciiWithoutSize(), PLearn::loadClassificationDataset(), PLearn::loadPVec(), PLearn::log(), PLearn::logadd(), PLearn::logOfCompactGaussian(), PLearn::MixtureRandomVariable::logP(), PLearn::GaussianContinuum::make_random_walk(), PLearn::VarArray::makeSharedValue(), PLearn::TVec< pair< real, real > >::makeSharedValue(), PLearn::matColumnDotVec(), PLearn::matlabR11eigs(), PLearn::SequentialModelSelector::matlabSave(), PLearn::SequentialLearner::matlabSave(), PLearn::matlabSave(), PLearn::matRowDotVec(), PLearn::matRowsDots(), PLearn::matRowsDotsAcc(), PLearn::max(), PLearn::max_cdf_diff(), PLearn::maxabs(), PLearn::mean(), PLearn::Learner::measure(), PLearn::median(), PLearn::min(), PLearn::minabs(), PLearn::multinomial_sample(), PLearn::multiply(), PLearn::multiplyAcc(), PLearn::multiplyAdd(), PLearn::multiplyScaledAdd(), PLearn::multivariate_normal(), PLearn::negateElements(), PLearn::PLS::NIPALSEigenvector(), PLearn::nonZero(), PLearn::nonZeroIndices(), PLearn::normalize(), PLearn::operator *(), PLearn::operator *=(), PLearn::operator%(), PLearn::TVec< pair< real, real > >::operator()(), PLearn::TMat< pair< real, real > >::operator()(), PLearn::operator+(), PLearn::operator+=(), PLearn::operator-(), PLearn::operator-=(), PLearn::operator/(), PLearn::operator/=(), PLearn::operator<<(), PLearn::TVec< pair< real, real > >::operator==(), PLearn::TVec< pair< real, real > >::operator[](), PLearn::ScaledGradientOptimizer::optimize(), PLearn::output_margin(), PLearn::paired_t_test(), PLearn::SequentialModelSelector::paired_t_test(), PLearn::CompactVMatrix::perturb(), PLearn::Grapher::plot_2D_classification(), PLearn::Gnuplot::plotcdf(), PLearn::Gnuplot::plotdensity(), PLearn::plotVMats(), PLearn::ConjGradientOptimizer::polakRibiere(), PLearn::positionOfClosestElement(), PLearn::positionOfkthOrderedElement(), PLearn::positiveValues(), PLearn::powdistance(), PLearn::pownorm(), PLearn::TVec< T >::print(), PLearn::TVec< T >::printcol(), PLearn::product(), PLearn::SparseMatrix::product(), PLearn::RowMapSparseMatrix< real >::product(), PLearn::productAcc(), PLearn::VMatrix::putRow(), PLearn::VMatrix::putSubRow(), PLearn::MemoryVMatrix::putSubRow(), PLearn::FileVMatrix::putSubRow(), PLearn::VecCompressor::readCompressedVec(), PLearn::rebalanceNClasses(), PLearn::ReconstructionWeightsKernel::reconstruct(), PLearn::PCA::reconstruct(), PLearn::TVec< pair< real, real > >::remove(), PLearn::remove_missing(), PLearn::removeElement(), PLearn::TVec< pair< real, real > >::removeSorted(), PLearn::VecExtendedVMatrix::reset_dimensions(), PLearn::VarRowVariable::rfprop(), PLearn::VarElementVariable::rfprop(), PLearn::TransposeProductVariable::rfprop(), PLearn::TimesScalarVariable::rfprop(), PLearn::TimesRowVariable::rfprop(), PLearn::TimesConstantVariable::rfprop(), PLearn::TimesColumnVariable::rfprop(), PLearn::TanhVariable::rfprop(), PLearn::SumVariable::rfprop(), PLearn::SumOfVariable::rfprop(), PLearn::SubMatVariable::rfprop(), PLearn::SubMatTransposeVariable::rfprop(), PLearn::SquareVariable::rfprop(), PLearn::SoftmaxVariable::rfprop(), PLearn::SoftmaxLossVariable::rfprop(), PLearn::SigmoidVariable::rfprop(), PLearn::RowAtPositionVariable::rfprop(), PLearn::ProductVariable::rfprop(), PLearn::ProductTransposeVariable::rfprop(), PLearn::PlusScalarVariable::rfprop(), PLearn::PlusRowVariable::rfprop(), PLearn::PlusConstantVariable::rfprop(), PLearn::PlusColumnVariable::rfprop(), PLearn::OneHotVariable::rfprop(), PLearn::NegateElementsVariable::rfprop(), PLearn::MinusScalarVariable::rfprop(), PLearn::LogVariable::rfprop(), PLearn::IsAboveThresholdVariable::rfprop(), PLearn::InvertElementsVariable::rfprop(), PLearn::IfThenElseVariable::rfprop(), PLearn::ExtendedVariable::rfprop(), PLearn::ExpVariable::rfprop(), PLearn::ElementAtPositionVariable::rfprop(), PLearn::DotProductVariable::rfprop(), PLearn::DivVariable::rfprop(), PLearn::ConcatRowsVariable::rfprop(), PLearn::AbsVariable::rfprop(), PLearn::RGBImagesVMatrix::RGBImagesVMatrix(), PLearn::RGBImageVMatrix::RGBImageVMatrix(), PLearn::rowmatrix(), PLearn::rowMax(), PLearn::rowMin(), PLearn::TMat< pair< real, real > >::rows(), PLearn::rowSum(), PLearn::VMatLanguage::run(), PLearn::SequentialValidation::run(), PLearn::Experiment::run(), PLearn::safelog(), PLearn::RGBImageVMatrix::sample(), PLearn::saveAscii(), PLearn::saveAsciiWithoutSize(), PLearn::SparseMatrix::saveFortran(), PLearn::saveGnuplot(), PLearn::savePVec(), PLearn::saveSNVec(), PLearn::select(), PLearn::selectAndOrder(), PLearn::selectColumns(), PLearn::SelectColumnsVMatrix::SelectColumnsVMatrix(), PLearn::selectElements(), PLearn::selectRows(), PLearn::SelectRowsVMatrix::SelectRowsVMatrix(), PLearn::SequentialModelSelector::sequenceCost(), PLearn::PDistribution::setConditionalFlagsWithoutUpdate(), PLearn::GeodesicDistanceKernel::setDataForKernelMatrix(), PLearn::DivisiveNormalizationKernel::setDataForKernelMatrix(), PLearn::AdditiveNormalizationKernel::setDataForKernelMatrix(), PLearn::RGBImageVMatrix::setImage(), PLearn::GaussianProcessRegressor::setInput_const(), PLearn::Learner::setTrainCost(), PLearn::shuffleElements(), PLearn::sigmoid(), PLearn::LimitedGaussianSmoother::smooth(), PLearn::solveLinearSystem(), PLearn::PDistribution::sortFromFlags(), PLearn::SparseVMatrix::SparseVMatrix(), PLearn::PDistribution::splitCond(), PLearn::sqrt(), PLearn::square(), PLearn::squareAcc(), PLearn::CompactVMatrix::squareDifference(), PLearn::squareMultiplyAcc(), PLearn::squareroot(), PLearn::squareSubtract(), PLearn::YMDDatedVMatrix::subDistrRelativeDays(), PLearn::YMDDatedVMatrix::subDistrRelativeMonths(), PLearn::YMDDatedVMatrix::subDistrRelativeYears(), PLearn::substract(), PLearn::TVec< pair< real, real > >::subVec(), PLearn::sum(), PLearn::sum_of_log(), PLearn::TVec< pair< real, real > >::swap(), PLearn::tanh(), PLearn::Learner::test(), PLearn::SparseMatrix::toMat(), PLearn::VVec::toVec(), PLearn::PLS::train(), PLearn::PCA::train(), PLearn::ManifoldParzen2::train(), PLearn::LinearRegressor::train(), PLearn::KernelProjection::train(), PLearn::HistogramDistribution::train(), PLearn::EntropyContrast::train(), PLearn::train_and_test(), PLearn::RealMapping::transform(), PLearn::transposeProduct(), PLearn::transposeProductAcc(), PLearn::VecCompressor::uncompressVec(), PLearn::QuantilesStatsIterator::update(), PLearn::MaxStatsIterator::update(), PLearn::MinStatsIterator::update(), PLearn::SharpeRatioStatsIterator::update(), PLearn::ConditionalStatsCollector::update(), PLearn::ConjGradientOptimizer::updateSearchDirection(), PLearn::ConditionalDistribution::use(), PLearn::variance(), PLearn::vec_counts(), PLearn::vec_find(), PLearn::Function::verifySymbolicGradient(), PLearn::weighted_mean(), PLearn::weighted_powdistance(), PLearn::weighted_variance(), PLearn::SparseMatrix::width(), PLearn::TVec< pair< real, real > >::write(), and PLearn::VecCompressor::writeCompressedVec().

template<class T>
void PLearn::TVec< T >::load const string filename  )  [inline]
 

Definition at line 308 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  ) 
 

************ Deep copying

Reimplemented in PLearn::Array< T >, PLearn::VarArray, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 64 of file TVec_impl.h.

References PLearn::deepCopyField(), and PLearn::TVec< T >::storage.

Referenced by PLearn::TVec< T >::deepCopy(), and PLearn::deepCopyField().

template<class T>
void PLearn::TVec< T >::makeSharedValue T *  x,
int  n
[inline]
 

make the storage point to this address and copy current value to it (i.e. without changing current contents)

< get data start

Definition at line 408 of file TVec_decl.h.

template<class T>
int PLearn::TVec< T >::offset  )  const [inline]
 

Definition at line 182 of file TVec_decl.h.

Referenced by PLearn::TVec< pair< real, real > >::write().

template<class T>
PLearn::TVec< T >::operator char *  )  const [inline]
 

used by Hash (VERY DIRTY: TO BE REMOVED [Pascal])

Reimplemented in PLearn::Array< T >, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 198 of file TVec_decl.h.

template<class T>
PLearn::TVec< T >::operator vector  )  const [inline]
 

Definition at line 156 of file TVec_decl.h.

template<class T>
bool PLearn::TVec< T >::operator!  )  const [inline]
 

To allow if(!v) statements.

This method is commented out because it is much too dangerous: it allows a TVec to be converted into an int, which can cause some very weird bugs that the compiler would have caught otherwise.

Reimplemented in PLearn::Array< T >, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 443 of file TVec_decl.h.

template<class T>
bool PLearn::TVec< T >::operator!= const TVec< T > &  value  )  const [inline]
 

Definition at line 681 of file TVec_decl.h.

template<class T>
template<class I>
TVec<T> PLearn::TVec< T >::operator() const TVec< I > &  indices  )  const [inline]
 

select the elements of the source (this) as specified by the TVector of indices (between 0 and this->length()-1) into the returned TVector (which will have the same length() as the indices TVector).

Definition at line 632 of file TVec_decl.h.

template<class T>
template<class I>
void PLearn::TVec< T >::operator() const TVec< I > &  indices,
TVec< T > &  destination
const [inline]
 

Deprecated: use the select function instead.

Definition at line 623 of file TVec_decl.h.

template<class T>
TVec<T>* PLearn::TVec< T >::operator->  )  [inline]
 

Definition at line 447 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::operator<< const string datastring  )  const [inline]
 

Definition at line 766 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::operator= const T &  f  )  const [inline]
 

same as fill(f)

Definition at line 468 of file TVec_decl.h.

template<class T>
const TVec<T>& PLearn::TVec< T >::operator= const TVec< T > &  other  )  [inline]
 

NOTE: operator= COPIES THE TVec STRUCTURE BUT NOT THE DATA (use operator<< to copy data).

Reimplemented in PLearn::Array< T >, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 148 of file TVec_decl.h.

template<class T>
bool PLearn::TVec< T >::operator== const TVec< T > &  value  )  const [inline]
 

return true if (*this)[i]==value[i] for all i, 0 otherwise

Definition at line 671 of file TVec_decl.h.

template<class T>
TVec<bool> PLearn::TVec< T >::operator== const T &  value  )  const [inline]
 

return a vector with 1's when (*this)[i]==value for all i, 0 otherwise

Definition at line 659 of file TVec_decl.h.

template<class T>
T& PLearn::TVec< T >::operator[] unsigned int  i  )  const [inline]
 

Definition at line 597 of file TVec_decl.h.

template<class T>
T& PLearn::TVec< T >::operator[] int  i  )  const [inline]
 

Reimplemented in PLearn::RVArray, and PLearn::VarArray.

Definition at line 587 of file TVec_decl.h.

template<class T>
T PLearn::TVec< T >::pop  )  [inline]
 

Definition at line 569 of file TVec_decl.h.

Referenced by PLearn::VMatLanguage::run().

template<class T>
void PLearn::TVec< T >::pop_back  )  [inline]
 

Definition at line 558 of file TVec_decl.h.

Referenced by PLearn::StatsCollector::getBinMapping(), and PLearn::TVec< pair< real, real > >::pop().

template<class T>
void PLearn::TVec< T >::print ostream &  out,
const string separator
const
 

each value is printed with the given separator string between them

Definition at line 129 of file TMat_impl.h.

References PLearn::TVec< T >::data(), and PLearn::TVec< T >::length().

template<class T>
void PLearn::TVec< T >::print ostream &  out = cout  )  const
 

the data is printed on a single row, no newline

Reimplemented in PLearn::Array< T >, PLearn::Array< real >, PLearn::Array< ofstream * >, PLearn::Array< RGBImage * >, PLearn::Array< CostFunc >, PLearn::Array< VMFieldStat >, PLearn::Array< Measurer * >, PLearn::Array< TMat< int > >, PLearn::Array< Array< string > >, PLearn::Array< PSDBVMFieldDiscrete >, PLearn::Array< StatsIt >, PLearn::Array< PP< HyperOptimizer > >, PLearn::Array< VMField >, PLearn::Array< Mat >, PLearn::Array< string >, PLearn::Array< RVInstance >, PLearn::Array< Vec >, PLearn::Array< VMat >, PLearn::Array< Var >, PLearn::Array< RandomVar >, and PLearn::Array< char * >.

Definition at line 116 of file TMat_impl.h.

References PLearn::TVec< T >::data(), PLearn::TVec< T >::length(), and PLearn::TVec< T >::storage.

Referenced by PLearn::operator<<().

template<class T>
void PLearn::TVec< T >::printcol ostream &  out = cout  )  const
 

printed as a column

Definition at line 140 of file TMat_impl.h.

References PLearn::TVec< T >::data(), and PLearn::TVec< T >::length().

template<class T>
void PLearn::TVec< T >::println ostream &  out = cout  )  const [inline]
 

same with newline

Definition at line 756 of file TVec_decl.h.

Referenced by PLearn::Experiment::run().

template<class T>
void PLearn::TVec< T >::push const T &  newval  )  [inline]
 

stack interface compatibility

Definition at line 566 of file TVec_decl.h.

Referenced by PLearn::VMatLanguage::run().

template<class T>
void PLearn::TVec< T >::push_back const T &  newval  )  [inline]
 

stl compatibility

Definition at line 555 of file TVec_decl.h.

Referenced by PLearn::RealMapping::buildOrderedMapping(), PLearn::getList(), PLearn::DatedJoinVMatrix::getNewRow(), PLearn::WordNetOntology::getSecondLevelSensesForWord(), PLearn::WordNetOntology::getThirdLevelSensesForWord(), and PLearn::AdaBoost::train().

template<class T>
void PLearn::TVec< T >::read PStream in  )  [inline]
 

reads the Vec from the PStream: Note that users should rather use the form in >> v;

Definition at line 258 of file TVec_decl.h.

Referenced by PLearn::operator>>().

template<class T>
void PLearn::TVec< T >::remove int  position  )  [inline]
 

removes element at position, Length is decreased by 1

Definition at line 489 of file TVec_decl.h.

template<class T>
void PLearn::TVec< T >::removeSorted value  )  [inline]
 

Definition at line 519 of file TVec_decl.h.

Referenced by PLearn::RemoveRowsVMatrix::unremove().

template<class T>
void PLearn::TVec< T >::resize int  newlength,
int  extrabytes = 0
[inline]
 

Resizes the TVector to a new length The underlying storage is never shrunk and it is grown only if it is not already big enough When grown, extrabytes are allocated to anticipate further grows

Definition at line 210 of file TVec_decl.h.

Referenced by PLearn::add(), PLearn::GaussianKernel::addDataForKernelMatrix(), PLearn::SDBVMatrix::appendField(), PLearn::Kernel::apply(), PLearn::autocorrelation_function(), PLearn::averageAcrossRowsAndColumns(), PLearn::RowMapSparseValueMatrix< T >::averageAcrossRowsAndColumns(), PLearn::RowMapSparseMatrix< real >::averageAcrossRowsAndColumns(), PLearn::binread(), PLearn::binread_double(), PLearn::bootstrap(), PLearn::bprop_tanh(), PLearn::YMDDatedVMatrix::build_(), PLearn::PreprocessingVMatrix::build_(), PLearn::SumOverBagsVariable::build_(), PLearn::SumOfVariable::build_(), PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::SequentialModelSelector::build_(), PLearn::SemiSupervisedProbClassCostVariable::build_(), PLearn::SelectInputSubsetLearner::build_(), PLearn::ProjectionErrorVariable::build_(), PLearn::ProcessingVMatrix::build_(), PLearn::PLS::build_(), PLearn::PLearnerOutputVMatrix::build_(), PLearn::Optimizer::build_(), PLearn::NNet::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::NearestNeighborPredictionCost::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MovingAverageVMatrix::build_(), PLearn::MatrixSumOfVariable::build_(), PLearn::LocalNeighborsDifferencesVMatrix::build_(), PLearn::KernelVMatrix::build_(), PLearn::KernelProjection::build_(), PLearn::JoinVMatrix::build_(), PLearn::GraphicalBiText::build_(), PLearn::GaussMix::build_(), PLearn::GaussianProcessRegressor::build_(), PLearn::GaussianContinuum::build_(), PLearn::EntropyContrast::build_(), PLearn::DiskVMatrix::build_(), PLearn::DatedJoinVMatrix::build_(), PLearn::CumVMatrix::build_(), PLearn::ConjGradientOptimizer::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::ConcatOfVariable::build_(), PLearn::AddCostToLearner::build_(), PLearn::AdaptGradientOptimizer::build_(), PLearn::RealMapping::buildOrderedMapping(), PLearn::HistogramDistribution::calc_density_from_survival(), PLearn::HistogramDistribution::calc_survival_from_density(), PLearn::CompactVMatrix::CompactVMatrix(), PLearn::ComplementedProbSparseMatrix::complement(), PLearn::complement_indices(), PLearn::GraphicalBiText::compute_BN_likelihood(), PLearn::GraphicalBiText::compute_efs_likelihood(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::DivisiveNormalizationKernel::computeAverage(), PLearn::AdditiveNormalizationKernel::computeAverage(), PLearn::Learner::computeCosts(), PLearn::PDistribution::computeCostsFromOutputs(), PLearn::PCA::computeCostsFromOutputs(), PLearn::MultiInstanceNNet::computeCostsFromOutputs(), PLearn::LinearRegressor::computeCostsFromOutputs(), PLearn::Learner::computeCostsFromOutputs(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::ClassifierFromDensity::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::StatefulLearner::computeCostsOnly(), PLearn::PLearner::computeCostsOnly(), PLearn::GaussianProcessRegressor::computeCostsOnly(), PLearn::computeInputMean(), PLearn::computeInputMeanAndCovar(), PLearn::computeInputMeanAndVariance(), PLearn::GaussMix::computeLogLikelihood(), PLearn::computeMean(), PLearn::computeMeanAndCovar(), PLearn::computeMeanAndVariance(), PLearn::Kernel::computeNearestNeighbors(), PLearn::TangentLearner::computeOutput(), PLearn::StatefulLearner::computeOutput(), PLearn::PLS::computeOutput(), PLearn::PDistribution::computeOutput(), PLearn::PCA::computeOutput(), PLearn::LinearRegressor::computeOutput(), PLearn::Learner::computeOutput(), PLearn::KernelProjection::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::ConstantRegressor::computeOutput(), PLearn::ClassifierFromDensity::computeOutput(), PLearn::AdaBoost::computeOutput(), PLearn::computeOutputFields(), PLearn::GaussMix::computePosteriors(), PLearn::computeRange(), PLearn::computeRanges(), PLearn::computeRanks(), PLearn::computeRowMean(), PLearn::computeWeightedMean(), PLearn::computeWeightedMeanAndCovar(), PLearn::ReconstructionWeightsKernel::computeWeights(), PLearn::computeXYPositions(), PLearn::SDBVMFieldICBCClassification::convertField(), PLearn::displayHistogram(), PLearn::divide(), PLearn::VMatrix::dot(), PLearn::RowBufferedVMatrix::dot(), PLearn::eigen_SymmMat(), PLearn::eigenSparseNonSymmMat(), PLearn::eigenSparseSymmMat(), PLearn::eigenVecOfSymmMat(), PLearn::MatlabInterface::eigs_r11(), PLearn::ProductRandomVariable::EMTrainingInitialize(), PLearn::PDistribution::ensureFullJointDistribution(), PLearn::Kernel::evaluate_i_j(), PLearn::Kernel::evaluate_i_x(), PLearn::Kernel::evaluate_x_i(), PLearn::exp(), PLearn::GaussMix::expectation(), PLearn::GaussianProcessRegressor::expectation(), PLearn::ConditionalDensityNet::expectation(), PLearn::SumOfVariable::fbprop(), PLearn::VMatrix::find(), PLearn::ConcatRowsVMatrix::findCommonFields(), PLearn::LiftStatsIterator::finish(), PLearn::KernelProjection::forget(), PLearn::AdaBoost::forget(), PLearn::SumOfVariable::fprop(), PLearn::SumOverBagsVariable::fpropOneBag(), PLearn::fullyRebalance2Classes(), PLearn::generalizedEigenVecOfSymmMat(), PLearn::SpiralDistribution::generate(), PLearn::GaussianDistribution::generate(), PLearn::ConditionalDensityNet::generate(), PLearn::GaussMix::generateFromGaussian(), PLearn::RowBufferedVMatrix::get(), PLearn::StatsCollector::getAllValuesMapping(), PLearn::StatsCollector::getBinMapping(), PLearn::VMatrix::getExample(), PLearn::SDBVMFieldRemapIntervals::getIntervals(), PLearn::LocalNeighborsDifferencesVMatrix::getNewRow(), PLearn::LearnerProcessedVMatrix::getNewRow(), PLearn::KNNVMatrix::getNewRow(), PLearn::RowBufferedVMatrix::getRow(), PLearn::TrainTestSplitter::getSplit(), PLearn::TrainTestBagsSplitter::getSplit(), PLearn::RowBufferedVMatrix::getSubRow(), PLearn::LiftStatsIterator::init(), PLearn::GraphicalBiText::init(), PLearn::GraphicalBiText::init_WSD(), PLearn::NNet::initializeParams(), PLearn::GaussMix::kmeans(), PLearn::lapackEIGEN(), PLearn::lapackGeneralizedEIGEN(), PLearn::lapackSolveLinearSystem(), PLearn::lapackSVD(), PLearn::loadAscii(), PLearn::GraphicalBiText::loadBitext(), PLearn::SparseMatrix::loadFortran(), PLearn::loadPVec(), PLearn::loadUCIAMat(), PLearn::loadUCIMLDB(), PLearn::loadUCISet(), PLearn::LocallyWeightedDistribution::log_density(), PLearn::GaussMix::log_density(), PLearn::ConditionalDensityNet::log_density(), PLearn::logOfCompactGaussian(), PLearn::logOfNormal(), PLearn::GaussianContinuum::make_random_walk(), PLearn::matlabR11eigs(), PLearn::matlabSave(), PLearn::max(), PLearn::min(), PLearn::multiply(), PLearn::multiplyAdd(), PLearn::multivariate_normal(), PLearn::newVecArray(), PLearn::nonZeroIndices(), PLearn::SmoothedProbSparseMatrix::normalizeCondBackoff(), PLearn::SmoothedProbSparseMatrix::normalizeCondLaplace(), PLearn::operator+(), PLearn::GradientOptimizer::optimize(), PLearn::GradientOptimizer::optimizeN(), PLearn::CompactVMatrix::perturb(), PLearn::plotVMats(), PLearn::SumOfVariable::printInfo(), PLearn::rebalanceNClasses(), PLearn::ReconstructionWeightsKernel::reconstruct(), PLearn::PCA::reconstruct(), PLearn::remove_missing(), PLearn::SparseMatrix::resize(), PLearn::PDistribution::resizeParts(), PLearn::GaussMix::resizeStuffBeforeTraining(), PLearn::RGBImagesVMatrix::RGBImagesVMatrix(), PLearn::VMatLanguage::run(), PLearn::RGBImagesVMatrix::sample(), PLearn::RGBImageVMatrix::sample(), PLearn::PDistribution::setConditionalFlagsWithoutUpdate(), PLearn::GaussianKernel::setDataForKernelMatrix(), PLearn::DivisiveNormalizationKernel::setDataForKernelMatrix(), PLearn::DistanceKernel::setDataForKernelMatrix(), PLearn::AdditiveNormalizationKernel::setDataForKernelMatrix(), PLearn::SDBVMFieldMultiDiscrete::setFields(), PLearn::GaussMix::setInput(), PLearn::ConditionalGaussianDistribution::setInput(), PLearn::Learner::setTrainCost(), PLearn::ScaledConditionalCDFSmoother::smooth(), PLearn::LimitedGaussianSmoother::smooth(), PLearn::PDistribution::sortFromFlags(), PLearn::SparseMatrix::SparseMatrix(), PLearn::StrTableVMatrix::StrTableVMatrix(), PLearn::substract(), PLearn::temporalThreshold(), PLearn::Learner::test(), PLearn::GraphicalBiText::test_WSD(), PLearn::PCA::train(), PLearn::LinearRegressor::train(), PLearn::KernelProjection::train(), PLearn::HistogramDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::ConstantRegressor::train(), PLearn::ConditionalGaussianDistribution::train(), PLearn::ClassifierFromDensity::train(), PLearn::AdaBoost::train(), PLearn::UniformDistribution::UniformDistribution(), PLearn::LiftStatsIterator::update(), PLearn::Learner::useAndCostOnTestVec(), and PLearn::viewVMat().

template<class T>
void PLearn::TVec< T >::save const string filename  )  const [inline]
 

Definition at line 307 of file TVec_decl.h.

template<class T>
int PLearn::TVec< T >::size  )  const [inline]
 

Definition at line 179 of file TVec_decl.h.

Referenced by PLearn::add(), PLearn::addprepostfix(), PLearn::NNet::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MovingAverageVMatrix::build_(), PLearn::DatedJoinVMatrix::build_(), PLearn::CumVMatrix::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::Array< char * >::byteLength(), PLearn::SmoothedProbSparseMatrix::checkCondProbIntegrity(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::computeInputMeanAndVariance(), PLearn::HistogramDistribution::computeOutput(), PLearn::VarArray::copyGradientFrom(), PLearn::Learner::costNames(), PLearn::VVMatrix::createPreproVMat(), PLearn::cross_valid(), PLearn::HistogramDistribution::expectation(), PLearn::SDBVMFieldMultiDiscrete::getDiscreteValue(), PLearn::ThresholdVMatrix::getNewRow(), PLearn::TextSenseSequenceVMatrix::getNewRow(), PLearn::TextSenseSequenceVMatrix::getRestrictedRow(), PLearn::GraphicalBiText::init(), PLearn::NNet::initializeParams(), PLearn::interactiveDisplayCDF(), PLearn::join(), PLearn::loadAscii(), PLearn::loadAsciiAsVMat(), PLearn::loadUCISet(), PLearn::SmoothedProbSparseMatrix::normalizeCondBackoff(), PLearn::operator &(), PLearn::Array< char * >::operator<(), PLearn::operator<<(), PLearn::Array< char * >::operator<=(), PLearn::Array< char * >::operator=(), PLearn::Array< char * >::operator==(), PLearn::Array< char * >::operator>(), PLearn::Array< char * >::operator>=(), PLearn::operator>>(), PLearn::HCoordinateDescent::optimize(), PLearn::PTester::perform(), PLearn::TextSenseSequenceVMatrix::permute(), PLearn::Grapher::plot_1D_regression(), PLearn::Grapher::plot_2D_classification(), PLearn::Gnuplot::plotcdf(), PLearn::Gnuplot::plotdensity(), PLearn::prettyprint_test_results(), PLearn::GraphicalBiText::print(), PLearn::VMatLanguage::pstackSize(), PLearn::VMatLanguage::run(), PLearn::Experiment::run(), PLearn::saveAscii(), PLearn::GraphicalBiText::sensetag_valid_bitext(), PLearn::GraphicalBiText::senseTagBitext(), PLearn::SDBVMFieldMultiDiscrete::setFields(), PLearn::ConditionalGaussianDistribution::setInput(), PLearn::JulianizeVMatrix::setVMFields(), PLearn::FinancePreprocVMatrix::setVMFields(), PLearn::ScaledConditionalCDFSmoother::smooth(), PLearn::SortRowsVMatrix::sortRows(), PLearn::swap(), PLearn::GraphicalBiText::test_WSD(), PLearn::Learner::testResultsNames(), PLearn::VecStatsCollector::update(), PLearn::GraphicalBiText::update_WSD_model(), PLearn::HistogramDistribution::variance(), PLearn::vconcat(), and PLearn::vmatmain().

template<class T>
TVec<T> PLearn::TVec< T >::subVec Range  r  )  [inline]
 

Definition at line 337 of file TVec_decl.h.

template<class T>
TVec<T> PLearn::TVec< T >::subVec int  newstart,
int  newlength
const [inline]
 

Returns a sub-TVector.

Definition at line 311 of file TVec_decl.h.

Referenced by PLearn::Learner::apply(), PLearn::Learner::applyAndComputeCosts(), PLearn::bootstrap(), PLearn::VMatrixFromDistribution::build_(), PLearn::TrainValidTestSplitter::build_(), PLearn::SumOverBagsVariable::build_(), PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::ProjectionErrorVariable::build_(), PLearn::PLearnerOutputVMatrix::build_(), PLearn::MovingAverageVMatrix::build_(), PLearn::CumVMatrix::build_(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::computeConditionalMeans(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::GaussianProcessRegressor::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::Learner::computeLeaveOneOutCosts(), PLearn::PLS::computeOutput(), PLearn::PDistribution::computeOutput(), PLearn::PConditionalDistribution::computeOutput(), PLearn::LinearRegressor::computeOutput(), PLearn::GaussianProcessRegressor::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::computeWeightedMeanAndCovar(), PLearn::constrainedLinearRegression(), PLearn::RowBufferedVMatrix::dot(), PLearn::ConcatColumnsVMatrix::dot(), PLearn::CompactVMatrix::dot(), PLearn::eigenSparseNonSymmMat(), PLearn::eigenSparseSymmMat(), PLearn::ExtendedRandomVariable::EMBprop(), PLearn::JointRandomVariable::EMBprop(), PLearn::Kernel::estimateHistograms(), PLearn::WeightedCostFunction::evaluate(), PLearn::SelectedOutputCostFunction::evaluate(), PLearn::ConcatOfVariable::fbprop(), PLearn::ConcatOfVariable::fprop(), PLearn::SumOverBagsVariable::fpropOneBag(), PLearn::VecExtendedVMatrix::getNewRow(), PLearn::SubInputVMatrix::getNewRow(), PLearn::RemapLastColumnVMatrix::getNewRow(), PLearn::PLearnerOutputVMatrix::getNewRow(), PLearn::OneHotVMatrix::getNewRow(), PLearn::LearnerProcessedVMatrix::getNewRow(), PLearn::KNNVMatrix::getNewRow(), PLearn::JoinVMatrix::getNewRow(), PLearn::GeneralizedOneHotVMatrix::getNewRow(), PLearn::FinancePreprocVMatrix::getNewRow(), PLearn::ExtendedVMatrix::getNewRow(), PLearn::DatedJoinVMatrix::getNewRow(), PLearn::ConcatColumnsVMatrix::getNewRow(), PLearn::SDBVMatrix::getRow(), PLearn::grep(), PLearn::ConditionalDensityNet::initializeParams(), PLearn::loadClassificationDataset(), PLearn::loadUCIAMat(), PLearn::loadUCISet(), PLearn::LocallyWeightedDistribution::log_density(), PLearn::GaussianContinuum::make_random_walk(), PLearn::SequentialModelSelector::matlabSave(), PLearn::VarArray::maxUpdate(), PLearn::normalize(), PLearn::operator &(), PLearn::PTester::perform(), PLearn::printDistanceStatistics(), PLearn::randomSplit(), PLearn::removeElement(), PLearn::RGBImagesVMatrix::RGBImagesVMatrix(), PLearn::SequentialValidation::run(), PLearn::Experiment::run(), PLearn::RGBImagesVMatrix::sample(), PLearn::SequentialModelSelector::sequenceCost(), PLearn::PDistribution::setConditionalFlagsWithoutUpdate(), PLearn::GaussMix::setInput(), PLearn::split(), PLearn::PDistribution::splitCond(), PLearn::Kernel::test(), PLearn::LinearRegressor::train(), PLearn::KernelProjection::train(), PLearn::ConditionalDensityNet::train(), PLearn::train_and_test(), PLearn::VarArray::update(), PLearn::use(), PLearn::ConditionalDistribution::use(), and PLearn::Learner::useAndCostOnTestVec().

template<class T>
void PLearn::TVec< T >::swap  )  [inline]
 

swaps first and last element, second and second last, etc... (mirror symmetry).

Definition at line 650 of file TVec_decl.h.

Referenced by PLearn::eigen_SymmMat_decreasing(), PLearn::eigenVecOfSymmMat(), and PLearn::generalizedEigenVecOfSymmMat().

template<class T>
TMat< T > PLearn::TVec< T >::toMat int  newlength,
int  newwidth
const [inline]
 

The returned TMat will view the same data.

Definition at line 91 of file TMat_impl.h.

References PLearn::TMat< T >::length_, PLearn::TMat< T >::mod_, PLearn::TVec< T >::offset_, PLearn::TMat< T >::offset_, PLearn::TVec< T >::storage, PLearn::TMat< T >::storage, and PLearn::TMat< T >::width_.

Referenced by PLearn::ProjectionErrorVariable::build_(), PLearn::columnmatrix(), PLearn::PConditionalDistribution::computeOutput(), PLearn::ProductRandomVariable::EMBprop(), PLearn::QuantilesStatsIterator::finish(), PLearn::LocalNeighborsDifferencesVMatrix::getNewRow(), PLearn::ToBagSplitter::getSplit(), PLearn::rowmatrix(), PLearn::solveLinearSystem(), and PLearn::AdaBoost::train().

template<class T>
T& PLearn::TVec< T >::top  )  const [inline]
 

Definition at line 572 of file TVec_decl.h.

Referenced by PLearn::VMatLanguage::run().

template<class T>
void PLearn::TVec< T >::write PStream out  )  const [inline]
 

writes the Vec to the PStream: Note that users should rather use the form out << v;

Definition at line 237 of file TVec_decl.h.


Friends And Related Function Documentation

template<class T>
friend class TMat< T > [friend]
 

Definition at line 74 of file TVec_decl.h.


Member Data Documentation

template<class T>
int PLearn::TVec< T >::length_ [protected]
 

The length of the data

Definition at line 84 of file TVec_decl.h.

Referenced by PLearn::TMat< pair< real, real > >::operator()(), PLearn::TVec< pair< real, real > >::operator=(), PLearn::TVec< pair< real, real > >::read(), PLearn::TVec< pair< real, real > >::subVec(), and PLearn::TMat< T >::toVec().

template<class T>
int PLearn::TVec< T >::offset_ [protected]
 

the displacement to do with respect to storage->data

Definition at line 85 of file TVec_decl.h.

Referenced by PLearn::Variable::makeSharedGradient(), PLearn::VarArray::makeSharedGradient(), PLearn::Variable::makeSharedRValue(), PLearn::VarArray::makeSharedRValue(), PLearn::Variable::makeSharedValue(), PLearn::TMat< pair< real, real > >::operator()(), PLearn::TVec< pair< real, real > >::operator=(), PLearn::TVec< pair< real, real > >::read(), PLearn::TVec< pair< real, real > >::subVec(), PLearn::TVec< T >::toMat(), and PLearn::TMat< T >::toVec().

template<class T>
PP< Storage<T> > PLearn::TVec< T >::storage [protected]
 

where the data is really kept

Definition at line 86 of file TVec_decl.h.

Referenced by PLearn::TVec< T >::makeDeepCopyFromShallowCopy(), PLearn::Variable::makeSharedGradient(), PLearn::VarArray::makeSharedGradient(), PLearn::Variable::makeSharedRValue(), PLearn::VarArray::makeSharedRValue(), PLearn::Variable::makeSharedValue(), PLearn::VarArray::makeSharedValue(), PLearn::TMat< pair< real, real > >::operator()(), PLearn::TVec< pair< real, real > >::operator=(), PLearn::TVec< T >::print(), PLearn::TVec< pair< real, real > >::read(), PLearn::TVec< T >::toMat(), and PLearn::TMat< T >::toVec().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:24:06 2004 for PLearn by doxygen 1.3.7