PLearn 0.1
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
PLearn Namespace Reference

< for swap More...

Namespaces

namespace  SDBFields

Classes

class  Array
class  TypeTraits< Array< T > >
class  Array2ArrayMap
class  Option
 Template class for option definitions. More...
class  ArrayAllocatorOptions
class  ArrayAllocator
class  ArrayAllocatorIndex
 This type represents an index into the allocated memory, as a bit-field parameterized by the template argument SizeBits. More...
class  ArrayAllocatorTrivial
 This allocator solely performs allocation. More...
class  BoundedMemoryCache
 Class description: More...
class  Cache
 Class description: More...
class  Callback
 This is a virtual base class that contains a single abstract method callback() More...
struct  DoublyLinkedListElement
 Class description: More...
class  DoublyLinkedList
 Class description: More...
class  PLearnInit
struct  HelpSystem
class  Object
 Object is the base class of all high level PLearn objects. More...
class  ObjectOptionsIterator
 An ObjectOptionsIterator iterates across all accessible sub-objects of a given PLearn::Object. More...
class  ObjectGraphIterator
 An ObjectGraphIterator iterates through all objects through options. More...
class  DiffTemplate
class  StaticOption
 Template class for static option definitions This is not thread safe while loading or saving! If you have some data in memory then load some other, the static value will be overwrited! This will be saved and loaded for each instance, but will override the station version each time. More...
class  TVecOption
class  TVecStaticOption
class  OptionBase
 Base class for option definitions. More...
class  ParentableObject
 Object which maintains a "parent" pointer as part of an object graph. More...
class  DiffTemplate< ObjectType, ParentableObject >
class  TypeTraits< ParentableObject >
class  TypedParentableObject
class  TypeTraits< TypedParentableObject< ParentT > >
class  TransparentParentable
 Special type of ParentableObject that cannot act as a visible parent. More...
class  DiffTemplate< ObjectType, TransparentParentable >
class  TypeTraits< TransparentParentable >
class  PDate
class  TypeTraits< PDate >
class  PDateTime
class  PLearnDiff
class  DiffTemplate< ObjectType, PLearnDiff >
class  TypeTraits< PLearnDiff >
class  PLearnError
class  PMemArena
 A PMemArena is a fixed-size contiguous block of memory for allocating objects of the SAME SIZE. More...
class  PMemPool
 A PMemPool is a collection of arenas for allocating an arbitrary number of objects of a fixed size. More...
class  PObjectPool
 A PObjectPool is a thin wrapper around PMemPool that provides typed pointers on the allocated memory. More...
class  PPointable
class  PP
class  TypeTraits< PP< T > >
class  MultiMap
class  ProgressBarPlugin
 Base class for pb plugins. More...
class  TextProgressBarPlugin
 Simple plugin for displaying text progress bar. More...
class  RemoteProgressBarPlugin
 Similar to TextProgressBarPlugin with a different output format so that remote servers can update progress bars on a client. More...
class  LineOutputProgressBarPlugin
 Similar to TextProgressBarPlugin with a different output format so that updates appear on different lines of output. More...
struct  NullProgressBarPlugin
 Simpler plugin that doesn't display a progress bar at all. More...
class  ProgressBar
 This class will help you display progress of a calculation. More...
class  Range
class  RealRange
 represents a real range: i.e. one of ]low,high[ ; [low,high[; [low,high]; ]low,high] More...
class  RealMapping
 Mapping between ranges and values. More...
class  DiffTemplate< ObjectType, RealMapping >
class  TypeTraits< RealMapping >
struct  BodyDoc
 Documentation for remote method body. More...
struct  ArgDoc
 Documentation for a single remote method argument. More...
struct  RetDoc
 Documentation for a remote method return value. More...
struct  ArgTypeDoc
 Documentation for a method argument type (just contains the type as a string) More...
struct  RetTypeDoc
 Documentation for a method return type (just contains the type as a string) More...
class  RemoteMethodDoc
 Documentation holder for a remote method. More...
class  RemoteMethodMap
 Map for determining a trampoline from a method-name+arity. More...
struct  RemoteTrampoline
 Base for the trampoline mechanism of PLearn remote method invocation. More...
struct  RemoteTrampoline_0
 Trampoline for a non-void non-const 0-argument method. More...
struct  RemoteTrampoline_0< T, void >
 Trampoline for a void non-const 0-argument method. More...
struct  RemoteTrampoline_1
 Trampoline for a non-void non-const 1-argument method. More...
struct  RemoteTrampoline_1< T, void, A1 >
 Trampoline for a void non-const 1-argument method. More...
struct  RemoteTrampoline_2
 Trampoline for a non-void non-const 2-argument method. More...
struct  RemoteTrampoline_2< T, void, A1, A2 >
 Trampoline for a void non-const 2-argument method. More...
struct  RemoteTrampoline_3
 Trampoline for a non-void non-const 3-argument method. More...
struct  RemoteTrampoline_3< T, void, A1, A2, A3 >
 Trampoline for a void non-const 3-argument method. More...
struct  RemoteTrampoline_4
 Trampoline for a non-void non-const 4-argument method. More...
struct  RemoteTrampoline_4< T, void, A1, A2, A3, A4 >
 Trampoline for a void non-const 4-argument method. More...
struct  RemoteTrampoline_5
 Trampoline for a non-void non-const 5-argument method. More...
struct  RemoteTrampoline_5< T, void, A1, A2, A3, A4, A5 >
 Trampoline for a void non-const 5-argument method. More...
struct  RemoteTrampoline_6
 Trampoline for a non-void non-const 6-argument method. More...
struct  RemoteTrampoline_6< T, void, A1, A2, A3, A4, A5, A6 >
 Trampoline for a void non-const 6-argument method. More...
struct  FRemoteTrampoline_0
 Trampolines for functions. More...
struct  FRemoteTrampoline_0< void >
 Trampoline for a void 0-argument function. More...
struct  FRemoteTrampoline_1
 Trampoline for a non-void 1-argument function. More...
struct  FRemoteTrampoline_1< void, A1 >
 Trampoline for a void 1-argument function. More...
struct  FRemoteTrampoline_2
 Trampoline for a non-void 2-argument function. More...
struct  FRemoteTrampoline_2< void, A1, A2 >
 Trampoline for a void 2-argument function. More...
struct  FRemoteTrampoline_3
 Trampoline for a non-void 3-argument function. More...
struct  FRemoteTrampoline_3< void, A1, A2, A3 >
 Trampoline for a void 3-argument function. More...
struct  FRemoteTrampoline_4
 Trampoline for a non-void 4-argument function. More...
struct  FRemoteTrampoline_4< void, A1, A2, A3, A4 >
 Trampoline for a void 4-argument function. More...
struct  FRemoteTrampoline_5
 Trampoline for a non-void 5-argument function. More...
struct  FRemoteTrampoline_5< void, A1, A2, A3, A4, A5 >
 Trampoline for a void 5-argument function. More...
struct  FRemoteTrampoline_6
 Trampoline for a non-void 6-argument function. More...
struct  FRemoteTrampoline_6< void, A1, A2, A3, A4, A5, A6 >
 Trampoline for a void 6-argument function. More...
class  SetOption
class  DiffTemplate< ObjectType, SetOption >
class  TypeTraits< SetOption >
class  SmallVector
class  StaticInitializer
 A StaticInitializer is typically declared as a static member of a class, and given a parameter that is a static initialization function for said class. More...
class  Storage
class  StringTable
struct  X
class  DiffTemplate< ObjectType, X >
class  TypeTraits< X >
class  Y
class  DiffTemplate< ObjectType, Y >
class  TypeTraits< Y >
class  Z
class  DiffTemplate< ObjectType, Z >
class  TypeTraits< Z >
class  ObjectGraphIteratorTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  PLCheckTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  PLStringutilsTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  Parent
class  ChildA
class  ChildB
class  Other
class  Test_PP
class  PPTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  TinyVector
 Compile-time fixed-size vector with interface close to std::vector. More...
class  TinyVectorTrait
 Define "missing-value" for a number of types with TinyVector. More...
class  TinyVectorTrait< unsigned char >
class  TinyVectorTrait< signed char >
class  TinyVectorTrait< char >
class  TinyVectorTrait< unsigned short >
class  TinyVectorTrait< short >
class  TinyVectorTrait< unsigned int >
class  TinyVectorTrait< int >
class  TypeTraits< tuple< T1 > >
class  TypeTraits< tuple< T1, T2 > >
class  TypeTraits< tuple< T1, T2, T3 > >
class  TypeTraits< tuple< T1, T2, T3, T4 > >
class  TypeTraits< tuple< T1, T2, T3, T4, T5 > >
class  TypeTraits< tuple< T1, T2, T3, T4, T5, T6 > >
class  TypeMapEntry
 Description of a single type within the TypeMap. More...
class  TypeFactory
 Create new objects given their type name (as a string). More...
class  TypeTraits
 TypeTraits provides a type-information mechanism for C++ types. More...
class  TypeTraits< T * >
class  TypeTraits< T const >
class  TypeTraits< string >
class  TypeTraits< std::vector< T > >
class  TypeTraits< std::list< T > >
class  TypeTraits< std::pair< T, U > >
class  TypeTraits< std::map< T, U > >
class  TypeTraits< std::set< T > >
class  TypeTraits< std::priority_queue< T > >
class  StringFieldMapping
class  NumToStringMapping
class  AutoSDBVMatrix
 A VMatrix view of a SimpleDB: columns whose type is string are removed from the view, all others are converted to real (characters to their ascii code, and dates to the float date format: 990324) More...
class  VMatrixExtensionRegistrar
 Extension registrar for new file types. More...
class  NistDB
class  SDBVMOutputCoder
class  SDBVMField
class  SDBVMSource
 A SDBVMSource represents a source for a value that can be either directly a field from a SDB or an already processed SDBVMField. More...
class  SDBVMatrix
class  SDBVMFieldSource1
 A field that maps exactly 1 SDB field to a VMatrix segment (abstract) More...
class  SDBVMFieldSource2
 A field that maps exactly 2 SDB fields to a VMatrix segment (abstract) More...
class  SDBVMFieldAsIs
 Pass through the value within the SDB (after conversion to real of the underlying SDB type) More...
class  SDBVMFieldNormalize
 Normalize the field (subtract the mean then divide by standard dev) More...
class  SDBVMFieldDivSigma
 Just divide by standard deviation. More...
class  SDBVMFieldAffine
 Apply an affine transformation to the field: y = a*x+b. More...
class  SDBVMFieldPosAffine
 Take the positive part of the field, followed by affine transformation: y = a*max(x,0)+b. More...
class  SDBVMFieldSignedPower
 Do the following : y = x^a. More...
class  SDBVMFieldFunc1
class  SDBVMFieldFunc2
class  SDBVMFieldDate
 Convert a date to fill 3 columns in the VMat: YYYY, MM, DD. More...
class  SDBVMFieldDay
class  SDBVMFieldMonths
 Computed year*12+(month-1) More...
class  SDBVMFieldDateDiff
 difference between two dates ("source1-source2" expressed as an integer number of days, months, or years) More...
class  SDBVMFieldDiscrete
 A field that recodes its source field according to an OutputCoder object. More...
class  SDBVMFieldDateGreater
 verifies if the date within the row is greater than a threshold date More...
class  SDBVMFieldCodeAsIs
class  SDBVMFieldRemapReals
class  SDBVMFieldRemapStrings
class  SDBVMFieldRemapIntervals
class  SDBVMFieldMultiDiscrete
class  SDBVMFieldICBCTargets
class  SDBVMFieldHasClaim
class  SDBVMFieldSumClaims
class  SDBVMFieldICBCClassification
class  FieldStat
class  SDBWithStats
struct  Field
class  FieldPtr
class  FieldValue
class  Schema
class  SimpleDBIndexKey
class  SimpleDB
class  RowIterator
class  FieldRowRef
class  Row
class  UCISpecification
class  DiffTemplate< ObjectType, UCISpecification >
class  TypeTraits< UCISpecification >
class  ConditionalDictionary
class  DiffTemplate< ObjectType, ConditionalDictionary >
class  TypeTraits< ConditionalDictionary >
class  Dictionary
class  DiffTemplate< ObjectType, Dictionary >
class  TypeTraits< Dictionary >
class  FileDictionary
class  DiffTemplate< ObjectType, FileDictionary >
class  TypeTraits< FileDictionary >
class  VecDictionary
class  DiffTemplate< ObjectType, VecDictionary >
class  TypeTraits< VecDictionary >
class  WordNetSenseDictionary
class  DiffTemplate< ObjectType, WordNetSenseDictionary >
class  TypeTraits< WordNetSenseDictionary >
class  GhostScript
class  Gnuplot
class  MatlabInterface
class  RGB
class  HSV
class  RGBImage
 uses top left coordinate system Pixel (i,j) is at row i, column j More...
class  RGBImageDB
class  RGBImageVMatrix
class  RGBImagesVMatrix
class  CachedFeatureSet
 Feature set that maintains a cached mapping between tokens and their features. More...
class  ConcatDisjointFeatureSet
 Feature set that is the concatenation of disjoint feature sets. More...
class  FeatureSet
 Base class for sets of sparse features. More...
class  DiffTemplate< ObjectType, FeatureSet >
class  TypeTraits< FeatureSet >
class  HashMapFeatureSet
 Base class for feature sets that maintains an explicit mapping between index and string form features", This class facilitates the conception of FeatureSet objects. More...
class  DiffTemplate< ObjectType, HashMapFeatureSet >
class  TypeTraits< HashMapFeatureSet >
class  IdentityFeatureSet
 FeatureSet with features corresponding to the input string token. More...
class  DiffTemplate< ObjectType, IdentityFeatureSet >
class  TypeTraits< IdentityFeatureSet >
class  PythonFeatureSet
 FeatureSet with features being defined using a python script. More...
class  DiffTemplate< ObjectType, PythonFeatureSet >
class  TypeTraits< PythonFeatureSet >
class  WordNetFeatureSet
 FeatureSet with features from WordNet. More...
class  DiffTemplate< ObjectType, WordNetFeatureSet >
class  TypeTraits< WordNetFeatureSet >
class  BufferedIntVecFile
class  FdPStreamBuf
class  FilePStreamBuf
class  IntStream
class  IntStreamVMatrix
class  FilesIntStream
class  InMemoryIntStream
class  IntVecFile
class  MPIPStreamBuf
 An implementation of the PStreamBuf interface using MPI communication. More...
class  MRUFileList
class  NullPStreamBuf
class  pl_fdstreambuf
 pl_fdstreambuf: stream buffer that acts on a POSIX file descriptor More...
class  pl_fdstream
class  LogInterceptorPStreamBuf
 This class sends stuff to a PL_LogPluginInterceptor when it's flushed. More...
class  PL_LogPlugin
 Provides several back-ends for displaying the log messages. More...
class  PL_LogPluginPStream
 Default implementation of PL_LogPlugin :: outputs to specified PStream (perr by default) More...
class  PL_LogPluginServer
 Server implementation of PL_LogPlugin :: outputs to client through opened socket. More...
class  PL_LogPluginInterceptor
 Forward declare. More...
class  PL_Log
class  pl_nullstreambuf
class  pl_streambuf
class  pl_streammarker
class  Poll
 A class for polled IO with PStreams. More...
class  PPath
class  TypeTraits< PPath >
class  PrPStreamBuf
 An implementation of the PStreamBuf interface using Mozilla's NSPR library. More...
struct  chkUnsigned
struct  chkUnsigned< true >
class  PStream
class  PIFStream
class  POFStream
class  PIStringStream
class  pl_stream_raw
class  pl_stream_clear_flags
class  pl_stream_initiate
class  PStreamBuf
class  PyPLearnScript
class  DiffTemplate< ObjectType, PyPLearnScript >
class  TypeTraits< PyPLearnScript >
class  RPPath
class  DiffTemplate< ObjectType, RPPath >
class  TypeTraits< RPPath >
class  ServerLogStreamBuf
class  StdPStreamBuf
class  StringPStreamBuf
class  PLLogTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  PPathTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  PStreamBufTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  TupleTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  TmpFilenames
struct  tRule
class  AdditiveNormalizationKernel
class  DiffTemplate< ObjectType, AdditiveNormalizationKernel >
class  TypeTraits< AdditiveNormalizationKernel >
class  ARDBaseKernel
 Base class for kernels that carry out Automatic Relevance Determination (ARD) More...
class  BetaKernel
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, BetaKernel >
class  TypeTraits< BetaKernel >
class  ClassDistanceProportionCostFunction
class  DiffTemplate< ObjectType, ClassDistanceProportionCostFunction >
class  TypeTraits< ClassDistanceProportionCostFunction >
class  ClassErrorCostFunction
class  DiffTemplate< ObjectType, ClassErrorCostFunction >
class  TypeTraits< ClassErrorCostFunction >
class  ClassMarginCostFunction
class  DiffTemplate< ObjectType, ClassMarginCostFunction >
class  TypeTraits< ClassMarginCostFunction >
class  CompactVMatrixGaussianKernel
class  DiffTemplate< ObjectType, CompactVMatrixGaussianKernel >
class  TypeTraits< CompactVMatrixGaussianKernel >
class  CompactVMatrixPolynomialKernel
class  DiffTemplate< ObjectType, CompactVMatrixPolynomialKernel >
class  TypeTraits< CompactVMatrixPolynomialKernel >
class  ConvexBasisKernel
 returns prod_i log(1+exp(c*(x1[i]-x2[i]))) NOTE: IT IS NOT SYMMETRIC! More...
class  DiffTemplate< ObjectType, ConvexBasisKernel >
class  TypeTraits< ConvexBasisKernel >
class  CorrelationKernel
class  DiffTemplate< ObjectType, CorrelationKernel >
class  TypeTraits< CorrelationKernel >
class  CosKernel
 This class implements an Ln distance (defaults to L2 i.e. euclidean distance). More...
class  DiffTemplate< ObjectType, CosKernel >
class  TypeTraits< CosKernel >
class  DifferenceKernel
 returns sum_i[x1_i-x2_i] More...
class  DiffTemplate< ObjectType, DifferenceKernel >
class  TypeTraits< DifferenceKernel >
class  DirectNegativeCostFunction
class  DistanceKernel
 This class implements an Ln distance (defaults to L2 i.e. euclidean distance). More...
class  DiffTemplate< ObjectType, DistanceKernel >
class  TypeTraits< DistanceKernel >
class  DivisiveNormalizationKernel
class  DiffTemplate< ObjectType, DivisiveNormalizationKernel >
class  TypeTraits< DivisiveNormalizationKernel >
class  DotProductKernel
 returns <x1,x2> More...
class  DiffTemplate< ObjectType, DotProductKernel >
class  TypeTraits< DotProductKernel >
class  DTWKernel
 Kernel for Dynamic Time Warping see sect.4.7 of Rabiner, L. More...
class  DiffTemplate< ObjectType, DTWKernel >
class  TypeTraits< DTWKernel >
class  EpanechnikovKernel
class  DiffTemplate< ObjectType, EpanechnikovKernel >
class  TypeTraits< EpanechnikovKernel >
class  PartsDistanceKernel
 This class implements an Ln distance (defaults to L2 i.e. euclidean distance). More...
class  DiffTemplate< ObjectType, PartsDistanceKernel >
class  TypeTraits< PartsDistanceKernel >
class  GaussianDensityKernel
class  DiffTemplate< ObjectType, GaussianDensityKernel >
class  TypeTraits< GaussianDensityKernel >
class  GaussianKernel
 returns exp(-norm_2(x1-x2)^2/sigma^2) More...
class  DiffTemplate< ObjectType, GaussianKernel >
class  TypeTraits< GaussianKernel >
class  GeneralizedDistanceRBFKernel
 returns exp(-phi*(sum_i[abs(x1_i^a - x2_i^a)^b])^c) More...
class  DiffTemplate< ObjectType, GeneralizedDistanceRBFKernel >
class  TypeTraits< GeneralizedDistanceRBFKernel >
class  GeodesicDistanceKernel
class  DiffTemplate< ObjectType, GeodesicDistanceKernel >
class  TypeTraits< GeodesicDistanceKernel >
class  IIDNoiseKernel
 Kernel representing independent and identically-distributed observation noise. More...
class  Kernel
class  DiffTemplate< ObjectType, Kernel >
class  TypeTraits< Kernel >
class  Ker
class  TypeTraits< Ker >
class  KroneckerBaseKernel
 Base class for kernels that make use of Kronecker terms. More...
class  LaplacianKernel
 returns exp(-phi*(sum_i[abs(x1_i - x2_i)])) More...
class  DiffTemplate< ObjectType, LaplacianKernel >
class  TypeTraits< LaplacianKernel >
class  LiftBinaryCostFunction
class  DiffTemplate< ObjectType, LiftBinaryCostFunction >
class  TypeTraits< LiftBinaryCostFunction >
class  LinearARDKernel
 Linear kernel that can be used for Automatic Relevance Determination. More...
class  LLEKernel
class  DiffTemplate< ObjectType, LLEKernel >
class  TypeTraits< LLEKernel >
class  LogOfGaussianDensityKernel
class  DiffTemplate< ObjectType, LogOfGaussianDensityKernel >
class  TypeTraits< LogOfGaussianDensityKernel >
class  ManifoldParzenKernel
class  DiffTemplate< ObjectType, ManifoldParzenKernel >
class  TypeTraits< ManifoldParzenKernel >
class  Matern1ARDKernel
 Matern kernel with nu=1/2 that can be used for Automatic Relevance Determination. More...
class  MemoryCachedKernel
 Provide some memory-management utilities for kernels. More...
class  DiffTemplate< ObjectType, MemoryCachedKernel >
class  TypeTraits< MemoryCachedKernel >
class  MulticlassErrorCostFunction
class  DiffTemplate< ObjectType, MulticlassErrorCostFunction >
class  TypeTraits< MulticlassErrorCostFunction >
class  NegKernel
class  DiffTemplate< ObjectType, NegKernel >
class  TypeTraits< NegKernel >
class  NegLogProbCostFunction
class  DiffTemplate< ObjectType, NegLogProbCostFunction >
class  TypeTraits< NegLogProbCostFunction >
class  NegOutputCostFunction
 This simply returns -output[0] (target should usually have a length of 0) This is used for density estimators whose use(x) method typically computes log(p(x)) More...
class  DiffTemplate< ObjectType, NegOutputCostFunction >
class  TypeTraits< NegOutputCostFunction >
class  NeuralNetworkARDKernel
 Neural network kernel that can be used for Automatic Relevance Determination. More...
class  DiffTemplate< ObjectType, NeuralNetworkARDKernel >
class  TypeTraits< NeuralNetworkARDKernel >
class  NonLocalManifoldParzenKernel
class  DiffTemplate< ObjectType, NonLocalManifoldParzenKernel >
class  TypeTraits< NonLocalManifoldParzenKernel >
class  NormalizedDotProductKernel
class  DiffTemplate< ObjectType, NormalizedDotProductKernel >
class  TypeTraits< NormalizedDotProductKernel >
class  PLearnerDiagonalKernel
 Diagonal kernel from the output of a PLearner. More...
class  DiffTemplate< ObjectType, PLearnerDiagonalKernel >
class  TypeTraits< PLearnerDiagonalKernel >
class  PolynomialKernel
class  DiffTemplate< ObjectType, PolynomialKernel >
class  TypeTraits< PolynomialKernel >
class  PowDistanceKernel
class  DiffTemplate< ObjectType, PowDistanceKernel >
class  TypeTraits< PowDistanceKernel >
class  PrecomputedKernel
 A kernel that precomputes the kernel matrix as soon as setDataForKernelMatrix is called. More...
class  DiffTemplate< ObjectType, PrecomputedKernel >
class  TypeTraits< PrecomputedKernel >
class  PricingTransactionPairProfitFunction
class  DiffTemplate< ObjectType, PricingTransactionPairProfitFunction >
class  TypeTraits< PricingTransactionPairProfitFunction >
class  QuadraticUtilityCostFunction
class  DiffTemplate< ObjectType, QuadraticUtilityCostFunction >
class  TypeTraits< QuadraticUtilityCostFunction >
class  RationalQuadraticARDKernel
 Rational-Quadratic kernel that can be used for Automatic Relevance Determination. More...
class  DiffTemplate< ObjectType, RationalQuadraticARDKernel >
class  TypeTraits< RationalQuadraticARDKernel >
class  ReconstructionWeightsKernel
class  DiffTemplate< ObjectType, ReconstructionWeightsKernel >
class  TypeTraits< ReconstructionWeightsKernel >
class  ScaledGaussianKernel
 returns exp(-sum_i[(phi_i*(x1_i - x2_i))^2]/sigma^2) More...
class  DiffTemplate< ObjectType, ScaledGaussianKernel >
class  TypeTraits< ScaledGaussianKernel >
class  ScaledGeneralizedDistanceRBFKernel
 returns exp(-(sum_i phi_i*[abs(x1_i^a - x2_i^a)^b])^c) More...
class  DiffTemplate< ObjectType, ScaledGeneralizedDistanceRBFKernel >
class  TypeTraits< ScaledGeneralizedDistanceRBFKernel >
class  ScaledLaplacianKernel
 returns exp(-(sum_i[abs(x1_i - x2_i)*phi_i])) More...
class  DiffTemplate< ObjectType, ScaledLaplacianKernel >
class  TypeTraits< ScaledLaplacianKernel >
class  SelectedOutputCostFunction
 This allows to apply a costfunction on a single output element (and correponding target element) of a larger output vector, rather than on the whole vector. More...
class  DiffTemplate< ObjectType, SelectedOutputCostFunction >
class  TypeTraits< SelectedOutputCostFunction >
class  SigmoidalKernel
 returns sigmoid(c*x1.x2) More...
class  DiffTemplate< ObjectType, SigmoidalKernel >
class  TypeTraits< SigmoidalKernel >
class  SigmoidPrimitiveKernel
 returns log(1+exp(c*x1.x2)) = primitive of sigmoidal kernel More...
class  DiffTemplate< ObjectType, SigmoidPrimitiveKernel >
class  TypeTraits< SigmoidPrimitiveKernel >
class  SourceKernel
class  DiffTemplate< ObjectType, SourceKernel >
class  TypeTraits< SourceKernel >
class  SquaredErrorCostFunction
 ********************************************************* The following 'kernels' are rather used as cost functions More...
class  DiffTemplate< ObjectType, SquaredErrorCostFunction >
class  TypeTraits< SquaredErrorCostFunction >
class  SquaredExponentialARDKernel
 Squared-Exponential kernel that can be used for Automatic Relevance Determination. More...
class  DiffTemplate< ObjectType, SquaredExponentialARDKernel >
class  TypeTraits< SquaredExponentialARDKernel >
class  SummationKernel
 Kernel computing the sum of other kernels. More...
class  DiffTemplate< ObjectType, SummationKernel >
class  TypeTraits< SummationKernel >
class  ThresholdedKernel
class  DiffTemplate< ObjectType, ThresholdedKernel >
class  TypeTraits< ThresholdedKernel >
class  VMatKernel
class  DiffTemplate< ObjectType, VMatKernel >
class  TypeTraits< VMatKernel >
class  WeightedCostFunction
 A costfunction that allows to reweight another costfunction (weight being last element of target) Returns target.lastElement() * costfunc(output,target.subVec(0,target.length()-1));. More...
class  DiffTemplate< ObjectType, WeightedCostFunction >
class  TypeTraits< WeightedCostFunction >
class  WeightedQuadraticPolynomialKernel
class  DiffTemplate< ObjectType, WeightedQuadraticPolynomialKernel >
class  TypeTraits< WeightedQuadraticPolynomialKernel >
class  Binner
class  DiffTemplate< ObjectType, Binner >
class  TypeTraits< Binner >
class  BottomNI
class  ConditionalCDFSmoother
class  DiffTemplate< ObjectType, ConditionalCDFSmoother >
class  TypeTraits< ConditionalCDFSmoother >
class  ConditionalStatsCollector
class  DiffTemplate< ObjectType, ConditionalStatsCollector >
class  TypeTraits< ConditionalStatsCollector >
class  ConstantRealFunction
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  StatsIterator
class  DiffTemplate< ObjectType, StatsIterator >
class  TypeTraits< StatsIterator >
class  MeanStatsIterator
class  DiffTemplate< ObjectType, MeanStatsIterator >
class  TypeTraits< MeanStatsIterator >
class  ExpMeanStatsIterator
class  DiffTemplate< ObjectType, ExpMeanStatsIterator >
class  TypeTraits< ExpMeanStatsIterator >
class  StddevStatsIterator
class  DiffTemplate< ObjectType, StddevStatsIterator >
class  TypeTraits< StddevStatsIterator >
class  StderrStatsIterator
class  DiffTemplate< ObjectType, StderrStatsIterator >
class  TypeTraits< StderrStatsIterator >
class  SharpeRatioStatsIterator
class  DiffTemplate< ObjectType, SharpeRatioStatsIterator >
class  TypeTraits< SharpeRatioStatsIterator >
class  MinStatsIterator
class  DiffTemplate< ObjectType, MinStatsIterator >
class  TypeTraits< MinStatsIterator >
class  MaxStatsIterator
class  DiffTemplate< ObjectType, MaxStatsIterator >
class  TypeTraits< MaxStatsIterator >
class  LiftStatsIterator
class  DiffTemplate< ObjectType, LiftStatsIterator >
class  TypeTraits< LiftStatsIterator >
class  QuantilesStatsIterator
class  DiffTemplate< ObjectType, QuantilesStatsIterator >
class  TypeTraits< QuantilesStatsIterator >
class  StatsItArray
class  TypeTraits< StatsItArray >
class  DoubleAccessSparseMatrix
class  SMat
class  SquaredSymmMatT
class  ReverseMatT
class  MatTPlusSumSquaredVec
class  HashKeyDataPair
class  Hash
struct  Symbol
class  IntPair
 Example of class that can be used as key. More...
class  LiftStatsCollector
class  DiffTemplate< ObjectType, LiftStatsCollector >
class  TypeTraits< LiftStatsCollector >
class  LimitedGaussianSmoother
class  DiffTemplate< ObjectType, LimitedGaussianSmoother >
class  TypeTraits< LimitedGaussianSmoother >
class  ManualBinner
class  DiffTemplate< ObjectType, ManualBinner >
class  TypeTraits< ManualBinner >
class  ObservationWindow
 Used by StatsCollector to keep a finite-size window of observations. More...
class  DiffTemplate< ObjectType, ObservationWindow >
class  TypeTraits< ObservationWindow >
class  PLGaussQuantileInitializer
union  _plearn_nan_type
class  PLMathInitializer
class  PRandom
 Important note: the pointers used for some Boost distribution objects are meant to save memory. More...
class  DiffTemplate< ObjectType, PRandom >
class  TypeTraits< PRandom >
class  ProbSparseMatrix
class  PSMat
class  RealFunction
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RealFunction >
class  TypeTraits< RealFunction >
class  RealFunctionFromKernel
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RealFunctionFromKernel >
class  TypeTraits< RealFunctionFromKernel >
class  RealFunctionOfInputFeature
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RealFunctionOfInputFeature >
class  TypeTraits< RealFunctionOfInputFeature >
class  RealFunctionProduct
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RealFunctionProduct >
class  TypeTraits< RealFunctionProduct >
class  RealRangeIndicatorFunction
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RealRangeIndicatorFunction >
class  TypeTraits< RealRangeIndicatorFunction >
class  RealValueIndicatorFunction
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RealValueIndicatorFunction >
class  TypeTraits< RealValueIndicatorFunction >
class  RowMapSparseMatrix
class  RowMapSparseValueMatrix
class  ScaledConditionalCDFSmoother
class  DiffTemplate< ObjectType, ScaledConditionalCDFSmoother >
class  TypeTraits< ScaledConditionalCDFSmoother >
class  ShiftAndRescaleFeatureRealFunction
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ShiftAndRescaleFeatureRealFunction >
class  TypeTraits< ShiftAndRescaleFeatureRealFunction >
class  Smoother
class  DiffTemplate< ObjectType, Smoother >
class  TypeTraits< Smoother >
class  SoftHistogramBinner
class  DiffTemplate< ObjectType, SoftHistogramBinner >
class  TypeTraits< SoftHistogramBinner >
class  SparseMatrix
class  StatsCollectorCounts
class  StatsCollector
class  DiffTemplate< ObjectType, StatsCollector >
class  TypeTraits< StatsCollector >
class  TTensorElementIterator
class  TTensorSubTensorIterator
class  TTensor
class  PentaTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  PLMathTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  TMatTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  RemoveObservationTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RemoveObservationTest >
class  TypeTraits< RemoveObservationTest >
class  TMat
class  TypeTraits< TMat< T > >
class  SelectedIndicesCmp
class  TMatColRowsIterator
 Model of the Random Access Iterator concept for iterating through a single column of a TMat, one row at a time. More...
class  TMatElementIterator
class  TMatRowsAsArraysIterator
 Model of the Random Access Iterator concept for iterating through the ROWS of a TMat. More...
class  TMatRowsIterator
 Model of the Random Access Iterator concept for iterating through the ROWS of a TMat. More...
class  TopNI
class  TruncatedRealFunction
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, TruncatedRealFunction >
class  TypeTraits< TruncatedRealFunction >
class  TVec
class  TypeTraits< TVec< T > >
class  VecCompressor
class  VecStatsCollector
class  DiffTemplate< ObjectType, VecStatsCollector >
class  TypeTraits< VecStatsCollector >
class  Measurer
class  CallbackMeasurer
class  Calendar
 Encapsulates the concept of a calendar as an ordered finite list of timestamps. More...
class  DiffTemplate< ObjectType, Calendar >
class  TypeTraits< Calendar >
class  HTMLHelpGenerator
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, HTMLHelpGenerator >
class  TypeTraits< HTMLHelpGenerator >
struct  HTMLUtils
class  NearestNeighborPredictionCost
class  DiffTemplate< ObjectType, NearestNeighborPredictionCost >
class  TypeTraits< NearestNeighborPredictionCost >
class  ObjectGenerator
class  DiffTemplate< ObjectType, ObjectGenerator >
class  TypeTraits< ObjectGenerator >
class  PLearnServer
class  PLearnService
class  PRange
class  PTest
class  DiffTemplate< ObjectType, PTest >
class  TypeTraits< PTest >
class  PTimer
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, PTimer >
class  TypeTraits< PTimer >
class  Redirect
class  DiffTemplate< ObjectType, Redirect >
class  TypeTraits< Redirect >
class  RemotePLearnServer
class  RunObject
class  DiffTemplate< ObjectType, RunObject >
class  TypeTraits< RunObject >
class  ShellScript
class  DiffTemplate< ObjectType, ShellScript >
class  TypeTraits< ShellScript >
class  HeapTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, HeapTest >
class  TypeTraits< HeapTest >
class  AdaptGradientOptimizer
class  ConjGradientOptimizer
class  AutoScaledGradientOptimizer
class  DiffTemplate< ObjectType, AutoScaledGradientOptimizer >
class  TypeTraits< AutoScaledGradientOptimizer >
class  OnlineGramNaturalGradientOptimizer
 Implements an online natural gradient, based on keeping an estimate of the gradients' covariance C through its main eigen vectors and values which are updated through those of the gram matrix. More...
class  DiffTemplate< ObjectType, OnlineGramNaturalGradientOptimizer >
class  TypeTraits< OnlineGramNaturalGradientOptimizer >
class  GradientOptimizer
class  DiffTemplate< ObjectType, GradientOptimizer >
class  TypeTraits< GradientOptimizer >
class  Optimizer
class  DiffTemplate< ObjectType, Optimizer >
class  TypeTraits< Optimizer >
class  ConjRosenbrock
 Exercises the Conjugate Gradient optimizer through the Rosenbrock Function. More...
class  DiffTemplate< ObjectType, ConjRosenbrock >
class  TypeTraits< ConjRosenbrock >
class  PythonException
 C++ Exception object to which Python exceptions are mapped. More...
class  PythonCodeSnippet
 Enables embedded Python code to be called from PLearn/C++ code. More...
class  DiffTemplate< ObjectType, PythonCodeSnippet >
class  TypeTraits< PythonCodeSnippet >
class  PythonEmbedder
 Include this file when you want to embed the Python interpreter. More...
class  ConvertFromPyObject
 Set of conversion functions from Python to C++. More...
struct  ConvertFromPyObject< PyObject * >
struct  ConvertFromPyObject< bool >
struct  ConvertFromPyObject< short >
struct  ConvertFromPyObject< unsigned short >
struct  ConvertFromPyObject< int >
struct  ConvertFromPyObject< unsigned int >
struct  ConvertFromPyObject< long >
struct  ConvertFromPyObject< unsigned long >
struct  ConvertFromPyObject< long long >
struct  ConvertFromPyObject< unsigned long long >
struct  ConvertFromPyObject< double >
struct  ConvertFromPyObject< float >
struct  ConvertFromPyObject< string >
struct  ConvertFromPyObject< PPath >
struct  ConvertFromPyObject< PPointable * >
struct  ConvertFromPyObject< Object * >
struct  ConvertFromPyObject< T * >
 ***///*** More...
struct  ConvertFromPyObject< Vec >
 ***///*** More...
struct  ConvertFromPyObject< Mat >
struct  ConvertFromPyObject< PP< VMatrix > >
struct  ConvertFromPyObject< PythonObjectWrapper >
struct  ConvertFromPyObject< PP< T > >
struct  ConvertFromPyObject< TVec< T > >
struct  ConvertFromPyObject< Array< T > >
struct  ConvertFromPyObject< TMat< T > >
struct  ConvertFromPyObject< std::vector< T > >
struct  ConvertFromPyObject< std::map< T, U > >
struct  ConvertFromPyObject< std::set< T > >
struct  ConvertFromPyObject< std::pair< T, U > >
struct  ConvertFromPyObject< CopiesMap >
struct  ConvertFromPyObject< VarArray >
struct  ConvertFromPyObject< RealRange >
struct  ConvertFromPyObject< VMField >
struct  ConvertToPyObject
struct  ConvertToPyObject< Object * >
struct  ConvertToPyObject< bool >
struct  ConvertToPyObject< short >
struct  ConvertToPyObject< unsigned short >
struct  ConvertToPyObject< int >
struct  ConvertToPyObject< unsigned int >
struct  ConvertToPyObject< long >
struct  ConvertToPyObject< unsigned long >
struct  ConvertToPyObject< long long >
struct  ConvertToPyObject< unsigned long long >
struct  ConvertToPyObject< double >
struct  ConvertToPyObject< float >
struct  ConvertToPyObject< char * >
struct  ConvertToPyObject< char[N]>
struct  ConvertToPyObject< string >
struct  ConvertToPyObject< PPath >
struct  ConvertToPyObject< Vec >
 PLearn Vec: use numarray. More...
struct  ConvertToPyObject< Mat >
 PLearn Mat: use numarray. More...
struct  ConvertToPyObject< PP< VMatrix > >
 PLearn VMat. More...
struct  ConvertToPyObject< PP< T > >
 Generic PP: wrap pointed object. More...
struct  ConvertToPyObject< tuple< T > >
 tuples (1 to 7 elts.) More...
struct  ConvertToPyObject< tuple< T, U > >
struct  ConvertToPyObject< tuple< T, U, V > >
struct  ConvertToPyObject< tuple< T, U, V, W > >
struct  ConvertToPyObject< tuple< T, U, V, W, X > >
struct  ConvertToPyObject< tuple< T, U, V, W, X, Y > >
struct  ConvertToPyObject< tuple< T, U, V, W, X, Y, Z > >
struct  ConvertToPyObject< Array< T > >
 Generic array: create a Python list of those objects recursively. More...
struct  ConvertToPyObject< TVec< T > >
 Generic vector: create a Python list of those objects recursively. More...
struct  ConvertToPyObject< TMat< T > >
 Generic matrix: create a Python list of those objects recursively. More...
struct  ConvertToPyObject< std::vector< T > >
 C++ stdlib vector<>: create a Python list of those objects recursively. More...
struct  ConvertToPyObject< std::map< T, U > >
 C++ stlib map<>: create a Python dict of those objects. More...
struct  ConvertToPyObject< std::set< T > >
 C++ stlib set<>: create a Python set of those objects. More...
struct  ConvertToPyObject< std::pair< T, U > >
 C++ stdlib pair<>: create a Python tuple with two elements. More...
struct  ConvertToPyObject< std::vector< T > const * >
 Pointer to vector<>: simply dereference pointer, or None if NULL. More...
struct  ConvertToPyObject< std::map< T, U > const * >
 Pointer to map<>: simply dereference pointer, or None if NULL. More...
struct  ConvertToPyObject< std::set< T > const * >
 Pointer to set<>: simply dereference pointer, or None if NULL. More...
struct  ConvertToPyObject< PythonObjectWrapper >
 For a general PythonObjectWrapper: we simply increment the refcount to the underlying Python object, no matter whether we own it or not. More...
struct  ConvertToPyObject< CopiesMap >
struct  ConvertToPyObject< VarArray >
struct  ConvertToPyObject< RealRange >
struct  ConvertToPyObject< VMField >
struct  PLPyClass
class  PythonGlobalInterpreterLock
 Ensure thread safety by managing the Python Global Interpreter Lock. More...
class  PythonObjectWrapper
 Very lightweight wrapper over a Python Object that allows conversion to/from C++ types (including those of PLearn) More...
struct  ConvertToPyObject< T * >
struct  StaticConvertEnumFromPyObject
struct  StaticConvertEnumFromPyObject< U, true >
struct  StaticConvertEnumToPyObject
struct  StaticConvertEnumToPyObject< T, true >
class  TypeTraits< PythonObjectWrapper >
class  PythonProcessedVMatrix
 Preprocess a source VMatrix using a Python code snippet. More...
class  DiffTemplate< ObjectType, PythonProcessedVMatrix >
class  TypeTraits< PythonProcessedVMatrix >
class  BasicIdentityCallsTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, BasicIdentityCallsTest >
class  TypeTraits< BasicIdentityCallsTest >
class  InjectionTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, InjectionTest >
class  TypeTraits< InjectionTest >
class  TestSnippet
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  InstanceSnippetTest
class  DiffTemplate< ObjectType, InstanceSnippetTest >
class  TypeTraits< InstanceSnippetTest >
class  InterfunctionXchgTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, InterfunctionXchgTest >
class  TypeTraits< InterfunctionXchgTest >
class  MemoryStressTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, MemoryStressTest >
class  TypeTraits< MemoryStressTest >
class  RandomVar
 we follow the same pattern as Var & Variable More...
class  RVArray
 An RVArray stores a table of RandomVar's. More...
class  RVInstance
 RVInstance represents a RandomVariable V along with a "value" v. More...
class  RVInstanceArray
class  ConditionalExpression
class  RandomVariable
class  StochasticRandomVariable
class  FunctionalRandomVariable
class  NonRandomVariable
class  JointRandomVariable
class  RandomElementOfRandomVariable
 RandomVariable that is the element of the first parent RandomVariable indexed by the second parent RandomVariable. More...
class  RVArrayRandomElementRandomVariable
class  NegRandomVariable
class  ExpRandomVariable
class  LogRandomVariable
class  DiagonalNormalRandomVariable
class  MixtureRandomVariable
class  PlusRandomVariable
class  MinusRandomVariable
class  ElementWiseDivisionRandomVariable
class  ProductRandomVariable
class  SubVecRandomVariable
 Y = sub-vector of X starting at position "start", of length "value->length()". More...
class  MultinomialRandomVariable
class  ExtendedRandomVariable
class  ConcatColumnsRandomVariable
 concatenate the columns of the matrix arguments, just like the hconcat function (PLearn.h) on Vars. More...
class  RandomVarVMatrix
 This is a convenient wrapping around the required data structures for efficient repeated sampling from a RandomVar. More...
class  SourceSampleVariable
class  UnarySampleVariable
class  BinarySampleVariable
class  UniformSampleVariable
class  MultinomialSampleVariable
class  DiagonalNormalSampleVariable
class  IPServer
class  IPopen
class  PLMPI
 ** PLMPI is just a "namespace holder" (because we're not actually using namespaces) for a few MPI related variables. All members are static ** More...
class  Popen
class  Profiler
 Profiling tools, to count average time elapsed and number of times traversed for pieces of code delimited by two calls to the static functions. More...
union  semun
class  SemId
 This class is defined in order to distinguish semaphore and shared memory id's from plain integers when constructing a Semaphore or a SharedMemory object. More...
class  ResourceSemaphore
class  CountEventsSemaphore
class  SharedMemory
class  AbsVariable
class  DiffTemplate< ObjectType, AbsVariable >
class  TypeTraits< AbsVariable >
class  AffineTransformVariable
class  DiffTemplate< ObjectType, AffineTransformVariable >
class  TypeTraits< AffineTransformVariable >
class  AffineTransformWeightPenalty
 Weight decay terms for affine transforms. More...
class  DiffTemplate< ObjectType, AffineTransformWeightPenalty >
class  TypeTraits< AffineTransformWeightPenalty >
class  ArgmaxVariable
class  DiffTemplate< ObjectType, ArgmaxVariable >
class  TypeTraits< ArgmaxVariable >
class  ArgminOfVariable
class  ArgminVariable
class  DiffTemplate< ObjectType, ArgminVariable >
class  TypeTraits< ArgminVariable >
class  BiasWeightAffineTransformVariable
 Affine transformation of a vector variable, from a weight and bias variable. More...
class  DiffTemplate< ObjectType, BiasWeightAffineTransformVariable >
class  TypeTraits< BiasWeightAffineTransformVariable >
class  BinaryClassificationLossVariable
class  DiffTemplate< ObjectType, BinaryClassificationLossVariable >
class  TypeTraits< BinaryClassificationLossVariable >
class  BinaryVariable
class  DiffTemplate< ObjectType, BinaryVariable >
class  TypeTraits< BinaryVariable >
class  CCCostVariable
class  DiffTemplate< ObjectType, CCCostVariable >
class  TypeTraits< CCCostVariable >
class  ClassificationLossVariable
 Indicator(classnum==argmax(netout)) More...
class  DiffTemplate< ObjectType, ClassificationLossVariable >
class  TypeTraits< ClassificationLossVariable >
class  ColumnIndexVariable
class  DiffTemplate< ObjectType, ColumnIndexVariable >
class  TypeTraits< ColumnIndexVariable >
class  ColumnSumVariable
 result is a single row that contains the sum of each column of the input More...
class  ConcatColumnsVariable
 concatenation of the columns of several variables More...
class  DiffTemplate< ObjectType, ConcatColumnsVariable >
class  TypeTraits< ConcatColumnsVariable >
class  ConcatOfVariable
class  DiffTemplate< ObjectType, ConcatOfVariable >
class  TypeTraits< ConcatOfVariable >
class  ConcatRowsVariable
 concatenation of the rows of several variables More...
class  DiffTemplate< ObjectType, ConcatRowsVariable >
class  TypeTraits< ConcatRowsVariable >
class  ConfRatedAdaboostCostVariable
class  DiffTemplate< ObjectType, ConfRatedAdaboostCostVariable >
class  TypeTraits< ConfRatedAdaboostCostVariable >
class  ConvolveVariable
 A convolve var; equals convolve(input, mask) More...
class  DiffTemplate< ObjectType, ConvolveVariable >
class  TypeTraits< ConvolveVariable >
class  CrossEntropyVariable
 cost = - sum_i {target_i * log(output_i) + (1-target_i) * log(1-output_i)} More...
class  DiffTemplate< ObjectType, CrossEntropyVariable >
class  TypeTraits< CrossEntropyVariable >
class  CutAboveThresholdVariable
class  DiffTemplate< ObjectType, CutAboveThresholdVariable >
class  TypeTraits< CutAboveThresholdVariable >
class  CutBelowThresholdVariable
class  DiffTemplate< ObjectType, CutBelowThresholdVariable >
class  TypeTraits< CutBelowThresholdVariable >
class  DeterminantVariable
 The argument must be a square matrix Var and the result is its determinant. More...
class  DiffTemplate< ObjectType, DeterminantVariable >
class  TypeTraits< DeterminantVariable >
class  DiagonalizedFactorsProductVariable
class  DiffTemplate< ObjectType, DiagonalizedFactorsProductVariable >
class  TypeTraits< DiagonalizedFactorsProductVariable >
class  DilogarithmVariable
 This is the primitive of a sigmoid: log(1+exp(x)) More...
class  DiffTemplate< ObjectType, DilogarithmVariable >
class  TypeTraits< DilogarithmVariable >
class  DivVariable
class  DiffTemplate< ObjectType, DivVariable >
class  TypeTraits< DivVariable >
class  DotProductVariable
 Dot product between 2 vectors (or possibly 2 matrices, which are then simply seen as vectors) More...
class  DiffTemplate< ObjectType, DotProductVariable >
class  TypeTraits< DotProductVariable >
class  DuplicateColumnVariable
class  DiffTemplate< ObjectType, DuplicateColumnVariable >
class  TypeTraits< DuplicateColumnVariable >
class  DuplicateRowVariable
class  DiffTemplate< ObjectType, DuplicateRowVariable >
class  TypeTraits< DuplicateRowVariable >
class  DuplicateScalarVariable
class  DiffTemplate< ObjectType, DuplicateScalarVariable >
class  TypeTraits< DuplicateScalarVariable >
class  ElementAtPositionVariable
class  DiffTemplate< ObjectType, ElementAtPositionVariable >
class  TypeTraits< ElementAtPositionVariable >
class  EqualConstantVariable
 A scalar var; equal 1 if input1==input2, 0 otherwise. More...
class  DiffTemplate< ObjectType, EqualConstantVariable >
class  TypeTraits< EqualConstantVariable >
class  EqualScalarVariable
 A scalar var; equal 1 if input1==input2, 0 otherwise. More...
class  DiffTemplate< ObjectType, EqualScalarVariable >
class  TypeTraits< EqualScalarVariable >
class  EqualVariable
 A scalar var; equal 1 if input1==input2, 0 otherwise. More...
class  DiffTemplate< ObjectType, EqualVariable >
class  TypeTraits< EqualVariable >
class  ErfVariable
class  DiffTemplate< ObjectType, ErfVariable >
class  TypeTraits< ErfVariable >
class  AdditiveGaussianNoiseVariable
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, AdditiveGaussianNoiseVariable >
class  TypeTraits< AdditiveGaussianNoiseVariable >
class  BernoulliSampleVariable
class  DiffTemplate< ObjectType, BernoulliSampleVariable >
class  TypeTraits< BernoulliSampleVariable >
class  ConstrainedSourceVariable
 SourceVariable that after each update, modifies values as needed to satisfy simple constraints. More...
class  ConstrainVariable
class  DiffTemplate< ObjectType, ConstrainVariable >
class  TypeTraits< ConstrainVariable >
class  Cov2CorrVariable
class  DiffTemplate< ObjectType, Cov2CorrVariable >
class  TypeTraits< Cov2CorrVariable >
class  DiagVariable
class  DiffTemplate< ObjectType, DiagVariable >
class  TypeTraits< DiagVariable >
class  DoubleProductVariable
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, DoubleProductVariable >
class  TypeTraits< DoubleProductVariable >
class  LinearCombinationOfScalarVariables
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, LinearCombinationOfScalarVariables >
class  TypeTraits< LinearCombinationOfScalarVariables >
class  LogSoftSoftMaxVariable
 Log of SoftSoftMaxVariable (see SoftSoftMaxVariable for more details) More...
class  DiffTemplate< ObjectType, LogSoftSoftMaxVariable >
class  TypeTraits< LogSoftSoftMaxVariable >
class  MultiMaxVariable
 This variables computes a max functions (softmax, log-softmax, hardmax, etc., determined by the field computation_type) on subvectors of the input, which lenght is defined by the field groupsizes. More...
class  DiffTemplate< ObjectType, MultiMaxVariable >
class  TypeTraits< MultiMaxVariable >
class  MultiSampleVariable
class  DiffTemplate< ObjectType, MultiSampleVariable >
class  TypeTraits< MultiSampleVariable >
class  NonDiagVariable
class  DiffTemplate< ObjectType, NonDiagVariable >
class  TypeTraits< NonDiagVariable >
class  ProbabilityPairsInverseVariable
 [x1,x2,x3,...,xn] -> [f(x1), f(x3), ..., f(xn)] with f(x) = (max-min)*x - min and with n even It is the inverse of ProbabilityPairsVariable More...
class  DiffTemplate< ObjectType, ProbabilityPairsInverseVariable >
class  TypeTraits< ProbabilityPairsInverseVariable >
class  ProbabilityPairsVariable
 Let define f(x) = (x-min)/(max-min) for min<=x<=max, then this variable is defined by [x1,x2,...,xn] |-> [ f(x1), 1-f(x1), f(x2), 1-f(x2), ... More...
class  DiffTemplate< ObjectType, ProbabilityPairsVariable >
class  TypeTraits< ProbabilityPairsVariable >
class  RandomForcedValuesVariable
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RandomForcedValuesVariable >
class  TypeTraits< RandomForcedValuesVariable >
class  SaltPepperNoiseVariable
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SaltPepperNoiseVariable >
class  TypeTraits< SaltPepperNoiseVariable >
class  SoftSoftMaxVariable
 Kind of SoftMax. More...
class  DiffTemplate< ObjectType, SoftSoftMaxVariable >
class  TypeTraits< SoftSoftMaxVariable >
class  SumEntropyOfBernoullis
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SumEntropyOfBernoullis >
class  TypeTraits< SumEntropyOfBernoullis >
class  SumEntropyOfCategoricals
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SumEntropyOfCategoricals >
class  TypeTraits< SumEntropyOfCategoricals >
class  SumVarianceOfLinearTransformedBernoullis
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SumVarianceOfLinearTransformedBernoullis >
class  TypeTraits< SumVarianceOfLinearTransformedBernoullis >
class  SumVarianceOfLinearTransformedCategoricals
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SumVarianceOfLinearTransformedCategoricals >
class  TypeTraits< SumVarianceOfLinearTransformedCategoricals >
class  TimesConstantScalarVariable2
 multiplies a matrix var by a scalar var More...
class  DiffTemplate< ObjectType, TimesConstantScalarVariable2 >
class  TypeTraits< TimesConstantScalarVariable2 >
class  TraceVariable
class  DiffTemplate< ObjectType, TraceVariable >
class  TypeTraits< TraceVariable >
class  TransposedDoubleProductVariable
 Let W, M and H be the inputs and nw the length of W. More...
class  DiffTemplate< ObjectType, TransposedDoubleProductVariable >
class  TypeTraits< TransposedDoubleProductVariable >
class  ExpVariable
class  DiffTemplate< ObjectType, ExpVariable >
class  TypeTraits< ExpVariable >
class  ExtendedVariable
class  DiffTemplate< ObjectType, ExtendedVariable >
class  TypeTraits< ExtendedVariable >
class  ExtractVariable
class  DiffTemplate< ObjectType, ExtractVariable >
class  TypeTraits< ExtractVariable >
class  FNetLayerVariable
 Single layer of a neural network, with acceleration tricks. More...
class  DiffTemplate< ObjectType, FNetLayerVariable >
class  TypeTraits< FNetLayerVariable >
class  Func
class  Function
class  DiffTemplate< ObjectType, Function >
class  TypeTraits< Function >
class  TypeTraits< Func >
class  GaussianProcessNLLVariable
 Compute the Negative-Log-Marginal-Likelihood for Gaussian Process Regression. More...
class  DiffTemplate< ObjectType, GaussianProcessNLLVariable >
class  TypeTraits< GaussianProcessNLLVariable >
class  GradientAdaboostCostVariable
 Cost for weak learner in MarginBoost version of AdaBoost Cost for a weak learner used in the functional gradient descent view of boosting on a margin-based loss function. More...
class  DiffTemplate< ObjectType, GradientAdaboostCostVariable >
class  TypeTraits< GradientAdaboostCostVariable >
class  HardSlopeVariable
class  DiffTemplate< ObjectType, HardSlopeVariable >
class  TypeTraits< HardSlopeVariable >
class  HeterogenuousAffineTransformVariable
 Affine transform with continuous and discrete input. More...
class  DiffTemplate< ObjectType, HeterogenuousAffineTransformVariable >
class  TypeTraits< HeterogenuousAffineTransformVariable >
class  HeterogenuousAffineTransformWeightPenalty
 Penalty associated to an affine transform with continuous and discrete input. More...
class  DiffTemplate< ObjectType, HeterogenuousAffineTransformWeightPenalty >
class  TypeTraits< HeterogenuousAffineTransformWeightPenalty >
class  IdentityVariable
class  DiffTemplate< ObjectType, IdentityVariable >
class  TypeTraits< IdentityVariable >
class  IfThenElseVariable
 Variable that represents the element-wise IF-THEN-ELSE: More...
class  DiffTemplate< ObjectType, IfThenElseVariable >
class  TypeTraits< IfThenElseVariable >
class  IndexAtPositionVariable
class  DiffTemplate< ObjectType, IndexAtPositionVariable >
class  TypeTraits< IndexAtPositionVariable >
class  InsertZerosVariable
class  DiffTemplate< ObjectType, InsertZerosVariable >
class  TypeTraits< InsertZerosVariable >
class  InterValuesVariable
 if values = [x1,x2,...,x10], the resulting variable is [(x1+x2)/2,(x2+x3)/2, ... More...
class  DiffTemplate< ObjectType, InterValuesVariable >
class  TypeTraits< InterValuesVariable >
class  InvertElementsVariable
class  DiffTemplate< ObjectType, InvertElementsVariable >
class  TypeTraits< InvertElementsVariable >
class  IsAboveThresholdVariable
 Does elementwise newx_i = (x_i>=threshold ?truevalue :falsevalue);. More...
class  DiffTemplate< ObjectType, IsAboveThresholdVariable >
class  TypeTraits< IsAboveThresholdVariable >
class  IsLargerVariable
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ More...
class  DiffTemplate< ObjectType, IsLargerVariable >
class  TypeTraits< IsLargerVariable >
class  IsMissingVariable
 A scalar var; equal 1 if input1!=c, 0 otherwise. More...
class  DiffTemplate< ObjectType, IsMissingVariable >
class  TypeTraits< IsMissingVariable >
class  IsSmallerVariable
class  DiffTemplate< ObjectType, IsSmallerVariable >
class  TypeTraits< IsSmallerVariable >
class  LeftPseudoInverseVariable
class  DiffTemplate< ObjectType, LeftPseudoInverseVariable >
class  TypeTraits< LeftPseudoInverseVariable >
class  LiftOutputVariable
class  DiffTemplate< ObjectType, LiftOutputVariable >
class  TypeTraits< LiftOutputVariable >
class  LocalizedFeaturesLayerVariable
 Single layer of a neural network with local connectivity upon a set of localized features, i.e. More...
class  DiffTemplate< ObjectType, LocalizedFeaturesLayerVariable >
class  TypeTraits< LocalizedFeaturesLayerVariable >
class  LogAddVariable
 output = log(exp(input1)+exp(input2)) but it is computed in such a way as to preserve precision More...
class  DiffTemplate< ObjectType, LogAddVariable >
class  TypeTraits< LogAddVariable >
class  LogSoftmaxVariable
class  DiffTemplate< ObjectType, LogSoftmaxVariable >
class  TypeTraits< LogSoftmaxVariable >
class  LogSumVariable
class  LogVariable
class  DiffTemplate< ObjectType, LogVariable >
class  TypeTraits< LogVariable >
class  MarginPerceptronCostVariable
class  DiffTemplate< ObjectType, MarginPerceptronCostVariable >
class  TypeTraits< MarginPerceptronCostVariable >
class  MatrixAffineTransformFeedbackVariable
 Affine transformation of a MATRIX variable. More...
class  DiffTemplate< ObjectType, MatrixAffineTransformFeedbackVariable >
class  TypeTraits< MatrixAffineTransformFeedbackVariable >
class  MatrixAffineTransformVariable
 Affine transformation of a MATRIX variable. More...
class  DiffTemplate< ObjectType, MatrixAffineTransformVariable >
class  TypeTraits< MatrixAffineTransformVariable >
class  MatrixElementsVariable
class  DiffTemplate< ObjectType, MatrixElementsVariable >
class  TypeTraits< MatrixElementsVariable >
class  MatrixInverseVariable
class  DiffTemplate< ObjectType, MatrixInverseVariable >
class  TypeTraits< MatrixInverseVariable >
class  MatrixOneHotSquaredLoss
class  DiffTemplate< ObjectType, MatrixOneHotSquaredLoss >
class  TypeTraits< MatrixOneHotSquaredLoss >
class  MatrixSoftmaxLossVariable
class  DiffTemplate< ObjectType, MatrixSoftmaxLossVariable >
class  TypeTraits< MatrixSoftmaxLossVariable >
class  MatrixSoftmaxVariable
class  DiffTemplate< ObjectType, MatrixSoftmaxVariable >
class  TypeTraits< MatrixSoftmaxVariable >
class  MatrixSumOfVariable
class  DiffTemplate< ObjectType, MatrixSumOfVariable >
class  TypeTraits< MatrixSumOfVariable >
class  MatRowVariable
 Variable that is the row of matrix mat indexed by variable input. More...
class  DiffTemplate< ObjectType, MatRowVariable >
class  TypeTraits< MatRowVariable >
class  Max2Variable
class  DiffTemplate< ObjectType, Max2Variable >
class  TypeTraits< Max2Variable >
class  MaxVariable
class  DiffTemplate< ObjectType, MaxVariable >
class  TypeTraits< MaxVariable >
class  Min2Variable
class  DiffTemplate< ObjectType, Min2Variable >
class  TypeTraits< Min2Variable >
class  MiniBatchClassificationLossVariable
class  DiffTemplate< ObjectType, MiniBatchClassificationLossVariable >
class  TypeTraits< MiniBatchClassificationLossVariable >
class  MinusColumnVariable
class  DiffTemplate< ObjectType, MinusColumnVariable >
class  TypeTraits< MinusColumnVariable >
class  MinusRowVariable
class  DiffTemplate< ObjectType, MinusRowVariable >
class  TypeTraits< MinusRowVariable >
class  MinusScalarVariable
class  MinusTransposedColumnVariable
class  DiffTemplate< ObjectType, MinusTransposedColumnVariable >
class  TypeTraits< MinusTransposedColumnVariable >
class  MinusVariable
class  DiffTemplate< ObjectType, MinusVariable >
class  TypeTraits< MinusVariable >
class  MinVariable
class  DiffTemplate< ObjectType, MinVariable >
class  TypeTraits< MinVariable >
class  MulticlassLossVariable
 cost = sum_i {cost_i}, with cost_i = 1 if (target_i == 1 && output_i < 1/2) cost_i = 1 if (target_i == 0 && output_i > 1/2) cost_i = 0 otherwise More...
class  DiffTemplate< ObjectType, MulticlassLossVariable >
class  TypeTraits< MulticlassLossVariable >
class  NaryVariable
class  NegateElementsVariable
class  DiffTemplate< ObjectType, NegateElementsVariable >
class  TypeTraits< NegateElementsVariable >
class  NegCrossEntropySigmoidVariable
class  DiffTemplate< ObjectType, NegCrossEntropySigmoidVariable >
class  TypeTraits< NegCrossEntropySigmoidVariable >
class  NegLogPoissonVariable
class  DiffTemplate< ObjectType, NegLogPoissonVariable >
class  TypeTraits< NegLogPoissonVariable >
class  NllGeneralGaussianVariable
class  DiffTemplate< ObjectType, NllGeneralGaussianVariable >
class  TypeTraits< NllGeneralGaussianVariable >
class  NllSemisphericalGaussianVariable
 This class implements the negative log-likelihood cost of a Markov chain that uses semispherical gaussian transition probabilities. More...
class  DiffTemplate< ObjectType, NllSemisphericalGaussianVariable >
class  TypeTraits< NllSemisphericalGaussianVariable >
class  NoBpropVariable
class  DiffTemplate< ObjectType, NoBpropVariable >
class  TypeTraits< NoBpropVariable >
class  ObjectOptionVariable
 Variable which wraps an option of an object. More...
class  DiffTemplate< ObjectType, ObjectOptionVariable >
class  TypeTraits< ObjectOptionVariable >
class  OneHotSquaredLoss
 Computes sum(square_i(netout[i]-(i==classnum ?hotval :coldval)) This is used typically in a classification setting where netout is a Var of network outputs, and classnum is the target class number. More...
class  DiffTemplate< ObjectType, OneHotSquaredLoss >
class  TypeTraits< OneHotSquaredLoss >
class  OneHotVariable
 Represents a vector of a given lenth, that has value 1 at the index given by another variable and 0 everywhere else. More...
class  DiffTemplate< ObjectType, OneHotVariable >
class  TypeTraits< OneHotVariable >
class  OutputVariable
class  DiffTemplate< ObjectType, OutputVariable >
class  TypeTraits< OutputVariable >
class  PDistributionVariable
class  DiffTemplate< ObjectType, PDistributionVariable >
class  TypeTraits< PDistributionVariable >
class  PLogPVariable
 returns the elementwise x*log(x) in a (hopefully!) numerically stable way This can be used to compute the Entropy for instance More...
class  DiffTemplate< ObjectType, PLogPVariable >
class  TypeTraits< PLogPVariable >
class  PlusColumnVariable
 adds a single-column var to each column of a matrix var More...
class  DiffTemplate< ObjectType, PlusColumnVariable >
class  TypeTraits< PlusColumnVariable >
class  PlusConstantVariable
 adds a scalar constant to a matrix var More...
class  DiffTemplate< ObjectType, PlusConstantVariable >
class  TypeTraits< PlusConstantVariable >
class  PlusManyVariable
class  DiffTemplate< ObjectType, PlusManyVariable >
class  TypeTraits< PlusManyVariable >
class  PlusRowVariable
 adds a single-row var to each row of a matrix var More...
class  DiffTemplate< ObjectType, PlusRowVariable >
class  TypeTraits< PlusRowVariable >
class  PlusScalarVariable
 adds a scalar var to a matrix var More...
class  DiffTemplate< ObjectType, PlusScalarVariable >
class  TypeTraits< PlusScalarVariable >
class  PlusVariable
 adds 2 matrix vars of same size More...
class  DiffTemplate< ObjectType, PlusVariable >
class  TypeTraits< PlusVariable >
class  PotentialsVariable
class  DiffTemplate< ObjectType, PotentialsVariable >
class  TypeTraits< PotentialsVariable >
class  PowVariable
 elementwise pow (returns 0 wherever input is negative) More...
class  DiffTemplate< ObjectType, PowVariable >
class  TypeTraits< PowVariable >
class  PowVariableVariable
class  DiffTemplate< ObjectType, PowVariableVariable >
class  TypeTraits< PowVariableVariable >
class  ProductTransposeVariable
 Matrix product between matrix1 and transpose of matrix2. More...
class  DiffTemplate< ObjectType, ProductTransposeVariable >
class  TypeTraits< ProductTransposeVariable >
class  ProductVariable
 Matrix product. More...
class  DiffTemplate< ObjectType, ProductVariable >
class  TypeTraits< ProductVariable >
class  ProjectionErrorVariable
 The first input is a set of n_dim vectors (possibly seen as a single vector of their concatenation) f_i, each in R^n The second input is a set of T vectors (possibly seen as a single vector of their concatenation) t_j, each in R^n The output is the following: sum_j min_{w_j} || t_j - sum_i w_{ji} f_i ||^2 where row w_j of w is optmized analytically and separately for each j. More...
class  DiffTemplate< ObjectType, ProjectionErrorVariable >
class  TypeTraits< ProjectionErrorVariable >
class  ReIndexedTargetVariable
class  DiffTemplate< ObjectType, ReIndexedTargetVariable >
class  TypeTraits< ReIndexedTargetVariable >
class  ReshapeVariable
 Variable that views another variable, but with a different length() and width() (the only restriction being that length()*width() remain the same) More...
class  DiffTemplate< ObjectType, ReshapeVariable >
class  TypeTraits< ReshapeVariable >
class  RightPseudoInverseVariable
class  DiffTemplate< ObjectType, RightPseudoInverseVariable >
class  TypeTraits< RightPseudoInverseVariable >
class  RowAtPositionVariable
class  DiffTemplate< ObjectType, RowAtPositionVariable >
class  TypeTraits< RowAtPositionVariable >
class  RowOfVariable
class  DiffTemplate< ObjectType, RowOfVariable >
class  TypeTraits< RowOfVariable >
class  RowSumSquareVariable
class  DiffTemplate< ObjectType, RowSumSquareVariable >
class  TypeTraits< RowSumSquareVariable >
class  RowSumVariable
 result is a single column that contains the sum of each row of the input More...
class  DiffTemplate< ObjectType, RowSumVariable >
class  TypeTraits< RowSumVariable >
class  SemiSupervisedProbClassCostVariable
class  DiffTemplate< ObjectType, SemiSupervisedProbClassCostVariable >
class  TypeTraits< SemiSupervisedProbClassCostVariable >
class  SigmoidVariable
class  DiffTemplate< ObjectType, SigmoidVariable >
class  TypeTraits< SigmoidVariable >
class  SignVariable
 sign(x) = 1 if x>0, -1 if x<0, 0 if x=0, all done element by element. More...
class  DiffTemplate< ObjectType, SignVariable >
class  TypeTraits< SignVariable >
class  SoftmaxLossVariable
class  DiffTemplate< ObjectType, SoftmaxLossVariable >
class  TypeTraits< SoftmaxLossVariable >
class  SoftmaxVariable
class  DiffTemplate< ObjectType, SoftmaxVariable >
class  TypeTraits< SoftmaxVariable >
class  SoftplusVariable
class  DiffTemplate< ObjectType, SoftplusVariable >
class  TypeTraits< SoftplusVariable >
class  SoftSlopeIntegralVariable
class  DiffTemplate< ObjectType, SoftSlopeIntegralVariable >
class  TypeTraits< SoftSlopeIntegralVariable >
class  SoftSlopeVariable
class  DiffTemplate< ObjectType, SoftSlopeVariable >
class  TypeTraits< SoftSlopeVariable >
class  SourceVariable
class  DiffTemplate< ObjectType, SourceVariable >
class  TypeTraits< SourceVariable >
class  SparseIncrementalAffineTransformVariable
 Affine transformation of a vector variable, with weights that are sparse and incrementally added Should work for both column and row vectors: result vector will be of same kind (row or col) First row of transformation matrix contains bias b, following rows contain linear-transformation T Will compute b + x.T. More...
class  DiffTemplate< ObjectType, SparseIncrementalAffineTransformVariable >
class  TypeTraits< SparseIncrementalAffineTransformVariable >
class  SquareRootVariable
class  DiffTemplate< ObjectType, SquareRootVariable >
class  TypeTraits< SquareRootVariable >
class  SquareVariable
class  DiffTemplate< ObjectType, SquareVariable >
class  TypeTraits< SquareVariable >
class  SubMatTransposeVariable
class  DiffTemplate< ObjectType, SubMatTransposeVariable >
class  TypeTraits< SubMatTransposeVariable >
class  SubMatVariable
 Takes a submatrix of an input variable. More...
class  DiffTemplate< ObjectType, SubMatVariable >
class  TypeTraits< SubMatVariable >
class  SubsampleVariable
 A subsample var; equals subrample(input, the_subsamplefactor) More...
class  DiffTemplate< ObjectType, SubsampleVariable >
class  TypeTraits< SubsampleVariable >
class  SumAbsVariable
class  DiffTemplate< ObjectType, SumAbsVariable >
class  TypeTraits< SumAbsVariable >
class  SumOfVariable
 Sums the value of a Function evaluated on each row of a VMatrix. More...
class  DiffTemplate< ObjectType, SumOfVariable >
class  TypeTraits< SumOfVariable >
class  SumOverBagsVariable
class  DiffTemplate< ObjectType, SumOverBagsVariable >
class  TypeTraits< SumOverBagsVariable >
class  SumSquareVariable
class  DiffTemplate< ObjectType, SumSquareVariable >
class  TypeTraits< SumSquareVariable >
class  SumVariable
 Compute the sum of all elements in the input Var. More...
class  DiffTemplate< ObjectType, SumVariable >
class  TypeTraits< SumVariable >
class  SVDVariable
class  DiffTemplate< ObjectType, SVDVariable >
class  TypeTraits< SVDVariable >
class  TanhVariable
class  DiffTemplate< ObjectType, TanhVariable >
class  TypeTraits< TanhVariable >
class  VariablesTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, VariablesTest >
class  TypeTraits< VariablesTest >
class  VarUtilsTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, VarUtilsTest >
class  TypeTraits< VarUtilsTest >
class  ThresholdBpropVariable
class  DiffTemplate< ObjectType, ThresholdBpropVariable >
class  TypeTraits< ThresholdBpropVariable >
class  TimesColumnVariable
class  DiffTemplate< ObjectType, TimesColumnVariable >
class  TypeTraits< TimesColumnVariable >
class  TimesConstantVariable
 multiplies a matrix var by a scalar constant More...
class  DiffTemplate< ObjectType, TimesConstantVariable >
class  TypeTraits< TimesConstantVariable >
class  TimesRowVariable
class  DiffTemplate< ObjectType, TimesRowVariable >
class  TypeTraits< TimesRowVariable >
class  TimesScalarVariable
 multiplies a matrix var by a scalar var More...
class  DiffTemplate< ObjectType, TimesScalarVariable >
class  TypeTraits< TimesScalarVariable >
class  TimesVariable
 multiplies 2 matrix vars of same size elementwise More...
class  DiffTemplate< ObjectType, TimesVariable >
class  TypeTraits< TimesVariable >
class  TransposeProductVariable
 Matrix product between transpose of matrix1 and matrix2. More...
class  DiffTemplate< ObjectType, TransposeProductVariable >
class  TypeTraits< TransposeProductVariable >
class  TransposeVariable
class  DiffTemplate< ObjectType, TransposeVariable >
class  TypeTraits< TransposeVariable >
class  UnaryHardSlopeVariable
class  DiffTemplate< ObjectType, UnaryHardSlopeVariable >
class  TypeTraits< UnaryHardSlopeVariable >
class  UnaryVariable
class  DiffTemplate< ObjectType, UnaryVariable >
class  TypeTraits< UnaryVariable >
class  UnequalConstantVariable
 A scalar var; equal 1 if input1!=c, 0 otherwise. More...
class  DiffTemplate< ObjectType, UnequalConstantVariable >
class  TypeTraits< UnequalConstantVariable >
class  UnfoldedFuncVariable
class  DiffTemplate< ObjectType, UnfoldedFuncVariable >
class  TypeTraits< UnfoldedFuncVariable >
class  UnfoldedSumOfVariable
class  DiffTemplate< ObjectType, UnfoldedSumOfVariable >
class  TypeTraits< UnfoldedSumOfVariable >
class  VarArray
class  TypeTraits< VarArray >
class  VarArrayElementVariable
 Variable that is the element of the input1 VarArray indexed by the input2 variable. More...
class  DiffTemplate< ObjectType, VarArrayElementVariable >
class  TypeTraits< VarArrayElementVariable >
class  VarColumnsVariable
class  DiffTemplate< ObjectType, VarColumnsVariable >
class  TypeTraits< VarColumnsVariable >
class  VarElementVariable
class  DiffTemplate< ObjectType, VarElementVariable >
class  TypeTraits< VarElementVariable >
class  Var
class  Variable
class  DiffTemplate< ObjectType, Variable >
class  TypeTraits< Variable >
class  TypeTraits< Var >
class  VarMeasurer
class  VarRowsVariable
class  DiffTemplate< ObjectType, VarRowsVariable >
class  TypeTraits< VarRowsVariable >
class  VarRowVariable
 Variable that is the row of the input1 variable indexed by the input2 variable. More...
class  DiffTemplate< ObjectType, VarRowVariable >
class  TypeTraits< VarRowVariable >
class  VecElementVariable
 Variable that is the element of vector vec indexed by variable input. More...
class  DiffTemplate< ObjectType, VecElementVariable >
class  TypeTraits< VecElementVariable >
class  WeightedSumSquareVariable
class  DiffTemplate< ObjectType, WeightedSumSquareVariable >
class  TypeTraits< WeightedSumSquareVariable >
class  AddBagInformationVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  AddMissingVMatrix
class  DiffTemplate< ObjectType, AddMissingVMatrix >
class  TypeTraits< AddMissingVMatrix >
class  AppendNeighborsVMatrix
 Appends the nearest neighbors of the input samples of a source VMatrix. More...
class  DiffTemplate< ObjectType, AppendNeighborsVMatrix >
class  TypeTraits< AppendNeighborsVMatrix >
class  AsciiVMatrix
class  DiffTemplate< ObjectType, AsciiVMatrix >
class  TypeTraits< AsciiVMatrix >
class  AutoVMatrix
 This class is a simple wrapper to an underlying VMatrix of another type All it does is forward the method calls. More...
class  DiffTemplate< ObjectType, AutoVMatrix >
class  TypeTraits< AutoVMatrix >
class  AutoVMatrixSaveSource
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, AutoVMatrixSaveSource >
class  TypeTraits< AutoVMatrixSaveSource >
class  BinaryNumbersVMatrix
 VMatrix that can take its values from a possibly large file (greater than 2Gig) containing numbers in a user-given binary format, preceded by an arbitrary header whose length is user-given. More...
class  DiffTemplate< ObjectType, BinaryNumbersVMatrix >
class  TypeTraits< BinaryNumbersVMatrix >
class  BinaryOpVMatrix
class  DiffTemplate< ObjectType, BinaryOpVMatrix >
class  TypeTraits< BinaryOpVMatrix >
class  BinSplitter
class  DiffTemplate< ObjectType, BinSplitter >
class  TypeTraits< BinSplitter >
class  BootstrapSplitter
class  DiffTemplate< ObjectType, BootstrapSplitter >
class  TypeTraits< BootstrapSplitter >
class  BootstrapVMatrix
class  DiffTemplate< ObjectType, BootstrapVMatrix >
class  TypeTraits< BootstrapVMatrix >
class  ByteMemoryVMatrix
class  DiffTemplate< ObjectType, ByteMemoryVMatrix >
class  TypeTraits< ByteMemoryVMatrix >
class  CenteredVMatrix
class  DiffTemplate< ObjectType, CenteredVMatrix >
class  TypeTraits< CenteredVMatrix >
class  ClassSeparationSplitter
 Splitter that separates examples of some classes (test) from the examples of other classes (train). More...
class  DiffTemplate< ObjectType, ClassSeparationSplitter >
class  TypeTraits< ClassSeparationSplitter >
class  ClassSubsetVMatrix
class  DiffTemplate< ObjectType, ClassSubsetVMatrix >
class  TypeTraits< ClassSubsetVMatrix >
struct  GroupInfo
 Each row contains a certain amount of field groups. More...
class  CompactFileVMatrix
 A VMatrix that exists in a .pmat file (native PLearn matrix format, same as for Mat). More...
class  DiffTemplate< ObjectType, CompactFileVMatrix >
class  TypeTraits< CompactFileVMatrix >
union  short_and_twobytes
class  CompactVMatrix
class  DiffTemplate< ObjectType, CompactVMatrix >
class  TypeTraits< CompactVMatrix >
class  CompressedVMatrix
class  DiffTemplate< ObjectType, CompressedVMatrix >
class  TypeTraits< CompressedVMatrix >
class  ConcatColumnsVMatrix
class  DiffTemplate< ObjectType, ConcatColumnsVMatrix >
class  TypeTraits< ConcatColumnsVMatrix >
class  ConcatRowsSubVMatrix
class  DiffTemplate< ObjectType, ConcatRowsSubVMatrix >
class  TypeTraits< ConcatRowsSubVMatrix >
class  ConcatRowsVMatrix
class  DiffTemplate< ObjectType, ConcatRowsVMatrix >
class  TypeTraits< ConcatRowsVMatrix >
class  ConcatSetsSplitter
class  DiffTemplate< ObjectType, ConcatSetsSplitter >
class  TypeTraits< ConcatSetsSplitter >
class  ConstantVMatrix
 This VMatrix returns a constant element (specified upon construction) More...
class  DiffTemplate< ObjectType, ConstantVMatrix >
class  TypeTraits< ConstantVMatrix >
class  CrossReferenceVMatrix
class  DiffTemplate< ObjectType, CrossReferenceVMatrix >
class  TypeTraits< CrossReferenceVMatrix >
class  CumVMatrix
class  DiffTemplate< ObjectType, CumVMatrix >
class  TypeTraits< CumVMatrix >
class  DatedJoinVMatrix
class  DiffTemplate< ObjectType, DatedJoinVMatrix >
class  TypeTraits< DatedJoinVMatrix >
class  DatedVMatrix
class  DiffTemplate< ObjectType, DatedVMatrix >
class  TypeTraits< DatedVMatrix >
class  DBSplitter
class  DiffTemplate< ObjectType, DBSplitter >
class  TypeTraits< DBSplitter >
class  BatchVMatrix
 VMat class that replicates small parts of a matrix (mini-batches), so that each mini-batch appears twice (consecutively). More...
class  DiffTemplate< ObjectType, BatchVMatrix >
class  TypeTraits< BatchVMatrix >
class  LearnerProcessedVMatrix
class  DiffTemplate< ObjectType, LearnerProcessedVMatrix >
class  TypeTraits< LearnerProcessedVMatrix >
class  RemoveRowsVMatrix
 sees an underlying VMat with the specified rows excluded More...
class  DiffTemplate< ObjectType, RemoveRowsVMatrix >
class  TypeTraits< RemoveRowsVMatrix >
class  YMDDatedVMatrix
class  DiffTemplate< ObjectType, YMDDatedVMatrix >
class  TypeTraits< YMDDatedVMatrix >
class  DichotomizeVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, DichotomizeVMatrix >
class  TypeTraits< DichotomizeVMatrix >
class  DictionaryVMatrix
 VMat of text files, encoded with Dictionaries, The lines of the text files that are empty are ommited. More...
class  DiffTemplate< ObjectType, DictionaryVMatrix >
class  TypeTraits< DictionaryVMatrix >
class  DiskVMatrix
 A VMatrix whose (compressed) data resides in a directory and can span several files. More...
class  DiffTemplate< ObjectType, DiskVMatrix >
class  TypeTraits< DiskVMatrix >
class  DisregardRowsVMatrix
class  DiffTemplate< ObjectType, DisregardRowsVMatrix >
class  TypeTraits< DisregardRowsVMatrix >
class  EncodedVMatrix
class  DiffTemplate< ObjectType, EncodedVMatrix >
class  TypeTraits< EncodedVMatrix >
class  NetflixVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, NetflixVMatrix >
class  TypeTraits< NetflixVMatrix >
class  ExplicitSplitter
class  DiffTemplate< ObjectType, ExplicitSplitter >
class  TypeTraits< ExplicitSplitter >
class  ExtendedVMatrix
class  DiffTemplate< ObjectType, ExtendedVMatrix >
class  TypeTraits< ExtendedVMatrix >
class  ExtractNNetParamsVMatrix
class  DiffTemplate< ObjectType, ExtractNNetParamsVMatrix >
class  TypeTraits< ExtractNNetParamsVMatrix >
class  FileVMatrix
 A VMatrix that exists in a .pmat file (native PLearn matrix format, same as for Mat). More...
class  DiffTemplate< ObjectType, FileVMatrix >
class  TypeTraits< FileVMatrix >
class  FilteredVMatrix
class  DiffTemplate< ObjectType, FilteredVMatrix >
class  TypeTraits< FilteredVMatrix >
class  FilterSplitter
class  DiffTemplate< ObjectType, FilterSplitter >
class  TypeTraits< FilterSplitter >
class  FinancePreprocVMatrix
class  DiffTemplate< ObjectType, FinancePreprocVMatrix >
class  TypeTraits< FinancePreprocVMatrix >
class  ForwardVMatrix
class  DiffTemplate< ObjectType, ForwardVMatrix >
class  TypeTraits< ForwardVMatrix >
class  FractionSplitter
class  DiffTemplate< ObjectType, FractionSplitter >
class  TypeTraits< FractionSplitter >
class  GaussianizeVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, GaussianizeVMatrix >
class  TypeTraits< GaussianizeVMatrix >
class  GeneralizedOneHotVMatrix
 This VMat is a generalization of OneHotVMatrix where many columns (given by the Vec index) are mapped, instead of just the last one. More...
class  DiffTemplate< ObjectType, GeneralizedOneHotVMatrix >
class  TypeTraits< GeneralizedOneHotVMatrix >
class  GetInputVMatrix
class  DiffTemplate< ObjectType, GetInputVMatrix >
class  TypeTraits< GetInputVMatrix >
class  GramVMatrix
class  DiffTemplate< ObjectType, GramVMatrix >
class  TypeTraits< GramVMatrix >
class  ImputationVMatrix
class  DiffTemplate< ObjectType, ImputationVMatrix >
class  TypeTraits< ImputationVMatrix >
class  IndexedVMatrix
 VMat class that sees a matrix as a collection of triplets (row, column, value) Thus it is a N x 3 matrix, with N = the number of elements in the original matrix. More...
class  DiffTemplate< ObjectType, IndexedVMatrix >
class  TypeTraits< IndexedVMatrix >
class  InfiniteMNISTVMatrix
 VMatrix that uses the code from "Training Invariant Support Vector Machines using Selective Sampling" by Loosli, Canu and Bottou (JMLR 2007), to generate "infinite" stream (i.e. More...
class  DiffTemplate< ObjectType, InfiniteMNISTVMatrix >
class  TypeTraits< InfiniteMNISTVMatrix >
class  InterleaveVMatrix
 Interleave several VMats row-wise. More...
class  DiffTemplate< ObjectType, InterleaveVMatrix >
class  TypeTraits< InterleaveVMatrix >
struct  JoinFieldStat
class  JoinVMatrix
class  DiffTemplate< ObjectType, JoinVMatrix >
class  TypeTraits< JoinVMatrix >
class  JulianizeVMatrix
class  DiffTemplate< ObjectType, JulianizeVMatrix >
class  TypeTraits< JulianizeVMatrix >
class  KernelVMatrix
class  DiffTemplate< ObjectType, KernelVMatrix >
class  TypeTraits< KernelVMatrix >
class  KFoldSplitter
class  DiffTemplate< ObjectType, KFoldSplitter >
class  TypeTraits< KFoldSplitter >
class  KNNImputationVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, KNNImputationVMatrix >
class  TypeTraits< KNNImputationVMatrix >
class  KNNVMatrix
class  DiffTemplate< ObjectType, KNNVMatrix >
class  TypeTraits< KNNVMatrix >
class  LemmatizeVMatrix
 Takes a VMatrix with a word and a POS field and adds a field consisting of the lemma form of the word. More...
class  DiffTemplate< ObjectType, LemmatizeVMatrix >
class  TypeTraits< LemmatizeVMatrix >
class  LIBSVMSparseVMatrix
 VMatrix containing data from a libsvm format file. More...
class  DiffTemplate< ObjectType, LIBSVMSparseVMatrix >
class  TypeTraits< LIBSVMSparseVMatrix >
class  LocallyPrecomputedVMatrix
class  LocalNeighborsDifferencesVMatrix
class  DiffTemplate< ObjectType, LocalNeighborsDifferencesVMatrix >
class  TypeTraits< LocalNeighborsDifferencesVMatrix >
class  MeanImputationVMatrix
 provides mean imputation for missing variables More...
class  DiffTemplate< ObjectType, MeanImputationVMatrix >
class  TypeTraits< MeanImputationVMatrix >
class  MeanMedianModeImputationVMatrix
class  DiffTemplate< ObjectType, MeanMedianModeImputationVMatrix >
class  TypeTraits< MeanMedianModeImputationVMatrix >
class  MemoryVMatrix
class  DiffTemplate< ObjectType, MemoryVMatrix >
class  TypeTraits< MemoryVMatrix >
class  MemoryVMatrixNoSave
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, MemoryVMatrixNoSave >
class  TypeTraits< MemoryVMatrixNoSave >
class  MissingIndicatorVMatrix
class  DiffTemplate< ObjectType, MissingIndicatorVMatrix >
class  TypeTraits< MissingIndicatorVMatrix >
class  MissingInstructionVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, MissingInstructionVMatrix >
class  TypeTraits< MissingInstructionVMatrix >
class  MixtureVMatrix
 Mixes several underlying source VMat, with ponderation. More...
class  DiffTemplate< ObjectType, MixtureVMatrix >
class  TypeTraits< MixtureVMatrix >
class  MixUnlabeledNeighbourVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, MixUnlabeledNeighbourVMatrix >
class  TypeTraits< MixUnlabeledNeighbourVMatrix >
class  MovingAverageVMatrix
class  DiffTemplate< ObjectType, MovingAverageVMatrix >
class  TypeTraits< MovingAverageVMatrix >
class  MultiInstanceVMatrix
class  DiffTemplate< ObjectType, MultiInstanceVMatrix >
class  TypeTraits< MultiInstanceVMatrix >
class  MultiTargetOneHotVMatrix
class  DiffTemplate< ObjectType, MultiTargetOneHotVMatrix >
class  TypeTraits< MultiTargetOneHotVMatrix >
class  MultiTaskSeparationSplitter
 Splitter that removes a task for test and keeps the others for training. More...
class  DiffTemplate< ObjectType, MultiTaskSeparationSplitter >
class  TypeTraits< MultiTaskSeparationSplitter >
class  MultiToUniInstanceSelectRandomVMatrix
 selects randomly one row per bags from a multi instances conforming VMatrix and discard the multi instances bag information column. More...
class  DiffTemplate< ObjectType, MultiToUniInstanceSelectRandomVMatrix >
class  TypeTraits< MultiToUniInstanceSelectRandomVMatrix >
class  NoSplitSplitter
class  DiffTemplate< ObjectType, NoSplitSplitter >
class  TypeTraits< NoSplitSplitter >
class  OneHotVMatrix
class  DiffTemplate< ObjectType, OneHotVMatrix >
class  TypeTraits< OneHotVMatrix >
class  OneVsAllVMatrix
class  DiffTemplate< ObjectType, OneVsAllVMatrix >
class  TypeTraits< OneVsAllVMatrix >
class  PairsVMatrix
class  DiffTemplate< ObjectType, PairsVMatrix >
class  TypeTraits< PairsVMatrix >
class  PLearnerOutputVMatrix
class  DiffTemplate< ObjectType, PLearnerOutputVMatrix >
class  TypeTraits< PLearnerOutputVMatrix >
class  PrecomputedVMatrix
class  DiffTemplate< ObjectType, PrecomputedVMatrix >
class  TypeTraits< PrecomputedVMatrix >
class  ProcessDatasetVMatrix
class  DiffTemplate< ObjectType, ProcessDatasetVMatrix >
class  TypeTraits< ProcessDatasetVMatrix >
class  ProcessingVMatrix
class  DiffTemplate< ObjectType, ProcessingVMatrix >
class  TypeTraits< ProcessingVMatrix >
class  ProcessSymbolicSequenceVMatrix
 This VMatrix takes a VMat of a sequence of symbolic elements (corresponding to a set of symbolic attributes) and constructs context rows. More...
class  DiffTemplate< ObjectType, ProcessSymbolicSequenceVMatrix >
class  TypeTraits< ProcessSymbolicSequenceVMatrix >
class  PutSubVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, PutSubVMatrix >
class  TypeTraits< PutSubVMatrix >
class  PythonTableVMatrix
class  DiffTemplate< ObjectType, PythonTableVMatrix >
class  TypeTraits< PythonTableVMatrix >
class  RandomNeighborsDifferencesVMatrix
class  DiffTemplate< ObjectType, RandomNeighborsDifferencesVMatrix >
class  TypeTraits< RandomNeighborsDifferencesVMatrix >
class  RandomSamplesFromVMatrix
 VMatrix that contains random samples from a VMatrix. More...
class  DiffTemplate< ObjectType, RandomSamplesFromVMatrix >
class  TypeTraits< RandomSamplesFromVMatrix >
class  RandomSamplesVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RandomSamplesVMatrix >
class  TypeTraits< RandomSamplesVMatrix >
class  RangeVMatrix
 Outputs scalar samples (length 1) starting at start, up to end (inclusive) with step. When end is reached it starts over again. More...
class  DiffTemplate< ObjectType, RangeVMatrix >
class  TypeTraits< RangeVMatrix >
class  RankedVMatrix
class  DiffTemplate< ObjectType, RankedVMatrix >
class  TypeTraits< RankedVMatrix >
class  RealFunctionsProcessedVMatrix
class  DiffTemplate< ObjectType, RealFunctionsProcessedVMatrix >
class  TypeTraits< RealFunctionsProcessedVMatrix >
class  RegularGridVMatrix
class  DiffTemplate< ObjectType, RegularGridVMatrix >
class  TypeTraits< RegularGridVMatrix >
class  ReIndexedTargetVMatrix
 VMatrix the reindexes the target fields of a source VMatrix, according to the getValues(row,target_col) function, where row contains the values of a row of the source VMatrix, and target_col is the column index of (one of ) the target field. More...
class  DiffTemplate< ObjectType, ReIndexedTargetVMatrix >
class  TypeTraits< ReIndexedTargetVMatrix >
class  RemapLastColumnVMatrix
class  DiffTemplate< ObjectType, RemapLastColumnVMatrix >
class  TypeTraits< RemapLastColumnVMatrix >
class  RemoveDuplicateVMatrix
class  DiffTemplate< ObjectType, RemoveDuplicateVMatrix >
class  TypeTraits< RemoveDuplicateVMatrix >
struct  IndexAndMissingFlags
 Simple class representing one sample (given by its index) with a string of '0' and '1' where '0' represents a missing value and '1' a non-missing one. More...
struct  compareIndexAndMissingFlags
 Comparison function used in sorting. More...
class  ReorderByMissingVMatrix
 Re-order samples in a source VMat by their missing attributes. More...
class  DiffTemplate< ObjectType, ReorderByMissingVMatrix >
class  TypeTraits< ReorderByMissingVMatrix >
class  RepeatSplitter
class  DiffTemplate< ObjectType, RepeatSplitter >
class  TypeTraits< RepeatSplitter >
class  RepeatVMatrix
class  DiffTemplate< ObjectType, RepeatVMatrix >
class  TypeTraits< RepeatVMatrix >
class  ReplicateSamplesVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ReplicateSamplesVMatrix >
class  TypeTraits< ReplicateSamplesVMatrix >
class  RowBufferedVMatrix
class  DiffTemplate< ObjectType, RowBufferedVMatrix >
class  TypeTraits< RowBufferedVMatrix >
class  RowsSubVMatrix
class  DiffTemplate< ObjectType, RowsSubVMatrix >
class  TypeTraits< RowsSubVMatrix >
class  SelectColumnsVMatrix
 selects variables (columns) from a source matrix according to given vector of indices. More...
class  DiffTemplate< ObjectType, SelectColumnsVMatrix >
class  TypeTraits< SelectColumnsVMatrix >
class  SelectRowsFileIndexVMatrix
class  DiffTemplate< ObjectType, SelectRowsFileIndexVMatrix >
class  TypeTraits< SelectRowsFileIndexVMatrix >
class  SelectRowsMultiInstanceVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SelectRowsMultiInstanceVMatrix >
class  TypeTraits< SelectRowsMultiInstanceVMatrix >
class  SelectRowsVMatrix
 selects samples from a source matrix according to given vector of indices More...
class  DiffTemplate< ObjectType, SelectRowsVMatrix >
class  TypeTraits< SelectRowsVMatrix >
class  SelectSetsSplitter
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SelectSetsSplitter >
class  TypeTraits< SelectSetsSplitter >
class  SentencesBlocks
class  SeparateInputVMatrix
 Separates the input in nsep parts and distributes them on different rows. More...
class  DiffTemplate< ObjectType, SeparateInputVMatrix >
class  TypeTraits< SeparateInputVMatrix >
class  SequentialSplitter
class  DiffTemplate< ObjectType, SequentialSplitter >
class  TypeTraits< SequentialSplitter >
class  ShiftAndRescaleVMatrix
class  DiffTemplate< ObjectType, ShiftAndRescaleVMatrix >
class  TypeTraits< ShiftAndRescaleVMatrix >
class  ShuffleColumnsVMatrix
class  DiffTemplate< ObjectType, ShuffleColumnsVMatrix >
class  TypeTraits< ShuffleColumnsVMatrix >
class  SortRowsVMatrix
 Sort the samples of a VMatrix according to one (or more) given columns. More...
class  DiffTemplate< ObjectType, SortRowsVMatrix >
class  TypeTraits< SortRowsVMatrix >
class  SourceVMatrix
class  DiffTemplate< ObjectType, SourceVMatrix >
class  TypeTraits< SourceVMatrix >
class  SourceVMatrixSplitter
class  DiffTemplate< ObjectType, SourceVMatrixSplitter >
class  TypeTraits< SourceVMatrixSplitter >
class  SparseVMatrixRow
class  SparseVMatrix
class  DiffTemplate< ObjectType, SparseVMatrix >
class  TypeTraits< SparseVMatrix >
class  Splitter
 This class is an abstract base class for mechanisms allowing to "split" a dataset into one or several partitions (or "splits"). More...
class  DiffTemplate< ObjectType, Splitter >
class  TypeTraits< Splitter >
class  SplitWiseValidationVMatrix
 VMatrix that takes several experiment split_stats.pmat to extract the split statistics and perform validation. More...
class  DiffTemplate< ObjectType, SplitWiseValidationVMatrix >
class  TypeTraits< SplitWiseValidationVMatrix >
class  StackedSplitter
class  DiffTemplate< ObjectType, StackedSplitter >
class  TypeTraits< StackedSplitter >
class  StochasticBinarizeVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, StochasticBinarizeVMatrix >
class  TypeTraits< StochasticBinarizeVMatrix >
class  StrTableVMatrix
class  DiffTemplate< ObjectType, StrTableVMatrix >
class  TypeTraits< StrTableVMatrix >
class  SubInputVMatrix
class  DiffTemplate< ObjectType, SubInputVMatrix >
class  TypeTraits< SubInputVMatrix >
class  SubVMatrix
class  DiffTemplate< ObjectType, SubVMatrix >
class  TypeTraits< SubVMatrix >
class  TemporalHorizonVMatrix
 This VMat delay the last targetsize entries of a source VMat by a certain horizon. More...
class  DiffTemplate< ObjectType, TemporalHorizonVMatrix >
class  TypeTraits< TemporalHorizonVMatrix >
class  TemporaryDiskVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, TemporaryDiskVMatrix >
class  TypeTraits< TemporaryDiskVMatrix >
class  TemporaryFileVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, TemporaryFileVMatrix >
class  TypeTraits< TemporaryFileVMatrix >
class  AutoVMatrixTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, AutoVMatrixTest >
class  TypeTraits< AutoVMatrixTest >
class  FileVMatrixTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, FileVMatrixTest >
class  TypeTraits< FileVMatrixTest >
class  IndexedVMatrixTest
 Tests for IndexedVMatrix, including handling of NaN and string mappings. More...
class  DiffTemplate< ObjectType, IndexedVMatrixTest >
class  TypeTraits< IndexedVMatrixTest >
class  RowBufferedVMatrixTest
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RowBufferedVMatrixTest >
class  TypeTraits< RowBufferedVMatrixTest >
class  TestInTrainSplitter
class  DiffTemplate< ObjectType, TestInTrainSplitter >
class  TypeTraits< TestInTrainSplitter >
class  TextFilesVMatrix
class  TextStreamVMatrix
class  DiffTemplate< ObjectType, TextStreamVMatrix >
class  TypeTraits< TextStreamVMatrix >
class  ThresholdVMatrix
class  ToBagSplitter
class  DiffTemplate< ObjectType, ToBagSplitter >
class  TypeTraits< ToBagSplitter >
class  TrainTestSplitter
class  DiffTemplate< ObjectType, TrainTestSplitter >
class  TypeTraits< TrainTestSplitter >
class  TrainValidTestSplitter
class  DiffTemplate< ObjectType, TrainValidTestSplitter >
class  TypeTraits< TrainValidTestSplitter >
class  TransposeVMatrix
class  DiffTemplate< ObjectType, TransposeVMatrix >
class  TypeTraits< TransposeVMatrix >
class  UCIDataVMatrix
class  DiffTemplate< ObjectType, UCIDataVMatrix >
class  TypeTraits< UCIDataVMatrix >
class  UniformizeVMatrix
class  DiffTemplate< ObjectType, UniformizeVMatrix >
class  TypeTraits< UniformizeVMatrix >
class  UniformVMatrix
class  DiffTemplate< ObjectType, UniformVMatrix >
class  TypeTraits< UniformVMatrix >
class  UpsideDownVMatrix
class  DiffTemplate< ObjectType, UpsideDownVMatrix >
class  TypeTraits< UpsideDownVMatrix >
class  ValueSelectRowsVMatrix
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ValueSelectRowsVMatrix >
class  TypeTraits< ValueSelectRowsVMatrix >
class  VariableDeletionVMatrix
class  DiffTemplate< ObjectType, VariableDeletionVMatrix >
class  TypeTraits< VariableDeletionVMatrix >
class  VecExtendedVMatrix
class  DiffTemplate< ObjectType, VecExtendedVMatrix >
class  TypeTraits< VecExtendedVMatrix >
class  ViewSplitterVMatrix
class  DiffTemplate< ObjectType, ViewSplitterVMatrix >
class  TypeTraits< ViewSplitterVMatrix >
class  VMat
class  TypeTraits< VMat >
class  VMatAccessBuffer
 Simple buffer class for getRow calls on a VMat. More...
class  VMatLanguage
class  DiffTemplate< ObjectType, VMatLanguage >
class  TypeTraits< VMatLanguage >
class  PreprocessingVMatrix
class  DiffTemplate< ObjectType, PreprocessingVMatrix >
class  TypeTraits< PreprocessingVMatrix >
class  VMatrix
 Base classes for virtual matrices. More...
class  DiffTemplate< ObjectType, VMatrix >
class  TypeTraits< VMatrix >
class  VMatrixFromDistribution
class  DiffTemplate< ObjectType, VMatrixFromDistribution >
class  TypeTraits< VMatrixFromDistribution >
class  VMField
 a VMField contains a fieldname and a fieldtype More...
class  VMFieldStat
 this class holds simple statistics about a field More...
class  VVec
 A VVec is a reference to a row or part of a row (a subrow) of a VMatrix. More...
class  VVMatrix
 this class is a wrapper for a .vmat VMatrix. More...
class  DiffTemplate< ObjectType, VVMatrix >
class  TypeTraits< VVMatrix >
class  AnalyzeDond2DiscreteVariables
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, AnalyzeDond2DiscreteVariables >
class  TypeTraits< AnalyzeDond2DiscreteVariables >
class  AnalyzeFieldStats
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, AnalyzeFieldStats >
class  TypeTraits< AnalyzeFieldStats >
class  CheckDond2FileSequence
 Generate samples from a mixture of two gaussians. More...
class  ComputeDond2Target
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, ComputeDond2Target >
class  TypeTraits< ComputeDond2Target >
class  ComputePurenneError
class  ConditionalMeanImputationVMatrix
class  DiffTemplate< ObjectType, ConditionalMeanImputationVMatrix >
class  TypeTraits< ConditionalMeanImputationVMatrix >
class  ConfigParsing
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  CovariancePreservationImputationVMatrix
class  DiffTemplate< ObjectType, CovariancePreservationImputationVMatrix >
class  TypeTraits< CovariancePreservationImputationVMatrix >
class  DichotomizeDond2DiscreteVariables
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, DichotomizeDond2DiscreteVariables >
class  TypeTraits< DichotomizeDond2DiscreteVariables >
class  Experimentation
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, Experimentation >
class  TypeTraits< Experimentation >
class  FixDond2BinaryVariables
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, FixDond2BinaryVariables >
class  TypeTraits< FixDond2BinaryVariables >
class  MergeDond2Files
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, MergeDond2Files >
class  TypeTraits< MergeDond2Files >
class  NeighborhoodConditionalMean
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, NeighborhoodConditionalMean >
class  TypeTraits< NeighborhoodConditionalMean >
class  NeighborhoodImputationVMatrix
class  DiffTemplate< ObjectType, NeighborhoodImputationVMatrix >
class  TypeTraits< NeighborhoodImputationVMatrix >
class  Preprocessing
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, Preprocessing >
class  TypeTraits< Preprocessing >
class  SecondIterationTester
class  DiffTemplate< ObjectType, SecondIterationTester >
class  TypeTraits< SecondIterationTester >
class  SecondIterationWrapper
class  StabilisationLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  TestImputations
 Generate samples from a mixture of two gaussians. More...
class  DiffTemplate< ObjectType, TestImputations >
class  TypeTraits< TestImputations >
class  WeightedDistance
 This class implements an Ln distance (defaults to L2 i.e. euclidean distance). More...
class  DiffTemplate< ObjectType, WeightedDistance >
class  TypeTraits< WeightedDistance >
class  BinaryStump
class  ClassifierFromConditionalPDistribution
 Classifier that takes a ConditionalPDistribution and classifies with it, by finding the target class y that maximizes p(y|x), where x is the input. More...
class  ClassifierFromDensity
class  KFoldLogisticClassifier
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  LocalGaussianClassifier
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  FeatureSetNaiveBayesClassifier
 Naive Bayes classifier on a feature set space. More...
class  DiffTemplate< ObjectType, FeatureSetNaiveBayesClassifier >
class  TypeTraits< FeatureSetNaiveBayesClassifier >
class  KNNClassifier
 This class provides a simple N-class classifier based upon an enclosed K-nearest-neighbors finder (derived from GenericNearestNeighbors; specified with the 'knn' option). More...
class  DiffTemplate< ObjectType, KNNClassifier >
class  TypeTraits< KNNClassifier >
class  MultiInstanceNNet
class  DiffTemplate< ObjectType, MultiInstanceNNet >
class  TypeTraits< MultiInstanceNNet >
class  SVMClassificationTorch
class  DiffTemplate< ObjectType, SVMClassificationTorch >
class  TypeTraits< SVMClassificationTorch >
class  ToBagClassifier
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  ConditionalDensityNet
class  DiffTemplate< ObjectType, ConditionalDensityNet >
class  TypeTraits< ConditionalDensityNet >
class  ConditionalDistribution
class  ConditionalGaussianDistribution
class  Distribution
class  EmpiricalDistribution
class  GaussianContinuumDistribution
class  DiffTemplate< ObjectType, GaussianContinuumDistribution >
class  TypeTraits< GaussianContinuumDistribution >
class  GaussianProcessRegressor
 Implements Gaussian Process Regression (GPR) with an arbitrary kernel. More...
class  DiffTemplate< ObjectType, GaussianProcessRegressor >
class  TypeTraits< GaussianProcessRegressor >
class  LocallyWeightedDistribution
class  PConditionalDistribution
class  LocallyMagnifiedDistribution
class  DiffTemplate< ObjectType, LocallyMagnifiedDistribution >
class  TypeTraits< LocallyMagnifiedDistribution >
class  NeighborhoodBoxVolumeDensityEstimator
class  DiffTemplate< ObjectType, NeighborhoodBoxVolumeDensityEstimator >
class  TypeTraits< NeighborhoodBoxVolumeDensityEstimator >
class  ReconstructionCandidate
 description of the main class: TransformationLearner More...
class  TransformationLearner
class  DiffTemplate< ObjectType, TransformationLearner >
class  TypeTraits< TransformationLearner >
class  GaussianDistribution
struct  MissingFlag
struct  NoProperty
class  GaussMix
class  DiffTemplate< ObjectType, GaussMix >
class  TypeTraits< GaussMix >
class  HistogramDistribution
class  DiffTemplate< ObjectType, HistogramDistribution >
class  TypeTraits< HistogramDistribution >
class  KernelDensityEstimator
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, KernelDensityEstimator >
class  TypeTraits< KernelDensityEstimator >
class  ManifoldParzen2
class  DiffTemplate< ObjectType, ManifoldParzen2 >
class  TypeTraits< ManifoldParzen2 >
class  MixtureDistribution
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  NGramDistribution
 This class implements an ngram distribution for symbol sequence modeling. More...
class  NGramTree
class  DiffTemplate< ObjectType, NGramTree >
class  TypeTraits< NGramTree >
class  NonLocalManifoldParzen
class  DiffTemplate< ObjectType, NonLocalManifoldParzen >
class  TypeTraits< NonLocalManifoldParzen >
class  ParzenWindow
class  DiffTemplate< ObjectType, ParzenWindow >
class  TypeTraits< ParzenWindow >
class  PDistribution
 Base class for PLearn probability distributions. More...
class  RandomGaussMix
class  DiffTemplate< ObjectType, RandomGaussMix >
class  TypeTraits< RandomGaussMix >
class  RBMDistribution
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  SpiralDistribution
class  SymbolNode
class  DiffTemplate< ObjectType, SymbolNode >
class  TypeTraits< SymbolNode >
class  UnconditionalDistribution
class  UniformDistribution
class  AddCostToLearner
class  DiffTemplate< ObjectType, AddCostToLearner >
class  TypeTraits< AddCostToLearner >
class  AddLayersNNet
class  DiffTemplate< ObjectType, AddLayersNNet >
class  TypeTraits< AddLayersNNet >
class  BestAveragingPLearner
 Select the M "best" of N trained PLearners based on a train cost. More...
class  DiffTemplate< ObjectType, BestAveragingPLearner >
class  TypeTraits< BestAveragingPLearner >
class  ChainedLearners
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ChainedLearners >
class  TypeTraits< ChainedLearners >
class  DeepNNet
class  DiffTemplate< ObjectType, DeepNNet >
class  TypeTraits< DeepNNet >
class  Learner
class  DiffTemplate< ObjectType, Learner >
class  TypeTraits< Learner >
class  NeuralNet
class  DiffTemplate< ObjectType, NeuralNet >
class  TypeTraits< NeuralNet >
class  DistRepNNet
class  DiffTemplate< ObjectType, DistRepNNet >
class  TypeTraits< DistRepNNet >
class  EmbeddedLearner
class  DiffTemplate< ObjectType, EmbeddedLearner >
class  TypeTraits< EmbeddedLearner >
class  CorrelationProfiler
 Used to profile the correlation between the elements of a vector. More...
class  DiffTemplate< ObjectType, CorrelationProfiler >
class  TypeTraits< CorrelationProfiler >
class  DeepReconstructorNet
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, DeepReconstructorNet >
class  TypeTraits< DeepReconstructorNet >
class  mNNet
 Multi-layer neural network based on matrix-matrix multiplications. More...
class  DiffTemplate< ObjectType, mNNet >
class  TypeTraits< mNNet >
class  NatGradEstimator
 Class used for converting a sequence of n-dimensional gradients g_t into covariance-corrected update directions v_t, approximating v_t = inv(C_t) g_t, with C_t = gamma C_{t-1} + g_t g_t'. More...
class  DiffTemplate< ObjectType, NatGradEstimator >
class  TypeTraits< NatGradEstimator >
class  NatGradNNet
 Multi-layer neural network trained with an efficient Natural Gradient optimization. More...
class  DiffTemplate< ObjectType, NatGradNNet >
class  TypeTraits< NatGradNNet >
class  NatGradSMPNNet
 Multi-layer neural network trained with an efficient Natural Gradient optimization. More...
class  DiffTemplate< ObjectType, NatGradSMPNNet >
class  TypeTraits< NatGradSMPNNet >
class  PvGradNNet
 Multi-layer neural network based on matrix-matrix multiplications. More...
class  DiffTemplate< ObjectType, PvGradNNet >
class  TypeTraits< PvGradNNet >
class  FeatureSetNNet
 Feedforward Neural Network for symbolic data represented using features. More...
class  DiffTemplate< ObjectType, FeatureSetNNet >
class  TypeTraits< FeatureSetNNet >
class  GradientCorrector
 Virtual class used for converting a sequence of n-dimensional gradients g_t into corrected update directions v_t. More...
class  DiffTemplate< ObjectType, GradientCorrector >
class  TypeTraits< GradientCorrector >
class  HorizonStatefulLearner
 A HorizonStatefulLearner is a StatefulLearner designed for forecasting at horizon h. More...
class  DiffTemplate< ObjectType, HorizonStatefulLearner >
class  TypeTraits< HorizonStatefulLearner >
class  IdentityPLearner
class  DiffTemplate< ObjectType, IdentityPLearner >
class  TypeTraits< IdentityPLearner >
class  IncrementalNNet
class  DiffTemplate< ObjectType, IncrementalNNet >
class  TypeTraits< IncrementalNNet >
class  NeighborhoodSmoothnessNNet
class  DiffTemplate< ObjectType, NeighborhoodSmoothnessNNet >
class  TypeTraits< NeighborhoodSmoothnessNNet >
class  NNet
class  DiffTemplate< ObjectType, NNet >
class  TypeTraits< NNet >
class  PLearner
 The base class for learning algorithms, which should be the main "products" of PLearn. More...
class  DiffTemplate< ObjectType, PLearner >
class  TypeTraits< PLearner >
class  PythonProcessedLearner
 Allows preprocessing operations to be carried out by a Python code snippet. More...
class  DiffTemplate< ObjectType, PythonProcessedLearner >
class  TypeTraits< PythonProcessedLearner >
class  SelectInputSubsetLearner
class  DiffTemplate< ObjectType, SelectInputSubsetLearner >
class  TypeTraits< SelectInputSubsetLearner >
class  StackedLearner
class  DiffTemplate< ObjectType, StackedLearner >
class  TypeTraits< StackedLearner >
class  StatefulLearner
class  DiffTemplate< ObjectType, StatefulLearner >
class  TypeTraits< StatefulLearner >
class  TestingLearner
class  DiffTemplate< ObjectType, TestingLearner >
class  TypeTraits< TestingLearner >
class  TorchLearner
class  DiffTemplate< ObjectType, TorchLearner >
class  TypeTraits< TorchLearner >
class  TransformOutputLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, TransformOutputLearner >
class  TypeTraits< TransformOutputLearner >
class  VPLCombinedLearner
class  DiffTemplate< ObjectType, VPLCombinedLearner >
class  TypeTraits< VPLCombinedLearner >
class  VPLPreprocessedLearner
class  DiffTemplate< ObjectType, VPLPreprocessedLearner >
class  TypeTraits< VPLPreprocessedLearner >
class  VPLPreprocessedLearner2
class  DiffTemplate< ObjectType, VPLPreprocessedLearner2 >
class  TypeTraits< VPLPreprocessedLearner2 >
class  VPLProcessor
class  DiffTemplate< ObjectType, VPLProcessor >
class  TypeTraits< VPLProcessor >
class  CartesianProductOracle
class  DiffTemplate< ObjectType, CartesianProductOracle >
class  TypeTraits< CartesianProductOracle >
class  EarlyStoppingOracle
class  DiffTemplate< ObjectType, EarlyStoppingOracle >
class  TypeTraits< EarlyStoppingOracle >
class  ExplicitListOracle
class  DiffTemplate< ObjectType, ExplicitListOracle >
class  TypeTraits< ExplicitListOracle >
class  HyperCommand
class  DiffTemplate< ObjectType, HyperCommand >
class  TypeTraits< HyperCommand >
class  HyperLearner
class  DiffTemplate< ObjectType, HyperLearner >
class  TypeTraits< HyperLearner >
class  HyperOptimize
 Carry out an hyper-parameter optimization according to an Oracle. More...
class  DiffTemplate< ObjectType, HyperOptimize >
class  TypeTraits< HyperOptimize >
class  HyperRetrain
class  DiffTemplate< ObjectType, HyperRetrain >
class  TypeTraits< HyperRetrain >
class  HyperSetOption
class  DiffTemplate< ObjectType, HyperSetOption >
class  TypeTraits< HyperSetOption >
class  OptimizeOptionOracle
class  DiffTemplate< ObjectType, OptimizeOptionOracle >
class  TypeTraits< OptimizeOptionOracle >
class  OptionsOracle
class  DiffTemplate< ObjectType, OptionsOracle >
class  TypeTraits< OptionsOracle >
class  OracleObjectGenerator
class  DiffTemplate< ObjectType, OracleObjectGenerator >
class  TypeTraits< OracleObjectGenerator >
class  StepwiseSelectionOracle
 This oracle implements a stepwise forward variable selection procedure. More...
class  DiffTemplate< ObjectType, StepwiseSelectionOracle >
class  TypeTraits< StepwiseSelectionOracle >
class  GraphicalBiText
class  ShellProgressBar
class  ProbVector
class  SmoothedProbSparseMatrix
class  ComplementedProbSparseMatrix
class  TextSenseSequenceVMatrix
 This class handles a sequence of words/sense tag/POS triplets to present it as target words and their context. More...
class  ProbabilitySparseMatrix
class  PPointableSet
class  Set
struct  Node
class  WordNetOntology
class  AdaBoost
class  DiffTemplate< ObjectType, AdaBoost >
class  TypeTraits< AdaBoost >
class  BaggingLearner
 Learner that trains several sub-learners on 'bags'. More...
class  DiffTemplate< ObjectType, BaggingLearner >
class  TypeTraits< BaggingLearner >
class  CompareLearner
class  DiffTemplate< ObjectType, CompareLearner >
class  TypeTraits< CompareLearner >
class  MultiClassAdaBoost
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, MultiClassAdaBoost >
class  TypeTraits< MultiClassAdaBoost >
class  Experiment
class  DiffTemplate< ObjectType, Experiment >
class  TypeTraits< Experiment >
class  GenerateDecisionPlot
class  DiffTemplate< ObjectType, GenerateDecisionPlot >
class  TypeTraits< GenerateDecisionPlot >
class  StatSpec
 The specification of a statistic to compute (as can be specified as a string in PTester) More...
class  PTester
 This code is deprecated, use PTester.h and PTester.cc instead. More...
class  DiffTemplate< ObjectType, PTester >
class  TypeTraits< PTester >
class  Grapher
class  DiffTemplate< ObjectType, Grapher >
class  TypeTraits< Grapher >
class  PrecomputedProcessedLearner
 Identity Learner with a cached 'processDataSet' method. More...
class  DiffTemplate< ObjectType, PrecomputedProcessedLearner >
class  TypeTraits< PrecomputedProcessedLearner >
class  VariableSelectionWithDirectedGradientDescent
class  DiffTemplate< ObjectType, VariableSelectionWithDirectedGradientDescent >
class  TypeTraits< VariableSelectionWithDirectedGradientDescent >
class  BallTreeNearestNeighbors
class  DiffTemplate< ObjectType, BallTreeNearestNeighbors >
class  TypeTraits< BallTreeNearestNeighbors >
class  BinaryBallTree
class  DiffTemplate< ObjectType, BinaryBallTree >
class  TypeTraits< BinaryBallTree >
class  ExhaustiveNearestNeighbors
 This class provides the basic implementation of the classical O(N^2) nearest-neighbors algorithm. More...
class  DiffTemplate< ObjectType, ExhaustiveNearestNeighbors >
class  TypeTraits< ExhaustiveNearestNeighbors >
class  GenericNearestNeighbors
class  DiffTemplate< ObjectType, GenericNearestNeighbors >
class  TypeTraits< GenericNearestNeighbors >
class  ArgmaxModule
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  BackConvolution2DModule
 Transpose of Convolution2DModule. More...
class  BinarizeModule
 Map probabilities in (0,1) to a bit in {0,1}, either according to a hard threshold (> 0.5), or by sampling, and ALLOW GRADIENTS TO PROPAGATE BACKWARDS. More...
class  ClassErrorCostModule
 Multiclass classification error. More...
class  CombiningCostsModule
 Combine several CostModules with the same input and target. More...
class  Convolution2DModule
 Apply convolution filters on (possibly multiple) 2D inputs (images). More...
class  CostModule
 General class representing a cost function module. More...
class  CrossEntropyCostModule
 Computes the cross-entropy, given two activation vectors. More...
class  DeepBeliefNet
 Neural net, learned layer-wise in a greedy fashion. More...
class  DiffTemplate< ObjectType, DeepBeliefNet >
class  TypeTraits< DeepBeliefNet >
class  GaussianDBNClassification
 Does the same thing as Hinton's deep belief nets. More...
class  DiffTemplate< ObjectType, GaussianDBNClassification >
class  TypeTraits< GaussianDBNClassification >
class  GaussianDBNRegression
 Does the same thing as Hinton's deep belief nets. More...
class  DiffTemplate< ObjectType, GaussianDBNRegression >
class  TypeTraits< GaussianDBNRegression >
class  GaussPartSupervisedDBN
 Hinton's DBN plus supervised gradient from a logistic regression layer. More...
class  DiffTemplate< ObjectType, GaussPartSupervisedDBN >
class  TypeTraits< GaussPartSupervisedDBN >
class  HintonDeepBeliefNet
 Does the same thing as Hinton's deep belief nets. More...
class  DiffTemplate< ObjectType, HintonDeepBeliefNet >
class  TypeTraits< HintonDeepBeliefNet >
class  NLLErrModule
 NLL (and derivatives thereof) between the target and input. More...
class  DiffTemplate< ObjectType, NLLErrModule >
class  TypeTraits< NLLErrModule >
class  PartSupervisedDBN
 Hinton's DBN plus supervised gradient from a logistic regression layer. More...
class  DiffTemplate< ObjectType, PartSupervisedDBN >
class  TypeTraits< PartSupervisedDBN >
class  RBMBinomialLayer
 Layer in an RBM formed with binomial units. More...
class  RBMConv2DLLParameters
 Filter between two linear layers of a 2D convolutional RBM. More...
class  DiffTemplate< ObjectType, RBMConv2DLLParameters >
class  TypeTraits< RBMConv2DLLParameters >
class  RBMGaussianLayer
 Layer in an RBM formed with binomial units. More...
class  RBMGenericParameters
 Stores and learns the parameters between two layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMGenericParameters >
class  TypeTraits< RBMGenericParameters >
class  RBMJointGenericParameters
 Stores and learns the parameters between two layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMJointGenericParameters >
class  TypeTraits< RBMJointGenericParameters >
class  RBMJointLLParameters
 Stores and learns the parameters between two layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMJointLLParameters >
class  TypeTraits< RBMJointLLParameters >
class  RBMLayer
 Virtual class for a layer in an RBM. More...
class  DiffTemplate< ObjectType, RBMLayer >
class  TypeTraits< RBMLayer >
class  RBMLLParameters
 Stores and learns the parameters between two linear layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMLLParameters >
class  TypeTraits< RBMLLParameters >
class  RBMLQParameters
 Stores and learns the parameters between one quadratic layer and one linear layer of an RBM. More...
class  DiffTemplate< ObjectType, RBMLQParameters >
class  TypeTraits< RBMLQParameters >
class  RBMMixedLayer
 Layer in an RBM formed with binomial units. More...
class  RBMMultinomialLayer
 Layer in an RBM formed with binomial units. More...
class  RBMParameters
 Virtual class for the parameters between two layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMParameters >
class  TypeTraits< RBMParameters >
class  RBMQLParameters
 Stores and learns the parameters between one quadratic layer and one linear layer of an RBM. More...
class  DiffTemplate< ObjectType, RBMQLParameters >
class  TypeTraits< RBMQLParameters >
class  RBMTruncExpLayer
 Layer in an RBM formed with binomial units. More...
class  SquaredErrModule
 Squared difference (and derivatives thereof) between the target and input. More...
class  DiffTemplate< ObjectType, SquaredErrModule >
class  TypeTraits< SquaredErrModule >
class  StackedModulesLearner
 Trains a stack of OnlineLearningModule, which are layers. More...
class  DiffTemplate< ObjectType, StackedModulesLearner >
class  TypeTraits< StackedModulesLearner >
class  StackedModulesModule
 Wraps a stack of OnlineLearningModule, which are layers. More...
class  DiffTemplate< ObjectType, StackedModulesModule >
class  TypeTraits< StackedModulesModule >
class  SupervisedDBN
 Hinton's DBN plus supervised gradient from a logistic regression layer but without joint layer on top. More...
class  DiffTemplate< ObjectType, SupervisedDBN >
class  TypeTraits< SupervisedDBN >
class  UndirectedSoftmaxModule
 This class. More...
class  DiffTemplate< ObjectType, UndirectedSoftmaxModule >
class  TypeTraits< UndirectedSoftmaxModule >
class  UnfrozenDeepBeliefNet
 Does the same thing as Hinton's deep belief nets without freezing weights of earlier layers. More...
class  DiffTemplate< ObjectType, UnfrozenDeepBeliefNet >
class  TypeTraits< UnfrozenDeepBeliefNet >
class  KLp0p1RBMModule
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, KLp0p1RBMModule >
class  TypeTraits< KLp0p1RBMModule >
class  SemiSupervisedDBN
 Deep Belief Net, possibly supervised, trained only with CD. More...
class  DiffTemplate< ObjectType, SemiSupervisedDBN >
class  TypeTraits< SemiSupervisedDBN >
class  SubsamplingDBN
 Neural net, learned layer-wise in a greedy fashion. More...
class  DiffTemplate< ObjectType, SubsamplingDBN >
class  TypeTraits< SubsamplingDBN >
class  TreeDBNModule
class  DiffTemplate< ObjectType, TreeDBNModule >
class  TypeTraits< TreeDBNModule >
class  ForwardModule
class  DiffTemplate< ObjectType, ForwardModule >
class  TypeTraits< ForwardModule >
class  GradNNetLayerModule
 Affine transformation module, with stochastic gradient descent updates. More...
class  DiffTemplate< ObjectType, GradNNetLayerModule >
class  TypeTraits< GradNNetLayerModule >
class  IdentityModule
class  DiffTemplate< ObjectType, IdentityModule >
class  TypeTraits< IdentityModule >
class  InferenceRBM
 RBM to be used when doing joint supervised learning by CD. More...
class  DiffTemplate< ObjectType, InferenceRBM >
class  TypeTraits< InferenceRBM >
class  LayerCostModule
 Computes a cost function for a (hidden) representation. More...
class  DiffTemplate< ObjectType, LayerCostModule >
class  TypeTraits< LayerCostModule >
class  LinearCombinationModule
 This module outputs a linear combination of input ports. More...
class  DiffTemplate< ObjectType, LinearCombinationModule >
class  TypeTraits< LinearCombinationModule >
class  LinearFilterModule
 Affine transformation module, with stochastic gradient descent updates. More...
class  DiffTemplate< ObjectType, LinearFilterModule >
class  TypeTraits< LinearFilterModule >
class  LogaddOnBagsModule
class  MatrixModule
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, MatrixModule >
class  TypeTraits< MatrixModule >
class  MaxSubsampling2DModule
 Reduce the size of the 2D images by taking the max value of nearby pixels. More...
class  DiffTemplate< ObjectType, MaxSubsampling2DModule >
class  TypeTraits< MaxSubsampling2DModule >
class  ModuleLearner
class  DiffTemplate< ObjectType, ModuleLearner >
class  TypeTraits< ModuleLearner >
class  ModulesLearner
 Trains an OnlineLearningModule wrt the cost of a CostModule. More...
class  DiffTemplate< ObjectType, ModulesLearner >
class  TypeTraits< ModulesLearner >
class  ModuleStackModule
 Wraps a stack of layered OnlineLearningModule into a single one. More...
class  DiffTemplate< ObjectType, ModuleStackModule >
class  TypeTraits< ModuleStackModule >
class  ModuleTester
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ModuleTester >
class  TypeTraits< ModuleTester >
class  NetworkConnection
class  DiffTemplate< ObjectType, NetworkConnection >
class  TypeTraits< NetworkConnection >
class  NetworkModule
class  DiffTemplate< ObjectType, NetworkModule >
class  TypeTraits< NetworkModule >
class  NLLCostModule
 Computes the NLL, given a probability vector and the true class. More...
class  DiffTemplate< ObjectType, NLLCostModule >
class  TypeTraits< NLLCostModule >
class  NullModule
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, NullModule >
class  TypeTraits< NullModule >
class  OnBagsModule
class  DiffTemplate< ObjectType, OnBagsModule >
class  TypeTraits< OnBagsModule >
class  OnlineLearningModule
 Learn to map inputs to outputs, online, using caller-provided gradients. More...
class  DiffTemplate< ObjectType, OnlineLearningModule >
class  TypeTraits< OnlineLearningModule >
class  ProcessInputCostModule
 Processes the input through an embedded OnlineLearningModule. More...
class  DiffTemplate< ObjectType, ProcessInputCostModule >
class  TypeTraits< ProcessInputCostModule >
class  RBMClassificationModule
 Computes the undirected softmax used in deep belief nets. More...
class  DiffTemplate< ObjectType, RBMClassificationModule >
class  TypeTraits< RBMClassificationModule >
class  RBMConnection
 Virtual class for the parameters between two layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMConnection >
class  TypeTraits< RBMConnection >
class  RBMConv2DConnection
 Filter between two linear layers of a 2D convolutional RBM. More...
class  DiffTemplate< ObjectType, RBMConv2DConnection >
class  TypeTraits< RBMConv2DConnection >
class  RBMDiagonalMatrixConnection
 Stores and learns the parameters between two linear layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMDiagonalMatrixConnection >
class  TypeTraits< RBMDiagonalMatrixConnection >
class  RBMLateralBinomialLayer
 Layer in an RBM formed with binomial units, with lateral connections. More...
class  RBMLocalMultinomialLayer
 Multiple multinomial units, each of them seeing an area of nearby pixels. More...
class  RBMMatrixConnection
 Stores and learns the parameters between two linear layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMMatrixConnection >
class  TypeTraits< RBMMatrixConnection >
class  RBMMatrixConnectionNatGrad
 Stores and learns the parameters between two linear layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMMatrixConnectionNatGrad >
class  TypeTraits< RBMMatrixConnectionNatGrad >
class  RBMMatrixTransposeConnection
 RBMConnection which uses the tranpose of some other RBMMatrixConnection's weights. More...
class  DiffTemplate< ObjectType, RBMMatrixTransposeConnection >
class  TypeTraits< RBMMatrixTransposeConnection >
class  RBMMixedConnection
 Contains a matrix of other RBMConnections, acting as submatrix of the linear transformation this class computes. More...
class  DiffTemplate< ObjectType, RBMMixedConnection >
class  TypeTraits< RBMMixedConnection >
class  RBMModule
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RBMModule >
class  TypeTraits< RBMModule >
class  RBMMultitaskClassificationModule
 Computes a mean-field approximate of p(y|x), with y a binary vector. More...
class  DiffTemplate< ObjectType, RBMMultitaskClassificationModule >
class  TypeTraits< RBMMultitaskClassificationModule >
class  RBMRateLayer
 Layer in an RBM consisting in rate-coded units. More...
class  RBMSparse1DMatrixConnection
 Stores and learns the parameters between two linear layers of an RBM. More...
class  DiffTemplate< ObjectType, RBMSparse1DMatrixConnection >
class  TypeTraits< RBMSparse1DMatrixConnection >
class  RBMTrainer
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RBMTrainer >
class  TypeTraits< RBMTrainer >
class  RBMWoodsLayer
 RBM layer with tree-structured groups of units. More...
class  ScaleGradientModule
 Scales (or suppress) the gradient that is backpropagated. More...
class  DiffTemplate< ObjectType, ScaleGradientModule >
class  TypeTraits< ScaleGradientModule >
class  ShuntingNNetLayerModule
 Affine transformation module, with stochastic gradient descent updates. More...
class  DiffTemplate< ObjectType, ShuntingNNetLayerModule >
class  TypeTraits< ShuntingNNetLayerModule >
class  SoftmaxModule
 Computes the softmax function on a vector. More...
class  DiffTemplate< ObjectType, SoftmaxModule >
class  TypeTraits< SoftmaxModule >
class  SoftmaxNLLCostModule
 Computes the NLL, given a probability vector and the true class. More...
class  DiffTemplate< ObjectType, SoftmaxNLLCostModule >
class  TypeTraits< SoftmaxNLLCostModule >
class  SplitModule
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SplitModule >
class  TypeTraits< SplitModule >
class  SquaredErrorCostModule
 Computes the sum of squared difference between input and target. More...
class  DiffTemplate< ObjectType, SquaredErrorCostModule >
class  TypeTraits< SquaredErrorCostModule >
class  StackedAutoassociatorsNet
 Neural net, trained layer-wise in a greedy fashion using autoassociators. More...
class  DiffTemplate< ObjectType, StackedAutoassociatorsNet >
class  TypeTraits< StackedAutoassociatorsNet >
class  Subsampling2DModule
 Reduce the size of the 2D images by adding the values of nearby pixels. More...
class  DiffTemplate< ObjectType, Subsampling2DModule >
class  TypeTraits< Subsampling2DModule >
class  Supersampling2DModule
 Augment the size of 2D images by duplicating pixels. More...
class  DiffTemplate< ObjectType, Supersampling2DModule >
class  TypeTraits< Supersampling2DModule >
class  TanhModule
 This class propagates a (possibly scaled) 'tanh' function. More...
class  DiffTemplate< ObjectType, TanhModule >
class  TypeTraits< TanhModule >
class  MaxSubsamplingTest
 Tests MaxSubsampling2DModule. More...
class  DiffTemplate< ObjectType, MaxSubsamplingTest >
class  TypeTraits< MaxSubsamplingTest >
class  VBoundDBN2
 2-RBM DBN trained using Hinton's new variational bound of global likelihood: More...
class  DiffTemplate< ObjectType, VBoundDBN2 >
class  TypeTraits< VBoundDBN2 >
class  AutoLinearRegressor
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, AutoLinearRegressor >
class  TypeTraits< AutoLinearRegressor >
class  BaseRegressorConfidence
class  DiffTemplate< ObjectType, BaseRegressorConfidence >
class  TypeTraits< BaseRegressorConfidence >
class  BaseRegressorWrapper
class  DiffTemplate< ObjectType, BaseRegressorWrapper >
class  TypeTraits< BaseRegressorWrapper >
class  BasisSelectionRegressor
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, BasisSelectionRegressor >
class  TypeTraits< BasisSelectionRegressor >
class  ConstantRegressor
class  DiffTemplate< ObjectType, ConstantRegressor >
class  TypeTraits< ConstantRegressor >
class  CubicSpline
 Unidimensional cubic spline learner. More...
class  DiffTemplate< ObjectType, CubicSpline >
class  TypeTraits< CubicSpline >
class  KernelRidgeRegressor
 Implements a 'kernelized' version of linear ridge regression. More...
class  DiffTemplate< ObjectType, KernelRidgeRegressor >
class  TypeTraits< KernelRidgeRegressor >
class  KNNRegressor
 This class provides a simple multivariate regressor based upon an enclosed K-nearest-neighbors finder (derived from GenericNearestNeighbors; specified with the 'knn' option). More...
class  DiffTemplate< ObjectType, KNNRegressor >
class  TypeTraits< KNNRegressor >
class  LinearRegressor
class  DiffTemplate< ObjectType, LinearRegressor >
class  TypeTraits< LinearRegressor >
class  LocalMedBoost
class  DiffTemplate< ObjectType, LocalMedBoost >
class  TypeTraits< LocalMedBoost >
class  PLS
class  DiffTemplate< ObjectType, PLS >
class  TypeTraits< PLS >
class  PruningLinearRegressor
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, PruningLinearRegressor >
class  TypeTraits< PruningLinearRegressor >
class  RankLearner
class  DiffTemplate< ObjectType, RankLearner >
class  TypeTraits< RankLearner >
class  RegressionTree
class  DiffTemplate< ObjectType, RegressionTree >
class  TypeTraits< RegressionTree >
class  RegressionTreeLeave
class  DiffTemplate< ObjectType, RegressionTreeLeave >
class  TypeTraits< RegressionTreeLeave >
class  RegressionTreeMulticlassLeave
class  DiffTemplate< ObjectType, RegressionTreeMulticlassLeave >
class  TypeTraits< RegressionTreeMulticlassLeave >
class  RegressionTreeMulticlassLeaveFast
class  DiffTemplate< ObjectType, RegressionTreeMulticlassLeaveFast >
class  TypeTraits< RegressionTreeMulticlassLeaveFast >
class  RegressionTreeMulticlassLeaveProb
class  DiffTemplate< ObjectType, RegressionTreeMulticlassLeaveProb >
class  TypeTraits< RegressionTreeMulticlassLeaveProb >
class  RegressionTreeNode
class  DiffTemplate< ObjectType, RegressionTreeNode >
class  TypeTraits< RegressionTreeNode >
class  RegressionTreeQueue
class  DiffTemplate< ObjectType, RegressionTreeQueue >
class  TypeTraits< RegressionTreeQueue >
class  RegressionTreeRegisters
class  DiffTemplate< ObjectType, RegressionTreeRegisters >
class  TypeTraits< RegressionTreeRegisters >
class  RegressorFromDistribution
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RegressorFromDistribution >
class  TypeTraits< RegressorFromDistribution >
class  WPLS
class  DiffTemplate< ObjectType, WPLS >
class  TypeTraits< WPLS >
class  EmbeddedSequentialLearner
class  DiffTemplate< ObjectType, EmbeddedSequentialLearner >
class  TypeTraits< EmbeddedSequentialLearner >
class  MovingAverage
 This SequentialLearner only takes the n previous target to predict the next one. More...
class  DiffTemplate< ObjectType, MovingAverage >
class  TypeTraits< MovingAverage >
class  SequentialLearner
class  DiffTemplate< ObjectType, SequentialLearner >
class  TypeTraits< SequentialLearner >
class  SequentialModelSelector
class  DiffTemplate< ObjectType, SequentialModelSelector >
class  TypeTraits< SequentialModelSelector >
class  SequentialValidation
class  DiffTemplate< ObjectType, SequentialValidation >
class  TypeTraits< SequentialValidation >
class  TestMethod
class  DiffTemplate< ObjectType, TestMethod >
class  TypeTraits< TestMethod >
class  PerformanceEvaluator
 Evaluates the performance of a learner given a testset VMat and the learner's corresponding output VMat. More...
class  DiffTemplate< ObjectType, PerformanceEvaluator >
class  TypeTraits< PerformanceEvaluator >
class  Train
class  DiffTemplate< ObjectType, Train >
class  TypeTraits< Train >
class  EntropyContrast
class  DiffTemplate< ObjectType, EntropyContrast >
class  TypeTraits< EntropyContrast >
class  EntropyContrastLearner
class  DiffTemplate< ObjectType, EntropyContrastLearner >
class  TypeTraits< EntropyContrastLearner >
class  DiverseComponentAnalysis
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, DiverseComponentAnalysis >
class  TypeTraits< DiverseComponentAnalysis >
class  GaussianContinuum
class  DiffTemplate< ObjectType, GaussianContinuum >
class  TypeTraits< GaussianContinuum >
class  GaussMixLocalProjections
class  DiffTemplate< ObjectType, GaussMixLocalProjections >
class  TypeTraits< GaussMixLocalProjections >
class  Isomap
class  DiffTemplate< ObjectType, Isomap >
class  TypeTraits< Isomap >
class  IsomapTangentLearner
class  DiffTemplate< ObjectType, IsomapTangentLearner >
class  TypeTraits< IsomapTangentLearner >
class  KernelPCA
class  DiffTemplate< ObjectType, KernelPCA >
class  TypeTraits< KernelPCA >
class  KernelProjection
class  DiffTemplate< ObjectType, KernelProjection >
class  TypeTraits< KernelProjection >
class  KMeansClustering
class  DiffTemplate< ObjectType, KMeansClustering >
class  TypeTraits< KMeansClustering >
class  KPCATangentLearner
class  DiffTemplate< ObjectType, KPCATangentLearner >
class  TypeTraits< KPCATangentLearner >
class  LLC
class  DiffTemplate< ObjectType, LLC >
class  TypeTraits< LLC >
class  LLE
class  DiffTemplate< ObjectType, LLE >
class  TypeTraits< LLE >
class  NormalizationLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, NormalizationLearner >
class  TypeTraits< NormalizationLearner >
class  PCA
class  DiffTemplate< ObjectType, PCA >
class  TypeTraits< PCA >
class  SpectralClustering
class  DiffTemplate< ObjectType, SpectralClustering >
class  TypeTraits< SpectralClustering >
class  TangentLearner
class  DiffTemplate< ObjectType, TangentLearner >
class  TypeTraits< TangentLearner >
class  TargetEncodingLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, TargetEncodingLearner >
class  TypeTraits< TargetEncodingLearner >
class  UniformizeLearner
class  DiffTemplate< ObjectType, UniformizeLearner >
class  TypeTraits< UniformizeLearner >
class  BinaryKernelDiscrimination
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, BinaryKernelDiscrimination >
class  TypeTraits< BinaryKernelDiscrimination >
class  Correspondence
class  DiffTemplate< ObjectType, Correspondence >
class  TypeTraits< Correspondence >
class  DeepFeatureExtractorNNet
 Deep Neural Network that extracts features in a greedy, mostly unsupervised way. More...
class  DiffTemplate< ObjectType, DeepFeatureExtractorNNet >
class  TypeTraits< DeepFeatureExtractorNNet >
class  DeepNonLocalManifoldParzen
 Neural net, trained layer-wise to predict the manifold structure of the data. More...
class  DiffTemplate< ObjectType, DeepNonLocalManifoldParzen >
class  TypeTraits< DeepNonLocalManifoldParzen >
class  DenoisingRecurrentNet
 Model made of RBMs linked through time. More...
class  DiffTemplate< ObjectType, DenoisingRecurrentNet >
class  TypeTraits< DenoisingRecurrentNet >
class  MoleculeTemplateLearner
class  DiffTemplate< ObjectType, MoleculeTemplateLearner >
class  TypeTraits< MoleculeTemplateLearner >
class  TestLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, TestLearner >
class  TypeTraits< TestLearner >
class  DiscriminativeDeepBeliefNet
 Deep Belief Net where the stacked RBMs also use a discriminative criteria. More...
class  DiffTemplate< ObjectType, DiscriminativeDeepBeliefNet >
class  TypeTraits< DiscriminativeDeepBeliefNet >
class  DiscriminativeRBM
 Discriminative Restricted Boltzmann Machine classifier. More...
class  DiffTemplate< ObjectType, DiscriminativeRBM >
class  TypeTraits< DiscriminativeRBM >
class  DynamicallyLinkedRBMsModel
 Model made of RBMs linked through time. More...
class  DiffTemplate< ObjectType, DynamicallyLinkedRBMsModel >
class  TypeTraits< DynamicallyLinkedRBMsModel >
class  FeatureSetSequentialCRF
 Feedforward Neural Network for symbolic data represented using features. More...
class  DiffTemplate< ObjectType, FeatureSetSequentialCRF >
class  TypeTraits< FeatureSetSequentialCRF >
class  ICP
class  DiffTemplate< ObjectType, ICP >
class  TypeTraits< ICP >
class  LinearInductiveTransferClassifier
 Linear classifier that uses class representations in order to make use of inductive transfer between classes. More...
class  DiffTemplate< ObjectType, LinearInductiveTransferClassifier >
class  TypeTraits< LinearInductiveTransferClassifier >
class  ManifoldKNNDistribution
 K nearest neighbors density estimator that takes into accound the local manifold structure. More...
class  DiffTemplate< ObjectType, ManifoldKNNDistribution >
class  TypeTraits< ManifoldKNNDistribution >
class  ManifoldParzen
 Manifold Parzen Windows classifier and distribution. More...
class  DiffTemplate< ObjectType, ManifoldParzen >
class  TypeTraits< ManifoldParzen >
class  Graph_
class  MeshEdge
class  DiffTemplate< ObjectType, MeshEdge >
class  TypeTraits< MeshEdge >
class  MeshFace
class  DiffTemplate< ObjectType, MeshFace >
class  TypeTraits< MeshFace >
class  MeshGraph
class  DiffTemplate< ObjectType, MeshGraph >
class  TypeTraits< MeshGraph >
class  MeshMatch
class  DiffTemplate< ObjectType, MeshMatch >
class  TypeTraits< MeshMatch >
class  MeshVertex
class  DiffTemplate< ObjectType, MeshVertex >
class  TypeTraits< MeshVertex >
class  Molecule
 A molecular surface, represented by a list of points and features on them. More...
class  DiffTemplate< ObjectType, Molecule >
class  TypeTraits< Molecule >
class  NxProfileLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, NxProfileLearner >
class  TypeTraits< NxProfileLearner >
class  NeuralProbabilisticLanguageModel
 Feedforward neural network for language modeling. More...
class  DiffTemplate< ObjectType, NeuralProbabilisticLanguageModel >
class  TypeTraits< NeuralProbabilisticLanguageModel >
class  NLLNeighborhoodWeightsVariable
 WeightsVariable updated online, based on negative log-likelihood of the neighbors. More...
class  DiffTemplate< ObjectType, NLLNeighborhoodWeightsVariable >
class  TypeTraits< NLLNeighborhoodWeightsVariable >
class  wordAndFreq
 Used to sort words according to frequency, when determining candidates. More...
class  NnlmOnlineLearner
 Trains a Neural Network Language Model (NNLM). More...
class  DiffTemplate< ObjectType, NnlmOnlineLearner >
class  TypeTraits< NnlmOnlineLearner >
class  wordAndProb
 Used to sort words according to probability. More...
class  NnlmOutputLayer
 Implements a gaussian-based output layer for the Neural Network Language Model. More...
class  DiffTemplate< ObjectType, NnlmOutputLayer >
class  TypeTraits< NnlmOutputLayer >
class  NnlmWordRepresentationLayer
 Implements the word representation layer for the online NNLM. More...
class  DiffTemplate< ObjectType, NnlmWordRepresentationLayer >
class  TypeTraits< NnlmWordRepresentationLayer >
class  PseudolikelihoodRBM
 Restricted Boltzmann Machine trained by (generalized) pseudolikelihood. More...
class  DiffTemplate< ObjectType, PseudolikelihoodRBM >
class  TypeTraits< PseudolikelihoodRBM >
class  RankingFromKernel
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RankingFromKernel >
class  TypeTraits< RankingFromKernel >
class  StackedFocusedAutoassociatorsNet
 Neural net, trained layer-wise in a greedy but focused fashion using autoassociators/RBMs and a supervised non-parametric gradient. More...
class  DiffTemplate< ObjectType, StackedFocusedAutoassociatorsNet >
class  TypeTraits< StackedFocusedAutoassociatorsNet >
class  StackedSVDNet
 Neural net, initialized with SVDs of logistic auto-regressions. More...
class  DiffTemplate< ObjectType, StackedSVDNet >
class  TypeTraits< StackedSVDNet >
class  StructuralLearner
 Putain de code fait à la va-vite pour ICML. More...
class  DiffTemplate< ObjectType, StructuralLearner >
class  TypeTraits< StructuralLearner >
class  SurfaceMesh
class  DiffTemplate< ObjectType, SurfaceMesh >
class  TypeTraits< SurfaceMesh >
class  ChemicalICP
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ChemicalICP >
class  TypeTraits< ChemicalICP >
class  MoleculeTemplate
 Subclass of Molecule, plus standard devs of points' positions and features. More...
class  RunICPVariable
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, RunICPVariable >
class  TypeTraits< RunICPVariable >
class  ScoreLayerVariable
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, ScoreLayerVariable >
class  TypeTraits< ScoreLayerVariable >
class  SurfaceTemplateLearner
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  DiffTemplate< ObjectType, SurfaceTemplateLearner >
class  TypeTraits< SurfaceTemplateLearner >
class  Template
class  TopDownAsymetricDeepNetwork
 Neural net, trained layer-wise in a greedy but focused fashion using autoassociators/RBMs and a supervised non-parametric gradient. More...
class  DiffTemplate< ObjectType, TopDownAsymetricDeepNetwork >
class  TypeTraits< TopDownAsymetricDeepNetwork >
class  WeightedLogGaussian
class  DiffTemplate< ObjectType, WeightedLogGaussian >
class  TypeTraits< WeightedLogGaussian >
class  AutoRunCommand
class  DiffCommand
class  ExtractOptionCommand
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  FieldConvertCommand
class  FillFeatureSetCommand
 PLearn command that fills a FeatureSet with the features instantiated in a VMat. More...
class  HelpCommand
class  HTMLHelpCommand
 forward-declare More...
class  HTMLHelpConfig
class  JulianDateCommand
class  KolmogorovSmirnovCommand
class  LearnerCommand
class  OutputFeaturesCommand
 PLearn command that fills a FeatureSet with the features instantiated in a VMat. More...
class  PairwiseDiffsCommand
 This command computes a set of statistics (user-specified) on the pairwise differences between a given column of a list of matrices. More...
class  PLearnCommand
 This is the base class for all PLearn commands (those that can be issued in the plearn program) More...
class  PLearnCommandRegistry
class  PlideProgressPlugin
class  PlideLogPStreamBuf
 This class sends stuff to the PlideLog when it's flushed. More...
class  PlideLogPlugin
 This plugin connects the logging mechanism to PlideLogPStreamBuf. More...
class  Plide
 Command to start the PLearn Integrated Development Environment (PLIDE) More...
class  ReadAndWriteCommand
class  RunCommand
class  ServerCommand
class  Stan
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  StatsCommand
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  TestClientCommand
class  TestDependenciesCommand
class  TestDependencyCommand
class  TxtmatCommand
class  VerifyGradientCommand
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  VMatCommand
class  VMatDictionaryCommand
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
class  VMatViewCommand
 The first sentence should be a BRIEF DESCRIPTION of what the class does. More...

Typedefs

typedef map< const void *, void * > CopiesMap
 Global typedef to make the map of copied objects (needed by the deep copy mechanism in Object) more palatable.
typedef map< string, float > map_string_float
 Some typedefs to use the NODEEPCOPY macro with.
typedef map< string, double > map_string_double
typedef map< double, string > map_double_string
typedef map< float, string > map_float_string
typedef map< string, string > map_string_string
typedef map< float, float > map_float_float
typedef map< double, double > map_double_double
typedef map< string, intmap_string_int
typedef map< int, string > map_int_string
typedef int(* compare_function )(const void *, const void *)
typedef boost::is_convertible
< int, int >::type 
boost_true_type
typedef boost::is_convertible
< void, int >::type 
boost_false_type
typedef std::vector< PP
< OptionBase > > 
OptionList
typedef std::map< std::string,
PP< OptionBase > > 
OptionMap
typedef void(* VOIDFUNC )()
typedef Object *(* NEW_OBJECT )()
 Typedef for the "new instance" function type, which returns a default-initialized Object.
typedef OptionList &(* GETOPTIONLIST_METHOD )()
typedef RemoteMethodMap &(* GET_REMOTE_METHODS )()
typedef bool(* ISA_METHOD )(const Object *o)
typedef std::map< string,
TypeMapEntry
TypeMap
typedef PP< SDBVMOutputCoderPSDBVMOutputCoder
typedef PP< SDBVMFieldPSDBVMField
typedef PP< SDBVMFieldDiscretePSDBVMFieldDiscrete
typedef Array
< PSDBVMFieldDiscrete
FieldArray
 In general, if there are N fields, x_1...x_N, and each can take y_i values, then the discrete value is:
typedef SimpleDB SDB
 A utility typedef for the common case.
typedef Ker CostFunc
 a cost function maps (output,target) to a loss
typedef CostFunc ProfitFunc
 a profit function maps (output,target) to a profit
typedef PP< StatsIteratorStatsIt
typedef real(* tRealFunc )(real)
typedef real(* tRealReadFunc )(real, real)
typedef PP< RealFunctionRealFunc
typedef pair< real,
StatsCollectorCounts * > 
PairRealSCCType
typedef TinyVector< int, 7 > IVec
typedef TTensor< realTensor
typedef TMat< realMat
typedef TVec< realVec
typedef bool(* MeasurerCallbackFunction )(int t, const Vec &costs)
typedef PP< CalendarPCalendar
typedef double JTime
 Julian time.
typedef int CTime
 Calendar time.
typedef TVec< JTimeJTimeVec
 Vector of Julian times.
typedef TVec< CTimeCTimeVec
 Vector of calendar times.
typedef PRange< CTimeCTimeRange
 Range of calendar times.
typedef RandomVar MatRandomVar
typedef int tFileHandle
typedef ofstream pofstream
 The stream classes.
typedef PP< LearnerPPLearner
typedef map< int, realSparseVec
typedef const map< int, realConstSparseVec
typedef PPointableSet::iterator SetIterator
typedef PP
< BallTreeNearestNeighbors
BallTreeNN
typedef PP< BinaryBallTreeBinBallTree
typedef PP
< GenericNearestNeighbors
GenericNN
typedef PP< CorrespondenceCorresp
typedef property< vertex_ppt_t,
MVertex, property
< vertex_index_t, int > > 
vertex_ppt_
typedef property< edge_ppt_t,
MEdge, property< edge_index_t,
int > > 
edge_ppt_
typedef property< graph_ppt_t,
MGraph
graph_ppt_
typedef adjacency_list< listS,
listS, undirectedS,
vertex_ppt_, edge_ppt_,
graph_ppt_
graph
typedef PP< Graph_Graph
typedef graph_traits< graph >
::vertex_descriptor 
vertex_descriptor
typedef graph_traits< graph >
::edge_descriptor 
edge_descriptor
typedef graph_traits< graph >
::vertex_iterator 
vertex_iterator
typedef graph_traits< graph >
::edge_iterator 
edge_iterator
typedef graph_traits< graph >
::out_edge_iterator 
out_edge_iterator
typedef graph_traits< graph >
::adjacency_iterator 
adjacency_iterator
typedef PP< MeshEdgeMEdge
typedef PP< MeshFaceMFace
typedef PP< MeshGraphMGraph
typedef PP< MeshMatchMMatch
typedef PP< MeshVertexMVertex
typedef PP< MoleculePMolecule
typedef PP< SurfaceMeshSurfMesh
typedef PP< ChemicalICPChemICP
typedef PP< MoleculeMol
typedef PP< MoleculeTemplateMolTemplate
typedef PP< TemplateMoleculeTemplate

Enumerations

enum  SDBVMOutputCoding { SDBVMUnknownCoding = 0, SDBVMNumeric, SDBVMOneHot, SDBVMOneHotMinus1 }
enum  FieldType {
  Unknown = 0, StringType, CharacterType, SignedCharType,
  ShortType, IntType, FloatType, DoubleType,
  DateType
}
enum  VerbosityLevel {
  VLEVEL_MAND = 0, VLEVEL_IMP = 1, VLEVEL_NORMAL = 5, VLEVEL_DBG = 10,
  VLEVEL_EXTREME = 500
}
enum  eNumericType {
  NT_NOT_NUMERIC = 0x0000, NT_ORDINAL = 0x0001, NT_CARDINAL = 0x0002, NT_CURRENCY = 0x0004,
  NT_PREFIXED = 0x0008, NT_SUFFIXED = 0x0010, NT_RANGE = 0x0020, NT_TIME = 0x0040,
  NT_CODE = 0x0080, NT_PERCENT = 0x0100, NT_UNKNOWN_NUMERIC_TYPE = 0x8000
}
enum  TriType {
  FACE, VERTEX1, VERTEX2, VERTEX3,
  EDGE1, EDGE2, EDGE3
}

Functions

template<class T >
void swap (Array< T > &a1, Array< T > &a2)
template<class T >
PStreamoperator>> (PStream &in, Array< T > &a)
template<class T >
PStreamoperator<< (PStream &out, const Array< T > &a)
template<class T >
ostream & operator<< (ostream &out, const Array< T > &a)
template<class T >
void deepCopyField (Array< T > &field, CopiesMap &copies)
template<class T >
Array< T > operator& (const T &elem, const Array< T > &a)
template<class T >
Array< T > & operator&= (Array< T > &a, const T &elem)
template<class T >
Array< T > & operator&= (Array< T > &a, const Array< T > &ar)
template<class T >
Array< T > & operator&= (Array< T > &a, const vector< T > &ar)
template<class T >
Array< T > operator& (const Array< T > &a, const T &elem)
template<class T >
Array< T > operator& (const Array< T > &a, const Array< T > &ar)
template<class T >
Array< T > operator& (const Array< T > &a, const vector< T > &ar)
string join (const Array< string > &s, const string &separator)
template<class T >
Array< TVec< T > > operator& (const TVec< T > &m1, const TVec< T > &m2)
 This will allow a convenient way of building arrays of Matrices by writing ex: m1&m2&m3.
template<class T >
TVec< T > concat (const Array< TVec< T > > &varray)
template<class T >
TMat< T > vconcat (const Array< TMat< T > > &ar)
template<class T >
TMat< T > hconcat (const Array< TMat< T > > &ar)
template<class T >
TMat< T > vconcat (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
TMat< T > hconcat (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
Array< TMat< T > > operator& (const TMat< T > &m1, const TMat< T > &m2)
 This will allow a convenient way of building arrays of Matrices by writing ex: m1&m2&m3.
void endianswap2 (void *ptr, int n)
 swaps endians for n 2-byte elements (such as short)
void endianswap4 (void *ptr, int n)
 swaps endians for n 4-byte elements (such as int or float)
void endianswap8 (void *ptr, int n)
 swaps endians for n 8-byte elements (such as double)
char byte_order ()
void endianswap (void *ptr, int nelems, int elemsize)
 calls endianswap2, 4, or 8 depending on elemsize (an elemsize of 1 is also valid and does nothing)
template<class T >
void endianswap (T *ptr, int n=1)
 NODEEPCOPY (FILE *) template< class T
 Support for generic deep copying.
class U inline void deepCopyField (pair< T, U > &p, CopiesMap &copies)
template<class T , class Alloc >
void deepCopyField (deque< T, Alloc > &c, CopiesMap &copies)
 Standard containers handle deepcopying by distributing it to each element.
template<class T , class U , class Compare , class Alloc >
void deepCopyField (map< T, U, Compare, Alloc > &c, CopiesMap &copies)
template<class T , class U , class Compare , class Alloc >
void deepCopyField (hash_map< T, U, Compare, Alloc > &c, CopiesMap &copies)
template<class T , class U , class Compare , class Alloc >
void deepCopyField (multimap< T, U, Compare, Alloc > &c, CopiesMap &copies)
template<class T , class Compare , class Alloc >
void deepCopyField (set< T, Compare, Alloc > &c, CopiesMap &copies)
template<class T , class Compare , class Alloc >
void deepCopyField (multiset< T, Compare, Alloc > &c, CopiesMap &copies)
template<class T , class Alloc >
void deepCopyField (list< T, Alloc > &c, CopiesMap &copies)
template<class T , class Alloc >
void deepCopyField (vector< T, Alloc > &c, CopiesMap &copies)
template<class T >
void deepCopyField (T &, CopiesMap &)
 Any type not handled below: do nothing.
template<class T >
void deepCopyField (T *&field, CopiesMap &copies)
template<class T >
T * deepCopy (const T *source, CopiesMap &copies)
 A simple template function that calls the method.
template<class T >
T * deepCopy (const T *source)
 This function simply calls the previous one with an initially empty map.
int diff (PP< Object > refer, PP< Object > other, PLearnDiff *diffs=0)
 Useful function to compare two objects.
void addDiffPrefix (PLearnDiff *diffs, const string &prefix, int n)
 Just call diffs->addDiffPrefix(prefix, n).
void setSaveDiffs (PLearnDiff *diffs, bool save_diffs, bool *save_diffs_backup=0)
 Just call diffs->setSaveDiffs(save_diffs, save_diffs_backup).
int diff (PLearnDiff *diffs, const string &refer, const string &other, const string &name)
 Just call diffs->diff(refer, other, name); This function is used so that it can be forward-declared.
real get_absolute_tolerance (PLearnDiff *diffs)
 Return the absolute tolerance of a PLearnDiff.
real get_relative_tolerance (PLearnDiff *diffs)
 Return the relative tolerance of a PLearnDiff.
template<class ObjectType , class OptionType >
int diff (const string &refer, const string &other, const Option< ObjectType, OptionType > *opt, PLearnDiff *diffs)
 Default diff function: compare the two strings.
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, double > *opt, PLearnDiff *diffs)
 diff for double.
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, float > *opt, PLearnDiff *diffs)
 diff for float.
template<class ObjectType , class VecElementType >
int diff (const string &refer, const string &other, const Option< ObjectType, TVec< VecElementType > > *opt, PLearnDiff *diffs)
 diff for TVec<>.
template<class ObjectType , class MatElementType >
int diff (const string &refer, const string &other, const Option< ObjectType, TMat< MatElementType > > *opt, PLearnDiff *diffs)
 diff for TMat<>.
template<class ObjectType , class MapKeyType , class MapElementType >
int diff (const string &refer, const string &other, const Option< ObjectType, map< MapKeyType, MapElementType > > *opt, PLearnDiff *diffs)
 diff for map.
template<class ObjectType , class PointedType >
int diff (const string &refer, const string &other, const Option< ObjectType, PP< PointedType > > *opt, PLearnDiff *diffs)
 diff for PP<PointedType>.
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VMat > *opt, PLearnDiff *diffs)
 diff for VMat.
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Var > *opt, PLearnDiff *diffs)
 diff for Var.
void addDiffPrefix (const string &prefix, PLearnDiff *diffs, int n)
 Add 'prefix' in front of the last 'n' difference names in 'diffs'.
template<class T >
int sizeInBytes (const DoublyLinkedListElement< T > &element)
char * strcopy (char *s)
 make a copy of a C string and return it
void pretty_print_number (char *buffer, real number)
 print a number without unnecessary trailing zero's, into buffer
bool isMapKeysAreInt (map< real, int > &m)
 check that all keys of the map are int values
string hostname ()
string prgname (const string &setname)
template<class In , class Out >
Out copy_cast (In first, In last, Out res)
 Like std::copy, but with an explicit cast to the destination type.
template<class T >
void clear_1 (T &x)
 clearing an element (that's called by clear_n...) Default implementation for clearing any type
void clear_1 (char &x)
void clear_1 (unsigned char &x)
void clear_1 (signed char &x)
void clear_1 (short &x)
void clear_1 (unsigned short &x)
void clear_1 (int &x)
void clear_1 (unsigned int &x)
void clear_1 (long &x)
void clear_1 (unsigned long &x)
void clear_1 (float &x)
void clear_1 (double &x)
void clear_1 (bool &x)
template<class For >
void clear_n (For begin, int n)
 clears n elements starting at iterator position begin
void clear_n (float *begin, int n)
 efficient specialisation for built-in types
void clear_n (double *begin, int n)
void clear_n (bool *begin, int n)
void clear_n (char *begin, int n)
void clear_n (unsigned char *begin, int n)
void clear_n (short *begin, int n)
void clear_n (unsigned short *begin, int n)
void clear_n (int *begin, int n)
void clear_n (unsigned int *begin, int n)
void clear_n (long *begin, int n)
void clear_n (unsigned long *begin, int n)
template<class T >
void pl_swap (T &a, T &b)
 Swap two variables.
int sizeInBytes (int x)
int sizeInBytes (float x)
int sizeInBytes (double x)
int sizeInBytes (long x)
int sizeInBytes (char x)
int sizeInBytes (string x)
template<class T >
int sizeInBytes (T *x)
template<class T1 , class T2 >
int sizeInBytes (pair< T1, T2 > x)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("listCommands",&HelpSystem::listCommands,(BodyDoc("Returns a list of all registered ""commands as strings."), RetDoc("vector of command names")))
 declareFunction ("helpCommands",&HelpSystem::helpCommands,(BodyDoc("Returns a plain text list of all ""registered commands."), RetDoc("plain text list of commands")))
 declareFunction ("helpOnCommand",&HelpSystem::helpOnCommand,(BodyDoc("Will return full help for the ""command with the given name "), ArgDoc("commandname","The name of the command on which to get help"), RetDoc("help text for the command")))
 declareFunction ("helpCommandsHTML",&HelpSystem::helpCommandsHTML,(BodyDoc("Returns an HTML list of all ""registered commands."), RetDoc("HTML list of commands")))
 declareFunction ("helpOnCommandHTML",&HelpSystem::helpOnCommandHTML,(BodyDoc("Will return full help for the ""command with the given name, in HTML"), ArgDoc("commandname","The name of the command on which to get help"), RetDoc("help text for the command, in HTML")))
 declareFunction ("listFunctions",&HelpSystem::listFunctions,(BodyDoc("Returns a list of all registered global ""functions as pairs of (funtionname, nargs)"), RetDoc("vector of function names, arity")))
 declareFunction ("listFunctionPrototypes",&HelpSystem::listFunctionPrototypes,(BodyDoc("Returns a list of the prototypes ""of all registered global functions"), RetDoc("vector of function prototypes as strings")))
 declareFunction ("helpFunctions",&HelpSystem::helpFunctions,(BodyDoc("Returns a list of all registered global ""functions as plain text"), RetDoc("plain text list of functions")))
 declareFunction ("helpOnFunction",&HelpSystem::helpOnFunction,(BodyDoc("Will return full help on all registered ""global functions with the given name "), ArgDoc("functionname","The name of the function on which to get help"), ArgDoc("arity","The number of params"), RetDoc("help text for the function")))
 declareFunction ("helpFunctionsHTML",&HelpSystem::helpFunctionsHTML,(BodyDoc("Returns a list of all registered global ""functions as an HTML page."), RetDoc("HTML list of functions")))
 declareFunction ("helpOnFunctionHTML",&HelpSystem::helpOnFunctionHTML,(BodyDoc("Will return full HTML help on all registered ""global functions with the given name "), ArgDoc("functionname","The name of the function on which to get help"), ArgDoc("arity","The number of params"), RetDoc("HTML help text for the function")))
 declareFunction ("listClasses",&HelpSystem::listClasses,(BodyDoc("Returns a list of all registered Object classes"), RetDoc("vector of class names")))
 declareFunction ("getClassTree",&HelpSystem::getClassTree,(BodyDoc("Returns a map, mapping all registered ""Object classnames to their parentclassname"), RetDoc("map of class names to class names")))
 declareFunction ("helpClasses",&HelpSystem::helpClasses,(BodyDoc("Returns a plain text list of all registered Object classes"), RetDoc("plain text list of class names")))
 declareFunction ("helpOnClass",&HelpSystem::helpOnClass,(BodyDoc("Will return full help for ""the class with the given name"), ArgDoc("classname","The name of the class on which to get help"), RetDoc("help text for the class")))
 declareFunction ("precisOnClass",&HelpSystem::precisOnClass,(BodyDoc("Will return short class descr. and list of build options"), ArgDoc("classname","The name of the class on which to get help"), RetDoc("pair of classname and list of options")))
 declareFunction ("helpClassesHTML",&HelpSystem::helpClassesHTML,(BodyDoc("Returns a list of all registered Object ""classes as an HTML page."), RetDoc("HTML list of class names")))
 declareFunction ("helpOnClassHTML",&HelpSystem::helpOnClassHTML,(BodyDoc("Will return full HTML help for ""the class with the given name"), ArgDoc("classname","The name of the class on which to get help"), RetDoc("HTML help text for the class")))
 declareFunction ("listClassParents",&HelpSystem::listClassParents,(BodyDoc("List of parent classes."), ArgDoc("classname","The name of the class on which to get parents"), RetDoc("vector of parent class names")))
 declareFunction ("helpClassParents",&HelpSystem::helpClassParents,(BodyDoc("Text list of parent classes."), ArgDoc("classname","The name of the class on which to get parents"), RetDoc("text list of parent class names")))
 declareFunction ("helpClassParentsHTML",&HelpSystem::helpClassParentsHTML,(BodyDoc("HTML list of parent classes."), ArgDoc("classname","The name of the class on which to get parents"), RetDoc("HTML list of parent class names")))
 declareFunction ("listDerivedClasses",&HelpSystem::listDerivedClasses,(BodyDoc("List of derived classes."), ArgDoc("classname","The name of the class on which to get children"), RetDoc("List of derived class names")))
 declareFunction ("helpDerivedClasses",&HelpSystem::helpDerivedClasses,(BodyDoc("Text list of derived classes."), ArgDoc("classname","The name of the class on which to get children"), RetDoc("Text list of derived class names")))
 declareFunction ("helpDerivedClassesHTML",&HelpSystem::helpDerivedClassesHTML,(BodyDoc("HTML list of derived classes."), ArgDoc("classname","The name of the class on which to get children"), RetDoc("HTML list of derived class names")))
 declareFunction ("listClassOptions",&HelpSystem::listClassOptions,(BodyDoc("Returns a list of all options ""for the given class."), ArgDoc("classname","The name of the class ""on which to get option help"), RetDoc("vector of option names")))
 declareFunction ("listBuildOptions",&HelpSystem::listBuildOptions,(BodyDoc("Returns a list of build options ""for the given class."), ArgDoc("classname","The name of the class ""on which to get option help"), RetDoc("vector of option names")))
 declareFunction ("helpOnOption",&HelpSystem::helpOnOption,(BodyDoc("Will return full help for the option with ""the given name within the given class"), ArgDoc("classname","The name of the class ""on which to get option help"), ArgDoc("optionname","The name of the option on which to get help"), RetDoc("help text for the option")))
 declareFunction ("helpClassOptionsHTML",&HelpSystem::helpClassOptionsHTML,(BodyDoc("Returns a list of all options ""for the given class as an HTML page."), ArgDoc("classname","The name of the class ""on which to get option help"), RetDoc("HTML list of option names")))
 declareFunction ("helpOnOptionHTML",&HelpSystem::helpOnOptionHTML,(BodyDoc("Will return full HTML help for the option ""with the given name within the given class"), ArgDoc("classname","The name of the class ""on which to get option help"), ArgDoc("optionname","The name of the option on which to get help"), RetDoc("HTML help text for the option")))
 declareFunction ("listMethods",&HelpSystem::listMethods,(BodyDoc("Returns a list of all registered methods ""for the given class as pairs of (methodname, nargs)"), ArgDoc("classname","The name of the class whose methods you want to list."), RetDoc("vector of method names")))
 declareFunction ("listMethodPrototypes",&HelpSystem::listMethodPrototypes,(BodyDoc("Returns a list of the prototypes of ""all registered methods for the given class"), ArgDoc("classname","The name of the class ""whose method prototypes you want to list."), RetDoc("vector of prototypes as strings")))
 declareFunction ("helpMethods",&HelpSystem::helpMethods,(BodyDoc("Returns a list of all registered methods ""for the given class as text."), ArgDoc("classname","The name of the class whose methods you want to list."), RetDoc("Text list of method names")))
 declareFunction ("helpOnMethod",&HelpSystem::helpOnMethod,(BodyDoc("Will return full help on all registered ""methods of the class with the given name"), ArgDoc("classname","The name of the class"), ArgDoc("methodname","The name of the method"), ArgDoc("arity","The number of params"), RetDoc("help text")))
 declareFunction ("helpMethodsHTML",&HelpSystem::helpMethodsHTML,(BodyDoc("Returns a list of all registered methods ""for the given class as an HTML page."), ArgDoc("classname","The name of the class whose methods you want to list."), RetDoc("HTML list of method names")))
 declareFunction ("helpOnMethodHTML",&HelpSystem::helpOnMethodHTML,(BodyDoc("Will return full help on all registered ""methods of the class with the given name"), ArgDoc("classname","The name of the class"), ArgDoc("methodname","The name of the method"), ArgDoc("arity","The number of params"), RetDoc("help text in HTML")))
 declareFunction ("helpIndexHTML",&HelpSystem::helpIndexHTML,(BodyDoc("Returns the global help index in HTML."), RetDoc("HTML global help index")))
 declareFunction ("setResourcesPathHTML",&HelpSystem::setResourcesPathHTML,(BodyDoc("Sets the help resource path ""for HTML resources."), ArgDoc("path","HTML help resource path")))
 declareFunction ("getResourcesPathHTML",&HelpSystem::getResourcesPathHTML,(BodyDoc("Gets the help resource path ""for HTML resources."), RetDoc("path of HTML resources")))
double pl_strtod (const char *nptr, char **endptr)
 Conversion from string to double or float.
float pl_strtof (const char *nptr, char **endptr)
bool pl_isnumber (const string &s, double *dbl=NULL)
 This function handles numbers with exponents (such as 10.2E09) as well as Nans.
bool pl_isnumber (const string &str, float *dbl)
bool pl_islong (const string &s)
long tolong (const string &s, int base=10)
 conversions from string to numerical types
double todouble (const string &s)
bool tobool (const string &s)
float tofloat (const string &s)
int toint (const string &s, int base=10)
template<class T >
lexical_cast (const string &str)
 Utility function to convert any string to a C++ object using the PStream deserialisation mechanism.
ObjectloadObject (const PPath &filename)
 Loads an object from the given file (no macro-preprocessing is performed)
ObjectmacroLoadObject (const PPath &filename, map< string, string > &vars)
 Same as loadObject but first performs macro-processing on the file vars may be initialised with the values of some variables and upon return it will also contain newly $DEFINED variables.
ObjectmacroLoadObject (const PPath &filename)
 same as previous, but no need to pass a variables map
ObjectreadObject (PStream &in, unsigned int id=UINT_MAX)
 This function builds an object from its representation in the stream.
PStreamoperator>> (PStream &in, Object *&o)
 This takes precedence over the template definitions for a template type T in PStream.h.
void callFunction (const string &funcname, int nargs, PStream &io)
 Calls a function previously declared with the declareFunction mechanism.
ObjectnewObjectFromClassname (const string &classname)
Objectremote_deepCopy (Object *source)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("newObject",&newObject,(BodyDoc("Returns PLearn object from a string description.\n"), ArgDoc("representation","the string representation of the object"), RetDoc("newly created object")))
 declareFunction ("newObjectFromClassname",&newObjectFromClassname,(BodyDoc("Returns PLearn object from a class name (string.)\n"), ArgDoc("classname","the class of the object, as a string"), RetDoc("newly created object")))
 declareFunction ("loadObject",&loadObject,(BodyDoc("Returns PLearn object from a file describing it.\n"), ArgDoc("filename","file containing the object to load"), RetDoc("newly created object")))
 declareFunction ("macroLoadObject", static_cast< Object *(*)(const PPath &, map< string, string > &)>(&macroLoadObject),(BodyDoc("Returns PLearn object from a file describing it,"" after macro-processing.\n"), ArgDoc("filename","file containing the object to load"), ArgDoc("vars","map of vars to values."), RetDoc("newly created object")))
 declareFunction ("deepCopy",&remote_deepCopy,(BodyDoc("Returns deep copy of a PLearn object.\n"), ArgDoc("source","object to be deep-copied"), RetDoc("deep copy of the object")))
ObjectreadObject (istream &in_)
ObjectnewObject (const string &representation)
 Creates a new object according to the given representation.
PStreamoperator>> (PStream &in, Object &o)
PStreamoperator<< (PStream &out, const Object &o)
template<class T >
bool isConvertibleToObjectPtr (const T &)
 Return true if toObjectPtr() or toIndexedObjectPtr would succeed.
template<class T >
bool isConvertibleToObjectPtr (const PP< T > &x)
template<class T >
bool isConvertibleToObjectPtr (const Array< T > &x)
template<class T >
bool isConvertibleToObjectPtr (const TVec< T > &x)
template<class T >
bool isConvertibleToObjectPtr (const Array< PP< T > > &x)
template<class T >
bool isConvertibleToObjectPtr (const TVec< PP< T > > &x)
template<class T >
int indexableObjectSize (const T &x)
 Return 0 if the object is not indexable; otherwise, return one more than the maximum index allowed by toIndexedObjectPtr(); in other words, return the equivalent of the size() accessor on a vector.
template<class T >
int indexableObjectSize (const Array< T > &x)
template<class T >
int indexableObjectSize (const TVec< T > &x)
template<class T >
ObjecttoObjectPtrImpl (const T &, const boost_false_type &)
template<class T >
ObjecttoObjectPtrImpl (const T &x, const boost_true_type &)
template<class T >
ObjecttoObjectPtr (const T &x)
 Attempt to return a pointer to Object (or an error if the passed argument cannot be considered an Object subclass)
template<class T >
ObjecttoObjectPtr (const PP< T > &x)
template<class T >
ObjecttoIndexedObjectPtr (const Array< T > &x, int i)
 Return the Object* at index i of an Array or TVec.
template<class T >
ObjecttoIndexedObjectPtr (const TVec< T > &x, int i)
template<class T >
ObjecttoIndexedObjectPtr (const T &, int)
void setoption_broadcast (const Object *o, const string &class_name, const string &option_name, const string &option_value, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
 Broadcast a call to setOption only for specific classes.
template<class T , class U >
void memfun_broadcast (const Object *o, U(T::*func)() const, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
 Call a specific member function across a graph of Objects.
template<class T , class U >
void memfun_broadcast (Object *o, U(T::*func)(), ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V >
void memfun_broadcast (const Object *o, U(T::*func)(V) const, typename boost::call_traits< V >::param_type arg1, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V >
void memfun_broadcast (Object *o, U(T::*func)(V), typename boost::call_traits< V >::param_type arg1, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W >
void memfun_broadcast (const Object *o, U(T::*func)(V, W) const, typename boost::call_traits< V >::param_type arg1, typename boost::call_traits< W >::param_type arg2, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W >
void memfun_broadcast (Object *o, U(T::*func)(V, W), typename boost::call_traits< V >::param_type arg1, typename boost::call_traits< W >::param_type arg2, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W , class X >
void memfun_broadcast (const Object *o, U(T::*func)(V, W, X) const, typename boost::call_traits< V >::param_type arg1, typename boost::call_traits< W >::param_type arg2, typename boost::call_traits< X >::param_type arg3, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W , class X >
void memfun_broadcast (Object *o, U(T::*func)(V, W, X), typename boost::call_traits< V >::param_type arg1, typename boost::call_traits< W >::param_type arg2, typename boost::call_traits< X >::param_type arg3, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V >
void memfun_broadcast_optname (const Object *o, U(T::*func)(V) const, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
 Call a specific member function across a graph of Objects with the option name as argument.
template<class T , class U , class V >
void memfun_broadcast_optname (Object *o, U(T::*func)(V), ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W >
void memfun_broadcast_optname (const Object *o, U(T::*func)(V, W) const, typename boost::call_traits< V >::param_type arg1, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W >
void memfun_broadcast_optname (Object *o, U(T::*func)(V, W), typename boost::call_traits< V >::param_type arg1, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W , class X >
void memfun_broadcast_optname (const Object *o, U(T::*func)(V, W, X) const, typename boost::call_traits< V >::param_type arg1, typename boost::call_traits< W >::param_type arg2, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class T , class U , class V , class W , class X >
void memfun_broadcast_optname (Object *o, U(T::*func)(V, W, X), typename boost::call_traits< V >::param_type arg1, typename boost::call_traits< W >::param_type arg2, ObjectGraphIterator::TraversalType tt=ObjectGraphIterator::DepthPreOrder)
template<class ObjectType , class OptionType >
void declareOption (OptionList &ol, const string &optionname, OptionType ObjectType::*member_ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
 Declare an individual option with a declareOptions() member function.
template<class ObjectType , class OptionType >
void declareOption (OptionList &ol, const string &optionname, OptionType *ObjectType::*member_ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
template<class OptionType >
void declareStaticOption (OptionList &ol, const string &optionname, OptionType *ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
 Overload for pointer to static member.
template<class VecElementType >
void declareStaticOption (OptionList &ol, const string &optionname, TVec< VecElementType > *ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
template<class ObjectType , class VecElementType >
void declareOption (OptionList &ol, const string &optionname, TVec< VecElementType > ObjectType::*member_ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
template<class ObjectType , class OptionType >
void redeclareOption (OptionList &ol, const string &optionname, OptionType ObjectType::*member_ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
 Allows one to redeclare an option differently (e.g.
template<class ObjectType , class OptionType >
void redeclareOption (OptionList &ol, const string &optionname, OptionType *ObjectType::*member_ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
 Partial specialization for pointers.
template<class ObjectType , class VecElementType >
void redeclareOption (OptionList &ol, const string &optionname, TVec< VecElementType > ObjectType::*member_ptr, OptionBase::flag_t flags, const string &description, const OptionBase::OptionLevel level=OptionBase::default_level, const string &defaultval="")
 Partial specialization for TVec<T>
ObjecttoObjectPtr (const ParentableObject &o)
PStreamoperator>> (PStream &in, ParentableObject &o)
PStreamoperator>> (PStream &in, ParentableObject *&o)
PStreamoperator<< (PStream &out, const ParentableObject &o)
PStreamoperator>> (PStream &in, PP< ParentableObject > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ParentableObject > *opt, PLearnDiff *diffs)
template<class ParentT >
ObjecttoObjectPtr (const TypedParentableObject< ParentT > &o)
template<class ParentT >
PStreamoperator>> (PStream &in, TypedParentableObject< ParentT > &o)
template<class ParentT >
PStreamoperator>> (PStream &in, TypedParentableObject< ParentT > *&o)
template<class ParentT >
PStreamoperator<< (PStream &out, const TypedParentableObject< ParentT > &o)
template<class ParentT >
PStreamoperator>> (PStream &in, PP< TypedParentableObject< ParentT > > &o)
ObjecttoObjectPtr (const TransparentParentable &o)
PStreamoperator>> (PStream &in, TransparentParentable &o)
PStreamoperator>> (PStream &in, TransparentParentable *&o)
PStreamoperator<< (PStream &out, const TransparentParentable &o)
PStreamoperator>> (PStream &in, PP< TransparentParentable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransparentParentable > *opt, PLearnDiff *diffs)
PStreamoperator<< (PStream &out, const PDate &date)
 Serialization to PStream.
PStreamoperator>> (PStream &in, PDate &date)
 De-serialization from PStream.
float date_to_float (const PDate &t)
 Converts date to float: ex: September 29 1972: 720929; December 25 2002: 1021225 Also converts missing date to missing float value and vice-versa.
PDate float_to_date (float f)
double date_to_double (const PDate &t)
 Converts date to double: ex: September 29 1972: 720929; December 25 2002: 20021225 Also converts missing date to missing double value and vice-versa.
PDate double_to_date (double d)
int operator- (const PDate &to_date, const PDate &from_date)
 substract two dates, the result being counted in days.
PDate operator+ (const PDate &pdate, int ndays)
 add a number of days
PDate operator- (const PDate &pdate, int ndays)
 subtract a number of days add a number of days
ostream & operator<< (ostream &os, const PDate &date)
int add_months_to_date (int xyymmdd, int nmonths)
 Takes a date (in cyymmdd or yyyymmdd format) and adds the given number of months (may be negative) Returns result in same format.
PDate float_to_date (double d)
double datetime_to_double (const PDateTime &t)
 converts date/time to double: for example: September 29 1972: 720929; December 25 2002: 1021225.
PDateTime double_to_datetime (double f)
double hhmmss_to_double (int hh, int mm, int ss)
 converts an hours/minutes/seconds to a day fraction
void double_to_hhmmss (double fraction, int &hh, int &mm, int &ss)
 convert a day fraction (< 1) to hours/minutes/seconds
int delta_seconds (const PDateTime &current, const PDateTime &past)
 Return the number of seconds between the two dates.
double operator- (const PDateTime &to_date, const PDateTime &from_date)
 subtract two dates, the result being counted in days (+ fractions)
ostream & operator<< (ostream &os, const PDateTime &date)
size_t hashbytes (const char *byte_start, size_t byte_length)
 **************** Hash tables support *************************
size_t hashval (const char *strng)
template<class T >
size_t hashval (const T &x)
 default which will work in many cases but not all
string pl_repository_revision ()
 Return a string giving the version-control repository revision(s) with which this PLearn executable has been compiled.
string pl_repository_compile_date ()
 Return the date when pl_repository_revision.cc was compiled.
string pl_repository_compile_time ()
 Return the time when pl_repository_revision.cc was compiled.
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("pl_repository_revision",&pl_repository_revision,(BodyDoc("Return a string giving the version-control repository revision(s)\n""with which this PLearn executable has been compiled.\n")))
ObjecttoObjectPtr (const PLearnDiff &o)
PStreamoperator>> (PStream &in, PLearnDiff &o)
PStreamoperator>> (PStream &in, PLearnDiff *&o)
PStreamoperator<< (PStream &out, const PLearnDiff &o)
PStreamoperator>> (PStream &in, PP< PLearnDiff > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLearnDiff > *opt, PLearnDiff *diffs)
void errormsg2 (const char *filename, const int linenumber, const char *msg,...)
void errormsg (const char *msg,...)
void verrormsg (const char *msg, va_list args)
void warningmsg (const char *msg,...)
void vwarningmsg (const char *msg, va_list args)
void warn_err (bool warn, const char *msg,...)
void warn_err2 (const char *filename, const int linenumber, bool warn, const char *msg,...)
void deprecationmsg (const char *msg,...)
void exitmsg (const char *msg,...)
string get_error_message (const char *type, const char *expr, const char *function, const char *file, unsigned line, const string &message)
 Return a typical error message.
void pl_assert_fail (const char *expr, const char *file, unsigned line, const char *function, const string &message)
void pl_check_fail (const char *expr, const char *file, unsigned line, const char *function, const string &message)
template<class T >
bool operator== (const T *ptr, const PP< T > &b)
template<class T >
void deepCopyField (PP< T > &field, CopiesMap &copies)
 Any pointer or smart pointer: call deepCopy()
template<class T >
T * deepCopy (PP< T > source, CopiesMap &copies)
 A simple template function.
template<class T >
T * deepCopy (PP< T > source)
 This function simply calls the previous one with an initially empty map.
template<class T >
T * get_pointer (PP< T > const &p)
template<class T >
int sizeInBytes (PP< T > x)
void setProgressBarPlugin (string pb_type)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("setProgressBarPlugin",&setProgressBarPlugin,(BodyDoc("Sets the progress bar plugin.\n"), ArgDoc("pb_type","one of: 'none','text'.")))
string getPrErrorString ()
 Utility function that returns a std::string describing the last NSPR error.
ostream & operator<< (ostream &out, Range r)
PStreamoperator<< (PStream &out, const RealRange &x)
PStreamoperator>> (PStream &in, RealRange &x)
bool operator< (RealMapping::single_mapping_t a, RealMapping::single_mapping_t b)
void write (ostream &out, const RealRange &range)
ostream & operator<< (ostream &out, const RealRange &range)
void read (PStream &in, RealRange &range)
ObjecttoObjectPtr (const RealMapping &o)
PStreamoperator>> (PStream &in, RealMapping &o)
PStreamoperator>> (PStream &in, RealMapping *&o)
PStreamoperator<< (PStream &out, const RealMapping &o)
PStreamoperator>> (PStream &in, PP< RealMapping > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealMapping > *opt, PLearnDiff *diffs)
RemoteMethodMapgetGlobalFunctionMap ()
 This function returns the map in which all remote functions and static methods are to be registered (with declareFunction).
template<class R >
void declareFunction (const string &funcname, R(*func)(), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class R , class A1 >
void declareFunction (const string &funcname, R(*func)(A1), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class R , class A1 , class A2 >
void declareFunction (const string &funcname, R(*func)(A1, A2), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class R , class A1 , class A2 , class A3 >
void declareFunction (const string &funcname, R(*func)(A1, A2, A3), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class R , class A1 , class A2 , class A3 , class A4 >
void declareFunction (const string &funcname, R(*func)(A1, A2, A3, A4), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class R , class A1 , class A2 , class A3 , class A4 , class A5 >
void declareFunction (const string &funcname, R(*func)(A1, A2, A3, A4, A5), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class R , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
void declareFunction (const string &funcname, R(*func)(A1, A2, A3, A4, A5, A6), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R , class A1 >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(A1), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R , class A1 , class A2 >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(A1, A2), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R , class A1 , class A2 , class A3 >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(A1, A2, A3), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R , class A1 , class A2 , class A3 , class A4 >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(A1, A2, A3, A4), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(A1, A2, A3, A4, A5), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
void declareMethod (RemoteMethodMap &rmm, const string &methodname, R(T::*method)(A1, A2, A3, A4, A5, A6), const RemoteMethodDoc &doc, const RemoteTrampoline::flag_t &flgs=0)
RemoteMethodDoc operator, (const BodyDoc &body, const ArgDoc &arg)
 Global operator, to start off the list of RemoteMethodDoc chaining.
RemoteMethodDoc operator, (const BodyDoc &body, const RetDoc &ret)
 Global operator, to start off the list of RemoteMethodDoc chaining.
RemoteMethodDoc operator, (const ArgDoc &arg, const BodyDoc &body)
 Global operator, to start off the list of RemoteMethodDoc chaining.
RemoteMethodDoc operator, (const ArgDoc &arg, const RetDoc &ret)
 Global operator, to start off the list of RemoteMethodDoc chaining.
RemoteMethodDoc operator, (const RetDoc &ret, const BodyDoc &body)
 Global operator, to start off the list of RemoteMethodDoc chaining.
RemoteMethodDoc operator, (const RetDoc &ret, const ArgDoc &arg)
 Global operator, to start off the list of RemoteMethodDoc chaining.
ObjecttoObjectPtr (const SetOption &o)
PStreamoperator>> (PStream &in, SetOption &o)
PStreamoperator>> (PStream &in, SetOption *&o)
PStreamoperator<< (PStream &out, const SetOption &o)
PStreamoperator>> (PStream &in, PP< SetOption > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SetOption > *opt, PLearnDiff *diffs)
template<class T , unsigned SizeBits, class Allocator >
unsigned int hashval (const SmallVector< T, SizeBits, Allocator > &v)
 hash function for hash tables
template<class T , unsigned SizeBits, class Allocator >
bool operator== (const SmallVector< T, SizeBits, Allocator > &a, const SmallVector< T, SizeBits, Allocator > &b)
 Equality operator.
template<class T , unsigned SizeBits, class Allocator >
bool operator!= (const SmallVector< T, SizeBits, Allocator > &x, const SmallVector< T, SizeBits, Allocator > &y)
 const SmallVector<T,SizeBits,Allocator>& y) { return !(x==y); }
template<class T , unsigned SizeBits>
bool operator< (const SmallVector< T, SizeBits > &, const SmallVector< T, SizeBits > &)
 Lexicographical Ordering.
template<class T , unsigned SizeBits, class Allocator >
bool operator< (const SmallVector< T, SizeBits, Allocator > &x, const SmallVector< T, SizeBits, Allocator > &y)
template<class T >
PStreamoperator<< (PStream &out, const Storage< T > &seq)
template<class T >
PStreamoperator>> (PStream &in, Storage< T > &seq)
ostream & operator<< (ostream &out, const StringTable &st)
string left (const string &s, size_t width, char padding=' ')
 aligns the given string in a cell having the given width
string right (const string &s, size_t width, char padding)
string center (const string &s, size_t width, char padding)
string extract_filename (const string &filepath)
 ** File path manipulation functions **
string extract_directory (const string &filepath)
 Returns everything before the last '/' including the '/' (if there's no '/' it returns "./")
string extract_extension (const string &filepath)
 Returns everything after the last '.
string extract_filename_without_extension (const string &filepath)
 Returns everything before the last '.' of the filename, excluding the '.' (if there's no '.' in the filename it returns the whole filename)
string remove_extension (const string &filename)
 Return the filename withoug the extension (i.e. removing the last.
string * data_filename_2_filenames (const string &filename, int &nb_files)
 take a filename containing the name of a file per line, and return theses names as a string* of length nb_files
string removeblanks (const string &s)
 removes starting and ending blanks '\n','\r',' ','\t'
string removeallblanks (const string &s)
 removes all blanks '\n','\r',' ','\t'
string removenewline (const string &s)
 removes any trailing '\n' and/or '\r'
string removequotes (const string &s)
 remove exactly one pair of matching leading and trailing '\'' and '"'; if there is none, return the string unmodified
string quote_string (const string &s)
 Quote the provided string 's'.
string remove_trailing_slash (const string &path)
 removes any trailing '/' from the path
string append_slash (const string &path)
 appends a trailing slash to path if there isn't already one
string lowerstring (const string &s)
 convert a string to all lowercase
string upperstring (const string &s)
 convert a string to all uppercase
string pgetline (istream &in=cin)
 returns the next line read from the stream, after removing any trailing '\r' and/or '\n'
bool isBlank (const string &s)
 returns true if s is a blank line (containing only space, tab, until end of line or a # comment-character is reached
bool isParagraphBlank (const string &s)
 returns true if s is a blank paragraph (containing only space, tab, until end of **string**)
string space_to_underscore (string str)
 replaces all characters <= ' ' (i.e. newline, tab, space, etc...) by '_'
string underscore_to_space (string str)
 replaces all underscores by a single space character
string backslash_to_slash (string str)
 replaces all backslashes with slash
int search_replace (string &text, const string &searchstr, const string &replacestr)
 replaces all occurences of searchstr in the text by replacestr returns the number of matches that got replaced
vector< string > split (const string &s, char delimiter)
 splits a string along occurences of the delimiters.
vector< string > split_quoted_delimiter (const string &s, char delimiter, const string &double_quote)
vector< string > split_quoted_delimiter (const string &s, char delimiter, char double_quote)
vector< string > split_quoted_delimiter (const string &s, const string &delimiters, const string &double_quote)
vector< string > split_all (const string &s, const string &delimiters)
vector< string > split (const string &s, const string &delimiters, bool keep_delimiters)
void split_on_first (const string &s, const string &delimiters, string &left, string &right)
pair< string, string > split_on_first (const string &s, const string &delimiters)
void remove_comments (string &text, const string &commentstart="#")
 In a multiline text, removes everything starting at commentstart pattern until the end of line.
string join (const vector< string > &s, const string &separator=" ")
 makes a single string from a vector of strings
vector< string > remove (const vector< string > &v, string element)
 return vector with all instances of element removed
int findpos (const vector< string > &v, string element)
 return index of element in v, or -1 if not found
int universal_compare (const string &x, const string &y)
 "Universal compare".
vector< string > addprepostfix (const string &prefix, const vector< string > &names, const string &postfix)
 returns the list of names, but with a prepended prefix and an appended postfix
string addprepostfix (const string &prefix, const string &text, const string &postfix)
 Returns a string with the prefix prepended and the postfix appended to each *line* of the text string.
vector< string > stringvector (int argc, char **argv)
 makes a C++ style vector of strings from a C style vectr of strings Note: this may be useful in conjunction with get_option.
string get_option (const vector< string > &command_line, const string &option, const string &default_value)
bool find (const vector< string > &command_line, const string &option)
vector< string > getNonBlankLines (const string &in)
 Returns a vector of string containing only non-empty lines, as you guessed it.
ostream & operator<< (ostream &out, const vector< string > &vs)
 formatted printing of vector<string> prints strings separated by a ", "
vector< string > split_from_string (const string &s, const string &delimiter)
 Split a string along occurences of the substring 'delimiter'.
void parseBaseAndParameters (const string &s, string &base, map< string, string > &params, map< string, string > *added=0, map< string, string > *backup=0, const string &delimiter="::")
 From a string s = "base_string::arg1=val1::arg2=val2::arg3=val3", fill 'base' with 'base_string', and add to 'params' mappings argX -> valX.
bool string_begins_with (const string &s, const string &beginning)
 Return true iff string 's' begins with string 'beginning'.
bool string_ends_with (const string &s, const string &end)
 Return true iff string 's' ends with string 'end'.
vector< string > addprefix (const string &prefix, const vector< string > &names)
 returns the list of names, but with a prepended prefix
vector< string > addpostfix (const vector< string > &names, const string &postfix)
 returns the list of names, but with an appended postfix
string addprefix (const string &prefix, const string &text)
 Returns a string with the prefix prepended to each *line* of the text string.
string addpostfix (const string &text, const string &postfix)
 Returns a string with the postfix appended to each *line* of the text string.
template<class U , class V >
ostream & operator<< (ostream &out, const pair< U, V > &p)
 Formatted printing of a pair<U,V> as U:V.
void notConvertible ()
void convertible ()
void notIndexable ()
void indexable ()
ObjecttoObjectPtr (const X &o)
PStreamoperator>> (PStream &in, X &o)
PStreamoperator>> (PStream &in, X *&o)
PStreamoperator<< (PStream &out, const X &o)
PStreamoperator>> (PStream &in, PP< X > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, X > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Y &o)
PStreamoperator>> (PStream &in, Y &o)
PStreamoperator>> (PStream &in, Y *&o)
PStreamoperator<< (PStream &out, const Y &o)
PStreamoperator>> (PStream &in, PP< Y > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Y > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Z &o)
PStreamoperator>> (PStream &in, Z &o)
PStreamoperator>> (PStream &in, Z *&o)
PStreamoperator<< (PStream &out, const Z &o)
PStreamoperator>> (PStream &in, PP< Z > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Z > *opt, PLearnDiff *diffs)
void iterate (ObjectGraphIterator grit, ObjectGraphIterator grend)
ObjecttoObjectPtr (const ObjectGraphIteratorTest &o)
PStreamoperator>> (PStream &in, ObjectGraphIteratorTest &o)
PStreamoperator>> (PStream &in, ObjectGraphIteratorTest *&o)
PStreamoperator<< (PStream &out, const ObjectGraphIteratorTest &o)
PStreamoperator>> (PStream &in, PP< ObjectGraphIteratorTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ObjectGraphIteratorTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ObjectGraphIteratorTest) template<> class TypeTraits< ObjectGraphIteratorTest >
ObjecttoObjectPtr (const PLCheckTest &o)
PStreamoperator>> (PStream &in, PLCheckTest &o)
PStreamoperator>> (PStream &in, PLCheckTest *&o)
PStreamoperator<< (PStream &out, const PLCheckTest &o)
PStreamoperator>> (PStream &in, PP< PLCheckTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLCheckTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PLCheckTest) template<> class TypeTraits< PLCheckTest >
ObjecttoObjectPtr (const PLStringutilsTest &o)
PStreamoperator>> (PStream &in, PLStringutilsTest &o)
PStreamoperator>> (PStream &in, PLStringutilsTest *&o)
PStreamoperator<< (PStream &out, const PLStringutilsTest &o)
PStreamoperator>> (PStream &in, PP< PLStringutilsTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLStringutilsTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PLStringutilsTest) template<> class TypeTraits< PLStringutilsTest >
ObjecttoObjectPtr (const PPTest &o)
PStreamoperator>> (PStream &in, PPTest &o)
PStreamoperator>> (PStream &in, PPTest *&o)
PStreamoperator<< (PStream &out, const PPTest &o)
PStreamoperator>> (PStream &in, PP< PPTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PPTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PPTest) template<> class TypeTraits< PPTest >
template<class T , unsigned N, class TTrait >
bool operator== (const TinyVector< T, N, TTrait > &, const TinyVector< T, N, TTrait > &)
 Equality operator.
template<class T , unsigned N, class TTrait >
bool operator< (const TinyVector< T, N, TTrait > &, const TinyVector< T, N, TTrait > &)
 Lexicographical Ordering.
template<class T , unsigned N, class TTrait >
bool operator!= (const TinyVector< T, N, TTrait > &x, const TinyVector< T, N, TTrait > &y)
 Other operators (should be defined in std::rel_ops, but does not work properly with gcc yet).
template<class T , unsigned N, class TTrait >
bool operator> (const TinyVector< T, N, TTrait > &x, const TinyVector< T, N, TTrait > &y)
template<class T , unsigned N, class TTrait >
bool operator<= (const TinyVector< T, N, TTrait > &x, const TinyVector< T, N, TTrait > &y)
template<class T , unsigned N, class TTrait >
bool operator>= (const TinyVector< T, N, TTrait > &x, const TinyVector< T, N, TTrait > &y)
template<class T , unsigned N, class TTrait >
void operator<< (TinyVector< T, N, TTrait > &x, const TinyVector< T, N, TTrait > &y)
 To emulate PLearn TVecs, operator<< implements a copy.
PStream_tostring_static_pstream_ (bool lock, PStream::mode_t io_formatting=PStream::raw_ascii)
 Returns an internal static PStream pointing to a StringPStreamBuf This should first be called with lock=true to acquire the lock on the stream (and set the io_formatting and clear the string buffer) It should then be called with lock=false to flush the stream and release the lock and clear the outmap.
string tostring (const double &x, PStream::mode_t io_formatting)
string tostring (const float &x, PStream::mode_t io_formatting=PStream::raw_ascii)
template<class T >
string tostring (const T &x, PStream::mode_t io_formatting=PStream::raw_ascii)
template<class T1 >
PStreamoperator<< (PStream &out, const tuple< T1 > &t)
template<class T1 , class T2 >
PStreamoperator<< (PStream &out, const tuple< T1, T2 > &t)
template<class T1 , class T2 , class T3 >
PStreamoperator<< (PStream &out, const tuple< T1, T2, T3 > &t)
template<class T1 , class T2 , class T3 , class T4 >
PStreamoperator<< (PStream &out, const tuple< T1, T2, T3, T4 > &t)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
PStreamoperator<< (PStream &out, const tuple< T1, T2, T3, T4, T5 > &t)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
PStreamoperator<< (PStream &out, const tuple< T1, T2, T3, T4, T5, T6 > &t)
template<class T1 >
PStreamoperator>> (PStream &in, tuple< T1 > &t)
template<class T1 , class T2 >
PStreamoperator>> (PStream &in, tuple< T1, T2 > &t)
template<class T1 , class T2 , class T3 >
PStreamoperator>> (PStream &in, tuple< T1, T2, T3 > &t)
template<class T1 , class T2 , class T3 , class T4 >
PStreamoperator>> (PStream &in, tuple< T1, T2, T3, T4 > &t)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
PStreamoperator>> (PStream &in, tuple< T1, T2, T3, T4, T5 > &t)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
PStreamoperator>> (PStream &in, tuple< T1, T2, T3, T4, T5, T6 > &t)
template<typename T0 >
void deepCopyField (tuple< T0 > &t, CopiesMap &copies)
 Tuples handle deepCopying by distributing it to each element.
template<typename T0 , typename T1 >
void deepCopyField (tuple< T0, T1 > &t, CopiesMap &copies)
template<typename T0 , typename T1 , typename T2 >
void deepCopyField (tuple< T0, T1, T2 > &t, CopiesMap &copies)
template<typename T0 , typename T1 , typename T2 , typename T3 >
void deepCopyField (tuple< T0, T1, T2, T3 > &t, CopiesMap &copies)
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void deepCopyField (tuple< T0, T1, T2, T3, T4 > &t, CopiesMap &copies)
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void deepCopyField (tuple< T0, T1, T2, T3, T4, T5 > &t, CopiesMap &copies)
 DECLARE_TYPE_TRAITS_FOR_BASETYPE (void, 0xFF, 0xFF)
 DECLARE_TYPE_TRAITS_FOR_BASETYPE (float, 0x0E, 0x0F)
 DECLARE_TYPE_TRAITS_FOR_BASETYPE (double, 0x10, 0x11)
 DECLARE_TYPE_TRAITS_FOR_BASETYPE (bool, 0x30, 0x30)
 DECLARE_TYPE_TRAITS_FOR_INTTYPE (char)
 DECLARE_TYPE_TRAITS_FOR_INTTYPE (signed char)
 DECLARE_TYPE_TRAITS_FOR_INTTYPE (short)
 DECLARE_TYPE_TRAITS_FOR_INTTYPE (int)
 DECLARE_TYPE_TRAITS_FOR_INTTYPE (long)
 DECLARE_TYPE_TRAITS_FOR_UINTTYPE (unsigned char)
 DECLARE_TYPE_TRAITS_FOR_UINTTYPE (unsigned long long)
Mat input2dSet (const PPath &filename="data2d.amat")
 This will input a 2d binary classification problem (launches a java applet)
void normalizeDataSets (Mat &training_set, Mat &validation_set, Mat &test_set)
void normalizeDataSets (VMat &training_set, VMat &validation_set, VMat &test_set)
void normalizeDataSets (Mat &training_set, Mat &test_set)
 normalize both training_set and test_set according to mean and stddev computed on training_set
void normalizeDataSet (Mat &m)
void splitTrainValidTest (VMat &data_set, VMat &train_set, VMat &valid_set, real valid_fraction, VMat &test_set, real test_fraction, bool normalize)
VMat reduceInputSize (real fraction, VMat data)
VMat reduceDataSetSize (real fraction, VMat data)
void remapClassnums (VMat &data, real remap_minval_to, real remap_maxval_to)
 remaps classnums to {0,1} or to {-1,+1}
VMat loadBreastCancerWisconsin (bool normalize, bool uniq)
int loadBreastCancer (VMat &training_set, VMat &validation_set, VMat &test_set, int ntrain, int nvalid, bool uniq=true)
 These calls return the number of classes...
VMat loadPimaIndians (bool normalize)
VMat loadHousing (bool normalize)
VMat loadSonar ()
VMat loadIonosphere ()
VMat loadDiabetes (bool normalize)
int loadDiabetes (VMat &training_set, VMat &validation_set, VMat &test_set, int ntrain, int nvalid)
int loadATT800 (VMat &training_set, VMat &test_set)
VMat loadLetters (bool normalize)
VMat loadLetters (const char *class0, const char *class1, bool normalize)
int loadLetters (VMat &training_set, VMat &validation_set, VMat &test_set, char *which_letters, real validation_fraction, real test_fraction, bool do_shuffle)
VMat loadLetters (int n_letters, bool do_shuffle)
int loadLetters (VMat &training_set, VMat &validation_set, VMat &test_set, int n_letters, real validation_fraction, real test_fraction, bool do_shuffle)
void loadCorelDatamat (int classnum, Mat &train, Mat &valid, Mat &test)
Mat smoothCorelHisto (Mat &data)
void loadCorel (Mat &training_set, Mat &validation_set, Mat &test_set, int negative_class, int positive_class)
void loadCallxx (int year, VMat &d)
void loadUSPS (VMat &trainset, VMat &testset, bool use_smooth)
VMat loadUSPS (bool use_smooth)
void loadLetters (int &inputsize, int &nclasses, VMat &trainset, VMat &testset)
void loadClassificationDataset (const string &datasetname, int &inputsize, int &nclasses, VMat &trainset, VMat &testset, bool normalizeinputs, VMat &allset)
void loadUCI (VMat &trainset, VMat &testset, VMat &allset, string db_spec, string id, bool &normalize, const string &type)
 Load the train, test and all datasets for a UCI database.
void loadUCIAMat (VMat &data, string file, PP< UCISpecification > uci_spec)
 Load a AMAT format UCI dataset in the given VMatrix.
void loadUCISet (VMat &data, PP< UCISpecification > uci_spec)
 Load a specific UCI dataset in the given VMatrix.
void loadUCISet (VMat &data, string file, PP< UCISpecification > uci_spec)
 Load a specific UCI dataset in the given VMatrix.
string loadClassificationDatasetHelp ()
string loadUCIDatasetsHelp ()
time_t getDataSetDate (const PPath &dataset_path)
 Return the last time a dataset was modified.
VMat getDataSet (const PPath &dataset_path)
 Return the dataset pointed by 'dataset_path'.
string getDataSetHelp ()
 Return help on the dataset syntax.
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("getDataSet",&getDataSet,(BodyDoc("Returns a VMat from a path to the corresponding file.\n"), ArgDoc("dataset_path","the path to the VMat file or directory"), RetDoc("corresponding VMat object")))
void loadMNIST (VMat &training_set, VMat &test_set)
int ICBCpartition (const Vec &claims, real threshold)
ostream & operator<< (ostream &os, const FieldValue &ft)
double todouble (const Row::iterator &it)
 Generic conversions from an iterator.
string tostring (const RowIterator &it)
void printFieldName (ostream &o, const Row::iterator &field)
 outputs the given field name in a cell of apropriate size
void printFieldNames (ostream &o, const Row &row)
 outputs all field names, separated by " | "
ostream & operator<< (ostream &o, const Row::iterator &field)
 outputs a single field flushed right in a cell of apropriate width (as given by field.char_width())
ostream & operator<< (ostream &, const Row &row)
 outputs all fields in a row, separated by " | "
void halfShuffleRows (SDB &sdb)
 not quite a random shuffle (see implementation) but more efficient use of disk cache
void randomShuffleRows (SDB &sdb)
 Performs a random permutation of all the rows of the SDB (same algorithm as Mat::shuffle)
ObjecttoObjectPtr (const UCISpecification &o)
PStreamoperator>> (PStream &in, UCISpecification &o)
PStreamoperator>> (PStream &in, UCISpecification *&o)
PStreamoperator<< (PStream &out, const UCISpecification &o)
PStreamoperator>> (PStream &in, PP< UCISpecification > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UCISpecification > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConditionalDictionary &o)
PStreamoperator>> (PStream &in, ConditionalDictionary &o)
PStreamoperator>> (PStream &in, ConditionalDictionary *&o)
PStreamoperator<< (PStream &out, const ConditionalDictionary &o)
PStreamoperator>> (PStream &in, PP< ConditionalDictionary > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalDictionary > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Dictionary &o)
PStreamoperator>> (PStream &in, Dictionary &o)
PStreamoperator>> (PStream &in, Dictionary *&o)
PStreamoperator<< (PStream &out, const Dictionary &o)
PStreamoperator>> (PStream &in, PP< Dictionary > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Dictionary > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FileDictionary &o)
PStreamoperator>> (PStream &in, FileDictionary &o)
PStreamoperator>> (PStream &in, FileDictionary *&o)
PStreamoperator<< (PStream &out, const FileDictionary &o)
PStreamoperator>> (PStream &in, PP< FileDictionary > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FileDictionary > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VecDictionary &o)
PStreamoperator>> (PStream &in, VecDictionary &o)
PStreamoperator>> (PStream &in, VecDictionary *&o)
PStreamoperator<< (PStream &out, const VecDictionary &o)
PStreamoperator>> (PStream &in, PP< VecDictionary > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VecDictionary > *opt, PLearnDiff *diffs)
char * cstr (string &str)
 Takes a string and returns a char array of that string.
string getSynsetKey (SynsetPtr ssp)
 Returns a synset key from a SynsetPtr.
SynsetPtr getSynsetPtr (string synset_key)
 Returns a SynsetPtr from a synset key.
void extractSenses (string word, int wn_pos, string symbol_type, TVec< string > &senses, TVec< int > &tagcnts, TVec< TVec< string > > &ancestors, bool extract_ancestors=false)
 Extract senses for a word and a certain POS tag, as a certain symbol type.
void extractAncestors (TVec< SynsetPtr > anc, TVec< TVec< string > > &anc_str, string root_node=WN_ROOT_NODE)
 Extracts synset.
string stemWord (string word)
 Stems a word.
string stemWord (string word, int wn_pos)
 Stems a word, according to a POS.
void stemsOfWord (string word, int wn_pos, TVec< string > &stems)
 Lists the possible stemmed variation of a word.
void stemsOfWord (string word, TVec< string > &stems)
 Lists the possible stemmed variation of a word using its POS.
ObjecttoObjectPtr (const WordNetSenseDictionary &o)
PStreamoperator>> (PStream &in, WordNetSenseDictionary &o)
PStreamoperator>> (PStream &in, WordNetSenseDictionary *&o)
PStreamoperator<< (PStream &out, const WordNetSenseDictionary &o)
PStreamoperator>> (PStream &in, PP< WordNetSenseDictionary > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WordNetSenseDictionary > *opt, PLearnDiff *diffs)
void scores_to_winners (Mat scores, Mat &winners)
void color_luminance_to_rgb (int colornum, real luminance, real &r, real &g, real &b)
real color_luminance_to_rgbreal (int colornum, real luminance)
void color_luminance_to_rgbreal (Vec colornum, Vec luminance, Vec &rgbreal)
void transform_perclass_values_into_luminance (Vec classnums, const Vec &values, int ndiscretevals)
void regulargrid_x_y_rgbreal_to_bitmap (Mat &regulargrid_x_y_rgbreal, Mat &bm, real &xlow, real &xhigh, real &ylow, real &yhigh)
void regulargrid_x_y_outputs_to_bitmap (Mat regulargrid_x_y_outputs, bool output_margin, int ndiscretevals, Mat &bm, real &xlow, real &xhigh, real &ylow, real &yhigh)
void displayHistogram (Gnuplot &gp, Mat dataColumn, int n_bins, Vec *pbins, bool regular_bins, bool normalized, string extra_args)
Vec centerSubVec (Vec v, int n=16)
 returns a subvector made of the (max) n "central" values of v
string summarizedVecString (Vec v, int maxn=16, string format="%2.2g")
void displayVarGraph (const VarArray &outputs, bool display_values, real boxwidth, const char *the_filename, bool must_wait, VarArray display_only_these)
 VarGraph.
void OldDisplayVarGraph (const VarArray &outputs, bool display_values, real boxwidth, const char *the_filename, bool must_wait, VarArray display_only_these)
void tagVariables (VarArray vars, string tag)
void untagVariables (VarArray vars, string tag)
void displayFunction (Func f, bool display_values, bool display_differentiation, real boxwidth, const char *the_filename, bool must_wait)
Mat compute2dGridOutputs (PP< PLearner > learner, real min_x, real max_x, real min_y, real max_y, int length, int width, real singleoutput_threshold)
void displayPoints (GhostScript &gs, Mat data, real radius, bool color=false)
 this draws x and + with the given radius for all the points in data (supposed to have width 3: [x, y, classnum]
void displayDecisionSurface (GhostScript &gs, real destx, real desty, real destwidth, real destheight, PP< PLearner > learner, Mat trainset, Vec svindexes, Vec outlierindexes, int nextsvindex, real min_x, real max_x, real min_y, real max_y, real radius, int nx, int ny)
real rgb2real (real r, real g, real b)
void real2rgb (real colorval, real &r, real &g, real &b)
void matlabR11eigs (RowMapSparseMatrix< real > &A, Mat eigen_vectors, Vec eigen_values, string which_eigenvalues)
void matlabR11eigs (RowMapSparseMatrix< double > &A, Mat eigen_vectors, Vec eigen_values, string which_eigenvalues="LM")
ObjecttoObjectPtr (const CachedFeatureSet &o)
PStreamoperator>> (PStream &in, CachedFeatureSet &o)
PStreamoperator>> (PStream &in, CachedFeatureSet *&o)
PStreamoperator<< (PStream &out, const CachedFeatureSet &o)
PStreamoperator>> (PStream &in, PP< CachedFeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CachedFeatureSet > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (CachedFeatureSet) template<> class TypeTraits< CachedFeatureSet >
ObjecttoObjectPtr (const ConcatDisjointFeatureSet &o)
PStreamoperator>> (PStream &in, ConcatDisjointFeatureSet &o)
PStreamoperator>> (PStream &in, ConcatDisjointFeatureSet *&o)
PStreamoperator<< (PStream &out, const ConcatDisjointFeatureSet &o)
PStreamoperator>> (PStream &in, PP< ConcatDisjointFeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatDisjointFeatureSet > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ConcatDisjointFeatureSet) template<> class TypeTraits< ConcatDisjointFeatureSet >
ObjecttoObjectPtr (const FeatureSet &o)
PStreamoperator>> (PStream &in, FeatureSet &o)
PStreamoperator>> (PStream &in, FeatureSet *&o)
PStreamoperator<< (PStream &out, const FeatureSet &o)
PStreamoperator>> (PStream &in, PP< FeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FeatureSet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HashMapFeatureSet &o)
PStreamoperator>> (PStream &in, HashMapFeatureSet &o)
PStreamoperator>> (PStream &in, HashMapFeatureSet *&o)
PStreamoperator<< (PStream &out, const HashMapFeatureSet &o)
PStreamoperator>> (PStream &in, PP< HashMapFeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HashMapFeatureSet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IdentityFeatureSet &o)
PStreamoperator>> (PStream &in, IdentityFeatureSet &o)
PStreamoperator>> (PStream &in, IdentityFeatureSet *&o)
PStreamoperator<< (PStream &out, const IdentityFeatureSet &o)
PStreamoperator>> (PStream &in, PP< IdentityFeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IdentityFeatureSet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PythonFeatureSet &o)
PStreamoperator>> (PStream &in, PythonFeatureSet &o)
PStreamoperator>> (PStream &in, PythonFeatureSet *&o)
PStreamoperator<< (PStream &out, const PythonFeatureSet &o)
PStreamoperator>> (PStream &in, PP< PythonFeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PythonFeatureSet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const WordNetFeatureSet &o)
PStreamoperator>> (PStream &in, WordNetFeatureSet &o)
PStreamoperator>> (PStream &in, WordNetFeatureSet *&o)
PStreamoperator<< (PStream &out, const WordNetFeatureSet &o)
PStreamoperator>> (PStream &in, PP< WordNetFeatureSet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WordNetFeatureSet > *opt, PLearnDiff *diffs)
static PRStatus PR_GetFileInfo64_NoWildcards (const char *fn, PRFileInfo64 *info)
 Workaround for the fact that on Windows the PR_GetFileInfo function does a wildcard expansion of the filename before returning the file stats, which slows down (for example) lookups of the modification times for a number of files by a big factor on Windows.
int chdir (const PPath &path)
 Change current directory.
bool pathexists (const PPath &path)
 Returns true if the given path points to an existing regular file or directory.
bool isdir (const PPath &path)
 Returns true if the given path is an existing directory (or a symbolic link pointing to a directory).
bool isfile (const PPath &path)
 Returns true if the given path is an existing regular file (or a symbolic link pointing to a file).
bool isemptyFile (const PPath &path)
 Returns true if the given path is an existing regular file (or a symbolic link pointing to a file) and the size of the file is 0.
time_t mtime (const PPath &path)
 Returns the time of last modification of file (or 0 if file does not exist).
vector< string > lsdir (const PPath &dirpath)
vector< PPathlsdir_fullpath (const PPath &dirpath)
 Same as lsdir, except the returned entries are full paths.
bool mkdir_lowlevel (const PPath &dirname)
 Low-level cross-platform mkdir function, with the normal mkdir semantics.
bool force_mkdir (const PPath &dirname)
void force_mkdir_for_file (const PPath &filepath)
 Extracts the directory part of the filepath and calls force_mkdir.
bool force_rmdir (const PPath &dirname)
PRUint64 filesize64 (const PPath &filename)
 Returns the length of a file, measured in bytes, as a 64bit unsigned integer type defined by NSPR.
string loadFileAsString (const PPath &filepath)
 Returns the whole content of the file as a string.
void saveStringInFile (const PPath &filepath, const string &text)
 Writes the raw string into the given file.
void cp (const PPath &srcpath, const PPath &destpath)
 Calls system with cp -R to recursively copy source to destination.
bool rm (const PPath &file, bool fail_on_error_if_exist=false)
 Remove a file (return 'true' if removed sucessfully).
PRStatus mv (const PPath &source, const PPath &dest, bool fail_on_error=true)
 Calls system mv command to move the given source file to destination.
PRStatus mvforce (const PPath &source, const PPath &dest, bool fail_on_error=true)
 Same as mv, but will not prompt before overwriting.
void readWhileMatches (PStream &in, const string &s)
 Reads while the characters read exactly match those in s.
void skipRestOfLine (PStream &in)
 Skips everything until '
' (also consumes the '
').
void skipBlanksAndComments (PStream &in)
 Will skip all blanks (white space, newline and #-style comments).
void getNextNonBlankLine (PStream &in, string &line)
 Fills 'line' with the next non blank line (#-style comments are considered blank, and automatically stripped out of 'line').
int countNonBlankLinesOfFile (const PPath &filename)
 Will return the number of non-blank lines of file.
PPath newFilename (const PPath &directory="/tmp/", const string &prefix="", bool is_directory=false)
 Returns a temporary file (or directory) name suitable for a unique (one time) use.
PPath makeFileNameValid (const PPath &filename)
 Return a valid filename from a potentially invalid one.
void touch (const PPath &file)
 Trivial unix touch.
void addFileAndDateVariables (const PPath &filepath, map< string, string > &variables, const time_t &latest)
string readFileAndMacroProcess (const PPath &filepath, map< string, string > &variables, time_t &latest, bool change_dir)
string readAndMacroProcess (PStream &in, map< string, string > &variables, time_t &latest, bool skip_comments=true)
 Will return the text, macro processed, with each instance of ${varname} in the text that corresponds to a key in the given map replaced by its associated value.
void addReferenceToFile (const PPath &file)
 Increase by one the number of references to a file.
bool noReferenceToFile (const PPath &file)
 Return 'true' iff there is no reference to a file.
unsigned int nReferencesToFile (const PPath &file)
 Return the number of references to a file.
void removeReferenceToFile (const PPath &file)
 Decrease by one the number of references to a file.
long filesize (const PPath &filename)
 Returns the length of a file, measured in bytes, as a long.
int peekAfterSkipBlanks (PStream &in)
 Peeks the first char after removal of blanks.
int peekAfterSkipBlanksAndComments (PStream &in)
 Peeks the first char after removal of blanks and comments.
int getAfterSkipBlanks (PStream &in)
 Gets the first char after removal of blanks.
int getAfterSkipBlanksAndComments (PStream &in)
 Gets the first char after removal of blanks and comments.
string readFileAndMacroProcess (const PPath &filepath, map< string, string > &variables, bool change_dir=false)
string readFileAndMacroProcess (const PPath &filepath, time_t &latest)
string readFileAndMacroProcess (const PPath &filepath)
FilesIntStreamword_sequences2files_int_stream (const char *word_sequences_file)
template<class T >
void load (const PPath &filepath, T &x)
template<class T >
void save (const PPath &filepath, const T &x, PStream::mode_t io_formatting=PStream::plearn_ascii, bool implicit_storage=true)
 If necessary, missing directories along the filepath will be created A PStream is opened for saving with mode io_formatting and implicit_storage set as specified (see PStream.h for a.
void loadMat (const string &filename, TMat< float > &mat)
 Tries to guess the format...
void loadMat (const string &file_name, TMat< double > &mat)
void loadVec (const string &file_name, TVec< float > &vec)
void loadVec (const string &file_name, TVec< double > &vec)
void savePVec (const string &filename, const TVec< float > &vec)
 Native PLearn binary format (.pmat)
void savePVec (const string &filename, const TVec< double > &vec)
void loadPVec (const string &filename, TVec< float > &vec)
void loadPVec (const string &filename, TVec< double > &vec)
void savePMat (const string &filename, const TMat< float > &mat)
void savePMat (const string &filename, const TMat< double > &mat)
void savePMatFieldnames (const string &pmatfilename, const TVec< string > &fieldnames)
 Will save the fieldnames in corresponding pmatfilename.metadata/fieldnames (creating the metadata directory if necessary)
void loadPMat (const string &filename, TMat< float > &mat)
void loadPMat (const string &filename, TMat< double > &mat)
void saveGnuplot (const string &filename, const Vec &vec)
void saveGnuplot (const string &filename, const Mat &mat)
void loadGnuplot (const string &filename, Mat &mat)
 Format readable by gnuplot.
void matlabSave (const PPath &dir, const string &plot_title, const Vec &data, const Vec &add_col, const Vec &bounds, string legend, bool save_plot)
void matlabSave (const PPath &dir, const string &plot_title, const Vec &xValues, const Vec &yValues, const Vec &add_col, const Vec &bounds, string legend, bool save_plot)
void matlabSave (const PPath &dir, const string &plot_title, const Mat &data, const Vec &add_col, const Vec &bounds, TVec< string > legend=TVec< string >(), bool save_plot=true)
 Simply calls the coming matlabSave function with an empty xValues Vec. See below.
void matlabSave (const PPath &dir, const string &plot_title, const Vec &xValues, const Mat &yValues, const Vec &add_col, const Vec &bounds, TVec< string > legend, bool save_plot)
void saveAsciiWithoutSize (const string &filename, const Vec &vec)
void loadAsciiWithoutSize (const string &filename, const Vec &vec)
 Reads and writes an ascii file without the size header (assuming that the size(length() and width()) is set)
void saveAsciiWithoutSize (const string &filename, const Mat &mat)
void loadAsciiWithoutSize (const string &filename, const Mat &mat)
void saveSNMat (const string &filename, const Mat &mat)
Mat loadSNMat (const string &filename)
 SN Format.
void saveSNVec (const string &filename, const Vec &vec)
Vec loadSNVec (const string &filename)
Mat loadADMat (const string &filename)
 Native AD format.
Vec loadADVec (const string &filename)
static int compare_string_pointers (const void *ts1, const void *ts2)
Mat loadUCIMLDB (const string &filename, char ****to_symbols, int **to_n_symbols, TVec< int > *the_max_in_col, TVec< string > *header_columns)
Mat loadSTATLOG (const string &filename, char ****to_symbols, int **to_n_symbols)
void loadJPEGrgb (const string &jpeg_filename, Mat &rgbmat, int &row_size, int scale)
void parseSizeFromRemainingLines (const PPath &filename, PStream &in, bool &could_be_old_amat, int &length, int &width)
Mat makeMat (int length, int width, const string &values)
 convenience construction from string allows to write things such as Mat m = newMat(2,2, "1 2 3 4")
Vec makeVec (int length, const string &values)
template<class T >
void loadAscii (const PPath &filename, TMat< T > &mat, TVec< string > &fieldnames, int &inputsize, int &targetsize, int &weightsize, TVec< map< string, real > > *map_sr=0)
 WARNING: use only for float, double, and int types. Other type are not guaranteed to work.
template<class T >
void loadAscii (const PPath &filename, TMat< T > &mat, TVec< string > &fieldnames, TVec< map< string, real > > *map_sr=0)
template<class T >
void loadAscii (const PPath &filename, TMat< T > &mat)
template<class T >
void saveAscii (const string &filename, const TMat< T > &mat, const TVec< string > &fieldnames, int inputsize=-1, int targetsize=-1, int weightsize=-1, int extrasize=0)
template<class T >
void saveAscii (const string &filename, const TMat< T > &mat)
template<class T >
void saveAscii (const string &filename, const TVec< T > &vec)
 first number in file is length
template<class T >
void loadAscii (const PPath &filename, TVec< T > &vec)
template<class T >
void loadAscii (const PPath &filename, TMat< T > &mat, TVec< string > &fieldnames, int &inputsize, int &targetsize, int &weightsize, int &extrasize, TVec< map< string, real > > *map_sr)
template<class T >
void loadAsciiSingleBinaryDescriptor (const PPath &filename, TMat< T > &mat)
 Load an ASCII matrix whose format is: (entry_name, long_binary_dscriptor) with 'long_binary_dscriptor' being of the form '001100101011', each character being an entry of the matrix.
PStream openFile (const PPath &filepath_, PStream::mode_t io_formatting, const string &openmode, bool err_if_dont_exist, bool make_dirs)
 Given a filename, opens the file and returns a PStream that can be used to read and/or write to the file.
PStream openMPI (int peer_rank, PStream::mode_t io_formatting)
PStream openSocket (const string &hostname, int port, PStream::mode_t io_formatting, const int timeout)
 Opens a socket and returns an attached PStream.
PStream openString (string &s, PStream::mode_t io_formatting, const string &openmode)
 Returns a PStream attached to the given string.
PStream openString (const string &s, PStream::mode_t io_formatting)
PStream openUrl (const PPath &url, PStream::mode_t io_formatting)
 Given an url, open the url and return a PStream that can be used to read the content of the url.
void write_compr_mode_and_size (ostream &out, unsigned char mode, int size)
void read_compr_mode_and_size (istream &in, unsigned char &mode, int &size)
void binread_compressed (istream &in, double *data, int l)
void binwrite_compressed (ostream &out, const double *data, int l)
 version for compressed array (efficient for sparse data, and small integer values) (format is detailed in .cc, see write_compr_mode_and_size function in general.cc)
void binread_compressed (istream &in, float *data, int l)
void binwrite_compressed (ostream &out, const float *data, int l)
void read_compr_mode_and_size (FILE *in, unsigned char &mode, int &size)
void binread_compressed (FILE *in, double *data, int l)
void binwrite_compressed (FILE *out, const double *data, int l)
void binread_compressed (FILE *in, float *data, int l)
void binwrite_compressed (FILE *out, const float *data, int l)
void write_compr_mode_and_size_ptr (char *&out, unsigned char mode, int size)
void read_compr_mode_and_size_ptr (char *&in, unsigned char &mode, int &size)
 DEPRECATED DO NOT USE! compressed vec to and from memory.
void uncompress_vec (char *comprbuf, double *data, int l, bool double_stored_as_float)
void compress_vec (char *comprbuf, const double *data, int l, bool double_stored_as_float)
size_t new_read_compressed (FILE *in, real *vec, int l, bool swap_endians=false)
 Reads the l doubles in the new compressed formtat from in Returns the number of bytes read.
unsigned char new_get_compr_data_type (double x, double tolerance)
unsigned char new_get_compr_data_type (float x)
size_t new_write_mode_and_size (FILE *out, bool insert_zeroes, unsigned int N, unsigned char data_type)
 returns number of bytes written
size_t new_write_raw_data_as (FILE *out, real *vec, int l, unsigned char data_type)
size_t new_write_compressed (FILE *out, real *vec, int l, double tolerance=1e-6, bool swap_endians=false)
 Writes the l doubles in new compressed format to out.
template<class Key , class Value >
ostream & operator<< (ostream &out, const map< Key, Value > &m)
template<class T >
void binwrite (ostream &out, const T *x, int n)
 general purpose (but less efficient) version for pointers to things that have a binwrite/binread function
template<class T >
void binread (istream &in, T *x, int n)
template<class A , class B >
void binwrite (ostream &out, const pair< A, B > x)
template<class A , class B >
void binread (istream &in, pair< A, B > &x)
void binwrite (ostream &out, char x)
 binwrite and binread for a few basic types
void binread (istream &in, char &x)
void binwrite (ostream &out, unsigned char x)
void binread (istream &in, unsigned char &x)
void binwrite (ostream &out, int x)
void binread (istream &in, int &x)
void binwrite (ostream &out, unsigned int x)
void binread (istream &in, unsigned int &x)
void binwrite (ostream &out, short x)
void binread (istream &in, short &x)
void binwrite (ostream &out, unsigned short x)
void binread (istream &in, unsigned short &x)
void binwrite (ostream &out, bool x)
 note that bool are saved as unsigned short
void binread (istream &in, bool &x)
void binwrite (ostream &out, float x)
void binread (istream &in, float &x)
void binwrite (ostream &out, double x)
void binread (istream &in, double &x)
void binwrite_double (ostream &out, double x)
void binread_double (istream &in, double &x)
void binwrite_double (ostream &out, float x)
void binread_double (istream &in, float &x)
void binwrite (ostream &out, const int *x, int n)
 multi-element versions, giving address and number of elements
void binread (istream &in, int *x, int n)
void binwrite (ostream &out, const unsigned int *x, int n)
void binread (istream &in, unsigned int *x, int n)
void binwrite (ostream &out, const short *x, int n)
void binread (istream &in, short *x, int n)
void binwrite (ostream &out, const unsigned short *x, int n)
void binread (istream &in, unsigned short *x, int n)
void binwrite (ostream &out, const float *x, int n)
void binread (istream &in, float *x, int n)
void binwrite (ostream &out, const double *x, int n)
void binread (istream &in, double *x, int n)
void binwrite_double (ostream &out, const double *x, int n)
void binread_double (istream &in, double *x, int n)
void binwrite_double (ostream &out, const float *x, int n)
void binread_double (istream &in, float *x, int n)
template<class T >
void binwrite (FILE *out, const T *x, int n)
 general purpose (but less efficient) version for pointers to things that have a binwrite/binread function
template<class T >
void binread (FILE *in, T *x, int n)
template<class A , class B >
void binwrite (FILE *out, const pair< A, B > x)
template<class A , class B >
void binread (FILE *in, pair< A, B > &x)
void binwrite (FILE *out, char x)
 binwrite and binread for a few basic types
void binread (FILE *in, char &x)
void binwrite (FILE *out, unsigned char x)
void binread (FILE *in, unsigned char &x)
void binwrite (FILE *out, int x)
void binread (FILE *in, int &x)
void binwrite (FILE *out, unsigned int x)
void binread (FILE *in, unsigned int &x)
void binwrite (FILE *out, short x)
void binread (FILE *in, short &x)
void binwrite (FILE *out, unsigned short x)
void binread (FILE *in, unsigned short &x)
void binwrite (FILE *out, bool x)
 note that bool are saved as unsigned short
void binread (FILE *in, bool &x)
void binwrite (FILE *out, float x)
void binread (FILE *in, float &x)
void binwrite (FILE *out, double x)
void binread (FILE *in, double &x)
void binwrite_double (FILE *out, double x)
void binread_double (FILE *in, double &x)
void binwrite_double (FILE *out, float x)
void binread_double (FILE *in, float &x)
void binwrite (FILE *out, const int *x, int n)
 multi-element versions, giving address and number of elements
void binread (FILE *in, int *x, int n)
void binwrite (FILE *out, const unsigned int *x, int n)
void binread (FILE *in, unsigned int *x, int n)
void binwrite (FILE *out, const short *x, int n)
void binread (FILE *in, short *x, int n)
void binwrite (FILE *out, const unsigned short *x, int n)
void binread (FILE *in, unsigned short *x, int n)
void binwrite (FILE *out, const float *x, int n)
void binread (FILE *in, float *x, int n)
void binwrite (FILE *out, const double *x, int n)
void binread (FILE *in, double *x, int n)
void binwrite_double (FILE *out, const double *x, int n)
void binread_double (FILE *in, double *x, int n)
void binwrite_double (FILE *out, const float *x, int n)
void binread_double (FILE *in, float *x, int n)
void writeHeader (ostream &out, const string &classname, int version=0)
 These functions are there to help you write and read object headers and footers for the persistance mechanism.
void writeFooter (ostream &out, const string &classname)
 writes "</ClassName>\n"
int readHeader (PStream &in, const string &classname)
 consumes "<ClassName:version>\n and returns version"
void readFooter (PStream &in, const string &classname)
 consumes "</ClassName>\n"
void writeFieldName (ostream &out, const string &fieldname)
 writes "fieldname: "
bool readFieldName (istream &in, const string &fieldname, bool force=false)
 consumes "fieldname: " if possible, and return true if it does however if force=true and fieldname is not found then call error.
void fwrite_int (FILE *f, const int *ptr, int n, bool is_file_bigendian=true)
 Writes binary data to the file in the specified representation (little or big endian) regardeless of the endianness used on the current architecture.
void fwrite_float (FILE *f, const float *ptr, int n, bool is_file_bigendian)
void fwrite_float (FILE *f, const double *ptr, int n, bool is_file_bigendian=true)
 writes double array to float file
void fwrite_double (FILE *f, const double *ptr, int n, bool is_file_bigendian)
void fwrite_double (FILE *f, const float *ptr, int n, bool is_file_bigendian=true)
 writes float array to double file
void fread_int (FILE *f, int *ptr, int n, bool is_file_bigendian=true)
 Reads binary data from a file assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness on the current architecture.
void fread_float (FILE *f, float *ptr, int n, bool is_file_bigendian)
void fread_float (FILE *f, double *ptr, int n, bool is_file_bigendian=true)
 reads disk floats into double array
void fread_double (FILE *f, double *ptr, int n, bool is_file_bigendian)
void fread_double (FILE *f, float *ptr, int n, bool is_file_bigendian=true)
 reads disk doubles into float array
void fread_short (FILE *f, unsigned short *ptr, int n, bool is_file_bigendian)
void write_int (ostream &out, const int *ptr, int n, bool is_file_bigendian)
 Writes binary data to the file in the specified representation (little or big endian) regardeless of the endianness used on the current architecture.
void write_short (ostream &out, const short *ptr, int n, bool is_file_bigendian)
void write_double (ostream &out, const double *ptr, int n, bool is_file_bigendian)
void write_float (ostream &out, const float *ptr, int n, bool is_file_bigendian)
void read_int (istream &in, int *ptr, int n, bool is_file_bigendian)
 Reads binary data from a file assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness on the current architecture.
void read_short (istream &in, short *ptr, int n, bool is_file_bigendian)
void read_float (istream &in, float *ptr, int n, bool is_file_bigendian)
void read_double (istream &in, double *ptr, int n, bool is_file_bigendian)
void reverse_uint (const unsigned int *ptr, int n)
 Swap bytes between Big-Endian and Little-Endian representation in memory NOTE: these calls are deprecated, use directly endianswap from base/byte_order.h.
void reverse_int (const int *ptr, int n)
void reverse_float (const float *ptr, int n)
void reverse_double (const double *ptr, int n)
void reverse_ushort (const unsigned short *ptr, int n)
void reverse_short (const short *ptr, int n)
int fread_int (FILE *f, bool is_file_bigendian=true)
float fread_float (FILE *f, bool is_file_bigendian=true)
double fread_double (FILE *f, bool is_file_bigendian=true)
void fwrite_int (FILE *f, int value, bool is_file_bigendian=true)
 The following calls write a single value to the file in the specified representation, regardeless of the endianness on the current architecture.
void fwrite_float (FILE *f, float value, bool is_file_bigendian=true)
void fwrite_double (FILE *f, double value, bool is_file_bigendian=true)
void write_uint (ostream &out, const unsigned int *ptr, int n, bool is_file_bigendian)
void write_ushort (ostream &out, const unsigned short *ptr, int n, bool is_file_bigendian)
void write_bool (ostream &out, const bool *ptr, int n, bool is_file_bigendian)
void write_int (ostream &out, int value, bool is_file_bigendian=true)
 The following calls write a single value to the file in the specified representation, regardeless of the endianness on the current architecture.
void write_short (ostream &out, short value, bool is_file_bigendian=true)
void write_float (ostream &out, float value, bool is_file_bigendian=true)
void write_double (ostream &out, double value, bool is_file_bigendian=true)
void write_uint (ostream &out, unsigned int value, bool is_file_bigendian=true)
void write_ushort (ostream &out, unsigned short value, bool is_file_bigendian=true)
void write_sbyte (ostream &out, signed char x)
void write_ubyte (ostream &out, unsigned char x)
void read_uint (istream &in, unsigned int *ptr, int n, bool is_file_bigendian)
void read_ushort (istream &in, unsigned short *ptr, int n, bool is_file_bigendian)
void read_bool (istream &in, bool *ptr, int n, bool is_file_bigendian)
int read_int (istream &in, bool is_file_bigendian=true)
short read_short (istream &in, bool is_file_bigendian=true)
float read_float (istream &in, bool is_file_bigendian=true)
double read_double (istream &in, bool is_file_bigendian=true)
unsigned int read_uint (istream &in, bool is_file_bigendian=true)
unsigned short read_ushort (istream &in, bool is_file_bigendian=true)
signed char read_sbyte (istream &in)
unsigned char read_ubyte (istream &in)
void writeNewline (ostream &out)
 Writes a single newline character.
void readNewline (istream &in)
 Reads next character and issues an error if it's not a newline.
template<class T >
void writeField (ostream &out, const string &fieldname, const T &x)
 generic field writing and reading
template<class T >
void readField (istream &in, const string &fieldname, T &x)
template<class T >
void binwriteField (ostream &out, const string &fieldname, const T &x)
 generic field BINARY writing and reading
template<class T >
void binreadField (istream &in, const string &fieldname, T &x)
template<class T >
void binwriteField_double (ostream &out, const string &fieldname, const T &x)
template<class T >
void binreadField_double (istream &in, const string &fieldname, T &x)
template<class T >
void readField (istream &in, const string &fieldname, T &x, T default_value)
 readField with a default value when the field is not found
PStreamplsep (PStream &)
 If the "PL_LOG_MODULE_NAME" variable is defined before pl_log.h is included, then *_MODULE_LOG are defined to provide module-specified logging for that module.
PStreamoperator<< (PStream &, PL_Log::Heading)
 Actually draw the heading.
PL_Log::Heading plhead (string s)
 Manipulator that displays a nice heading.
void PR_Read_int (PRFileDesc *f, int *ptr, int n, bool is_file_bigendian)
void PR_Read_float (PRFileDesc *f, float *ptr, int n, bool is_file_bigendian)
void PR_Read_float (PRFileDesc *f, double *ptr, int n, bool is_file_bigendian)
void PR_Read_double (PRFileDesc *f, double *ptr, int n, bool is_file_bigendian)
void PR_Read_double (PRFileDesc *f, float *ptr, int n, bool is_file_bigendian)
void PR_Read_short (PRFileDesc *f, unsigned short *ptr, int n, bool is_file_bigendian)
void PR_Write_int (PRFileDesc *f, const int *ptr, int n, bool is_file_bigendian)
void PR_Write_float (PRFileDesc *f, const float *ptr, int n, bool is_file_bigendian)
void PR_Write_float (PRFileDesc *f, const double *ptr, int n, bool is_file_bigendian)
void PR_Write_double (PRFileDesc *f, const double *ptr, int n, bool is_file_bigendian)
void PR_Write_double (PRFileDesc *f, const float *ptr, int n, bool is_file_bigendian)
int PR_Read_int (PRFileDesc *f, bool is_file_bigendian=true)
float PR_Read_float (PRFileDesc *f, bool is_file_bigendian=true)
double PR_Read_double (PRFileDesc *f, bool is_file_bigendian=true)
void PR_Write_int (PRFileDesc *f, int value, bool is_file_bigendian=true)
 The following calls write a single value to the file in the specified representation, regardeless of the endianness on the current architecture.
void PR_Write_float (PRFileDesc *f, float value, bool is_file_bigendian=true)
void PR_Write_double (PRFileDesc *f, double value, bool is_file_bigendian=true)
bool startsWith (const string &str, const char &c)
bool endsWith (const string &str, const char &c)
bool startsWith (const string &str, const string &s)
bool endsWith (const string &str, const string &s)
PStreamoperator<< (PStream &out, const PPath &path)
 Serialization and output of a PPath.
PStreamoperator>> (PStream &in, PPath &path)
map< string, PPath > & metaprotocol_to_metapath ()
PStreamget_pnull ()
PStreamget_pin ()
PStreamget_pout ()
PStreamget_pio ()
PStreamget_perr ()
PStreamflush (PStream &out)
PStreamendl (PStream &out)
PStreamws (PStream &in)
string pgetline (PStream &in)
 returns the next line read from the stream, after removing any trailing '\r' and/or '\n'
void binread_ (PStream &in, bool *x, unsigned int n, unsigned char typecode)
template<class T >
PStreamoperator>> (PStream &in, T *&x)
template<class T >
PStreamoperator<< (PStream &out, T const *const &x)
template<class T >
PStreamoperator>> (PStream &in, const T *&x)
template<class T >
PStreamoperator>> (PStream &in, PP< T > &o)
template<class T >
PStreamoperator<< (PStream &out, const PP< T > &o)
template<class T >
PStreamoperator<< (PStream &out, T *&ptr)
template<class A , class B >
PStreamoperator<< (PStream &out, const pair< A, B > &x)
template<typename S , typename T >
PStreamoperator>> (PStream &in, pair< S, T > &x)
template<class MapT >
void writeMap (PStream &out, const MapT &m)
template<class MapT >
void readMap (PStream &in, MapT &m)
PStreamoperator>> (PStream &in, CopiesMap &)
PStreamoperator<< (PStream &out, const CopiesMap &)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator<< (PStream &out, const map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator>> (PStream &in, map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator<< (PStream &out, const multimap< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator>> (PStream &in, multimap< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator<< (PStream &out, const hash_map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator>> (PStream &in, hash_map< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator<< (PStream &out, const hash_multimap< Key, Value, Compare, Alloc > &m)
template<class Key , class Value , class Compare , class Alloc >
PStreamoperator>> (PStream &in, hash_multimap< Key, Value, Compare, Alloc > &m)
template<class Iterator >
void binwrite_ (PStream &out, Iterator it, unsigned int n)
 Serialization of sequences.
void binwrite_ (PStream &out, const bool *x, unsigned int n)
void binwrite_ (PStream &out, const char *x, unsigned int n)
void binwrite_ (PStream &out, char *x, unsigned int n)
void binwrite_ (PStream &out, const signed char *x, unsigned int n)
void binwrite_ (PStream &out, signed char *x, unsigned int n)
void binwrite_ (PStream &out, const unsigned char *x, unsigned int n)
void binwrite_ (PStream &out, unsigned char *x, unsigned int n)
void binwrite_ (PStream &out, const short *x, unsigned int n)
void binwrite_ (PStream &out, short *x, unsigned int n)
void binwrite_ (PStream &out, const unsigned short *x, unsigned int n)
void binwrite_ (PStream &out, unsigned short *x, unsigned int n)
void binwrite_ (PStream &out, const int *x, unsigned int n)
void binwrite_ (PStream &out, int *x, unsigned int n)
void binwrite_ (PStream &out, const unsigned int *x, unsigned int n)
void binwrite_ (PStream &out, unsigned int *x, unsigned int n)
void binwrite_ (PStream &out, const long *x, unsigned int n)
void binwrite_ (PStream &out, long *x, unsigned int n)
void binwrite_ (PStream &out, const unsigned long *x, unsigned int n)
void binwrite_ (PStream &out, unsigned long *x, unsigned int n)
void binwrite_ (PStream &out, const long long *x, unsigned int n)
void binwrite_ (PStream &out, long long *x, unsigned int n)
void binwrite_ (PStream &out, const unsigned long long *x, unsigned int n)
void binwrite_ (PStream &out, unsigned long long *x, unsigned int n)
void binwrite_ (PStream &out, const float *x, unsigned int n)
void binwrite_ (PStream &out, float *x, unsigned int n)
void binwrite_ (PStream &out, const double *x, unsigned int n)
void binwrite_ (PStream &out, double *x, unsigned int n)
template<class Iterator >
void binread_ (PStream &in, Iterator it, unsigned int n, unsigned char typecode)
template<class I , class J >
void binread_as (PStream &in, J *x, unsigned int n, bool inverted_byte_order)
 Auxiliary function that reads n elements of type I, optionally swaps their endianness, then converts them into J, and puts them in a J array.
void binread_ (PStream &in, char *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, signed char *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, unsigned char *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, short *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, unsigned short *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, int *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, unsigned int *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, long *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, unsigned long *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, long long *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, unsigned long long *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, float *x, unsigned int n, unsigned char typecode)
void binread_ (PStream &in, double *x, unsigned int n, unsigned char typecode)
template<class SequenceType >
void writeSequence (PStream &out, const SequenceType &seq)
template<class SequenceType >
void readSequence (PStream &in, SequenceType &seq)
 Reads in a sequence type from a PStream.
template<class T >
void write (ostream &out_, const T &o)
template<class T >
void read (istream &in_, T &o)
template<class T >
void read (const string &stringval, T &x)
template<class T >
PStreamoperator>> (PStream &in, vector< T > &v)
template<class T >
PStreamoperator<< (PStream &out, const vector< T > &v)
template<class SetT >
void writeSet (PStream &out, const SetT &s)
template<class SetT >
void readSet (PStream &in, SetT &s)
template<class T >
PStreamoperator>> (PStream &in, set< T > &v)
template<class T >
PStreamoperator<< (PStream &out, const set< T > &v)
template<class PriorityQueueT >
void writePriorityQueue (PStream &out, const PriorityQueueT &pq)
template<class PriorityQueueT >
void readPriorityQueue (PStream &in, PriorityQueueT &pq)
template<class T >
PStreamoperator>> (PStream &in, priority_queue< T > &v)
template<class T >
PStreamoperator<< (PStream &out, const priority_queue< T > &v)
const string & wordseparators ()
 List of characters considered to mark a separation between "words"; This is a fairly restricted list, meaning that many things can be part of a "word" in this sense (for ex: "this-is_a+single@wor'd"), this is to insure a smooth transition for the new setOption, which calls readOptionVal ...
const string & raw_wordseparators ()
 Same as wordseparators, but even less restricted, used in PStream::raw_ascii mode.
ObjectsmartLoadObject (PPath filepath, const vector< string > &args, time_t &return_date)
 Reads an object from the given filepath, performaing adequate preprocessing according to file extension.
ObjecttoObjectPtr (const PyPLearnScript &o)
PStreamoperator>> (PStream &in, PyPLearnScript &o)
PStreamoperator>> (PStream &in, PyPLearnScript *&o)
PStreamoperator<< (PStream &out, const PyPLearnScript &o)
PStreamoperator>> (PStream &in, PP< PyPLearnScript > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PyPLearnScript > *opt, PLearnDiff *diffs)
ObjectsmartLoadObject (PPath filepath, const vector< string > &args)
 Same as smartLoadObject(PPath, vector<string>, time_t) but passing an empty return_date.
ObjectsmartLoadObject (PPath filepath, time_t &return_date)
 Same as smartLoadObject(PPath, vector<string>, time_t) but passing an empty vector<string>
ObjectsmartLoadObject (PPath filepath)
 Same as smartLoadObject(PPath, vector<string>, time_t) but passing an empty vector<string> and an empty return_date.
ObjecttoObjectPtr (const RPPath &o)
PStreamoperator>> (PStream &in, RPPath &o)
PStreamoperator>> (PStream &in, RPPath *&o)
PStreamoperator<< (PStream &out, const RPPath &o)
PStreamoperator>> (PStream &in, PP< RPPath > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RPPath > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PLLogTest &o)
PStreamoperator>> (PStream &in, PLLogTest &o)
PStreamoperator>> (PStream &in, PLLogTest *&o)
PStreamoperator<< (PStream &out, const PLLogTest &o)
PStreamoperator>> (PStream &in, PP< PLLogTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLLogTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PLLogTest) template<> class TypeTraits< PLLogTest >
void split_behavior (const string &test, const string &dos, const string &posix)
string boolstr (bool b)
void backslashes ()
void absolute_path ()
void someAsserts ()
void canonical ()
 void relativePathAsserts(); { PPath home_ = PPath::home(); PPath cwd = PPath::getcwd();
void unitTest (const string &p)
ObjecttoObjectPtr (const PPathTest &o)
PStreamoperator>> (PStream &in, PPathTest &o)
PStreamoperator>> (PStream &in, PPathTest *&o)
PStreamoperator<< (PStream &out, const PPathTest &o)
PStreamoperator>> (PStream &in, PP< PPathTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PPathTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PPathTest) template<> class TypeTraits< PPathTest >
void test (const char *test_name, const std::string actual, const std::string expected)
 Complains if the actual and expected string parameters are not equal.
static std::string char_string (int c)
 Returns a string with the character, or "EOF" for the end of file value.
static void test (const char *test_name, const int actual, const int expected)
 Complains if the actual and expected char parameters are not equal.
void test_read ()
void test_write ()
void test_write_unbuffered ()
void test_negchar ()
ObjecttoObjectPtr (const PStreamBufTest &o)
PStreamoperator>> (PStream &in, PStreamBufTest &o)
PStreamoperator>> (PStream &in, PStreamBufTest *&o)
PStreamoperator<< (PStream &out, const PStreamBufTest &o)
PStreamoperator>> (PStream &in, PP< PStreamBufTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PStreamBufTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PStreamBufTest) template<> class TypeTraits< PStreamBufTest >
ObjecttoObjectPtr (const TupleTest &o)
PStreamoperator>> (PStream &in, TupleTest &o)
PStreamoperator>> (PStream &in, TupleTest *&o)
PStreamoperator<< (PStream &out, const TupleTest &o)
PStreamoperator>> (PStream &in, PP< TupleTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TupleTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (TupleTest) template<> class TypeTraits< TupleTest >
template<class T , unsigned N, class TTrait >
ostream & operator<< (ostream &os, const TinyVector< T, N, TTrait > &tiny_vec)
template<class T , unsigned N, class TTrait >
PStreamoperator<< (PStream &os, const TinyVector< T, N, TTrait > &tiny_vec)
template<class T , unsigned N, class TTrait >
PStreamoperator>> (PStream &is, TinyVector< T, N, TTrait > &tiny_vec)
const char * eNumericTypeNames (int a)
 converts a code in corresponding string
bool containsChar (const char *s, const char *symbols)
 true if string s contains any one of the characters in symbols.
char * stringPos (const char *s, const char *strings[])
bool looksNumeric (const char *s)
 tells wether this string looks like a numeric entity
bool elementOf (const char *s, const char t)
void compactRepresentationTranslate (char *t)
void compactRepresentationShrinkNum (char *t)
void compactRepresentationRangesAndOrdinals (char *t)
void compactRepresentation (char *t)
 gives a (intermediate) code for a numeric string (starting with #)
int numericType (const char *word)
 assigns a code to a "word"
ObjecttoObjectPtr (const AdditiveNormalizationKernel &o)
PStreamoperator>> (PStream &in, AdditiveNormalizationKernel &o)
PStreamoperator>> (PStream &in, AdditiveNormalizationKernel *&o)
PStreamoperator<< (PStream &out, const AdditiveNormalizationKernel &o)
PStreamoperator>> (PStream &in, PP< AdditiveNormalizationKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AdditiveNormalizationKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ARDBaseKernel &o)
PStreamoperator>> (PStream &in, ARDBaseKernel &o)
PStreamoperator>> (PStream &in, ARDBaseKernel *&o)
PStreamoperator<< (PStream &out, const ARDBaseKernel &o)
PStreamoperator>> (PStream &in, PP< ARDBaseKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ARDBaseKernel > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ARDBaseKernel) template<> class TypeTraits< ARDBaseKernel >
ObjecttoObjectPtr (const BetaKernel &o)
PStreamoperator>> (PStream &in, BetaKernel &o)
PStreamoperator>> (PStream &in, BetaKernel *&o)
PStreamoperator<< (PStream &out, const BetaKernel &o)
PStreamoperator>> (PStream &in, PP< BetaKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BetaKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ClassDistanceProportionCostFunction &o)
PStreamoperator>> (PStream &in, ClassDistanceProportionCostFunction &o)
PStreamoperator>> (PStream &in, ClassDistanceProportionCostFunction *&o)
PStreamoperator<< (PStream &out, const ClassDistanceProportionCostFunction &o)
PStreamoperator>> (PStream &in, PP< ClassDistanceProportionCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassDistanceProportionCostFunction > *opt, PLearnDiff *diffs)
CostFunc class_distance_proportion ()
 if outputs are neg distances to each class: dist_to_correct_class/(dist_to_correct_class+dist_to_closest_other_class)
ObjecttoObjectPtr (const ClassErrorCostFunction &o)
PStreamoperator>> (PStream &in, ClassErrorCostFunction &o)
PStreamoperator>> (PStream &in, ClassErrorCostFunction *&o)
PStreamoperator<< (PStream &out, const ClassErrorCostFunction &o)
PStreamoperator>> (PStream &in, PP< ClassErrorCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassErrorCostFunction > *opt, PLearnDiff *diffs)
CostFunc class_error (bool output_is_classnum=false, bool ignore_missing_values=true)
ObjecttoObjectPtr (const ClassMarginCostFunction &o)
PStreamoperator>> (PStream &in, ClassMarginCostFunction &o)
PStreamoperator>> (PStream &in, ClassMarginCostFunction *&o)
PStreamoperator<< (PStream &out, const ClassMarginCostFunction &o)
PStreamoperator>> (PStream &in, PP< ClassMarginCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassMarginCostFunction > *opt, PLearnDiff *diffs)
CostFunc class_margin (bool binary_target_is_01=false, bool output_is_positive=false)
 difference between correct class score and max of other class' scores
ObjecttoObjectPtr (const CompactVMatrixGaussianKernel &o)
PStreamoperator>> (PStream &in, CompactVMatrixGaussianKernel &o)
PStreamoperator>> (PStream &in, CompactVMatrixGaussianKernel *&o)
PStreamoperator<< (PStream &out, const CompactVMatrixGaussianKernel &o)
PStreamoperator>> (PStream &in, PP< CompactVMatrixGaussianKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CompactVMatrixGaussianKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CompactVMatrixPolynomialKernel &o)
PStreamoperator>> (PStream &in, CompactVMatrixPolynomialKernel &o)
PStreamoperator>> (PStream &in, CompactVMatrixPolynomialKernel *&o)
PStreamoperator<< (PStream &out, const CompactVMatrixPolynomialKernel &o)
PStreamoperator>> (PStream &in, PP< CompactVMatrixPolynomialKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CompactVMatrixPolynomialKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConvexBasisKernel &o)
PStreamoperator>> (PStream &in, ConvexBasisKernel &o)
PStreamoperator>> (PStream &in, ConvexBasisKernel *&o)
PStreamoperator<< (PStream &out, const ConvexBasisKernel &o)
PStreamoperator>> (PStream &in, PP< ConvexBasisKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConvexBasisKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CorrelationKernel &o)
PStreamoperator>> (PStream &in, CorrelationKernel &o)
PStreamoperator>> (PStream &in, CorrelationKernel *&o)
PStreamoperator<< (PStream &out, const CorrelationKernel &o)
PStreamoperator>> (PStream &in, PP< CorrelationKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CorrelationKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CosKernel &o)
PStreamoperator>> (PStream &in, CosKernel &o)
PStreamoperator>> (PStream &in, CosKernel *&o)
PStreamoperator<< (PStream &out, const CosKernel &o)
PStreamoperator>> (PStream &in, PP< CosKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CosKernel > *opt, PLearnDiff *diffs)
CostFunc output_minus_target (int singleoutputindex)
ObjecttoObjectPtr (const DifferenceKernel &o)
PStreamoperator>> (PStream &in, DifferenceKernel &o)
PStreamoperator>> (PStream &in, DifferenceKernel *&o)
PStreamoperator<< (PStream &out, const DifferenceKernel &o)
PStreamoperator>> (PStream &in, PP< DifferenceKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DifferenceKernel > *opt, PLearnDiff *diffs)
CostFunc directnegative_costfunc ()
CostFunc absolute_deviation (int singleoutputindex)
ObjecttoObjectPtr (const DistanceKernel &o)
PStreamoperator>> (PStream &in, DistanceKernel &o)
PStreamoperator>> (PStream &in, DistanceKernel *&o)
PStreamoperator<< (PStream &out, const DistanceKernel &o)
PStreamoperator>> (PStream &in, PP< DistanceKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DistanceKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DivisiveNormalizationKernel &o)
PStreamoperator>> (PStream &in, DivisiveNormalizationKernel &o)
PStreamoperator>> (PStream &in, DivisiveNormalizationKernel *&o)
PStreamoperator<< (PStream &out, const DivisiveNormalizationKernel &o)
PStreamoperator>> (PStream &in, PP< DivisiveNormalizationKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DivisiveNormalizationKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DotProductKernel &o)
PStreamoperator>> (PStream &in, DotProductKernel &o)
PStreamoperator>> (PStream &in, DotProductKernel *&o)
PStreamoperator<< (PStream &out, const DotProductKernel &o)
PStreamoperator>> (PStream &in, PP< DotProductKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DotProductKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DTWKernel &o)
PStreamoperator>> (PStream &in, DTWKernel &o)
PStreamoperator>> (PStream &in, DTWKernel *&o)
PStreamoperator<< (PStream &out, const DTWKernel &o)
PStreamoperator>> (PStream &in, PP< DTWKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DTWKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EpanechnikovKernel &o)
PStreamoperator>> (PStream &in, EpanechnikovKernel &o)
PStreamoperator>> (PStream &in, EpanechnikovKernel *&o)
PStreamoperator<< (PStream &out, const EpanechnikovKernel &o)
PStreamoperator>> (PStream &in, PP< EpanechnikovKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EpanechnikovKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PartsDistanceKernel &o)
PStreamoperator>> (PStream &in, PartsDistanceKernel &o)
PStreamoperator>> (PStream &in, PartsDistanceKernel *&o)
PStreamoperator<< (PStream &out, const PartsDistanceKernel &o)
PStreamoperator>> (PStream &in, PP< PartsDistanceKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PartsDistanceKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianDensityKernel &o)
PStreamoperator>> (PStream &in, GaussianDensityKernel &o)
PStreamoperator>> (PStream &in, GaussianDensityKernel *&o)
PStreamoperator<< (PStream &out, const GaussianDensityKernel &o)
PStreamoperator>> (PStream &in, PP< GaussianDensityKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianDensityKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianKernel &o)
PStreamoperator>> (PStream &in, GaussianKernel &o)
PStreamoperator>> (PStream &in, GaussianKernel *&o)
PStreamoperator<< (PStream &out, const GaussianKernel &o)
PStreamoperator>> (PStream &in, PP< GaussianKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GeneralizedDistanceRBFKernel &o)
PStreamoperator>> (PStream &in, GeneralizedDistanceRBFKernel &o)
PStreamoperator>> (PStream &in, GeneralizedDistanceRBFKernel *&o)
PStreamoperator<< (PStream &out, const GeneralizedDistanceRBFKernel &o)
PStreamoperator>> (PStream &in, PP< GeneralizedDistanceRBFKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GeneralizedDistanceRBFKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GeodesicDistanceKernel &o)
PStreamoperator>> (PStream &in, GeodesicDistanceKernel &o)
PStreamoperator>> (PStream &in, GeodesicDistanceKernel *&o)
PStreamoperator<< (PStream &out, const GeodesicDistanceKernel &o)
PStreamoperator>> (PStream &in, PP< GeodesicDistanceKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GeodesicDistanceKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IIDNoiseKernel &o)
PStreamoperator>> (PStream &in, IIDNoiseKernel &o)
PStreamoperator>> (PStream &in, IIDNoiseKernel *&o)
PStreamoperator<< (PStream &out, const IIDNoiseKernel &o)
PStreamoperator>> (PStream &in, PP< IIDNoiseKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IIDNoiseKernel > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (IIDNoiseKernel) template<> class TypeTraits< IIDNoiseKernel >
void evaluateKernel (Ker ker, VMat vm, int v1_startcol, int v1_ncols, const Vec &v2, const Vec &result, int startrow, int nrows)
real evaluateKernelSum (Ker ker, VMat vm, int v1_startcol, int v1_ncols, const Vec &v2, int startrow=0, int nrows=-1, int ignore_this_row=-1)
 returns sum_i [ ker( m(i).subVec(v1_startcol,v1_ncols) , v2) ]
real evaluateKernelWeightedTargetSum (Ker ker, VMat vm, int v1_startcol, int v1_ncols, const Vec &v2, int t_startcol, int t_ncols, Vec &targetsum, int startrow=0, int nrows=-1, int ignore_this_row=-1)
 targetsum := sum_i [ m(i).subVec(t_startcol,t_ncols) * ker( m(i).subVec(v1_startcol,v1_ncols) , v2) ] and returns sum_i [ ker( m(i).subVec(v1_startcol,v1_ncols) , v2) ]
TVec< pair< real, int > > evaluateKernelTopN (int N, Ker ker, VMat vm, int v1_startcol, int v1_ncols, const Vec &v2, int startrow, int nrows, int ignore_this_row)
TVec< pair< real, int > > evaluateKernelBottomN (int N, Ker ker, VMat vm, int v1_startcol, int v1_ncols, const Vec &v2, int startrow=0, int nrows=-1, int ignore_this_row=-1)
 same as evaluateKernelTopN but will look for the N smallest values instead of top values.
Mat findClosestPairsOfDifferentClass (int k, VMat data, Ker dist)
ObjecttoObjectPtr (const Kernel &o)
PStreamoperator>> (PStream &in, Kernel &o)
PStreamoperator>> (PStream &in, Kernel *&o)
PStreamoperator<< (PStream &out, const Kernel &o)
PStreamoperator>> (PStream &in, PP< Kernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Kernel > *opt, PLearnDiff *diffs)
PStreamoperator>> (PStream &in, Ker &o)
PStreamoperator<< (PStream &out, const Ker &o)
template<>
void deepCopyField (Ker &field, CopiesMap &copies)
Array< Keroperator& (const Ker &k1, const Ker &k2)
 ******************** inline Ker operators
ObjecttoObjectPtr (const KroneckerBaseKernel &o)
PStreamoperator>> (PStream &in, KroneckerBaseKernel &o)
PStreamoperator>> (PStream &in, KroneckerBaseKernel *&o)
PStreamoperator<< (PStream &out, const KroneckerBaseKernel &o)
PStreamoperator>> (PStream &in, PP< KroneckerBaseKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KroneckerBaseKernel > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (KroneckerBaseKernel) template<> class TypeTraits< KroneckerBaseKernel >
ObjecttoObjectPtr (const LaplacianKernel &o)
PStreamoperator>> (PStream &in, LaplacianKernel &o)
PStreamoperator>> (PStream &in, LaplacianKernel *&o)
PStreamoperator<< (PStream &out, const LaplacianKernel &o)
PStreamoperator>> (PStream &in, PP< LaplacianKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LaplacianKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LiftBinaryCostFunction &o)
PStreamoperator>> (PStream &in, LiftBinaryCostFunction &o)
PStreamoperator>> (PStream &in, LiftBinaryCostFunction *&o)
PStreamoperator<< (PStream &out, const LiftBinaryCostFunction &o)
PStreamoperator>> (PStream &in, PP< LiftBinaryCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LiftBinaryCostFunction > *opt, PLearnDiff *diffs)
CostFunc class_lift (bool make_positive=false)
ObjecttoObjectPtr (const LinearARDKernel &o)
PStreamoperator>> (PStream &in, LinearARDKernel &o)
PStreamoperator>> (PStream &in, LinearARDKernel *&o)
PStreamoperator<< (PStream &out, const LinearARDKernel &o)
PStreamoperator>> (PStream &in, PP< LinearARDKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LinearARDKernel > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (LinearARDKernel) template<> class TypeTraits< LinearARDKernel >
ObjecttoObjectPtr (const LLEKernel &o)
PStreamoperator>> (PStream &in, LLEKernel &o)
PStreamoperator>> (PStream &in, LLEKernel *&o)
PStreamoperator<< (PStream &out, const LLEKernel &o)
PStreamoperator>> (PStream &in, PP< LLEKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LLEKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LogOfGaussianDensityKernel &o)
PStreamoperator>> (PStream &in, LogOfGaussianDensityKernel &o)
PStreamoperator>> (PStream &in, LogOfGaussianDensityKernel *&o)
PStreamoperator<< (PStream &out, const LogOfGaussianDensityKernel &o)
PStreamoperator>> (PStream &in, PP< LogOfGaussianDensityKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LogOfGaussianDensityKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ManifoldParzenKernel &o)
PStreamoperator>> (PStream &in, ManifoldParzenKernel &o)
PStreamoperator>> (PStream &in, ManifoldParzenKernel *&o)
PStreamoperator<< (PStream &out, const ManifoldParzenKernel &o)
PStreamoperator>> (PStream &in, PP< ManifoldParzenKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ManifoldParzenKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Matern1ARDKernel &o)
PStreamoperator>> (PStream &in, Matern1ARDKernel &o)
PStreamoperator>> (PStream &in, Matern1ARDKernel *&o)
PStreamoperator<< (PStream &out, const Matern1ARDKernel &o)
PStreamoperator>> (PStream &in, PP< Matern1ARDKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Matern1ARDKernel > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (Matern1ARDKernel) template<> class TypeTraits< Matern1ARDKernel >
ObjecttoObjectPtr (const MemoryCachedKernel &o)
PStreamoperator>> (PStream &in, MemoryCachedKernel &o)
PStreamoperator>> (PStream &in, MemoryCachedKernel *&o)
PStreamoperator<< (PStream &out, const MemoryCachedKernel &o)
PStreamoperator>> (PStream &in, PP< MemoryCachedKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MemoryCachedKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MulticlassErrorCostFunction &o)
PStreamoperator>> (PStream &in, MulticlassErrorCostFunction &o)
PStreamoperator>> (PStream &in, MulticlassErrorCostFunction *&o)
PStreamoperator<< (PStream &out, const MulticlassErrorCostFunction &o)
PStreamoperator>> (PStream &in, PP< MulticlassErrorCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MulticlassErrorCostFunction > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NegKernel &o)
PStreamoperator>> (PStream &in, NegKernel &o)
PStreamoperator>> (PStream &in, NegKernel *&o)
PStreamoperator<< (PStream &out, const NegKernel &o)
PStreamoperator>> (PStream &in, PP< NegKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NegKernel > *opt, PLearnDiff *diffs)
Ker operator- (const Ker &k)
ObjecttoObjectPtr (const NegLogProbCostFunction &o)
PStreamoperator>> (PStream &in, NegLogProbCostFunction &o)
PStreamoperator>> (PStream &in, NegLogProbCostFunction *&o)
PStreamoperator<< (PStream &out, const NegLogProbCostFunction &o)
PStreamoperator>> (PStream &in, PP< NegLogProbCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NegLogProbCostFunction > *opt, PLearnDiff *diffs)
CostFunc condprob_cost (bool normalize=false, bool smooth_map_outputs=false)
 negative log conditional probability
ObjecttoObjectPtr (const NegOutputCostFunction &o)
PStreamoperator>> (PStream &in, NegOutputCostFunction &o)
PStreamoperator>> (PStream &in, NegOutputCostFunction *&o)
PStreamoperator<< (PStream &out, const NegOutputCostFunction &o)
PStreamoperator>> (PStream &in, PP< NegOutputCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NegOutputCostFunction > *opt, PLearnDiff *diffs)
CostFunc neg_output_costfunc ()
 returns -output[0]. This is for density estimators whose use(x) method typically computes log(p(x))
ObjecttoObjectPtr (const NeuralNetworkARDKernel &o)
PStreamoperator>> (PStream &in, NeuralNetworkARDKernel &o)
PStreamoperator>> (PStream &in, NeuralNetworkARDKernel *&o)
PStreamoperator<< (PStream &out, const NeuralNetworkARDKernel &o)
PStreamoperator>> (PStream &in, PP< NeuralNetworkARDKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeuralNetworkARDKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NonLocalManifoldParzenKernel &o)
PStreamoperator>> (PStream &in, NonLocalManifoldParzenKernel &o)
PStreamoperator>> (PStream &in, NonLocalManifoldParzenKernel *&o)
PStreamoperator<< (PStream &out, const NonLocalManifoldParzenKernel &o)
PStreamoperator>> (PStream &in, PP< NonLocalManifoldParzenKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NonLocalManifoldParzenKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NormalizedDotProductKernel &o)
PStreamoperator>> (PStream &in, NormalizedDotProductKernel &o)
PStreamoperator>> (PStream &in, NormalizedDotProductKernel *&o)
PStreamoperator<< (PStream &out, const NormalizedDotProductKernel &o)
PStreamoperator>> (PStream &in, PP< NormalizedDotProductKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NormalizedDotProductKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PLearnerDiagonalKernel &o)
PStreamoperator>> (PStream &in, PLearnerDiagonalKernel &o)
PStreamoperator>> (PStream &in, PLearnerDiagonalKernel *&o)
PStreamoperator<< (PStream &out, const PLearnerDiagonalKernel &o)
PStreamoperator>> (PStream &in, PP< PLearnerDiagonalKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLearnerDiagonalKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PolynomialKernel &o)
PStreamoperator>> (PStream &in, PolynomialKernel &o)
PStreamoperator>> (PStream &in, PolynomialKernel *&o)
PStreamoperator<< (PStream &out, const PolynomialKernel &o)
PStreamoperator>> (PStream &in, PP< PolynomialKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PolynomialKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PowDistanceKernel &o)
PStreamoperator>> (PStream &in, PowDistanceKernel &o)
PStreamoperator>> (PStream &in, PowDistanceKernel *&o)
PStreamoperator<< (PStream &out, const PowDistanceKernel &o)
PStreamoperator>> (PStream &in, PP< PowDistanceKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PowDistanceKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PrecomputedKernel &o)
PStreamoperator>> (PStream &in, PrecomputedKernel &o)
PStreamoperator>> (PStream &in, PrecomputedKernel *&o)
PStreamoperator<< (PStream &out, const PrecomputedKernel &o)
PStreamoperator>> (PStream &in, PP< PrecomputedKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PrecomputedKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PricingTransactionPairProfitFunction &o)
PStreamoperator>> (PStream &in, PricingTransactionPairProfitFunction &o)
PStreamoperator>> (PStream &in, PricingTransactionPairProfitFunction *&o)
PStreamoperator<< (PStream &out, const PricingTransactionPairProfitFunction &o)
PStreamoperator>> (PStream &in, PP< PricingTransactionPairProfitFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PricingTransactionPairProfitFunction > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const QuadraticUtilityCostFunction &o)
PStreamoperator>> (PStream &in, QuadraticUtilityCostFunction &o)
PStreamoperator>> (PStream &in, QuadraticUtilityCostFunction *&o)
PStreamoperator<< (PStream &out, const QuadraticUtilityCostFunction &o)
PStreamoperator>> (PStream &in, PP< QuadraticUtilityCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, QuadraticUtilityCostFunction > *opt, PLearnDiff *diffs)
CostFunc quadratic_risk (real risk_aversion, CostFunc profit_function)
ObjecttoObjectPtr (const RationalQuadraticARDKernel &o)
PStreamoperator>> (PStream &in, RationalQuadraticARDKernel &o)
PStreamoperator>> (PStream &in, RationalQuadraticARDKernel *&o)
PStreamoperator<< (PStream &out, const RationalQuadraticARDKernel &o)
PStreamoperator>> (PStream &in, PP< RationalQuadraticARDKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RationalQuadraticARDKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ReconstructionWeightsKernel &o)
PStreamoperator>> (PStream &in, ReconstructionWeightsKernel &o)
PStreamoperator>> (PStream &in, ReconstructionWeightsKernel *&o)
PStreamoperator<< (PStream &out, const ReconstructionWeightsKernel &o)
PStreamoperator>> (PStream &in, PP< ReconstructionWeightsKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ReconstructionWeightsKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ScaledGaussianKernel &o)
PStreamoperator>> (PStream &in, ScaledGaussianKernel &o)
PStreamoperator>> (PStream &in, ScaledGaussianKernel *&o)
PStreamoperator<< (PStream &out, const ScaledGaussianKernel &o)
PStreamoperator>> (PStream &in, PP< ScaledGaussianKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ScaledGaussianKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ScaledGeneralizedDistanceRBFKernel &o)
PStreamoperator>> (PStream &in, ScaledGeneralizedDistanceRBFKernel &o)
PStreamoperator>> (PStream &in, ScaledGeneralizedDistanceRBFKernel *&o)
PStreamoperator<< (PStream &out, const ScaledGeneralizedDistanceRBFKernel &o)
PStreamoperator>> (PStream &in, PP< ScaledGeneralizedDistanceRBFKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ScaledGeneralizedDistanceRBFKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ScaledLaplacianKernel &o)
PStreamoperator>> (PStream &in, ScaledLaplacianKernel &o)
PStreamoperator>> (PStream &in, ScaledLaplacianKernel *&o)
PStreamoperator<< (PStream &out, const ScaledLaplacianKernel &o)
PStreamoperator>> (PStream &in, PP< ScaledLaplacianKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ScaledLaplacianKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectedOutputCostFunction &o)
PStreamoperator>> (PStream &in, SelectedOutputCostFunction &o)
PStreamoperator>> (PStream &in, SelectedOutputCostFunction *&o)
PStreamoperator<< (PStream &out, const SelectedOutputCostFunction &o)
PStreamoperator>> (PStream &in, PP< SelectedOutputCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectedOutputCostFunction > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SigmoidalKernel &o)
PStreamoperator>> (PStream &in, SigmoidalKernel &o)
PStreamoperator>> (PStream &in, SigmoidalKernel *&o)
PStreamoperator<< (PStream &out, const SigmoidalKernel &o)
PStreamoperator>> (PStream &in, PP< SigmoidalKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SigmoidalKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SigmoidPrimitiveKernel &o)
PStreamoperator>> (PStream &in, SigmoidPrimitiveKernel &o)
PStreamoperator>> (PStream &in, SigmoidPrimitiveKernel *&o)
PStreamoperator<< (PStream &out, const SigmoidPrimitiveKernel &o)
PStreamoperator>> (PStream &in, PP< SigmoidPrimitiveKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SigmoidPrimitiveKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SourceKernel &o)
PStreamoperator>> (PStream &in, SourceKernel &o)
PStreamoperator>> (PStream &in, SourceKernel *&o)
PStreamoperator<< (PStream &out, const SourceKernel &o)
PStreamoperator>> (PStream &in, PP< SourceKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SourceKernel > *opt, PLearnDiff *diffs)
CostFunc squared_error (int singleoutputindex)
ObjecttoObjectPtr (const SquaredErrorCostFunction &o)
PStreamoperator>> (PStream &in, SquaredErrorCostFunction &o)
PStreamoperator>> (PStream &in, SquaredErrorCostFunction *&o)
PStreamoperator<< (PStream &out, const SquaredErrorCostFunction &o)
PStreamoperator>> (PStream &in, PP< SquaredErrorCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SquaredErrorCostFunction > *opt, PLearnDiff *diffs)
CostFunc squared_classification_error (real hot_value=0.8, real cold_value=0.2)
ObjecttoObjectPtr (const SquaredExponentialARDKernel &o)
PStreamoperator>> (PStream &in, SquaredExponentialARDKernel &o)
PStreamoperator>> (PStream &in, SquaredExponentialARDKernel *&o)
PStreamoperator<< (PStream &out, const SquaredExponentialARDKernel &o)
PStreamoperator>> (PStream &in, PP< SquaredExponentialARDKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SquaredExponentialARDKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SummationKernel &o)
PStreamoperator>> (PStream &in, SummationKernel &o)
PStreamoperator>> (PStream &in, SummationKernel *&o)
PStreamoperator<< (PStream &out, const SummationKernel &o)
PStreamoperator>> (PStream &in, PP< SummationKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SummationKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ThresholdedKernel &o)
PStreamoperator>> (PStream &in, ThresholdedKernel &o)
PStreamoperator>> (PStream &in, ThresholdedKernel *&o)
PStreamoperator<< (PStream &out, const ThresholdedKernel &o)
PStreamoperator>> (PStream &in, PP< ThresholdedKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ThresholdedKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VMatKernel &o)
PStreamoperator>> (PStream &in, VMatKernel &o)
PStreamoperator>> (PStream &in, VMatKernel *&o)
PStreamoperator<< (PStream &out, const VMatKernel &o)
PStreamoperator>> (PStream &in, PP< VMatKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VMatKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const WeightedCostFunction &o)
PStreamoperator>> (PStream &in, WeightedCostFunction &o)
PStreamoperator>> (PStream &in, WeightedCostFunction *&o)
PStreamoperator<< (PStream &out, const WeightedCostFunction &o)
PStreamoperator>> (PStream &in, PP< WeightedCostFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WeightedCostFunction > *opt, PLearnDiff *diffs)
CostFunc weighted_costfunc (CostFunc costfunc)
 reweighting
ObjecttoObjectPtr (const WeightedQuadraticPolynomialKernel &o)
PStreamoperator>> (PStream &in, WeightedQuadraticPolynomialKernel &o)
PStreamoperator>> (PStream &in, WeightedQuadraticPolynomialKernel *&o)
PStreamoperator<< (PStream &out, const WeightedQuadraticPolynomialKernel &o)
PStreamoperator>> (PStream &in, PP< WeightedQuadraticPolynomialKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WeightedQuadraticPolynomialKernel > *opt, PLearnDiff *diffs)
int dnaupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, double *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, FORTRAN_Integer *, short, short)
int dneupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, double *, double *, double *, FORTRAN_Integer *, double *, double *, double *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, double *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, FORTRAN_Integer *, short, short, short)
int snaupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, float *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, FORTRAN_Integer *, short, short)
int sneupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, float *, float *, float *, FORTRAN_Integer *, float *, float *, float *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, float *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, FORTRAN_Integer *, short, short, short)
int dsaupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, double *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, FORTRAN_Integer *, short, short)
int dseupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, double *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, double *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, double *, double *, FORTRAN_Integer *, FORTRAN_Integer *, short, short, short)
int ssaupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, float *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, FORTRAN_Integer *, short, short)
int sseupd_ (FORTRAN_Integer *, const char *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, float *, const char *, FORTRAN_Integer *, const char *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, float *, FORTRAN_Integer *, FORTRAN_Integer *, FORTRAN_Integer *, float *, float *, FORTRAN_Integer *, FORTRAN_Integer *, short, short, short)
template<class T >
void PentadiagonalSolveInPlace (const TVec< T > &y, const TVec< T > &a, const TVec< T > &b, const TVec< T > &c)
 Solver for a summetric Pentadiagonal system.
ObjecttoObjectPtr (const Binner &o)
PStreamoperator>> (PStream &in, Binner &o)
PStreamoperator>> (PStream &in, Binner *&o)
PStreamoperator<< (PStream &out, const Binner &o)
PStreamoperator>> (PStream &in, PP< Binner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Binner > *opt, PLearnDiff *diffs)
void choleskyAppendDimension (Mat &L, const Vec &new_row)
 Update the Cholesky decomposition of A = L L' when a new row is appended to the matrix A.
void choleskyRemoveDimension (Mat &L, int i)
 Update the Cholesky decomposition of A = L L' when dimension i is removed (i.e.
void choleskyInsertBasis (Mat &L, Mat active_bases_outputs, Vec new_basis_outputs, real lambda, real min_Lii)
void choleskyUpgrade (Mat &L, Vec v)
void chol_dxch (Mat &R, int l, int m)
 From 'Matrix Algorithms, Vol1' by G. W. Stewart, p.272, 273, 335, 338.
void chol_dxch_tr (Mat &R_t, int l, int m)
 These two functions are variants of the above functions, where the R matrix is given as its transpose (which is the case in the Cholesky decomposition).
void chol_rotapp (real c, real s, const Vec &x, const Vec &y)
void chol_rotapp_tr (real c, real s, const Mat &x, const Mat &y)
void chol_rotapp_tr_opt (real c, real s, const Mat &R, int i, int j, int k, int m)
 Optimized version of 'chol_rotapp_tr' that directly call BLAS functions.
void chol_rotgen (real &a, real &b, real &c, real &s)
void testCholeskyRoutines ()
ObjecttoObjectPtr (const ConditionalCDFSmoother &o)
PStreamoperator>> (PStream &in, ConditionalCDFSmoother &o)
PStreamoperator>> (PStream &in, ConditionalCDFSmoother *&o)
PStreamoperator<< (PStream &out, const ConditionalCDFSmoother &o)
PStreamoperator>> (PStream &in, PP< ConditionalCDFSmoother > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalCDFSmoother > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConditionalStatsCollector &o)
PStreamoperator>> (PStream &in, ConditionalStatsCollector &o)
PStreamoperator>> (PStream &in, ConditionalStatsCollector *&o)
PStreamoperator<< (PStream &out, const ConditionalStatsCollector &o)
PStreamoperator>> (PStream &in, PP< ConditionalStatsCollector > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalStatsCollector > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConstantRealFunction &o)
PStreamoperator>> (PStream &in, ConstantRealFunction &o)
PStreamoperator>> (PStream &in, ConstantRealFunction *&o)
PStreamoperator<< (PStream &out, const ConstantRealFunction &o)
PStreamoperator>> (PStream &in, PP< ConstantRealFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConstantRealFunction > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ConstantRealFunction) template<> class TypeTraits< ConstantRealFunction >
void convolve1D (const Vec &source_signal, const Vec &kernel, const Vec &dest_signal, int step=1, bool accumulate=true)
 Convolve a source signal of length NS with a kernel of length NK with steps S, and put result in a destination signal which should be of length NS-NK+1.
void backConvolve1D (const Vec &source_signal, const Vec &kernel, const Vec &dest_signal, int step=1, bool accumulate=true)
 Back-convolve INTO a "source" signal of length NS with a kernel of length NK and FROM a "destination" signal which should be of length NS-NK+1 This is EXACTLY the TRANSPOSE operation of a convolve1D with the same arguments, with computations flowing in the other direction.
void convolve1Dbackprop (const Vec &source_signal, const Vec &kernel, const Vec &dC_ddest_signal, const Vec &dC_dsource_signal, const Vec &dC_dkernel, int step=1, bool accumulate=true)
 Increment dC/dsource_signal and dC/dkernel, given dC/ddest_signal, with dest_signal computed as per convolve1D(source_signal, kernel, dest_signal): dC/dsource_signal[k] += sum_{j=0}^{NK-1} 1_{k>=j && k-j<ND} dC_ddest_signal[k-j]*kernel[j] dC/dkernel[j] += sum_{k=0}^{ND-1} 1_{k>=j && k-j<ND} dC_ddest_signal[k-j]*source_signal[k] (consider the equivalence: k = i+j)
void convolve1Dbackprop (const Vec &source_signal, const Vec &dC_ddest_signal, const Vec &dC_dkernel, int step=1, bool accumulate=true)
 Same as above, but increments only dC/dkernel, not dC/dsource_signal dC/dkernel[j] += sum_{k=0}^{ND-1} 1_{k>=j && k-j<ND} dC_ddest_signal[k-j]*source_signal[k] (consider the equivalence: k = i+j)
void backConvolve1Dbackprop (const Vec &kernel, const Vec &dest_signal, const Vec &dC_ddest_signal, const Vec &dC_dsource_signal, const Vec &dC_dkernel, int step=1, bool accumulate=true)
 Increment dC/ddest_signal and dC/dkernel, given dC/ddest_signal, with source_signal computed as per backConvolve1D(source_signal, kernel, dest_signal): dC/ddest_signal[i] += sum_{j=0}^{NK-1} dC_dsource_signal[i+j]*kernel[j] dC/dkernel[j] += sum_{i=0}^{ND-1} dC_dsource_signal[i+j]*dest_signal[i].
void backConvolve1Dbackprop (const Vec &dest_signal, const Vec &dC_dsource_signal, const Vec &dC_dkernel, int step=1, bool accumulate=true)
 Same as above, but increments only dC/dkernel, not dC/ddest_signal dC/dkernel[j] += sum_{i=0}^{ND-1} dC_dsource_signal[i+j]*dest_signal[i].
void convolve2D (const Mat &source_image, const Mat &kernel, const Mat &dest_image, int step1=1, int step2=1, bool accumulate=true)
 Convolve a (N1S x N2S) source image with a (N1K x N2K) kernel matrix, and put result in a destination matrix of dimensions (N1D x N2D), stepping by (step1,step2) in each direction, with NiS = NiD*stepi + NiK - 1.
void backConvolve2D (const Mat &source_image, const Mat &kernel, const Mat &dest_image, int step1=1, int step2=1, bool accumulate=true)
 Back-convolve INTO a (N1S x N2S) "source" image with a (N1K x N2K) kernel matrix, and FROM a "destination" image of dimensions (N1D x N2D), with NiS = NiD + NiK - 1.
void convolve2Dbackprop (const Mat &source_image, const Mat &kernel, const Mat &dC_ddest_image, const Mat &dC_dsource_image, const Mat &dC_dkernel, int step1=1, int step2=1, bool accumulate=true)
 Increment dC/dsource_image and dC/dkernel, given dC/ddest_image, with dest_image computed as per convolve2D(source_image, kernel, dest_image): for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/dsource_image[i1+j1,i2+j2] += dC/dest_image[i1,i2]*kernel[j1,j2] dC/dkernel[j1,j2] += dC/dest_image[i1,i2]*source_image[i1+j1,i2+j2].
void convolve2Dbackprop (const Mat &source_image, const Mat &dC_ddest_image, const Mat &dC_dkernel, int step1=1, int step2=1, bool accumulate=true)
 As above, but increments only dC/dkernel, not dC/dsource_image for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/dkernel[j1,j2] += dC/dest_image[i1,i2]*source_image[i1+j1,i2+j2].
void backConvolve2Dbackprop (const Mat &kernel, const Mat &dest_image, const Mat &dC_ddest_image, const Mat &dC_dsource_image, const Mat &dC_dkernel, int step1=1, int step2=1, bool accumulate=true)
 Increment dC/ddest_image and dC/dkernel, given dC/dsource_image, with source_image computed as per backConvolve2D(source_image, kernel, dest_image): for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/ddest_image[i1,i2] += dC/dsource_image[i1+j1,i2+j2]*kernel[j1,j2] dC/dkernel[j1,j2] += dC/dsource_image[i1+j1,i2+j2]*dest_image[i1,i2].
void backConvolve2Dbackprop (const Mat &dest_image, const Mat &dC_dsource_image, const Mat &dC_dkernel, int step1=1, int step2=1, bool accumulate=true)
 As above, but increments only dC/dkernel, not dC/ddest_image for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/dkernel[j1,j2] += dC/dsource_image[i1+j1,i2+j2]*dest_image[i1,i2].
ObjecttoObjectPtr (const StatsIterator &o)
PStreamoperator>> (PStream &in, StatsIterator &o)
PStreamoperator>> (PStream &in, StatsIterator *&o)
PStreamoperator<< (PStream &out, const StatsIterator &o)
PStreamoperator>> (PStream &in, PP< StatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MeanStatsIterator &o)
PStreamoperator>> (PStream &in, MeanStatsIterator &o)
PStreamoperator>> (PStream &in, MeanStatsIterator *&o)
PStreamoperator<< (PStream &out, const MeanStatsIterator &o)
PStreamoperator>> (PStream &in, PP< MeanStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeanStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExpMeanStatsIterator &o)
PStreamoperator>> (PStream &in, ExpMeanStatsIterator &o)
PStreamoperator>> (PStream &in, ExpMeanStatsIterator *&o)
PStreamoperator<< (PStream &out, const ExpMeanStatsIterator &o)
PStreamoperator>> (PStream &in, PP< ExpMeanStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExpMeanStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StddevStatsIterator &o)
PStreamoperator>> (PStream &in, StddevStatsIterator &o)
PStreamoperator>> (PStream &in, StddevStatsIterator *&o)
PStreamoperator<< (PStream &out, const StddevStatsIterator &o)
PStreamoperator>> (PStream &in, PP< StddevStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StddevStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StderrStatsIterator &o)
PStreamoperator>> (PStream &in, StderrStatsIterator &o)
PStreamoperator>> (PStream &in, StderrStatsIterator *&o)
PStreamoperator<< (PStream &out, const StderrStatsIterator &o)
PStreamoperator>> (PStream &in, PP< StderrStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StderrStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SharpeRatioStatsIterator &o)
PStreamoperator>> (PStream &in, SharpeRatioStatsIterator &o)
PStreamoperator>> (PStream &in, SharpeRatioStatsIterator *&o)
PStreamoperator<< (PStream &out, const SharpeRatioStatsIterator &o)
PStreamoperator>> (PStream &in, PP< SharpeRatioStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SharpeRatioStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MinStatsIterator &o)
PStreamoperator>> (PStream &in, MinStatsIterator &o)
PStreamoperator>> (PStream &in, MinStatsIterator *&o)
PStreamoperator<< (PStream &out, const MinStatsIterator &o)
PStreamoperator>> (PStream &in, PP< MinStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MinStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MaxStatsIterator &o)
PStreamoperator>> (PStream &in, MaxStatsIterator &o)
PStreamoperator>> (PStream &in, MaxStatsIterator *&o)
PStreamoperator<< (PStream &out, const MaxStatsIterator &o)
PStreamoperator>> (PStream &in, PP< MaxStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MaxStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LiftStatsIterator &o)
PStreamoperator>> (PStream &in, LiftStatsIterator &o)
PStreamoperator>> (PStream &in, LiftStatsIterator *&o)
PStreamoperator<< (PStream &out, const LiftStatsIterator &o)
PStreamoperator>> (PStream &in, PP< LiftStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LiftStatsIterator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const QuantilesStatsIterator &o)
PStreamoperator>> (PStream &in, QuantilesStatsIterator &o)
PStreamoperator>> (PStream &in, QuantilesStatsIterator *&o)
PStreamoperator<< (PStream &out, const QuantilesStatsIterator &o)
PStreamoperator>> (PStream &in, PP< QuantilesStatsIterator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, QuantilesStatsIterator > *opt, PLearnDiff *diffs)
PStreamoperator>> (PStream &in, StatsItArray &o)
PStreamoperator<< (PStream &out, const StatsItArray &o)
template<>
void deepCopyField (StatsItArray &field, CopiesMap &copies)
StatsItArray operator& (const StatsIt &statsit1, const StatsIt &statsit2)
StatsIt mean_stats ()
StatsIt stddev_stats ()
StatsIt stderr_stats ()
StatsIt min_stats ()
StatsIt max_stats ()
StatsIt quantiles_stats (Vec quantiles, int n_data=1000)
StatsIt lift_stats (int the_index=0, real the_fraction=0.1)
StatsIt sharpe_ratio_stats ()
 exponential of the mean
StatsIt exp_mean_stats ()
real logOfCompactGaussian (const Vec &x, const Vec &mu, const Vec &eigenvalues, const Mat &eigenvectors, real gamma, bool add_gamma_to_eigenval)
 Computes and returns log( Normal(x; mu,C) ) where mu is the normal's mean and C its covariance matrix.
real logOfNormal (const Vec &x, const Vec &mu, const Mat &C)
real logPFittedGaussian (const Vec &x, const Mat &X, real lambda)
 Fits a gaussian to the points in X (computing its mean and covariance matrix, and adding lambda to the diagonal of that covariance matrix) Then calls logOfNormal to return log(p(x | the_gaussian))
real beta_density (real x, real alpha, real beta)
 Returns the density of a proportion x under a Beta(alpha,beta) distribution, equal to x^{alpha-1} (1-x}^{beta-1} / Beta(a,b) where Beta(a,b) = Gamma(a)Gamma(b)/Gamma(a+b)
real log_beta_density (real x, real alpha, real beta)
 Log of the beta_density.
real log_of_normal_density (Vec x, Vec mu, real sigma2)
real log_rbf (Vec x, Vec mu, real sigma2)
real log_of_normal_density (Vec x, Vec mu, Vec sigma2)
real log_of_normal_density (Vec x, Vec mu, Mat evectors, Vec evalues, real remainder_evalue)
real log_fullGaussianRBF (Vec x, Vec mu, Mat evectors, Vec evalues, real remainder_evalue)
void addEigenMatrices (Mat A_evec, Vec A_eval, Mat B_evec, Vec B_eval, Mat C_evec, Vec C_eval, bool inverses)
void sums2Gaussian (real sum_w, Vec sum_wx, Mat sum_wx2, Vec mu, Mat cov_evectors, Vec cov_evalues, real min_variance)
 Given weighted statistics of order 0, 1 and 2, compute first and second moments of a Gaussian.
real normal_density (Vec x, Vec mu, real sigma2)
real rbf (Vec x, Vec mu, real sigma2)
real normal_density (Vec x, Vec mu, Vec sigma2)
real normal_density (Vec x, Vec mu, Mat evectors, Vec evalues, real remainder_evalue=0)
real fullGaussianRBF (Vec x, Vec mu, Mat evectors, Vec evalues, real remainder_evalue=0)
template<class T >
PStreamoperator<< (PStream &out, const DoubleAccessSparseMatrix< T > &m)
template<class T >
PStreamoperator>> (PStream &in, DoubleAccessSparseMatrix< T > &m)
template<class MatT >
bool SolveLinearSymmSystemByCG (MatT A, Vec x, const Vec &b, int &max_iter, real &tol, real lambda)
 for debugging
template<class MatT >
real PowerIteration (MatT &A, Vec x0, int &n_iterations, real RayleighQuotientTolerance, Mat final_vectors, int &final_offset)
 do it with templates
int GramSchmidtOrthogonalization (Mat A, real tolerance=1e-6)
template<class MatT >
real PowerIteration (MatT A, Vec x0, int &n_iterations, real RayleighQuotientTolerance, Mat final_vectors, int &final_offset, bool verbose=false)
template<class MatT >
real InversePowerIteration (MatT A, Vec x0, int &n_iterations, int max_n_cg_iter, real RTolerance, Mat final_vectors, int &final_offset, real regularizer, bool verbose=false)
template<class MatT >
real findSmallestEigenPairOfSymmMat (MatT &A, Vec x, real error_tolerance=1e-3, real improvement_tolerance=1e-4, int max_n_cg_iter=0, int max_n_power_iter=0, bool verbose=false)
template<class MatT >
int SymmMatNullSpaceByInversePowerIteration (MatT &A, Mat solutions, Vec normsAx, Vec xAx, real error_tolerance=1e-3, real improvement_tolerance=1e-4, int max_n_cg_iter=0, int max_n_power_iter=0, bool verbose=false)
template<class MatT >
int GDFindSmallEigenPairs (MatT &A, Mat X, bool diagonalize_in_the_end=true, real tolerance=1e-6, int n_epochs=0, real learning_rate=0, int normalize_every=0, real decrease_factor=0, bool verbose=false)
template<class MatT >
int kernelPCAfromDotProducts (MatT &dot_products, Mat embedding, int max_n_eigen_iter=300, real ncv2nev_ratio=1.5, Vec *eval=0, Mat *evec=0)
template<class MatT >
int metricMultiDimensionalScaling (MatT &square_distances, Mat embedding, int max_n_eigen_iter=300)
void ssyevx_ (char *JOBZ, char *RANGE, char *UPLO, int *N, float *A, int *LDA, float *VL, float *VU, int *IL, int *IU, float *ABSTOL, int *M, float *W, float *Z, int *LDZ, float *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void dsyevx_ (char *JOBZ, char *RANGE, char *UPLO, int *N, double *A, int *LDA, double *VL, double *VU, int *IL, int *IU, double *ABSTOL, int *M, double *W, double *Z, int *LDZ, double *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void ssyev_ (char *JOBZ, char *UPLO, int *N, float *A, int *LDA, float *W, float *WORK, int *LWORK, int *INFO)
void dsyev_ (char *JOBZ, char *UPLO, int *N, double *A, int *LDA, double *W, double *WORK, int *LWORK, int *INFO)
void sgetri_ (int *N, float *A, int *LDA, int *IPIV, float *WORK, int *LWORK, int *INFO)
void dgetri_ (int *N, double *A, int *LDA, int *IPIV, double *WORK, int *LWORK, int *INFO)
void sgetrf_ (int *M, int *N, float *A, int *LDA, int *IPIV, int *INFO)
void dgetrf_ (int *M, int *N, double *A, int *LDA, int *IPIV, int *INFO)
void sgesv_ (int *N, int *NRHS, float *A, int *LDA, int *IPIV, float *B, int *LDB, int *INFO)
void dgesv_ (int *N, int *NRHS, double *A, int *LDA, int *IPIV, double *B, int *LDB, int *INFO)
void sgesdd_ (char *JOBZ, int *M, int *N, float *A, int *LDA, float *S, float *U, int *LDU, float *VT, int *LDVT, float *WORK, int *LWORK, int *IWORK, int *INFO)
void dgesdd_ (char *JOBZ, int *M, int *N, double *A, int *LDA, double *S, double *U, int *LDU, double *VT, int *LDVT, double *WORK, int *LWORK, int *IWORK, int *INFO)
void ssyevr_ (char *JOBZ, char *RANGE, char *UPLO, int *N, float *A, int *LDA, float *VL, float *VU, int *IL, int *IU, float *ABSTOL, int *M, float *W, float *Z, int *LDZ, int *ISUPPZ, float *WORK, int *LWORK, int *IWORK, int *LIWORK, int *INFO)
void dsyevr_ (char *JOBZ, char *RANGE, char *UPLO, int *N, double *A, int *LDA, double *VL, double *VU, int *IL, int *IU, double *ABSTOL, int *M, double *W, double *Z, int *LDZ, int *ISUPPZ, double *WORK, int *LWORK, int *IWORK, int *LIWORK, int *INFO)
void ssygvx_ (int *ITYPE, char *JOBZ, char *RANGE, char *UPLO, int *N, float *A, int *LDA, float *B, int *LDB, float *VL, float *VU, int *IL, int *IU, float *ABSTOL, int *M, float *W, float *Z, int *LDZ, float *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void dsygvx_ (int *ITYPE, char *JOBZ, char *RANGE, char *UPLO, int *N, double *A, int *LDA, double *B, int *LDB, double *VL, double *VU, int *IL, int *IU, double *ABSTOL, int *M, double *W, double *Z, int *LDZ, double *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void spotrf_ (char *UPLO, int *N, float *A, int *LDA, int *INFO)
void dpotrf_ (char *UPLO, int *N, double *A, int *LDA, int *INFO)
void spotrs_ (char *UPLO, int *N, int *NRHS, float *A, int *LDA, float *B, int *LDB, int *INFO)
void dpotrs_ (char *UPLO, int *N, int *NRHS, double *A, int *LDA, double *B, int *LDB, int *INFO)
void sposvx_ (char *FACT, char *UPLO, int *N, int *NRHS, float *A, int *LDA, float *AF, int *LDAF, char *EQUED, float *S, float *B, int *LDB, float *X, int *LDX, float *RCOND, float *FERR, float *BERR, float *WORK, int *IWORK, int *INFO)
void dposvx_ (char *FACT, char *UPLO, int *N, int *NRHS, double *A, int *LDA, double *AF, int *LDAF, char *EQUED, double *S, double *B, int *LDB, double *X, int *LDX, double *RCOND, double *FERR, double *BERR, double *WORK, int *IWORK, int *INFO)
ObjecttoObjectPtr (const LiftStatsCollector &o)
PStreamoperator>> (PStream &in, LiftStatsCollector &o)
PStreamoperator>> (PStream &in, LiftStatsCollector *&o)
PStreamoperator<< (PStream &out, const LiftStatsCollector &o)
PStreamoperator>> (PStream &in, PP< LiftStatsCollector > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LiftStatsCollector > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LimitedGaussianSmoother &o)
PStreamoperator>> (PStream &in, LimitedGaussianSmoother &o)
PStreamoperator>> (PStream &in, LimitedGaussianSmoother *&o)
PStreamoperator<< (PStream &out, const LimitedGaussianSmoother &o)
PStreamoperator>> (PStream &in, PP< LimitedGaussianSmoother > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LimitedGaussianSmoother > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ManualBinner &o)
PStreamoperator>> (PStream &in, ManualBinner &o)
PStreamoperator>> (PStream &in, ManualBinner *&o)
PStreamoperator<< (PStream &out, const ManualBinner &o)
PStreamoperator>> (PStream &in, PP< ManualBinner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ManualBinner > *opt, PLearnDiff *diffs)
VecnewVecArray (int n)
VecnewVecArray (int n, int the_length)
MatnewMatArray (int n)
MatnewMatArray (int n, int the_length, int the_width)
MatnewIndexedMatArray (int n, Mat &m, int indexcolumn)
Mat operator^ (const Mat &m1, const Mat &m2)
Mat unitmatrix (int n)
ostream & operator<< (ostream &out, const Vec &v)
template<>
void deepCopyField (Vec &field, CopiesMap &copies)
template<>
void deepCopyField (Mat &field, CopiesMap &copies)
ObjecttoObjectPtr (const ObservationWindow &o)
PStreamoperator>> (PStream &in, ObservationWindow &o)
PStreamoperator>> (PStream &in, ObservationWindow *&o)
PStreamoperator<< (PStream &out, const ObservationWindow &o)
PStreamoperator>> (PStream &in, PP< ObservationWindow > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ObservationWindow > *opt, PLearnDiff *diffs)
template<class MatT >
int eigenSparseSymmMat (MatT &A, Vec &e_values, Mat &e_vectors, FORTRAN_Integer &n_evalues, int max_n_iter=300, bool compute_vectors=true, bool largest_evalues=true, bool according_to_magnitude=true, bool both_ends=false, real ncv2nev_ratio=1.5)
template<class MatT >
int eigenSparseNonSymmMat (MatT &A, Vec e_values, Mat e_vectors, FORTRAN_Integer &n_evalues, int max_n_iter=300, bool compute_vectors=true, bool largest_evalues=true, bool according_to_magnitude=true, bool both_ends=false)
real pl_gammln (real z)
 function gamma returns log(Gamma(z)), where $ Gamma(z) = \int_0^infty t^{z-1}*e^{-t} dt $
real pl_dgammlndz (real z)
 d(pl_gammln(z))/dz derivate of pl_gammln(z) = digamma function = d(log(gamma(z))/dz
real pl_gser (real a, real x)
 returns the series value of the incomplete gamma function
real pl_gcf (real a, real x)
 returns the continued fraction representation of the incomplete gamma function
real pl_gammq (real a, real x)
 returns the incomplete gamma function Q(a,x) = 1 - P(a,x) it either uses the series or the continued fraction formula
real pl_erf (real x)
 The error function.
real gauss_01_cum (real x)
 For X ~ Normal(0,1), cumulative probability function P(X<x)
real gauss_01_quantile (real q)
real gauss_01_density (real x)
 for X ~ Normal(0,1), return density of X at x
real gauss_01_log_density (real x)
real gauss_log_density_var (real x, real mu, real var)
real gauss_density_var (real x, real mu, real var)
real gauss_log_density_stddev (real x, real mu, real sigma)
real p_value (real mu, real vn)
real fast_gauss_01_quantile (real x)
 Use precomputed value in a table of size GAUSSQUANTILETABLESIZE.
real normal_cdf (real x)
real gauss_cum (real x, real mu, real sigma)
real gauss_density_stddev (real x, real mu, real sigma)
bool is_equal (real a, real b, real absolute_tolerance_threshold=1.0, real absolute_tolerance=ABSOLUTE_TOLERANCE, real relative_tolerance=RELATIVE_TOLERANCE)
 Test float equality (correctly deals with 'nan' and 'inf' values).
real safeflog (real a)
real safeexp (real a)
real log (real base, real a)
real logtwo (real a)
real safeflog (real base, real a)
real safeflog2 (real a)
real tabulated_softplus_primitive (real x)
real logadd (double log_a, double log_b)
 compute log(exp(log_a)+exp(log_b)) without losing too much precision (doing the computation in double precision)
real square_f (real x)
real logsub (real log_a, real log_b)
 compute log(exp(log_a)-exp(log_b)) without losing too much precision
real small_dilogarithm (real x)
real positive_dilogarithm (real x)
real dilogarithm (real x)
 It is also useful because -dilogarithm(-exp(x)) is the primitive of the softplus function log(1+exp(x)).
real hard_slope_integral (real l, real r, real a, real b)
real soft_slope_integral (real smoothness, real left, real right, real a, real b)
real tabulated_soft_slope_integral (real smoothness, real left, real right, real a, real b)
real log_force_nan_if_negative (real a)
 Under Cygwin with GCC, log(x) with x < 0 returns -Inf instead of NaN.
real sign (real a)
real positive (real a)
real negative (real a)
bool fast_is_equal (real a, real b, real absolute_tolerance_threshold=1.0, real absolute_tolerance=ABSOLUTE_TOLERANCE, real relative_tolerance=RELATIVE_TOLERANCE)
 Test float equality (but does not deal with 'nan' and 'inf' values).
bool fast_exact_is_equal (real a, real b)
 Test exact float equality.
bool fast_is_more (real a, real b, real absolute_tolerance_threshold=1.0, real absolute_tolerance=ABSOLUTE_TOLERANCE, real relative_tolerance=RELATIVE_TOLERANCE)
 Test float inequality (but does not deal with 'nan' and 'inf' values).
bool fast_is_less (real a, real b, real absolute_tolerance_threshold=1.0, real absolute_tolerance=ABSOLUTE_TOLERANCE, real relative_tolerance=RELATIVE_TOLERANCE)
 Test float inequality (but does not deal with 'nan' and 'inf' values).
bool is_more (real a, real b, real absolute_tolerance_threshold=1.0, real absolute_tolerance=ABSOLUTE_TOLERANCE, real relative_tolerance=RELATIVE_TOLERANCE)
 Test float inequality while dealling with 'nan' and 'inf' values.
template<class T >
square (const T &x)
template<class T >
two (const T &x)
real fasttanh (const real &x)
real fastsigmoid (const real &x)
real ultrafasttanh (const real &x)
real ultrafastsigmoid (const real &x)
real hinge_loss (const real &output, int target)
real d_hinge_loss (const real &output, int target)
template<class T >
bool is_missing (const T &x)
 Tells if the passed value means "missing" for its data-type.
bool is_missing (double x)
 Missing value for double and float are represented by NaN.
bool is_missing (float x)
 Missing value for double and float are represented by NaN.
bool is_integer (real x)
real FABS (real x)
real mypow (real x, real p)
real ipow (real x, int p)
int ipow (int x, int p)
real sigmoid (real x)
 numerically stable version of sigmoid(x) = 1.0/(1.0+exp(-x))
real is_positive (real x)
 "hard" version of the sigmoid, i.e.
real inverse_sigmoid (real x)
 Numerically stable version of inverse_sigmoid(x) = log(x/(1-x)).
real softplus (real x)
 numerically stable computation of log(1+exp(x))
real tabulated_softplus (real x)
real inverse_softplus (real y)
 inverse of softplus function
real hard_slope (real x, real left=0, real right=1)
real log_sigmoid (real x)
 to avoid 0 or 1 probability, work in the log-domain
real soft_slope (real x, real smoothness=1, real left=0, real right=1)
real tabulated_soft_slope (real x, real smoothness=1, real left=0, real right=1)
real d_soft_slope (real x, real smoothness=1, real left=0, real right=1)
int n_choose (int M, int N)
 Return M choose N, i.e., M! / ( N! (M-N)! )
real safelog (real a)
real softplus_primitive (real x)
int eigen_SymmMat (Mat &in, Vec &e_value, Mat &e_vector, int &n_evalues_found, bool compute_all, int nb_eigen, bool compute_vectors, bool largest_evalues)
int eigen_SymmMat_decreasing (Mat &in, Vec &e_value, Mat &e_vector, int &n_evalues_found, bool compute_all, int nb_eigen, bool compute_vectors=true, bool largest_evalues=true)
 same as the previous call, but eigenvalues/vectors are sorted by largest firat (in decreasing order)
int matInvert (Mat &in, Mat &inverse)
 This function compute the inverse of a matrix.
int lapackSolveLinearSystem (Mat &At, Mat &Bt, TVec< int > &pivots)
void solveLinearSystem (const Mat &A, const Mat &Y, Mat &X)
 for matrices A such that A.length() <= A.width(), find X s.t.
void solveTransposeLinearSystem (const Mat &A, const Mat &Y, Mat &X)
 for matrices A such that A.length() >= A.width(), find X s.t.
Mat solveLinearSystem (const Mat &A, const Mat &B)
Vec solveLinearSystem (const Mat &A, const Vec &b)
 Returns solution x of Ax = b (same as above, except b and x are vectors)
Vec constrainedLinearRegression (const Mat &Xt, const Vec &Y, real lambda)
void lapackCholeskyDecompositionInPlace (Mat &A, char uplo='L')
 Call LAPACK to perform in-place Cholesky Decomposition of a square SYMMETRIC matrix A.
void lapackCholeskySolveInPlace (Mat &A, Mat &B, bool B_is_column_major=false, char uplo='L')
 Call LAPACK to solve in-place a linear system given its previously-computed Cholesky decomposition.
Mat multivariate_normal (const Vec &mu, const Mat &A, int N)
 generate N vectors sampled from the normal with mean vector mu and covariance matrix A
Vec multivariate_normal (const Vec &mu, const Mat &A)
 generate a vector sampled from the normal with mean vector mu and covariance matrix A
Vec multivariate_normal (const Vec &mu, const Vec &e_values, const Mat &e_vectors)
 generate 1 vector sampled from the normal with mean mu and covariance matrix A = evectors * diagonal(e_values) * evectors'
void multivariate_normal (Vec &x, const Vec &mu, const Vec &e_values, const Mat &e_vectors, Vec &z)
 generate a vector x sampled from the normal with mean mu and covariance matrix A = evectors * diagonal(e_values) * evectors' (the normal(0,I) originally sampled to obtain x is stored in z).
void affineNormalization (Mat data, Mat W, Vec bias, real regularizer)
real GCV (Mat X, Mat Y, real weight_decay, bool X_is_transposed, Mat *W)
 Compute the generalization error estimator called Generalized Cross-Validation (Craven & Wahba 1979), and the corresponding ridge regression weights in min ||Y - X*W'||^2 + weight_decay ||W||^2.
real GCVfromSVD (real n, real Y2minusZ2, Vec Z, Vec s)
 Estimator of generalization error estimator called Generalized Cross-Validation (Craven & Wahba 1979), computed from the SVD of the input matrix X in the ridge regression.
real ridgeRegressionByGCV (Mat X, Mat Y, Mat W, real &best_GCV, bool X_is_transposed=false, real initial_weight_decay_guess=-1, int explore_threshold=5, real min_weight_decay=0)
 Perform ridge regression WITH model selection (i.e.
real weightedRidgeRegressionByGCV (Mat X, Mat Y, Vec gamma, Mat W, real &best_gcv, real min_weight_decay=0)
 Similar to ridgeRegressionByGCV, but with support form sample weights gamma.
void lapack_Xsyevx_ (char *JOBZ, char *RANGE, char *UPLO, int *N, double *A, int *LDA, double *VL, double *VU, int *IL, int *IU, double *ABSTOL, int *M, double *W, double *Z, int *LDZ, double *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void lapack_Xsyevx_ (char *JOBZ, char *RANGE, char *UPLO, int *N, float *A, int *LDA, float *VL, float *VU, int *IL, int *IU, float *ABSTOL, int *M, float *W, float *Z, int *LDZ, float *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void lapack_Xgesdd_ (char *JOBZ, int *M, int *N, double *A, int *LDA, double *S, double *U, int *LDU, double *VT, int *LDVT, double *WORK, int *LWORK, int *IWORK, int *INFO)
void lapack_Xgesdd_ (char *JOBZ, int *M, int *N, float *A, int *LDA, float *S, float *U, int *LDU, float *VT, int *LDVT, float *WORK, int *LWORK, int *IWORK, int *INFO)
void lapack_Xsyevr_ (char *JOBZ, char *RANGE, char *UPLO, int *N, float *A, int *LDA, float *VL, float *VU, int *IL, int *IU, float *ABSTOL, int *M, float *W, float *Z, int *LDZ, int *ISUPPZ, float *WORK, int *LWORK, int *IWORK, int *LIWORK, int *INFO)
void lapack_Xsyevr_ (char *JOBZ, char *RANGE, char *UPLO, int *N, double *A, int *LDA, double *VL, double *VU, int *IL, int *IU, double *ABSTOL, int *M, double *W, double *Z, int *LDZ, int *ISUPPZ, double *WORK, int *LWORK, int *IWORK, int *LIWORK, int *INFO)
void lapack_Xsygvx_ (int *ITYPE, char *JOBZ, char *RANGE, char *UPLO, int *N, double *A, int *LDA, double *B, int *LDB, double *VL, double *VU, int *IL, int *IU, double *ABSTOL, int *M, double *W, double *Z, int *LDZ, double *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void lapack_Xsygvx_ (int *ITYPE, char *JOBZ, char *RANGE, char *UPLO, int *N, float *A, int *LDA, float *B, int *LDB, float *VL, float *VU, int *IL, int *IU, float *ABSTOL, int *M, float *W, float *Z, int *LDZ, float *WORK, int *LWORK, int *IWORK, int *IFAIL, int *INFO)
void lapack_Xpotrf_ (char *UPLO, int *N, float *A, int *LDA, int *INFO)
void lapack_Xpotrf_ (char *UPLO, int *N, double *A, int *LDA, int *INFO)
void lapack_Xpotrs_ (char *UPLO, int *N, int *NRHS, float *A, int *LDA, float *B, int *LDB, int *INFO)
void lapack_Xpotrs_ (char *UPLO, int *N, int *NRHS, double *A, int *LDA, double *B, int *LDB, int *INFO)
void lapack_Xposvx_ (char *FACT, char *UPLO, int *N, int *NRHS, float *A, int *LDA, float *AF, int *LDAF, char *EQUED, float *S, float *B, int *LDB, float *X, int *LDX, float *RCOND, float *FERR, float *BERR, float *WORK, int *IWORK, int *INFO)
void lapack_Xposvx_ (char *FACT, char *UPLO, int *N, int *NRHS, double *A, int *LDA, double *AF, int *LDAF, char *EQUED, double *S, double *B, int *LDB, double *X, int *LDX, double *RCOND, double *FERR, double *BERR, double *WORK, int *IWORK, int *INFO)
template<class num_t >
void lapackEIGEN (const TMat< num_t > &A, TVec< num_t > &eigenvals, TMat< num_t > &eigenvecs, char RANGE='A', num_t low=0, num_t high=0, num_t ABSTOL=0)
 Computes the eigenvalues and eigenvectors of a symmetric (NxN) matrix A.
template<class num_t >
void lapackGeneralizedEIGEN (const TMat< num_t > &A, const TMat< num_t > &B, int ITYPE, TVec< num_t > &eigenvals, TMat< num_t > &eigenvecs, char RANGE='A', num_t low=0, num_t high=0, num_t ABSTOL=0)
 Computes the eigenvalues and eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x A and B are assumed to be symmetric and B is also positive definite.
template<class num_t >
void eigenVecOfSymmMat (TMat< num_t > &m, int k, TVec< num_t > &eigen_values, TMat< num_t > &eigen_vectors, bool verbose=true)
 Computes up to k largest eigen_values and corresponding eigen_vectors of symmetric matrix m.
template<class num_t >
void generalizedEigenVecOfSymmMat (TMat< num_t > &m1, TMat< num_t > &m2, int itype, int k, TVec< num_t > &eigen_values, TMat< num_t > &eigen_vectors)
 Computes up to k largest eigen_values and corresponding eigen_vectors of a real generalized symmetric-definite eigenproblem, of the form m1*x=(lambda)*m2*x (itype = 1), m1*m2*x=(lambda)*x (itype = 2) or m2*m1*x=(lambda)*x (itype = 3) m1 and m2 are assumed to be symmetric and m2 is also positive definite.
template<class num_t >
void lapackSVD (const TMat< num_t > &At, TMat< num_t > &Ut, TVec< num_t > &S, TMat< num_t > &V, char JOBZ='A', real safeguard=1)
template<class num_t >
void SVD (const TMat< num_t > &A, TMat< num_t > &U, TVec< num_t > &S, TMat< num_t > &Vt, char JOBZ='A', real safeguard=1)
 Performs the SVD decomposition A = U.S.Vt Where U and Vt are orthonormal matrices.
Vec closestPointOnHyperplane (const Vec &x, const Mat &points, real weight_decay=0.)
 closest point to x on hyperplane that passes through all points (with weight decay)
real hyperplaneDistance (const Vec &x, const Mat &points, real weight_decay=0.)
 Distance between point x and closest point on hyperplane that passes through all points.
template<class MatT >
void diagonalizeSubspace (MatT &A, Mat &X, Vec &Ax, Mat &solutions, Vec &evalues, Mat &evectors)
ObjecttoObjectPtr (const PRandom &o)
PStreamoperator>> (PStream &in, PRandom &o)
PStreamoperator>> (PStream &in, PRandom *&o)
PStreamoperator<< (PStream &out, const PRandom &o)
PStreamoperator>> (PStream &in, PP< PRandom > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PRandom > *opt, PLearnDiff *diffs)
template<class T >
PStreamoperator<< (PStream &out, const ProbSparseMatrix &p)
template<class T >
PStreamoperator>> (PStream &in, ProbSparseMatrix &p)
real log_gamma (real xx)
real log_beta (real x, real y)
real incomplete_beta_continued_fraction (real z, real x, real y)
real incomplete_beta (real z, real x, real y)
real student_t_cdf (real t, int nb_degrees_of_freedom)
void manual_seed (int32_t x)
void seed ()
int32_t get_seed ()
real uniform_sample ()
real bounded_uniform (real a, real b)
real expdev ()
real gaussian_01 ()
real gaussian_mu_sigma (real mu, real sigma)
real gaussian_mixture_mu_sigma (Vec &w, const Vec &mu, const Vec &sigma)
real gamdev (int ia)
real poidev (real xm)
real bnldev (real pp, int n)
int multinomial_sample (const Vec &distribution)
int uniform_multinomial_sample (int N)
 return an integer between 0 and N-1 with equal probabilities
void fill_random_uniform (const Vec &dest, real minval=0, real maxval=1)
 sample each element from uniform distribution U[minval,maxval]
void fill_random_discrete (const Vec &dest, const Vec &set)
 sample each element from the given set
void fill_random_normal (const Vec &dest, real mean=0, real stdev=1)
 sample each element from Normal(mean,sdev^2) distribution
void fill_random_normal (const Vec &dest, const Vec &mean, const Vec &stdev)
 sample each element from multivariate Normal(mean,diag(sdev^2)) distribution
void fill_random_uniform (const Mat &dest, real minval, real maxval)
void fill_random_normal (const Mat &dest, real mean, real sdev)
double incbcf (double a, double b, double x)
void random_subset_indices (const TVec< int > &dest, int n)
 Fill dest with dest.length() unique indices of entries in (0,1,...n-1), chosen uniformly i.e.
real normal_sample ()
real binomial_sample (real prob1)
 alias
template<class T >
void bootstrap_rows (const TMat< T > &source, TMat< T > destination)
 sample with replacement the rows of source and put them in destination.
template<class T >
void shuffleElements (const TVec< T > &vec)
 randomly shuffle the entries of the TVector
template<class T >
void shuffleRows (const TMat< T > &mat)
template<class T >
TVec< intcomputeRanks (const TMat< T > &mat, TMat< T > &ranks, bool ignore_missing=false)
 For each column of 'mat', sort the elements and put in the 'ranks' matrix (of the same dimensions) the rank of original elements.
void evaluate_functions (const TVec< RealFunc > &functions, const Vec &input, Vec &featurevec)
 Computes featurevec which results from evaluating each function at the given input.
ObjecttoObjectPtr (const RealFunction &o)
PStreamoperator>> (PStream &in, RealFunction &o)
PStreamoperator>> (PStream &in, RealFunction *&o)
PStreamoperator<< (PStream &out, const RealFunction &o)
PStreamoperator>> (PStream &in, PP< RealFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealFunction > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RealFunctionFromKernel &o)
PStreamoperator>> (PStream &in, RealFunctionFromKernel &o)
PStreamoperator>> (PStream &in, RealFunctionFromKernel *&o)
PStreamoperator<< (PStream &out, const RealFunctionFromKernel &o)
PStreamoperator>> (PStream &in, PP< RealFunctionFromKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealFunctionFromKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RealFunctionOfInputFeature &o)
PStreamoperator>> (PStream &in, RealFunctionOfInputFeature &o)
PStreamoperator>> (PStream &in, RealFunctionOfInputFeature *&o)
PStreamoperator<< (PStream &out, const RealFunctionOfInputFeature &o)
PStreamoperator>> (PStream &in, PP< RealFunctionOfInputFeature > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealFunctionOfInputFeature > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RealFunctionProduct &o)
PStreamoperator>> (PStream &in, RealFunctionProduct &o)
PStreamoperator>> (PStream &in, RealFunctionProduct *&o)
PStreamoperator<< (PStream &out, const RealFunctionProduct &o)
PStreamoperator>> (PStream &in, PP< RealFunctionProduct > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealFunctionProduct > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RealRangeIndicatorFunction &o)
PStreamoperator>> (PStream &in, RealRangeIndicatorFunction &o)
PStreamoperator>> (PStream &in, RealRangeIndicatorFunction *&o)
PStreamoperator<< (PStream &out, const RealRangeIndicatorFunction &o)
PStreamoperator>> (PStream &in, PP< RealRangeIndicatorFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealRangeIndicatorFunction > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RealValueIndicatorFunction &o)
PStreamoperator>> (PStream &in, RealValueIndicatorFunction &o)
PStreamoperator>> (PStream &in, RealValueIndicatorFunction *&o)
PStreamoperator<< (PStream &out, const RealValueIndicatorFunction &o)
PStreamoperator>> (PStream &in, PP< RealValueIndicatorFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealValueIndicatorFunction > *opt, PLearnDiff *diffs)
template<class T >
void product (RowMapSparseMatrix< T > &M, const Vec &x, Vec &y)
template<class T >
void columnSum (RowMapSparseMatrix< T > mat, TVec< T > &result)
template<class T >
void doubleCentering (RowMapSparseMatrix< T > &mat, TVec< T > &avg, RowMapSparseMatrix< T > &res, T scale=1)
template<class T >
void averageAcrossRowsAndColumns (RowMapSparseMatrix< T > mat, Vec avg_across_rows, Vec avg_across_columns, bool only_on_non_zeros=true)
template<class T >
void addToRows (RowMapSparseMatrix< T > mat, Vec row, bool only_on_non_zeros=true)
template<class T >
void addToColumns (RowMapSparseMatrix< T > mat, Vec row, bool only_on_non_zeros=true)
ObjecttoObjectPtr (const ScaledConditionalCDFSmoother &o)
PStreamoperator>> (PStream &in, ScaledConditionalCDFSmoother &o)
PStreamoperator>> (PStream &in, ScaledConditionalCDFSmoother *&o)
PStreamoperator<< (PStream &out, const ScaledConditionalCDFSmoother &o)
PStreamoperator>> (PStream &in, PP< ScaledConditionalCDFSmoother > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ScaledConditionalCDFSmoother > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ShiftAndRescaleFeatureRealFunction &o)
PStreamoperator>> (PStream &in, ShiftAndRescaleFeatureRealFunction &o)
PStreamoperator>> (PStream &in, ShiftAndRescaleFeatureRealFunction *&o)
PStreamoperator<< (PStream &out, const ShiftAndRescaleFeatureRealFunction &o)
PStreamoperator>> (PStream &in, PP< ShiftAndRescaleFeatureRealFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ShiftAndRescaleFeatureRealFunction > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Smoother &o)
PStreamoperator>> (PStream &in, Smoother &o)
PStreamoperator>> (PStream &in, Smoother *&o)
PStreamoperator<< (PStream &out, const Smoother &o)
PStreamoperator>> (PStream &in, PP< Smoother > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Smoother > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SoftHistogramBinner &o)
PStreamoperator>> (PStream &in, SoftHistogramBinner &o)
PStreamoperator>> (PStream &in, SoftHistogramBinner *&o)
PStreamoperator<< (PStream &out, const SoftHistogramBinner &o)
PStreamoperator>> (PStream &in, PP< SoftHistogramBinner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftHistogramBinner > *opt, PLearnDiff *diffs)
SparseMatrix operator+ (const SparseMatrix &A, const SparseMatrix &B)
 add two sparse matrices (of same dimensions but with values in possibly different places)
SparseMatrix add (Array< SparseMatrix > &matrices)
 add a bunch of sparse matrices and return result
TMat< intSpearmanRankCorrelation (const VMat &x, const VMat &y, Mat &r, bool ignore_missing=false)
 Compute the Spearman Rank correlation statistic.
real testNoCorrelationAsymptotically (real r, int n)
 Return P(|R|>|r|) two-sided p-value for the null-hypothesis that there is no monotonic dependency, with r the observed Spearman Rank correlation between two paired samples of length n.
void testSpearmanRankCorrelationPValues (const VMat &x, const VMat &y, Mat &pvalues, bool ignore_missing=false)
 Compute P(|R|>|r|) two-sided p-value for the null-hypothesis that there is no monotonic dependency, with r the observed Spearman Rank correlation between two paired samples x and y of length n (column matrices).
void testSpearmanRankCorrelation (const VMat &x, const VMat &y, Mat &r, Mat &pvalues, bool ignore_missing=false)
 same as above but return also in r the rank correlations
real max_cdf_diff (Vec &v1, Vec &v2)
 Returns the max of the difference between the empirical cdf of 2 series of values.
real KS_test (real D, real N, int conv)
void KS_test (Vec &v1, Vec &v2, int conv, real &D, real &p_value)
 Kolmogorov-Smirnov test.
void KS_test (const VMat &m1, const VMat &m2, const int conv, Vec &Ds, Vec &p_values, const bool report_progress)
 This version work with nan value.
real KS_test (Vec &v1, Vec &v2, int conv=10)
 Returns result of Kolmogorov-Smirnov test between 2 samples The call sorts v1 and v2.
tuple< real, realremote_KS_test (Vec &v1, Vec &v2, int conv)
 Returns result of Kolmogorov-Smirnov test between 2 samples (D and p-value) The call sorts v1 and v2.
tuple< Vec, Vecremote_KS_tests (VMat &m1, VMat &m2, int conv)
 Returns result of Kolmogorov-Smirnov test for each pair of variable between the two VMat (Ds and p-values) The call sorts v1 and v2.
real paired_t_test (Vec u, Vec v)
 Given two paired sets u and v of n measured values, the paired t-test determines whether they differ from each other in a significant way under the assumptions that the paired differences are independent and identically normally distributed.
void DirichletEstimatorMMoments (const Mat &p, Vec &alpha)
 Estimate the parameters of a Dirichlet by maximum-likelihood.
void DirichletEstimatorMaxLik (const Mat &p, Vec alpha)
 Estimate the parameters of a Dirichlet by maximum-likelihood.
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("KS_test",&remote_KS_test,(BodyDoc("Returns result of Kolmogorov-Smirnov test between 2 samples.\n"), ArgDoc("v1","Vec1: first distr."), ArgDoc("v2","Vec2: second distr."), ArgDoc("conv","precision"), RetDoc("tuple of (D, p-value)")))
 declareFunction ("KS_tests",&remote_KS_tests,(BodyDoc("Returns result of Kolmogorov-Smirnov test between 2 VMats, for each column.\n"), ArgDoc("m1","VMat1: first distr."), ArgDoc("m2","VMat2: second distr."), ArgDoc("conv","precision"), RetDoc("tuple of (Ds, p-values)")))
void DirichletEstimatorMaxLik (const Mat &p, Vec &alpha)
 Estimate the parameters of a Dirichlet by maximum-likelihood.
int sortIdComparator (const void *i1, const void *i2)
TVec< RealMappingcomputeRanges (TVec< StatsCollector > stats, int discrete_mincount, int continuous_mincount)
PStreamoperator>> (PStream &in, StatsCollectorCounts &c)
 this class holds simple statistics about a field
PStreamoperator<< (PStream &out, const StatsCollectorCounts &c)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StatsCollectorCounts > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StatsCollector &o)
PStreamoperator>> (PStream &in, StatsCollector &o)
PStreamoperator>> (PStream &in, StatsCollector *&o)
PStreamoperator<< (PStream &out, const StatsCollector &o)
PStreamoperator>> (PStream &in, PP< StatsCollector > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StatsCollector > *opt, PLearnDiff *diffs)
template<>
void deepCopyField (StatsCollector &field, CopiesMap &copies)
 Apparently needed to specialize this method, otherwise it was the generic deepCopyField from CopiesMap.h that was called when deep copying a TVec<StatsCollector>.
ObjecttoObjectPtr (const PentaTest &o)
PStreamoperator>> (PStream &in, PentaTest &o)
PStreamoperator>> (PStream &in, PentaTest *&o)
PStreamoperator<< (PStream &out, const PentaTest &o)
PStreamoperator>> (PStream &in, PP< PentaTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PentaTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PentaTest) template<> class TypeTraits< PentaTest >
ObjecttoObjectPtr (const PLMathTest &o)
PStreamoperator>> (PStream &in, PLMathTest &o)
PStreamoperator>> (PStream &in, PLMathTest *&o)
PStreamoperator<< (PStream &out, const PLMathTest &o)
PStreamoperator>> (PStream &in, PP< PLMathTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLMathTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PLMathTest) template<> class TypeTraits< PLMathTest >
ObjecttoObjectPtr (const TMatTest &o)
PStreamoperator>> (PStream &in, TMatTest &o)
PStreamoperator>> (PStream &in, TMatTest *&o)
PStreamoperator<< (PStream &out, const TMatTest &o)
PStreamoperator>> (PStream &in, PP< TMatTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TMatTest > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (TMatTest) template<> class TypeTraits< TMatTest >
ObjecttoObjectPtr (const RemoveObservationTest &o)
PStreamoperator>> (PStream &in, RemoveObservationTest &o)
PStreamoperator>> (PStream &in, RemoveObservationTest *&o)
PStreamoperator<< (PStream &out, const RemoveObservationTest &o)
PStreamoperator>> (PStream &in, PP< RemoveObservationTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RemoveObservationTest > *opt, PLearnDiff *diffs)
void deepCopyField (Mat *&field, CopiesMap &copies)
template<class T >
int sizeInBytes (const TMat< T > &x)
template<class T , class I >
void selectElements (const TVec< T > &source, const TVec< I > &indices, TVec< T > &destination)
template<class T >
void elementsEqualTo (const TVec< T > &source, const T &value, const TVec< T > &destination)
 put in destination 1's when (*this)[i]==value, 0 otherwise
template<class T >
TVec< T > removeElement (const TVec< T > &v, int elemnum)
 if the element to remove is the first or the last one, then a submatrix (a view) of m will be returned (for efficiency) otherwise, it is a fresh copy with the element removed.
template<class T , class I >
void selectRows (const TMat< T > &source, const TVec< I > &row_indices, TMat< T > &destination)
template<class T , class I >
void selectColumns (const TMat< T > &source, const TVec< I > &column_indices, TMat< T > &destination)
template<class T , class I >
void select (const TMat< T > &source, const TVec< I > &row_indices, const TVec< I > &column_indices, TMat< T > &destination)
template<class T >
TMat< T > removeRow (const TMat< T > &m, int rownum)
 returns a new mat which is m with the given row removed if the row to remove is the first or the last one, then a submatrix (a view) of m will be returned (for efficiency) otherwise, it is a fresh copy with the row removed.
template<class T >
TMat< T > removeColumn (const TMat< T > &m, int colnum)
 returns a new mat which is m with the given column removed if the column to remove is the first or the last one, then a submatrix (a view) of m will be returned (for efficiency) otherwise, it is a fresh copy with the column removed.
template<class T >
TMat< T > diagonalmatrix (const TVec< T > &v)
template<class T >
TMat< T > deepCopy (const TMat< T > source)
template<class T >
TMat< T > deepCopy (const TMat< T > source, CopiesMap copies)
template<class T >
void deepCopyField (TMat< T > &field, CopiesMap &copies)
template<class T >
void clear (const TMat< T > &x)
template<class T >
void swap (TMat< T > &a, TMat< T > &b)
template<class T >
void operator<< (const TMat< T > &m1, const TMat< T > &m2)
 copy TMat << TMat
template<class T , class U >
void operator<< (const TMat< T > &m1, const TMat< U > &m2)
 copy TMat << TMat (different types)
template<class T >
void operator<< (const TMat< T > &m1, const TVec< T > &m2)
 copy TMat << Tvec
template<class T , class U >
void operator<< (const TMat< T > &m1, const TVec< U > &m2)
 copy TMat << Tvec (different types)
template<class T >
void operator<< (const TVec< T > &m1, const TMat< T > &m2)
 copy TVec << TMat
template<class T , class U >
void operator<< (const TVec< T > &m1, const TMat< U > &m2)
 copy TVec << TMat (different types)
template<class T , class U >
void operator>> (const TMat< T > &m1, const TMat< U > &m2)
 copy TMat >> TMat
template<class T , class U >
void operator>> (const TVec< T > &m1, const TMat< U > &m2)
 copy TVec >> TMat
template<class T , class U >
void operator>> (const TMat< T > &m1, const TVec< U > &m2)
 copy TMat >> Tvec
template<class T >
ostream & operator<< (ostream &out, const TMat< T > &m)
 printing a TMat
template<class T >
istream & operator>> (istream &in, const TMat< T > &m)
 inputing a TMat
template<class T >
TMat< T > rowmatrix (const TVec< T > &v)
 returns a view of this vector as a single row matrix
template<class T >
TMat< T > columnmatrix (const TVec< T > &v)
 returns a view of this vector as a single column matrix
template<class T >
void select (const TMat< T > &source, const TVec< T > &row_indices, const TVec< T > &column_indices, TMat< T > &destination)
template<class T >
void savePMat (const string &filename, const TMat< T > &mat)
template<class T >
PStreamoperator<< (PStream &out, const TMat< T > &m)
 Read and Write from C++ stream: write saves length() and width(), and read resizes accordingly.
template<class T >
PStreamoperator>> (PStream &in, TMat< T > &m)
string join (const TVec< string > &s, const string &separator)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("solveLinearSystemByCholesky",&remote_solveLinearSystemByCholesky,(BodyDoc("Solve a linear regression problem using Cholesky ""decomposition."), ArgDoc("XtX","Result of X'X, where X is the input data matrix, with samples ""as rows. A constant input can be added to compute a bias term.""Weight decay can be added on the diagonal terms (that do not ""correspond to the constant input when a bias is computed)."), ArgDoc("XtY","Result of X'Y, where Y is the target data matrix, with samples "" as rows."), RetDoc("The weights W of the linear regression, s.t. XW ~= Y")))
END_DECLARE_REMOTE_FUNCTIONS Mat remote_solveLinearSystemByCholesky (const Mat &A, const Mat &B)
 Remote method for 'solveLinearSystemByCholesky'.
template<class T >
TVec< T > sign (const TVec< T > &vec)
template<class T >
void compute_sign (const TVec< T > &vec, const TVec< T > &dest)
template<class T >
bool sortedVectorsIntersect (const TVec< T > &v1, const TVec< T > &v2)
 v1 and v2 have their elements in increasing order.
template<class T >
real one_against_all_hinge_loss (const TVec< T > &output, const int target)
template<class T >
void one_against_all_hinge_loss_bprop (const TVec< T > &output, const int target, TVec< T > d_output)
template<class T >
void softmax (const TVec< T > &x, const TVec< T > &y)
 y = softmax(x)
template<class T >
void softmaxMinus (const TVec< T > &x, const TVec< T > &y)
 y = softmax(-x)
template<class T >
void log_softmax (const TVec< T > &x, TVec< T > &y)
template<class T >
void exp (const TVec< T > &x, TVec< T > &y)
 computes y <- exp(x)
template<class T >
sumsquare (const TVec< T > &x)
 returns the sum of squared elements
template<class T >
sumabs (const TVec< T > &x)
 returns the sum of absolute values of elements
template<class T >
void squareElements (const TVec< T > &x)
 squares the elements of x in place
template<class T >
void squareElements (const TMat< T > &m)
 squares the elements of m in place
template<class T >
sumsquare (const TMat< T > &m)
 returns the sum of squared elements
template<class T >
sumabs (const TMat< T > &m)
 returns the sum of absolute value of the elements
template<class T >
void doubleCentering (const TMat< T > &mat, TVec< T > &avg, TMat< T > &res, T scale=T(1))
template<class T >
void multiply (const TVec< T > &source1, T source2, TVec< T > &destination)
 destination = source1*source2
template<class T >
sum (const TVec< T > &vec, bool ignore_missing)
 Sum of elements of a vector, which handles missing values.
template<class T >
sum (const TVec< T > &vec)
 Sum of elements of a vector, which assumes all elements are non-missing (will return NAN if T = float or double and there is a missing value).
template<class T >
sum_of_log (const TVec< T > &vec)
 Returns the sum of the log of the elements (this is also the log of the product of the elements but is more stable if you have very small elements).
template<class T >
product (const TVec< T > &vec)
template<class T >
mean (const TVec< T > &vec, bool ignore_missing=false)
 if ignore_missing==true, then the mean is computed by ignoring the possible MISSING_VALUE in the Vec.
template<class T >
harmonic_mean (const TVec< T > &vec, bool ignore_missing=false)
template<class T >
avgdev (const TVec< T > &vec, T meanval, bool ignore_missing=false)
template<class T >
geometric_mean (const TVec< T > &vec)
template<class T >
weighted_mean (const TVec< T > &vec, const TVec< T > &weights, bool ignore_missing=false)
template<class T >
variance (const TVec< T > &vec, T meanval, bool ignore_missing=false)
template<class T >
covariance (const TVec< T > &vec1, const TVec< T > &vec2, T mean1, T mean2)
template<class T >
weighted_variance (const TVec< T > &vec, const TVec< T > &weights, T no_weighted_mean, T weighted_mean)
template<class T >
TVec< T > histogram (const TVec< T > &vec, T minval, T maxval, int nbins)
template<class T >
max (const TVec< T > &vec)
 Returns the maximum.
template<class T >
max (const TVec< T > &vec, int &argmax)
 Returns the maximum and computes its index.
template<class T >
min (const TVec< T > &vec)
 Returns the minimum.
template<class T >
min (const TVec< T > &vec, int &argmin)
 Returns the minimum and computes its index.
template<class T >
maxabs (const TVec< T > &vec)
 Returns the maximum in absolute value.
template<class T >
maxabs (const TVec< T > &vec, int &argmax)
 Returns the maximum in absolute value and compute its index.
template<class T >
minabs (const TVec< T > &vec)
 Returns the minimum in absolute value.
template<class T >
minabs (const TVec< T > &vec, int &argmin)
 Returns the minimum in absolute value and compute its index.
template<class T >
int argmax (const TVec< T > &vec)
template<class T >
int argmax (const TVec< T > &vec, bool ignore_missing)
template<class T >
int argmin (const TVec< T > &vec)
template<class T >
int argmin (const TVec< T > &vec, bool ignore_missing)
template<class T >
pownorm (const TVec< T > &vec, double n)
template<class T >
pownorm (const TVec< T > &vec)
template<class T >
norm (const TVec< T > &vec, double n)
template<class T >
norm (const TVec< T > &vec)
template<class T >
void normalize (const TVec< T > &vec, double n=2)
template<class T >
powdistance (const TVec< T > &vec1, const TVec< T > &vec2, double n, bool ignore_missing=false)
 Compute ||vec1 - vec2||_n^n.
template<class T >
powdistance (const TVec< T > &vec1, const TVec< T > &vec2)
template<class T >
dist (const TVec< T > &vec1, const TVec< T > &vec2, double n)
template<class T >
L2distance (const TVec< T > &vec1, const TVec< T > &vec2)
template<class T >
L1distance (const TVec< T > &vec1, const TVec< T > &vec2)
template<class T >
weighted_powdistance (const TVec< T > &vec1, const TVec< T > &vec2, double n, const TVec< T > &weights)
template<class T >
weighted_distance (const TVec< T > &vec1, const TVec< T > &vec2, double n, const TVec< T > &weights)
template<class T >
void operator+= (const TVec< T > &vec1, const TVec< T > &vec2)
 element-wise +
template<class T >
void operator+= (const TVec< T > &vec, T scalar)
template<class T >
TVec< T > operator- (const TVec< T > &vec)
template<class T >
void operator-= (const TVec< T > &vec1, const TVec< T > &vec2)
template<class T >
void operator-= (const TVec< T > &vec, T scalar)
template<class T >
void operator*= (const TVec< T > &vec1, const TVec< T > &vec2)
template<class T >
void operator*= (const TVec< T > &vec, T factor)
template<class T >
void operator/= (const TVec< T > &vec1, const TVec< T > &vec2)
template<class T >
void operator/= (const TVec< T > &vec, T scalar)
template<class T >
void operator/= (const TVec< T > &vec, int scalar)
template<class T >
void compute_log (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > log (const TVec< T > &src)
template<class T >
void compute_sqrt (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > sqrt (const TVec< T > &src)
template<class T >
void compute_safelog (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > safelog (const TVec< T > &src)
template<class T >
void compute_tanh (const TVec< T > &src, const TVec< T > &dest)
template<class T >
void bprop_tanh (const TVec< T > &tanh_x, const TVec< T > &d_tanh_x, TVec< T > &d_x)
template<class T >
TVec< T > tanh (const TVec< T > &src)
template<class T >
void compute_fasttanh (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > fasttanh (const TVec< T > &src)
template<class T >
void compute_sigmoid (const TVec< T > &src, const TVec< T > &dest)
template<class T >
void log_sigmoid (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > sigmoid (const TVec< T > &src)
template<class T >
void compute_fastsigmoid (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > fastsigmoid (const TVec< T > &src)
template<class T >
void compute_inverse_sigmoid (const TVec< T > &src, const TVec< T > &dest)
template<class T >
TVec< T > inverse_sigmoid (const TVec< T > &src)
template<class T >
void negateElements (const TVec< T > &vec)
template<class T >
void invertElements (const TVec< T > &vec)
template<class T >
TVec< T > inverted (const TVec< T > &vec)
template<class T >
dot (const TVec< T > &vec1, const TVec< T > &vec2)
template<class V , class T , class U >
dot (const TVec< T > &vec1, const TVec< U > &vec2)
 Special dot product that allows TVec's of different types, as long as operator*(T,U) is defined.
template<class T >
dot (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
TVec< T > operator- (const TVec< T > &v1, const TVec< T > &v2)
template<class T >
TVec< T > operator- (T v1, const TVec< T > &v2)
template<class T >
TVec< T > operator- (const TVec< T > &v1, T v2)
template<class T >
TVec< T > operator+ (const TVec< T > &v1, const TVec< T > &v2)
template<class T >
TVec< T > operator+ (T v1, const TVec< T > &v2)
template<class T >
TVec< T > operator+ (const TVec< T > &v1, T v2)
template<class T >
TVec< T > operator% (const TVec< T > &v1, const TVec< T > &v2)
template<class T >
TVec< T > operator* (T scalar, const TVec< T > &v)
template<class T >
TVec< T > operator* (const TVec< T > &v1, T v2)
template<class T >
TVec< T > operator/ (const TVec< T > &v1, const TVec< T > &v2)
template<class T >
TVec< T > operator/ (T v1, const TVec< T > &v2)
template<class T1 , class T2 >
TVec< T1 > operator/ (const TVec< T1 > &v1, T2 scalar)
template<class T >
logadd (const TVec< T > &vec)
template<class T >
output_margin (const TVec< T > &class_scores, int correct_class)
template<class T >
void fill_one_hot (const TVec< T > &vec, int hotpos, T coldvalue, T hotvalue)
template<class T >
TVec< T > one_hot (int length, int hotpos, T coldvalue, T hotvalue)
template<class T >
TVec< T > square (const TVec< T > &vec)
template<class T >
void square (TVec< T > &result, const TVec< T > &vec)
template<class T >
TVec< T > squareroot (const TVec< T > &vec)
template<class T >
TVec< T > remove_missing (const TVec< T > &vec)
 @ return a new array that contain only the non-missing value @ see remove_missing_inplace for inplace version
template<class T >
void remove_missing_inplace (TVec< T > &v)
 remove all missing value inplace while keeping the order
template<class T , class U , class V >
TVec< U > apply (const TVec< T > &vec, U(*func)(V))
 Transform a vector of T into a vector of U through a unary function.
template<class T , class U >
void apply (const TVec< T > &source, TVec< U > &destination, U(*func)(T))
 Transform a vector of T into a vector of U through a unary function.
template<class T , class U , class V >
void apply (const TVec< T > &src1, const TVec< U > &src2, TVec< V > &dest, V(*func)(T, U))
 Transform a vector of T and a vector of U into a vector of V, through a binary function.
template<class T >
void multiply (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void multiplyAdd (const TVec< T > &source1, const TVec< T > &source2, T source3, TVec< T > &destination)
template<class T >
void multiplyScaledAdd (const TVec< T > &source, T a, T b, const TVec< T > &destination)
template<class T >
void multiplyScaledAdd (const TMat< T > &source, T a, T b, const TMat< T > &destination)
template<class T >
void add (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void add (const TVec< T > &source1, T source2, TVec< T > &destination)
template<class T >
void substract (const TVec< T > &source1, T source2, TVec< T > &destination)
template<class T >
void substract (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void substractAcc (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void substract (T source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void divide (const TVec< T > &source1, T source2, TVec< T > &destination)
template<class T >
void divide (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void divide (T source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void max (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void max (const TVec< T > &source1, T source2, TVec< T > &destination)
template<class T >
void min (const TVec< T > &source1, const TVec< T > &source2, TVec< T > &destination)
template<class T >
void min (const TVec< T > &source1, T source2, TVec< T > &destination)
template<class T >
TVec< T > softmax (const TVec< T > &x)
template<class T >
void tanh (const TVec< T > &x, TVec< T > &y)
template<class T >
TVec< T > exp (const TVec< T > &vec)
template<class T >
TVec< T > nonZeroIndices (TVec< T > v)
template<class T >
TVec< T > nonZeroIndices (TVec< bool > v)
template<class T >
void complement_indices (TVec< T > &indices, int n, TVec< T > &complement_indices, TVec< T > &buffer)
template<class T >
void equals (const TVec< T > &src, T v, TVec< T > &dest)
template<class T >
void isLargerThan (const TVec< T > &first, const TVec< T > &second, TVec< T > &dest)
template<class T >
void isLargerThanOrEqualTo (const TVec< T > &first, const TVec< T > &second, TVec< T > &dest)
template<class T >
void isSmallerThan (const TVec< T > &first, const TVec< T > &second, TVec< T > &dest)
template<class T >
void isSmallerThanOrEqualTo (const TVec< T > &first, const TVec< T > &second, TVec< T > &dest)
template<class T >
void ifThenElse (const TVec< T > &if_vec, const TVec< T > &then_vec, const TVec< T > &else_vec, TVec< T > &dest)
template<class T >
int vec_counts (const TVec< T > &src, T value)
template<class T >
int vec_find (const TVec< T > &src, T f)
template<class T >
estimatedCumProb (T x, TVec< T > bins)
template<class T >
int positionOfkthOrderedElement (const TVec< T > &vec, int k)
template<class T >
kthOrderedElement (const TVec< T > &vec, int k)
 returns the value of the kth ordered element of v k can take values 0 to vec.length()-1
template<class T >
median (const TVec< T > &vec)
 Return the median value of vector.
template<class T >
selectAndOrder (const TVec< T > &vec, int pos)
 find the element at position pos that would result from a sort and put all elements (not in order!) lower than v[pos] in v[i<pos].
template<class T >
TVec< T > getQuantiles (const TVec< T > &vec, int q)
template<class T >
TVec< T > nonZero (const TVec< T > &vec)
 returns a vector composed of the values of v that are different from 0;
template<class T >
TVec< T > positiveValues (const TVec< T > &vec)
 returns a vector composed of the values of v that are greater than 0;
template<class T >
int positionOfClosestElement (const TVec< T > &vec, const T &value, bool is_sorted_vec=false)
template<class T >
void projectOnOrthogonalSubspace (const TVec< T > &vec, const TMat< T > &orthonormal_subspace)
template<class T >
void multiplyAcc (const TVec< T > &vec, const TVec< T > &x, T scale)
 vec[i] += x[i]*scale;
template<class T >
void exponentialMovingAverageUpdate (const TVec< T > &vec, const TVec< T > &x, T alpha)
 TVec[i] = (1-alpha)*TVec[i]+x[i]*alpha;.
template<class T >
void exponentialMovingVarianceUpdate (const TVec< T > &vec, const TVec< T > &x, const TVec< T > &mu, T alpha)
 TVec[i] = (1-alpha)*TVec[i]+(x[i]-mu[i])^2*alpha;.
template<class T >
void exponentialMovingSquareUpdate (const TVec< T > &vec, const TVec< T > &x, T alpha)
 TVec[i] = (1-alpha)*TVec[i]+x[i]^2*alpha;.
template<class T >
void multiplyAcc (const TVec< T > &vec, const TVec< T > &x, const TVec< T > &y)
 vec[i] += x[i]*y[i];
template<class T >
void squareMultiplyAcc (const TVec< T > &vec, const TVec< T > &x, T scale)
 TVec[i] += x[i]*x[i]*scale;.
template<class T >
void squareAcc (const TVec< T > &vec, const TVec< T > &x)
 TVec[i] += x[i]*x[i];.
template<class T >
void squareSubtract (const TVec< T > &vec, const TVec< T > &x)
 Tvec[i] -= x[i]*x[i];.
template<class T >
void diffSquareMultiplyAcc (const TVec< T > &vec, const TVec< T > &x, const TVec< T > &y, T scale)
 TVec[i] += (x[i]-y[i])^2*scale;.
template<class T >
void diffSquareMultiplyScaledAcc (const TVec< T > &vec, const TVec< T > &x, const TVec< T > &y, T fact1, T fact2)
 TVec[i] = TVec[i]*fact1 + (x[i]-y[i])^2*fact2;.
template<class T >
void product (const TVec< T > &result, const TMat< T > &m, const TVec< T > &v)
 result[i] = sum_j m[i,j] * v[j]
template<class T >
void productAcc (const TVec< T > &result, const TMat< T > &m, const TVec< T > &v)
 result[i] += sum_j m[i,j] * v[j]
template<class T >
void productScaleAcc (const TVec< T > &result, const TMat< T > &m, bool transpose_m, const TVec< T > &v, T alpha, T beta)
 result[i] = alpha * sum_j m[i,j] * v[j] + beta * v[i] (Will use the transpose of m if transpose_m is true)
template<class T >
void productScaleAcc (const TVec< T > &result, const TMat< T > &m, const TVec< T > &v, T alpha, T beta)
 result[i] = alpha * sum_j m[i,j] * v[j] + beta * v[i]
template<class T >
void transposeProduct (const TVec< T > &result, const TMat< T > &m, const TVec< T > &v)
 result[i] = sum_j m[j,i] * v[j] Equivalently: rowvec(result) = rowvec(v) .
template<class T >
void transposeProductAcc (const TVec< T > &result, const TMat< T > &m, const TVec< T > &v)
 result[i] += sum_j m[j,i] * v[j]
template<class T >
void transposeProductScaleAcc (const TVec< T > &result, const TMat< T > &m, const TVec< T > &v, T alpha, T beta)
 result[i] = alpha * sum_j m[j,i] * v[j] + beta * result[i]
template<class T >
void diagonalizedFactorsProduct (TMat< T > &result, const TMat< T > &U, const TVec< T > d, const TMat< T > V, bool accumulate=false)
 return the matrix with elements (i,j) = sum_k U_{ik} d_k V_{kj}
template<class T >
void diagonalizedFactorsProductBprop (const TMat< T > &dCdresult, const TMat< T > &U, const TVec< T > d, const TMat< T > V, TMat< T > &dCdU, TVec< T > &dCdd, TMat< T > &dCdV)
 GIVEN that res(i,j) = sum_k U_{ik} d_k V_{kj}, and given dC/dres, U,d and V, accumulate gradients on dC/dU, dC/dd and dC/dV: dC/dU[i,k] += sum_j dC/dres[i,j] d_k V[k,j] dC/dd[k] += sum_{ij} dC/dres[i,j] U[i,k] V[k,j] dC/dV[k,j] += d_k * sum_i U[i,k] dC/dres[i,j].
template<class T >
void diagonalizedFactorsProductTranspose (TMat< T > &result, const TMat< T > &U, const TVec< T > d, const TMat< T > V, bool accumulate=false)
 return the matrix with elements (i,j) = sum_k U_{ik} d_k V_{jk}
template<class T >
void diagonalizedFactorsProductTransposeBprop (const TMat< T > &dCdresult, const TMat< T > &U, const TVec< T > d, const TMat< T > V, TMat< T > &dCdU, TVec< T > &dCdd, TMat< T > &dCdV)
template<class T >
void diagonalizedFactorsTransposeProduct (TMat< T > &result, const TMat< T > &U, const TVec< T > d, const TMat< T > V, bool accumulate=false)
 return the matrix with elements (i,j) = sum_k U_{ki} d_k V_{kj}
template<class T >
void diagonalizedFactorsTransposeProductBprop (const TMat< T > &dCdresult, const TMat< T > &U, const TVec< T > d, const TMat< T > V, TMat< T > &dCdU, TVec< T > &dCdd, TMat< T > &dCdV)
template<class T >
void diagonalizedFactorsTransposeProductTranspose (TMat< T > &result, const TMat< T > &U, const TVec< T > d, const TMat< T > V, bool accumulate=false)
 return the matrix with elements (i,j) = sum_k U_{ki} d_k V_{jk}
template<class T >
void diagonalizedFactorsTransposeProductTransposeBprop (const TMat< T > &dCdresult, const TMat< T > &U, const TVec< T > d, const TMat< T > V, TMat< T > &dCdU, TVec< T > &dCdd, TMat< T > &dCdV)
template<class T >
matRowDotVec (const TMat< T > &mat, int i, const TVec< T > v)
 return dot product of i-th row with vector v
template<class T >
matColumnDotVec (const TMat< T > &mat, int j, const TVec< T > v)
 return dot product of j-th column with vector v
template<class T >
void matRowsDots (TVec< T > v, const TMat< T > &A, const TMat< T > &B)
 return dot products of i-th row of A with i-th row of B in vector v
template<class T >
void matRowsDotsAcc (TVec< T > v, const TMat< T > &A, const TMat< T > &B)
 return dot products of i-th row of A with i-th row of B in vector v
template<class T >
void fillItSymmetric (const TMat< T > &mat)
 Fill the bottom left part of a matrix with its top right part, so that it becomes symmetric.
template<class T >
void makeItSymmetric (const TMat< T > &mat, T max_dif)
template<class T >
void product (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] = sum_k m1[i,k] * m2[k,j]
template<class T >
void productAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] += sum_k m1[i,k] * m2[k,j]
template<class T >
void productScaleAcc (const TMat< T > &mat, const TMat< T > &m1, bool transpose_m1, const TMat< T > &m2, bool transpose_m2, T alpha, T beta)
 mat[i,j] = alpha sum_k m1[i,k] * m2[k,j] + beta mat[i,j]
template<class T >
void productScaleAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2, T alpha, T beta)
 mat[i,j] = alpha * sum_k m1[i,k] * m2[k,j] + beta * mat[i,j]
template<class T >
void product2Acc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void squareProductAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void externalProduct (const TMat< T > &mat, const TVec< T > &v1, const TVec< T > &v2)
template<class T >
void externalProductAcc (const TMat< T > &mat, const TVec< T > &v1, const TVec< T > &v2)
template<class T >
void externalProductScaleAcc (const TMat< T > &mat, const TVec< T > &v1, const TVec< T > &v2, T gamma)
template<class T >
void externalProductScaleAcc (const TMat< T > &mat, const TVec< T > &v1, const TVec< T > &v2, T gamma, T alpha)
template<class T >
void externalProductMultUpdate (const TMat< T > &mat, const TVec< T > &v1, const TVec< T > &v2)
template<class T >
void externalProductDivUpdate (const TMat< T > &mat, const TVec< T > &v1, const TVec< T > &v2)
template<class T >
void productTranspose (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] = sum_k m1[i,k] * m2[j,k]
template<class T >
void squareProductTranspose (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void product2Transpose (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void productTransposeAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] += sum_k m1[i,k] * m2[j,k]
template<class T >
void productTransposeScaleAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2, T alpha, T beta)
 mat[i,j] = alpha * sum_k m1[i,k] * m2[j,k] + beta * mat[i,j]
template<class T >
void product2TransposeAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void squareProductTransposeAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void transposeProduct (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] = sum_k m1[k,i] * m2[k,j]
template<class T >
void transposeProduct2 (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void transposeProductAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] += sum_k m1[k,i] * m2[k,j]
template<class T >
void transposeProductScaleAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2, T alpha, T beta)
template<class T >
void transposeProduct2Acc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void transposeTransposeProduct (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] = sum_k m1[k,i] * m2[j,k]
template<class T >
void transposeTransposeProductAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2)
 mat[i,j] += sum_k m1[k,i] * m2[j,k]
template<class T >
void transposeTransposeProductScaleAcc (const TMat< T > &mat, const TMat< T > &m1, const TMat< T > &m2, T alpha, T beta)
 mat[i,j] = alpha * sum_k m1[k,i] * m2[j,k] + beta * mat[i,j]
template<class T >
trace (const TMat< T > &mat)
template<class T >
void regularizeMatrix (const TMat< T > &mat, T tolerance)
 Applies a regularizer : diag(A) += (tolerance * trace(A))
template<class T >
void makeRowsSumTo1 (const TMat< T > &mat)
template<class T >
void multiply (const TMat< T > &result, const TMat< T > &x, T scale)
template<class T >
void multiply (TMat< T > &result, const TMat< T > &x, const TVec< T > &y, bool transpose=false)
template<class T >
TMat< T > operator* (const TMat< T > &m, const T &scalar)
template<class T >
TMat< T > operator* (const T &scalar, const TMat< T > &m)
template<class T >
TMat< T > operator/ (const TMat< T > &m, const T &scalar)
template<class T >
void multiplyAcc (const TMat< T > &mat, const TMat< T > &x, T scale)
template<class T >
void multiplyAcc (const TMat< T > &mat, const TMat< T > &x, const TMat< T > &y)
template<class T >
void squareMultiplyAcc (const TMat< T > &mat, const TMat< T > &x, T scale)
template<class T >
void diffSquareMultiplyAcc (const TMat< T > &mat, const TMat< T > &x, const TMat< T > &y, T scale)
template<class T >
void swapRows (const TMat< T > &mat, int i, int j)
 Swap rows i and j in matrix 'mat'.
template<class T >
TVec< T > selectAndOrder (const TMat< T > &mat, int pos, int colnum=0)
template<class T >
void addToDiagonal (const TMat< T > &mat, T lambda)
template<class T >
void addToDiagonal (const TMat< T > &mat, const TVec< T > &lambda)
template<class T >
void fillDiagonal (const TMat< T > &mat, T val)
 Fill diagonal with the specified value.
template<class T >
void fillDiagonal (const TMat< T > &mat, const TVec< T > &v)
 Fill diagonal with the specified vector.
template<class T >
void diag (const TMat< T > &mat, const TVec< T > &d)
 Copy diagonal of mat in d (which must have correct size)
template<class T >
TVec< T > diag (const TMat< T > &mat)
template<class T >
void diagonalOfSquare (const TMat< T > &mat, const TVec< T > &d)
template<class T >
void projectOnOrthogonalSubspace (const TMat< T > &mat, TMat< T > orthonormal_subspace)
template<class T >
void averageAcrossRowsAndColumns (const TMat< T > &mat, TVec< T > &avg_across_rows, TVec< T > &avg_across_columns, bool ignored)
template<class T >
void addToRows (const TMat< T > &mat, const TVec< T > row, bool ignored)
template<class T >
void addToColumns (const TMat< T > &mat, const TVec< T > col, bool ignored)
template<class T >
void substractFromRows (const TMat< T > &mat, const TVec< T > row, bool ignored)
template<class T >
void substractFromColumns (const TMat< T > &mat, const TVec< T > col, bool ignored)
template<class T >
void addToMat (const TMat< T > &mat, T scalar, bool ignored)
template<class T >
sum (const TMat< T > &mat, bool ignore_missing)
 Sum of elements of a matrix, which handles missing values.
template<class T >
sum (const TMat< T > &mat)
 Sum of elements of a matrix, which assumes all elements are non-missing (will return NAN if T = float or double and there is a missing value).
template<class T >
product (const TMat< T > &mat)
template<class T >
sum_of_squares (const TMat< T > &mat)
template<class T >
mean (const TMat< T > &mat)
template<class T >
geometric_mean (const TMat< T > &mat)
template<class T >
variance (const TMat< T > &mat, T meanval)
template<class T >
correlation (const TMat< T > &mat)
template<class T >
correlation (const TVec< T > &x, const TVec< T > &y)
template<class T >
min (const TMat< T > &mat)
 Returns the minimum.
template<class T >
min (const TMat< T > &mat, int &min_i, int &min_j)
 Returns the minimum and computes its position.
template<class T >
max (const TMat< T > &mat)
 Returns the maximum.
template<class T >
max (const TMat< T > &mat, int &max_i, int &max_j)
 Returns the maximum and computes its position.
template<class T >
minabs (const TMat< T > &mat)
 Returns the minimum in absolute value.
template<class T >
minabs (const TMat< T > &mat, int &min_i, int &min_j)
 Returns the minimum in absolute value and computes its position.
template<class T >
maxabs (const TMat< T > &mat)
 Returns the maximum in absolute value.
template<class T >
maxabs (const TMat< T > &mat, int &max_i, int &max_j)
 Returns the maximum in absolute value and computes its position.
template<class T >
void argmin (const TMat< T > &mat, int &mini, int &minj)
 Stores the position of the min in the 'mini' & 'minj' arg.
template<class T >
void argmax (const TMat< T > &mat, int &maxi, int &maxj)
template<class T >
int argmin (const TMat< T > &m)
 return mini*width+minj
template<class T >
int argmax (const TMat< T > &m)
 return maxi*width+maxj
template<class T >
void rowSum (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowSumAcc (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowSum (const TMat< T > &mat, const TVec< T > &colvec)
template<class T >
void rowMean (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowVariance (const TMat< T > &mat, const TMat< T > &singlecolumn, const TMat< T > &rowmean)
template<class T >
void rowSumOfSquares (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowMax (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowMax (const TMat< T > &mat, const TVec< T > &colvec)
template<class T >
void rowMin (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowMin (const TMat< T > &mat, const TVec< T > &colvec)
template<class T >
void rowArgmax (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void rowArgmin (const TMat< T > &mat, const TMat< T > &singlecolumn)
template<class T >
void columnSum (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnSumOfSquares (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnMean (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnWeightedMean (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnVariance (const TMat< T > &mat, TVec< T > &result, const TVec< T > &columnmean)
template<class T >
void columnWeightedVariance (const TMat< T > &mat, TVec< T > &result, const TVec< T > &column_weighted_mean)
template<class T >
void columnMax (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnMin (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnArgmax (const TMat< T > &mat, TVec< T > &result)
template<class T >
void columnArgmin (const TMat< T > &mat, TVec< T > &result)
template<class T >
mahalanobis_distance (const TVec< T > &input, const TVec< T > &meanvec, const TMat< T > &inversecovmat)
template<class T >
void computeMean (const TMat< T > &m, TVec< T > &meanvec)
 compute the mean of the rows of m (looping over columns)
template<class T >
void computeMeanAndVariance (const TMat< T > &m, TVec< T > &meanvec, TVec< T > &variancevec)
 compute the mean and variance of the rows of m (looping over columns)
template<class T >
void computeInverseStandardDeviationFromMeanAndSquareMean (const TMat< T > &inverse_standard_deviation, const TMat< T > &means, const TMat< T > &mean_of_squares, real default_stddev=1, real min_stddev=-1)
 inverse_standard_deviation[i,j] = 1/sqrt(mean_of_squares[i,j] - means[i,j]^2) If 'min_stddev' is provided, any standard deviation less than this value will be set to 'default_stddev' without any warning being issued (even when a negative variance is encountered, which can happen because of numerical approximation for an almost constant variable).
template<class T >
void computeCovar (const TMat< T > &m, const TVec< T > &meanvec, TMat< T > &covarmat)
template<class T >
void computeMeanAndCovar (const TMat< T > &m, TVec< T > &meanvec, TMat< T > &covarmat)
template<class T >
void computeMeanAndStddev (const TMat< T > &m, TVec< T > &meanvec, TVec< T > &stddevvec)
 compute the mean and standard deviations of the rows of m (looping over columns)
template<class T >
void computeColumnsMeanAndStddev (const TMat< T > &m, TMat< T > &meanvec, TMat< T > &stddevvec)
 compute the mean and standard deviations of the colums of m (looping over s) (the result is stored in column vectors meanvec and stddevvec)
template<class T >
void normalize (TMat< T > &m)
 substract mean, and divide by stddev (these are estimated globally)
template<class T >
void normalizeRows (const TMat< T > &m)
 Divides each row by the sum of its elements.
template<class T >
void normalizeColumns (const TMat< T > &m)
 Divides each column by the sum of its elements.
template<class T >
void normalize (TMat< T > &m, double n)
 divide each row by its n norm
template<class T >
void operator+= (const TMat< T > &m, T scalar)
template<class T >
void operator*= (const TMat< T > &m, T scalar)
template<class T >
void operator-= (const TMat< T > &m, T scalar)
template<class T >
void operator/= (const TMat< T > &m, T scalar)
template<class T >
void operator/= (const TMat< T > &m, int scalar)
template<class T >
void operator+= (const TMat< T > &m, const TVec< T > &v)
 adds v to every row
template<class T >
void operator-= (const TMat< T > &m, const TVec< T > &v)
 subtracts v from every row
template<class T >
void operator*= (const TMat< T > &m, const TVec< T > &v)
 does an elementwise multiplication of every row by v
template<class T >
void operator*= (const TMat< T > &m1, const TMat< T > &m2)
 does an elementwise multiplication
template<class T >
void operator/= (const TMat< T > &m, const TVec< T > &v)
template<class T >
void operator/= (const TMat< T > &m1, const TMat< T > &m2)
 does an elementwise division
template<class T >
void operator+= (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void operator-= (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
TMat< T > operator- (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
TMat< T > operator+ (const TMat< T > &m1, const TMat< T > &m2)
template<class T >
void substract (const TMat< T > &m1, const TMat< T > &m2, TMat< T > &destination)
template<class T >
void add (const TMat< T > &m1, const TMat< T > &m2, TMat< T > &destination)
template<class T >
TMat< T > operator- (const TMat< T > &m)
 return a negated copy of m
template<class T >
void negateElements (const TMat< T > &m)
 x'_ij = -x_ij;
template<class T >
void invertElements (const TMat< T > &m)
 x'_ij = 1.0/x_ij;
template<class T >
TMat< T > leftPseudoInverse (TMat< T > &m)
template<class T >
void leftPseudoInverse (const TMat< T > &m, TMat< T > &inv)
template<class T >
TMat< T > rightPseudoInverse (TMat< T > &m)
template<class T >
void rightPseudoInverse (const TMat< T > &m, TMat< T > &inv)
template<class T >
TMat< T > inverse (TMat< T > &m)
template<class T >
void inverse (const TMat< T > &m, TMat< T > &inv)
template<class T >
void solveLinearSystemByCholesky (const TMat< T > &A, const TMat< T > &B, TMat< T > &X, TMat< T > *pL=0, TVec< T > *py=0)
template<class T >
void solveTransposeLinearSystemByCholesky (const TMat< T > &A, const TMat< T > &B, TMat< T > &X, TMat< T > *pL=0, TVec< T > *py=0)
template<class T >
void choleskyDecomposition (const TMat< T > &A, TMat< T > &L)
template<class T >
void bpropCholeskyDecomposition (const TMat< T > &A, const TMat< T > &L, TMat< T > &dC_dA, TMat< T > &dC_dL)
template<class T >
void choleskyLeftSolve (const TMat< T > &L, const TVec< T > &b, const TVec< T > &y)
template<class T >
void choleskyRightSolve (const TMat< T > &L, TVec< T > &y, TVec< T > &x)
template<class T >
void choleskySolve (const TMat< T > &L, TVec< T > b, TVec< T > x, TVec< T > &y)
template<class T >
void choleskySolve (const TMat< T > &L, const TMat< T > &B, TMat< T > &X, TVec< T > &y)
template<class T >
void bpropCholeskySolve (const TMat< T > &L, const TVec< T > &x, const TVec< T > &y, TMat< T > &dC_dL, TVec< T > &dC_db, TVec< T > &dC_dx)
template<class T >
real choleskyInvert (const TMat< T > &A, TMat< T > &Ainv)
template<class T >
TVec< T > choleskySolve (const TMat< T > &A, const TVec< T > &b)
template<class T >
TMat< T > choleskyInvert (const TMat< T > &A)
template<class T >
void LU_decomposition (TMat< T > &A, TVec< T > &Trow, int &detsign, TVec< T > *p=0)
template<class T >
det (const TMat< T > &A, bool log_det=false)
 Return the determinant of A, using LU decomposition.
template<class T >
det (const TMat< T > &LU, int detsign, bool log_det=false)
 Return the determinant of A, whose LU decomposition is given ('detsign' is as set by the LU_decomposition(..) function).
template<class T >
void equals (const TMat< T > &src, T v, TMat< T > &dest)
template<class T >
void transpose (const TMat< T > src, TMat< T > dest)
template<class T >
TMat< T > transpose (const TMat< T > &src)
template<class T , class U >
void apply (U(*func)(T), const TMat< T > &source, TMat< U > &destination)
 Transform a matrix of T into a matrix of U through a unary function.
template<class T , class U >
void apply (const TMat< T > &source, TMat< U > &destination, U(*func)(T))
 Transform a matrix of T into a matrix of U through a unary function Same as above, for coherence with TVec<T>'s notation.
template<class T >
void apply (T(*func)(const TVec< T > &), const TMat< T > &m, TMat< T > &dest)
template<class T >
void apply (T(*func)(const TVec< T > &, const TVec< T > &), const TMat< T > &m1, const TMat< T > &m2, TMat< T > &dest)
template<class T >
void linearRegressionNoBias (TMat< T > inputs, TMat< T > outputs, T weight_decay, TMat< T > weights)
template<class T >
void linearRegression (TMat< T > inputs, TMat< T > outputs, T weight_decay, TMat< T > theta_t)
template<class T >
void linearRegression (TVec< T > inputs, TVec< T > outputs, T weight_decay, TVec< T > theta_t)
template<class T >
TMat< T > smooth (TMat< T > data, int windowsize)
template<class T >
TMat< T > square (const TMat< T > &m)
template<class T >
TMat< T > sqrt (const TMat< T > &m)
template<class T >
void affineMatrixInitialize (TMat< T > W, bool output_on_columns=true, real scale=1.0)
template<class T >
TMat< T > grep (TMat< T > data, int col, TVec< T > values, bool exclude=false)
template<class T >
void convolve (TMat< T > m, TMat< T > mask, TMat< T > result)
template<class T >
void subsample (TMat< T > m, int thesubsamplefactor, TMat< T > result)
template<class T >
void classification_confusion_matrix (TMat< T > outputs, TMat< T > target_classes, TMat< T > confusion_matrix)
template<class T >
int GramSchmidtOrthogonalization (TMat< T > A, T tolerance=1e-6)
 Orthonormalize in-place the rows of the given matrix, using successive projections on the orthogonal subspace of the previously found basis.
template<class T >
TVec< T > product (const TMat< T > &m, const TVec< T > &v)
 products
template<class T >
TVec< T > transposeProduct (const TMat< T > &m, const TVec< T > &v)
 return m' x v
template<class T >
TMat< T > product (const TMat< T > &m1, const TMat< T > &m2)
 return m1 x m2
template<class T >
TMat< T > transposeProduct (const TMat< T > &m1, const TMat< T > &m2)
 return m1' x m2
template<class T >
TMat< T > productTranspose (const TMat< T > &m1, const TMat< T > &m2)
 return m1 x m2'
template<class T >
TMat< T > operator+ (const TMat< T > &m, const TVec< T > &v)
 return m + v (added to every ROW of m)
template<class T >
TMat< T > operator- (const TMat< T > &m, const TVec< T > &v)
 return m - v (subtracted from every ROW of m)
template<class T >
TMat< T > operator* (const TMat< T > &m, const TVec< T > &v)
 does an elementwise multiplication of every row by v
template<class T >
TMat< T > operator/ (const TMat< T > &m, const TVec< T > &v)
 elementwise division of every row by v
template<class T >
TMat< T > operator/ (const TMat< T > &m1, const TMat< T > &m2)
 elementwise division of every row by v
template<class T >
void choleskySolve (const TMat< T > &L, TVec< T > b, TVec< T > x)
template<class T >
TMat< T > grep (TMat< T > data, int col, T value, bool exclude=false)
 Same as above, but with a single value argument.
template<class T >
void addIfNonMissing (const TVec< T > &source, const TVec< int > &nnonmissing, TVec< T > destination)
template<class T >
void addXandX2IfNonMissing (const TVec< T > &source, const TVec< int > &nnonmissing, TVec< T > somme, TVec< T > somme2)
template<class T >
void layerBpropUpdate (TVec< T > input_gradient, TMat< T > weights, const TVec< T > &input, const TVec< T > &output_gradient, real learning_rate)
template<class T >
void layerL2BpropUpdate (TVec< T > input_gradient, TMat< T > weights, const TVec< T > &input, const TVec< T > &output_gradient, real learning_rate, T weight_decay)
template<class T >
void transposedLayerL2BpropUpdate (TVec< T > input_gradient, TMat< T > weights, const TVec< T > &input, const TVec< T > &output_gradient, real learning_rate, T weight_decay)
template<class T >
void layerL1BpropUpdate (TVec< T > input_gradient, TMat< T > weights, const TVec< T > &input, const TVec< T > &output_gradient, real learning_rate, T weight_decay)
template<class T >
void transposedLayerL1BpropUpdate (TVec< T > input_gradient, TMat< T > weights, const TVec< T > &input, const TVec< T > &output_gradient, real learning_rate, T weight_decay)
template<class T >
void identityMatrix (TMat< T > m)
 set m to the identity matrix, more precisely set m(i,j) = 1_{i==j} (works also for non-square matrices)
template<class T >
TMat< T > identityMatrix (int n, int m=-1)
 Return the identity matrix, more precisely an n x n or n x m matrix with result(i,j) = 1_{i==j}.
real dot_product (real s, real *x, real *y, int n)
void bprop_update_layer (real *dy, real *x, real *dx, real *w, int n_y, int n_x, real learning_rate, real weight_decay)
template<class T >
void sortRows (TMat< T > &mat, const TVec< int > &key_columns, bool increasing_order=true)
template<class T >
void sortElements (const TVec< T > &vec, bool reverse_elems=false)
 Sorts the elements of vec in place.
template<class T >
void partialSortRows (const TMat< T > &mat, int k, int sortk=1, int col=0)
 Uses partial_sort.
template<class T >
void sortRows (const TMat< T > &mat, int col=0, bool increasing_order=true)
 This implementation should be very efficient, but it does two memory allocation: a first one of mat.length()*(sizeof(real)+sizeof(int)) and a second one of mat.length()*sizeof(int).
template<class T >
void sortColumns (const TMat< T > &mat, int rownum)
template<class T >
int binary_search (const TVec< T > &src, T x)
template<class T >
int binary_search (const TMat< T > &src, int c, T x)
template<class T >
TMatColRowsIterator< T > operator+ (typename TMatColRowsIterator< T >::difference_type n, const TMatColRowsIterator< T > &y)
template<class T >
TMatRowsAsArraysIterator< T > operator+ (typename TMatRowsAsArraysIterator< T >::difference_type n, const TMatRowsAsArraysIterator< T > &y)
template<class T >
TMatRowsIterator< T > operator+ (typename TMatRowsIterator< T >::difference_type n, const TMatRowsIterator< T > &y)
ObjecttoObjectPtr (const TruncatedRealFunction &o)
PStreamoperator>> (PStream &in, TruncatedRealFunction &o)
PStreamoperator>> (PStream &in, TruncatedRealFunction *&o)
PStreamoperator<< (PStream &out, const TruncatedRealFunction &o)
PStreamoperator>> (PStream &in, PP< TruncatedRealFunction > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TruncatedRealFunction > *opt, PLearnDiff *diffs)
void operator<< (const Vec &v, real f)
 Same as fill(f) (will only work with Vec, because of a potential conflict with T == string if we wanted to make it generic).
template<class T >
int sizeInBytes (const TVec< T > &x)
template<class T >
TVec< T > concat (const TVec< T > &v1, const TVec< T > &v2)
 Returns a TVec which is a concatenation of v1 and v2.
template<class T >
TVec< T > concat (const TVec< T > &v1, const TVec< T > &v2, const TVec< T > &v3)
 Returns a TVec which is a concatenation of v1,v2,v3.
template<class T >
TVec< T > concat (const TVec< T > &v1, const TVec< T > &v2, const TVec< T > &v3, const TVec< T > &v4)
 Returns a TVec which is a concatenation of v1,v2,v3,v4.
template<class T >
TVec< T > deepCopy (const TVec< T > &source)
template<class T >
TVec< T > deepCopy (const TVec< T > &source, CopiesMap &copies)
template<class T >
void deepCopyField (TVec< T > &field, CopiesMap &copies)
template<class T >
void swap (TVec< T > &a, TVec< T > &b)
template<class T >
void operator<< (const TVec< T > &m1, const TVec< T > &m2)
 copy TVec << TVec
template<class T , class U >
void operator<< (const TVec< T > &m1, const TVec< U > &m2)
 copy TVec << TVec (different types)
template<class T , class U >
void operator>> (const TVec< T > &m1, const TVec< U > &m2)
 copy TVec >> TVec
template<class T >
void savePVec (const string &filename, const TVec< T > &vec)
template<class T >
PStreamoperator<< (PStream &out, const TVec< T > &v)
 Read and Write from C++ stream: write saves length and read resizes accordingly (the raw modes don't write any size information)
template<class T >
PStreamoperator>> (PStream &in, TVec< T > &v)
template<class T >
void binwrite (ostream &out, const TVec< T > &v)
template<class T >
void binread (istream &in, TVec< T > &v)
template<class T >
void binwrite_double (ostream &out, const TVec< T > &v)
template<class T >
void binread_double (istream &in, TVec< T > &v)
template<class T >
ostream & operator<< (ostream &out, const TVec< T > &v)
template<class T >
istream & operator>> (istream &in, const TVec< T > &v)
template<class T >
bool operator<= (const TVec< T > &left, const TVec< T > &right)
 A simple family of relational operators for TVec.
template<class T >
bool operator>= (const TVec< T > &left, const TVec< T > &right)
template<class T >
bool operator< (const TVec< T > &left, const TVec< T > &right)
template<class T >
bool operator> (const TVec< T > &left, const TVec< T > &right)
ObjecttoObjectPtr (const VecStatsCollector &o)
PStreamoperator>> (PStream &in, VecStatsCollector &o)
PStreamoperator>> (PStream &in, VecStatsCollector *&o)
PStreamoperator<< (PStream &out, const VecStatsCollector &o)
PStreamoperator>> (PStream &in, PP< VecStatsCollector > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VecStatsCollector > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Calendar &o)
PStreamoperator>> (PStream &in, Calendar &o)
PStreamoperator>> (PStream &in, Calendar *&o)
PStreamoperator<< (PStream &out, const Calendar &o)
PStreamoperator>> (PStream &in, PP< Calendar > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Calendar > *opt, PLearnDiff *diffs)
template<typename RandomAccessIterator , typename StrictWeakOrdering >
void update_heap (RandomAccessIterator first, RandomAccessIterator last, RandomAccessIterator damaged, StrictWeakOrdering comp)
 This function restores the heap condition for a heap that has been "damaged" (i.e.
template<typename RandomAccessIterator >
void update_heap (RandomAccessIterator first, RandomAccessIterator last, RandomAccessIterator damaged)
 Version of update_heap that uses less<T> as the strict weak ordering.
template<typename RandomAccessIterator , typename StrictWeakOrdering >
bool is_valid_heap (RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp)
 Verify that the heap condition is satisfied.
template<typename RandomAccessIterator >
bool is_valid_heap (RandomAccessIterator first, RandomAccessIterator last)
 Version of is_valid_heap that uses less<T> as the strict weak ordering.
ObjecttoObjectPtr (const HTMLHelpGenerator &o)
PStreamoperator>> (PStream &in, HTMLHelpGenerator &o)
PStreamoperator>> (PStream &in, HTMLHelpGenerator *&o)
PStreamoperator<< (PStream &out, const HTMLHelpGenerator &o)
PStreamoperator>> (PStream &in, PP< HTMLHelpGenerator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HTMLHelpGenerator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NearestNeighborPredictionCost &o)
PStreamoperator>> (PStream &in, NearestNeighborPredictionCost &o)
PStreamoperator>> (PStream &in, NearestNeighborPredictionCost *&o)
PStreamoperator<< (PStream &out, const NearestNeighborPredictionCost &o)
PStreamoperator>> (PStream &in, PP< NearestNeighborPredictionCost > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NearestNeighborPredictionCost > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ObjectGenerator &o)
PStreamoperator>> (PStream &in, ObjectGenerator &o)
PStreamoperator>> (PStream &in, ObjectGenerator *&o)
PStreamoperator<< (PStream &out, const ObjectGenerator &o)
PStreamoperator>> (PStream &in, PP< ObjectGenerator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ObjectGenerator > *opt, PLearnDiff *diffs)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("cd",&PLearnServer::cd,(BodyDoc("change directory (calls chdir)\n"), ArgDoc("path","Path of directory where to go")))
 declareFunction ("binary",&PLearnServer::binary,(BodyDoc("change the mode of the io of the PLearnServer instance to plearn_binary \n")))
 declareFunction ("ascii",&PLearnServer::ascii,(BodyDoc("change the mode of the io of the PLearnServer instance to plearn_ascii\n")))
 declareFunction ("implicit_storage",&PLearnServer::implicit_storage,(BodyDoc("change the implicit_storage mode of the io of the PLearnServer instance.\n"), ArgDoc("impl_stor","Whether or not to use implicit_storage")))
 declareFunction ("loggingControl",&PLearnServer::loggingControl,(BodyDoc("Set current logging level and modules.\n"), ArgDoc("vlevel","the verbosity level"), ArgDoc("modules","list of modules names to log")))
 declareFunction ("setOptionLevel",&PLearnServer::setOptionLevel,(BodyDoc("Set current option level.\n"), ArgDoc("level","option level")))
void globalConnectToServers (TVec< pair< string, int > > hostname_and_port)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("globalConnectToServers",&globalConnectToServers,(BodyDoc("Connect the PLearnService instance to the listed servers."), ArgDoc("hostname_and_port","List of ('hostname', port#) pairs")))
template<class T >
PRange< T > operator| (const PRange< T > &r1, const PRange< T > &r2)
 Union operator.
template<class T >
PRange< T > operator& (const PRange< T > &r1, const PRange< T > &r2)
 Intersection operator.
ObjecttoObjectPtr (const PTest &o)
PStreamoperator>> (PStream &in, PTest &o)
PStreamoperator>> (PStream &in, PTest *&o)
PStreamoperator<< (PStream &out, const PTest &o)
PStreamoperator>> (PStream &in, PP< PTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PTimer &o)
PStreamoperator>> (PStream &in, PTimer &o)
PStreamoperator>> (PStream &in, PTimer *&o)
PStreamoperator<< (PStream &out, const PTimer &o)
PStreamoperator>> (PStream &in, PP< PTimer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PTimer > *opt, PLearnDiff *diffs)
void qld_interface (Mat A,Vec B,int ME,Mat C,Vec D,Vec XL,Vec XU,int &iout,int &ifail,int &iprint,Vec &X,Vec &U,Vec WAR=Vec(),TVec< int > IWAR=TVec< int >())
 Low-Level PLearn Interface for QLD.
ObjecttoObjectPtr (const Redirect &o)
PStreamoperator>> (PStream &in, Redirect &o)
PStreamoperator>> (PStream &in, Redirect *&o)
PStreamoperator<< (PStream &out, const Redirect &o)
PStreamoperator>> (PStream &in, PP< Redirect > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Redirect > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RunObject &o)
PStreamoperator>> (PStream &in, RunObject &o)
PStreamoperator>> (PStream &in, RunObject *&o)
PStreamoperator<< (PStream &out, const RunObject &o)
PStreamoperator>> (PStream &in, PP< RunObject > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RunObject > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ShellScript &o)
PStreamoperator>> (PStream &in, ShellScript &o)
PStreamoperator>> (PStream &in, ShellScript *&o)
PStreamoperator<< (PStream &out, const ShellScript &o)
PStreamoperator>> (PStream &in, PP< ShellScript > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ShellScript > *opt, PLearnDiff *diffs)
template<class In , class Out , class Pred >
Out copy_if (In first, In last, Out res, Pred p)
 copy_if: Function that is embarassingly missing from the C++ standard...
ObjecttoObjectPtr (const HeapTest &o)
PStreamoperator>> (PStream &in, HeapTest &o)
PStreamoperator>> (PStream &in, HeapTest *&o)
PStreamoperator<< (PStream &out, const HeapTest &o)
PStreamoperator>> (PStream &in, PP< HeapTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HeapTest > *opt, PLearnDiff *diffs)
bool getList (char *str, int curj, const VMat &vm, Vec &outList, char *strReason)
void viewVMat (const VMat &vm, PPath filename="")
 Enters curses interactive view of dataset vm.
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("viewVMat",&viewVMat,(BodyDoc("Displays a VMat's contents using curses.\n"), ArgDoc("vm","the VMat to display"), ArgDoc("filename","optional filename of the dataset, that may be used to reload it (\"\" works just fine)")))
static void save_vmat_as_csv (VMat source, ostream &destination, bool skip_missings, int precision=12, string delimiter=",", bool verbose=true, bool convert_date=false)
 This function converts a VMat to a CSV (comma-separated value) file with the given name.
static void save_vmat_as_arff (VMat source, ostream &destination, TVec< string > &date_columns, bool skip_missings, int precision=12, bool verbose=true)
 This function converts a VMat to a ARFF (Attribute-Relation File Format) file with the given name.
int print_diff (ostream &out, VMat m1, VMat m2, double tolerance, int verbose)
 Prints where m1 and m2 differ by more than tolerance returns the number of such differences, or -1 if the sizes differ.
void interactiveDisplayCDF (const Array< VMat > &vmats)
void displayBasicStats (VMat vm)
void printDistanceStatistics (VMat vm, int inputsize)
void plotVMats (char *defs[], int ndefs)
VMat getVMat (const PPath &source, const PPath &indexf)
int vmatmain (int argc, char **argv)
ObjecttoObjectPtr (const AutoScaledGradientOptimizer &o)
PStreamoperator>> (PStream &in, AutoScaledGradientOptimizer &o)
PStreamoperator>> (PStream &in, AutoScaledGradientOptimizer *&o)
PStreamoperator<< (PStream &out, const AutoScaledGradientOptimizer &o)
PStreamoperator>> (PStream &in, PP< AutoScaledGradientOptimizer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AutoScaledGradientOptimizer > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OnlineGramNaturalGradientOptimizer &o)
PStreamoperator>> (PStream &in, OnlineGramNaturalGradientOptimizer &o)
PStreamoperator>> (PStream &in, OnlineGramNaturalGradientOptimizer *&o)
PStreamoperator<< (PStream &out, const OnlineGramNaturalGradientOptimizer &o)
PStreamoperator>> (PStream &in, PP< OnlineGramNaturalGradientOptimizer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OnlineGramNaturalGradientOptimizer > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GradientOptimizer &o)
PStreamoperator>> (PStream &in, GradientOptimizer &o)
PStreamoperator>> (PStream &in, GradientOptimizer *&o)
PStreamoperator<< (PStream &out, const GradientOptimizer &o)
PStreamoperator>> (PStream &in, PP< GradientOptimizer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GradientOptimizer > *opt, PLearnDiff *diffs)
void varDeepCopyField (Var &field, CopiesMap &copies)
 To use varDeepCopyField.
ObjecttoObjectPtr (const Optimizer &o)
PStreamoperator>> (PStream &in, Optimizer &o)
PStreamoperator>> (PStream &in, Optimizer *&o)
PStreamoperator<< (PStream &out, const Optimizer &o)
PStreamoperator>> (PStream &in, PP< Optimizer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Optimizer > *opt, PLearnDiff *diffs)
static Func rosenbrock (int D)
ObjecttoObjectPtr (const ConjRosenbrock &o)
PStreamoperator>> (PStream &in, ConjRosenbrock &o)
PStreamoperator>> (PStream &in, ConjRosenbrock *&o)
PStreamoperator<< (PStream &out, const ConjRosenbrock &o)
PStreamoperator>> (PStream &in, PP< ConjRosenbrock > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConjRosenbrock > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PythonCodeSnippet &o)
PStreamoperator>> (PStream &in, PythonCodeSnippet &o)
PStreamoperator>> (PStream &in, PythonCodeSnippet *&o)
PStreamoperator<< (PStream &out, const PythonCodeSnippet &o)
PStreamoperator>> (PStream &in, PP< PythonCodeSnippet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PythonCodeSnippet > *opt, PLearnDiff *diffs)
PyObject * pythonGlobalFuncTramp (PyObject *self, PyObject *args)
void injectPLearnGlobalFunctions (PyObject *env)
void injectPLearnClasses (PyObject *module)
void injectPLearnException (PyObject *module)
void createWrappedObjectsSet (PyObject *module)
void addToWrappedObjectsSet (PyObject *o)
void removeFromWrappedObjectsSet (PyObject *o)
void initPythonExtensionModule (char const *module_name)
void setPythonModuleAndInject (PyObject *module)
void setNullPout ()
void setPoutToPerr ()
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("setNullPout",&setNullPout,(BodyDoc("Sets the pout output stream to be null.\n")))
 declareFunction ("setPoutToPerr",&setPoutToPerr,(BodyDoc("Sets the pout output stream to be perr.\n")))
void PLPythonConversionError (const char *function_name, PyObject *pyobj, bool print_traceback)
 Used for error reporting.
template<>
int numpyType< bool > ()
template<>
int numpyType< signed char > ()
template<>
int numpyType< unsigned char > ()
template<>
int numpyType< signed short > ()
template<>
int numpyType< unsigned short > ()
template<>
int numpyType< signed int > ()
template<>
int numpyType< unsigned int > ()
template<>
int numpyType< signed long > ()
template<>
int numpyType< unsigned long > ()
template<>
int numpyType< signed long long > ()
template<>
int numpyType< unsigned long long > ()
template<>
int numpyType< float > ()
template<>
int numpyType< double > ()
template<>
int numpyType< long double > ()
PyObject * convertArrayCheck (PyObject *pyobj, int numpy_type, int ndim, bool print_traceback)
void checkWrappedObjects (const string &msg)
PStreamoperator>> (PStream &in, PythonObjectWrapper &v)
PStreamoperator<< (PStream &out, const PythonObjectWrapper &v)
PStreamoperator>> (PStream &in, PyObject *v)
PStreamoperator<< (PStream &out, const PyObject *v)
void printWrappedObjects ()
 debug
void ramassePoubelles ()
bool getVMatAsPtr ()
bool setVMatAsPtr (bool vmat_as_ptr)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("printWrappedObjects",&printWrappedObjects,(BodyDoc("Prints PLearn objects wrapped into python.\n")))
 declareFunction ("ramassePoubelles",&ramassePoubelles,(BodyDoc("GC for wrapped objects.\n")))
 declareFunction ("getVMatAsPtr",&getVMatAsPtr,(BodyDoc("Returns current setting of 'VMatAsPtr'.\n""true= wrapped VMat; false= numpy array.\n"), RetDoc("current VMatAsPtr")))
 declareFunction ("setVMatAsPtr",&setVMatAsPtr,(BodyDoc("Sets 'VMatAsPtr', returns previous setting.\n""true= wrapped VMat; false= numpy array.\n"), ArgDoc("vmat_as_ptr","wrap VMats instead of converting to numpy?"), RetDoc("Previous setting")))
template<class I >
integerFromPyObject (PyObject *pyobj, bool print_traceback)
 Used to retrieve integer values from python if possible without precision loss, and convert them to requested type.
template<typename T >
int numpyType ()
template<class I >
PyObject * integerToPyObject (const I &x)
 Used to convert integer values to python, using PyInt if possible.
ObjecttoObjectPtr (const PythonProcessedVMatrix &o)
PStreamoperator>> (PStream &in, PythonProcessedVMatrix &o)
PStreamoperator>> (PStream &in, PythonProcessedVMatrix *&o)
PStreamoperator<< (PStream &out, const PythonProcessedVMatrix &o)
PStreamoperator>> (PStream &in, PP< PythonProcessedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PythonProcessedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BasicIdentityCallsTest &o)
PStreamoperator>> (PStream &in, BasicIdentityCallsTest &o)
PStreamoperator>> (PStream &in, BasicIdentityCallsTest *&o)
PStreamoperator<< (PStream &out, const BasicIdentityCallsTest &o)
PStreamoperator>> (PStream &in, PP< BasicIdentityCallsTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BasicIdentityCallsTest > *opt, PLearnDiff *diffs)
PythonObjectWrapper InjectionTest_basic_function (const TVec< PythonObjectWrapper > &args)
ObjecttoObjectPtr (const InjectionTest &o)
PStreamoperator>> (PStream &in, InjectionTest &o)
PStreamoperator>> (PStream &in, InjectionTest *&o)
PStreamoperator<< (PStream &out, const InjectionTest &o)
PStreamoperator>> (PStream &in, PP< InjectionTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InjectionTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const InstanceSnippetTest &o)
PStreamoperator>> (PStream &in, InstanceSnippetTest &o)
PStreamoperator>> (PStream &in, InstanceSnippetTest *&o)
PStreamoperator<< (PStream &out, const InstanceSnippetTest &o)
PStreamoperator>> (PStream &in, PP< InstanceSnippetTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InstanceSnippetTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const InterfunctionXchgTest &o)
PStreamoperator>> (PStream &in, InterfunctionXchgTest &o)
PStreamoperator>> (PStream &in, InterfunctionXchgTest *&o)
PStreamoperator<< (PStream &out, const InterfunctionXchgTest &o)
PStreamoperator>> (PStream &in, PP< InterfunctionXchgTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InterfunctionXchgTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MemoryStressTest &o)
PStreamoperator>> (PStream &in, MemoryStressTest &o)
PStreamoperator>> (PStream &in, MemoryStressTest *&o)
PStreamoperator<< (PStream &out, const MemoryStressTest &o)
PStreamoperator>> (PStream &in, PP< MemoryStressTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MemoryStressTest > *opt, PLearnDiff *diffs)
RandomVar operator* (RandomVar a, RandomVar b)
 global functions
RandomVar operator+ (RandomVar a, RandomVar b)
RandomVar operator- (RandomVar a, RandomVar b)
 Return a MatRandomVar that is the element-by-element difference of two RandomVar's.
RandomVar operator/ (RandomVar a, RandomVar b)
 Return a MatRandomVar that is the element-by-element ratio of two RandomVar's.
RandomVar exp (RandomVar x)
 exponential function applied element-by-element
RandomVar log (RandomVar x)
 natural logarithm function applied element-by-element
RandomVar extend (RandomVar v, real extension_value, int n_extend)
RandomVar hconcat (const RVArray &a)
real EM (ConditionalExpression conditional_expression, RVArray parameters_to_learn, VMat distr, int n_samples, int max_n_iterations, real relative_improvement_threshold, bool accept_worsening_likelihood, bool compute_final_train_NLL)
real EM (ConditionalExpression conditional_expression, RVArray parameters_to_learn, VMat distr, int n_samples, int max_n_iterations, real relative_improvement_threshold, bool compute_final_train_NLL)
Var P (ConditionalExpression conditional_expression, bool clearMarksUponReturn)
Var logP (ConditionalExpression conditional_expression, bool clearMarksUponReturn, RVInstanceArray *parameters_to_learn)
Var ElogP (ConditionalExpression conditional_expression, RVInstanceArray &parameters_to_learn, bool clearMarksUponReturn)
RandomVar marginalize (const RandomVar &RV, const RandomVar &hiddenRV)
Vec sample (ConditionalExpression conditional_expression)
void sample (ConditionalExpression conditional_expression, Mat &samples)
Var Sample (ConditionalExpression conditional_expression)
RandomVar normal (real mean=0, real standard_dev=1, int d=1, real minimum_standard_deviation=1e-6)
 Functions to build a normal distribution.
RandomVar normal (RandomVar mean, RandomVar log_variance, real minimum_standard_deviation)
RandomVar mixture (RVArray components, RandomVar log_weights)
RandomVar multinomial (RandomVar log_probabilities)
real oEM (ConditionalExpression conditional_expression, RVArray parameters_to_learn, VMat distr, int n_samples, int max_n_iterations, real relative_improvement_threshold=0.001, bool compute_final_train_NLL=true)
real oEM (ConditionalExpression conditional_expression, RVArray parameters_to_learn, VMat distr, int n_samples, Optimizer &MStepOptimizer, int max_n_iterations, real relative_improvement_threshold=0.001, bool compute_final_train_NLL=true)
int establish_connection (int n_hosts, const char *hostnames[], int port_no)
int establish_connection (const char *hostname, int port_no)
int establish_connection (const int argc, const char *argv[])
void * MemoryMap (const char *filename, tFileHandle &handle, bool read_only, off_t &filesize)
 returns a pointer to the memory-mapped file or 0 if it fails for some reason.
void memoryUnmap (void *data, tFileHandle handle, int length)
vector< string > execute (const string &command, bool redirect_stderr)
size_t getSystemTotalMemory ()
 Return the total memory installed in the system in bytes.
size_t getProcessDataMemory ()
 Return the total data memory used by the current process in bytes.
int getPid ()
 Return the processus id.
string getUser ()
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("getSystemTotalMemory",&getSystemTotalMemory,(BodyDoc("Return the total memory installed in the system in bytes."), RetDoc("Memory size")))
 declareFunction ("getProcessDataMemory",&getProcessDataMemory,(BodyDoc("Return the total data memory used by the current process in bytes."), RetDoc("Used memory size")))
ObjecttoObjectPtr (const AbsVariable &o)
PStreamoperator>> (PStream &in, AbsVariable &o)
PStreamoperator>> (PStream &in, AbsVariable *&o)
PStreamoperator<< (PStream &out, const AbsVariable &o)
PStreamoperator>> (PStream &in, PP< AbsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AbsVariable > *opt, PLearnDiff *diffs)
Var abs (Var v)
ObjecttoObjectPtr (const AffineTransformVariable &o)
PStreamoperator>> (PStream &in, AffineTransformVariable &o)
PStreamoperator>> (PStream &in, AffineTransformVariable *&o)
PStreamoperator<< (PStream &out, const AffineTransformVariable &o)
PStreamoperator>> (PStream &in, PP< AffineTransformVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AffineTransformVariable > *opt, PLearnDiff *diffs)
Var affine_transform (Var vec, Var transformation, bool force_row_vec=false)
 First row of transformation is the bias.
ObjecttoObjectPtr (const AffineTransformWeightPenalty &o)
PStreamoperator>> (PStream &in, AffineTransformWeightPenalty &o)
PStreamoperator>> (PStream &in, AffineTransformWeightPenalty *&o)
PStreamoperator<< (PStream &out, const AffineTransformWeightPenalty &o)
PStreamoperator>> (PStream &in, PP< AffineTransformWeightPenalty > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AffineTransformWeightPenalty > *opt, PLearnDiff *diffs)
Var affine_transform_weight_penalty (Var transformation, real weight_decay, real bias_decay=0, string penalty_type="L2_square")
 weight decay and bias decay terms This has not been tested yet [Pascal: a tester].
ObjecttoObjectPtr (const ArgmaxVariable &o)
PStreamoperator>> (PStream &in, ArgmaxVariable &o)
PStreamoperator>> (PStream &in, ArgmaxVariable *&o)
PStreamoperator<< (PStream &out, const ArgmaxVariable &o)
PStreamoperator>> (PStream &in, PP< ArgmaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ArgmaxVariable > *opt, PLearnDiff *diffs)
Var argmax (Var v)
Var argminOf (Var v, Var expression, Var values_of_v, VarArray inputs)
ObjecttoObjectPtr (const ArgminVariable &o)
PStreamoperator>> (PStream &in, ArgminVariable &o)
PStreamoperator>> (PStream &in, ArgminVariable *&o)
PStreamoperator<< (PStream &out, const ArgminVariable &o)
PStreamoperator>> (PStream &in, PP< ArgminVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ArgminVariable > *opt, PLearnDiff *diffs)
Var argmin (Var v)
ObjecttoObjectPtr (const BiasWeightAffineTransformVariable &o)
PStreamoperator>> (PStream &in, BiasWeightAffineTransformVariable &o)
PStreamoperator>> (PStream &in, BiasWeightAffineTransformVariable *&o)
PStreamoperator<< (PStream &out, const BiasWeightAffineTransformVariable &o)
PStreamoperator>> (PStream &in, PP< BiasWeightAffineTransformVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BiasWeightAffineTransformVariable > *opt, PLearnDiff *diffs)
Var bias_weight_affine_transform (Var vec, Var weights, Var bias, bool transpose_weights=false)
 first row of transformation is the bias.
ObjecttoObjectPtr (const BinaryClassificationLossVariable &o)
PStreamoperator>> (PStream &in, BinaryClassificationLossVariable &o)
PStreamoperator>> (PStream &in, BinaryClassificationLossVariable *&o)
PStreamoperator<< (PStream &out, const BinaryClassificationLossVariable &o)
PStreamoperator>> (PStream &in, PP< BinaryClassificationLossVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryClassificationLossVariable > *opt, PLearnDiff *diffs)
Var binary_classification_loss (Var network_output, Var classnum)
ObjecttoObjectPtr (const BinaryVariable &o)
PStreamoperator>> (PStream &in, BinaryVariable &o)
PStreamoperator>> (PStream &in, BinaryVariable *&o)
PStreamoperator<< (PStream &out, const BinaryVariable &o)
PStreamoperator>> (PStream &in, PP< BinaryVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CCCostVariable &o)
PStreamoperator>> (PStream &in, CCCostVariable &o)
PStreamoperator>> (PStream &in, CCCostVariable *&o)
PStreamoperator<< (PStream &out, const CCCostVariable &o)
PStreamoperator>> (PStream &in, PP< CCCostVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CCCostVariable > *opt, PLearnDiff *diffs)
Var cccost (VMat distr, Func the_f_error, Func the_f_candidate)
 sumOf
ObjecttoObjectPtr (const ClassificationLossVariable &o)
PStreamoperator>> (PStream &in, ClassificationLossVariable &o)
PStreamoperator>> (PStream &in, ClassificationLossVariable *&o)
PStreamoperator<< (PStream &out, const ClassificationLossVariable &o)
PStreamoperator>> (PStream &in, PP< ClassificationLossVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassificationLossVariable > *opt, PLearnDiff *diffs)
Var classification_loss (Var network_output, Var classnum)
ObjecttoObjectPtr (const ColumnIndexVariable &o)
PStreamoperator>> (PStream &in, ColumnIndexVariable &o)
PStreamoperator>> (PStream &in, ColumnIndexVariable *&o)
PStreamoperator<< (PStream &out, const ColumnIndexVariable &o)
PStreamoperator>> (PStream &in, PP< ColumnIndexVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ColumnIndexVariable > *opt, PLearnDiff *diffs)
Var matrixIndex (Var mat, Var index)
Var columnSum (Var v)
ObjecttoObjectPtr (const ConcatColumnsVariable &o)
PStreamoperator>> (PStream &in, ConcatColumnsVariable &o)
PStreamoperator>> (PStream &in, ConcatColumnsVariable *&o)
PStreamoperator<< (PStream &out, const ConcatColumnsVariable &o)
PStreamoperator>> (PStream &in, PP< ConcatColumnsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatColumnsVariable > *opt, PLearnDiff *diffs)
Var hconcat (const VarArray &varray)
ObjecttoObjectPtr (const ConcatOfVariable &o)
PStreamoperator>> (PStream &in, ConcatOfVariable &o)
PStreamoperator>> (PStream &in, ConcatOfVariable *&o)
PStreamoperator<< (PStream &out, const ConcatOfVariable &o)
PStreamoperator>> (PStream &in, PP< ConcatOfVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatOfVariable > *opt, PLearnDiff *diffs)
Var concatOf (VMat distr, Func f)
 concatOf
Var concatOf (Var output, const VarArray &inputs, VMat distr, int nsamples, VarArray parameters=VarArray())
 deprecated old version, do not use!
ObjecttoObjectPtr (const ConcatRowsVariable &o)
PStreamoperator>> (PStream &in, ConcatRowsVariable &o)
PStreamoperator>> (PStream &in, ConcatRowsVariable *&o)
PStreamoperator<< (PStream &out, const ConcatRowsVariable &o)
PStreamoperator>> (PStream &in, PP< ConcatRowsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatRowsVariable > *opt, PLearnDiff *diffs)
Var vconcat (const VarArray &varray)
ObjecttoObjectPtr (const ConfRatedAdaboostCostVariable &o)
PStreamoperator>> (PStream &in, ConfRatedAdaboostCostVariable &o)
PStreamoperator>> (PStream &in, ConfRatedAdaboostCostVariable *&o)
PStreamoperator<< (PStream &out, const ConfRatedAdaboostCostVariable &o)
PStreamoperator>> (PStream &in, PP< ConfRatedAdaboostCostVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConfRatedAdaboostCostVariable > *opt, PLearnDiff *diffs)
Var conf_rated_adaboost_cost (Var output, Var target, Var alpha)
ObjecttoObjectPtr (const ConvolveVariable &o)
PStreamoperator>> (PStream &in, ConvolveVariable &o)
PStreamoperator>> (PStream &in, ConvolveVariable *&o)
PStreamoperator<< (PStream &out, const ConvolveVariable &o)
PStreamoperator>> (PStream &in, PP< ConvolveVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConvolveVariable > *opt, PLearnDiff *diffs)
Var convolve (Var input, Var mask)
ObjecttoObjectPtr (const CrossEntropyVariable &o)
PStreamoperator>> (PStream &in, CrossEntropyVariable &o)
PStreamoperator>> (PStream &in, CrossEntropyVariable *&o)
PStreamoperator<< (PStream &out, const CrossEntropyVariable &o)
PStreamoperator>> (PStream &in, PP< CrossEntropyVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CrossEntropyVariable > *opt, PLearnDiff *diffs)
Var cross_entropy (Var network_output, Var targets)
ObjecttoObjectPtr (const CutAboveThresholdVariable &o)
PStreamoperator>> (PStream &in, CutAboveThresholdVariable &o)
PStreamoperator>> (PStream &in, CutAboveThresholdVariable *&o)
PStreamoperator<< (PStream &out, const CutAboveThresholdVariable &o)
PStreamoperator>> (PStream &in, PP< CutAboveThresholdVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CutAboveThresholdVariable > *opt, PLearnDiff *diffs)
Var cutAboveThreshold (Var v, real threshold)
Var negative (Var v)
ObjecttoObjectPtr (const CutBelowThresholdVariable &o)
PStreamoperator>> (PStream &in, CutBelowThresholdVariable &o)
PStreamoperator>> (PStream &in, CutBelowThresholdVariable *&o)
PStreamoperator<< (PStream &out, const CutBelowThresholdVariable &o)
PStreamoperator>> (PStream &in, PP< CutBelowThresholdVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CutBelowThresholdVariable > *opt, PLearnDiff *diffs)
Var cutBelowThreshold (Var v, real threshold)
Var positive (Var v)
ObjecttoObjectPtr (const DeterminantVariable &o)
PStreamoperator>> (PStream &in, DeterminantVariable &o)
PStreamoperator>> (PStream &in, DeterminantVariable *&o)
PStreamoperator<< (PStream &out, const DeterminantVariable &o)
PStreamoperator>> (PStream &in, PP< DeterminantVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DeterminantVariable > *opt, PLearnDiff *diffs)
Var det (Var m)
ObjecttoObjectPtr (const DiagonalizedFactorsProductVariable &o)
PStreamoperator>> (PStream &in, DiagonalizedFactorsProductVariable &o)
PStreamoperator>> (PStream &in, DiagonalizedFactorsProductVariable *&o)
PStreamoperator<< (PStream &out, const DiagonalizedFactorsProductVariable &o)
PStreamoperator>> (PStream &in, PP< DiagonalizedFactorsProductVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DiagonalizedFactorsProductVariable > *opt, PLearnDiff *diffs)
Var diagonalized_factors_product (Var left_matrix, Var center_diagonal, Var right_matrix)
ObjecttoObjectPtr (const DilogarithmVariable &o)
PStreamoperator>> (PStream &in, DilogarithmVariable &o)
PStreamoperator>> (PStream &in, DilogarithmVariable *&o)
PStreamoperator<< (PStream &out, const DilogarithmVariable &o)
PStreamoperator>> (PStream &in, PP< DilogarithmVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DilogarithmVariable > *opt, PLearnDiff *diffs)
Var dilogarithm (Var v)
Var softplus_primitive (Var v)
ObjecttoObjectPtr (const DivVariable &o)
PStreamoperator>> (PStream &in, DivVariable &o)
PStreamoperator>> (PStream &in, DivVariable *&o)
PStreamoperator<< (PStream &out, const DivVariable &o)
PStreamoperator>> (PStream &in, PP< DivVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DivVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DotProductVariable &o)
PStreamoperator>> (PStream &in, DotProductVariable &o)
PStreamoperator>> (PStream &in, DotProductVariable *&o)
PStreamoperator<< (PStream &out, const DotProductVariable &o)
PStreamoperator>> (PStream &in, PP< DotProductVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DotProductVariable > *opt, PLearnDiff *diffs)
Var dot (Var v1, Var v2)
 dot product
ObjecttoObjectPtr (const DuplicateColumnVariable &o)
PStreamoperator>> (PStream &in, DuplicateColumnVariable &o)
PStreamoperator>> (PStream &in, DuplicateColumnVariable *&o)
PStreamoperator<< (PStream &out, const DuplicateColumnVariable &o)
PStreamoperator>> (PStream &in, PP< DuplicateColumnVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DuplicateColumnVariable > *opt, PLearnDiff *diffs)
Var duplicateColumn (Var v, int the_width)
ObjecttoObjectPtr (const DuplicateRowVariable &o)
PStreamoperator>> (PStream &in, DuplicateRowVariable &o)
PStreamoperator>> (PStream &in, DuplicateRowVariable *&o)
PStreamoperator<< (PStream &out, const DuplicateRowVariable &o)
PStreamoperator>> (PStream &in, PP< DuplicateRowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DuplicateRowVariable > *opt, PLearnDiff *diffs)
Var duplicateRow (Var v, int the_length)
ObjecttoObjectPtr (const DuplicateScalarVariable &o)
PStreamoperator>> (PStream &in, DuplicateScalarVariable &o)
PStreamoperator>> (PStream &in, DuplicateScalarVariable *&o)
PStreamoperator<< (PStream &out, const DuplicateScalarVariable &o)
PStreamoperator>> (PStream &in, PP< DuplicateScalarVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DuplicateScalarVariable > *opt, PLearnDiff *diffs)
Var duplicateScalar (Var v, int the_length, int the_width)
ObjecttoObjectPtr (const ElementAtPositionVariable &o)
PStreamoperator>> (PStream &in, ElementAtPositionVariable &o)
PStreamoperator>> (PStream &in, ElementAtPositionVariable *&o)
PStreamoperator<< (PStream &out, const ElementAtPositionVariable &o)
PStreamoperator>> (PStream &in, PP< ElementAtPositionVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ElementAtPositionVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EqualConstantVariable &o)
PStreamoperator>> (PStream &in, EqualConstantVariable &o)
PStreamoperator>> (PStream &in, EqualConstantVariable *&o)
PStreamoperator<< (PStream &out, const EqualConstantVariable &o)
PStreamoperator>> (PStream &in, PP< EqualConstantVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EqualConstantVariable > *opt, PLearnDiff *diffs)
Var operator== (Var v1, real cte)
 result[i] = 1 if v1[i]==cte, 0 otherwise
Var operator== (real cte, Var v1)
 result[i] = 1 if v1[i]==cte, 0 otherwise
ObjecttoObjectPtr (const EqualScalarVariable &o)
PStreamoperator>> (PStream &in, EqualScalarVariable &o)
PStreamoperator>> (PStream &in, EqualScalarVariable *&o)
PStreamoperator<< (PStream &out, const EqualScalarVariable &o)
PStreamoperator>> (PStream &in, PP< EqualScalarVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EqualScalarVariable > *opt, PLearnDiff *diffs)
Var isequal (Var v1, Var v2)
ObjecttoObjectPtr (const EqualVariable &o)
PStreamoperator>> (PStream &in, EqualVariable &o)
PStreamoperator>> (PStream &in, EqualVariable *&o)
PStreamoperator<< (PStream &out, const EqualVariable &o)
PStreamoperator>> (PStream &in, PP< EqualVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EqualVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ErfVariable &o)
PStreamoperator>> (PStream &in, ErfVariable &o)
PStreamoperator>> (PStream &in, ErfVariable *&o)
PStreamoperator<< (PStream &out, const ErfVariable &o)
PStreamoperator>> (PStream &in, PP< ErfVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ErfVariable > *opt, PLearnDiff *diffs)
Var erf (Var v)
ObjecttoObjectPtr (const AdditiveGaussianNoiseVariable &o)
PStreamoperator>> (PStream &in, AdditiveGaussianNoiseVariable &o)
PStreamoperator>> (PStream &in, AdditiveGaussianNoiseVariable *&o)
PStreamoperator<< (PStream &out, const AdditiveGaussianNoiseVariable &o)
PStreamoperator>> (PStream &in, PP< AdditiveGaussianNoiseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AdditiveGaussianNoiseVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BernoulliSampleVariable &o)
PStreamoperator>> (PStream &in, BernoulliSampleVariable &o)
PStreamoperator>> (PStream &in, BernoulliSampleVariable *&o)
PStreamoperator<< (PStream &out, const BernoulliSampleVariable &o)
PStreamoperator>> (PStream &in, PP< BernoulliSampleVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BernoulliSampleVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConstrainedSourceVariable &o)
PStreamoperator>> (PStream &in, ConstrainedSourceVariable &o)
PStreamoperator>> (PStream &in, ConstrainedSourceVariable *&o)
PStreamoperator<< (PStream &out, const ConstrainedSourceVariable &o)
PStreamoperator>> (PStream &in, PP< ConstrainedSourceVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConstrainedSourceVariable > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ConstrainedSourceVariable) template<> class TypeTraits< ConstrainedSourceVariable >
ObjecttoObjectPtr (const ConstrainVariable &o)
PStreamoperator>> (PStream &in, ConstrainVariable &o)
PStreamoperator>> (PStream &in, ConstrainVariable *&o)
PStreamoperator<< (PStream &out, const ConstrainVariable &o)
PStreamoperator>> (PStream &in, PP< ConstrainVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConstrainVariable > *opt, PLearnDiff *diffs)
Var diag (Var v)
ObjecttoObjectPtr (const Cov2CorrVariable &o)
PStreamoperator>> (PStream &in, Cov2CorrVariable &o)
PStreamoperator>> (PStream &in, Cov2CorrVariable *&o)
PStreamoperator<< (PStream &out, const Cov2CorrVariable &o)
PStreamoperator>> (PStream &in, PP< Cov2CorrVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Cov2CorrVariable > *opt, PLearnDiff *diffs)
Var cov2corr (Var v, int diagonal_choice=1, double epsilon=0.)
ObjecttoObjectPtr (const DiagVariable &o)
PStreamoperator>> (PStream &in, DiagVariable &o)
PStreamoperator>> (PStream &in, DiagVariable *&o)
PStreamoperator<< (PStream &out, const DiagVariable &o)
PStreamoperator>> (PStream &in, PP< DiagVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DiagVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DoubleProductVariable &o)
PStreamoperator>> (PStream &in, DoubleProductVariable &o)
PStreamoperator>> (PStream &in, DoubleProductVariable *&o)
PStreamoperator<< (PStream &out, const DoubleProductVariable &o)
PStreamoperator>> (PStream &in, PP< DoubleProductVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DoubleProductVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LinearCombinationOfScalarVariables &o)
PStreamoperator>> (PStream &in, LinearCombinationOfScalarVariables &o)
PStreamoperator>> (PStream &in, LinearCombinationOfScalarVariables *&o)
PStreamoperator<< (PStream &out, const LinearCombinationOfScalarVariables &o)
PStreamoperator>> (PStream &in, PP< LinearCombinationOfScalarVariables > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LinearCombinationOfScalarVariables > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LogSoftSoftMaxVariable &o)
PStreamoperator>> (PStream &in, LogSoftSoftMaxVariable &o)
PStreamoperator>> (PStream &in, LogSoftSoftMaxVariable *&o)
PStreamoperator<< (PStream &out, const LogSoftSoftMaxVariable &o)
PStreamoperator>> (PStream &in, PP< LogSoftSoftMaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LogSoftSoftMaxVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MultiMaxVariable &o)
PStreamoperator>> (PStream &in, MultiMaxVariable &o)
PStreamoperator>> (PStream &in, MultiMaxVariable *&o)
PStreamoperator<< (PStream &out, const MultiMaxVariable &o)
PStreamoperator>> (PStream &in, PP< MultiMaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiMaxVariable > *opt, PLearnDiff *diffs)
Var MultiMax (Var v, TVec< int > groupsizes, char computation_type)
ObjecttoObjectPtr (const MultiSampleVariable &o)
PStreamoperator>> (PStream &in, MultiSampleVariable &o)
PStreamoperator>> (PStream &in, MultiSampleVariable *&o)
PStreamoperator<< (PStream &out, const MultiSampleVariable &o)
PStreamoperator>> (PStream &in, PP< MultiSampleVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiSampleVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NonDiagVariable &o)
PStreamoperator>> (PStream &in, NonDiagVariable &o)
PStreamoperator>> (PStream &in, NonDiagVariable *&o)
PStreamoperator<< (PStream &out, const NonDiagVariable &o)
PStreamoperator>> (PStream &in, PP< NonDiagVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NonDiagVariable > *opt, PLearnDiff *diffs)
Var nondiag (Var v)
ObjecttoObjectPtr (const ProbabilityPairsInverseVariable &o)
PStreamoperator>> (PStream &in, ProbabilityPairsInverseVariable &o)
PStreamoperator>> (PStream &in, ProbabilityPairsInverseVariable *&o)
PStreamoperator<< (PStream &out, const ProbabilityPairsInverseVariable &o)
PStreamoperator>> (PStream &in, PP< ProbabilityPairsInverseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProbabilityPairsInverseVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ProbabilityPairsVariable &o)
PStreamoperator>> (PStream &in, ProbabilityPairsVariable &o)
PStreamoperator>> (PStream &in, ProbabilityPairsVariable *&o)
PStreamoperator<< (PStream &out, const ProbabilityPairsVariable &o)
PStreamoperator>> (PStream &in, PP< ProbabilityPairsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProbabilityPairsVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RandomForcedValuesVariable &o)
PStreamoperator>> (PStream &in, RandomForcedValuesVariable &o)
PStreamoperator>> (PStream &in, RandomForcedValuesVariable *&o)
PStreamoperator<< (PStream &out, const RandomForcedValuesVariable &o)
PStreamoperator>> (PStream &in, PP< RandomForcedValuesVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RandomForcedValuesVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SaltPepperNoiseVariable &o)
PStreamoperator>> (PStream &in, SaltPepperNoiseVariable &o)
PStreamoperator>> (PStream &in, SaltPepperNoiseVariable *&o)
PStreamoperator<< (PStream &out, const SaltPepperNoiseVariable &o)
PStreamoperator>> (PStream &in, PP< SaltPepperNoiseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SaltPepperNoiseVariable > *opt, PLearnDiff *diffs)
void softsoftmax_fprop_singlepass_version (int n, int d, const real *__restrict__ const X, const real *__restrict__ const U, real *__restrict__ const H)
void softsoftmax_fprop_twopass_version (int n, int d, const real *__restrict__ const X, const real *__restrict__ const U, real *__restrict__ const H)
void softsoftmax_with_log_twopass_version (int n, int d, const real *__restrict__ const X, const real *__restrict__ const U, real *__restrict__ const logH, real *__restrict__ const H)
void softsoftmax_fprop_hardapprox_version (int n, int d, const real *__restrict__ const X, const real *__restrict__ const U, real *__restrict__ const H)
void softsoftmax_bprop (int n, int d, const real *__restrict__ const X, const real *__restrict__ const U, const real *__restrict__ const logH, const real *__restrict__ const H_gr, real *__restrict__ const X_gr, real *__restrict__ const U_gr)
ObjecttoObjectPtr (const SoftSoftMaxVariable &o)
PStreamoperator>> (PStream &in, SoftSoftMaxVariable &o)
PStreamoperator>> (PStream &in, SoftSoftMaxVariable *&o)
PStreamoperator<< (PStream &out, const SoftSoftMaxVariable &o)
PStreamoperator>> (PStream &in, PP< SoftSoftMaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftSoftMaxVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SumEntropyOfBernoullis &o)
PStreamoperator>> (PStream &in, SumEntropyOfBernoullis &o)
PStreamoperator>> (PStream &in, SumEntropyOfBernoullis *&o)
PStreamoperator<< (PStream &out, const SumEntropyOfBernoullis &o)
PStreamoperator>> (PStream &in, PP< SumEntropyOfBernoullis > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumEntropyOfBernoullis > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SumEntropyOfCategoricals &o)
PStreamoperator>> (PStream &in, SumEntropyOfCategoricals &o)
PStreamoperator>> (PStream &in, SumEntropyOfCategoricals *&o)
PStreamoperator<< (PStream &out, const SumEntropyOfCategoricals &o)
PStreamoperator>> (PStream &in, PP< SumEntropyOfCategoricals > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumEntropyOfCategoricals > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SumVarianceOfLinearTransformedBernoullis &o)
PStreamoperator>> (PStream &in, SumVarianceOfLinearTransformedBernoullis &o)
PStreamoperator>> (PStream &in, SumVarianceOfLinearTransformedBernoullis *&o)
PStreamoperator<< (PStream &out, const SumVarianceOfLinearTransformedBernoullis &o)
PStreamoperator>> (PStream &in, PP< SumVarianceOfLinearTransformedBernoullis > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumVarianceOfLinearTransformedBernoullis > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SumVarianceOfLinearTransformedCategoricals &o)
PStreamoperator>> (PStream &in, SumVarianceOfLinearTransformedCategoricals &o)
PStreamoperator>> (PStream &in, SumVarianceOfLinearTransformedCategoricals *&o)
PStreamoperator<< (PStream &out, const SumVarianceOfLinearTransformedCategoricals &o)
PStreamoperator>> (PStream &in, PP< SumVarianceOfLinearTransformedCategoricals > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumVarianceOfLinearTransformedCategoricals > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TimesConstantScalarVariable2 &o)
PStreamoperator>> (PStream &in, TimesConstantScalarVariable2 &o)
PStreamoperator>> (PStream &in, TimesConstantScalarVariable2 *&o)
PStreamoperator<< (PStream &out, const TimesConstantScalarVariable2 &o)
PStreamoperator>> (PStream &in, PP< TimesConstantScalarVariable2 > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TimesConstantScalarVariable2 > *opt, PLearnDiff *diffs)
Var timesConstantScalar2 (Var v, Var scalar)
ObjecttoObjectPtr (const TraceVariable &o)
PStreamoperator>> (PStream &in, TraceVariable &o)
PStreamoperator>> (PStream &in, TraceVariable *&o)
PStreamoperator<< (PStream &out, const TraceVariable &o)
PStreamoperator>> (PStream &in, PP< TraceVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TraceVariable > *opt, PLearnDiff *diffs)
Var trace (Var v)
ObjecttoObjectPtr (const TransposedDoubleProductVariable &o)
PStreamoperator>> (PStream &in, TransposedDoubleProductVariable &o)
PStreamoperator>> (PStream &in, TransposedDoubleProductVariable *&o)
PStreamoperator<< (PStream &out, const TransposedDoubleProductVariable &o)
PStreamoperator>> (PStream &in, PP< TransposedDoubleProductVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransposedDoubleProductVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExpVariable &o)
PStreamoperator>> (PStream &in, ExpVariable &o)
PStreamoperator>> (PStream &in, ExpVariable *&o)
PStreamoperator<< (PStream &out, const ExpVariable &o)
PStreamoperator>> (PStream &in, PP< ExpVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExpVariable > *opt, PLearnDiff *diffs)
Var exp (Var v)
ObjecttoObjectPtr (const ExtendedVariable &o)
PStreamoperator>> (PStream &in, ExtendedVariable &o)
PStreamoperator>> (PStream &in, ExtendedVariable *&o)
PStreamoperator<< (PStream &out, const ExtendedVariable &o)
PStreamoperator>> (PStream &in, PP< ExtendedVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExtendedVariable > *opt, PLearnDiff *diffs)
Var extend (Var v, int top_extent, int bottom_extent, int left_extent, int right_extent, real fill_value=0.0)
 general extension of a matrix in any direction
Var extend (Var v, real extension_value=1.0, int n_extend=1)
 simple extension of a vector (same semantic as old extend, when we only had vectors)
ObjecttoObjectPtr (const ExtractVariable &o)
PStreamoperator>> (PStream &in, ExtractVariable &o)
PStreamoperator>> (PStream &in, ExtractVariable *&o)
PStreamoperator<< (PStream &out, const ExtractVariable &o)
PStreamoperator>> (PStream &in, PP< ExtractVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExtractVariable > *opt, PLearnDiff *diffs)
Var extract (Var v, int o, int l, int w)
ObjecttoObjectPtr (const FNetLayerVariable &o)
PStreamoperator>> (PStream &in, FNetLayerVariable &o)
PStreamoperator>> (PStream &in, FNetLayerVariable *&o)
PStreamoperator<< (PStream &out, const FNetLayerVariable &o)
PStreamoperator>> (PStream &in, PP< FNetLayerVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FNetLayerVariable > *opt, PLearnDiff *diffs)
Func operator/ (Func f, real value)
template<>
void deepCopyField (Func &field, CopiesMap &copies)
ObjecttoObjectPtr (const Function &o)
PStreamoperator>> (PStream &in, Function &o)
PStreamoperator>> (PStream &in, Function *&o)
PStreamoperator<< (PStream &out, const Function &o)
PStreamoperator>> (PStream &in, PP< Function > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Function > *opt, PLearnDiff *diffs)
PStreamoperator>> (PStream &in, Func &o)
PStreamoperator<< (PStream &out, const Func &o)
ObjecttoObjectPtr (const GaussianProcessNLLVariable &o)
PStreamoperator>> (PStream &in, GaussianProcessNLLVariable &o)
PStreamoperator>> (PStream &in, GaussianProcessNLLVariable *&o)
PStreamoperator<< (PStream &out, const GaussianProcessNLLVariable &o)
PStreamoperator>> (PStream &in, PP< GaussianProcessNLLVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianProcessNLLVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GradientAdaboostCostVariable &o)
PStreamoperator>> (PStream &in, GradientAdaboostCostVariable &o)
PStreamoperator>> (PStream &in, GradientAdaboostCostVariable *&o)
PStreamoperator<< (PStream &out, const GradientAdaboostCostVariable &o)
PStreamoperator>> (PStream &in, PP< GradientAdaboostCostVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GradientAdaboostCostVariable > *opt, PLearnDiff *diffs)
Var gradient_adaboost_cost (Var output, Var target)
ObjecttoObjectPtr (const HardSlopeVariable &o)
PStreamoperator>> (PStream &in, HardSlopeVariable &o)
PStreamoperator>> (PStream &in, HardSlopeVariable *&o)
PStreamoperator<< (PStream &out, const HardSlopeVariable &o)
PStreamoperator>> (PStream &in, PP< HardSlopeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HardSlopeVariable > *opt, PLearnDiff *diffs)
Var hard_slope (Var x, Var left, Var right)
Var d_hard_slope (Var x, Var left, Var right)
ObjecttoObjectPtr (const HeterogenuousAffineTransformVariable &o)
PStreamoperator>> (PStream &in, HeterogenuousAffineTransformVariable &o)
PStreamoperator>> (PStream &in, HeterogenuousAffineTransformVariable *&o)
PStreamoperator<< (PStream &out, const HeterogenuousAffineTransformVariable &o)
PStreamoperator>> (PStream &in, PP< HeterogenuousAffineTransformVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HeterogenuousAffineTransformVariable > *opt, PLearnDiff *diffs)
Var heterogenuous_affine_transform (Var input, VarArray weights, TVec< bool > the_input_is_discrete)
ObjecttoObjectPtr (const HeterogenuousAffineTransformWeightPenalty &o)
PStreamoperator>> (PStream &in, HeterogenuousAffineTransformWeightPenalty &o)
PStreamoperator>> (PStream &in, HeterogenuousAffineTransformWeightPenalty *&o)
PStreamoperator<< (PStream &out, const HeterogenuousAffineTransformWeightPenalty &o)
PStreamoperator>> (PStream &in, PP< HeterogenuousAffineTransformWeightPenalty > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HeterogenuousAffineTransformWeightPenalty > *opt, PLearnDiff *diffs)
Var heterogenuous_affine_transform_weight_penalty (Var input, VarArray weights, TVec< bool > the_input_is_discrete, real weight_decay, real bias_decay=0, string penalty_type="L2_square")
ObjecttoObjectPtr (const IdentityVariable &o)
PStreamoperator>> (PStream &in, IdentityVariable &o)
PStreamoperator>> (PStream &in, IdentityVariable *&o)
PStreamoperator<< (PStream &out, const IdentityVariable &o)
PStreamoperator>> (PStream &in, PP< IdentityVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IdentityVariable > *opt, PLearnDiff *diffs)
Var iden (Var v)
ObjecttoObjectPtr (const IfThenElseVariable &o)
PStreamoperator>> (PStream &in, IfThenElseVariable &o)
PStreamoperator>> (PStream &in, IfThenElseVariable *&o)
PStreamoperator<< (PStream &out, const IfThenElseVariable &o)
PStreamoperator>> (PStream &in, PP< IfThenElseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IfThenElseVariable > *opt, PLearnDiff *diffs)
Var ifThenElse (Var If, Var Then, Var Else)
 IT WOULD BE NICE IF WE COULD REDEFINE (:?)
ObjecttoObjectPtr (const IndexAtPositionVariable &o)
PStreamoperator>> (PStream &in, IndexAtPositionVariable &o)
PStreamoperator>> (PStream &in, IndexAtPositionVariable *&o)
PStreamoperator<< (PStream &out, const IndexAtPositionVariable &o)
PStreamoperator>> (PStream &in, PP< IndexAtPositionVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IndexAtPositionVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const InsertZerosVariable &o)
PStreamoperator>> (PStream &in, InsertZerosVariable &o)
PStreamoperator>> (PStream &in, InsertZerosVariable *&o)
PStreamoperator<< (PStream &out, const InsertZerosVariable &o)
PStreamoperator>> (PStream &in, PP< InsertZerosVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InsertZerosVariable > *opt, PLearnDiff *diffs)
Var insert_zeros (Var v, TVec< int > the_rows)
ObjecttoObjectPtr (const InterValuesVariable &o)
PStreamoperator>> (PStream &in, InterValuesVariable &o)
PStreamoperator>> (PStream &in, InterValuesVariable *&o)
PStreamoperator<< (PStream &out, const InterValuesVariable &o)
PStreamoperator>> (PStream &in, PP< InterValuesVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InterValuesVariable > *opt, PLearnDiff *diffs)
Var interValues (Var values)
 if values = [x1,x2,...,x10], the resulting variable is [(x1+x2)/2,(x2+x3)/2, ...
ObjecttoObjectPtr (const InvertElementsVariable &o)
PStreamoperator>> (PStream &in, InvertElementsVariable &o)
PStreamoperator>> (PStream &in, InvertElementsVariable *&o)
PStreamoperator<< (PStream &out, const InvertElementsVariable &o)
PStreamoperator>> (PStream &in, PP< InvertElementsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InvertElementsVariable > *opt, PLearnDiff *diffs)
Var invertElements (Var v)
ObjecttoObjectPtr (const IsAboveThresholdVariable &o)
PStreamoperator>> (PStream &in, IsAboveThresholdVariable &o)
PStreamoperator>> (PStream &in, IsAboveThresholdVariable *&o)
PStreamoperator<< (PStream &out, const IsAboveThresholdVariable &o)
PStreamoperator>> (PStream &in, PP< IsAboveThresholdVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IsAboveThresholdVariable > *opt, PLearnDiff *diffs)
Var isAboveThreshold (Var v, real threshold=0, real truevalue=1, real falsevalue=0, bool strict=false)
Var operator>= (Var v, real threshold)
Var operator<= (Var v, real threshold)
ObjecttoObjectPtr (const IsLargerVariable &o)
PStreamoperator>> (PStream &in, IsLargerVariable &o)
PStreamoperator>> (PStream &in, IsLargerVariable *&o)
PStreamoperator<< (PStream &out, const IsLargerVariable &o)
PStreamoperator>> (PStream &in, PP< IsLargerVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IsLargerVariable > *opt, PLearnDiff *diffs)
Var operator> (Var v1, Var v2)
Var operator<= (Var v1, Var v2)
ObjecttoObjectPtr (const IsMissingVariable &o)
PStreamoperator>> (PStream &in, IsMissingVariable &o)
PStreamoperator>> (PStream &in, IsMissingVariable *&o)
PStreamoperator<< (PStream &out, const IsMissingVariable &o)
PStreamoperator>> (PStream &in, PP< IsMissingVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IsMissingVariable > *opt, PLearnDiff *diffs)
Var isMissing (Var x, bool parallel, bool set_parallel_missing_output, real parallel_missing_output)
Var isMissing (Var x, bool parallel=0, bool set_parallel_missing_output=0, Vec parallel_missing_outputs=Vec(0))
ObjecttoObjectPtr (const IsSmallerVariable &o)
PStreamoperator>> (PStream &in, IsSmallerVariable &o)
PStreamoperator>> (PStream &in, IsSmallerVariable *&o)
PStreamoperator<< (PStream &out, const IsSmallerVariable &o)
PStreamoperator>> (PStream &in, PP< IsSmallerVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IsSmallerVariable > *opt, PLearnDiff *diffs)
Var operator< (Var v1, Var v2)
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Var operator>= (Var v1, Var v2)
ObjecttoObjectPtr (const LeftPseudoInverseVariable &o)
PStreamoperator>> (PStream &in, LeftPseudoInverseVariable &o)
PStreamoperator>> (PStream &in, LeftPseudoInverseVariable *&o)
PStreamoperator<< (PStream &out, const LeftPseudoInverseVariable &o)
PStreamoperator>> (PStream &in, PP< LeftPseudoInverseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LeftPseudoInverseVariable > *opt, PLearnDiff *diffs)
Var leftPseudoInverse (Var v)
ObjecttoObjectPtr (const LiftOutputVariable &o)
PStreamoperator>> (PStream &in, LiftOutputVariable &o)
PStreamoperator>> (PStream &in, LiftOutputVariable *&o)
PStreamoperator<< (PStream &out, const LiftOutputVariable &o)
PStreamoperator>> (PStream &in, PP< LiftOutputVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LiftOutputVariable > *opt, PLearnDiff *diffs)
Var lift_output (Var linear_output, Var target)
ObjecttoObjectPtr (const LocalizedFeaturesLayerVariable &o)
PStreamoperator>> (PStream &in, LocalizedFeaturesLayerVariable &o)
PStreamoperator>> (PStream &in, LocalizedFeaturesLayerVariable *&o)
PStreamoperator<< (PStream &out, const LocalizedFeaturesLayerVariable &o)
PStreamoperator>> (PStream &in, PP< LocalizedFeaturesLayerVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocalizedFeaturesLayerVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LogAddVariable &o)
PStreamoperator>> (PStream &in, LogAddVariable &o)
PStreamoperator>> (PStream &in, LogAddVariable *&o)
PStreamoperator<< (PStream &out, const LogAddVariable &o)
PStreamoperator>> (PStream &in, PP< LogAddVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LogAddVariable > *opt, PLearnDiff *diffs)
Var logadd (Var &input1, Var &input2)
ObjecttoObjectPtr (const LogSoftmaxVariable &o)
PStreamoperator>> (PStream &in, LogSoftmaxVariable &o)
PStreamoperator>> (PStream &in, LogSoftmaxVariable *&o)
PStreamoperator<< (PStream &out, const LogSoftmaxVariable &o)
PStreamoperator>> (PStream &in, PP< LogSoftmaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LogSoftmaxVariable > *opt, PLearnDiff *diffs)
Var log_softmax (Var v)
Var logadd (Var input)
ObjecttoObjectPtr (const LogVariable &o)
PStreamoperator>> (PStream &in, LogVariable &o)
PStreamoperator>> (PStream &in, LogVariable *&o)
PStreamoperator<< (PStream &out, const LogVariable &o)
PStreamoperator>> (PStream &in, PP< LogVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LogVariable > *opt, PLearnDiff *diffs)
Var log (Var v)
ObjecttoObjectPtr (const MarginPerceptronCostVariable &o)
PStreamoperator>> (PStream &in, MarginPerceptronCostVariable &o)
PStreamoperator>> (PStream &in, MarginPerceptronCostVariable *&o)
PStreamoperator<< (PStream &out, const MarginPerceptronCostVariable &o)
PStreamoperator>> (PStream &in, PP< MarginPerceptronCostVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MarginPerceptronCostVariable > *opt, PLearnDiff *diffs)
Var margin_perceptron_cost (Var output, Var target, real margin)
ObjecttoObjectPtr (const MatrixAffineTransformFeedbackVariable &o)
PStreamoperator>> (PStream &in, MatrixAffineTransformFeedbackVariable &o)
PStreamoperator>> (PStream &in, MatrixAffineTransformFeedbackVariable *&o)
PStreamoperator<< (PStream &out, const MatrixAffineTransformFeedbackVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixAffineTransformFeedbackVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixAffineTransformFeedbackVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MatrixAffineTransformVariable &o)
PStreamoperator>> (PStream &in, MatrixAffineTransformVariable &o)
PStreamoperator>> (PStream &in, MatrixAffineTransformVariable *&o)
PStreamoperator<< (PStream &out, const MatrixAffineTransformVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixAffineTransformVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixAffineTransformVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MatrixElementsVariable &o)
PStreamoperator>> (PStream &in, MatrixElementsVariable &o)
PStreamoperator>> (PStream &in, MatrixElementsVariable *&o)
PStreamoperator<< (PStream &out, const MatrixElementsVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixElementsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixElementsVariable > *opt, PLearnDiff *diffs)
Var matrixElements (Var expression, const Var &i, const Var &j, int ni, int nj, const VarArray &parameters)
ObjecttoObjectPtr (const MatrixInverseVariable &o)
PStreamoperator>> (PStream &in, MatrixInverseVariable &o)
PStreamoperator>> (PStream &in, MatrixInverseVariable *&o)
PStreamoperator<< (PStream &out, const MatrixInverseVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixInverseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixInverseVariable > *opt, PLearnDiff *diffs)
Var matrixInverse (Var v)
ObjecttoObjectPtr (const MatrixOneHotSquaredLoss &o)
PStreamoperator>> (PStream &in, MatrixOneHotSquaredLoss &o)
PStreamoperator>> (PStream &in, MatrixOneHotSquaredLoss *&o)
PStreamoperator<< (PStream &out, const MatrixOneHotSquaredLoss &o)
PStreamoperator>> (PStream &in, PP< MatrixOneHotSquaredLoss > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixOneHotSquaredLoss > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MatrixSoftmaxLossVariable &o)
PStreamoperator>> (PStream &in, MatrixSoftmaxLossVariable &o)
PStreamoperator>> (PStream &in, MatrixSoftmaxLossVariable *&o)
PStreamoperator<< (PStream &out, const MatrixSoftmaxLossVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixSoftmaxLossVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixSoftmaxLossVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MatrixSoftmaxVariable &o)
PStreamoperator>> (PStream &in, MatrixSoftmaxVariable &o)
PStreamoperator>> (PStream &in, MatrixSoftmaxVariable *&o)
PStreamoperator<< (PStream &out, const MatrixSoftmaxVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixSoftmaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixSoftmaxVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MatrixSumOfVariable &o)
PStreamoperator>> (PStream &in, MatrixSumOfVariable &o)
PStreamoperator>> (PStream &in, MatrixSumOfVariable *&o)
PStreamoperator<< (PStream &out, const MatrixSumOfVariable &o)
PStreamoperator>> (PStream &in, PP< MatrixSumOfVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixSumOfVariable > *opt, PLearnDiff *diffs)
Var sumOf (VMat distr, Func f, int nsamples, int input_size)
Var meanOf (VMat distr, Func f, int nsamples, int input_size)
ObjecttoObjectPtr (const MatRowVariable &o)
PStreamoperator>> (PStream &in, MatRowVariable &o)
PStreamoperator>> (PStream &in, MatRowVariable *&o)
PStreamoperator<< (PStream &out, const MatRowVariable &o)
PStreamoperator>> (PStream &in, PP< MatRowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatRowVariable > *opt, PLearnDiff *diffs)
Var accessRow (const Mat &m, Var index)
ObjecttoObjectPtr (const Max2Variable &o)
PStreamoperator>> (PStream &in, Max2Variable &o)
PStreamoperator>> (PStream &in, Max2Variable *&o)
PStreamoperator<< (PStream &out, const Max2Variable &o)
PStreamoperator>> (PStream &in, PP< Max2Variable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Max2Variable > *opt, PLearnDiff *diffs)
Var max (Var v1, Var v2)
ObjecttoObjectPtr (const MaxVariable &o)
PStreamoperator>> (PStream &in, MaxVariable &o)
PStreamoperator>> (PStream &in, MaxVariable *&o)
PStreamoperator<< (PStream &out, const MaxVariable &o)
PStreamoperator>> (PStream &in, PP< MaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MaxVariable > *opt, PLearnDiff *diffs)
Var max (Var v)
ObjecttoObjectPtr (const Min2Variable &o)
PStreamoperator>> (PStream &in, Min2Variable &o)
PStreamoperator>> (PStream &in, Min2Variable *&o)
PStreamoperator<< (PStream &out, const Min2Variable &o)
PStreamoperator>> (PStream &in, PP< Min2Variable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Min2Variable > *opt, PLearnDiff *diffs)
Var min (Var v1, Var v2)
ObjecttoObjectPtr (const MiniBatchClassificationLossVariable &o)
PStreamoperator>> (PStream &in, MiniBatchClassificationLossVariable &o)
PStreamoperator>> (PStream &in, MiniBatchClassificationLossVariable *&o)
PStreamoperator<< (PStream &out, const MiniBatchClassificationLossVariable &o)
PStreamoperator>> (PStream &in, PP< MiniBatchClassificationLossVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MiniBatchClassificationLossVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MinusColumnVariable &o)
PStreamoperator>> (PStream &in, MinusColumnVariable &o)
PStreamoperator>> (PStream &in, MinusColumnVariable *&o)
PStreamoperator<< (PStream &out, const MinusColumnVariable &o)
PStreamoperator>> (PStream &in, PP< MinusColumnVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MinusColumnVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MinusRowVariable &o)
PStreamoperator>> (PStream &in, MinusRowVariable &o)
PStreamoperator>> (PStream &in, MinusRowVariable *&o)
PStreamoperator<< (PStream &out, const MinusRowVariable &o)
PStreamoperator>> (PStream &in, PP< MinusRowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MinusRowVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MinusTransposedColumnVariable &o)
PStreamoperator>> (PStream &in, MinusTransposedColumnVariable &o)
PStreamoperator>> (PStream &in, MinusTransposedColumnVariable *&o)
PStreamoperator<< (PStream &out, const MinusTransposedColumnVariable &o)
PStreamoperator>> (PStream &in, PP< MinusTransposedColumnVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MinusTransposedColumnVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MinusVariable &o)
PStreamoperator>> (PStream &in, MinusVariable &o)
PStreamoperator>> (PStream &in, MinusVariable *&o)
PStreamoperator<< (PStream &out, const MinusVariable &o)
PStreamoperator>> (PStream &in, PP< MinusVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MinusVariable > *opt, PLearnDiff *diffs)
Var minus (Var v, Var w)
ObjecttoObjectPtr (const MinVariable &o)
PStreamoperator>> (PStream &in, MinVariable &o)
PStreamoperator>> (PStream &in, MinVariable *&o)
PStreamoperator<< (PStream &out, const MinVariable &o)
PStreamoperator>> (PStream &in, PP< MinVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MinVariable > *opt, PLearnDiff *diffs)
Var min (Var v)
ObjecttoObjectPtr (const MulticlassLossVariable &o)
PStreamoperator>> (PStream &in, MulticlassLossVariable &o)
PStreamoperator>> (PStream &in, MulticlassLossVariable *&o)
PStreamoperator<< (PStream &out, const MulticlassLossVariable &o)
PStreamoperator>> (PStream &in, PP< MulticlassLossVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MulticlassLossVariable > *opt, PLearnDiff *diffs)
Var multiclass_loss (Var network_output, Var targets)
ObjecttoObjectPtr (const NegateElementsVariable &o)
PStreamoperator>> (PStream &in, NegateElementsVariable &o)
PStreamoperator>> (PStream &in, NegateElementsVariable *&o)
PStreamoperator<< (PStream &out, const NegateElementsVariable &o)
PStreamoperator>> (PStream &in, PP< NegateElementsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NegateElementsVariable > *opt, PLearnDiff *diffs)
Var negateElements (Var v)
Var operator- (Var v)
ObjecttoObjectPtr (const NegCrossEntropySigmoidVariable &o)
PStreamoperator>> (PStream &in, NegCrossEntropySigmoidVariable &o)
PStreamoperator>> (PStream &in, NegCrossEntropySigmoidVariable *&o)
PStreamoperator<< (PStream &out, const NegCrossEntropySigmoidVariable &o)
PStreamoperator>> (PStream &in, PP< NegCrossEntropySigmoidVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NegCrossEntropySigmoidVariable > *opt, PLearnDiff *diffs)
Var stable_cross_entropy (Var linear_output, Var target, bool ignore_missing=false)
ObjecttoObjectPtr (const NegLogPoissonVariable &o)
PStreamoperator>> (PStream &in, NegLogPoissonVariable &o)
PStreamoperator>> (PStream &in, NegLogPoissonVariable *&o)
PStreamoperator<< (PStream &out, const NegLogPoissonVariable &o)
PStreamoperator>> (PStream &in, PP< NegLogPoissonVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NegLogPoissonVariable > *opt, PLearnDiff *diffs)
Var neglogpoissonvariable (VarArray &the_varray)
ObjecttoObjectPtr (const NllGeneralGaussianVariable &o)
PStreamoperator>> (PStream &in, NllGeneralGaussianVariable &o)
PStreamoperator>> (PStream &in, NllGeneralGaussianVariable *&o)
PStreamoperator<< (PStream &out, const NllGeneralGaussianVariable &o)
PStreamoperator>> (PStream &in, PP< NllGeneralGaussianVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NllGeneralGaussianVariable > *opt, PLearnDiff *diffs)
Var nll_general_gaussian (Var tangent_plane_var, Var mu_var, Var sn_var, Var neighbors_var, real log_L, bool use_mu, int mu_nneighbors)
ObjecttoObjectPtr (const NllSemisphericalGaussianVariable &o)
PStreamoperator>> (PStream &in, NllSemisphericalGaussianVariable &o)
PStreamoperator>> (PStream &in, NllSemisphericalGaussianVariable *&o)
PStreamoperator<< (PStream &out, const NllSemisphericalGaussianVariable &o)
PStreamoperator>> (PStream &in, PP< NllSemisphericalGaussianVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NllSemisphericalGaussianVariable > *opt, PLearnDiff *diffs)
Var nll_semispherical_gaussian (Var tangent_plane_var, Var mu_var, Var sm_var, Var sn_var, Var neighbors_dist_var, Var p_target_var, Var p_neighbors_var, Var noise, Var mu_noisy, bool use_noise=false, real epsilon=1e-6, real min_p_x=0, int mu_n_neighbors=-1)
ObjecttoObjectPtr (const NoBpropVariable &o)
PStreamoperator>> (PStream &in, NoBpropVariable &o)
PStreamoperator>> (PStream &in, NoBpropVariable *&o)
PStreamoperator<< (PStream &out, const NoBpropVariable &o)
PStreamoperator>> (PStream &in, PP< NoBpropVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NoBpropVariable > *opt, PLearnDiff *diffs)
Var no_bprop (Var v, real gradient_scaling_factor=0.0)
 copy its argument but block gradient completely or partially
ObjecttoObjectPtr (const ObjectOptionVariable &o)
PStreamoperator>> (PStream &in, ObjectOptionVariable &o)
PStreamoperator>> (PStream &in, ObjectOptionVariable *&o)
PStreamoperator<< (PStream &out, const ObjectOptionVariable &o)
PStreamoperator>> (PStream &in, PP< ObjectOptionVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ObjectOptionVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OneHotSquaredLoss &o)
PStreamoperator>> (PStream &in, OneHotSquaredLoss &o)
PStreamoperator>> (PStream &in, OneHotSquaredLoss *&o)
PStreamoperator<< (PStream &out, const OneHotSquaredLoss &o)
PStreamoperator>> (PStream &in, PP< OneHotSquaredLoss > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OneHotSquaredLoss > *opt, PLearnDiff *diffs)
Var onehot_squared_loss (Var network_output, Var classnum, real coldval=0., real hotval=1.)
ObjecttoObjectPtr (const OneHotVariable &o)
PStreamoperator>> (PStream &in, OneHotVariable &o)
PStreamoperator>> (PStream &in, OneHotVariable *&o)
PStreamoperator<< (PStream &out, const OneHotVariable &o)
PStreamoperator>> (PStream &in, PP< OneHotVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OneHotVariable > *opt, PLearnDiff *diffs)
Var onehot (int the_length, Var hotindex, real coldvalue=0.0, real hotvalue=1.0)
ObjecttoObjectPtr (const OutputVariable &o)
PStreamoperator>> (PStream &in, OutputVariable &o)
PStreamoperator>> (PStream &in, OutputVariable *&o)
PStreamoperator<< (PStream &out, const OutputVariable &o)
PStreamoperator>> (PStream &in, PP< OutputVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OutputVariable > *opt, PLearnDiff *diffs)
Var output_var (Var v, char *filename)
ObjecttoObjectPtr (const PDistributionVariable &o)
PStreamoperator>> (PStream &in, PDistributionVariable &o)
PStreamoperator>> (PStream &in, PDistributionVariable *&o)
PStreamoperator<< (PStream &out, const PDistributionVariable &o)
PStreamoperator>> (PStream &in, PP< PDistributionVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PDistributionVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PLogPVariable &o)
PStreamoperator>> (PStream &in, PLogPVariable &o)
PStreamoperator>> (PStream &in, PLogPVariable *&o)
PStreamoperator<< (PStream &out, const PLogPVariable &o)
PStreamoperator>> (PStream &in, PP< PLogPVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLogPVariable > *opt, PLearnDiff *diffs)
Var plogp (Var v)
ObjecttoObjectPtr (const PlusColumnVariable &o)
PStreamoperator>> (PStream &in, PlusColumnVariable &o)
PStreamoperator>> (PStream &in, PlusColumnVariable *&o)
PStreamoperator<< (PStream &out, const PlusColumnVariable &o)
PStreamoperator>> (PStream &in, PP< PlusColumnVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PlusColumnVariable > *opt, PLearnDiff *diffs)
Var plusColumn (Var v1, Var v2)
ObjecttoObjectPtr (const PlusConstantVariable &o)
PStreamoperator>> (PStream &in, PlusConstantVariable &o)
PStreamoperator>> (PStream &in, PlusConstantVariable *&o)
PStreamoperator<< (PStream &out, const PlusConstantVariable &o)
PStreamoperator>> (PStream &in, PP< PlusConstantVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PlusConstantVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PlusManyVariable &o)
PStreamoperator>> (PStream &in, PlusManyVariable &o)
PStreamoperator>> (PStream &in, PlusManyVariable *&o)
PStreamoperator<< (PStream &out, const PlusManyVariable &o)
PStreamoperator>> (PStream &in, PP< PlusManyVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PlusManyVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PlusRowVariable &o)
PStreamoperator>> (PStream &in, PlusRowVariable &o)
PStreamoperator>> (PStream &in, PlusRowVariable *&o)
PStreamoperator<< (PStream &out, const PlusRowVariable &o)
PStreamoperator>> (PStream &in, PP< PlusRowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PlusRowVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PlusScalarVariable &o)
PStreamoperator>> (PStream &in, PlusScalarVariable &o)
PStreamoperator>> (PStream &in, PlusScalarVariable *&o)
PStreamoperator<< (PStream &out, const PlusScalarVariable &o)
PStreamoperator>> (PStream &in, PP< PlusScalarVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PlusScalarVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PlusVariable &o)
PStreamoperator>> (PStream &in, PlusVariable &o)
PStreamoperator>> (PStream &in, PlusVariable *&o)
PStreamoperator<< (PStream &out, const PlusVariable &o)
PStreamoperator>> (PStream &in, PP< PlusVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PlusVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PotentialsVariable &o)
PStreamoperator>> (PStream &in, PotentialsVariable &o)
PStreamoperator>> (PStream &in, PotentialsVariable *&o)
PStreamoperator<< (PStream &out, const PotentialsVariable &o)
PStreamoperator>> (PStream &in, PP< PotentialsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PotentialsVariable > *opt, PLearnDiff *diffs)
Var potentials (Var the_input, Var the_comp_input, Var the_dp_target, Var the_target_dist_rep, Var the_output, VarArray the_proppath_params, VMat the_distr)
ObjecttoObjectPtr (const PowVariable &o)
PStreamoperator>> (PStream &in, PowVariable &o)
PStreamoperator>> (PStream &in, PowVariable *&o)
PStreamoperator<< (PStream &out, const PowVariable &o)
PStreamoperator>> (PStream &in, PP< PowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PowVariable > *opt, PLearnDiff *diffs)
Var pow (Var v, real power)
Var sqrt (Var v)
ObjecttoObjectPtr (const PowVariableVariable &o)
PStreamoperator>> (PStream &in, PowVariableVariable &o)
PStreamoperator>> (PStream &in, PowVariableVariable *&o)
PStreamoperator<< (PStream &out, const PowVariableVariable &o)
PStreamoperator>> (PStream &in, PP< PowVariableVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PowVariableVariable > *opt, PLearnDiff *diffs)
Var pow (Var v, Var power)
ObjecttoObjectPtr (const ProductTransposeVariable &o)
PStreamoperator>> (PStream &in, ProductTransposeVariable &o)
PStreamoperator>> (PStream &in, ProductTransposeVariable *&o)
PStreamoperator<< (PStream &out, const ProductTransposeVariable &o)
PStreamoperator>> (PStream &in, PP< ProductTransposeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProductTransposeVariable > *opt, PLearnDiff *diffs)
Var productTranspose (Var &m1, Var &m2)
ObjecttoObjectPtr (const ProductVariable &o)
PStreamoperator>> (PStream &in, ProductVariable &o)
PStreamoperator>> (PStream &in, ProductVariable *&o)
PStreamoperator<< (PStream &out, const ProductVariable &o)
PStreamoperator>> (PStream &in, PP< ProductVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProductVariable > *opt, PLearnDiff *diffs)
Var product (Var v1, Var v2)
 general matrix product
ObjecttoObjectPtr (const ProjectionErrorVariable &o)
PStreamoperator>> (PStream &in, ProjectionErrorVariable &o)
PStreamoperator>> (PStream &in, ProjectionErrorVariable *&o)
PStreamoperator<< (PStream &out, const ProjectionErrorVariable &o)
PStreamoperator>> (PStream &in, PP< ProjectionErrorVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProjectionErrorVariable > *opt, PLearnDiff *diffs)
Var projection_error (Var f, Var t, real norm_penalization=0, int n=-1, bool normalize_by_neighbor_distance=true, bool use_subspace_distance=false, real epsilon=0, real regularization=0, bool ordered_vectors=true)
ObjecttoObjectPtr (const ReIndexedTargetVariable &o)
PStreamoperator>> (PStream &in, ReIndexedTargetVariable &o)
PStreamoperator>> (PStream &in, ReIndexedTargetVariable *&o)
PStreamoperator<< (PStream &out, const ReIndexedTargetVariable &o)
PStreamoperator>> (PStream &in, PP< ReIndexedTargetVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ReIndexedTargetVariable > *opt, PLearnDiff *diffs)
Var reindexed_target (Var target, Var input, VMat source, TVec< int > target_cols)
Var reindexed_target (Var target, Var input, PP< Dictionary > dict, TVec< int > target_cols)
ObjecttoObjectPtr (const ReshapeVariable &o)
PStreamoperator>> (PStream &in, ReshapeVariable &o)
PStreamoperator>> (PStream &in, ReshapeVariable *&o)
PStreamoperator<< (PStream &out, const ReshapeVariable &o)
PStreamoperator>> (PStream &in, PP< ReshapeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ReshapeVariable > *opt, PLearnDiff *diffs)
Var reshape (Var v, int newlength, int newwidth)
ObjecttoObjectPtr (const RightPseudoInverseVariable &o)
PStreamoperator>> (PStream &in, RightPseudoInverseVariable &o)
PStreamoperator>> (PStream &in, RightPseudoInverseVariable *&o)
PStreamoperator<< (PStream &out, const RightPseudoInverseVariable &o)
PStreamoperator>> (PStream &in, PP< RightPseudoInverseVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RightPseudoInverseVariable > *opt, PLearnDiff *diffs)
Var rightPseudoInverse (Var v)
ObjecttoObjectPtr (const RowAtPositionVariable &o)
PStreamoperator>> (PStream &in, RowAtPositionVariable &o)
PStreamoperator>> (PStream &in, RowAtPositionVariable *&o)
PStreamoperator<< (PStream &out, const RowAtPositionVariable &o)
PStreamoperator>> (PStream &in, PP< RowAtPositionVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowAtPositionVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RowOfVariable &o)
PStreamoperator>> (PStream &in, RowOfVariable &o)
PStreamoperator>> (PStream &in, RowOfVariable *&o)
PStreamoperator<< (PStream &out, const RowOfVariable &o)
PStreamoperator>> (PStream &in, PP< RowOfVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowOfVariable > *opt, PLearnDiff *diffs)
Var rowOf (VMat distr, Var index)
 rowOf
ObjecttoObjectPtr (const RowSumSquareVariable &o)
PStreamoperator>> (PStream &in, RowSumSquareVariable &o)
PStreamoperator>> (PStream &in, RowSumSquareVariable *&o)
PStreamoperator<< (PStream &out, const RowSumSquareVariable &o)
PStreamoperator>> (PStream &in, PP< RowSumSquareVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowSumSquareVariable > *opt, PLearnDiff *diffs)
Var rowSumSquare (Var v)
ObjecttoObjectPtr (const RowSumVariable &o)
PStreamoperator>> (PStream &in, RowSumVariable &o)
PStreamoperator>> (PStream &in, RowSumVariable *&o)
PStreamoperator<< (PStream &out, const RowSumVariable &o)
PStreamoperator>> (PStream &in, PP< RowSumVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowSumVariable > *opt, PLearnDiff *diffs)
Var rowSum (Var v)
ObjecttoObjectPtr (const SemiSupervisedProbClassCostVariable &o)
PStreamoperator>> (PStream &in, SemiSupervisedProbClassCostVariable &o)
PStreamoperator>> (PStream &in, SemiSupervisedProbClassCostVariable *&o)
PStreamoperator<< (PStream &out, const SemiSupervisedProbClassCostVariable &o)
PStreamoperator>> (PStream &in, PP< SemiSupervisedProbClassCostVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SemiSupervisedProbClassCostVariable > *opt, PLearnDiff *diffs)
Var softmax (Var x1, Var x2, Var hardness)
ObjecttoObjectPtr (const SigmoidVariable &o)
PStreamoperator>> (PStream &in, SigmoidVariable &o)
PStreamoperator>> (PStream &in, SigmoidVariable *&o)
PStreamoperator<< (PStream &out, const SigmoidVariable &o)
PStreamoperator>> (PStream &in, PP< SigmoidVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SigmoidVariable > *opt, PLearnDiff *diffs)
Var sigmoid (Var v)
ObjecttoObjectPtr (const SignVariable &o)
PStreamoperator>> (PStream &in, SignVariable &o)
PStreamoperator>> (PStream &in, SignVariable *&o)
PStreamoperator<< (PStream &out, const SignVariable &o)
PStreamoperator>> (PStream &in, PP< SignVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SignVariable > *opt, PLearnDiff *diffs)
Var sign (Var input)
ObjecttoObjectPtr (const SoftmaxLossVariable &o)
PStreamoperator>> (PStream &in, SoftmaxLossVariable &o)
PStreamoperator>> (PStream &in, SoftmaxLossVariable *&o)
PStreamoperator<< (PStream &out, const SoftmaxLossVariable &o)
PStreamoperator>> (PStream &in, PP< SoftmaxLossVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftmaxLossVariable > *opt, PLearnDiff *diffs)
Var softmax (Var input, Var index)
ObjecttoObjectPtr (const SoftmaxVariable &o)
PStreamoperator>> (PStream &in, SoftmaxVariable &o)
PStreamoperator>> (PStream &in, SoftmaxVariable *&o)
PStreamoperator<< (PStream &out, const SoftmaxVariable &o)
PStreamoperator>> (PStream &in, PP< SoftmaxVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftmaxVariable > *opt, PLearnDiff *diffs)
Var softmax (Var v)
ObjecttoObjectPtr (const SoftplusVariable &o)
PStreamoperator>> (PStream &in, SoftplusVariable &o)
PStreamoperator>> (PStream &in, SoftplusVariable *&o)
PStreamoperator<< (PStream &out, const SoftplusVariable &o)
PStreamoperator>> (PStream &in, PP< SoftplusVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftplusVariable > *opt, PLearnDiff *diffs)
Var softplus (Var v)
ObjecttoObjectPtr (const SoftSlopeIntegralVariable &o)
PStreamoperator>> (PStream &in, SoftSlopeIntegralVariable &o)
PStreamoperator>> (PStream &in, SoftSlopeIntegralVariable *&o)
PStreamoperator<< (PStream &out, const SoftSlopeIntegralVariable &o)
PStreamoperator>> (PStream &in, PP< SoftSlopeIntegralVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftSlopeIntegralVariable > *opt, PLearnDiff *diffs)
Var soft_slope_integral (Var smoothness, Var left, Var right, real a=0, real b=1)
ObjecttoObjectPtr (const SoftSlopeVariable &o)
PStreamoperator>> (PStream &in, SoftSlopeVariable &o)
PStreamoperator>> (PStream &in, SoftSlopeVariable *&o)
PStreamoperator<< (PStream &out, const SoftSlopeVariable &o)
PStreamoperator>> (PStream &in, PP< SoftSlopeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftSlopeVariable > *opt, PLearnDiff *diffs)
Var soft_slope (Var x, Var smoothness, Var left, Var right)
Var d_soft_slope (Var x, Var smoothness, Var left, Var right)
Var soft_slope_limit (Var x, Var smoothness, Var left, Var right)
ObjecttoObjectPtr (const SourceVariable &o)
PStreamoperator>> (PStream &in, SourceVariable &o)
PStreamoperator>> (PStream &in, SourceVariable *&o)
PStreamoperator<< (PStream &out, const SourceVariable &o)
PStreamoperator>> (PStream &in, PP< SourceVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SourceVariable > *opt, PLearnDiff *diffs)
template<class T >
void absargmax (const TMat< T > &mat, int &maxi, int &maxj)
ObjecttoObjectPtr (const SparseIncrementalAffineTransformVariable &o)
PStreamoperator>> (PStream &in, SparseIncrementalAffineTransformVariable &o)
PStreamoperator>> (PStream &in, SparseIncrementalAffineTransformVariable *&o)
PStreamoperator<< (PStream &out, const SparseIncrementalAffineTransformVariable &o)
PStreamoperator>> (PStream &in, PP< SparseIncrementalAffineTransformVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SparseIncrementalAffineTransformVariable > *opt, PLearnDiff *diffs)
Var sparse_incremental_affine_transform (Var vec, Var transformation, real the_running_average_prop=0.01, real the_start_grad_prop=1)
 first row of transformation is the bias.
ObjecttoObjectPtr (const SquareRootVariable &o)
PStreamoperator>> (PStream &in, SquareRootVariable &o)
PStreamoperator>> (PStream &in, SquareRootVariable *&o)
PStreamoperator<< (PStream &out, const SquareRootVariable &o)
PStreamoperator>> (PStream &in, PP< SquareRootVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SquareRootVariable > *opt, PLearnDiff *diffs)
Var squareroot (Var v)
ObjecttoObjectPtr (const SquareVariable &o)
PStreamoperator>> (PStream &in, SquareVariable &o)
PStreamoperator>> (PStream &in, SquareVariable *&o)
PStreamoperator<< (PStream &out, const SquareVariable &o)
PStreamoperator>> (PStream &in, PP< SquareVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SquareVariable > *opt, PLearnDiff *diffs)
Var square (Var v)
ObjecttoObjectPtr (const SubMatTransposeVariable &o)
PStreamoperator>> (PStream &in, SubMatTransposeVariable &o)
PStreamoperator>> (PStream &in, SubMatTransposeVariable *&o)
PStreamoperator<< (PStream &out, const SubMatTransposeVariable &o)
PStreamoperator>> (PStream &in, PP< SubMatTransposeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SubMatTransposeVariable > *opt, PLearnDiff *diffs)
Var transpose (Var v)
ObjecttoObjectPtr (const SubMatVariable &o)
PStreamoperator>> (PStream &in, SubMatVariable &o)
PStreamoperator>> (PStream &in, SubMatVariable *&o)
PStreamoperator<< (PStream &out, const SubMatVariable &o)
PStreamoperator>> (PStream &in, PP< SubMatVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SubMatVariable > *opt, PLearnDiff *diffs)
Var subMat (Var v, int i, int j, int l, int w)
ObjecttoObjectPtr (const SubsampleVariable &o)
PStreamoperator>> (PStream &in, SubsampleVariable &o)
PStreamoperator>> (PStream &in, SubsampleVariable *&o)
PStreamoperator<< (PStream &out, const SubsampleVariable &o)
PStreamoperator>> (PStream &in, PP< SubsampleVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SubsampleVariable > *opt, PLearnDiff *diffs)
Var subsample (Var input, int subsample_factor)
ObjecttoObjectPtr (const SumAbsVariable &o)
PStreamoperator>> (PStream &in, SumAbsVariable &o)
PStreamoperator>> (PStream &in, SumAbsVariable *&o)
PStreamoperator<< (PStream &out, const SumAbsVariable &o)
PStreamoperator>> (PStream &in, PP< SumAbsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumAbsVariable > *opt, PLearnDiff *diffs)
Var sumabs (Var v)
ObjecttoObjectPtr (const SumOfVariable &o)
PStreamoperator>> (PStream &in, SumOfVariable &o)
PStreamoperator>> (PStream &in, SumOfVariable *&o)
PStreamoperator<< (PStream &out, const SumOfVariable &o)
PStreamoperator>> (PStream &in, PP< SumOfVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumOfVariable > *opt, PLearnDiff *diffs)
Var sumOf (VMat distr, Func f, int nsamples=-1, bool the_do_sizeprop=false)
 sumOf
Var sumOf (Var output, const VarArray &inputs, VMat distr, int nsamples=-1, VarArray parameters=VarArray(), bool the_do_sizeprop=false)
 deprecated old version do not use!
Var meanOf (VMat distr, Func f, int nsamples=-1, bool the_do_sizeprop=false)
 meanOf
Var meanOf (Var output, const VarArray &inputs, VMat distr, int nsamples=-1, VarArray parameters=VarArray(), bool the_do_sizeprop=false)
 deprecated old version do not use!
ObjecttoObjectPtr (const SumOverBagsVariable &o)
PStreamoperator>> (PStream &in, SumOverBagsVariable &o)
PStreamoperator>> (PStream &in, SumOverBagsVariable *&o)
PStreamoperator<< (PStream &out, const SumOverBagsVariable &o)
PStreamoperator>> (PStream &in, PP< SumOverBagsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumOverBagsVariable > *opt, PLearnDiff *diffs)
Var sumOverBags (VMat vmat, Func f, int max_bag_size, int nsamples, bool average=false, bool transpose=false)
 sumOf
ObjecttoObjectPtr (const SumSquareVariable &o)
PStreamoperator>> (PStream &in, SumSquareVariable &o)
PStreamoperator>> (PStream &in, SumSquareVariable *&o)
PStreamoperator<< (PStream &out, const SumSquareVariable &o)
PStreamoperator>> (PStream &in, PP< SumSquareVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumSquareVariable > *opt, PLearnDiff *diffs)
Var sumsquare (Var v)
ObjecttoObjectPtr (const SumVariable &o)
PStreamoperator>> (PStream &in, SumVariable &o)
PStreamoperator>> (PStream &in, SumVariable *&o)
PStreamoperator<< (PStream &out, const SumVariable &o)
PStreamoperator>> (PStream &in, PP< SumVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SumVariable > *opt, PLearnDiff *diffs)
Var sum (Var v)
ObjecttoObjectPtr (const SVDVariable &o)
PStreamoperator>> (PStream &in, SVDVariable &o)
PStreamoperator>> (PStream &in, SVDVariable *&o)
PStreamoperator<< (PStream &out, const SVDVariable &o)
PStreamoperator>> (PStream &in, PP< SVDVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SVDVariable > *opt, PLearnDiff *diffs)
Var svd (Var v)
ObjecttoObjectPtr (const TanhVariable &o)
PStreamoperator>> (PStream &in, TanhVariable &o)
PStreamoperator>> (PStream &in, TanhVariable *&o)
PStreamoperator<< (PStream &out, const TanhVariable &o)
PStreamoperator>> (PStream &in, PP< TanhVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TanhVariable > *opt, PLearnDiff *diffs)
Var tanh (Var v)
ObjecttoObjectPtr (const VariablesTest &o)
PStreamoperator>> (PStream &in, VariablesTest &o)
PStreamoperator>> (PStream &in, VariablesTest *&o)
PStreamoperator<< (PStream &out, const VariablesTest &o)
PStreamoperator>> (PStream &in, PP< VariablesTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VariablesTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VarUtilsTest &o)
PStreamoperator>> (PStream &in, VarUtilsTest &o)
PStreamoperator>> (PStream &in, VarUtilsTest *&o)
PStreamoperator<< (PStream &out, const VarUtilsTest &o)
PStreamoperator>> (PStream &in, PP< VarUtilsTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VarUtilsTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ThresholdBpropVariable &o)
PStreamoperator>> (PStream &in, ThresholdBpropVariable &o)
PStreamoperator>> (PStream &in, ThresholdBpropVariable *&o)
PStreamoperator<< (PStream &out, const ThresholdBpropVariable &o)
PStreamoperator>> (PStream &in, PP< ThresholdBpropVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ThresholdBpropVariable > *opt, PLearnDiff *diffs)
Var threshold_bprop (Var v, real gradient_threshold_factor=0.0)
 copy its argument but block gradient completely or partially
ObjecttoObjectPtr (const TimesColumnVariable &o)
PStreamoperator>> (PStream &in, TimesColumnVariable &o)
PStreamoperator>> (PStream &in, TimesColumnVariable *&o)
PStreamoperator<< (PStream &out, const TimesColumnVariable &o)
PStreamoperator>> (PStream &in, PP< TimesColumnVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TimesColumnVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TimesConstantVariable &o)
PStreamoperator>> (PStream &in, TimesConstantVariable &o)
PStreamoperator>> (PStream &in, TimesConstantVariable *&o)
PStreamoperator<< (PStream &out, const TimesConstantVariable &o)
PStreamoperator>> (PStream &in, PP< TimesConstantVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TimesConstantVariable > *opt, PLearnDiff *diffs)
Var operator* (Var v, real cte)
Var operator* (real cte, Var v)
Var operator/ (Var v, real cte)
ObjecttoObjectPtr (const TimesRowVariable &o)
PStreamoperator>> (PStream &in, TimesRowVariable &o)
PStreamoperator>> (PStream &in, TimesRowVariable *&o)
PStreamoperator<< (PStream &out, const TimesRowVariable &o)
PStreamoperator>> (PStream &in, PP< TimesRowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TimesRowVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TimesScalarVariable &o)
PStreamoperator>> (PStream &in, TimesScalarVariable &o)
PStreamoperator>> (PStream &in, TimesScalarVariable *&o)
PStreamoperator<< (PStream &out, const TimesScalarVariable &o)
PStreamoperator>> (PStream &in, PP< TimesScalarVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TimesScalarVariable > *opt, PLearnDiff *diffs)
Var timesScalar (Var v, Var scalar)
ObjecttoObjectPtr (const TimesVariable &o)
PStreamoperator>> (PStream &in, TimesVariable &o)
PStreamoperator>> (PStream &in, TimesVariable *&o)
PStreamoperator<< (PStream &out, const TimesVariable &o)
PStreamoperator>> (PStream &in, PP< TimesVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TimesVariable > *opt, PLearnDiff *diffs)
Var times (Var v, Var w)
ObjecttoObjectPtr (const TransposeProductVariable &o)
PStreamoperator>> (PStream &in, TransposeProductVariable &o)
PStreamoperator>> (PStream &in, TransposeProductVariable *&o)
PStreamoperator<< (PStream &out, const TransposeProductVariable &o)
PStreamoperator>> (PStream &in, PP< TransposeProductVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransposeProductVariable > *opt, PLearnDiff *diffs)
Var transposeProduct (const Var &m1, const Var &m2)
ObjecttoObjectPtr (const TransposeVariable &o)
PStreamoperator>> (PStream &in, TransposeVariable &o)
PStreamoperator>> (PStream &in, TransposeVariable *&o)
PStreamoperator<< (PStream &out, const TransposeVariable &o)
PStreamoperator>> (PStream &in, PP< TransposeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransposeVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UnaryHardSlopeVariable &o)
PStreamoperator>> (PStream &in, UnaryHardSlopeVariable &o)
PStreamoperator>> (PStream &in, UnaryHardSlopeVariable *&o)
PStreamoperator<< (PStream &out, const UnaryHardSlopeVariable &o)
PStreamoperator>> (PStream &in, PP< UnaryHardSlopeVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnaryHardSlopeVariable > *opt, PLearnDiff *diffs)
Var unary_hard_slope (Var v, real l=-1, real r=1)
ObjecttoObjectPtr (const UnaryVariable &o)
PStreamoperator>> (PStream &in, UnaryVariable &o)
PStreamoperator>> (PStream &in, UnaryVariable *&o)
PStreamoperator<< (PStream &out, const UnaryVariable &o)
PStreamoperator>> (PStream &in, PP< UnaryVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnaryVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UnequalConstantVariable &o)
PStreamoperator>> (PStream &in, UnequalConstantVariable &o)
PStreamoperator>> (PStream &in, UnequalConstantVariable *&o)
PStreamoperator<< (PStream &out, const UnequalConstantVariable &o)
PStreamoperator>> (PStream &in, PP< UnequalConstantVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnequalConstantVariable > *opt, PLearnDiff *diffs)
Var operator!= (Var v1, real cte)
 result[i] = 1 if v1[i]!=cte, 0 otherwise
Var operator!= (real cte, Var v1)
 result[i] = 1 if v1[i]!=cte, 0 otherwise
ObjecttoObjectPtr (const UnfoldedFuncVariable &o)
PStreamoperator>> (PStream &in, UnfoldedFuncVariable &o)
PStreamoperator>> (PStream &in, UnfoldedFuncVariable *&o)
PStreamoperator<< (PStream &out, const UnfoldedFuncVariable &o)
PStreamoperator>> (PStream &in, PP< UnfoldedFuncVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnfoldedFuncVariable > *opt, PLearnDiff *diffs)
Var unfoldedFunc (Var input_matrix, Func f, bool transpose=false)
ObjecttoObjectPtr (const UnfoldedSumOfVariable &o)
PStreamoperator>> (PStream &in, UnfoldedSumOfVariable &o)
PStreamoperator>> (PStream &in, UnfoldedSumOfVariable *&o)
PStreamoperator<< (PStream &out, const UnfoldedSumOfVariable &o)
PStreamoperator>> (PStream &in, PP< UnfoldedSumOfVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnfoldedSumOfVariable > *opt, PLearnDiff *diffs)
Var unfoldedSumOf (Var input_matrix, Var bag_size, Func f, int max_bag_size)
ostream & operator<< (ostream &out, const Var &v)
Var var (real init_value)
template<>
void deepCopyField (Var &field, CopiesMap &copies)
 Specialized in order to display a warning message.
Var operator+ (Var v, real cte)
Var operator+ (real cte, Var v)
Var operator- (Var v, real cte)
Var operator+ (Var v1, Var v2)
void operator+= (Var &v1, const Var &v2)
Var operator- (Var v1, Var v2)
void operator-= (Var &v1, const Var &v2)
Var operator- (real cte, Var v)
Var operator* (Var v1, Var v2)
 element-wise multiplications
Var operator/ (real cte, Var v)
Var operator/ (Var v1, Var v2)
Var operator== (Var v1, Var v2)
Var operator!= (Var v1, Var v2)
Var isdifferent (Var v1, Var v2)
Var mean (Var v)
Var neg_log_pi (Var p, Var index)
Var softmax (Var input, int index)
Var pownorm (Var input, real n)
Var norm (Var input, real n)
Var entropy (Var v, bool normalize)
Var distance (Var input1, Var input2, real n)
Var powdistance (Var input1, Var input2, real n)
VarArray propagationPath (const VarArray &inputs, const VarArray &outputs)
 The function that computes a propagation path.
VarArray propagationPath (const VarArray &outputs)
 returns the propagationpath going from all sources that influence the outputs to the outputs passing by parameters_to_optimize.
VarArray propagationPathToParentsOfPath (const VarArray &inputs, const VarArray &outputs)
 from all sources to all direct non-inputs parents of the path inputs-->outputs
VarArray nonInputParentsOfPath (VarArray inputs, VarArray outputs)
 Isn't this useless? as we have a constructor of VarArray from Var that should be called automatically !!!???? (Pascal)
VarArray allSources (const VarArray &v)
 returns all sources that influence the given vars
VarArray operator- (const VarArray &a, const VarArray &b)
 returns all variables of a that are not in b
VarArray nonInputSources (const VarArray &inputs, const VarArray &outputs)
 returns all sources that influence outputs except those that influence it only through inputs
void operator<< (VarArray &ar, const Array< Vec > &values)
void operator>> (VarArray &ar, const Array< Vec > &values)
void printInfo (VarArray &a)
void printInfo (VarArray inputs, const Var &output, bool show_gradients)
template<>
void deepCopyField (VarArray &field, CopiesMap &copies)
void operator<< (VarArray &ar, const Vec &datavec)
void operator>> (VarArray &ar, const Vec &datavec)
VarArray operator& (Var v1, Var v2)
PStreamoperator>> (PStream &in, VarArray &o)
PStreamoperator<< (PStream &out, const VarArray &o)
ObjecttoObjectPtr (const VarArrayElementVariable &o)
PStreamoperator>> (PStream &in, VarArrayElementVariable &o)
PStreamoperator>> (PStream &in, VarArrayElementVariable *&o)
PStreamoperator<< (PStream &out, const VarArrayElementVariable &o)
PStreamoperator>> (PStream &in, PP< VarArrayElementVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VarArrayElementVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VarColumnsVariable &o)
PStreamoperator>> (PStream &in, VarColumnsVariable &o)
PStreamoperator>> (PStream &in, VarColumnsVariable *&o)
PStreamoperator<< (PStream &out, const VarColumnsVariable &o)
PStreamoperator>> (PStream &in, PP< VarColumnsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VarColumnsVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VarElementVariable &o)
PStreamoperator>> (PStream &in, VarElementVariable &o)
PStreamoperator>> (PStream &in, VarElementVariable *&o)
PStreamoperator<< (PStream &out, const VarElementVariable &o)
PStreamoperator>> (PStream &in, PP< VarElementVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VarElementVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Variable &o)
PStreamoperator>> (PStream &in, Variable &o)
PStreamoperator>> (PStream &in, Variable *&o)
PStreamoperator<< (PStream &out, const Variable &o)
PStreamoperator>> (PStream &in, PP< Variable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Variable > *opt, PLearnDiff *diffs)
PStreamoperator>> (PStream &in, Var &o)
PStreamoperator<< (PStream &out, const Var &o)
ObjecttoObjectPtr (const VarRowsVariable &o)
PStreamoperator>> (PStream &in, VarRowsVariable &o)
PStreamoperator>> (PStream &in, VarRowsVariable *&o)
PStreamoperator<< (PStream &out, const VarRowsVariable &o)
PStreamoperator>> (PStream &in, PP< VarRowsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VarRowsVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VarRowVariable &o)
PStreamoperator>> (PStream &in, VarRowVariable &o)
PStreamoperator>> (PStream &in, VarRowVariable *&o)
PStreamoperator<< (PStream &out, const VarRowVariable &o)
PStreamoperator>> (PStream &in, PP< VarRowVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VarRowVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VecElementVariable &o)
PStreamoperator>> (PStream &in, VecElementVariable &o)
PStreamoperator>> (PStream &in, VecElementVariable *&o)
PStreamoperator<< (PStream &out, const VecElementVariable &o)
PStreamoperator>> (PStream &in, PP< VecElementVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VecElementVariable > *opt, PLearnDiff *diffs)
Var accessElement (const Vec &v, Var index)
ObjecttoObjectPtr (const WeightedSumSquareVariable &o)
PStreamoperator>> (PStream &in, WeightedSumSquareVariable &o)
PStreamoperator>> (PStream &in, WeightedSumSquareVariable *&o)
PStreamoperator<< (PStream &out, const WeightedSumSquareVariable &o)
PStreamoperator>> (PStream &in, PP< WeightedSumSquareVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WeightedSumSquareVariable > *opt, PLearnDiff *diffs)
Var weighted_sumsquare (Var v, Var w)
ObjecttoObjectPtr (const AddBagInformationVMatrix &o)
PStreamoperator>> (PStream &in, AddBagInformationVMatrix &o)
PStreamoperator>> (PStream &in, AddBagInformationVMatrix *&o)
PStreamoperator<< (PStream &out, const AddBagInformationVMatrix &o)
PStreamoperator>> (PStream &in, PP< AddBagInformationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AddBagInformationVMatrix > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (AddBagInformationVMatrix) template<> class TypeTraits< AddBagInformationVMatrix >
ObjecttoObjectPtr (const AddMissingVMatrix &o)
PStreamoperator>> (PStream &in, AddMissingVMatrix &o)
PStreamoperator>> (PStream &in, AddMissingVMatrix *&o)
PStreamoperator<< (PStream &out, const AddMissingVMatrix &o)
PStreamoperator>> (PStream &in, PP< AddMissingVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AddMissingVMatrix > *opt, PLearnDiff *diffs)
VMat add_missing (VMat source, const TVec< int > &missing_values_columns)
ObjecttoObjectPtr (const AppendNeighborsVMatrix &o)
PStreamoperator>> (PStream &in, AppendNeighborsVMatrix &o)
PStreamoperator>> (PStream &in, AppendNeighborsVMatrix *&o)
PStreamoperator<< (PStream &out, const AppendNeighborsVMatrix &o)
PStreamoperator>> (PStream &in, PP< AppendNeighborsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AppendNeighborsVMatrix > *opt, PLearnDiff *diffs)
VMat append_neighbors (VMat source, int n_neighbors, bool append_neighbor_indices=false, Func transformation=0)
ObjecttoObjectPtr (const AsciiVMatrix &o)
PStreamoperator>> (PStream &in, AsciiVMatrix &o)
PStreamoperator>> (PStream &in, AsciiVMatrix *&o)
PStreamoperator<< (PStream &out, const AsciiVMatrix &o)
PStreamoperator>> (PStream &in, PP< AsciiVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AsciiVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const AutoVMatrix &o)
PStreamoperator>> (PStream &in, AutoVMatrix &o)
PStreamoperator>> (PStream &in, AutoVMatrix *&o)
PStreamoperator<< (PStream &out, const AutoVMatrix &o)
PStreamoperator>> (PStream &in, PP< AutoVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AutoVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const AutoVMatrixSaveSource &o)
PStreamoperator>> (PStream &in, AutoVMatrixSaveSource &o)
PStreamoperator>> (PStream &in, AutoVMatrixSaveSource *&o)
PStreamoperator<< (PStream &out, const AutoVMatrixSaveSource &o)
PStreamoperator>> (PStream &in, PP< AutoVMatrixSaveSource > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AutoVMatrixSaveSource > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BinaryNumbersVMatrix &o)
PStreamoperator>> (PStream &in, BinaryNumbersVMatrix &o)
PStreamoperator>> (PStream &in, BinaryNumbersVMatrix *&o)
PStreamoperator<< (PStream &out, const BinaryNumbersVMatrix &o)
PStreamoperator>> (PStream &in, PP< BinaryNumbersVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryNumbersVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BinaryOpVMatrix &o)
PStreamoperator>> (PStream &in, BinaryOpVMatrix &o)
PStreamoperator>> (PStream &in, BinaryOpVMatrix *&o)
PStreamoperator<< (PStream &out, const BinaryOpVMatrix &o)
PStreamoperator>> (PStream &in, PP< BinaryOpVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryOpVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BinSplitter &o)
PStreamoperator>> (PStream &in, BinSplitter &o)
PStreamoperator>> (PStream &in, BinSplitter *&o)
PStreamoperator<< (PStream &out, const BinSplitter &o)
PStreamoperator>> (PStream &in, PP< BinSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BootstrapSplitter &o)
PStreamoperator>> (PStream &in, BootstrapSplitter &o)
PStreamoperator>> (PStream &in, BootstrapSplitter *&o)
PStreamoperator<< (PStream &out, const BootstrapSplitter &o)
PStreamoperator>> (PStream &in, PP< BootstrapSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BootstrapSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BootstrapVMatrix &o)
PStreamoperator>> (PStream &in, BootstrapVMatrix &o)
PStreamoperator>> (PStream &in, BootstrapVMatrix *&o)
PStreamoperator<< (PStream &out, const BootstrapVMatrix &o)
PStreamoperator>> (PStream &in, PP< BootstrapVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BootstrapVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ByteMemoryVMatrix &o)
PStreamoperator>> (PStream &in, ByteMemoryVMatrix &o)
PStreamoperator>> (PStream &in, ByteMemoryVMatrix *&o)
PStreamoperator<< (PStream &out, const ByteMemoryVMatrix &o)
PStreamoperator>> (PStream &in, PP< ByteMemoryVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ByteMemoryVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CenteredVMatrix &o)
PStreamoperator>> (PStream &in, CenteredVMatrix &o)
PStreamoperator>> (PStream &in, CenteredVMatrix *&o)
PStreamoperator<< (PStream &out, const CenteredVMatrix &o)
PStreamoperator>> (PStream &in, PP< CenteredVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CenteredVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ClassSeparationSplitter &o)
PStreamoperator>> (PStream &in, ClassSeparationSplitter &o)
PStreamoperator>> (PStream &in, ClassSeparationSplitter *&o)
PStreamoperator<< (PStream &out, const ClassSeparationSplitter &o)
PStreamoperator>> (PStream &in, PP< ClassSeparationSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassSeparationSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ClassSubsetVMatrix &o)
PStreamoperator>> (PStream &in, ClassSubsetVMatrix &o)
PStreamoperator>> (PStream &in, ClassSubsetVMatrix *&o)
PStreamoperator<< (PStream &out, const ClassSubsetVMatrix &o)
PStreamoperator>> (PStream &in, PP< ClassSubsetVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassSubsetVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CompactFileVMatrix &o)
PStreamoperator>> (PStream &in, CompactFileVMatrix &o)
PStreamoperator>> (PStream &in, CompactFileVMatrix *&o)
PStreamoperator<< (PStream &out, const CompactFileVMatrix &o)
PStreamoperator>> (PStream &in, PP< CompactFileVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CompactFileVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CompactVMatrix &o)
PStreamoperator>> (PStream &in, CompactVMatrix &o)
PStreamoperator>> (PStream &in, CompactVMatrix *&o)
PStreamoperator<< (PStream &out, const CompactVMatrix &o)
PStreamoperator>> (PStream &in, PP< CompactVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CompactVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CompressedVMatrix &o)
PStreamoperator>> (PStream &in, CompressedVMatrix &o)
PStreamoperator>> (PStream &in, CompressedVMatrix *&o)
PStreamoperator<< (PStream &out, const CompressedVMatrix &o)
PStreamoperator>> (PStream &in, PP< CompressedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CompressedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConcatColumnsVMatrix &o)
PStreamoperator>> (PStream &in, ConcatColumnsVMatrix &o)
PStreamoperator>> (PStream &in, ConcatColumnsVMatrix *&o)
PStreamoperator<< (PStream &out, const ConcatColumnsVMatrix &o)
PStreamoperator>> (PStream &in, PP< ConcatColumnsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatColumnsVMatrix > *opt, PLearnDiff *diffs)
VMat hconcat (VMat d1, VMat d2)
VMat hconcat (TVec< VMat > ds)
ObjecttoObjectPtr (const ConcatRowsSubVMatrix &o)
PStreamoperator>> (PStream &in, ConcatRowsSubVMatrix &o)
PStreamoperator>> (PStream &in, ConcatRowsSubVMatrix *&o)
PStreamoperator<< (PStream &out, const ConcatRowsSubVMatrix &o)
PStreamoperator>> (PStream &in, PP< ConcatRowsSubVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatRowsSubVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConcatRowsVMatrix &o)
PStreamoperator>> (PStream &in, ConcatRowsVMatrix &o)
PStreamoperator>> (PStream &in, ConcatRowsVMatrix *&o)
PStreamoperator<< (PStream &out, const ConcatRowsVMatrix &o)
PStreamoperator>> (PStream &in, PP< ConcatRowsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatRowsVMatrix > *opt, PLearnDiff *diffs)
VMat vconcat (VMat d1, VMat d2)
VMat vconcat (TVec< VMat > ds)
ObjecttoObjectPtr (const ConcatSetsSplitter &o)
PStreamoperator>> (PStream &in, ConcatSetsSplitter &o)
PStreamoperator>> (PStream &in, ConcatSetsSplitter *&o)
PStreamoperator<< (PStream &out, const ConcatSetsSplitter &o)
PStreamoperator>> (PStream &in, PP< ConcatSetsSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConcatSetsSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConstantVMatrix &o)
PStreamoperator>> (PStream &in, ConstantVMatrix &o)
PStreamoperator>> (PStream &in, ConstantVMatrix *&o)
PStreamoperator<< (PStream &out, const ConstantVMatrix &o)
PStreamoperator>> (PStream &in, PP< ConstantVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConstantVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CrossReferenceVMatrix &o)
PStreamoperator>> (PStream &in, CrossReferenceVMatrix &o)
PStreamoperator>> (PStream &in, CrossReferenceVMatrix *&o)
PStreamoperator<< (PStream &out, const CrossReferenceVMatrix &o)
PStreamoperator>> (PStream &in, PP< CrossReferenceVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CrossReferenceVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CumVMatrix &o)
PStreamoperator>> (PStream &in, CumVMatrix &o)
PStreamoperator>> (PStream &in, CumVMatrix *&o)
PStreamoperator<< (PStream &out, const CumVMatrix &o)
PStreamoperator>> (PStream &in, PP< CumVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CumVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DatedJoinVMatrix &o)
PStreamoperator>> (PStream &in, DatedJoinVMatrix &o)
PStreamoperator>> (PStream &in, DatedJoinVMatrix *&o)
PStreamoperator<< (PStream &out, const DatedJoinVMatrix &o)
PStreamoperator>> (PStream &in, PP< DatedJoinVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DatedJoinVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DatedVMatrix &o)
PStreamoperator>> (PStream &in, DatedVMatrix &o)
PStreamoperator>> (PStream &in, DatedVMatrix *&o)
PStreamoperator<< (PStream &out, const DatedVMatrix &o)
PStreamoperator>> (PStream &in, PP< DatedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DatedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DBSplitter &o)
PStreamoperator>> (PStream &in, DBSplitter &o)
PStreamoperator>> (PStream &in, DBSplitter *&o)
PStreamoperator<< (PStream &out, const DBSplitter &o)
PStreamoperator>> (PStream &in, PP< DBSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DBSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BatchVMatrix &o)
PStreamoperator>> (PStream &in, BatchVMatrix &o)
PStreamoperator>> (PStream &in, BatchVMatrix *&o)
PStreamoperator<< (PStream &out, const BatchVMatrix &o)
PStreamoperator>> (PStream &in, PP< BatchVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BatchVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LearnerProcessedVMatrix &o)
PStreamoperator>> (PStream &in, LearnerProcessedVMatrix &o)
PStreamoperator>> (PStream &in, LearnerProcessedVMatrix *&o)
PStreamoperator<< (PStream &out, const LearnerProcessedVMatrix &o)
PStreamoperator>> (PStream &in, PP< LearnerProcessedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LearnerProcessedVMatrix > *opt, PLearnDiff *diffs)
VMat removeRows (VMat d, Vec rownums)
VMat removeRow (VMat d, int rownum)
ObjecttoObjectPtr (const RemoveRowsVMatrix &o)
PStreamoperator>> (PStream &in, RemoveRowsVMatrix &o)
PStreamoperator>> (PStream &in, RemoveRowsVMatrix *&o)
PStreamoperator<< (PStream &out, const RemoveRowsVMatrix &o)
PStreamoperator>> (PStream &in, PP< RemoveRowsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RemoveRowsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const YMDDatedVMatrix &o)
PStreamoperator>> (PStream &in, YMDDatedVMatrix &o)
PStreamoperator>> (PStream &in, YMDDatedVMatrix *&o)
PStreamoperator<< (PStream &out, const YMDDatedVMatrix &o)
PStreamoperator>> (PStream &in, PP< YMDDatedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, YMDDatedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DichotomizeVMatrix &o)
PStreamoperator>> (PStream &in, DichotomizeVMatrix &o)
PStreamoperator>> (PStream &in, DichotomizeVMatrix *&o)
PStreamoperator<< (PStream &out, const DichotomizeVMatrix &o)
PStreamoperator>> (PStream &in, PP< DichotomizeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DichotomizeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DictionaryVMatrix &o)
PStreamoperator>> (PStream &in, DictionaryVMatrix &o)
PStreamoperator>> (PStream &in, DictionaryVMatrix *&o)
PStreamoperator<< (PStream &out, const DictionaryVMatrix &o)
PStreamoperator>> (PStream &in, PP< DictionaryVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DictionaryVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DiskVMatrix &o)
PStreamoperator>> (PStream &in, DiskVMatrix &o)
PStreamoperator>> (PStream &in, DiskVMatrix *&o)
PStreamoperator<< (PStream &out, const DiskVMatrix &o)
PStreamoperator>> (PStream &in, PP< DiskVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DiskVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DisregardRowsVMatrix &o)
PStreamoperator>> (PStream &in, DisregardRowsVMatrix &o)
PStreamoperator>> (PStream &in, DisregardRowsVMatrix *&o)
PStreamoperator<< (PStream &out, const DisregardRowsVMatrix &o)
PStreamoperator>> (PStream &in, PP< DisregardRowsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DisregardRowsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EncodedVMatrix &o)
PStreamoperator>> (PStream &in, EncodedVMatrix &o)
PStreamoperator>> (PStream &in, EncodedVMatrix *&o)
PStreamoperator<< (PStream &out, const EncodedVMatrix &o)
PStreamoperator>> (PStream &in, PP< EncodedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EncodedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NetflixVMatrix &o)
PStreamoperator>> (PStream &in, NetflixVMatrix &o)
PStreamoperator>> (PStream &in, NetflixVMatrix *&o)
PStreamoperator<< (PStream &out, const NetflixVMatrix &o)
PStreamoperator>> (PStream &in, PP< NetflixVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NetflixVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExplicitSplitter &o)
PStreamoperator>> (PStream &in, ExplicitSplitter &o)
PStreamoperator>> (PStream &in, ExplicitSplitter *&o)
PStreamoperator<< (PStream &out, const ExplicitSplitter &o)
PStreamoperator>> (PStream &in, PP< ExplicitSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExplicitSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExtendedVMatrix &o)
PStreamoperator>> (PStream &in, ExtendedVMatrix &o)
PStreamoperator>> (PStream &in, ExtendedVMatrix *&o)
PStreamoperator<< (PStream &out, const ExtendedVMatrix &o)
PStreamoperator>> (PStream &in, PP< ExtendedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExtendedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExtractNNetParamsVMatrix &o)
PStreamoperator>> (PStream &in, ExtractNNetParamsVMatrix &o)
PStreamoperator>> (PStream &in, ExtractNNetParamsVMatrix *&o)
PStreamoperator<< (PStream &out, const ExtractNNetParamsVMatrix &o)
PStreamoperator>> (PStream &in, PP< ExtractNNetParamsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExtractNNetParamsVMatrix > *opt, PLearnDiff *diffs)
static int strlen (char *s)
ObjecttoObjectPtr (const FileVMatrix &o)
PStreamoperator>> (PStream &in, FileVMatrix &o)
PStreamoperator>> (PStream &in, FileVMatrix *&o)
PStreamoperator<< (PStream &out, const FileVMatrix &o)
PStreamoperator>> (PStream &in, PP< FileVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FileVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FilteredVMatrix &o)
PStreamoperator>> (PStream &in, FilteredVMatrix &o)
PStreamoperator>> (PStream &in, FilteredVMatrix *&o)
PStreamoperator<< (PStream &out, const FilteredVMatrix &o)
PStreamoperator>> (PStream &in, PP< FilteredVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FilteredVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FilterSplitter &o)
PStreamoperator>> (PStream &in, FilterSplitter &o)
PStreamoperator>> (PStream &in, FilterSplitter *&o)
PStreamoperator<< (PStream &out, const FilterSplitter &o)
PStreamoperator>> (PStream &in, PP< FilterSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FilterSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FinancePreprocVMatrix &o)
PStreamoperator>> (PStream &in, FinancePreprocVMatrix &o)
PStreamoperator>> (PStream &in, FinancePreprocVMatrix *&o)
PStreamoperator<< (PStream &out, const FinancePreprocVMatrix &o)
PStreamoperator>> (PStream &in, PP< FinancePreprocVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FinancePreprocVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ForwardVMatrix &o)
PStreamoperator>> (PStream &in, ForwardVMatrix &o)
PStreamoperator>> (PStream &in, ForwardVMatrix *&o)
PStreamoperator<< (PStream &out, const ForwardVMatrix &o)
PStreamoperator>> (PStream &in, PP< ForwardVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ForwardVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FractionSplitter &o)
PStreamoperator>> (PStream &in, FractionSplitter &o)
PStreamoperator>> (PStream &in, FractionSplitter *&o)
PStreamoperator<< (PStream &out, const FractionSplitter &o)
PStreamoperator>> (PStream &in, PP< FractionSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FractionSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianizeVMatrix &o)
PStreamoperator>> (PStream &in, GaussianizeVMatrix &o)
PStreamoperator>> (PStream &in, GaussianizeVMatrix *&o)
PStreamoperator<< (PStream &out, const GaussianizeVMatrix &o)
PStreamoperator>> (PStream &in, PP< GaussianizeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianizeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GeneralizedOneHotVMatrix &o)
PStreamoperator>> (PStream &in, GeneralizedOneHotVMatrix &o)
PStreamoperator>> (PStream &in, GeneralizedOneHotVMatrix *&o)
PStreamoperator<< (PStream &out, const GeneralizedOneHotVMatrix &o)
PStreamoperator>> (PStream &in, PP< GeneralizedOneHotVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GeneralizedOneHotVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GetInputVMatrix &o)
PStreamoperator>> (PStream &in, GetInputVMatrix &o)
PStreamoperator>> (PStream &in, GetInputVMatrix *&o)
PStreamoperator<< (PStream &out, const GetInputVMatrix &o)
PStreamoperator>> (PStream &in, PP< GetInputVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GetInputVMatrix > *opt, PLearnDiff *diffs)
VMat get_input (VMat source, int inputsize, int targetsize, int weightsize=0)
ObjecttoObjectPtr (const GramVMatrix &o)
PStreamoperator>> (PStream &in, GramVMatrix &o)
PStreamoperator>> (PStream &in, GramVMatrix *&o)
PStreamoperator<< (PStream &out, const GramVMatrix &o)
PStreamoperator>> (PStream &in, PP< GramVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GramVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ImputationVMatrix &o)
PStreamoperator>> (PStream &in, ImputationVMatrix &o)
PStreamoperator>> (PStream &in, ImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const ImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< ImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IndexedVMatrix &o)
PStreamoperator>> (PStream &in, IndexedVMatrix &o)
PStreamoperator>> (PStream &in, IndexedVMatrix *&o)
PStreamoperator<< (PStream &out, const IndexedVMatrix &o)
PStreamoperator>> (PStream &in, PP< IndexedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IndexedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const InfiniteMNISTVMatrix &o)
PStreamoperator>> (PStream &in, InfiniteMNISTVMatrix &o)
PStreamoperator>> (PStream &in, InfiniteMNISTVMatrix *&o)
PStreamoperator<< (PStream &out, const InfiniteMNISTVMatrix &o)
PStreamoperator>> (PStream &in, PP< InfiniteMNISTVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InfiniteMNISTVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const InterleaveVMatrix &o)
PStreamoperator>> (PStream &in, InterleaveVMatrix &o)
PStreamoperator>> (PStream &in, InterleaveVMatrix *&o)
PStreamoperator<< (PStream &out, const InterleaveVMatrix &o)
PStreamoperator>> (PStream &in, PP< InterleaveVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InterleaveVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const JoinVMatrix &o)
PStreamoperator>> (PStream &in, JoinVMatrix &o)
PStreamoperator>> (PStream &in, JoinVMatrix *&o)
PStreamoperator<< (PStream &out, const JoinVMatrix &o)
PStreamoperator>> (PStream &in, PP< JoinVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, JoinVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const JulianizeVMatrix &o)
PStreamoperator>> (PStream &in, JulianizeVMatrix &o)
PStreamoperator>> (PStream &in, JulianizeVMatrix *&o)
PStreamoperator<< (PStream &out, const JulianizeVMatrix &o)
PStreamoperator>> (PStream &in, PP< JulianizeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, JulianizeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KernelVMatrix &o)
PStreamoperator>> (PStream &in, KernelVMatrix &o)
PStreamoperator>> (PStream &in, KernelVMatrix *&o)
PStreamoperator<< (PStream &out, const KernelVMatrix &o)
PStreamoperator>> (PStream &in, PP< KernelVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KernelVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KFoldSplitter &o)
PStreamoperator>> (PStream &in, KFoldSplitter &o)
PStreamoperator>> (PStream &in, KFoldSplitter *&o)
PStreamoperator<< (PStream &out, const KFoldSplitter &o)
PStreamoperator>> (PStream &in, PP< KFoldSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KFoldSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KNNImputationVMatrix &o)
PStreamoperator>> (PStream &in, KNNImputationVMatrix &o)
PStreamoperator>> (PStream &in, KNNImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const KNNImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< KNNImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KNNImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KNNVMatrix &o)
PStreamoperator>> (PStream &in, KNNVMatrix &o)
PStreamoperator>> (PStream &in, KNNVMatrix *&o)
PStreamoperator<< (PStream &out, const KNNVMatrix &o)
PStreamoperator>> (PStream &in, PP< KNNVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KNNVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LemmatizeVMatrix &o)
PStreamoperator>> (PStream &in, LemmatizeVMatrix &o)
PStreamoperator>> (PStream &in, LemmatizeVMatrix *&o)
PStreamoperator<< (PStream &out, const LemmatizeVMatrix &o)
PStreamoperator>> (PStream &in, PP< LemmatizeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LemmatizeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LIBSVMSparseVMatrix &o)
PStreamoperator>> (PStream &in, LIBSVMSparseVMatrix &o)
PStreamoperator>> (PStream &in, LIBSVMSparseVMatrix *&o)
PStreamoperator<< (PStream &out, const LIBSVMSparseVMatrix &o)
PStreamoperator>> (PStream &in, PP< LIBSVMSparseVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LIBSVMSparseVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LocallyPrecomputedVMatrix &o)
PStreamoperator>> (PStream &in, LocallyPrecomputedVMatrix &o)
PStreamoperator>> (PStream &in, LocallyPrecomputedVMatrix *&o)
PStreamoperator<< (PStream &out, const LocallyPrecomputedVMatrix &o)
PStreamoperator>> (PStream &in, PP< LocallyPrecomputedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocallyPrecomputedVMatrix > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (LocallyPrecomputedVMatrix) template<> class TypeTraits< LocallyPrecomputedVMatrix >
ObjecttoObjectPtr (const LocalNeighborsDifferencesVMatrix &o)
PStreamoperator>> (PStream &in, LocalNeighborsDifferencesVMatrix &o)
PStreamoperator>> (PStream &in, LocalNeighborsDifferencesVMatrix *&o)
PStreamoperator<< (PStream &out, const LocalNeighborsDifferencesVMatrix &o)
PStreamoperator>> (PStream &in, PP< LocalNeighborsDifferencesVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocalNeighborsDifferencesVMatrix > *opt, PLearnDiff *diffs)
VMat local_neighbors_differences (VMat source, int n_neighbors, bool concat=false, bool append_indexes=false, bool append_neighbors=false)
ObjecttoObjectPtr (const MeanImputationVMatrix &o)
PStreamoperator>> (PStream &in, MeanImputationVMatrix &o)
PStreamoperator>> (PStream &in, MeanImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const MeanImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< MeanImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeanImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MeanMedianModeImputationVMatrix &o)
PStreamoperator>> (PStream &in, MeanMedianModeImputationVMatrix &o)
PStreamoperator>> (PStream &in, MeanMedianModeImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const MeanMedianModeImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< MeanMedianModeImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeanMedianModeImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MemoryVMatrix &o)
PStreamoperator>> (PStream &in, MemoryVMatrix &o)
PStreamoperator>> (PStream &in, MemoryVMatrix *&o)
PStreamoperator<< (PStream &out, const MemoryVMatrix &o)
PStreamoperator>> (PStream &in, PP< MemoryVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MemoryVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MemoryVMatrixNoSave &o)
PStreamoperator>> (PStream &in, MemoryVMatrixNoSave &o)
PStreamoperator>> (PStream &in, MemoryVMatrixNoSave *&o)
PStreamoperator<< (PStream &out, const MemoryVMatrixNoSave &o)
PStreamoperator>> (PStream &in, PP< MemoryVMatrixNoSave > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MemoryVMatrixNoSave > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MissingIndicatorVMatrix &o)
PStreamoperator>> (PStream &in, MissingIndicatorVMatrix &o)
PStreamoperator>> (PStream &in, MissingIndicatorVMatrix *&o)
PStreamoperator<< (PStream &out, const MissingIndicatorVMatrix &o)
PStreamoperator>> (PStream &in, PP< MissingIndicatorVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MissingIndicatorVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MissingInstructionVMatrix &o)
PStreamoperator>> (PStream &in, MissingInstructionVMatrix &o)
PStreamoperator>> (PStream &in, MissingInstructionVMatrix *&o)
PStreamoperator<< (PStream &out, const MissingInstructionVMatrix &o)
PStreamoperator>> (PStream &in, PP< MissingInstructionVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MissingInstructionVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MixtureVMatrix &o)
PStreamoperator>> (PStream &in, MixtureVMatrix &o)
PStreamoperator>> (PStream &in, MixtureVMatrix *&o)
PStreamoperator<< (PStream &out, const MixtureVMatrix &o)
PStreamoperator>> (PStream &in, PP< MixtureVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MixtureVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MixUnlabeledNeighbourVMatrix &o)
PStreamoperator>> (PStream &in, MixUnlabeledNeighbourVMatrix &o)
PStreamoperator>> (PStream &in, MixUnlabeledNeighbourVMatrix *&o)
PStreamoperator<< (PStream &out, const MixUnlabeledNeighbourVMatrix &o)
PStreamoperator>> (PStream &in, PP< MixUnlabeledNeighbourVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MixUnlabeledNeighbourVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MovingAverageVMatrix &o)
PStreamoperator>> (PStream &in, MovingAverageVMatrix &o)
PStreamoperator>> (PStream &in, MovingAverageVMatrix *&o)
PStreamoperator<< (PStream &out, const MovingAverageVMatrix &o)
PStreamoperator>> (PStream &in, PP< MovingAverageVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MovingAverageVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MultiInstanceVMatrix &o)
PStreamoperator>> (PStream &in, MultiInstanceVMatrix &o)
PStreamoperator>> (PStream &in, MultiInstanceVMatrix *&o)
PStreamoperator<< (PStream &out, const MultiInstanceVMatrix &o)
PStreamoperator>> (PStream &in, PP< MultiInstanceVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiInstanceVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MultiTargetOneHotVMatrix &o)
PStreamoperator>> (PStream &in, MultiTargetOneHotVMatrix &o)
PStreamoperator>> (PStream &in, MultiTargetOneHotVMatrix *&o)
PStreamoperator<< (PStream &out, const MultiTargetOneHotVMatrix &o)
PStreamoperator>> (PStream &in, PP< MultiTargetOneHotVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiTargetOneHotVMatrix > *opt, PLearnDiff *diffs)
VMat multi_target_one_hot (VMat source_and_target, real cold_value, real hot_value)
ObjecttoObjectPtr (const MultiTaskSeparationSplitter &o)
PStreamoperator>> (PStream &in, MultiTaskSeparationSplitter &o)
PStreamoperator>> (PStream &in, MultiTaskSeparationSplitter *&o)
PStreamoperator<< (PStream &out, const MultiTaskSeparationSplitter &o)
PStreamoperator>> (PStream &in, PP< MultiTaskSeparationSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiTaskSeparationSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MultiToUniInstanceSelectRandomVMatrix &o)
PStreamoperator>> (PStream &in, MultiToUniInstanceSelectRandomVMatrix &o)
PStreamoperator>> (PStream &in, MultiToUniInstanceSelectRandomVMatrix *&o)
PStreamoperator<< (PStream &out, const MultiToUniInstanceSelectRandomVMatrix &o)
PStreamoperator>> (PStream &in, PP< MultiToUniInstanceSelectRandomVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiToUniInstanceSelectRandomVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NoSplitSplitter &o)
PStreamoperator>> (PStream &in, NoSplitSplitter &o)
PStreamoperator>> (PStream &in, NoSplitSplitter *&o)
PStreamoperator<< (PStream &out, const NoSplitSplitter &o)
PStreamoperator>> (PStream &in, PP< NoSplitSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NoSplitSplitter > *opt, PLearnDiff *diffs)
VMat onehot (VMat the_source, int nclasses, real cold_value=0.0, real hot_value=1.0, int index=-1, bool call_build_=false)
ObjecttoObjectPtr (const OneHotVMatrix &o)
PStreamoperator>> (PStream &in, OneHotVMatrix &o)
PStreamoperator>> (PStream &in, OneHotVMatrix *&o)
PStreamoperator<< (PStream &out, const OneHotVMatrix &o)
PStreamoperator>> (PStream &in, PP< OneHotVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OneHotVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OneVsAllVMatrix &o)
PStreamoperator>> (PStream &in, OneVsAllVMatrix &o)
PStreamoperator>> (PStream &in, OneVsAllVMatrix *&o)
PStreamoperator<< (PStream &out, const OneVsAllVMatrix &o)
PStreamoperator>> (PStream &in, PP< OneVsAllVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OneVsAllVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PairsVMatrix &o)
PStreamoperator>> (PStream &in, PairsVMatrix &o)
PStreamoperator>> (PStream &in, PairsVMatrix *&o)
PStreamoperator<< (PStream &out, const PairsVMatrix &o)
PStreamoperator>> (PStream &in, PP< PairsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PairsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PLearnerOutputVMatrix &o)
PStreamoperator>> (PStream &in, PLearnerOutputVMatrix &o)
PStreamoperator>> (PStream &in, PLearnerOutputVMatrix *&o)
PStreamoperator<< (PStream &out, const PLearnerOutputVMatrix &o)
PStreamoperator>> (PStream &in, PP< PLearnerOutputVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLearnerOutputVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PrecomputedVMatrix &o)
PStreamoperator>> (PStream &in, PrecomputedVMatrix &o)
PStreamoperator>> (PStream &in, PrecomputedVMatrix *&o)
PStreamoperator<< (PStream &out, const PrecomputedVMatrix &o)
PStreamoperator>> (PStream &in, PP< PrecomputedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PrecomputedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ProcessDatasetVMatrix &o)
PStreamoperator>> (PStream &in, ProcessDatasetVMatrix &o)
PStreamoperator>> (PStream &in, ProcessDatasetVMatrix *&o)
PStreamoperator<< (PStream &out, const ProcessDatasetVMatrix &o)
PStreamoperator>> (PStream &in, PP< ProcessDatasetVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProcessDatasetVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ProcessingVMatrix &o)
PStreamoperator>> (PStream &in, ProcessingVMatrix &o)
PStreamoperator>> (PStream &in, ProcessingVMatrix *&o)
PStreamoperator<< (PStream &out, const ProcessingVMatrix &o)
PStreamoperator>> (PStream &in, PP< ProcessingVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProcessingVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ProcessSymbolicSequenceVMatrix &o)
PStreamoperator>> (PStream &in, ProcessSymbolicSequenceVMatrix &o)
PStreamoperator>> (PStream &in, ProcessSymbolicSequenceVMatrix *&o)
PStreamoperator<< (PStream &out, const ProcessSymbolicSequenceVMatrix &o)
PStreamoperator>> (PStream &in, PP< ProcessSymbolicSequenceVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProcessSymbolicSequenceVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PutSubVMatrix &o)
PStreamoperator>> (PStream &in, PutSubVMatrix &o)
PStreamoperator>> (PStream &in, PutSubVMatrix *&o)
PStreamoperator<< (PStream &out, const PutSubVMatrix &o)
PStreamoperator>> (PStream &in, PP< PutSubVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PutSubVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PythonTableVMatrix &o)
PStreamoperator>> (PStream &in, PythonTableVMatrix &o)
PStreamoperator>> (PStream &in, PythonTableVMatrix *&o)
PStreamoperator<< (PStream &out, const PythonTableVMatrix &o)
PStreamoperator>> (PStream &in, PP< PythonTableVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PythonTableVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RandomNeighborsDifferencesVMatrix &o)
PStreamoperator>> (PStream &in, RandomNeighborsDifferencesVMatrix &o)
PStreamoperator>> (PStream &in, RandomNeighborsDifferencesVMatrix *&o)
PStreamoperator<< (PStream &out, const RandomNeighborsDifferencesVMatrix &o)
PStreamoperator>> (PStream &in, PP< RandomNeighborsDifferencesVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RandomNeighborsDifferencesVMatrix > *opt, PLearnDiff *diffs)
VMat random_neighbors_differences (VMat source, int n_neighbors, bool append_current_point_indexe=false, bool append_random_neighbors_indexes=false)
ObjecttoObjectPtr (const RandomSamplesFromVMatrix &o)
PStreamoperator>> (PStream &in, RandomSamplesFromVMatrix &o)
PStreamoperator>> (PStream &in, RandomSamplesFromVMatrix *&o)
PStreamoperator<< (PStream &out, const RandomSamplesFromVMatrix &o)
PStreamoperator>> (PStream &in, PP< RandomSamplesFromVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RandomSamplesFromVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RandomSamplesVMatrix &o)
PStreamoperator>> (PStream &in, RandomSamplesVMatrix &o)
PStreamoperator>> (PStream &in, RandomSamplesVMatrix *&o)
PStreamoperator<< (PStream &out, const RandomSamplesVMatrix &o)
PStreamoperator>> (PStream &in, PP< RandomSamplesVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RandomSamplesVMatrix > *opt, PLearnDiff *diffs)
VMat vrange (real start, real end, real step=1.0)
ObjecttoObjectPtr (const RangeVMatrix &o)
PStreamoperator>> (PStream &in, RangeVMatrix &o)
PStreamoperator>> (PStream &in, RangeVMatrix *&o)
PStreamoperator<< (PStream &out, const RangeVMatrix &o)
PStreamoperator>> (PStream &in, PP< RangeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RangeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RankedVMatrix &o)
PStreamoperator>> (PStream &in, RankedVMatrix &o)
PStreamoperator>> (PStream &in, RankedVMatrix *&o)
PStreamoperator<< (PStream &out, const RankedVMatrix &o)
PStreamoperator>> (PStream &in, PP< RankedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RankedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RealFunctionsProcessedVMatrix &o)
PStreamoperator>> (PStream &in, RealFunctionsProcessedVMatrix &o)
PStreamoperator>> (PStream &in, RealFunctionsProcessedVMatrix *&o)
PStreamoperator<< (PStream &out, const RealFunctionsProcessedVMatrix &o)
PStreamoperator>> (PStream &in, PP< RealFunctionsProcessedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RealFunctionsProcessedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegularGridVMatrix &o)
PStreamoperator>> (PStream &in, RegularGridVMatrix &o)
PStreamoperator>> (PStream &in, RegularGridVMatrix *&o)
PStreamoperator<< (PStream &out, const RegularGridVMatrix &o)
PStreamoperator>> (PStream &in, PP< RegularGridVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegularGridVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ReIndexedTargetVMatrix &o)
PStreamoperator>> (PStream &in, ReIndexedTargetVMatrix &o)
PStreamoperator>> (PStream &in, ReIndexedTargetVMatrix *&o)
PStreamoperator<< (PStream &out, const ReIndexedTargetVMatrix &o)
PStreamoperator>> (PStream &in, PP< ReIndexedTargetVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ReIndexedTargetVMatrix > *opt, PLearnDiff *diffs)
VMat remapLastColumn (VMat s, Mat mapping, bool call_build_=false)
VMat remapLastColumn (VMat s, real if_equals_value, real then_value=1.0, real else_value=-1.0, bool call_build_=false)
ObjecttoObjectPtr (const RemapLastColumnVMatrix &o)
PStreamoperator>> (PStream &in, RemapLastColumnVMatrix &o)
PStreamoperator>> (PStream &in, RemapLastColumnVMatrix *&o)
PStreamoperator<< (PStream &out, const RemapLastColumnVMatrix &o)
PStreamoperator>> (PStream &in, PP< RemapLastColumnVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RemapLastColumnVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RemoveDuplicateVMatrix &o)
PStreamoperator>> (PStream &in, RemoveDuplicateVMatrix &o)
PStreamoperator>> (PStream &in, RemoveDuplicateVMatrix *&o)
PStreamoperator<< (PStream &out, const RemoveDuplicateVMatrix &o)
PStreamoperator>> (PStream &in, PP< RemoveDuplicateVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RemoveDuplicateVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ReorderByMissingVMatrix &o)
PStreamoperator>> (PStream &in, ReorderByMissingVMatrix &o)
PStreamoperator>> (PStream &in, ReorderByMissingVMatrix *&o)
PStreamoperator<< (PStream &out, const ReorderByMissingVMatrix &o)
PStreamoperator>> (PStream &in, PP< ReorderByMissingVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ReorderByMissingVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RepeatSplitter &o)
PStreamoperator>> (PStream &in, RepeatSplitter &o)
PStreamoperator>> (PStream &in, RepeatSplitter *&o)
PStreamoperator<< (PStream &out, const RepeatSplitter &o)
PStreamoperator>> (PStream &in, PP< RepeatSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RepeatSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RepeatVMatrix &o)
PStreamoperator>> (PStream &in, RepeatVMatrix &o)
PStreamoperator>> (PStream &in, RepeatVMatrix *&o)
PStreamoperator<< (PStream &out, const RepeatVMatrix &o)
PStreamoperator>> (PStream &in, PP< RepeatVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RepeatVMatrix > *opt, PLearnDiff *diffs)
VMat repeat_vmatrix (VMat source, int repeat_n_times)
ObjecttoObjectPtr (const ReplicateSamplesVMatrix &o)
PStreamoperator>> (PStream &in, ReplicateSamplesVMatrix &o)
PStreamoperator>> (PStream &in, ReplicateSamplesVMatrix *&o)
PStreamoperator<< (PStream &out, const ReplicateSamplesVMatrix &o)
PStreamoperator>> (PStream &in, PP< ReplicateSamplesVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ReplicateSamplesVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RowBufferedVMatrix &o)
PStreamoperator>> (PStream &in, RowBufferedVMatrix &o)
PStreamoperator>> (PStream &in, RowBufferedVMatrix *&o)
PStreamoperator<< (PStream &out, const RowBufferedVMatrix &o)
PStreamoperator>> (PStream &in, PP< RowBufferedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowBufferedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RowsSubVMatrix &o)
PStreamoperator>> (PStream &in, RowsSubVMatrix &o)
PStreamoperator>> (PStream &in, RowsSubVMatrix *&o)
PStreamoperator<< (PStream &out, const RowsSubVMatrix &o)
PStreamoperator>> (PStream &in, PP< RowsSubVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowsSubVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectColumnsVMatrix &o)
PStreamoperator>> (PStream &in, SelectColumnsVMatrix &o)
PStreamoperator>> (PStream &in, SelectColumnsVMatrix *&o)
PStreamoperator<< (PStream &out, const SelectColumnsVMatrix &o)
PStreamoperator>> (PStream &in, PP< SelectColumnsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectColumnsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectRowsFileIndexVMatrix &o)
PStreamoperator>> (PStream &in, SelectRowsFileIndexVMatrix &o)
PStreamoperator>> (PStream &in, SelectRowsFileIndexVMatrix *&o)
PStreamoperator<< (PStream &out, const SelectRowsFileIndexVMatrix &o)
PStreamoperator>> (PStream &in, PP< SelectRowsFileIndexVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectRowsFileIndexVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectRowsMultiInstanceVMatrix &o)
PStreamoperator>> (PStream &in, SelectRowsMultiInstanceVMatrix &o)
PStreamoperator>> (PStream &in, SelectRowsMultiInstanceVMatrix *&o)
PStreamoperator<< (PStream &out, const SelectRowsMultiInstanceVMatrix &o)
PStreamoperator>> (PStream &in, PP< SelectRowsMultiInstanceVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectRowsMultiInstanceVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectRowsVMatrix &o)
PStreamoperator>> (PStream &in, SelectRowsVMatrix &o)
PStreamoperator>> (PStream &in, SelectRowsVMatrix *&o)
PStreamoperator<< (PStream &out, const SelectRowsVMatrix &o)
PStreamoperator>> (PStream &in, PP< SelectRowsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectRowsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectSetsSplitter &o)
PStreamoperator>> (PStream &in, SelectSetsSplitter &o)
PStreamoperator>> (PStream &in, SelectSetsSplitter *&o)
PStreamoperator<< (PStream &out, const SelectSetsSplitter &o)
PStreamoperator>> (PStream &in, PP< SelectSetsSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectSetsSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SeparateInputVMatrix &o)
PStreamoperator>> (PStream &in, SeparateInputVMatrix &o)
PStreamoperator>> (PStream &in, SeparateInputVMatrix *&o)
PStreamoperator<< (PStream &out, const SeparateInputVMatrix &o)
PStreamoperator>> (PStream &in, PP< SeparateInputVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SeparateInputVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SequentialSplitter &o)
PStreamoperator>> (PStream &in, SequentialSplitter &o)
PStreamoperator>> (PStream &in, SequentialSplitter *&o)
PStreamoperator<< (PStream &out, const SequentialSplitter &o)
PStreamoperator>> (PStream &in, PP< SequentialSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SequentialSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ShiftAndRescaleVMatrix &o)
PStreamoperator>> (PStream &in, ShiftAndRescaleVMatrix &o)
PStreamoperator>> (PStream &in, ShiftAndRescaleVMatrix *&o)
PStreamoperator<< (PStream &out, const ShiftAndRescaleVMatrix &o)
PStreamoperator>> (PStream &in, PP< ShiftAndRescaleVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ShiftAndRescaleVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ShuffleColumnsVMatrix &o)
PStreamoperator>> (PStream &in, ShuffleColumnsVMatrix &o)
PStreamoperator>> (PStream &in, ShuffleColumnsVMatrix *&o)
PStreamoperator<< (PStream &out, const ShuffleColumnsVMatrix &o)
PStreamoperator>> (PStream &in, PP< ShuffleColumnsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ShuffleColumnsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SortRowsVMatrix &o)
PStreamoperator>> (PStream &in, SortRowsVMatrix &o)
PStreamoperator>> (PStream &in, SortRowsVMatrix *&o)
PStreamoperator<< (PStream &out, const SortRowsVMatrix &o)
PStreamoperator>> (PStream &in, PP< SortRowsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SortRowsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SourceVMatrix &o)
PStreamoperator>> (PStream &in, SourceVMatrix &o)
PStreamoperator>> (PStream &in, SourceVMatrix *&o)
PStreamoperator<< (PStream &out, const SourceVMatrix &o)
PStreamoperator>> (PStream &in, PP< SourceVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SourceVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SourceVMatrixSplitter &o)
PStreamoperator>> (PStream &in, SourceVMatrixSplitter &o)
PStreamoperator>> (PStream &in, SourceVMatrixSplitter *&o)
PStreamoperator<< (PStream &out, const SourceVMatrixSplitter &o)
PStreamoperator>> (PStream &in, PP< SourceVMatrixSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SourceVMatrixSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SparseVMatrix &o)
PStreamoperator>> (PStream &in, SparseVMatrix &o)
PStreamoperator>> (PStream &in, SparseVMatrix *&o)
PStreamoperator<< (PStream &out, const SparseVMatrix &o)
PStreamoperator>> (PStream &in, PP< SparseVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SparseVMatrix > *opt, PLearnDiff *diffs)
void split (VMat d, real test_fraction, VMat &train, VMat &test, int i, bool use_all)
Vec randomSplit (VMat d, real test_fraction, VMat &train, VMat &test)
void split (VMat d, real validation_fraction, real test_fraction, VMat &train, VMat &valid, VMat &test, bool do_shuffle=false)
 Splits the dataset d into 3 subsets.
void randomSplit (VMat d, real validation_fraction, real test_fraction, VMat &train, VMat &valid, VMat &test)
 Splits the dataset d into 3 subsets (similar to above)
ObjecttoObjectPtr (const Splitter &o)
PStreamoperator>> (PStream &in, Splitter &o)
PStreamoperator>> (PStream &in, Splitter *&o)
PStreamoperator<< (PStream &out, const Splitter &o)
PStreamoperator>> (PStream &in, PP< Splitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Splitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SplitWiseValidationVMatrix &o)
PStreamoperator>> (PStream &in, SplitWiseValidationVMatrix &o)
PStreamoperator>> (PStream &in, SplitWiseValidationVMatrix *&o)
PStreamoperator<< (PStream &out, const SplitWiseValidationVMatrix &o)
PStreamoperator>> (PStream &in, PP< SplitWiseValidationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SplitWiseValidationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedSplitter &o)
PStreamoperator>> (PStream &in, StackedSplitter &o)
PStreamoperator>> (PStream &in, StackedSplitter *&o)
PStreamoperator<< (PStream &out, const StackedSplitter &o)
PStreamoperator>> (PStream &in, PP< StackedSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StochasticBinarizeVMatrix &o)
PStreamoperator>> (PStream &in, StochasticBinarizeVMatrix &o)
PStreamoperator>> (PStream &in, StochasticBinarizeVMatrix *&o)
PStreamoperator<< (PStream &out, const StochasticBinarizeVMatrix &o)
PStreamoperator>> (PStream &in, PP< StochasticBinarizeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StochasticBinarizeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StrTableVMatrix &o)
PStreamoperator>> (PStream &in, StrTableVMatrix &o)
PStreamoperator>> (PStream &in, StrTableVMatrix *&o)
PStreamoperator<< (PStream &out, const StrTableVMatrix &o)
PStreamoperator>> (PStream &in, PP< StrTableVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StrTableVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SubInputVMatrix &o)
PStreamoperator>> (PStream &in, SubInputVMatrix &o)
PStreamoperator>> (PStream &in, SubInputVMatrix *&o)
PStreamoperator<< (PStream &out, const SubInputVMatrix &o)
PStreamoperator>> (PStream &in, PP< SubInputVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SubInputVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SubVMatrix &o)
PStreamoperator>> (PStream &in, SubVMatrix &o)
PStreamoperator>> (PStream &in, SubVMatrix *&o)
PStreamoperator<< (PStream &out, const SubVMatrix &o)
PStreamoperator>> (PStream &in, PP< SubVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SubVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TemporalHorizonVMatrix &o)
PStreamoperator>> (PStream &in, TemporalHorizonVMatrix &o)
PStreamoperator>> (PStream &in, TemporalHorizonVMatrix *&o)
PStreamoperator<< (PStream &out, const TemporalHorizonVMatrix &o)
PStreamoperator>> (PStream &in, PP< TemporalHorizonVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TemporalHorizonVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TemporaryDiskVMatrix &o)
PStreamoperator>> (PStream &in, TemporaryDiskVMatrix &o)
PStreamoperator>> (PStream &in, TemporaryDiskVMatrix *&o)
PStreamoperator<< (PStream &out, const TemporaryDiskVMatrix &o)
PStreamoperator>> (PStream &in, PP< TemporaryDiskVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TemporaryDiskVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TemporaryFileVMatrix &o)
PStreamoperator>> (PStream &in, TemporaryFileVMatrix &o)
PStreamoperator>> (PStream &in, TemporaryFileVMatrix *&o)
PStreamoperator<< (PStream &out, const TemporaryFileVMatrix &o)
PStreamoperator>> (PStream &in, PP< TemporaryFileVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TemporaryFileVMatrix > *opt, PLearnDiff *diffs)
void save_load_compare (const AutoVMatrix &vm, const PPath &prefix, const PPath &base, const string &ext, int dot)
void unitTest (const PPath &path)
void UNIT_TEST (const string &argument)
ObjecttoObjectPtr (const AutoVMatrixTest &o)
PStreamoperator>> (PStream &in, AutoVMatrixTest &o)
PStreamoperator>> (PStream &in, AutoVMatrixTest *&o)
PStreamoperator<< (PStream &out, const AutoVMatrixTest &o)
PStreamoperator>> (PStream &in, PP< AutoVMatrixTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AutoVMatrixTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FileVMatrixTest &o)
PStreamoperator>> (PStream &in, FileVMatrixTest &o)
PStreamoperator>> (PStream &in, FileVMatrixTest *&o)
PStreamoperator<< (PStream &out, const FileVMatrixTest &o)
PStreamoperator>> (PStream &in, PP< FileVMatrixTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FileVMatrixTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IndexedVMatrixTest &o)
PStreamoperator>> (PStream &in, IndexedVMatrixTest &o)
PStreamoperator>> (PStream &in, IndexedVMatrixTest *&o)
PStreamoperator<< (PStream &out, const IndexedVMatrixTest &o)
PStreamoperator>> (PStream &in, PP< IndexedVMatrixTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IndexedVMatrixTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RowBufferedVMatrixTest &o)
PStreamoperator>> (PStream &in, RowBufferedVMatrixTest &o)
PStreamoperator>> (PStream &in, RowBufferedVMatrixTest *&o)
PStreamoperator<< (PStream &out, const RowBufferedVMatrixTest &o)
PStreamoperator>> (PStream &in, PP< RowBufferedVMatrixTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RowBufferedVMatrixTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TestInTrainSplitter &o)
PStreamoperator>> (PStream &in, TestInTrainSplitter &o)
PStreamoperator>> (PStream &in, TestInTrainSplitter *&o)
PStreamoperator<< (PStream &out, const TestInTrainSplitter &o)
PStreamoperator>> (PStream &in, PP< TestInTrainSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TestInTrainSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TextStreamVMatrix &o)
PStreamoperator>> (PStream &in, TextStreamVMatrix &o)
PStreamoperator>> (PStream &in, TextStreamVMatrix *&o)
PStreamoperator<< (PStream &out, const TextStreamVMatrix &o)
PStreamoperator>> (PStream &in, PP< TextStreamVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TextStreamVMatrix > *opt, PLearnDiff *diffs)
VMat thresholdVMat (VMat source, real threshold, real cold_value=0.0, real hot_value=1.0, bool gt_threshold=true, bool call_build_=false)
ObjecttoObjectPtr (const ToBagSplitter &o)
PStreamoperator>> (PStream &in, ToBagSplitter &o)
PStreamoperator>> (PStream &in, ToBagSplitter *&o)
PStreamoperator<< (PStream &out, const ToBagSplitter &o)
PStreamoperator>> (PStream &in, PP< ToBagSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ToBagSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TrainTestSplitter &o)
PStreamoperator>> (PStream &in, TrainTestSplitter &o)
PStreamoperator>> (PStream &in, TrainTestSplitter *&o)
PStreamoperator<< (PStream &out, const TrainTestSplitter &o)
PStreamoperator>> (PStream &in, PP< TrainTestSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TrainTestSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TrainValidTestSplitter &o)
PStreamoperator>> (PStream &in, TrainValidTestSplitter &o)
PStreamoperator>> (PStream &in, TrainValidTestSplitter *&o)
PStreamoperator<< (PStream &out, const TrainValidTestSplitter &o)
PStreamoperator>> (PStream &in, PP< TrainValidTestSplitter > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TrainValidTestSplitter > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TransposeVMatrix &o)
PStreamoperator>> (PStream &in, TransposeVMatrix &o)
PStreamoperator>> (PStream &in, TransposeVMatrix *&o)
PStreamoperator<< (PStream &out, const TransposeVMatrix &o)
PStreamoperator>> (PStream &in, PP< TransposeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransposeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UCIDataVMatrix &o)
PStreamoperator>> (PStream &in, UCIDataVMatrix &o)
PStreamoperator>> (PStream &in, UCIDataVMatrix *&o)
PStreamoperator<< (PStream &out, const UCIDataVMatrix &o)
PStreamoperator>> (PStream &in, PP< UCIDataVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UCIDataVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UniformizeVMatrix &o)
PStreamoperator>> (PStream &in, UniformizeVMatrix &o)
PStreamoperator>> (PStream &in, UniformizeVMatrix *&o)
PStreamoperator<< (PStream &out, const UniformizeVMatrix &o)
PStreamoperator>> (PStream &in, PP< UniformizeVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UniformizeVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UniformVMatrix &o)
PStreamoperator>> (PStream &in, UniformVMatrix &o)
PStreamoperator>> (PStream &in, UniformVMatrix *&o)
PStreamoperator<< (PStream &out, const UniformVMatrix &o)
PStreamoperator>> (PStream &in, PP< UniformVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UniformVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UpsideDownVMatrix &o)
PStreamoperator>> (PStream &in, UpsideDownVMatrix &o)
PStreamoperator>> (PStream &in, UpsideDownVMatrix *&o)
PStreamoperator<< (PStream &out, const UpsideDownVMatrix &o)
PStreamoperator>> (PStream &in, PP< UpsideDownVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UpsideDownVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ValueSelectRowsVMatrix &o)
PStreamoperator>> (PStream &in, ValueSelectRowsVMatrix &o)
PStreamoperator>> (PStream &in, ValueSelectRowsVMatrix *&o)
PStreamoperator<< (PStream &out, const ValueSelectRowsVMatrix &o)
PStreamoperator>> (PStream &in, PP< ValueSelectRowsVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ValueSelectRowsVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VariableDeletionVMatrix &o)
PStreamoperator>> (PStream &in, VariableDeletionVMatrix &o)
PStreamoperator>> (PStream &in, VariableDeletionVMatrix *&o)
PStreamoperator<< (PStream &out, const VariableDeletionVMatrix &o)
PStreamoperator>> (PStream &in, PP< VariableDeletionVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VariableDeletionVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VecExtendedVMatrix &o)
PStreamoperator>> (PStream &in, VecExtendedVMatrix &o)
PStreamoperator>> (PStream &in, VecExtendedVMatrix *&o)
PStreamoperator<< (PStream &out, const VecExtendedVMatrix &o)
PStreamoperator>> (PStream &in, PP< VecExtendedVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VecExtendedVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ViewSplitterVMatrix &o)
PStreamoperator>> (PStream &in, ViewSplitterVMatrix &o)
PStreamoperator>> (PStream &in, ViewSplitterVMatrix *&o)
PStreamoperator<< (PStream &out, const ViewSplitterVMatrix &o)
PStreamoperator>> (PStream &in, PP< ViewSplitterVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ViewSplitterVMatrix > *opt, PLearnDiff *diffs)
template<>
void deepCopyField (VMat &field, CopiesMap &copies)
VMat loadAsciiAsVMat (const PPath &filename)
 Load an ASCII file and return the corresponding VMat (this will be a MemoryVMatrix, since the entire file is loaded in memory).
PStreamoperator>> (PStream &in, VMat &o)
PStreamoperator<< (PStream &out, const VMat &o)
void operator<< (const Mat &dest, const VMatrix &src)
void operator>> (const VMatrix &src, const Mat &dest)
void operator<< (const Mat &dest, const VMat &src)
void operator>> (const VMat &src, const Mat &dest)
Array< VMatoperator& (const VMat &d1, const VMat &d2)
void computeWeightedMean (const Vec &weights, const VMat &d, Vec &meanvec)
void computeRange (const VMat &d, Vec &minvec, Vec &maxvec)
void computeRowMean (const VMat &d, Vec &meanvec)
 Compute mean of each row (the returned vector has length d->length()).
void computeMean (const VMat &d, Vec &meanvec)
 Compute basic statistics over all samples.
Mat computeBasicStats (const VMat &m)
TVec< MatcomputeConditionalMeans (const VMat &trainset, int targetsize, Mat &basic_stats)
void computeMeanAndVariance (const VMat &d, Vec &meanvec, Vec &variancevec, real epsilon)
void computeInputMean (const VMat &d, Vec &meanvec)
void computeInputMeanAndCovar (const VMat &d, Vec &meanvec, Mat &covarmat, real epsilon)
void computeInputMeanAndVariance (const VMat &d, Vec &meanvec, Vec &var, real epsilon)
void computeInputMeanAndStddev (const VMat &d, Vec &meanvec, Vec &stddev, real epsilon)
void computeWeightedMeanAndCovar (const Vec &weights, const VMat &d, Vec &meanvec, Mat &covarmat, real epsilon)
void computeMeanAndCovar (const VMat &d, Vec &meanvec, Mat &covarmat, real epsilon)
void computeCovar (const VMat &d, const Vec &mu, Mat &covarmat, real epsilon=0.0)
 Computes covariance matrix given mean mu.
void computeInputCovar (const VMat &d, const Vec &mu, Mat &covarmat, real epsilon=0.0)
 Computes covariance matrix given mean mu.
void computeMeanAndStddev (const VMat &d, Vec &meanvec, Vec &stddevvec, real epsilon)
void autocorrelation_function (const VMat &data, Mat &acf)
VMat normalize (const VMat &d, const Vec &meanvec, const Vec &stddevvec)
VMat normalize (const VMat &d, int inputsize, int ntrain)
 Here, mean and stddev are estimated on d.subMat(0,0,ntrain,inputsize).
VMat normalize (VMat d, int inputsize)
void correlations (const VMat &x, const VMat &y, Mat &r, Mat &pvalues, bool ignore_missing=false)
 Compute the correlations between each of the columns of x and each of the columns of y.
TVec< MatcomputeConditionalMeans (VMat trainset, int targetsize, Mat &basic_stats)
VMat normalize (const VMat &d, int inputsize)
 Here, mean and stddev are estimated on the whole dataset d.
PP< ConditionalStatsCollectorcomputeConditionalStats (VMat m, int condfield, TVec< RealMapping > ranges)
 returns the cooccurence statistics conditioned on the given field
void computeNearestNeighbors (VMat dataset, Vec x, TVec< int > &neighbors, int ignore_row)
TVec< StatsCollectorcomputeStats (VMat m, int maxnvalues, bool report_progress=true)
 Returns the unconditional statistics of each field.
void computeStats (VMat m, VecStatsCollector &st, bool report_progress)
void evaluateSumOfFprop (VMat vm, Func f, Vec &output_result, int nsamples=-1)
 compute fprop or fbprop of a sumOf operation
void evaluateSumOfFbprop (VMat vm, Func f, Vec &output_result, Vec &output_gradient, int nsamples)
Mat transposeProduct (VMat m)
 computes M'.M
Mat transposeProduct (VMat m1, VMat m2)
 computes M1'.M2
Vec transposeProduct (VMat m1, Vec v2)
 computes M1'.V2
Mat productTranspose (VMat m1, VMat m2)
 computes M1.M2'
Mat product (Mat m1, VMat m2)
 computes M1.M2
VMat transpose (VMat m1)
 returns M1'
real linearRegression (VMat inputs, VMat outputs, real weight_decay, Mat theta_t, bool use_precomputed_XtX_XtY, Mat XtX, Mat XtY, real &sum_squared_Y, Vec &outputwise_sum_squared_Y, bool return_squared_loss, int verbose_every, bool cholesky, int apply_decay_from)
Mat linearRegression (VMat inputs, VMat outputs, real weight_decay, bool include_bias=false)
 Version that does all the memory allocations of XtX, XtY and theta_t.
real weightedLinearRegression (VMat inputs, VMat outputs, VMat gammas, real weight_decay, Mat theta_t, bool use_precomputed_XtX_XtY, Mat XtX, Mat XtY, real &sum_squared_Y, Vec &outputwise_sum_squared_Y, real &sum_gammas, bool return_squared_loss=false, int verbose_computation_every=0, bool cholesky=true, int apply_decay_from=1)
 Linear regression where each input point is given a different importance weight (the gammas); returns weighted average of squared loss This regression is made with no added bias.
Mat weightedLinearRegression (VMat inputs, VMat outputs, VMat gammas, real weight_decay, bool include_bias)
 Version that does all the memory allocations of XtX, XtY and theta_t.
VMat grep (VMat d, int col, Vec values, bool exclude)
map< real, intcountOccurencesInColumn (VMat m, int col)
 returns a map mapping all different values appearing in column col to their number of occurences
map< real, TVec< int > > indicesOfOccurencesInColumn (VMat m, int col)
 returns a map mapping all different values appearing in column col to a vector of the corresponding row indices in the VMat
VMat grep (VMat d, int col, Vec values, const string &indexfile, bool exclude)
VMat filter (VMat d, const string &indexfile)
VMat shuffle (VMat d)
 returns a SelectRowsVMatrix that has d's rows shuffled
VMat bootstrap (VMat d, bool reorder=true, bool norepeat=true)
 returns a SelectRowsVMatrix that has d's rows bootstrapped (sample with replacement and optionally re-ordered).
VMat rebalanceNClasses (VMat inputs, int nclasses, const string &filename)
void fullyRebalance2Classes (VMat inputs, const string &filename, bool save_indices=true)
 Rebalance a 2-class VMat such as to keep all the examples of the dominant class.
VMat temporalThreshold (VMat distr, int threshold_date, bool is_before, int yyyymmdd_col)
VMat temporalThreshold (VMat distr, int threshold_date, bool is_before, int yyyy_col, int mm_col, int dd_col)
time_t getDateOfCode (const string &codefile)
ObjecttoObjectPtr (const VMatLanguage &o)
PStreamoperator>> (PStream &in, VMatLanguage &o)
PStreamoperator>> (PStream &in, VMatLanguage *&o)
PStreamoperator<< (PStream &out, const VMatLanguage &o)
PStreamoperator>> (PStream &in, PP< VMatLanguage > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VMatLanguage > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PreprocessingVMatrix &o)
PStreamoperator>> (PStream &in, PreprocessingVMatrix &o)
PStreamoperator>> (PStream &in, PreprocessingVMatrix *&o)
PStreamoperator<< (PStream &out, const PreprocessingVMatrix &o)
PStreamoperator>> (PStream &in, PP< PreprocessingVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PreprocessingVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VMatrix &o)
PStreamoperator>> (PStream &in, VMatrix &o)
PStreamoperator>> (PStream &in, VMatrix *&o)
PStreamoperator<< (PStream &out, const VMatrix &o)
PStreamoperator>> (PStream &in, PP< VMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VMatrixFromDistribution &o)
PStreamoperator>> (PStream &in, VMatrixFromDistribution &o)
PStreamoperator>> (PStream &in, VMatrixFromDistribution *&o)
PStreamoperator<< (PStream &out, const VMatrixFromDistribution &o)
PStreamoperator>> (PStream &in, PP< VMatrixFromDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VMatrixFromDistribution > *opt, PLearnDiff *diffs)
PStreamoperator>> (PStream &in, VMField::FieldType &x)
PStreamoperator>> (PStream &in, VMField &x)
PStreamoperator<< (PStream &out, const VMField &x)
void operator>> (const VVec &vv, const Vec &v)
void operator<< (const VVec &vv, const Vec &v)
void operator<< (const Vec &v, const VVec &vv)
void operator>> (const Vec &v, const VVec &vv)
ObjecttoObjectPtr (const VVMatrix &o)
PStreamoperator>> (PStream &in, VVMatrix &o)
PStreamoperator>> (PStream &in, VVMatrix *&o)
PStreamoperator<< (PStream &out, const VVMatrix &o)
PStreamoperator>> (PStream &in, PP< VVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const AnalyzeDond2DiscreteVariables &o)
PStreamoperator>> (PStream &in, AnalyzeDond2DiscreteVariables &o)
PStreamoperator>> (PStream &in, AnalyzeDond2DiscreteVariables *&o)
PStreamoperator<< (PStream &out, const AnalyzeDond2DiscreteVariables &o)
PStreamoperator>> (PStream &in, PP< AnalyzeDond2DiscreteVariables > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AnalyzeDond2DiscreteVariables > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const AnalyzeFieldStats &o)
PStreamoperator>> (PStream &in, AnalyzeFieldStats &o)
PStreamoperator>> (PStream &in, AnalyzeFieldStats *&o)
PStreamoperator<< (PStream &out, const AnalyzeFieldStats &o)
PStreamoperator>> (PStream &in, PP< AnalyzeFieldStats > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AnalyzeFieldStats > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CheckDond2FileSequence &o)
PStreamoperator>> (PStream &in, CheckDond2FileSequence &o)
PStreamoperator>> (PStream &in, CheckDond2FileSequence *&o)
PStreamoperator<< (PStream &out, const CheckDond2FileSequence &o)
PStreamoperator>> (PStream &in, PP< CheckDond2FileSequence > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CheckDond2FileSequence > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (CheckDond2FileSequence) template<> class TypeTraits< CheckDond2FileSequence >
ObjecttoObjectPtr (const ComputeDond2Target &o)
PStreamoperator>> (PStream &in, ComputeDond2Target &o)
PStreamoperator>> (PStream &in, ComputeDond2Target *&o)
PStreamoperator<< (PStream &out, const ComputeDond2Target &o)
PStreamoperator>> (PStream &in, PP< ComputeDond2Target > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ComputeDond2Target > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ComputePurenneError &o)
PStreamoperator>> (PStream &in, ComputePurenneError &o)
PStreamoperator>> (PStream &in, ComputePurenneError *&o)
PStreamoperator<< (PStream &out, const ComputePurenneError &o)
PStreamoperator>> (PStream &in, PP< ComputePurenneError > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ComputePurenneError > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ComputePurenneError) template<> class TypeTraits< ComputePurenneError >
ObjecttoObjectPtr (const ConditionalMeanImputationVMatrix &o)
PStreamoperator>> (PStream &in, ConditionalMeanImputationVMatrix &o)
PStreamoperator>> (PStream &in, ConditionalMeanImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const ConditionalMeanImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< ConditionalMeanImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalMeanImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CovariancePreservationImputationVMatrix &o)
PStreamoperator>> (PStream &in, CovariancePreservationImputationVMatrix &o)
PStreamoperator>> (PStream &in, CovariancePreservationImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const CovariancePreservationImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< CovariancePreservationImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CovariancePreservationImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DichotomizeDond2DiscreteVariables &o)
PStreamoperator>> (PStream &in, DichotomizeDond2DiscreteVariables &o)
PStreamoperator>> (PStream &in, DichotomizeDond2DiscreteVariables *&o)
PStreamoperator<< (PStream &out, const DichotomizeDond2DiscreteVariables &o)
PStreamoperator>> (PStream &in, PP< DichotomizeDond2DiscreteVariables > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DichotomizeDond2DiscreteVariables > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Experimentation &o)
PStreamoperator>> (PStream &in, Experimentation &o)
PStreamoperator>> (PStream &in, Experimentation *&o)
PStreamoperator<< (PStream &out, const Experimentation &o)
PStreamoperator>> (PStream &in, PP< Experimentation > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Experimentation > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FixDond2BinaryVariables &o)
PStreamoperator>> (PStream &in, FixDond2BinaryVariables &o)
PStreamoperator>> (PStream &in, FixDond2BinaryVariables *&o)
PStreamoperator<< (PStream &out, const FixDond2BinaryVariables &o)
PStreamoperator>> (PStream &in, PP< FixDond2BinaryVariables > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FixDond2BinaryVariables > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MergeDond2Files &o)
PStreamoperator>> (PStream &in, MergeDond2Files &o)
PStreamoperator>> (PStream &in, MergeDond2Files *&o)
PStreamoperator<< (PStream &out, const MergeDond2Files &o)
PStreamoperator>> (PStream &in, PP< MergeDond2Files > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MergeDond2Files > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NeighborhoodConditionalMean &o)
PStreamoperator>> (PStream &in, NeighborhoodConditionalMean &o)
PStreamoperator>> (PStream &in, NeighborhoodConditionalMean *&o)
PStreamoperator<< (PStream &out, const NeighborhoodConditionalMean &o)
PStreamoperator>> (PStream &in, PP< NeighborhoodConditionalMean > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeighborhoodConditionalMean > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NeighborhoodImputationVMatrix &o)
PStreamoperator>> (PStream &in, NeighborhoodImputationVMatrix &o)
PStreamoperator>> (PStream &in, NeighborhoodImputationVMatrix *&o)
PStreamoperator<< (PStream &out, const NeighborhoodImputationVMatrix &o)
PStreamoperator>> (PStream &in, PP< NeighborhoodImputationVMatrix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeighborhoodImputationVMatrix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Preprocessing &o)
PStreamoperator>> (PStream &in, Preprocessing &o)
PStreamoperator>> (PStream &in, Preprocessing *&o)
PStreamoperator<< (PStream &out, const Preprocessing &o)
PStreamoperator>> (PStream &in, PP< Preprocessing > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Preprocessing > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SecondIterationTester &o)
PStreamoperator>> (PStream &in, SecondIterationTester &o)
PStreamoperator>> (PStream &in, SecondIterationTester *&o)
PStreamoperator<< (PStream &out, const SecondIterationTester &o)
PStreamoperator>> (PStream &in, PP< SecondIterationTester > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SecondIterationTester > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SecondIterationWrapper &o)
PStreamoperator>> (PStream &in, SecondIterationWrapper &o)
PStreamoperator>> (PStream &in, SecondIterationWrapper *&o)
PStreamoperator<< (PStream &out, const SecondIterationWrapper &o)
PStreamoperator>> (PStream &in, PP< SecondIterationWrapper > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SecondIterationWrapper > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (SecondIterationWrapper) template<> class TypeTraits< SecondIterationWrapper >
ObjecttoObjectPtr (const StabilisationLearner &o)
PStreamoperator>> (PStream &in, StabilisationLearner &o)
PStreamoperator>> (PStream &in, StabilisationLearner *&o)
PStreamoperator<< (PStream &out, const StabilisationLearner &o)
PStreamoperator>> (PStream &in, PP< StabilisationLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StabilisationLearner > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (StabilisationLearner) template<> class TypeTraits< StabilisationLearner >
ObjecttoObjectPtr (const TestImputations &o)
PStreamoperator>> (PStream &in, TestImputations &o)
PStreamoperator>> (PStream &in, TestImputations *&o)
PStreamoperator<< (PStream &out, const TestImputations &o)
PStreamoperator>> (PStream &in, PP< TestImputations > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TestImputations > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const WeightedDistance &o)
PStreamoperator>> (PStream &in, WeightedDistance &o)
PStreamoperator>> (PStream &in, WeightedDistance *&o)
PStreamoperator<< (PStream &out, const WeightedDistance &o)
PStreamoperator>> (PStream &in, PP< WeightedDistance > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WeightedDistance > *opt, PLearnDiff *diffs)
void qsort_vec (TVec< pair< int, real > > v, TVec< pair< int, int > > buffer)
ObjecttoObjectPtr (const BinaryStump &o)
PStreamoperator>> (PStream &in, BinaryStump &o)
PStreamoperator>> (PStream &in, BinaryStump *&o)
PStreamoperator<< (PStream &out, const BinaryStump &o)
PStreamoperator>> (PStream &in, PP< BinaryStump > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryStump > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (BinaryStump) template<> class TypeTraits< BinaryStump >
ObjecttoObjectPtr (const ClassifierFromConditionalPDistribution &o)
PStreamoperator>> (PStream &in, ClassifierFromConditionalPDistribution &o)
PStreamoperator>> (PStream &in, ClassifierFromConditionalPDistribution *&o)
PStreamoperator<< (PStream &out, const ClassifierFromConditionalPDistribution &o)
PStreamoperator>> (PStream &in, PP< ClassifierFromConditionalPDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassifierFromConditionalPDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ClassifierFromConditionalPDistribution) template<> class TypeTraits< ClassifierFromConditionalPDistribution >
ObjecttoObjectPtr (const ClassifierFromDensity &o)
PStreamoperator>> (PStream &in, ClassifierFromDensity &o)
PStreamoperator>> (PStream &in, ClassifierFromDensity *&o)
PStreamoperator<< (PStream &out, const ClassifierFromDensity &o)
PStreamoperator>> (PStream &in, PP< ClassifierFromDensity > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassifierFromDensity > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ClassifierFromDensity) template<> class TypeTraits< ClassifierFromDensity >
ObjecttoObjectPtr (const KFoldLogisticClassifier &o)
PStreamoperator>> (PStream &in, KFoldLogisticClassifier &o)
PStreamoperator>> (PStream &in, KFoldLogisticClassifier *&o)
PStreamoperator<< (PStream &out, const KFoldLogisticClassifier &o)
PStreamoperator>> (PStream &in, PP< KFoldLogisticClassifier > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KFoldLogisticClassifier > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (KFoldLogisticClassifier) template<> class TypeTraits< KFoldLogisticClassifier >
ObjecttoObjectPtr (const LocalGaussianClassifier &o)
PStreamoperator>> (PStream &in, LocalGaussianClassifier &o)
PStreamoperator>> (PStream &in, LocalGaussianClassifier *&o)
PStreamoperator<< (PStream &out, const LocalGaussianClassifier &o)
PStreamoperator>> (PStream &in, PP< LocalGaussianClassifier > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocalGaussianClassifier > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (LocalGaussianClassifier) template<> class TypeTraits< LocalGaussianClassifier >
ObjecttoObjectPtr (const FeatureSetNaiveBayesClassifier &o)
PStreamoperator>> (PStream &in, FeatureSetNaiveBayesClassifier &o)
PStreamoperator>> (PStream &in, FeatureSetNaiveBayesClassifier *&o)
PStreamoperator<< (PStream &out, const FeatureSetNaiveBayesClassifier &o)
PStreamoperator>> (PStream &in, PP< FeatureSetNaiveBayesClassifier > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FeatureSetNaiveBayesClassifier > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KNNClassifier &o)
PStreamoperator>> (PStream &in, KNNClassifier &o)
PStreamoperator>> (PStream &in, KNNClassifier *&o)
PStreamoperator<< (PStream &out, const KNNClassifier &o)
PStreamoperator>> (PStream &in, PP< KNNClassifier > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KNNClassifier > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MultiInstanceNNet &o)
PStreamoperator>> (PStream &in, MultiInstanceNNet &o)
PStreamoperator>> (PStream &in, MultiInstanceNNet *&o)
PStreamoperator<< (PStream &out, const MultiInstanceNNet &o)
PStreamoperator>> (PStream &in, PP< MultiInstanceNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiInstanceNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SVMClassificationTorch &o)
PStreamoperator>> (PStream &in, SVMClassificationTorch &o)
PStreamoperator>> (PStream &in, SVMClassificationTorch *&o)
PStreamoperator<< (PStream &out, const SVMClassificationTorch &o)
PStreamoperator>> (PStream &in, PP< SVMClassificationTorch > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SVMClassificationTorch > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ToBagClassifier &o)
PStreamoperator>> (PStream &in, ToBagClassifier &o)
PStreamoperator>> (PStream &in, ToBagClassifier *&o)
PStreamoperator<< (PStream &out, const ToBagClassifier &o)
PStreamoperator>> (PStream &in, PP< ToBagClassifier > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ToBagClassifier > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ToBagClassifier) template<> class TypeTraits< ToBagClassifier >
ObjecttoObjectPtr (const ConditionalDensityNet &o)
PStreamoperator>> (PStream &in, ConditionalDensityNet &o)
PStreamoperator>> (PStream &in, ConditionalDensityNet *&o)
PStreamoperator<< (PStream &out, const ConditionalDensityNet &o)
PStreamoperator>> (PStream &in, PP< ConditionalDensityNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalDensityNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConditionalDistribution &o)
PStreamoperator>> (PStream &in, ConditionalDistribution &o)
PStreamoperator>> (PStream &in, ConditionalDistribution *&o)
PStreamoperator<< (PStream &out, const ConditionalDistribution &o)
PStreamoperator>> (PStream &in, PP< ConditionalDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ConditionalDistribution) template<> class TypeTraits< ConditionalDistribution >
ObjecttoObjectPtr (const ConditionalGaussianDistribution &o)
PStreamoperator>> (PStream &in, ConditionalGaussianDistribution &o)
PStreamoperator>> (PStream &in, ConditionalGaussianDistribution *&o)
PStreamoperator<< (PStream &out, const ConditionalGaussianDistribution &o)
PStreamoperator>> (PStream &in, PP< ConditionalGaussianDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConditionalGaussianDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ConditionalGaussianDistribution) template<> class TypeTraits< ConditionalGaussianDistribution >
ObjecttoObjectPtr (const Distribution &o)
PStreamoperator>> (PStream &in, Distribution &o)
PStreamoperator>> (PStream &in, Distribution *&o)
PStreamoperator<< (PStream &out, const Distribution &o)
PStreamoperator>> (PStream &in, PP< Distribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Distribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (Distribution) template<> class TypeTraits< Distribution >
ObjecttoObjectPtr (const EmpiricalDistribution &o)
PStreamoperator>> (PStream &in, EmpiricalDistribution &o)
PStreamoperator>> (PStream &in, EmpiricalDistribution *&o)
PStreamoperator<< (PStream &out, const EmpiricalDistribution &o)
PStreamoperator>> (PStream &in, PP< EmpiricalDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EmpiricalDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (EmpiricalDistribution) template<> class TypeTraits< EmpiricalDistribution >
ObjecttoObjectPtr (const GaussianContinuumDistribution &o)
PStreamoperator>> (PStream &in, GaussianContinuumDistribution &o)
PStreamoperator>> (PStream &in, GaussianContinuumDistribution *&o)
PStreamoperator<< (PStream &out, const GaussianContinuumDistribution &o)
PStreamoperator>> (PStream &in, PP< GaussianContinuumDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianContinuumDistribution > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianProcessRegressor &o)
PStreamoperator>> (PStream &in, GaussianProcessRegressor &o)
PStreamoperator>> (PStream &in, GaussianProcessRegressor *&o)
PStreamoperator<< (PStream &out, const GaussianProcessRegressor &o)
PStreamoperator>> (PStream &in, PP< GaussianProcessRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianProcessRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LocallyWeightedDistribution &o)
PStreamoperator>> (PStream &in, LocallyWeightedDistribution &o)
PStreamoperator>> (PStream &in, LocallyWeightedDistribution *&o)
PStreamoperator<< (PStream &out, const LocallyWeightedDistribution &o)
PStreamoperator>> (PStream &in, PP< LocallyWeightedDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocallyWeightedDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (LocallyWeightedDistribution) template<> class TypeTraits< LocallyWeightedDistribution >
ObjecttoObjectPtr (const LocallyMagnifiedDistribution &o)
PStreamoperator>> (PStream &in, LocallyMagnifiedDistribution &o)
PStreamoperator>> (PStream &in, LocallyMagnifiedDistribution *&o)
PStreamoperator<< (PStream &out, const LocallyMagnifiedDistribution &o)
PStreamoperator>> (PStream &in, PP< LocallyMagnifiedDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocallyMagnifiedDistribution > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NeighborhoodBoxVolumeDensityEstimator &o)
PStreamoperator>> (PStream &in, NeighborhoodBoxVolumeDensityEstimator &o)
PStreamoperator>> (PStream &in, NeighborhoodBoxVolumeDensityEstimator *&o)
PStreamoperator<< (PStream &out, const NeighborhoodBoxVolumeDensityEstimator &o)
PStreamoperator>> (PStream &in, PP< NeighborhoodBoxVolumeDensityEstimator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeighborhoodBoxVolumeDensityEstimator > *opt, PLearnDiff *diffs)
bool operator< (const ReconstructionCandidate &o1, const ReconstructionCandidate &o2)
bool operator== (const ReconstructionCandidate &o1, const ReconstructionCandidate &o2)
PStreamoperator<< (PStream &out, const ReconstructionCandidate &x)
PStreamoperator>> (PStream &in, ReconstructionCandidate &x)
ObjecttoObjectPtr (const TransformationLearner &o)
PStreamoperator>> (PStream &in, TransformationLearner &o)
PStreamoperator>> (PStream &in, TransformationLearner *&o)
PStreamoperator<< (PStream &out, const TransformationLearner &o)
PStreamoperator>> (PStream &in, PP< TransformationLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransformationLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianDistribution &o)
PStreamoperator>> (PStream &in, GaussianDistribution &o)
PStreamoperator>> (PStream &in, GaussianDistribution *&o)
PStreamoperator<< (PStream &out, const GaussianDistribution &o)
PStreamoperator>> (PStream &in, PP< GaussianDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (GaussianDistribution) template<> class TypeTraits< GaussianDistribution >
void create_list (const TVec< int > &parent_, const TVec< TVec< int > > &children_, TVec< int > &nodes_, TVec< bool > &use_previous_, TVec< bool > &can_free_, int current_, bool cur_use_prev, bool cur_can_free)
ObjecttoObjectPtr (const GaussMix &o)
PStreamoperator>> (PStream &in, GaussMix &o)
PStreamoperator>> (PStream &in, GaussMix *&o)
PStreamoperator<< (PStream &out, const GaussMix &o)
PStreamoperator>> (PStream &in, PP< GaussMix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussMix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HistogramDistribution &o)
PStreamoperator>> (PStream &in, HistogramDistribution &o)
PStreamoperator>> (PStream &in, HistogramDistribution *&o)
PStreamoperator<< (PStream &out, const HistogramDistribution &o)
PStreamoperator>> (PStream &in, PP< HistogramDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HistogramDistribution > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KernelDensityEstimator &o)
PStreamoperator>> (PStream &in, KernelDensityEstimator &o)
PStreamoperator>> (PStream &in, KernelDensityEstimator *&o)
PStreamoperator<< (PStream &out, const KernelDensityEstimator &o)
PStreamoperator>> (PStream &in, PP< KernelDensityEstimator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KernelDensityEstimator > *opt, PLearnDiff *diffs)
void computeNearestNeighbors (Mat dataset, Vec x, Mat &neighbors, int ignore_row=-1)
void computePrincipalComponents (Mat dataset, Vec &eig_values, Mat &eig_vectors, real global_lambda0)
void computeLocalPrincipalComponents (Mat &dataset, int which_pattern, Mat &delta_neighbors, Vec &eig_values, Mat &eig_vectors, Vec &mean, bool learn_mu=false, real global_lambda0=0)
ObjecttoObjectPtr (const ManifoldParzen2 &o)
PStreamoperator>> (PStream &in, ManifoldParzen2 &o)
PStreamoperator>> (PStream &in, ManifoldParzen2 *&o)
PStreamoperator<< (PStream &out, const ManifoldParzen2 &o)
PStreamoperator>> (PStream &in, PP< ManifoldParzen2 > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ManifoldParzen2 > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MixtureDistribution &o)
PStreamoperator>> (PStream &in, MixtureDistribution &o)
PStreamoperator>> (PStream &in, MixtureDistribution *&o)
PStreamoperator<< (PStream &out, const MixtureDistribution &o)
PStreamoperator>> (PStream &in, PP< MixtureDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MixtureDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (MixtureDistribution) template<> class TypeTraits< MixtureDistribution >
ObjecttoObjectPtr (const NGramDistribution &o)
PStreamoperator>> (PStream &in, NGramDistribution &o)
PStreamoperator>> (PStream &in, NGramDistribution *&o)
PStreamoperator<< (PStream &out, const NGramDistribution &o)
PStreamoperator>> (PStream &in, PP< NGramDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NGramDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (NGramDistribution) template<> class TypeTraits< NGramDistribution >
ObjecttoObjectPtr (const NGramTree &o)
PStreamoperator>> (PStream &in, NGramTree &o)
PStreamoperator>> (PStream &in, NGramTree *&o)
PStreamoperator<< (PStream &out, const NGramTree &o)
PStreamoperator>> (PStream &in, PP< NGramTree > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NGramTree > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NonLocalManifoldParzen &o)
PStreamoperator>> (PStream &in, NonLocalManifoldParzen &o)
PStreamoperator>> (PStream &in, NonLocalManifoldParzen *&o)
PStreamoperator<< (PStream &out, const NonLocalManifoldParzen &o)
PStreamoperator>> (PStream &in, PP< NonLocalManifoldParzen > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NonLocalManifoldParzen > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ParzenWindow &o)
PStreamoperator>> (PStream &in, ParzenWindow &o)
PStreamoperator>> (PStream &in, ParzenWindow *&o)
PStreamoperator<< (PStream &out, const ParzenWindow &o)
PStreamoperator>> (PStream &in, PP< ParzenWindow > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ParzenWindow > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PDistribution &o)
PStreamoperator>> (PStream &in, PDistribution &o)
PStreamoperator>> (PStream &in, PDistribution *&o)
PStreamoperator<< (PStream &out, const PDistribution &o)
PStreamoperator>> (PStream &in, PP< PDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (PDistribution) template<> class TypeTraits< PDistribution >
ObjecttoObjectPtr (const RandomGaussMix &o)
PStreamoperator>> (PStream &in, RandomGaussMix &o)
PStreamoperator>> (PStream &in, RandomGaussMix *&o)
PStreamoperator<< (PStream &out, const RandomGaussMix &o)
PStreamoperator>> (PStream &in, PP< RandomGaussMix > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RandomGaussMix > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMDistribution &o)
PStreamoperator>> (PStream &in, RBMDistribution &o)
PStreamoperator>> (PStream &in, RBMDistribution *&o)
PStreamoperator<< (PStream &out, const RBMDistribution &o)
PStreamoperator>> (PStream &in, PP< RBMDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMDistribution) template<> class TypeTraits< RBMDistribution >
ObjecttoObjectPtr (const SpiralDistribution &o)
PStreamoperator>> (PStream &in, SpiralDistribution &o)
PStreamoperator>> (PStream &in, SpiralDistribution *&o)
PStreamoperator<< (PStream &out, const SpiralDistribution &o)
PStreamoperator>> (PStream &in, PP< SpiralDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SpiralDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (SpiralDistribution) template<> class TypeTraits< SpiralDistribution >
ObjecttoObjectPtr (const SymbolNode &o)
PStreamoperator>> (PStream &in, SymbolNode &o)
PStreamoperator>> (PStream &in, SymbolNode *&o)
PStreamoperator<< (PStream &out, const SymbolNode &o)
PStreamoperator>> (PStream &in, PP< SymbolNode > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SymbolNode > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UnconditionalDistribution &o)
PStreamoperator>> (PStream &in, UnconditionalDistribution &o)
PStreamoperator>> (PStream &in, UnconditionalDistribution *&o)
PStreamoperator<< (PStream &out, const UnconditionalDistribution &o)
PStreamoperator>> (PStream &in, PP< UnconditionalDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnconditionalDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (UnconditionalDistribution) template<> class TypeTraits< UnconditionalDistribution >
ObjecttoObjectPtr (const UniformDistribution &o)
PStreamoperator>> (PStream &in, UniformDistribution &o)
PStreamoperator>> (PStream &in, UniformDistribution *&o)
PStreamoperator<< (PStream &out, const UniformDistribution &o)
PStreamoperator>> (PStream &in, PP< UniformDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UniformDistribution > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (UniformDistribution) template<> class TypeTraits< UniformDistribution >
ObjecttoObjectPtr (const AddCostToLearner &o)
PStreamoperator>> (PStream &in, AddCostToLearner &o)
PStreamoperator>> (PStream &in, AddCostToLearner *&o)
PStreamoperator<< (PStream &out, const AddCostToLearner &o)
PStreamoperator>> (PStream &in, PP< AddCostToLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AddCostToLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const AddLayersNNet &o)
PStreamoperator>> (PStream &in, AddLayersNNet &o)
PStreamoperator>> (PStream &in, AddLayersNNet *&o)
PStreamoperator<< (PStream &out, const AddLayersNNet &o)
PStreamoperator>> (PStream &in, PP< AddLayersNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AddLayersNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BestAveragingPLearner &o)
PStreamoperator>> (PStream &in, BestAveragingPLearner &o)
PStreamoperator>> (PStream &in, BestAveragingPLearner *&o)
PStreamoperator<< (PStream &out, const BestAveragingPLearner &o)
PStreamoperator>> (PStream &in, PP< BestAveragingPLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BestAveragingPLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ChainedLearners &o)
PStreamoperator>> (PStream &in, ChainedLearners &o)
PStreamoperator>> (PStream &in, ChainedLearners *&o)
PStreamoperator<< (PStream &out, const ChainedLearners &o)
PStreamoperator>> (PStream &in, PP< ChainedLearners > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ChainedLearners > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DeepNNet &o)
PStreamoperator>> (PStream &in, DeepNNet &o)
PStreamoperator>> (PStream &in, DeepNNet *&o)
PStreamoperator<< (PStream &out, const DeepNNet &o)
PStreamoperator>> (PStream &in, PP< DeepNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DeepNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Learner &o)
PStreamoperator>> (PStream &in, Learner &o)
PStreamoperator>> (PStream &in, Learner *&o)
PStreamoperator<< (PStream &out, const Learner &o)
PStreamoperator>> (PStream &in, PP< Learner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Learner > *opt, PLearnDiff *diffs)
void prettyprint_test_results (ostream &out, const Learner &learner, const Vec &results)
ObjecttoObjectPtr (const NeuralNet &o)
PStreamoperator>> (PStream &in, NeuralNet &o)
PStreamoperator>> (PStream &in, NeuralNet *&o)
PStreamoperator<< (PStream &out, const NeuralNet &o)
PStreamoperator>> (PStream &in, PP< NeuralNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeuralNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DistRepNNet &o)
PStreamoperator>> (PStream &in, DistRepNNet &o)
PStreamoperator>> (PStream &in, DistRepNNet *&o)
PStreamoperator<< (PStream &out, const DistRepNNet &o)
PStreamoperator>> (PStream &in, PP< DistRepNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DistRepNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EmbeddedLearner &o)
PStreamoperator>> (PStream &in, EmbeddedLearner &o)
PStreamoperator>> (PStream &in, EmbeddedLearner *&o)
PStreamoperator<< (PStream &out, const EmbeddedLearner &o)
PStreamoperator>> (PStream &in, PP< EmbeddedLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EmbeddedLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CorrelationProfiler &o)
PStreamoperator>> (PStream &in, CorrelationProfiler &o)
PStreamoperator>> (PStream &in, CorrelationProfiler *&o)
PStreamoperator<< (PStream &out, const CorrelationProfiler &o)
PStreamoperator>> (PStream &in, PP< CorrelationProfiler > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CorrelationProfiler > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DeepReconstructorNet &o)
PStreamoperator>> (PStream &in, DeepReconstructorNet &o)
PStreamoperator>> (PStream &in, DeepReconstructorNet *&o)
PStreamoperator<< (PStream &out, const DeepReconstructorNet &o)
PStreamoperator>> (PStream &in, PP< DeepReconstructorNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DeepReconstructorNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const mNNet &o)
PStreamoperator>> (PStream &in, mNNet &o)
PStreamoperator>> (PStream &in, mNNet *&o)
PStreamoperator<< (PStream &out, const mNNet &o)
PStreamoperator>> (PStream &in, PP< mNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, mNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NatGradEstimator &o)
PStreamoperator>> (PStream &in, NatGradEstimator &o)
PStreamoperator>> (PStream &in, NatGradEstimator *&o)
PStreamoperator<< (PStream &out, const NatGradEstimator &o)
PStreamoperator>> (PStream &in, PP< NatGradEstimator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NatGradEstimator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NatGradNNet &o)
PStreamoperator>> (PStream &in, NatGradNNet &o)
PStreamoperator>> (PStream &in, NatGradNNet *&o)
PStreamoperator<< (PStream &out, const NatGradNNet &o)
PStreamoperator>> (PStream &in, PP< NatGradNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NatGradNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NatGradSMPNNet &o)
PStreamoperator>> (PStream &in, NatGradSMPNNet &o)
PStreamoperator>> (PStream &in, NatGradSMPNNet *&o)
PStreamoperator<< (PStream &out, const NatGradSMPNNet &o)
PStreamoperator>> (PStream &in, PP< NatGradSMPNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NatGradSMPNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PvGradNNet &o)
PStreamoperator>> (PStream &in, PvGradNNet &o)
PStreamoperator>> (PStream &in, PvGradNNet *&o)
PStreamoperator<< (PStream &out, const PvGradNNet &o)
PStreamoperator>> (PStream &in, PP< PvGradNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PvGradNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FeatureSetNNet &o)
PStreamoperator>> (PStream &in, FeatureSetNNet &o)
PStreamoperator>> (PStream &in, FeatureSetNNet *&o)
PStreamoperator<< (PStream &out, const FeatureSetNNet &o)
PStreamoperator>> (PStream &in, PP< FeatureSetNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FeatureSetNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GradientCorrector &o)
PStreamoperator>> (PStream &in, GradientCorrector &o)
PStreamoperator>> (PStream &in, GradientCorrector *&o)
PStreamoperator<< (PStream &out, const GradientCorrector &o)
PStreamoperator>> (PStream &in, PP< GradientCorrector > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GradientCorrector > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HorizonStatefulLearner &o)
PStreamoperator>> (PStream &in, HorizonStatefulLearner &o)
PStreamoperator>> (PStream &in, HorizonStatefulLearner *&o)
PStreamoperator<< (PStream &out, const HorizonStatefulLearner &o)
PStreamoperator>> (PStream &in, PP< HorizonStatefulLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HorizonStatefulLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IdentityPLearner &o)
PStreamoperator>> (PStream &in, IdentityPLearner &o)
PStreamoperator>> (PStream &in, IdentityPLearner *&o)
PStreamoperator<< (PStream &out, const IdentityPLearner &o)
PStreamoperator>> (PStream &in, PP< IdentityPLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IdentityPLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IncrementalNNet &o)
PStreamoperator>> (PStream &in, IncrementalNNet &o)
PStreamoperator>> (PStream &in, IncrementalNNet *&o)
PStreamoperator<< (PStream &out, const IncrementalNNet &o)
PStreamoperator>> (PStream &in, PP< IncrementalNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IncrementalNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NeighborhoodSmoothnessNNet &o)
PStreamoperator>> (PStream &in, NeighborhoodSmoothnessNNet &o)
PStreamoperator>> (PStream &in, NeighborhoodSmoothnessNNet *&o)
PStreamoperator<< (PStream &out, const NeighborhoodSmoothnessNNet &o)
PStreamoperator>> (PStream &in, PP< NeighborhoodSmoothnessNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeighborhoodSmoothnessNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NNet &o)
PStreamoperator>> (PStream &in, NNet &o)
PStreamoperator>> (PStream &in, NNet *&o)
PStreamoperator<< (PStream &out, const NNet &o)
PStreamoperator>> (PStream &in, PP< NNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PLearner &o)
PStreamoperator>> (PStream &in, PLearner &o)
PStreamoperator>> (PStream &in, PLearner *&o)
PStreamoperator<< (PStream &out, const PLearner &o)
PStreamoperator>> (PStream &in, PP< PLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PythonProcessedLearner &o)
PStreamoperator>> (PStream &in, PythonProcessedLearner &o)
PStreamoperator>> (PStream &in, PythonProcessedLearner *&o)
PStreamoperator<< (PStream &out, const PythonProcessedLearner &o)
PStreamoperator>> (PStream &in, PP< PythonProcessedLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PythonProcessedLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SelectInputSubsetLearner &o)
PStreamoperator>> (PStream &in, SelectInputSubsetLearner &o)
PStreamoperator>> (PStream &in, SelectInputSubsetLearner *&o)
PStreamoperator<< (PStream &out, const SelectInputSubsetLearner &o)
PStreamoperator>> (PStream &in, PP< SelectInputSubsetLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SelectInputSubsetLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedLearner &o)
PStreamoperator>> (PStream &in, StackedLearner &o)
PStreamoperator>> (PStream &in, StackedLearner *&o)
PStreamoperator<< (PStream &out, const StackedLearner &o)
PStreamoperator>> (PStream &in, PP< StackedLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StatefulLearner &o)
PStreamoperator>> (PStream &in, StatefulLearner &o)
PStreamoperator>> (PStream &in, StatefulLearner *&o)
PStreamoperator<< (PStream &out, const StatefulLearner &o)
PStreamoperator>> (PStream &in, PP< StatefulLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StatefulLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TestingLearner &o)
PStreamoperator>> (PStream &in, TestingLearner &o)
PStreamoperator>> (PStream &in, TestingLearner *&o)
PStreamoperator<< (PStream &out, const TestingLearner &o)
PStreamoperator>> (PStream &in, PP< TestingLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TestingLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TorchLearner &o)
PStreamoperator>> (PStream &in, TorchLearner &o)
PStreamoperator>> (PStream &in, TorchLearner *&o)
PStreamoperator<< (PStream &out, const TorchLearner &o)
PStreamoperator>> (PStream &in, PP< TorchLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TorchLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TransformOutputLearner &o)
PStreamoperator>> (PStream &in, TransformOutputLearner &o)
PStreamoperator>> (PStream &in, TransformOutputLearner *&o)
PStreamoperator<< (PStream &out, const TransformOutputLearner &o)
PStreamoperator>> (PStream &in, PP< TransformOutputLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TransformOutputLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VPLCombinedLearner &o)
PStreamoperator>> (PStream &in, VPLCombinedLearner &o)
PStreamoperator>> (PStream &in, VPLCombinedLearner *&o)
PStreamoperator<< (PStream &out, const VPLCombinedLearner &o)
PStreamoperator>> (PStream &in, PP< VPLCombinedLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VPLCombinedLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VPLPreprocessedLearner &o)
PStreamoperator>> (PStream &in, VPLPreprocessedLearner &o)
PStreamoperator>> (PStream &in, VPLPreprocessedLearner *&o)
PStreamoperator<< (PStream &out, const VPLPreprocessedLearner &o)
PStreamoperator>> (PStream &in, PP< VPLPreprocessedLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VPLPreprocessedLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VPLPreprocessedLearner2 &o)
PStreamoperator>> (PStream &in, VPLPreprocessedLearner2 &o)
PStreamoperator>> (PStream &in, VPLPreprocessedLearner2 *&o)
PStreamoperator<< (PStream &out, const VPLPreprocessedLearner2 &o)
PStreamoperator>> (PStream &in, PP< VPLPreprocessedLearner2 > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VPLPreprocessedLearner2 > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VPLProcessor &o)
PStreamoperator>> (PStream &in, VPLProcessor &o)
PStreamoperator>> (PStream &in, VPLProcessor *&o)
PStreamoperator<< (PStream &out, const VPLProcessor &o)
PStreamoperator>> (PStream &in, PP< VPLProcessor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VPLProcessor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CartesianProductOracle &o)
PStreamoperator>> (PStream &in, CartesianProductOracle &o)
PStreamoperator>> (PStream &in, CartesianProductOracle *&o)
PStreamoperator<< (PStream &out, const CartesianProductOracle &o)
PStreamoperator>> (PStream &in, PP< CartesianProductOracle > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CartesianProductOracle > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EarlyStoppingOracle &o)
PStreamoperator>> (PStream &in, EarlyStoppingOracle &o)
PStreamoperator>> (PStream &in, EarlyStoppingOracle *&o)
PStreamoperator<< (PStream &out, const EarlyStoppingOracle &o)
PStreamoperator>> (PStream &in, PP< EarlyStoppingOracle > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EarlyStoppingOracle > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExplicitListOracle &o)
PStreamoperator>> (PStream &in, ExplicitListOracle &o)
PStreamoperator>> (PStream &in, ExplicitListOracle *&o)
PStreamoperator<< (PStream &out, const ExplicitListOracle &o)
PStreamoperator>> (PStream &in, PP< ExplicitListOracle > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExplicitListOracle > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HyperCommand &o)
PStreamoperator>> (PStream &in, HyperCommand &o)
PStreamoperator>> (PStream &in, HyperCommand *&o)
PStreamoperator<< (PStream &out, const HyperCommand &o)
PStreamoperator>> (PStream &in, PP< HyperCommand > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HyperCommand > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HyperLearner &o)
PStreamoperator>> (PStream &in, HyperLearner &o)
PStreamoperator>> (PStream &in, HyperLearner *&o)
PStreamoperator<< (PStream &out, const HyperLearner &o)
PStreamoperator>> (PStream &in, PP< HyperLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HyperLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HyperOptimize &o)
PStreamoperator>> (PStream &in, HyperOptimize &o)
PStreamoperator>> (PStream &in, HyperOptimize *&o)
PStreamoperator<< (PStream &out, const HyperOptimize &o)
PStreamoperator>> (PStream &in, PP< HyperOptimize > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HyperOptimize > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HyperRetrain &o)
PStreamoperator>> (PStream &in, HyperRetrain &o)
PStreamoperator>> (PStream &in, HyperRetrain *&o)
PStreamoperator<< (PStream &out, const HyperRetrain &o)
PStreamoperator>> (PStream &in, PP< HyperRetrain > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HyperRetrain > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HyperSetOption &o)
PStreamoperator>> (PStream &in, HyperSetOption &o)
PStreamoperator>> (PStream &in, HyperSetOption *&o)
PStreamoperator<< (PStream &out, const HyperSetOption &o)
PStreamoperator>> (PStream &in, PP< HyperSetOption > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HyperSetOption > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OptimizeOptionOracle &o)
PStreamoperator>> (PStream &in, OptimizeOptionOracle &o)
PStreamoperator>> (PStream &in, OptimizeOptionOracle *&o)
PStreamoperator<< (PStream &out, const OptimizeOptionOracle &o)
PStreamoperator>> (PStream &in, PP< OptimizeOptionOracle > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OptimizeOptionOracle > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OptionsOracle &o)
PStreamoperator>> (PStream &in, OptionsOracle &o)
PStreamoperator>> (PStream &in, OptionsOracle *&o)
PStreamoperator<< (PStream &out, const OptionsOracle &o)
PStreamoperator>> (PStream &in, PP< OptionsOracle > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OptionsOracle > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OracleObjectGenerator &o)
PStreamoperator>> (PStream &in, OracleObjectGenerator &o)
PStreamoperator>> (PStream &in, OracleObjectGenerator *&o)
PStreamoperator<< (PStream &out, const OracleObjectGenerator &o)
PStreamoperator>> (PStream &in, PP< OracleObjectGenerator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OracleObjectGenerator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StepwiseSelectionOracle &o)
PStreamoperator>> (PStream &in, StepwiseSelectionOracle &o)
PStreamoperator>> (PStream &in, StepwiseSelectionOracle *&o)
PStreamoperator<< (PStream &out, const StepwiseSelectionOracle &o)
PStreamoperator>> (PStream &in, PP< StepwiseSelectionOracle > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StepwiseSelectionOracle > *opt, PLearnDiff *diffs)
VMat loadToVMat (string file, string name, int window, int n_examples)
bool lessPair (pair< int, float > &p1, pair< int, float > &p2)
void samePos (ProbabilitySparseMatrix &m1, ProbabilitySparseMatrix &m2, string m1name, string m2name)
void check_prob (ProbabilitySparseMatrix &pYX, string Yname, string Xname)
void check_prob (Set Y, const map< int, real > &pYx)
void update (ProbabilitySparseMatrix &pYX, ProbabilitySparseMatrix &nYX)
void updateAndClearCounts (ProbabilitySparseMatrix &pYX, ProbabilitySparseMatrix &nYX)
ostream & operator<< (ostream &out, ProbabilitySparseMatrix &pyx)
void print (ostream &out, ProbabilitySparseMatrix &pyx, Set Y, Set X)
void print (ostream &out, RowMapSparseMatrix< real > &m)
void print (ostream &out, const map< int, real > &vec, int size)
void print (ostream &out, const map< int, real > &vec)
void print (ostream &out, const map< int, real > &vec, Set V)
PStreamoperator<< (PStream &out, const PPointableSet &pp_set)
PStreamoperator>> (PStream &in, PPointableSet &pp_set)
PPointableSetnewSet ()
void merge (Set a, Set b, Set res)
void difference (Set a, Set b, Set res)
void intersection (Set a, Set b, Set res)
ostream & operator<< (ostream &out, Set s)
string trimWord (string word)
bool isLetter (char c)
bool isDigit (char c)
bool isAlpha (char c)
bool isLegalPunct (char c)
string stemWord (string &word)
string stemWord (string &word, int wn_pos)
void removeDelimiters (string &s, string delim, string replace)
bool startsWith (string &base, string s)
void replaceChars (string &str, string char_to_replace, string replacing_char)
ObjecttoObjectPtr (const AdaBoost &o)
PStreamoperator>> (PStream &in, AdaBoost &o)
PStreamoperator>> (PStream &in, AdaBoost *&o)
PStreamoperator<< (PStream &out, const AdaBoost &o)
PStreamoperator>> (PStream &in, PP< AdaBoost > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AdaBoost > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BaggingLearner &o)
PStreamoperator>> (PStream &in, BaggingLearner &o)
PStreamoperator>> (PStream &in, BaggingLearner *&o)
PStreamoperator<< (PStream &out, const BaggingLearner &o)
PStreamoperator>> (PStream &in, PP< BaggingLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BaggingLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CompareLearner &o)
PStreamoperator>> (PStream &in, CompareLearner &o)
PStreamoperator>> (PStream &in, CompareLearner *&o)
PStreamoperator<< (PStream &out, const CompareLearner &o)
PStreamoperator>> (PStream &in, PP< CompareLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CompareLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MultiClassAdaBoost &o)
PStreamoperator>> (PStream &in, MultiClassAdaBoost &o)
PStreamoperator>> (PStream &in, MultiClassAdaBoost *&o)
PStreamoperator<< (PStream &out, const MultiClassAdaBoost &o)
PStreamoperator>> (PStream &in, PP< MultiClassAdaBoost > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MultiClassAdaBoost > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Experiment &o)
PStreamoperator>> (PStream &in, Experiment &o)
PStreamoperator>> (PStream &in, Experiment *&o)
PStreamoperator<< (PStream &out, const Experiment &o)
PStreamoperator>> (PStream &in, PP< Experiment > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Experiment > *opt, PLearnDiff *diffs)
void DX_write_2D_fields (ostream &out, const string &basename, TVec< Mat > fields, real x0, real y0, real deltax, real deltay, TVec< string > fieldnames=TVec< string >())
void DX_write_2D_fields (ostream &out, const string &basename, Vec X, Vec Y, TVec< Mat > fields)
TVec< MatcomputeOutputFields (PP< PLearner > learner, Vec X, Vec Y)
TVec< MatcomputeOutputFields (PP< PLearner > learner, int nx, int ny, real x0, real y0, real deltax, real deltay)
TVec< MatcomputeOutputFieldsAutoRange (PP< PLearner > learner, VMat dataset, int nx, int ny, real &x0, real &y0, real &deltax, real &deltay, real extraspace=.10)
void computeXYPositions (VMat dataset, int nx, int ny, Vec &X, Vec &Y, real extraspace=.10)
void DX_create_dataset_outputs_file (const string &filename, PP< PLearner > learner, VMat dataset)
 Will write a file containing a field with the dataset positions "dset" field will be input -> target, outputs.
void DX_create_grid_outputs_file (const string &filename, PP< PLearner > learner, VMat dataset, int nx, int ny, bool include_datapoint_grid=false, real xmin=MISSING_VALUE, real xmax=MISSING_VALUE, real ymin=MISSING_VALUE, real ymax=MISSING_VALUE, real extraspace=.10)
 The "outputs" field will contain sample-grid inputs -> outputs Where the sample grid is made of a regular grid of nx.ny points (in the range [xmin, xmax] x [ymin, ymax]) xmin, xmax, ymin and ymax may be left to MISSING_VALUE, in which case an automatic range will be determined from the range of the points in the given dataset extended by extraspace (ex: .10 == 10%).
ObjecttoObjectPtr (const GenerateDecisionPlot &o)
PStreamoperator>> (PStream &in, GenerateDecisionPlot &o)
PStreamoperator>> (PStream &in, GenerateDecisionPlot *&o)
PStreamoperator<< (PStream &out, const GenerateDecisionPlot &o)
PStreamoperator>> (PStream &in, PP< GenerateDecisionPlot > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GenerateDecisionPlot > *opt, PLearnDiff *diffs)
TVec< string > addprepostfix (const string &prefix, const TVec< string > &names, const string &postfix)
template<class T >
TVec< T > operator& (const T &x, const TVec< T > &v)
ObjecttoObjectPtr (const PTester &o)
PStreamoperator>> (PStream &in, PTester &o)
PStreamoperator>> (PStream &in, PTester *&o)
PStreamoperator<< (PStream &out, const PTester &o)
PStreamoperator>> (PStream &in, PP< PTester > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PTester > *opt, PLearnDiff *diffs)
real color (int colornum, real lightness)
ObjecttoObjectPtr (const Grapher &o)
PStreamoperator>> (PStream &in, Grapher &o)
PStreamoperator>> (PStream &in, Grapher *&o)
PStreamoperator<< (PStream &out, const Grapher &o)
PStreamoperator>> (PStream &in, PP< Grapher > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Grapher > *opt, PLearnDiff *diffs)
Mat compute_learner_outputs (PP< PLearner > learner, VMat inputs)
void determine_grid_for_dataset (VMat dataset, int nx, int ny, real &x0, real &y0, real &deltax, real &deltay, real extraspace)
double determine_density_integral_from_log_densities_on_grid (Vec log_densities, real deltax, real deltay)
Mat compute_learner_outputs_on_grid (PP< PLearner > learner, int nx, int ny, real x0, real y0, real deltax, real deltay)
 Returns a nx*ny x learner->outputsize() matrix of outputs corresponding to the nx*ny grid points.
void DX_write_2D_data (ostream &out, const string &basename, Mat data)
 considers data to have 2d input (first 2 columns of data)
void DX_write_2D_data_for_grid (ostream &out, const string &basename, int nx, int ny, real x0, real y0, real deltax, real deltay, Mat data)
 data must have nx*ny rows and must corresponds to values associated with the 2D positions of the grid (typically learner outputs on that grid)
void DX_save_2D_data (const string &filename, const string &basename, Mat data)
 considers data to have 2d input (first 2 columns of data)
void DX_save_2D_data_for_grid (const string &filename, const string &basename, int nx, int ny, real x0, real y0, real deltax, real deltay, Mat data)
 data must have nx*ny rows and must corresponds to values associated with the 2D positions of the grid (typically learner outputs on that grid)
ObjecttoObjectPtr (const PrecomputedProcessedLearner &o)
PStreamoperator>> (PStream &in, PrecomputedProcessedLearner &o)
PStreamoperator>> (PStream &in, PrecomputedProcessedLearner *&o)
PStreamoperator<< (PStream &out, const PrecomputedProcessedLearner &o)
PStreamoperator>> (PStream &in, PP< PrecomputedProcessedLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PrecomputedProcessedLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VariableSelectionWithDirectedGradientDescent &o)
PStreamoperator>> (PStream &in, VariableSelectionWithDirectedGradientDescent &o)
PStreamoperator>> (PStream &in, VariableSelectionWithDirectedGradientDescent *&o)
PStreamoperator<< (PStream &out, const VariableSelectionWithDirectedGradientDescent &o)
PStreamoperator>> (PStream &in, PP< VariableSelectionWithDirectedGradientDescent > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VariableSelectionWithDirectedGradientDescent > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BallTreeNearestNeighbors &o)
PStreamoperator>> (PStream &in, BallTreeNearestNeighbors &o)
PStreamoperator>> (PStream &in, BallTreeNearestNeighbors *&o)
PStreamoperator<< (PStream &out, const BallTreeNearestNeighbors &o)
PStreamoperator>> (PStream &in, PP< BallTreeNearestNeighbors > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BallTreeNearestNeighbors > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BinaryBallTree &o)
PStreamoperator>> (PStream &in, BinaryBallTree &o)
PStreamoperator>> (PStream &in, BinaryBallTree *&o)
PStreamoperator<< (PStream &out, const BinaryBallTree &o)
PStreamoperator>> (PStream &in, PP< BinaryBallTree > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryBallTree > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ExhaustiveNearestNeighbors &o)
PStreamoperator>> (PStream &in, ExhaustiveNearestNeighbors &o)
PStreamoperator>> (PStream &in, ExhaustiveNearestNeighbors *&o)
PStreamoperator<< (PStream &out, const ExhaustiveNearestNeighbors &o)
PStreamoperator>> (PStream &in, PP< ExhaustiveNearestNeighbors > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ExhaustiveNearestNeighbors > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GenericNearestNeighbors &o)
PStreamoperator>> (PStream &in, GenericNearestNeighbors &o)
PStreamoperator>> (PStream &in, GenericNearestNeighbors *&o)
PStreamoperator<< (PStream &out, const GenericNearestNeighbors &o)
PStreamoperator>> (PStream &in, PP< GenericNearestNeighbors > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GenericNearestNeighbors > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ArgmaxModule &o)
PStreamoperator>> (PStream &in, ArgmaxModule &o)
PStreamoperator>> (PStream &in, ArgmaxModule *&o)
PStreamoperator<< (PStream &out, const ArgmaxModule &o)
PStreamoperator>> (PStream &in, PP< ArgmaxModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ArgmaxModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ArgmaxModule) template<> class TypeTraits< ArgmaxModule >
ObjecttoObjectPtr (const BackConvolution2DModule &o)
PStreamoperator>> (PStream &in, BackConvolution2DModule &o)
PStreamoperator>> (PStream &in, BackConvolution2DModule *&o)
PStreamoperator<< (PStream &out, const BackConvolution2DModule &o)
PStreamoperator>> (PStream &in, PP< BackConvolution2DModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BackConvolution2DModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (BackConvolution2DModule) template<> class TypeTraits< BackConvolution2DModule >
ObjecttoObjectPtr (const BinarizeModule &o)
PStreamoperator>> (PStream &in, BinarizeModule &o)
PStreamoperator>> (PStream &in, BinarizeModule *&o)
PStreamoperator<< (PStream &out, const BinarizeModule &o)
PStreamoperator>> (PStream &in, PP< BinarizeModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinarizeModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (BinarizeModule) template<> class TypeTraits< BinarizeModule >
ObjecttoObjectPtr (const ClassErrorCostModule &o)
PStreamoperator>> (PStream &in, ClassErrorCostModule &o)
PStreamoperator>> (PStream &in, ClassErrorCostModule *&o)
PStreamoperator<< (PStream &out, const ClassErrorCostModule &o)
PStreamoperator>> (PStream &in, PP< ClassErrorCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ClassErrorCostModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (ClassErrorCostModule) template<> class TypeTraits< ClassErrorCostModule >
ObjecttoObjectPtr (const CombiningCostsModule &o)
PStreamoperator>> (PStream &in, CombiningCostsModule &o)
PStreamoperator>> (PStream &in, CombiningCostsModule *&o)
PStreamoperator<< (PStream &out, const CombiningCostsModule &o)
PStreamoperator>> (PStream &in, PP< CombiningCostsModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CombiningCostsModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (CombiningCostsModule) template<> class TypeTraits< CombiningCostsModule >
ObjecttoObjectPtr (const Convolution2DModule &o)
PStreamoperator>> (PStream &in, Convolution2DModule &o)
PStreamoperator>> (PStream &in, Convolution2DModule *&o)
PStreamoperator<< (PStream &out, const Convolution2DModule &o)
PStreamoperator>> (PStream &in, PP< Convolution2DModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Convolution2DModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (Convolution2DModule) template<> class TypeTraits< Convolution2DModule >
ObjecttoObjectPtr (const CostModule &o)
PStreamoperator>> (PStream &in, CostModule &o)
PStreamoperator>> (PStream &in, CostModule *&o)
PStreamoperator<< (PStream &out, const CostModule &o)
PStreamoperator>> (PStream &in, PP< CostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CostModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (CostModule) template<> class TypeTraits< CostModule >
ObjecttoObjectPtr (const CrossEntropyCostModule &o)
PStreamoperator>> (PStream &in, CrossEntropyCostModule &o)
PStreamoperator>> (PStream &in, CrossEntropyCostModule *&o)
PStreamoperator<< (PStream &out, const CrossEntropyCostModule &o)
PStreamoperator>> (PStream &in, PP< CrossEntropyCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CrossEntropyCostModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (CrossEntropyCostModule) template<> class TypeTraits< CrossEntropyCostModule >
ObjecttoObjectPtr (const DeepBeliefNet &o)
PStreamoperator>> (PStream &in, DeepBeliefNet &o)
PStreamoperator>> (PStream &in, DeepBeliefNet *&o)
PStreamoperator<< (PStream &out, const DeepBeliefNet &o)
PStreamoperator>> (PStream &in, PP< DeepBeliefNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DeepBeliefNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianDBNClassification &o)
PStreamoperator>> (PStream &in, GaussianDBNClassification &o)
PStreamoperator>> (PStream &in, GaussianDBNClassification *&o)
PStreamoperator<< (PStream &out, const GaussianDBNClassification &o)
PStreamoperator>> (PStream &in, PP< GaussianDBNClassification > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianDBNClassification > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussianDBNRegression &o)
PStreamoperator>> (PStream &in, GaussianDBNRegression &o)
PStreamoperator>> (PStream &in, GaussianDBNRegression *&o)
PStreamoperator<< (PStream &out, const GaussianDBNRegression &o)
PStreamoperator>> (PStream &in, PP< GaussianDBNRegression > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianDBNRegression > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussPartSupervisedDBN &o)
PStreamoperator>> (PStream &in, GaussPartSupervisedDBN &o)
PStreamoperator>> (PStream &in, GaussPartSupervisedDBN *&o)
PStreamoperator<< (PStream &out, const GaussPartSupervisedDBN &o)
PStreamoperator>> (PStream &in, PP< GaussPartSupervisedDBN > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussPartSupervisedDBN > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const HintonDeepBeliefNet &o)
PStreamoperator>> (PStream &in, HintonDeepBeliefNet &o)
PStreamoperator>> (PStream &in, HintonDeepBeliefNet *&o)
PStreamoperator<< (PStream &out, const HintonDeepBeliefNet &o)
PStreamoperator>> (PStream &in, PP< HintonDeepBeliefNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, HintonDeepBeliefNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NLLErrModule &o)
PStreamoperator>> (PStream &in, NLLErrModule &o)
PStreamoperator>> (PStream &in, NLLErrModule *&o)
PStreamoperator<< (PStream &out, const NLLErrModule &o)
PStreamoperator>> (PStream &in, PP< NLLErrModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NLLErrModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PartSupervisedDBN &o)
PStreamoperator>> (PStream &in, PartSupervisedDBN &o)
PStreamoperator>> (PStream &in, PartSupervisedDBN *&o)
PStreamoperator<< (PStream &out, const PartSupervisedDBN &o)
PStreamoperator>> (PStream &in, PP< PartSupervisedDBN > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PartSupervisedDBN > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMBinomialLayer &o)
PStreamoperator>> (PStream &in, RBMBinomialLayer &o)
PStreamoperator>> (PStream &in, RBMBinomialLayer *&o)
PStreamoperator<< (PStream &out, const RBMBinomialLayer &o)
PStreamoperator>> (PStream &in, PP< RBMBinomialLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMBinomialLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMBinomialLayer) template<> class TypeTraits< RBMBinomialLayer >
ObjecttoObjectPtr (const RBMConv2DLLParameters &o)
PStreamoperator>> (PStream &in, RBMConv2DLLParameters &o)
PStreamoperator>> (PStream &in, RBMConv2DLLParameters *&o)
PStreamoperator<< (PStream &out, const RBMConv2DLLParameters &o)
PStreamoperator>> (PStream &in, PP< RBMConv2DLLParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMConv2DLLParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMGaussianLayer &o)
PStreamoperator>> (PStream &in, RBMGaussianLayer &o)
PStreamoperator>> (PStream &in, RBMGaussianLayer *&o)
PStreamoperator<< (PStream &out, const RBMGaussianLayer &o)
PStreamoperator>> (PStream &in, PP< RBMGaussianLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMGaussianLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMGaussianLayer) template<> class TypeTraits< RBMGaussianLayer >
ObjecttoObjectPtr (const RBMGenericParameters &o)
PStreamoperator>> (PStream &in, RBMGenericParameters &o)
PStreamoperator>> (PStream &in, RBMGenericParameters *&o)
PStreamoperator<< (PStream &out, const RBMGenericParameters &o)
PStreamoperator>> (PStream &in, PP< RBMGenericParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMGenericParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMJointGenericParameters &o)
PStreamoperator>> (PStream &in, RBMJointGenericParameters &o)
PStreamoperator>> (PStream &in, RBMJointGenericParameters *&o)
PStreamoperator<< (PStream &out, const RBMJointGenericParameters &o)
PStreamoperator>> (PStream &in, PP< RBMJointGenericParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMJointGenericParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMJointLLParameters &o)
PStreamoperator>> (PStream &in, RBMJointLLParameters &o)
PStreamoperator>> (PStream &in, RBMJointLLParameters *&o)
PStreamoperator<< (PStream &out, const RBMJointLLParameters &o)
PStreamoperator>> (PStream &in, PP< RBMJointLLParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMJointLLParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMLayer &o)
PStreamoperator>> (PStream &in, RBMLayer &o)
PStreamoperator>> (PStream &in, RBMLayer *&o)
PStreamoperator<< (PStream &out, const RBMLayer &o)
PStreamoperator>> (PStream &in, PP< RBMLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMLayer > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMLLParameters &o)
PStreamoperator>> (PStream &in, RBMLLParameters &o)
PStreamoperator>> (PStream &in, RBMLLParameters *&o)
PStreamoperator<< (PStream &out, const RBMLLParameters &o)
PStreamoperator>> (PStream &in, PP< RBMLLParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMLLParameters > *opt, PLearnDiff *diffs)
double cube (double x)
ObjecttoObjectPtr (const RBMLQParameters &o)
PStreamoperator>> (PStream &in, RBMLQParameters &o)
PStreamoperator>> (PStream &in, RBMLQParameters *&o)
PStreamoperator<< (PStream &out, const RBMLQParameters &o)
PStreamoperator>> (PStream &in, PP< RBMLQParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMLQParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMMixedLayer &o)
PStreamoperator>> (PStream &in, RBMMixedLayer &o)
PStreamoperator>> (PStream &in, RBMMixedLayer *&o)
PStreamoperator<< (PStream &out, const RBMMixedLayer &o)
PStreamoperator>> (PStream &in, PP< RBMMixedLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMixedLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMMixedLayer) template<> class TypeTraits< RBMMixedLayer >
ObjecttoObjectPtr (const RBMMultinomialLayer &o)
PStreamoperator>> (PStream &in, RBMMultinomialLayer &o)
PStreamoperator>> (PStream &in, RBMMultinomialLayer *&o)
PStreamoperator<< (PStream &out, const RBMMultinomialLayer &o)
PStreamoperator>> (PStream &in, PP< RBMMultinomialLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMultinomialLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMMultinomialLayer) template<> class TypeTraits< RBMMultinomialLayer >
ObjecttoObjectPtr (const RBMParameters &o)
PStreamoperator>> (PStream &in, RBMParameters &o)
PStreamoperator>> (PStream &in, RBMParameters *&o)
PStreamoperator<< (PStream &out, const RBMParameters &o)
PStreamoperator>> (PStream &in, PP< RBMParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMQLParameters &o)
PStreamoperator>> (PStream &in, RBMQLParameters &o)
PStreamoperator>> (PStream &in, RBMQLParameters *&o)
PStreamoperator<< (PStream &out, const RBMQLParameters &o)
PStreamoperator>> (PStream &in, PP< RBMQLParameters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMQLParameters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMTruncExpLayer &o)
PStreamoperator>> (PStream &in, RBMTruncExpLayer &o)
PStreamoperator>> (PStream &in, RBMTruncExpLayer *&o)
PStreamoperator<< (PStream &out, const RBMTruncExpLayer &o)
PStreamoperator>> (PStream &in, PP< RBMTruncExpLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMTruncExpLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMTruncExpLayer) template<> class TypeTraits< RBMTruncExpLayer >
ObjecttoObjectPtr (const SquaredErrModule &o)
PStreamoperator>> (PStream &in, SquaredErrModule &o)
PStreamoperator>> (PStream &in, SquaredErrModule *&o)
PStreamoperator<< (PStream &out, const SquaredErrModule &o)
PStreamoperator>> (PStream &in, PP< SquaredErrModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SquaredErrModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedModulesLearner &o)
PStreamoperator>> (PStream &in, StackedModulesLearner &o)
PStreamoperator>> (PStream &in, StackedModulesLearner *&o)
PStreamoperator<< (PStream &out, const StackedModulesLearner &o)
PStreamoperator>> (PStream &in, PP< StackedModulesLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedModulesLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedModulesModule &o)
PStreamoperator>> (PStream &in, StackedModulesModule &o)
PStreamoperator>> (PStream &in, StackedModulesModule *&o)
PStreamoperator<< (PStream &out, const StackedModulesModule &o)
PStreamoperator>> (PStream &in, PP< StackedModulesModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedModulesModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SupervisedDBN &o)
PStreamoperator>> (PStream &in, SupervisedDBN &o)
PStreamoperator>> (PStream &in, SupervisedDBN *&o)
PStreamoperator<< (PStream &out, const SupervisedDBN &o)
PStreamoperator>> (PStream &in, PP< SupervisedDBN > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SupervisedDBN > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UndirectedSoftmaxModule &o)
PStreamoperator>> (PStream &in, UndirectedSoftmaxModule &o)
PStreamoperator>> (PStream &in, UndirectedSoftmaxModule *&o)
PStreamoperator<< (PStream &out, const UndirectedSoftmaxModule &o)
PStreamoperator>> (PStream &in, PP< UndirectedSoftmaxModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UndirectedSoftmaxModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UnfrozenDeepBeliefNet &o)
PStreamoperator>> (PStream &in, UnfrozenDeepBeliefNet &o)
PStreamoperator>> (PStream &in, UnfrozenDeepBeliefNet *&o)
PStreamoperator<< (PStream &out, const UnfrozenDeepBeliefNet &o)
PStreamoperator>> (PStream &in, PP< UnfrozenDeepBeliefNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UnfrozenDeepBeliefNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KLp0p1RBMModule &o)
PStreamoperator>> (PStream &in, KLp0p1RBMModule &o)
PStreamoperator>> (PStream &in, KLp0p1RBMModule *&o)
PStreamoperator<< (PStream &out, const KLp0p1RBMModule &o)
PStreamoperator>> (PStream &in, PP< KLp0p1RBMModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KLp0p1RBMModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SemiSupervisedDBN &o)
PStreamoperator>> (PStream &in, SemiSupervisedDBN &o)
PStreamoperator>> (PStream &in, SemiSupervisedDBN *&o)
PStreamoperator<< (PStream &out, const SemiSupervisedDBN &o)
PStreamoperator>> (PStream &in, PP< SemiSupervisedDBN > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SemiSupervisedDBN > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SubsamplingDBN &o)
PStreamoperator>> (PStream &in, SubsamplingDBN &o)
PStreamoperator>> (PStream &in, SubsamplingDBN *&o)
PStreamoperator<< (PStream &out, const SubsamplingDBN &o)
PStreamoperator>> (PStream &in, PP< SubsamplingDBN > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SubsamplingDBN > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TreeDBNModule &o)
PStreamoperator>> (PStream &in, TreeDBNModule &o)
PStreamoperator>> (PStream &in, TreeDBNModule *&o)
PStreamoperator<< (PStream &out, const TreeDBNModule &o)
PStreamoperator>> (PStream &in, PP< TreeDBNModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TreeDBNModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ForwardModule &o)
PStreamoperator>> (PStream &in, ForwardModule &o)
PStreamoperator>> (PStream &in, ForwardModule *&o)
PStreamoperator<< (PStream &out, const ForwardModule &o)
PStreamoperator>> (PStream &in, PP< ForwardModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ForwardModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GradNNetLayerModule &o)
PStreamoperator>> (PStream &in, GradNNetLayerModule &o)
PStreamoperator>> (PStream &in, GradNNetLayerModule *&o)
PStreamoperator<< (PStream &out, const GradNNetLayerModule &o)
PStreamoperator>> (PStream &in, PP< GradNNetLayerModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GradNNetLayerModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IdentityModule &o)
PStreamoperator>> (PStream &in, IdentityModule &o)
PStreamoperator>> (PStream &in, IdentityModule *&o)
PStreamoperator<< (PStream &out, const IdentityModule &o)
PStreamoperator>> (PStream &in, PP< IdentityModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IdentityModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const InferenceRBM &o)
PStreamoperator>> (PStream &in, InferenceRBM &o)
PStreamoperator>> (PStream &in, InferenceRBM *&o)
PStreamoperator<< (PStream &out, const InferenceRBM &o)
PStreamoperator>> (PStream &in, PP< InferenceRBM > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, InferenceRBM > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LayerCostModule &o)
PStreamoperator>> (PStream &in, LayerCostModule &o)
PStreamoperator>> (PStream &in, LayerCostModule *&o)
PStreamoperator<< (PStream &out, const LayerCostModule &o)
PStreamoperator>> (PStream &in, PP< LayerCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LayerCostModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LinearCombinationModule &o)
PStreamoperator>> (PStream &in, LinearCombinationModule &o)
PStreamoperator>> (PStream &in, LinearCombinationModule *&o)
PStreamoperator<< (PStream &out, const LinearCombinationModule &o)
PStreamoperator>> (PStream &in, PP< LinearCombinationModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LinearCombinationModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LinearFilterModule &o)
PStreamoperator>> (PStream &in, LinearFilterModule &o)
PStreamoperator>> (PStream &in, LinearFilterModule *&o)
PStreamoperator<< (PStream &out, const LinearFilterModule &o)
PStreamoperator>> (PStream &in, PP< LinearFilterModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LinearFilterModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LogaddOnBagsModule &o)
PStreamoperator>> (PStream &in, LogaddOnBagsModule &o)
PStreamoperator>> (PStream &in, LogaddOnBagsModule *&o)
PStreamoperator<< (PStream &out, const LogaddOnBagsModule &o)
PStreamoperator>> (PStream &in, PP< LogaddOnBagsModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LogaddOnBagsModule > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (LogaddOnBagsModule) template<> class TypeTraits< LogaddOnBagsModule >
ObjecttoObjectPtr (const MatrixModule &o)
PStreamoperator>> (PStream &in, MatrixModule &o)
PStreamoperator>> (PStream &in, MatrixModule *&o)
PStreamoperator<< (PStream &out, const MatrixModule &o)
PStreamoperator>> (PStream &in, PP< MatrixModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MatrixModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MaxSubsampling2DModule &o)
PStreamoperator>> (PStream &in, MaxSubsampling2DModule &o)
PStreamoperator>> (PStream &in, MaxSubsampling2DModule *&o)
PStreamoperator<< (PStream &out, const MaxSubsampling2DModule &o)
PStreamoperator>> (PStream &in, PP< MaxSubsampling2DModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MaxSubsampling2DModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ModuleLearner &o)
PStreamoperator>> (PStream &in, ModuleLearner &o)
PStreamoperator>> (PStream &in, ModuleLearner *&o)
PStreamoperator<< (PStream &out, const ModuleLearner &o)
PStreamoperator>> (PStream &in, PP< ModuleLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ModuleLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ModulesLearner &o)
PStreamoperator>> (PStream &in, ModulesLearner &o)
PStreamoperator>> (PStream &in, ModulesLearner *&o)
PStreamoperator<< (PStream &out, const ModulesLearner &o)
PStreamoperator>> (PStream &in, PP< ModulesLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ModulesLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ModuleStackModule &o)
PStreamoperator>> (PStream &in, ModuleStackModule &o)
PStreamoperator>> (PStream &in, ModuleStackModule *&o)
PStreamoperator<< (PStream &out, const ModuleStackModule &o)
PStreamoperator>> (PStream &in, PP< ModuleStackModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ModuleStackModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ModuleTester &o)
PStreamoperator>> (PStream &in, ModuleTester &o)
PStreamoperator>> (PStream &in, ModuleTester *&o)
PStreamoperator<< (PStream &out, const ModuleTester &o)
PStreamoperator>> (PStream &in, PP< ModuleTester > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ModuleTester > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NetworkConnection &o)
PStreamoperator>> (PStream &in, NetworkConnection &o)
PStreamoperator>> (PStream &in, NetworkConnection *&o)
PStreamoperator<< (PStream &out, const NetworkConnection &o)
PStreamoperator>> (PStream &in, PP< NetworkConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NetworkConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NetworkModule &o)
PStreamoperator>> (PStream &in, NetworkModule &o)
PStreamoperator>> (PStream &in, NetworkModule *&o)
PStreamoperator<< (PStream &out, const NetworkModule &o)
PStreamoperator>> (PStream &in, PP< NetworkModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NetworkModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NLLCostModule &o)
PStreamoperator>> (PStream &in, NLLCostModule &o)
PStreamoperator>> (PStream &in, NLLCostModule *&o)
PStreamoperator<< (PStream &out, const NLLCostModule &o)
PStreamoperator>> (PStream &in, PP< NLLCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NLLCostModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NullModule &o)
PStreamoperator>> (PStream &in, NullModule &o)
PStreamoperator>> (PStream &in, NullModule *&o)
PStreamoperator<< (PStream &out, const NullModule &o)
PStreamoperator>> (PStream &in, PP< NullModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NullModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OnBagsModule &o)
PStreamoperator>> (PStream &in, OnBagsModule &o)
PStreamoperator>> (PStream &in, OnBagsModule *&o)
PStreamoperator<< (PStream &out, const OnBagsModule &o)
PStreamoperator>> (PStream &in, PP< OnBagsModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OnBagsModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const OnlineLearningModule &o)
PStreamoperator>> (PStream &in, OnlineLearningModule &o)
PStreamoperator>> (PStream &in, OnlineLearningModule *&o)
PStreamoperator<< (PStream &out, const OnlineLearningModule &o)
PStreamoperator>> (PStream &in, PP< OnlineLearningModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, OnlineLearningModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ProcessInputCostModule &o)
PStreamoperator>> (PStream &in, ProcessInputCostModule &o)
PStreamoperator>> (PStream &in, ProcessInputCostModule *&o)
PStreamoperator<< (PStream &out, const ProcessInputCostModule &o)
PStreamoperator>> (PStream &in, PP< ProcessInputCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ProcessInputCostModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMClassificationModule &o)
PStreamoperator>> (PStream &in, RBMClassificationModule &o)
PStreamoperator>> (PStream &in, RBMClassificationModule *&o)
PStreamoperator<< (PStream &out, const RBMClassificationModule &o)
PStreamoperator>> (PStream &in, PP< RBMClassificationModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMClassificationModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMConnection &o)
PStreamoperator>> (PStream &in, RBMConnection &o)
PStreamoperator>> (PStream &in, RBMConnection *&o)
PStreamoperator<< (PStream &out, const RBMConnection &o)
PStreamoperator>> (PStream &in, PP< RBMConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMConv2DConnection &o)
PStreamoperator>> (PStream &in, RBMConv2DConnection &o)
PStreamoperator>> (PStream &in, RBMConv2DConnection *&o)
PStreamoperator<< (PStream &out, const RBMConv2DConnection &o)
PStreamoperator>> (PStream &in, PP< RBMConv2DConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMConv2DConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMDiagonalMatrixConnection &o)
PStreamoperator>> (PStream &in, RBMDiagonalMatrixConnection &o)
PStreamoperator>> (PStream &in, RBMDiagonalMatrixConnection *&o)
PStreamoperator<< (PStream &out, const RBMDiagonalMatrixConnection &o)
PStreamoperator>> (PStream &in, PP< RBMDiagonalMatrixConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMDiagonalMatrixConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMLateralBinomialLayer &o)
PStreamoperator>> (PStream &in, RBMLateralBinomialLayer &o)
PStreamoperator>> (PStream &in, RBMLateralBinomialLayer *&o)
PStreamoperator<< (PStream &out, const RBMLateralBinomialLayer &o)
PStreamoperator>> (PStream &in, PP< RBMLateralBinomialLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMLateralBinomialLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMLateralBinomialLayer) template<> class TypeTraits< RBMLateralBinomialLayer >
template<class T >
void softmax (const TMat< T > &x, const TMat< T > &y)
template<class T >
logadd (const TMat< T > &mat)
int multinomial_sample (const PP< PRandom > &rg, const Mat &distribution)
template<class T >
void fill_one_hot (const TMat< T > &mat, int hotpos, T coldvalue, T hotvalue)
ObjecttoObjectPtr (const RBMLocalMultinomialLayer &o)
PStreamoperator>> (PStream &in, RBMLocalMultinomialLayer &o)
PStreamoperator>> (PStream &in, RBMLocalMultinomialLayer *&o)
PStreamoperator<< (PStream &out, const RBMLocalMultinomialLayer &o)
PStreamoperator>> (PStream &in, PP< RBMLocalMultinomialLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMLocalMultinomialLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMLocalMultinomialLayer) template<> class TypeTraits< RBMLocalMultinomialLayer >
ObjecttoObjectPtr (const RBMMatrixConnection &o)
PStreamoperator>> (PStream &in, RBMMatrixConnection &o)
PStreamoperator>> (PStream &in, RBMMatrixConnection *&o)
PStreamoperator<< (PStream &out, const RBMMatrixConnection &o)
PStreamoperator>> (PStream &in, PP< RBMMatrixConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMatrixConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMMatrixConnectionNatGrad &o)
PStreamoperator>> (PStream &in, RBMMatrixConnectionNatGrad &o)
PStreamoperator>> (PStream &in, RBMMatrixConnectionNatGrad *&o)
PStreamoperator<< (PStream &out, const RBMMatrixConnectionNatGrad &o)
PStreamoperator>> (PStream &in, PP< RBMMatrixConnectionNatGrad > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMatrixConnectionNatGrad > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMMatrixTransposeConnection &o)
PStreamoperator>> (PStream &in, RBMMatrixTransposeConnection &o)
PStreamoperator>> (PStream &in, RBMMatrixTransposeConnection *&o)
PStreamoperator<< (PStream &out, const RBMMatrixTransposeConnection &o)
PStreamoperator>> (PStream &in, PP< RBMMatrixTransposeConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMatrixTransposeConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMMixedConnection &o)
PStreamoperator>> (PStream &in, RBMMixedConnection &o)
PStreamoperator>> (PStream &in, RBMMixedConnection *&o)
PStreamoperator<< (PStream &out, const RBMMixedConnection &o)
PStreamoperator>> (PStream &in, PP< RBMMixedConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMixedConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMModule &o)
PStreamoperator>> (PStream &in, RBMModule &o)
PStreamoperator>> (PStream &in, RBMModule *&o)
PStreamoperator<< (PStream &out, const RBMModule &o)
PStreamoperator>> (PStream &in, PP< RBMModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMMultitaskClassificationModule &o)
PStreamoperator>> (PStream &in, RBMMultitaskClassificationModule &o)
PStreamoperator>> (PStream &in, RBMMultitaskClassificationModule *&o)
PStreamoperator<< (PStream &out, const RBMMultitaskClassificationModule &o)
PStreamoperator>> (PStream &in, PP< RBMMultitaskClassificationModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMMultitaskClassificationModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMRateLayer &o)
PStreamoperator>> (PStream &in, RBMRateLayer &o)
PStreamoperator>> (PStream &in, RBMRateLayer *&o)
PStreamoperator<< (PStream &out, const RBMRateLayer &o)
PStreamoperator>> (PStream &in, PP< RBMRateLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMRateLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMRateLayer) template<> class TypeTraits< RBMRateLayer >
ObjecttoObjectPtr (const RBMSparse1DMatrixConnection &o)
PStreamoperator>> (PStream &in, RBMSparse1DMatrixConnection &o)
PStreamoperator>> (PStream &in, RBMSparse1DMatrixConnection *&o)
PStreamoperator<< (PStream &out, const RBMSparse1DMatrixConnection &o)
PStreamoperator>> (PStream &in, PP< RBMSparse1DMatrixConnection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMSparse1DMatrixConnection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMTrainer &o)
PStreamoperator>> (PStream &in, RBMTrainer &o)
PStreamoperator>> (PStream &in, RBMTrainer *&o)
PStreamoperator<< (PStream &out, const RBMTrainer &o)
PStreamoperator>> (PStream &in, PP< RBMTrainer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMTrainer > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RBMWoodsLayer &o)
PStreamoperator>> (PStream &in, RBMWoodsLayer &o)
PStreamoperator>> (PStream &in, RBMWoodsLayer *&o)
PStreamoperator<< (PStream &out, const RBMWoodsLayer &o)
PStreamoperator>> (PStream &in, PP< RBMWoodsLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RBMWoodsLayer > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (RBMWoodsLayer) template<> class TypeTraits< RBMWoodsLayer >
ObjecttoObjectPtr (const ScaleGradientModule &o)
PStreamoperator>> (PStream &in, ScaleGradientModule &o)
PStreamoperator>> (PStream &in, ScaleGradientModule *&o)
PStreamoperator<< (PStream &out, const ScaleGradientModule &o)
PStreamoperator>> (PStream &in, PP< ScaleGradientModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ScaleGradientModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ShuntingNNetLayerModule &o)
PStreamoperator>> (PStream &in, ShuntingNNetLayerModule &o)
PStreamoperator>> (PStream &in, ShuntingNNetLayerModule *&o)
PStreamoperator<< (PStream &out, const ShuntingNNetLayerModule &o)
PStreamoperator>> (PStream &in, PP< ShuntingNNetLayerModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ShuntingNNetLayerModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SoftmaxModule &o)
PStreamoperator>> (PStream &in, SoftmaxModule &o)
PStreamoperator>> (PStream &in, SoftmaxModule *&o)
PStreamoperator<< (PStream &out, const SoftmaxModule &o)
PStreamoperator>> (PStream &in, PP< SoftmaxModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftmaxModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SoftmaxNLLCostModule &o)
PStreamoperator>> (PStream &in, SoftmaxNLLCostModule &o)
PStreamoperator>> (PStream &in, SoftmaxNLLCostModule *&o)
PStreamoperator<< (PStream &out, const SoftmaxNLLCostModule &o)
PStreamoperator>> (PStream &in, PP< SoftmaxNLLCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SoftmaxNLLCostModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SplitModule &o)
PStreamoperator>> (PStream &in, SplitModule &o)
PStreamoperator>> (PStream &in, SplitModule *&o)
PStreamoperator<< (PStream &out, const SplitModule &o)
PStreamoperator>> (PStream &in, PP< SplitModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SplitModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SquaredErrorCostModule &o)
PStreamoperator>> (PStream &in, SquaredErrorCostModule &o)
PStreamoperator>> (PStream &in, SquaredErrorCostModule *&o)
PStreamoperator<< (PStream &out, const SquaredErrorCostModule &o)
PStreamoperator>> (PStream &in, PP< SquaredErrorCostModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SquaredErrorCostModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedAutoassociatorsNet &o)
PStreamoperator>> (PStream &in, StackedAutoassociatorsNet &o)
PStreamoperator>> (PStream &in, StackedAutoassociatorsNet *&o)
PStreamoperator<< (PStream &out, const StackedAutoassociatorsNet &o)
PStreamoperator>> (PStream &in, PP< StackedAutoassociatorsNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedAutoassociatorsNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Subsampling2DModule &o)
PStreamoperator>> (PStream &in, Subsampling2DModule &o)
PStreamoperator>> (PStream &in, Subsampling2DModule *&o)
PStreamoperator<< (PStream &out, const Subsampling2DModule &o)
PStreamoperator>> (PStream &in, PP< Subsampling2DModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Subsampling2DModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Supersampling2DModule &o)
PStreamoperator>> (PStream &in, Supersampling2DModule &o)
PStreamoperator>> (PStream &in, Supersampling2DModule *&o)
PStreamoperator<< (PStream &out, const Supersampling2DModule &o)
PStreamoperator>> (PStream &in, PP< Supersampling2DModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Supersampling2DModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TanhModule &o)
PStreamoperator>> (PStream &in, TanhModule &o)
PStreamoperator>> (PStream &in, TanhModule *&o)
PStreamoperator<< (PStream &out, const TanhModule &o)
PStreamoperator>> (PStream &in, PP< TanhModule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TanhModule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MaxSubsamplingTest &o)
PStreamoperator>> (PStream &in, MaxSubsamplingTest &o)
PStreamoperator>> (PStream &in, MaxSubsamplingTest *&o)
PStreamoperator<< (PStream &out, const MaxSubsamplingTest &o)
PStreamoperator>> (PStream &in, PP< MaxSubsamplingTest > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MaxSubsamplingTest > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const VBoundDBN2 &o)
PStreamoperator>> (PStream &in, VBoundDBN2 &o)
PStreamoperator>> (PStream &in, VBoundDBN2 *&o)
PStreamoperator<< (PStream &out, const VBoundDBN2 &o)
PStreamoperator>> (PStream &in, PP< VBoundDBN2 > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, VBoundDBN2 > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const AutoLinearRegressor &o)
PStreamoperator>> (PStream &in, AutoLinearRegressor &o)
PStreamoperator>> (PStream &in, AutoLinearRegressor *&o)
PStreamoperator<< (PStream &out, const AutoLinearRegressor &o)
PStreamoperator>> (PStream &in, PP< AutoLinearRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, AutoLinearRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BaseRegressorConfidence &o)
PStreamoperator>> (PStream &in, BaseRegressorConfidence &o)
PStreamoperator>> (PStream &in, BaseRegressorConfidence *&o)
PStreamoperator<< (PStream &out, const BaseRegressorConfidence &o)
PStreamoperator>> (PStream &in, PP< BaseRegressorConfidence > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BaseRegressorConfidence > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BaseRegressorWrapper &o)
PStreamoperator>> (PStream &in, BaseRegressorWrapper &o)
PStreamoperator>> (PStream &in, BaseRegressorWrapper *&o)
PStreamoperator<< (PStream &out, const BaseRegressorWrapper &o)
PStreamoperator>> (PStream &in, PP< BaseRegressorWrapper > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BaseRegressorWrapper > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BasisSelectionRegressor &o)
PStreamoperator>> (PStream &in, BasisSelectionRegressor &o)
PStreamoperator>> (PStream &in, BasisSelectionRegressor *&o)
PStreamoperator<< (PStream &out, const BasisSelectionRegressor &o)
PStreamoperator>> (PStream &in, PP< BasisSelectionRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BasisSelectionRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ConstantRegressor &o)
PStreamoperator>> (PStream &in, ConstantRegressor &o)
PStreamoperator>> (PStream &in, ConstantRegressor *&o)
PStreamoperator<< (PStream &out, const ConstantRegressor &o)
PStreamoperator>> (PStream &in, PP< ConstantRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ConstantRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const CubicSpline &o)
PStreamoperator>> (PStream &in, CubicSpline &o)
PStreamoperator>> (PStream &in, CubicSpline *&o)
PStreamoperator<< (PStream &out, const CubicSpline &o)
PStreamoperator>> (PStream &in, PP< CubicSpline > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, CubicSpline > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KernelRidgeRegressor &o)
PStreamoperator>> (PStream &in, KernelRidgeRegressor &o)
PStreamoperator>> (PStream &in, KernelRidgeRegressor *&o)
PStreamoperator<< (PStream &out, const KernelRidgeRegressor &o)
PStreamoperator>> (PStream &in, PP< KernelRidgeRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KernelRidgeRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KNNRegressor &o)
PStreamoperator>> (PStream &in, KNNRegressor &o)
PStreamoperator>> (PStream &in, KNNRegressor *&o)
PStreamoperator<< (PStream &out, const KNNRegressor &o)
PStreamoperator>> (PStream &in, PP< KNNRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KNNRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LinearRegressor &o)
PStreamoperator>> (PStream &in, LinearRegressor &o)
PStreamoperator>> (PStream &in, LinearRegressor *&o)
PStreamoperator<< (PStream &out, const LinearRegressor &o)
PStreamoperator>> (PStream &in, PP< LinearRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LinearRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LocalMedBoost &o)
PStreamoperator>> (PStream &in, LocalMedBoost &o)
PStreamoperator>> (PStream &in, LocalMedBoost *&o)
PStreamoperator<< (PStream &out, const LocalMedBoost &o)
PStreamoperator>> (PStream &in, PP< LocalMedBoost > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LocalMedBoost > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PLS &o)
PStreamoperator>> (PStream &in, PLS &o)
PStreamoperator>> (PStream &in, PLS *&o)
PStreamoperator<< (PStream &out, const PLS &o)
PStreamoperator>> (PStream &in, PP< PLS > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PLS > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PruningLinearRegressor &o)
PStreamoperator>> (PStream &in, PruningLinearRegressor &o)
PStreamoperator>> (PStream &in, PruningLinearRegressor *&o)
PStreamoperator<< (PStream &out, const PruningLinearRegressor &o)
PStreamoperator>> (PStream &in, PP< PruningLinearRegressor > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PruningLinearRegressor > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RankLearner &o)
PStreamoperator>> (PStream &in, RankLearner &o)
PStreamoperator>> (PStream &in, RankLearner *&o)
PStreamoperator<< (PStream &out, const RankLearner &o)
PStreamoperator>> (PStream &in, PP< RankLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RankLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTree &o)
PStreamoperator>> (PStream &in, RegressionTree &o)
PStreamoperator>> (PStream &in, RegressionTree *&o)
PStreamoperator<< (PStream &out, const RegressionTree &o)
PStreamoperator>> (PStream &in, PP< RegressionTree > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTree > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeLeave &o)
PStreamoperator>> (PStream &in, RegressionTreeLeave &o)
PStreamoperator>> (PStream &in, RegressionTreeLeave *&o)
PStreamoperator<< (PStream &out, const RegressionTreeLeave &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeLeave > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeLeave > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeMulticlassLeave &o)
PStreamoperator>> (PStream &in, RegressionTreeMulticlassLeave &o)
PStreamoperator>> (PStream &in, RegressionTreeMulticlassLeave *&o)
PStreamoperator<< (PStream &out, const RegressionTreeMulticlassLeave &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeMulticlassLeave > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeMulticlassLeave > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeMulticlassLeaveFast &o)
PStreamoperator>> (PStream &in, RegressionTreeMulticlassLeaveFast &o)
PStreamoperator>> (PStream &in, RegressionTreeMulticlassLeaveFast *&o)
PStreamoperator<< (PStream &out, const RegressionTreeMulticlassLeaveFast &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeMulticlassLeaveFast > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeMulticlassLeaveFast > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeMulticlassLeaveProb &o)
PStreamoperator>> (PStream &in, RegressionTreeMulticlassLeaveProb &o)
PStreamoperator>> (PStream &in, RegressionTreeMulticlassLeaveProb *&o)
PStreamoperator<< (PStream &out, const RegressionTreeMulticlassLeaveProb &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeMulticlassLeaveProb > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeMulticlassLeaveProb > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeNode &o)
PStreamoperator>> (PStream &in, RegressionTreeNode &o)
PStreamoperator>> (PStream &in, RegressionTreeNode *&o)
PStreamoperator<< (PStream &out, const RegressionTreeNode &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeNode > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeNode > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeQueue &o)
PStreamoperator>> (PStream &in, RegressionTreeQueue &o)
PStreamoperator>> (PStream &in, RegressionTreeQueue *&o)
PStreamoperator<< (PStream &out, const RegressionTreeQueue &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeQueue > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeQueue > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressionTreeRegisters &o)
PStreamoperator>> (PStream &in, RegressionTreeRegisters &o)
PStreamoperator>> (PStream &in, RegressionTreeRegisters *&o)
PStreamoperator<< (PStream &out, const RegressionTreeRegisters &o)
PStreamoperator>> (PStream &in, PP< RegressionTreeRegisters > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressionTreeRegisters > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RegressorFromDistribution &o)
PStreamoperator>> (PStream &in, RegressorFromDistribution &o)
PStreamoperator>> (PStream &in, RegressorFromDistribution *&o)
PStreamoperator<< (PStream &out, const RegressorFromDistribution &o)
PStreamoperator>> (PStream &in, PP< RegressorFromDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RegressorFromDistribution > *opt, PLearnDiff *diffs)
void computeWeightedInputOutputMeansAndStddev (const VMat &d, Vec &means, Vec &stddev)
void multiplyColumns (Mat &m, Vec &v)
ObjecttoObjectPtr (const WPLS &o)
PStreamoperator>> (PStream &in, WPLS &o)
PStreamoperator>> (PStream &in, WPLS *&o)
PStreamoperator<< (PStream &out, const WPLS &o)
PStreamoperator>> (PStream &in, PP< WPLS > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WPLS > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EmbeddedSequentialLearner &o)
 Declares a few other classes and functions related to this class.
PStreamoperator>> (PStream &in, EmbeddedSequentialLearner &o)
PStreamoperator>> (PStream &in, EmbeddedSequentialLearner *&o)
PStreamoperator<< (PStream &out, const EmbeddedSequentialLearner &o)
PStreamoperator>> (PStream &in, PP< EmbeddedSequentialLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EmbeddedSequentialLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MovingAverage &o)
 Declares a few other classes and functions related to this class.
PStreamoperator>> (PStream &in, MovingAverage &o)
PStreamoperator>> (PStream &in, MovingAverage *&o)
PStreamoperator<< (PStream &out, const MovingAverage &o)
PStreamoperator>> (PStream &in, PP< MovingAverage > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MovingAverage > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SequentialLearner &o)
 Declares a few other classes and functions related to this class.
PStreamoperator>> (PStream &in, SequentialLearner &o)
PStreamoperator>> (PStream &in, SequentialLearner *&o)
PStreamoperator<< (PStream &out, const SequentialLearner &o)
PStreamoperator>> (PStream &in, PP< SequentialLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SequentialLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SequentialModelSelector &o)
 Declares a few other classes and functions related to this class.
PStreamoperator>> (PStream &in, SequentialModelSelector &o)
PStreamoperator>> (PStream &in, SequentialModelSelector *&o)
PStreamoperator<< (PStream &out, const SequentialModelSelector &o)
PStreamoperator>> (PStream &in, PP< SequentialModelSelector > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SequentialModelSelector > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SequentialValidation &o)
 Declares a few other classes and functions related to this class.
PStreamoperator>> (PStream &in, SequentialValidation &o)
PStreamoperator>> (PStream &in, SequentialValidation *&o)
PStreamoperator<< (PStream &out, const SequentialValidation &o)
PStreamoperator>> (PStream &in, PP< SequentialValidation > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SequentialValidation > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TestMethod &o)
PStreamoperator>> (PStream &in, TestMethod &o)
PStreamoperator>> (PStream &in, TestMethod *&o)
PStreamoperator<< (PStream &out, const TestMethod &o)
PStreamoperator>> (PStream &in, PP< TestMethod > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TestMethod > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PerformanceEvaluator &o)
PStreamoperator>> (PStream &in, PerformanceEvaluator &o)
PStreamoperator>> (PStream &in, PerformanceEvaluator *&o)
PStreamoperator<< (PStream &out, const PerformanceEvaluator &o)
PStreamoperator>> (PStream &in, PP< PerformanceEvaluator > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PerformanceEvaluator > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Train &o)
PStreamoperator>> (PStream &in, Train &o)
PStreamoperator>> (PStream &in, Train *&o)
PStreamoperator<< (PStream &out, const Train &o)
PStreamoperator>> (PStream &in, PP< Train > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Train > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const EntropyContrast &o)
PStreamoperator>> (PStream &in, EntropyContrast &o)
PStreamoperator>> (PStream &in, EntropyContrast *&o)
PStreamoperator<< (PStream &out, const EntropyContrast &o)
PStreamoperator>> (PStream &in, PP< EntropyContrast > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EntropyContrast > *opt, PLearnDiff *diffs)
void displayVarGr (const Var &v, bool display_values)
void displayVarFn (const Func &f, bool display_values)
ObjecttoObjectPtr (const EntropyContrastLearner &o)
PStreamoperator>> (PStream &in, EntropyContrastLearner &o)
PStreamoperator>> (PStream &in, EntropyContrastLearner *&o)
PStreamoperator<< (PStream &out, const EntropyContrastLearner &o)
PStreamoperator>> (PStream &in, PP< EntropyContrastLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, EntropyContrastLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DiverseComponentAnalysis &o)
PStreamoperator>> (PStream &in, DiverseComponentAnalysis &o)
PStreamoperator>> (PStream &in, DiverseComponentAnalysis *&o)
PStreamoperator<< (PStream &out, const DiverseComponentAnalysis &o)
PStreamoperator>> (PStream &in, PP< DiverseComponentAnalysis > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DiverseComponentAnalysis > *opt, PLearnDiff *diffs)
Mat smartInitialization (VMat v, int n, real c, real regularization)
ObjecttoObjectPtr (const GaussianContinuum &o)
PStreamoperator>> (PStream &in, GaussianContinuum &o)
PStreamoperator>> (PStream &in, GaussianContinuum *&o)
PStreamoperator<< (PStream &out, const GaussianContinuum &o)
PStreamoperator>> (PStream &in, PP< GaussianContinuum > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussianContinuum > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const GaussMixLocalProjections &o)
PStreamoperator>> (PStream &in, GaussMixLocalProjections &o)
PStreamoperator>> (PStream &in, GaussMixLocalProjections *&o)
PStreamoperator<< (PStream &out, const GaussMixLocalProjections &o)
PStreamoperator>> (PStream &in, PP< GaussMixLocalProjections > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, GaussMixLocalProjections > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Isomap &o)
PStreamoperator>> (PStream &in, Isomap &o)
PStreamoperator>> (PStream &in, Isomap *&o)
PStreamoperator<< (PStream &out, const Isomap &o)
PStreamoperator>> (PStream &in, PP< Isomap > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Isomap > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const IsomapTangentLearner &o)
PStreamoperator>> (PStream &in, IsomapTangentLearner &o)
PStreamoperator>> (PStream &in, IsomapTangentLearner *&o)
PStreamoperator<< (PStream &out, const IsomapTangentLearner &o)
PStreamoperator>> (PStream &in, PP< IsomapTangentLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, IsomapTangentLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KernelPCA &o)
PStreamoperator>> (PStream &in, KernelPCA &o)
PStreamoperator>> (PStream &in, KernelPCA *&o)
PStreamoperator<< (PStream &out, const KernelPCA &o)
PStreamoperator>> (PStream &in, PP< KernelPCA > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KernelPCA > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KernelProjection &o)
PStreamoperator>> (PStream &in, KernelProjection &o)
PStreamoperator>> (PStream &in, KernelProjection *&o)
PStreamoperator<< (PStream &out, const KernelProjection &o)
PStreamoperator>> (PStream &in, PP< KernelProjection > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KernelProjection > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KMeansClustering &o)
PStreamoperator>> (PStream &in, KMeansClustering &o)
PStreamoperator>> (PStream &in, KMeansClustering *&o)
PStreamoperator<< (PStream &out, const KMeansClustering &o)
PStreamoperator>> (PStream &in, PP< KMeansClustering > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KMeansClustering > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const KPCATangentLearner &o)
PStreamoperator>> (PStream &in, KPCATangentLearner &o)
PStreamoperator>> (PStream &in, KPCATangentLearner *&o)
PStreamoperator<< (PStream &out, const KPCATangentLearner &o)
PStreamoperator>> (PStream &in, PP< KPCATangentLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, KPCATangentLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LLC &o)
PStreamoperator>> (PStream &in, LLC &o)
PStreamoperator>> (PStream &in, LLC *&o)
PStreamoperator<< (PStream &out, const LLC &o)
PStreamoperator>> (PStream &in, PP< LLC > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LLC > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LLE &o)
PStreamoperator>> (PStream &in, LLE &o)
PStreamoperator>> (PStream &in, LLE *&o)
PStreamoperator<< (PStream &out, const LLE &o)
PStreamoperator>> (PStream &in, PP< LLE > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LLE > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NormalizationLearner &o)
PStreamoperator>> (PStream &in, NormalizationLearner &o)
PStreamoperator>> (PStream &in, NormalizationLearner *&o)
PStreamoperator<< (PStream &out, const NormalizationLearner &o)
PStreamoperator>> (PStream &in, PP< NormalizationLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NormalizationLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PCA &o)
PStreamoperator>> (PStream &in, PCA &o)
PStreamoperator>> (PStream &in, PCA *&o)
PStreamoperator<< (PStream &out, const PCA &o)
PStreamoperator>> (PStream &in, PP< PCA > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PCA > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SpectralClustering &o)
PStreamoperator>> (PStream &in, SpectralClustering &o)
PStreamoperator>> (PStream &in, SpectralClustering *&o)
PStreamoperator<< (PStream &out, const SpectralClustering &o)
PStreamoperator>> (PStream &in, PP< SpectralClustering > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SpectralClustering > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TangentLearner &o)
PStreamoperator>> (PStream &in, TangentLearner &o)
PStreamoperator>> (PStream &in, TangentLearner *&o)
PStreamoperator<< (PStream &out, const TangentLearner &o)
PStreamoperator>> (PStream &in, PP< TangentLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TangentLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TargetEncodingLearner &o)
PStreamoperator>> (PStream &in, TargetEncodingLearner &o)
PStreamoperator>> (PStream &in, TargetEncodingLearner *&o)
PStreamoperator<< (PStream &out, const TargetEncodingLearner &o)
PStreamoperator>> (PStream &in, PP< TargetEncodingLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TargetEncodingLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const UniformizeLearner &o)
PStreamoperator>> (PStream &in, UniformizeLearner &o)
PStreamoperator>> (PStream &in, UniformizeLearner *&o)
PStreamoperator<< (PStream &out, const UniformizeLearner &o)
PStreamoperator>> (PStream &in, PP< UniformizeLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, UniformizeLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const BinaryKernelDiscrimination &o)
PStreamoperator>> (PStream &in, BinaryKernelDiscrimination &o)
PStreamoperator>> (PStream &in, BinaryKernelDiscrimination *&o)
PStreamoperator<< (PStream &out, const BinaryKernelDiscrimination &o)
PStreamoperator>> (PStream &in, PP< BinaryKernelDiscrimination > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, BinaryKernelDiscrimination > *opt, PLearnDiff *diffs)
bool operator< (const Correspondence &p, const Correspondence &q)
ObjecttoObjectPtr (const Correspondence &o)
PStreamoperator>> (PStream &in, Correspondence &o)
PStreamoperator>> (PStream &in, Correspondence *&o)
PStreamoperator<< (PStream &out, const Correspondence &o)
PStreamoperator>> (PStream &in, PP< Correspondence > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Correspondence > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DeepFeatureExtractorNNet &o)
PStreamoperator>> (PStream &in, DeepFeatureExtractorNNet &o)
PStreamoperator>> (PStream &in, DeepFeatureExtractorNNet *&o)
PStreamoperator<< (PStream &out, const DeepFeatureExtractorNNet &o)
PStreamoperator>> (PStream &in, PP< DeepFeatureExtractorNNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DeepFeatureExtractorNNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DeepNonLocalManifoldParzen &o)
PStreamoperator>> (PStream &in, DeepNonLocalManifoldParzen &o)
PStreamoperator>> (PStream &in, DeepNonLocalManifoldParzen *&o)
PStreamoperator<< (PStream &out, const DeepNonLocalManifoldParzen &o)
PStreamoperator>> (PStream &in, PP< DeepNonLocalManifoldParzen > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DeepNonLocalManifoldParzen > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DenoisingRecurrentNet &o)
PStreamoperator>> (PStream &in, DenoisingRecurrentNet &o)
PStreamoperator>> (PStream &in, DenoisingRecurrentNet *&o)
PStreamoperator<< (PStream &out, const DenoisingRecurrentNet &o)
PStreamoperator>> (PStream &in, PP< DenoisingRecurrentNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DenoisingRecurrentNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MoleculeTemplateLearner &o)
PStreamoperator>> (PStream &in, MoleculeTemplateLearner &o)
PStreamoperator>> (PStream &in, MoleculeTemplateLearner *&o)
PStreamoperator<< (PStream &out, const MoleculeTemplateLearner &o)
PStreamoperator>> (PStream &in, PP< MoleculeTemplateLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MoleculeTemplateLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const TestLearner &o)
PStreamoperator>> (PStream &in, TestLearner &o)
PStreamoperator>> (PStream &in, TestLearner *&o)
PStreamoperator<< (PStream &out, const TestLearner &o)
PStreamoperator>> (PStream &in, PP< TestLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TestLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DiscriminativeDeepBeliefNet &o)
PStreamoperator>> (PStream &in, DiscriminativeDeepBeliefNet &o)
PStreamoperator>> (PStream &in, DiscriminativeDeepBeliefNet *&o)
PStreamoperator<< (PStream &out, const DiscriminativeDeepBeliefNet &o)
PStreamoperator>> (PStream &in, PP< DiscriminativeDeepBeliefNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DiscriminativeDeepBeliefNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DiscriminativeRBM &o)
PStreamoperator>> (PStream &in, DiscriminativeRBM &o)
PStreamoperator>> (PStream &in, DiscriminativeRBM *&o)
PStreamoperator<< (PStream &out, const DiscriminativeRBM &o)
PStreamoperator>> (PStream &in, PP< DiscriminativeRBM > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DiscriminativeRBM > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const DynamicallyLinkedRBMsModel &o)
PStreamoperator>> (PStream &in, DynamicallyLinkedRBMsModel &o)
PStreamoperator>> (PStream &in, DynamicallyLinkedRBMsModel *&o)
PStreamoperator<< (PStream &out, const DynamicallyLinkedRBMsModel &o)
PStreamoperator>> (PStream &in, PP< DynamicallyLinkedRBMsModel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, DynamicallyLinkedRBMsModel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const FeatureSetSequentialCRF &o)
PStreamoperator>> (PStream &in, FeatureSetSequentialCRF &o)
PStreamoperator>> (PStream &in, FeatureSetSequentialCRF *&o)
PStreamoperator<< (PStream &out, const FeatureSetSequentialCRF &o)
PStreamoperator>> (PStream &in, PP< FeatureSetSequentialCRF > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, FeatureSetSequentialCRF > *opt, PLearnDiff *diffs)
Vec fixedAnglesFromRotation (const Mat &m)
Mat rotationFromFixedAngles (real rx, real ry, real rz)
Mat rotationFromAxisAngle (Vec &K, real th)
Mat boundingBoxToVertices (const Mat &bbox)
void transformPoints (const Mat &rot, const Vec &trans, const Mat &points_in, Mat &points_out)
void transformMesh (const Mat &rot, const Vec &trans, SurfMesh &sm)
void weightedTransformationFromMatchedPoints (const Mat &mp, const Mat &sp, const Vec &weights, Mat &rot, Vec &trans, real &error)
Vec weightedCentroid (const Mat &pts, const Vec &weights)
Mat weightedRotationFromMatchedPoints (const Mat &mp, const Mat &sp, const Vec &weights, real &error)
int jacobi (Mat &a, Vec &d, Mat &v, int &nrot)
void rotate (Mat &a, int i, int j, int k, int l, const real &s, const real &tau)
void eigsrt (Vec &d, Mat &v, int n)
real maxPointMotion (const Mat &old_points, const Mat &new_points)
real calcNormal (graph &mesh, const vertex_descriptor &vtx, Vec &norm)
Vec calcNormal (const Vec &v1, const Vec &v2, const Vec &v3, const Vec &n1, const Vec &n2, const Vec &n3, const Vec &target)
void findSumsFromPts (const graph &mesh, const set< vertex_descriptor > &points, Vec &sums)
void calcPlaneParams (const Vec &sums, Vec &norm, real &d, real &err)
int getNormFromEigVecs (const Vec &ev, const Mat &e, Vec &norm)
Vec cross (const Vec &v1, const Vec &v2)
void randomTransformation (real max_angle, real max_dist, Mat &rot, Vec &trans)
Mat randomRotation (real max_angle)
void getNearestVertex (const Vec &test_pt, const SurfMesh &mesh2, const GenericNN &btl, int &closest_vertex, Vec &closest_pt, real &closest_dist)
bool isOverlapping (Vec &test_pt, Vec &test_normal, const SurfMesh &mesh2, const TVec< set< int > > &face_cache, GenericNN &btl, const real init_dist_t, const real normal_t, int &closest_vertex, Vec &closest_pt, real &closest_dist)
bool pointIsInterior (const TriType tri_type, const int m2face, const SurfMesh &mesh2)
bool closestFacePoint (const Vec &m1pt, const set< int > &m2faces, const SurfMesh &mesh2, const real dist_t, Vec &closest_pt, real &closest_dist, int &closest_face, TriType &closest_tri_type)
bool closestPointOnTriangle (const Vec &p, const Vec &v1, const Vec &v2, const Vec &v3, const real dist_t, Vec &closest, TriType &tri_type, real &dist)
int region1ClosestPoint (const Vec &planep, const Vec &va, const Vec &vb, const Vec &ea, Vec &closest)
int region2ClosestPoint (const Vec &planep, const Vec &va, const Vec &vb, const Vec &vc, const Vec &ea, const Vec &eb, Vec closest)
ObjecttoObjectPtr (const ICP &o)
PStreamoperator>> (PStream &in, ICP &o)
PStreamoperator>> (PStream &in, ICP *&o)
PStreamoperator<< (PStream &out, const ICP &o)
PStreamoperator>> (PStream &in, PP< ICP > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ICP > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const LinearInductiveTransferClassifier &o)
PStreamoperator>> (PStream &in, LinearInductiveTransferClassifier &o)
PStreamoperator>> (PStream &in, LinearInductiveTransferClassifier *&o)
PStreamoperator<< (PStream &out, const LinearInductiveTransferClassifier &o)
PStreamoperator>> (PStream &in, PP< LinearInductiveTransferClassifier > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, LinearInductiveTransferClassifier > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ManifoldKNNDistribution &o)
PStreamoperator>> (PStream &in, ManifoldKNNDistribution &o)
PStreamoperator>> (PStream &in, ManifoldKNNDistribution *&o)
PStreamoperator<< (PStream &out, const ManifoldKNNDistribution &o)
PStreamoperator>> (PStream &in, PP< ManifoldKNNDistribution > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ManifoldKNNDistribution > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ManifoldParzen &o)
PStreamoperator>> (PStream &in, ManifoldParzen &o)
PStreamoperator>> (PStream &in, ManifoldParzen *&o)
PStreamoperator<< (PStream &out, const ManifoldParzen &o)
PStreamoperator>> (PStream &in, PP< ManifoldParzen > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ManifoldParzen > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MeshEdge &o)
PStreamoperator>> (PStream &in, MeshEdge &o)
PStreamoperator>> (PStream &in, MeshEdge *&o)
PStreamoperator<< (PStream &out, const MeshEdge &o)
PStreamoperator>> (PStream &in, PP< MeshEdge > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeshEdge > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MeshFace &o)
PStreamoperator>> (PStream &in, MeshFace &o)
PStreamoperator>> (PStream &in, MeshFace *&o)
PStreamoperator<< (PStream &out, const MeshFace &o)
PStreamoperator>> (PStream &in, PP< MeshFace > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeshFace > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MeshGraph &o)
PStreamoperator>> (PStream &in, MeshGraph &o)
PStreamoperator>> (PStream &in, MeshGraph *&o)
PStreamoperator<< (PStream &out, const MeshGraph &o)
PStreamoperator>> (PStream &in, PP< MeshGraph > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeshGraph > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const MeshMatch &o)
PStreamoperator>> (PStream &in, MeshMatch &o)
PStreamoperator>> (PStream &in, MeshMatch *&o)
PStreamoperator<< (PStream &out, const MeshMatch &o)
PStreamoperator>> (PStream &in, PP< MeshMatch > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeshMatch > *opt, PLearnDiff *diffs)
real dist3D (const MeshVertex &p, const MeshVertex &q)
ObjecttoObjectPtr (const MeshVertex &o)
PStreamoperator>> (PStream &in, MeshVertex &o)
PStreamoperator>> (PStream &in, MeshVertex *&o)
PStreamoperator<< (PStream &out, const MeshVertex &o)
PStreamoperator>> (PStream &in, PP< MeshVertex > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MeshVertex > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Molecule &o)
PStreamoperator>> (PStream &in, Molecule &o)
PStreamoperator>> (PStream &in, Molecule *&o)
PStreamoperator<< (PStream &out, const Molecule &o)
PStreamoperator>> (PStream &in, PP< Molecule > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Molecule > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NxProfileLearner &o)
PStreamoperator>> (PStream &in, NxProfileLearner &o)
PStreamoperator>> (PStream &in, NxProfileLearner *&o)
PStreamoperator<< (PStream &out, const NxProfileLearner &o)
PStreamoperator>> (PStream &in, PP< NxProfileLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NxProfileLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NeuralProbabilisticLanguageModel &o)
PStreamoperator>> (PStream &in, NeuralProbabilisticLanguageModel &o)
PStreamoperator>> (PStream &in, NeuralProbabilisticLanguageModel *&o)
PStreamoperator<< (PStream &out, const NeuralProbabilisticLanguageModel &o)
PStreamoperator>> (PStream &in, PP< NeuralProbabilisticLanguageModel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NeuralProbabilisticLanguageModel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NLLNeighborhoodWeightsVariable &o)
PStreamoperator>> (PStream &in, NLLNeighborhoodWeightsVariable &o)
PStreamoperator>> (PStream &in, NLLNeighborhoodWeightsVariable *&o)
PStreamoperator<< (PStream &out, const NLLNeighborhoodWeightsVariable &o)
PStreamoperator>> (PStream &in, PP< NLLNeighborhoodWeightsVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NLLNeighborhoodWeightsVariable > *opt, PLearnDiff *diffs)
Var nll_neighborhood_weights (Var neighbor_nlls, Var neighbor_indexes, int n, real alpha)
Var no_bprop (Var v, real *gradient_scaling_factor)
 copy its argument but block gradient completely or partially
bool wordAndFreqGT (const wordAndFreq &a, const wordAndFreq &b)
ObjecttoObjectPtr (const NnlmOnlineLearner &o)
PStreamoperator>> (PStream &in, NnlmOnlineLearner &o)
PStreamoperator>> (PStream &in, NnlmOnlineLearner *&o)
PStreamoperator<< (PStream &out, const NnlmOnlineLearner &o)
PStreamoperator>> (PStream &in, PP< NnlmOnlineLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NnlmOnlineLearner > *opt, PLearnDiff *diffs)
bool wordAndProbGT (const wordAndProb &a, const wordAndProb &b)
ObjecttoObjectPtr (const NnlmOutputLayer &o)
PStreamoperator>> (PStream &in, NnlmOutputLayer &o)
PStreamoperator>> (PStream &in, NnlmOutputLayer *&o)
PStreamoperator<< (PStream &out, const NnlmOutputLayer &o)
PStreamoperator>> (PStream &in, PP< NnlmOutputLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NnlmOutputLayer > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const NnlmWordRepresentationLayer &o)
PStreamoperator>> (PStream &in, NnlmWordRepresentationLayer &o)
PStreamoperator>> (PStream &in, NnlmWordRepresentationLayer *&o)
PStreamoperator<< (PStream &out, const NnlmWordRepresentationLayer &o)
PStreamoperator>> (PStream &in, PP< NnlmWordRepresentationLayer > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, NnlmWordRepresentationLayer > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const PseudolikelihoodRBM &o)
PStreamoperator>> (PStream &in, PseudolikelihoodRBM &o)
PStreamoperator>> (PStream &in, PseudolikelihoodRBM *&o)
PStreamoperator<< (PStream &out, const PseudolikelihoodRBM &o)
PStreamoperator>> (PStream &in, PP< PseudolikelihoodRBM > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, PseudolikelihoodRBM > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const RankingFromKernel &o)
PStreamoperator>> (PStream &in, RankingFromKernel &o)
PStreamoperator>> (PStream &in, RankingFromKernel *&o)
PStreamoperator<< (PStream &out, const RankingFromKernel &o)
PStreamoperator>> (PStream &in, PP< RankingFromKernel > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RankingFromKernel > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedFocusedAutoassociatorsNet &o)
PStreamoperator>> (PStream &in, StackedFocusedAutoassociatorsNet &o)
PStreamoperator>> (PStream &in, StackedFocusedAutoassociatorsNet *&o)
PStreamoperator<< (PStream &out, const StackedFocusedAutoassociatorsNet &o)
PStreamoperator>> (PStream &in, PP< StackedFocusedAutoassociatorsNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedFocusedAutoassociatorsNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StackedSVDNet &o)
PStreamoperator>> (PStream &in, StackedSVDNet &o)
PStreamoperator>> (PStream &in, StackedSVDNet *&o)
PStreamoperator<< (PStream &out, const StackedSVDNet &o)
PStreamoperator>> (PStream &in, PP< StackedSVDNet > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StackedSVDNet > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const StructuralLearner &o)
PStreamoperator>> (PStream &in, StructuralLearner &o)
PStreamoperator>> (PStream &in, StructuralLearner *&o)
PStreamoperator<< (PStream &out, const StructuralLearner &o)
PStreamoperator>> (PStream &in, PP< StructuralLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, StructuralLearner > *opt, PLearnDiff *diffs)
pair< edge_descriptor, booladd_edge_ifnew (const vertex_descriptor &u, const vertex_descriptor &v, const graph::edge_property_type &ep, graph &g)
pair< edge_descriptor, booladd_edge_ifnew (const vertex_descriptor &u, const vertex_descriptor &v, graph &g)
ObjecttoObjectPtr (const SurfaceMesh &o)
PStreamoperator>> (PStream &in, SurfaceMesh &o)
PStreamoperator>> (PStream &in, SurfaceMesh *&o)
PStreamoperator<< (PStream &out, const SurfaceMesh &o)
PStreamoperator>> (PStream &in, PP< SurfaceMesh > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SurfaceMesh > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ChemicalICP &o)
PStreamoperator>> (PStream &in, ChemicalICP &o)
PStreamoperator>> (PStream &in, ChemicalICP *&o)
PStreamoperator<< (PStream &out, const ChemicalICP &o)
PStreamoperator>> (PStream &in, PP< ChemicalICP > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ChemicalICP > *opt, PLearnDiff *diffs)
Vec anglesFromRotationMatrix (const Mat &rot)
Mat rotationMatrixFromAngles (real rx, real ry, real rz)
Mat rotationMatrixFromAngles (const Vec &angles)
Mat rotationFromAxisAngle (const Vec &K, real th)
void applyGeomTransformation (const Mat &rot, const Vec &trans, const Mat &points_in, Mat &points_out)
void transformationFromWeightedMatchedPoints (const Mat &template_points, const Mat &mol_points, const Vec &weights, const Mat &rot, const Vec &trans, real &error)
Mat rotationFromWeightedMatchedPoints (const Mat &template_points, const Mat &mol_points, const Vec &weights, real &error)
Mat rotationMatrixFromAxisAngle (const Vec &K, real th)
ObjecttoObjectPtr (const MoleculeTemplate &o)
PStreamoperator>> (PStream &in, MoleculeTemplate &o)
PStreamoperator>> (PStream &in, MoleculeTemplate *&o)
PStreamoperator<< (PStream &out, const MoleculeTemplate &o)
PStreamoperator>> (PStream &in, PP< MoleculeTemplate > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, MoleculeTemplate > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (MoleculeTemplate) template<> class TypeTraits< MoleculeTemplate >
ObjecttoObjectPtr (const RunICPVariable &o)
PStreamoperator>> (PStream &in, RunICPVariable &o)
PStreamoperator>> (PStream &in, RunICPVariable *&o)
PStreamoperator<< (PStream &out, const RunICPVariable &o)
PStreamoperator>> (PStream &in, PP< RunICPVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, RunICPVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const ScoreLayerVariable &o)
PStreamoperator>> (PStream &in, ScoreLayerVariable &o)
PStreamoperator>> (PStream &in, ScoreLayerVariable *&o)
PStreamoperator<< (PStream &out, const ScoreLayerVariable &o)
PStreamoperator>> (PStream &in, PP< ScoreLayerVariable > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, ScoreLayerVariable > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const SurfaceTemplateLearner &o)
PStreamoperator>> (PStream &in, SurfaceTemplateLearner &o)
PStreamoperator>> (PStream &in, SurfaceTemplateLearner *&o)
PStreamoperator<< (PStream &out, const SurfaceTemplateLearner &o)
PStreamoperator>> (PStream &in, PP< SurfaceTemplateLearner > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, SurfaceTemplateLearner > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const Template &o)
PStreamoperator>> (PStream &in, Template &o)
PStreamoperator>> (PStream &in, Template *&o)
PStreamoperator<< (PStream &out, const Template &o)
PStreamoperator>> (PStream &in, PP< Template > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, Template > *opt, PLearnDiff *diffs)
 DECLARE_SPECIALIZED_DIFF_CLASS (Template) template<> class TypeTraits< Template >
ObjecttoObjectPtr (const TopDownAsymetricDeepNetwork &o)
PStreamoperator>> (PStream &in, TopDownAsymetricDeepNetwork &o)
PStreamoperator>> (PStream &in, TopDownAsymetricDeepNetwork *&o)
PStreamoperator<< (PStream &out, const TopDownAsymetricDeepNetwork &o)
PStreamoperator>> (PStream &in, PP< TopDownAsymetricDeepNetwork > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, TopDownAsymetricDeepNetwork > *opt, PLearnDiff *diffs)
ObjecttoObjectPtr (const WeightedLogGaussian &o)
PStreamoperator>> (PStream &in, WeightedLogGaussian &o)
PStreamoperator>> (PStream &in, WeightedLogGaussian *&o)
PStreamoperator<< (PStream &out, const WeightedLogGaussian &o)
PStreamoperator>> (PStream &in, PP< WeightedLogGaussian > &o)
template<class ObjectType >
int diff (const string &refer, const string &other, const Option< ObjectType, WeightedLogGaussian > *opt, PLearnDiff *diffs)
map< string, string > getModelAliases (const string &filename)
 reads a modelalias -> object_representation map from a model.aliases file
void train_and_test (const string &modelalias, string trainalias, vector< string > testaliases)
vector< string > getMultipleModelAliases (const string &model)
void cross_valid (const string &modelalias, string trainalias, int kval)
void use (const string &modelfile, const string &datasetalias)
void usage ()
int old_plearn_main (int argc, char **argv)
static PP< StatsCollectoraccumInStatsCol (string costname, string file1, string file2)
void handler_of_interrup_signal (int sig)
void catch_interrupt_signal ()
static bool is_command (string &possible_command)
static void output_version ()
string version_string ()
void setVersion (int major_version, int minor_version, int fixlevel)
BEGIN_DECLARE_REMOTE_FUNCTIONS declareFunction ("versionString",&version_string,(BodyDoc("Returns PLearn version as a string.\n"), RetDoc("version string")))
static
END_DECLARE_REMOTE_FUNCTIONS
void 
set_global_calendars (string command_line_option)
static string global_options (vector< string > &command_line)
void plearn_terminate_handler ()
int plearn_main (int argc, char **argv, int major_version, int minor_version, int fixlevel)

Variables

static bool dbg = false
static PLearnInit _plearn_init_
StaticInitializer
TypedParentableObject< ParentT >
::_static_initializer_ & 
TypedParentableObject
const size_t PL_HASH_NOMBRES_MAGIQUES [256]
ostream * error_stream = &cerr
const char * test_objects []
const int num_tests = sizeof(test_objects) / sizeof(test_objects[0])
const char MissingString = '\0'
 A few constants for representing missing values.
const unsigned char MissingCharacter = (unsigned char)SCHAR_MIN
const signed char MissingSignedChar = (signed char)SCHAR_MIN
const short MissingShort = SHRT_MIN
const int MissingInt = INT_MIN
const float MissingFloat = MISSING_VALUE
const double MissingDouble = MISSING_VALUE
const PDate MissingDate
static map< string, unsigned intcount_refs_to_file
const int pl_dftbuflen = 4096
PStream pnull = get_pnull()
PStream pin = get_pin()
PStream pout = get_pout()
PStream pio = get_pio()
PStream perr = get_perr()
pl_stream_raw raw
pl_stream_clear_flags clear_flags
pl_stream_initiate initiate
static pl_nullstreambuf null_streambuf
ostream nullout
 a null ostream: writing to it does nothing
istream nullin
 a null instream: reading from it does nothing
iostream nullinout
 a null iostream: reading/writing from/to it does nothing
const char DIGITsymbols [] = "0123456789"
const char ALPHAsymbols [] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
const char * ORDINALS [] = {"d","nd","th","st",0}
const tRule rules []
const unsigned int Hash_UNUSED_TAG = 0xffffffffu
 DataType must have new, delete and copy constructor.
const void * Hash_DELETED_SLOT = (void *)0x00000001
const unsigned int Hash_NOMBRES_MAGIQUES [256]
static double pl_gammln_cof [7]
float gaussQuantiletable [GAUSSQUANTILETABLESIZE]
PLGaussQuantileInitializer pl_gauss_quantile_initializer
float tanhtable [TANHTABLESIZE]
PLMathInitializer pl_math_initializer
_plearn_nan_type plearn_nan
static int32_t the_seed = 0
static int iset = 0
static real gset
double MAXLOG = 7.09782712893383996732E2
double MINLOG = -7.451332191019412076235E2
double MACHEP = 1.11022302462515654042E-16
double big = 4.503599627370496e15
double biginv = 2.22044604925031308085e-16
static const real SQRT_ABSOLUTE_TOLERANCE = sqrt(ABSOLUTE_TOLERANCE)
static const real SQRT2_ABSOLUTE_TOLERANCE = sqrt(SQRT_ABSOLUTE_TOLERANCE)
const JTime MAX_TIME = DBL_MAX
 Maximum time.
const JTime MIN_TIME = -DBL_MAX
 Minimum time.
const JTime SMALL_TIME = 1./(24*60*60*1000)
 Smallest valid increment (= 1/1000 second).
const JTime EPS_TIME = 1e-9
 Smallest representable increment.
const CTime MAX_CTIME = INT_MAX
 Maximum calendar time.
const CTime MIN_CTIME = INT_MIN
 Minimum calendar time.
static string vmat_view_dataset
 The specification of the dataset viewed by the vmat program.
static int num_python_instances = 0
static PObjectPool< PyMethodDef > pyfuncs (50)
static TVec< string > funcs_help
PyObject * the_PLearn_python_exception = 0
PyObject * the_PLearn_python_module = 0
const int STORAGE_UNUSED_HANDLE = -1
struct
PLearn::compareIndexAndMissingFlags 
compare_index_and_missing_flags
static TriType r1_table [3][3]
static TriType r2_table [3][5]
const char * plide_code = "from plearn.plide.plide import *\n"

Detailed Description

< for swap

< For extract_extension.

< For definition of real.

< For smartLoadObject(..)

< For prgname().

< For fill_random_normal.

< For dist.

< For underscore_to_space.

< For real.

< For execute.

< For uniform_sample.

< For the bag signal constants.

< For gauss_log_density_stddev().

< for pair

< For the missing indicators stuff.

< For save

< For pgetline()

< For solveLinearSystem.

< For SumOverBagsVariable::TARGET_COLUMN_LAST.

< For vconcat.

< For the system of references to files.

< For 'force_rmdir'.

< For 'isfile(..)'.

< For sortRows.

< For the seed stuff.

< For isfile().

< For force_rmdir()

< For force_mkdir()

< For clock().

< For isfile()

Variable.

< For logadd()

< For tostring.

used only for implementing the sampling Var's in the setValueFromParentsValue methods of StochasticRandomVariable's.

RandomVar.

External declaration of the Fortran QL0001 routine.

< For pathexists(..)

< For chdir()

< For pl_isnumber.

< For shuffleRows().

< For solveLinearSystem().

< For sortElements().

< For newFilename.

StdPStreamBuf is is a PStreamBuf that wraps an underlying std::istream and std::ostream.

< For stream stuff.

< For endianswap.

< For getNextNonBlankLine.

< For force_mkdir_for_file();

< For 'slash' // TODO Can we get rid of this ?

< For looksNumeric.

From Standard Library.

< For loadAsciiSingleBinaryDescriptor().

< For addprefix.

< For 'fast_exact_is_equal'.

< For countNonBlankLinesOfFile.

A define used to debug Storage::resize.

< For peekAfterSkipBlanks.

< For round(..).

< For std::transform.

< For PStream.

< For removeblanks.

< For OBflag_t.

< For toint. < For MISSING_VALUE.

Compile with this symbol defined to enable it.

< For left.

< For split_on_first(). < For isfile().

< for LONG_MAX < for logic_error < for lseek, read, write, close < for open for errno for ptrdiff_t From PLearn < For slash. < for PDate

< For 'real'.

< For toint. < For pl_strtod. < For PLearn::tostring.

pl_fdstream.{h|cc} Defines a stream buffer than can be created from a POSIX file descriptor, along with a stream to use that buffer.

pl_streambuf.{h|cc} Defines a stream buffer that allows marking the current input position and seeking back to that position after some extraction. The marking is done using stream marker objects (class pl_streammarker).

DEPRECATED!!! Use <hash_map> instead.

< For save(..)

**********************************************************************

!!!! NOTICE !!!!

1. The routines contained in this file are due to Prof. K.Schittkowski of the University of Bayreuth, Germany (modification of routines due to Prof. MJD Powell at the University of Cambridge). They can be freely distributed.

2. A minor modification was performed at the University of Maryland. It is marked in the code by "c umd".

A.L. Tits and J.L. Zhou University of Maryland

**********************************************************************

SOLUTION OF QUADRATIC PROGRAMMING PROBLEMS

QL0001 SOLVES THE QUADRATIC PROGRAMMING PROBLEM

MINIMIZE .5*X'*C*X + D'*X SUBJECT TO A(J)*X + B(J) = 0 , J=1,...,ME A(J)*X + B(J) >= 0 , J=ME+1,...,M XL <= X <= XU

HERE C MUST BE AN N BY N SYMMETRIC AND POSITIVE MATRIX, D AN N-DIMENSIONAL VECTOR, A AN M BY N MATRIX AND B AN M-DIMENSIONAL VECTOR. THE ABOVE SITUATION IS INDICATED BY IWAR(1)=1. ALTERNATIVELY, I.E. IF IWAR(1)=0, THE OBJECTIVE FUNCTION MATRIX CAN ALSO BE PROVIDED IN FACTORIZED FORM. IN THIS CASE, C IS AN UPPER TRIANGULAR MATRIX.

THE SUBROUTINE REORGANIZES SOME DATA SO THAT THE PROBLEM CAN BE SOLVED BY A MODIFICATION OF AN ALGORITHM PROPOSED BY POWELL (1983).

USAGE:

QL0001(M,ME,MMAX,N,NMAX,MNN,C,D,A,B,XL,XU,X,U,IOUT,IFAIL,IPRINT, WAR,LWAR,IWAR,LIWAR)

DEFINITION OF THE PARAMETERS:

M : TOTAL NUMBER OF CONSTRAINTS. ME : NUMBER OF EQUALITY CONSTRAINTS. MMAX : ROW DIMENSION OF A. MMAX MUST BE AT LEAST ONE AND GREATER THAN M. N : NUMBER OF VARIABLES. NMAX : ROW DIMENSION OF C. NMAX MUST BE GREATER OR EQUAL TO N. MNN : MUST BE EQUAL TO M + N + N. C(NMAX,NMAX): OBJECTIVE FUNCTION MATRIX WHICH SHOULD BE SYMMETRIC AND POSITIVE DEFINITE. IF IWAR(1) = 0, C IS SUPPOSED TO BE THE CHOLESKEY-FACTOR OF ANOTHER MATRIX, I.E. C IS UPPER TRIANGULAR. D(NMAX) : CONTAINS THE CONSTANT VECTOR OF THE OBJECTIVE FUNCTION. A(MMAX,NMAX): CONTAINS THE DATA MATRIX OF THE LINEAR CONSTRAINTS. B(MMAX) : CONTAINS THE CONSTANT DATA OF THE LINEAR CONSTRAINTS. XL(N),XU(N): CONTAIN THE LOWER AND UPPER BOUNDS FOR THE VARIABLES. X(N) : ON RETURN, X CONTAINS THE OPTIMAL SOLUTION VECTOR. U(MNN) : ON RETURN, U CONTAINS THE LAGRANGE MULTIPLIERS. THE FIRST M POSITIONS ARE RESERVED FOR THE MULTIPLIERS OF THE M LINEAR CONSTRAINTS AND THE SUBSEQUENT ONES FOR THE MULTIPLIERS OF THE LOWER AND UPPER BOUNDS. ON SUCCESSFUL TERMINATION, ALL VALUES OF U WITH RESPECT TO INEQUALITIES AND BOUNDS SHOULD BE GREATER OR EQUAL TO ZERO. IOUT : INTEGER INDICATING THE DESIRED OUTPUT UNIT NUMBER, I.E. ALL WRITE-STATEMENTS START WITH 'WRITE(IOUT,... '. IFAIL : SHOWS THE TERMINATION REASON. IFAIL = 0 : SUCCESSFUL RETURN. IFAIL = 1 : TOO MANY ITERATIONS (MORE THAN 40*(N+M)). IFAIL = 2 : ACCURACY INSUFFICIENT TO SATISFY CONVERGENCE CRITERION. IFAIL = 5 : LENGTH OF A WORKING ARRAY IS TOO SHORT. IFAIL > 10 : THE CONSTRAINTS ARE INCONSISTENT. IPRINT : OUTPUT CONTROL. IPRINT = 0 : NO OUTPUT OF QL0001. IPRINT > 0 : BRIEF OUTPUT IN ERROR CASES. WAR(LWAR) : REAL WORKING ARRAY. THE LENGTH LWAR SHOULD BE GRATER THAN 3*NMAX*NMAX/2 + 10*NMAX + 2*MMAX. IWAR(LIWAR): INTEGER WORKING ARRAY. THE LENGTH LIWAR SHOULD BE AT LEAST N. IF IWAR(1)=0 INITIALLY, THEN THE CHOLESKY DECOMPOSITION WHICH IS REQUIRED BY THE DUAL ALGORITHM TO GET THE FIRST UNCONSTRAINED MINIMUM OF THE OBJECTIVE FUNCTION, IS PERFORMED INTERNALLY. OTHERWISE, I.E. IF IWAR(1)=1, THEN IT IS ASSUMED THAT THE USER PROVIDES THE INITIAL FAC- TORIZATION BY HIMSELF AND STORES IT IN THE UPPER TRIAN- GULAR PART OF THE ARRAY C.

A NAMED COMMON-BLOCK /CMACHE/EPS MUST BE PROVIDED BY THE USER, WHERE EPS DEFINES A GUESS FOR THE UNDERLYING MACHINE PRECISION.

AUTHOR: K. SCHITTKOWSKI, MATHEMATISCHES INSTITUT, UNIVERSITAET BAYREUTH, 8580 BAYREUTH, GERMANY, F.R.

VERSION: 1.4 (MARCH, 1987)

used only for defining RandomVarVMatrix

< For apply()

< For isfile() mtime() For isfile() mtime() < For uniform_multinomial_sample() < for dot, powdistance externalProductAcc for getPid, getUser

< For isfile() < For the seed stuff. < For the splitter stuff.

< For isfile() < For the seed stuff. < For the splitter stuff. < For the new_set stuff.

< For isfile() < For the seed stuff. < For the splitter stuff. < For the new_set stuff. < For the shuffle stuff.

< for push_heap

< for priority_queue<>

< For eigenVecOfSymmMat.

< For definition of TVec

< For mtime. < For smartLoadObject


Typedef Documentation

Definition at line 93 of file mesh_decl.h.

Definition at line 59 of file BallTreeNearestNeighbors.h.

Definition at line 52 of file BinaryBallTree.h.

typedef boost::is_convertible<void,int>::type PLearn::boost_false_type

Definition at line 144 of file ObjectConversions.h.

typedef boost::is_convertible<int,int>::type PLearn::boost_true_type

Definition at line 143 of file ObjectConversions.h.

Definition at line 52 of file ChemicalICP.h.

typedef int(* PLearn::compare_function)(const void *, const void *)

Definition at line 232 of file general.h.

typedef const map<int, real> PLearn::ConstSparseVec

Definition at line 14 of file ProbabilitySparseMatrix.h.

typedef map<const void*,void*> PLearn::CopiesMap

Global typedef to make the map of copied objects (needed by the deep copy mechanism in Object) more palatable.

Definition at line 73 of file CopiesMap.h.

Definition at line 52 of file Correspondence.h.

a cost function maps (output,target) to a loss

************ CostFunc *

Definition at line 313 of file Kernel.h.

typedef int PLearn::CTime

Calendar time.

Definition at line 65 of file Calendar.h.

Range of calendar times.

Definition at line 95 of file Calendar.h.

Vector of calendar times.

Definition at line 71 of file Calendar.h.

Definition at line 88 of file mesh_decl.h.

typedef graph_traits<graph>::edge_iterator PLearn::edge_iterator

Definition at line 91 of file mesh_decl.h.

typedef property< edge_ppt_t, MEdge, property< edge_index_t, int > > PLearn::edge_ppt_

Definition at line 78 of file mesh_decl.h.

In general, if there are N fields, x_1...x_N, and each can take y_i values, then the discrete value is:

A field that maps multiple discrete fields onto a single discrete value. The resulting value is determined in a like manner to indexing into a multidimensional array. For example, suppose we have three base fields: x1, x2 and x3. x1 can take 5 values (0 to 4), x2 can take 10 values, and x3 can take 2 values. Then the resulting discrete value is:

where /f$ {j=N+1}^N /f$ is defined to be 1.

For convenience, this class inherites from SDBVMFieldDiscrete, but does not use the inherited source_ member.

Definition at line 864 of file SDBVMat.h.

Definition at line 90 of file GenericNearestNeighbors.h.

Definition at line 57 of file TypeFactory.h.

Definition at line 56 of file TypeFactory.h.

typedef adjacency_list< listS, listS, undirectedS, vertex_ppt_, edge_ppt_, graph_ppt_ > PLearn::graph

Definition at line 82 of file mesh_decl.h.

typedef PP< Graph_ > PLearn::Graph

Definition at line 85 of file mesh_decl.h.

typedef property< graph_ppt_t, MGraph > PLearn::graph_ppt_

Definition at line 79 of file mesh_decl.h.

typedef bool(* PLearn::ISA_METHOD)(const Object *o)

Definition at line 58 of file TypeFactory.h.

Definition at line 47 of file Tensor.h.

typedef double PLearn::JTime

Julian time.

Definition at line 62 of file Calendar.h.

Vector of Julian times.

Definition at line 68 of file Calendar.h.

typedef map<double, double> PLearn::map_double_double

Definition at line 86 of file CopiesMap.h.

typedef map<double, string> PLearn::map_double_string

Definition at line 82 of file CopiesMap.h.

typedef map<float, float> PLearn::map_float_float

Definition at line 85 of file CopiesMap.h.

typedef map<float, string> PLearn::map_float_string

Definition at line 83 of file CopiesMap.h.

typedef map<int, string> PLearn::map_int_string

Definition at line 88 of file CopiesMap.h.

typedef map<string, double> PLearn::map_string_double

Definition at line 81 of file CopiesMap.h.

typedef map<string, float> PLearn::map_string_float

Some typedefs to use the NODEEPCOPY macro with.

Definition at line 80 of file CopiesMap.h.

typedef map<string, int> PLearn::map_string_int

Definition at line 87 of file CopiesMap.h.

typedef map<string, string> PLearn::map_string_string

Definition at line 84 of file CopiesMap.h.

typedef TMat<real> PLearn::Mat

Definition at line 967 of file TMat_decl.h.

Definition at line 418 of file RandomVar.h.

typedef bool(* PLearn::MeasurerCallbackFunction)(int t, const Vec &costs)

Definition at line 77 of file Measurer.h.

Definition at line 52 of file MeshEdge.h.

Definition at line 63 of file MeshFace.h.

Definition at line 57 of file MeshGraph.h.

Definition at line 54 of file MeshMatch.h.

Definition at line 48 of file SurfaceTemplate/Molecule.h.

Definition at line 10 of file Template.h.

Definition at line 48 of file MoleculeTemplate.h.

Definition at line 53 of file MeshVertex.h.

typedef Object*(* PLearn::NEW_OBJECT)()

Typedef for the "new instance" function type, which returns a default-initialized Object.

Definition at line 55 of file TypeFactory.h.

typedef std::vector< PP<OptionBase> > PLearn::OptionList

Definition at line 328 of file OptionBase.h.

typedef std::map<std::string, PP<OptionBase> > PLearn::OptionMap

Definition at line 329 of file OptionBase.h.

Definition at line 92 of file mesh_decl.h.

Definition at line 89 of file StatsCollector.h.

Definition at line 58 of file Calendar.h.

Definition at line 17 of file Molecule.h.

typedef ofstream PLearn::pofstream

The stream classes.

Definition at line 321 of file PLMPI.h.

Definition at line 570 of file Learner.h.

a profit function maps (output,target) to a profit

********************************************************************** FINANCIAL STUFF

Definition at line 321 of file Kernel.h.

Definition at line 196 of file SDBVMat.h.

Definition at line 661 of file SDBVMat.h.

Definition at line 139 of file SDBVMat.h.

Definition at line 131 of file RealFunction.h.

A utility typedef for the common case.

Definition at line 1173 of file SimpleDB.h.

typedef PPointableSet::iterator PLearn::SetIterator

Definition at line 22 of file Set.h.

typedef map<int, real> PLearn::SparseVec

Definition at line 13 of file ProbabilitySparseMatrix.h.

Definition at line 374 of file StatsIterator.h.

Definition at line 56 of file SurfaceMesh.h.

Definition at line 402 of file Tensor.h.

Definition at line 47 of file MemoryMap.h.

Definition at line 575 of file pl_math.h.

Definition at line 576 of file pl_math.h.

typedef std::map<string,TypeMapEntry> PLearn::TypeMap

Definition at line 123 of file TypeFactory.h.

typedef TVec<real> PLearn::Vec

Definition at line 906 of file TVec_decl.h.

Definition at line 87 of file mesh_decl.h.

Definition at line 90 of file mesh_decl.h.

typedef property< vertex_ppt_t, MVertex, property< vertex_index_t, int > > PLearn::vertex_ppt_

Definition at line 77 of file mesh_decl.h.

typedef void(* PLearn::VOIDFUNC)()

Definition at line 52 of file StaticInitializer.h.


Enumeration Type Documentation

Enumerator:
NT_NOT_NUMERIC 
NT_ORDINAL 
NT_CARDINAL 
NT_CURRENCY 
NT_PREFIXED 
NT_SUFFIXED 
NT_RANGE 
NT_TIME 
NT_CODE 
NT_PERCENT 
NT_UNKNOWN_NUMERIC_TYPE 

looks numeric, but none of the above (ana or something)

Definition at line 66 of file TypesNumeriques.h.

             {
    NT_NOT_NUMERIC          = 0x0000,
    NT_ORDINAL              = 0x0001, 
    NT_CARDINAL             = 0x0002,
    NT_CURRENCY             = 0x0004,
    NT_PREFIXED             = 0x0008,
    NT_SUFFIXED             = 0x0010,
    NT_RANGE                = 0x0020,
    NT_TIME                 = 0x0040, 
    NT_CODE                 = 0x0080, 
    NT_PERCENT              = 0x0100, 
    NT_UNKNOWN_NUMERIC_TYPE = 0x8000  
} eNumericType;

A schema is simply a vector of field definitions. A field definition is a structure containing a field type and a precision. The meaning of precision is always the length in byte of the type.

Type : What Precision is:

Enumerator:
Unknown 
StringType 
CharacterType 
SignedCharType 
ShortType 
IntType 
FloatType 
DoubleType 
DateType 

Definition at line 103 of file SimpleDB.h.

Code a real number into a vector. Possible codings are one-hot-like variations, and, yes, identity. At the moment, the coding is specified by a simple enum, but later could be upgraded to support derived classes as well.

This class supports remapping MISSING_VALUEs that are passed to setOutput onto some arbitrary real number (including MISSING_VALUE).

One-hot coding supports a special treatment regarding missing values: if a MISSING_VALUE is passed to setOutput, and the missing_values_mapping leaves it as-is, and one-hot coding is in effect, all the elements of the one-hot vector are set to MISSING_VALUE.

Enumerator:
SDBVMUnknownCoding 
SDBVMNumeric 

straight output

SDBVMOneHot 

classic one-hot

SDBVMOneHotMinus1 

One-hot vector containing.

all but first element (which is skipped)

Definition at line 65 of file SDBVMat.h.

Enumerator:
FACE 
VERTEX1 
VERTEX2 
VERTEX3 
EDGE1 
EDGE2 
EDGE3 

Definition at line 56 of file geometry.h.

Enumerator:
VLEVEL_MAND 
VLEVEL_IMP 
VLEVEL_NORMAL 
VLEVEL_DBG 
VLEVEL_EXTREME 

Definition at line 73 of file pl_log.h.

                    {
    VLEVEL_MAND     = 0,    // Mandatory
    VLEVEL_IMP      = 1,    // Important
    VLEVEL_NORMAL   = 5,    // Normal
    VLEVEL_DBG      = 10,   // Debug Info
    VLEVEL_EXTREME  = 500   // Extreme Verbosity
}; 

Function Documentation

PStream & PLearn::_tostring_static_pstream_ ( bool  lock,
PStream::mode_t  io_formatting = PStream::raw_ascii 
)

Returns an internal static PStream pointing to a StringPStreamBuf This should first be called with lock=true to acquire the lock on the stream (and set the io_formatting and clear the string buffer) It should then be called with lock=false to flush the stream and release the lock and clear the outmap.

Definition at line 52 of file tostring.cc.

References PLearn::StringPStreamBuf::clear(), PLearn::PStream::clearOutMap(), exitmsg(), PLearn::PStream::flush(), and PLearn::PStream::setOutMode().

Referenced by tostring().

{
    static bool locked = false;
    static string s;
    static StringPStreamBuf* pbuf = 0;
    static PStream sout;    

    if(!pbuf)
    {
        pbuf = new StringPStreamBuf(&s, "w");
        sout = pbuf;
    }

    if(lock)
    {
        if(locked)
            exitmsg("In %s, already locked! Operations for PStream " 
                    "serialization (operator <<) should NEVER call "
                    "tostring", __FUNCTION__);             
        pbuf->clear();
        sout.setOutMode(io_formatting);
        locked = true;
    }
    else // unlock
    {
        if(!locked)
            exitmsg("In %s, already unlocked! "
                    "This should never happen", __FUNCTION__);
        sout.flush();
        sout.clearOutMap();
        locked = false;
    }

    return sout;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::abs ( Var  v) [inline]

Definition at line 73 of file AbsVariable.h.

Referenced by PLearn::RegressionTreeRegisters::bestSplitInRow(), PLearn::ThresholdBpropVariable::bprop(), PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::RepeatSplitter::build_(), PLearn::RegressionTreeNode::compareSplit(), PLearn::LocalMedBoost::computeCostsFromOutputs(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::MultiClassAdaBoost::computeCostsFromOutputs_(), PLearn::RegressionTree::computeCostsFromOutputsAndNodes(), PLearn::MultiClassAdaBoost::computeOutputAndCosts(), PLearn::PruningLinearRegressor::computeTRatio(), PLearn::PCA::em_orth_algo(), entropy(), PLearn::RBMModule::fprop(), PLearn::CCCostVariable::fprop(), PLearn::EarlyStoppingOracle::generateNextTrial(), PLearn::RegressionTreeMulticlassLeaveProb::getOutputAndError(), PLearn::RegressionTreeMulticlassLeaveFast::getOutputAndError(), PLearn::RegressionTreeMulticlassLeave::getOutputAndError(), PLearn::RegressionTreeNode::initNode(), PLearn::ProductRandomVariable::invertible(), makeItSymmetric(), PLearn::Learner::measure(), PLearn::DiverseComponentAnalysis::nonlinear_transform(), norm(), pownorm(), PLearn::SequentialModelSelector::sequenceCost(), PLearn::RealRange::span(), PLearn::SumAbsVariable::symbolicBprop(), PLearn::WPLS::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PLS::train(), PLearn::NGramDistribution::train(), PLearn::AdaBoost::train(), and PLearn::HistogramDistribution::variance().

{ return new AbsVariable(v); }

Here is the caller graph for this function:

template<class T >
void PLearn::absargmax ( const TMat< T > &  mat,
int maxi,
int maxj 
)

Definition at line 49 of file SparseIncrementalAffineTransformVariable.cc.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::SparseIncrementalAffineTransformVariable::bprop().

{
  #ifdef BOUNDCHECK
  if(mat.length()==0 || mat.width()==0)
    PLERROR("IN void argmax(const TMat<T>& mat, int& maxi, iny& maxj) mat has 0 size");
  #endif
  T* m_i = mat.data();
  maxi=0;
  maxj=0;
  double maxval = m_i[0];
  for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
    for(int j=0; j<mat.width(); j++)
      if(fabs(m_i[j])>maxval)
        {
          maxval = fabs(m_i[j]);
          maxi = i;
          maxj = j;
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

CostFunc PLearn::absolute_deviation ( int  singleoutputindex) [inline]

Definition at line 161 of file DistanceKernel.cc.

{ 
    if(singleoutputindex>=0)
        return new SelectedOutputCostFunction(new DistanceKernel(1.0),singleoutputindex); 
    else
        return new DistanceKernel(1.0); 
}
void PLearn::absolute_path ( )

Definition at line 237 of file PPathTest.cc.

                      :/dorionc", "/home/dorionc" );
  
    MAND_LOG << boolstr( absolute == absolute_str ) << endl << endl;

    split_behavior( "absolute('" + display_str + "').drive() == ...",           
                    "r:", "" );
  
    MAND_LOG << boolstr( absolute.drive() == drive ) << endl << endl;
}

// Should all be true
void someAsserts()
{
    MAND_LOG << plhead("Asserts") << endl;

    MAND_LOG << plhead("The special dirnames . and ..") << endl;  

    ASSERT( "PPath('./foo/bar') == 'foo/bar'",
            PPath("./foo/bar") == "foo/bar" );
    
    ASSERT( "PPath('foo/./bar') == 'foo/bar'",
            PPath("foo/./bar") == "foo/bar" );

    ASSERT( "PPath('foo/../bar') == 'bar'",
            PPath("foo/../bar") == "bar" );

    ASSERT( "PPath('./foo/bar/../bar/../../foo/./bar') == 'foo/bar'",
            PPath("./foo/bar/../bar/../../foo/./bar") == "foo/bar" );
Var PLearn::accessElement ( const Vec &  v,
Var  index 
) [inline]

Definition at line 82 of file VecElementVariable.h.

Referenced by PLearn::AddCostToLearner::build_().

{ return new VecElementVariable(v,index); }

Here is the caller graph for this function:

Var PLearn::accessRow ( const Mat &  m,
Var  index 
) [inline]

Definition at line 84 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
static PP<StatsCollector> PLearn::accumInStatsCol ( string  costname,
string  file1,
string  file2 
) [static]

Definition at line 85 of file PairwiseDiffsCommand.cc.

References getDataSet(), PLearn::VMat::getFieldIndex(), i, PLearn::VMat::length(), min(), PLERROR, and PLWARNING.

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

{
    VMat data1 = getDataSet(file1);
    VMat data2 = getDataSet(file2);
    int index1 = data1->getFieldIndex(costname);
    int index2 = data2->getFieldIndex(costname);
    if (index1 < 0)
        PLERROR("PairwiseDiffsCommand: fieldname '%s' does not exist in file '%s'",
                costname.c_str(), file1.c_str());
    if (index2 < 0)
        PLERROR("PairwiseDiffsCommand: fieldname '%s' does not exist in file '%s'",
                costname.c_str(), file2.c_str());

    int len = min(data1.length(), data2.length());
    if (len != data1.length() || len != data2.length())
        PLWARNING("PairwiseDiffsCommand: files '%s' and '%s' do not contain the same "
                  "number of rows; only comparing the first %d rows",
                  file1.c_str(), file2.c_str(), len);

    PP<StatsCollector> sc = new StatsCollector;
    for (int i=0; i<len; ++i) {
        real value1 = data1(i,index1);
        real value2 = data2(i,index2);
        sc->update(value1-value2);
    }
    return sc;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::add ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2002 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("add: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = s1[i]+s2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::add ( const TVec< T > &  source1,
source2,
TVec< T > &  destination 
)

Definition at line 2021 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = s1[i]+source2;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::add ( const TMat< T > &  m1,
const TMat< T > &  m2,
TMat< T > &  destination 
)

Definition at line 5986 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(m1.width()!=m2.width() || m1.length()!=m2.length()
       || m1.width()!=destination.width() || m1.length()!=destination.length())
        PLERROR("IN substract(m1(%d,%d), m2(%d,%d), dest(%d,%d)): args must have same dimensions",
                m1.length(),m1.width(),m2.length(),m2.width(),destination.length(),
                destination.width());
#endif
    T* m1_i = m1.data();
    T* m2_i = m2.data();
    T* d_i = destination.data();
    int m1_mod = m1.mod();
    int m2_mod = m2.mod();
    int d_mod = destination.mod();
    int w = m1.width();
    for (int i=0;i<m1.length();i++,m1_i+=m1_mod,m2_i+=m2_mod,d_i+=d_mod)
        for (int j=0;j<w;j++)
            d_i[j] = m1_i[j] + m2_i[j];
}

Here is the call graph for this function:

SparseMatrix PLearn::add ( Array< SparseMatrix > &  matrices)

add a bunch of sparse matrices and return result

Definition at line 297 of file SparseMatrix.cc.

References PLearn::SparseMatrix::beginRow, PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), PLearn::SparseMatrix::endRow, i, j, PLearn::TVec< T >::length(), PLERROR, PLearn::TVec< T >::resize(), PLearn::SparseMatrix::row, PLearn::TVec< T >::size(), and PLearn::SparseMatrix::values.

Referenced by PLearn::Hash< KeyType, DataType >::addAndResize(), PLearn::MinusRandomVariable::EMBprop(), PLearn::RBMLateralBinomialLayer::fprop(), PLearn::SequentialModelSelector::matlabSave(), PLearn::SequentialLearner::matlabSave(), matlabSave(), operator+(), and substract().

{
    int n_mat = matrices.size();
    if (n_mat<1) PLERROR("add(Array<SparseMatrix>) argument is empty!");
    int n_rows = matrices[0].n_rows;
    int n_columns = matrices[0].beginRow.length();
    for (int i=1;i<n_mat;i++)
        if (n_rows != matrices[i].n_rows)
            PLERROR("add(SparseMatrix(%d,%d)+SparseMatrix(%d,%d): both should have same dimensions",
                    n_rows,n_columns,matrices[i].n_rows,matrices[i].beginRow.length());
    int n_non_zero = 0;
    for (int i=0;i<n_mat;i++)
        n_non_zero+=matrices[i].row.length(); // UPPER BOUND ON ACTUAL n_non_zero

    SparseMatrix C(n_rows,n_columns,n_non_zero);

    int n_actual_non_zero=0;
    // the data is stored column-wise
    Vec column(n_rows);
    real* v=column.data();
    for (int j=0;j<n_columns;j++)
    {
        column.clear();
        for (int k=0;k<n_mat;k++)
            for (int i=(int)matrices[k].beginRow[j];i<=(int)matrices[k].endRow[j];i++)
                v[(int)matrices[k].row[i]]+=matrices[k].values[i];
        C.beginRow[j]=n_actual_non_zero;
        for (int i=0;i<n_rows;i++)
            if (v[i]!=0)
            {
                C.row[n_actual_non_zero]=i;
                C.values[n_actual_non_zero]=v[i];
                n_actual_non_zero++;
            }
        C.endRow[j]=n_actual_non_zero-1;

    }
    C.row.resize(n_actual_non_zero);
    C.values.resize(n_actual_non_zero);
    return C;
}

Here is the call graph for this function:

Here is the caller graph for this function:

std::pair< edge_descriptor, bool > PLearn::add_edge_ifnew ( const vertex_descriptor &  u,
const vertex_descriptor &  v,
const graph::edge_property_type &  ep,
graph g 
)

Definition at line 1438 of file SurfaceMesh.cc.

Referenced by PLearn::SurfaceMesh::buildEdges().

{
  out_edge_iterator ei, ei_end;
  for( tie(ei,ei_end)=out_edges(u,g) ; ei != ei_end ; ei++ )
  {
    if( target( *ei, g ) == v )
    {
      pair< edge_descriptor, bool > result( *ei, false );
      return result;
    }
  }
  pair< edge_descriptor, bool > result = add_edge( u, v, ep, g );
  return result;
}

Here is the caller graph for this function:

std::pair< edge_descriptor, bool > PLearn::add_edge_ifnew ( const vertex_descriptor &  u,
const vertex_descriptor &  v,
graph g 
)

Definition at line 1456 of file SurfaceMesh.cc.

{
  out_edge_iterator ei, ei_end;
  for( tie(ei,ei_end)=out_edges(u,g) ; ei != ei_end ; ei++ )
  {
    if( target( *ei, g ) == v )
    {
      pair< edge_descriptor, bool > result( *ei, false );
      return result;
    }
  }
  pair< edge_descriptor, bool > result = add_edge( u, v, g );
  return result;
}
VMat PLearn::add_missing ( VMat  source,
const TVec< int > &  missing_values_columns 
) [inline]

Definition at line 133 of file AddMissingVMatrix.h.

References PLearn::AddMissingVMatrix::build(), PLearn::TVec< T >::length(), PLearn::AddMissingVMatrix::missing_values_columns, PLearn::TVec< T >::resize(), and PLearn::SourceVMatrix::source.

Referenced by PLearn::MultiTaskSeparationSplitter::getSplit().

  {
    AddMissingVMatrix* ret = new AddMissingVMatrix();
    ret->source = source;
    ret->missing_values_columns.resize(missing_values_columns.length());
    ret->missing_values_columns << missing_values_columns;
    ret->build();
    return ret;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::add_months_to_date ( int  xyymmdd,
int  nmonths 
) [inline]

Takes a date (in cyymmdd or yyyymmdd format) and adds the given number of months (may be negative) Returns result in same format.

Definition at line 191 of file PDate.h.

{
    int xyy  = xyymmdd/10000;
    int mmdd = xyymmdd%10000;
    int mm   = mmdd/100;
    int dd   = mmdd%100;
    
    int monthpos = xyy*12+(mm-1)+nmonths;
    xyy = monthpos/12;
    mm  = 1+monthpos%12;
    return xyy*10000+mm*100+dd;
}
void PLearn::addDiffPrefix ( PLearnDiff *  diffs,
const string &  prefix,
int  n 
)

Just call diffs->addDiffPrefix(prefix, n).

This function is used so that it can be forward-declared.

Definition at line 108 of file PLearnDiff.cc.

References PLearn::PLearnDiff::addDiffPrefix(), and PLASSERT.

Referenced by diff().

{
    PLASSERT( diffs );
    diffs->addDiffPrefix(prefix, n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::addDiffPrefix ( const string &  prefix,
PLearnDiff *  diffs,
int  n 
)

Add 'prefix' in front of the last 'n' difference names in 'diffs'.

void PLearn::addEigenMatrices ( Mat  A_evec,
Vec  A_eval,
Mat  B_evec,
Vec  B_eval,
Mat  C_evec,
Vec  C_eval,
bool  inverses 
)

Definition at line 372 of file distr_maths.cc.

References PLearn::TMat< T >::clear(), d, eigenVecOfSymmMat(), externalProductScaleAcc(), i, PLearn::TMat< T >::length(), and PLearn::TMat< T >::resize().

{
    static Mat C;
    int d=A_evec.length();
    C.resize(d,d);
    C.clear();
    if (inverses)
        for (int i=0;i<d;i++)
        {
            real ai = A_eval[i], bi = B_eval[i];
            externalProductScaleAcc(C,A_evec(i),A_evec(i),ai!=0 ?1/ai:0);
            externalProductScaleAcc(C,B_evec(i),B_evec(i),bi!=0 ?1/bi:0);
        }
    else
        for (int i=0;i<d;i++)
        {
            externalProductScaleAcc(C,A_evec(i),A_evec(i),A_eval[i]);
            externalProductScaleAcc(C,B_evec(i),B_evec(i),B_eval[i]);
        }
    eigenVecOfSymmMat(C,d,C_eval,C_evec,false);
    if (inverses)
        for (int i=0;i<d;i++)
        {
            real ci = C_eval[i];
            if (ci!=0) C_eval[i] = 1/ci;
        }
}

Here is the call graph for this function:

void PLearn::addFileAndDateVariables ( const PPath &  filepath,
map< string, string > &  variables,
const time_t &  latest 
)

Given a filename, generates the standard PLearn variables FILEPATH, DIRPATH, FILENAME, FILEBASE, FILEEXT, DATE, TIME and DATETIME and adds them to the map of variables passed as an argument.

Definition at line 625 of file fileutils.cc.

References PLearn::PPath::absolute(), PLearn::PPath::basename(), PLearn::PPath::dirname(), PLearn::PPath::extension(), PLearn::PPath::getenv(), PLearn::PPath::no_extension(), and tostring().

Referenced by PLearn::PyPLearnScript::process(), and readFileAndMacroProcess().

{
    // Define new local variables
    variables["HOME"]        = PPath::getenv("HOME");
  
    const PPath fpath        = filepath.absolute();
    variables["FILEPATH"]    = fpath;
    variables["DIRPATH"]     = fpath.dirname();

    const PPath basename     = fpath.basename();
    variables["FILENAME"]    = basename;
    variables["FILEBASE"]    = basename.no_extension();
    variables["FILEEXT"]     = fpath.extension();
  
    // Compute DATE, TIME, and DATETIME variables
    time_t curtime = time(NULL);
    struct tm *broken_down_time = localtime(&curtime);
    const int SIZE = 100;
    char time_buffer[SIZE];
    strftime(time_buffer,SIZE,"%Y%m%d:%H%M%S",broken_down_time);
    variables["DATETIME"] = time_buffer;
    strftime(time_buffer,SIZE,"%Y%m%d",broken_down_time);
    variables["DATE"] = time_buffer;
    strftime(time_buffer,SIZE,"%H%M%S",broken_down_time);
    variables["TIME"] = time_buffer;
    variables["MTIME"] = tostring(latest);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::addIfNonMissing ( const TVec< T > &  source,
const TVec< int > &  nnonmissing,
TVec< T >  destination 
)

Definition at line 7240 of file TMat_maths_impl.h.

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

Referenced by PLearn::ExpMeanStatsIterator::update(), and PLearn::MeanStatsIterator::update().

{
#ifdef BOUNDCHECK
    if (source.length()!=nnonmissing.length() || source.length()!=destination.length())
        PLERROR("addIfNonMissing: all arguments should have the same length, got %d,%d,%d\n",
                source.length(),nnonmissing.length(),destination.length());
#endif
    T* s=source.data();
    T* d=destination.data();
    int* n=nnonmissing.data();
    int size=source.length();
    for (int i=0;i<size;i++)
        if (finite(s[i]))
        {
            d[i] += s[i];
            n[i]++;
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

vector<string> PLearn::addpostfix ( const vector< string > &  names,
const string &  postfix 
) [inline]

returns the list of names, but with an appended postfix

Definition at line 221 of file stringutils.h.

References addprepostfix().

{ return addprepostfix("", names, postfix); }

Here is the call graph for this function:

string PLearn::addpostfix ( const string &  text,
const string &  postfix 
) [inline]

Returns a string with the postfix appended to each *line* of the text string.

Definition at line 235 of file stringutils.h.

References addprepostfix().

{ return addprepostfix("", text, postfix); }

Here is the call graph for this function:

vector<string> PLearn::addprefix ( const string &  prefix,
const vector< string > &  names 
) [inline]

returns the list of names, but with a prepended prefix

Definition at line 217 of file stringutils.h.

References addprepostfix().

Referenced by PLearn::HelpSystem::helpOnClass(), and PLearn::HelpSystem::helpOnOption().

{ return addprepostfix(prefix, names, ""); }

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::addprefix ( const string &  prefix,
const string &  text 
) [inline]

Returns a string with the prefix prepended to each *line* of the text string.

Definition at line 230 of file stringutils.h.

References addprepostfix().

{ return addprepostfix(prefix, text, ""); }

Here is the call graph for this function:

TVec< string > PLearn::addprepostfix ( const string &  prefix,
const TVec< string > &  names,
const string &  postfix 
)

Definition at line 49 of file PExperiment.cc.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), and PLearn::TVec< T >::size().

{
    TVec<string> newnames(names.size());
    TVec<string>::const_iterator it = names.begin();
    TVec<string>::iterator newit = newnames.begin();
    while(it!=names.end())
    {
        *newit = prefix + *it + postfix;
        ++it;
        ++newit;
    }
    return newnames;
}

Here is the call graph for this function:

vector< string > PLearn::addprepostfix ( const string &  prefix,
const vector< string > &  names,
const string &  postfix 
)

returns the list of names, but with a prepended prefix and an appended postfix

Definition at line 621 of file stringutils.cc.

Referenced by addpostfix(), addprefix(), PLearn::LayerCostModule::build_(), and PLearn::PLStringutilsTest::perform().

{
    vector<string> newnames(names.size());
    vector<string>::const_iterator it = names.begin();
    vector<string>::iterator newit = newnames.begin();
    while(it!=names.end())
    {
        *newit = prefix + *it + postfix;
        ++it;
        ++newit;
    }
    return newnames;
}

Here is the caller graph for this function:

string PLearn::addprepostfix ( const string &  prefix,
const string &  text,
const string &  postfix 
)

Returns a string with the prefix prepended and the postfix appended to each *line* of the text string.

Definition at line 635 of file stringutils.cc.

{
    size_t startpos = 0;
    size_t endpos = 0;
    string res;
    while(endpos!=string::npos)
    {
        endpos = text.find_first_of("\n",startpos);
        if(endpos!=string::npos)
            res += prefix + text.substr(startpos, endpos-startpos) + postfix
                                                                  + "\n";
        else
            res += prefix + text.substr(startpos) + postfix;
        startpos = endpos + 1;
    }
    return res;
}
void PLearn::addReferenceToFile ( const PPath &  file)

Increase by one the number of references to a file.

This references system is used in order to track which files are currently being used, e.g. to be able to delete a temporary file when it is not used anymore (see TemporaryFileVMatrix and TemporaryDiskVMatrix). Note that in this function (and related functions below), an empty PPath will be ignored (and considered to have no reference to it).

Definition at line 1366 of file fileutils.cc.

References PLearn::PPath::canonical(), count_refs_to_file, and PLearn::PPath::isEmpty().

Referenced by PLearn::TemporaryFileVMatrix::build_(), and PLearn::TemporaryDiskVMatrix::build_().

{
    if (file.isEmpty())
        return;
    string s = file.canonical();
    if (count_refs_to_file.find(s) != count_refs_to_file.end())
        count_refs_to_file[s]++;
    else
        count_refs_to_file[s] = 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::addToColumns ( const TMat< T > &  mat,
const TVec< T >  col,
bool  ignored 
)

Definition at line 4877 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T* row_i=mat.data();
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T col_i=col[i];
        for (int j=0;j<w;j++)
            row_i[j] += col_i;
        row_i+=mat.mod();
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::addToColumns ( RowMapSparseMatrix< T >  mat,
Vec  row,
bool  only_on_non_zeros = true 
)

Definition at line 986 of file RowMapSparseMatrix.h.

References PLearn::RowMapSparseMatrix< T >::addToColumns().

{
    mat.addToColumns(row,only_on_non_zeros);
}

Here is the call graph for this function:

template<class T >
void PLearn::addToDiagonal ( const TMat< T > &  mat,
lambda 
)
template<class T >
void PLearn::addToDiagonal ( const TMat< T > &  mat,
const TVec< T > &  lambda 
)

Definition at line 4768 of file TMat_maths_impl.h.

References d, PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), and PLERROR.

{
#ifdef BOUNDCHECK
    if (lambda.length()!=mat.length())
        PLERROR("Mat(%d)::addToDiagonal(Vec(%d)) inconsistent lengths",
                mat.length(), lambda.length());
#endif
    T *l = lambda.data();
    T *d = mat.data();
    int le= mat.length();
    for (int i=0;i<le;i++,d+=mat.mod()+1,l++) *d += *l;
}

Here is the call graph for this function:

template<class T >
void PLearn::addToMat ( const TMat< T > &  mat,
scalar,
bool  ignored 
)

Definition at line 4919 of file TMat_maths_impl.h.

{ mat += scalar; }
template<class T >
void PLearn::addToRows ( const TMat< T > &  mat,
const TVec< T >  row,
bool  ignored 
)

Definition at line 4865 of file TMat_maths_impl.h.

References i, and PLearn::TMat< T >::length().

{
    int l=mat.length();
    for (int i=0;i<l;i++)
    {
        TVec<T> row_i = mat(i);
        row_i += row;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::addToRows ( RowMapSparseMatrix< T >  mat,
Vec  row,
bool  only_on_non_zeros = true 
)

Definition at line 980 of file RowMapSparseMatrix.h.

References PLearn::RowMapSparseMatrix< T >::addToRows().

{
    mat.addToRows(row,only_on_non_zeros);
}

Here is the call graph for this function:

void PLearn::addToWrappedObjectsSet ( PyObject *  o)

Definition at line 445 of file PythonExtension.cc.

References endl(), PLASSERT, PLERROR, and the_PLearn_python_module.

Referenced by PLearn::ConvertToPyObject< Object * >::newPyObject(), and PLearn::PythonObjectWrapper::refCPPObj().

{
    DBG_MODULE_LOG << "addToWrappedObjectsSet for module: " << PythonObjectWrapper(the_PLearn_python_module)
                   << "\tadding object: " << PythonObjectWrapper(o) << endl;
    PLASSERT(the_PLearn_python_module);
    if(-1 == PyObject_SetAttrString(the_PLearn_python_module, const_cast<char*>("_tmp_wrapped_instance"), o))
        PLERROR("in addToWrappedObjectsSet : cannot add wrapped object to module.");
    PyObject* res= PyRun_String("\nwrapped_PLearn_instances.add(_tmp_wrapped_instance)"
                                "\ndel _tmp_wrapped_instance\n", 
                                Py_file_input, 
                                PyModule_GetDict(the_PLearn_python_module), 
                                PyModule_GetDict(the_PLearn_python_module));
    if(!res)
    {
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in addToWrappedObjectsSet : cannot add wrapped object to set.");
    }
    Py_DECREF(res);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::addXandX2IfNonMissing ( const TVec< T > &  source,
const TVec< int > &  nnonmissing,
TVec< T >  somme,
TVec< T >  somme2 
)

Definition at line 7260 of file TMat_maths_impl.h.

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

Referenced by PLearn::StderrStatsIterator::update(), and PLearn::StddevStatsIterator::update().

{
#ifdef BOUNDCHECK
    if (source.length()!=nnonmissing.length() || source.length()!=somme.length() || source.length()!=somme2.length())
        PLERROR("addIfNonMissing: all arguments should have the same length, got %d,%d,%d,%d\n",
                source.length(),nnonmissing.length(),somme.length(),somme2.length());
#endif
    T* s=source.data();
    T* s1=somme.data();
    T* s2=somme.data();
    int* n=nnonmissing.data();
    int size=source.length();
    for (int i=0;i<size;i++)
        if (finite(s[i]))
        {
            s1[i] += s[i];
            s2[i] += s[i]*s[i];
            n[i]++;
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::affine_transform ( Var  vec,
Var  transformation,
bool  force_row_vec = false 
) [inline]

First row of transformation is the bias.

The boolean 'force_row_vec' may be used when the first input is a a vector, to force the resulting variable to be a row vector, even when the input is a column vector or a scalar. If the first input is a matrix, this parameter is ignored.

Definition at line 96 of file AffineTransformVariable.h.

References get_pointer().

Referenced by PLearn::NonLocalManifoldParzen::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::NNet::buildOutputFromInput(), PLearn::DistRepNNet::buildOutputFromInput(), PLearn::NNet::buildPenalties(), PLearn::DistRepNNet::buildVarGraph(), PLearn::NNet::hiddenLayer(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), and main().

{ 
    if (vec->isVec()) {
        PP<AffineTransformVariable> res =
            new AffineTransformVariable(vec, transformation, false);
        res->force_row_vec = force_row_vec;
        res->build();
        return get_pointer(res);
    }
    else return new MatrixAffineTransformVariable(vec, transformation);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::affine_transform_weight_penalty ( Var  transformation,
real  weight_decay,
real  bias_decay = 0,
string  penalty_type = "L2_square" 
) [inline]
template<class T >
void PLearn::affineMatrixInitialize ( TMat< T >  W,
bool  output_on_columns = true,
real  scale = 1.0 
) [inline]

Definition at line 7050 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), fill_random_uniform(), PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

{
    int n_inputs = output_on_columns?W.width():W.length();
    real delta = scale/n_inputs;
    fill_random_uniform(W,-delta,delta);
    W(0).clear();
}

Here is the call graph for this function:

void PLearn::affineNormalization ( Mat  data,
Mat  W,
Vec  bias,
real  regularizer 
)

Definition at line 587 of file plapack.cc.

References computeMeanAndCovar(), d, eigen_SymmMat(), fast_exact_is_equal(), i, sqrt(), and PLearn::TMat< T >::width().

{
    int d=data.width();
    Vec& mu = bias;
    Mat covar(d,d);
    computeMeanAndCovar(data,mu,covar);
    Vec evalues(d);
    if (!fast_exact_is_equal(regularizer, 0))
        for (int i=0;i<d;i++)
            covar(i,i) += regularizer; 
    int nev=0;
    eigen_SymmMat(covar,evalues,W,nev,true,d,true,true);
    for (int i=0;i<d;i++)
        W(i) *= real(1.0 / sqrt(evalues[i]));
    mu *= - real(1.0); // bias = -mu
}

Here is the call graph for this function:

VarArray PLearn::allSources ( const VarArray &  v)

returns all sources that influence the given vars

Definition at line 1154 of file VarArray.cc.

References PLearn::VarArray::sources(), and PLearn::VarArray::unmarkAncestors().

{
    VarArray result;
    v.unmarkAncestors();
    result = v.sources();
    v.unmarkAncestors();
    return result;
}

Here is the call graph for this function:

Vec PLearn::anglesFromRotationMatrix ( const Mat &  rot)

Definition at line 50 of file SurfaceTemplate/geometry.cc.

References Pi, and sqrt().

Referenced by PLearn::ChemicalICP::minimizeWeightedDistance().

{
    Vec angle( 3 );
    angle[1] = atan2( -rot(2,0), sqrt( rot(0,0)*rot(0,0)+rot(1,0)*rot(1,0) ) );
    angle[2] = atan2( rot(1,0) / cos( angle[1] ), rot(0,0) / cos( angle[1] ) );
    angle[0] = atan2( rot(2,1) / cos( angle[1] ), rot(2,2) / cos( angle[1] ) );

    if( angle[1] * 180 / Pi > 89.9 )
    {
        angle[1] = Pi / 2;
        angle[2] = 0;
        angle[0] = atan2( rot(0,1), rot(1,1) );
    }
    else if( angle[1] * 180.0 / Pi < -89.9 )
    {
        angle[1] = -Pi / 2;
        angle[2] = 0;
        angle[0] = -atan2( rot(0,1), rot(1,1) );
    }

    return( angle * ( real(180.0) / real(Pi) ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::append_neighbors ( VMat  source,
int  n_neighbors,
bool  append_neighbor_indices = false,
Func  transformation = 0 
) [inline]

Definition at line 132 of file AppendNeighborsVMatrix.h.

References PLearn::AppendNeighborsVMatrix::append_neighbor_indices, PLearn::AppendNeighborsVMatrix::build(), PLearn::AppendNeighborsVMatrix::n_neighbors, PLearn::SourceVMatrix::source, and PLearn::AppendNeighborsVMatrix::transformation.

Referenced by local_neighbors_differences(), and PLearn::NonLocalManifoldParzen::train().

{
    AppendNeighborsVMatrix* vmat = new AppendNeighborsVMatrix();
    vmat->source=source;
    vmat->n_neighbors=n_neighbors;
    vmat->transformation = transformation;
    vmat->append_neighbor_indices = append_neighbor_indices;
    vmat->build();
    return vmat;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::append_slash ( const string &  path)
template<class T , class U , class V >
TVec<U> PLearn::apply ( const TVec< T > &  vec,
U(*)(V)  func 
)
template<class T , class U >
void PLearn::apply ( const TVec< T > &  source,
TVec< U > &  destination,
U(*)(T)  func 
)

Transform a vector of T into a vector of U through a unary function.

Definition at line 1891 of file TMat_maths_impl.h.

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

{
    int n=source.length();
    if (n!=destination.length())
        PLERROR("apply: source(%d) and destination(%d) TVec<T>'s must have same length",
                n,destination.length());
    if (n > 0) {
        T* s = source.data();
        U* d = destination.data();
        for(int i=0; i<n; i++)
            d[i]=func(s[i]);
    }
}

Here is the call graph for this function:

template<class T , class U , class V >
void PLearn::apply ( const TVec< T > &  src1,
const TVec< U > &  src2,
TVec< V > &  dest,
V(*)(T, U)  func 
)

Transform a vector of T and a vector of U into a vector of V, through a binary function.

Definition at line 1908 of file TMat_maths_impl.h.

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

{
    int n=src1.length();
    if (n!=dest.length() || n!=src2.length())
        PLERROR("apply: src1, src2 and destination TVec<T>'s must have same length");
    if (n > 0) {
        T* s1 = src1.data();
        U* s2 = src2.data();
        V* d = dest.data();
        for(int i=0; i<n; i++)
            d[i]=func(s1[i],s2[i]);
    }
}

Here is the call graph for this function:

template<class T , class U >
void PLearn::apply ( U(*)(T)  func,
const TMat< T > &  source,
TMat< U > &  destination 
)

Transform a matrix of T into a matrix of U through a unary function.

Definition at line 6791 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

{
    int l=source.length();
    int w=source.width();
    if (l!=destination.length() || w!=destination.width())
        PLERROR("apply: source(%d,%d) TMat<T> and destination(%d,%d) TMat<U> must have same length and width",
                l,w,destination.length(),destination.width());
    for(int i=0; i<l; i++) {
        for(int j=0; j<w; j++)
            destination(i,j)=func(source(i,j));
    }
}

Here is the call graph for this function:

template<class T , class U >
void PLearn::apply ( const TMat< T > &  source,
TMat< U > &  destination,
U(*)(T)  func 
)

Transform a matrix of T into a matrix of U through a unary function Same as above, for coherence with TVec<T>'s notation.

Definition at line 6807 of file TMat_maths_impl.h.

References apply().

{
    apply(func, source, destination);
}

Here is the call graph for this function:

template<class T >
void PLearn::apply ( T(*)(const TVec< T > &)  func,
const TMat< T > &  m,
TMat< T > &  dest 
)

Definition at line 6814 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), m, and PLERROR.

{
    if (dest.length()!=m.length())
        PLERROR("apply: m.length_=%d, dest.length_=%d",
                m.length(),dest.length());
    int l=m.length();
    for (int i=0;i<l;i++)
        dest(i,0)=func(m(i));
}

Here is the call graph for this function:

template<class T >
void PLearn::apply ( T(*)(const TVec< T > &, const TVec< T > &)  func,
const TMat< T > &  m1,
const TMat< T > &  m2,
TMat< T > &  dest 
)

Definition at line 6825 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), and PLERROR.

{
    if (dest.length()!=m1.length() || m1.length()!=m2.length())
        PLERROR("apply: m1.length_=%d, m2.length_=%d, dest.length_=%d",
                m1.length(),m2.length(),dest.length());
    for (int i=0;i<m1.length();i++)
        dest(i,0)=func(m1(i),m2(i));
}

Here is the call graph for this function:

void PLearn::applyGeomTransformation ( const Mat &  rot,
const Vec &  trans,
const Mat &  points_in,
Mat &  points_out 
)

Definition at line 125 of file SurfaceTemplate/geometry.cc.

References PLearn::TMat< T >::length(), productTranspose(), and PLearn::TMat< T >::resize().

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

{
    points_out.resize( points_in.length(), 3 );
    productTranspose( points_out, points_in, rot );
    points_out += trans;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
int PLearn::argmax ( const TVec< T > &  vec)

Definition at line 904 of file TMat_maths_impl.h.

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

Referenced by argmax(), PLearn::MaxSubsampling2DModule::bpropAccUpdate(), PLearn::SelectRowsMultiInstanceVMatrix::build_(), PLearn::MultiTargetOneHotVMatrix::build_(), PLearn::DistRepNNet::buildFuncs(), PLearn::MixtureVMatrix::buildPeriod(), classification_confusion_matrix(), PLearn::NeuralProbabilisticLanguageModel::classification_loss(), PLearn::FeatureSetSequentialCRF::classification_loss(), PLearn::FeatureSetNNet::classification_loss(), columnArgmax(), PLearn::DeepBeliefNet::computeClassifAndFinalCostsFromOutputs(), PLearn::SubsamplingDBN::computeCostsFromOutputs(), PLearn::StructuralLearner::computeCostsFromOutputs(), PLearn::PseudolikelihoodRBM::computeCostsFromOutputs(), PLearn::PartSupervisedDBN::computeCostsFromOutputs(), PLearn::LocalGaussianClassifier::computeCostsFromOutputs(), PLearn::KNNClassifier::computeCostsFromOutputs(), PLearn::KMeansClustering::computeCostsFromOutputs(), PLearn::KFoldLogisticClassifier::computeCostsFromOutputs(), PLearn::IncrementalNNet::computeCostsFromOutputs(), PLearn::HintonDeepBeliefNet::computeCostsFromOutputs(), PLearn::GaussPartSupervisedDBN::computeCostsFromOutputs(), PLearn::GaussianDBNClassification::computeCostsFromOutputs(), PLearn::DiscriminativeRBM::computeCostsFromOutputs(), PLearn::DeepNNet::computeCostsFromOutputs(), PLearn::DeepBeliefNet::computeCostsFromOutputs(), PLearn::ClassifierFromConditionalPDistribution::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::TransformOutputLearner::computeOutput(), PLearn::StackedFocusedAutoassociatorsNet::computeOutput(), PLearn::NeuralProbabilisticLanguageModel::computeOutput(), PLearn::ManifoldParzen::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::FeatureSetSequentialCRF::computeOutput(), PLearn::FeatureSetNNet::computeOutput(), PLearn::FeatureSetNaiveBayesClassifier::computeOutput(), PLearn::DiscriminativeDeepBeliefNet::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::ClassifierFromConditionalPDistribution::computeOutput(), PLearn::TransformOutputLearner::computeOutputAndCosts(), PLearn::FeatureSetSequentialCRF::computeOutputAndCosts(), PLearn::FeatureSetNNet::computeOutputAndCosts(), PLearn::FeatureSetNaiveBayesClassifier::computeOutputAndCosts(), PLearn::SupervisedDBN::density(), PLearn::PartSupervisedDBN::density(), PLearn::HintonDeepBeliefNet::density(), PLearn::GaussPartSupervisedDBN::density(), PLearn::GaussianDBNRegression::density(), PLearn::GaussianDBNClassification::density(), PLearn::ClassMarginCostFunction::evaluate(), PLearn::ClassErrorCostFunction::evaluate(), PLearn::ClassDistanceProportionCostFunction::evaluate(), PLearn::NatGradSMPNNet::fbpropLoss(), PLearn::NatGradNNet::fbpropLoss(), PLearn::mNNet::fbpropLoss(), findClosestPairsOfDifferentClass(), PLearn::PartSupervisedDBN::fineTuneByGradientDescent(), PLearn::HintonDeepBeliefNet::fineTuneByGradientDescent(), PLearn::GaussPartSupervisedDBN::fineTuneByGradientDescent(), PLearn::GaussianDBNClassification::fineTuneByGradientDescent(), PLearn::SubsamplingDBN::fineTuningStep(), PLearn::DeepBeliefNet::fineTuningStep(), PLearn::RBMModule::fprop(), PLearn::NLLErrModule::fprop(), PLearn::MiniBatchClassificationLossVariable::fprop(), PLearn::MaxSubsampling2DModule::fprop(), PLearn::ClassificationLossVariable::fprop(), PLearn::ClassErrorCostModule::fprop(), PLearn::ArgmaxVariable::fprop(), PLearn::ArgmaxModule::fprop(), PLearn::NNet::getCost(), PLearn::NLLErrModule::getTarget(), PLearn::GraphicalBiText::init(), PLearn::PartSupervisedDBN::jointGreedyStep(), PLearn::GaussPartSupervisedDBN::jointGreedyStep(), PLearn::GaussMix::kmeans(), loadUSPS(), PLearn::SubsamplingDBN::onlineStep(), PLearn::DeepBeliefNet::onlineStep(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), PLearn::TMatTest::perform(), PLearn::MaxSubsamplingTest::perform(), PLearn::Grapher::plot_2D_classification(), PLearn::GaussMix::replaceGaussian(), rowArgmax(), scores_to_winners(), PLearn::MaxVariable::symbolicBprop(), PLearn::PseudolikelihoodRBM::test(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::SequentialModelSelector::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::DiscriminativeRBM::train(), PLearn::DeepNNet::train(), PLearn::ToBagClassifier::updateCostAndBagOutput(), and PLearn::Function::verifyGradient().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN int argmax(const TVec<T>& vec) vec has zero length");
#endif
    T* v = vec.data();
    int indexmax = 0;
    T maxval = v[0];
    for(int i=1; i<vec.length(); i++)
        if(v[i]>maxval)
        {
            maxval = v[i];
            indexmax = i;
        }
    return indexmax;
}

Here is the call graph for this function:

template<class T >
int PLearn::argmax ( const TVec< T > &  vec,
bool  ignore_missing 
)

Definition at line 923 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN int argmax(const TVec<T>& vec) vec has zero length");
#endif
    T* v = vec.data();
    int indexmax = -1;
    T maxval = MISSING_VALUE;

    for(int i=0; i<vec.length(); i++)
    {
        if( is_missing(v[i]) )
        {
            if(ignore_missing) continue;
            else PLERROR("argmax(const TVec<T>& vec, bool ignore_missing) encountered a MISSING_VALUE\n"
                         "at index %d and ignore_missing is false.", i);
        }

        if( indexmax == -1 ||
            v[i] > maxval   )
        {
            maxval = v[i];
            indexmax = i;
        }
    }
    return indexmax;
}

Here is the call graph for this function:

template<class T >
void PLearn::argmax ( const TMat< T > &  mat,
int maxi,
int maxj 
)

Definition at line 5285 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN void argmax(const TMat<T>& mat, int& maxi, iny& maxj) mat has 0 size");
#endif
    T* m_i = mat.data();
    maxi=0;
    maxj=0;
    double maxval = m_i[0];
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
            if(m_i[j]>maxval)
            {
                maxval = m_i[j];
                maxi = i;
                maxj = j;
            }
}

Here is the call graph for this function:

template<class T >
int PLearn::argmax ( const TMat< T > &  m)

return maxi*width+maxj

Definition at line 5316 of file TMat_maths_impl.h.

References argmax(), and PLearn::TMat< T >::width().

{
    int imax, jmax;
    argmax(m,imax,jmax);
    return (imax*m.width()+jmax);
}

Here is the call graph for this function:

Var PLearn::argmax ( Var  v) [inline]

Definition at line 76 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
template<class T >
int PLearn::argmin ( const TVec< T > &  vec)

Definition at line 954 of file TMat_maths_impl.h.

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

Referenced by argmin(), columnArgmin(), PLearn::BinaryStump::computeCostsFromOutputs(), PLearn::ArgminVariable::fprop(), PLearn::VariablesTest::perform(), PLearn::TMatTest::perform(), rowArgmin(), PLearn::MinVariable::symbolicBprop(), PLearn::SequentialModelSelector::train(), and PLearn::GaussMix::train().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN int argmin(const TVec<T>& vec) vec has zero length");
#endif
    T* v = vec.data();
    int indexmin = 0;
    T minval = v[0];
    for(int i=1; i<vec.length(); i++)
        if(v[i]<minval)
        {
            minval = v[i];
            indexmin = i;
        }
    return indexmin;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
int PLearn::argmin ( const TVec< T > &  vec,
bool  ignore_missing 
)

Definition at line 973 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN int argmin(const TVec<T>& vec) vec has zero length");
#endif
    T* v = vec.data();
    int indexmin = -1;
    T minval = MISSING_VALUE;

    for(int i=0; i<vec.length(); i++)
    {
        if( is_missing(v[i]) )
        {
            if(ignore_missing) continue;
            else PLERROR("argmin(const TVec<T>& vec, bool ignore_missing) encountered a MISSING_VALUE\n"
                         "at index %d and ignore_missing is false.", i);
        }

        if( indexmin == -1 ||
            v[i] < minval   )
        {
            minval = v[i];
            indexmin = i;
        }
    }
    return indexmin;
}

Here is the call graph for this function:

template<class T >
void PLearn::argmin ( const TMat< T > &  mat,
int mini,
int minj 
)

Stores the position of the min in the 'mini' & 'minj' arg.

Definition at line 5263 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN void argmin(const TMat<T>& mat, int& mini, iny& minj) mat has 0 size");
#endif
    T* m_i = mat.data();
    mini=0;
    minj=0;
    double minval = m_i[0];
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
            if(m_i[j]<minval)
            {
                minval = m_i[j];
                mini = i;
                minj = j;
            }
}

Here is the call graph for this function:

template<class T >
int PLearn::argmin ( const TMat< T > &  m)

return mini*width+minj

Definition at line 5307 of file TMat_maths_impl.h.

References argmin(), and PLearn::TMat< T >::width().

{
    int imin, jmin;
    argmin(m,imin,jmin);
    return (imin*m.width()+jmin);
}

Here is the call graph for this function:

Var PLearn::argmin ( Var  v) [inline]

Definition at line 76 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
Var PLearn::argminOf ( Var  v,
Var  expression,
Var  values_of_v,
VarArray  inputs 
) [inline]

returns the value of v within the_values_of_v that gives the lowest value of expression (which may depend on inputs).

Definition at line 89 of file ArgminOfVariable.h.

{ return new ArgminOfVariable(v, expression, values_of_v, inputs); }
void PLearn::autocorrelation_function ( const VMat &  data,
Mat &  acf 
)

Definition at line 531 of file VMat_basic_stats.cc.

References PLearn::VMat::length(), N, PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), sqrt(), square(), and PLearn::VMat::width().

{
    int T = data.length();
    int N = data.width();
    acf.resize(T-2, N);

    for(int delta=0; delta < T-2; delta++)
    {
        Vec sumT(N);
        Vec sumD(N);
        TVec<Vec> products(N);

        // t = delta
        for(int k=0; k < N; k++)
        {
            real ts = data(delta, k);
            real ds = data(0, k);

            sumT[k] = ts;
            sumD[k] = ds;

            products[k].resize(3);
            products[k][0] = ts*ts;
            products[k][1] = ds*ds;
            products[k][2] = ts*ds;
        }

        for(int t=delta+1; t < T; t++)
        {
            for(int k=0; k < N; k++)
            {
                real ts = data(t, k);
                real ds = data(t-delta, k);

                sumT[k] += ts;
                sumD[k] += ds;

                products[k][0] += ts*ts;
                products[k][1] += ds*ds;
                products[k][2] += ts*ds;
            }
        }

        // Actual computation of the correlation
        for(int k=0; k < N; k++)
        {
            int count = T-delta;
            real multiplied_var_t = products[k][0] - square(sumT[k])/count;
            real multiplied_var_d = products[k][1] - square(sumD[k])/count;
            acf(delta, k) = (products[k][2] - sumT[k]*sumD[k]/count) / sqrt(multiplied_var_t * multiplied_var_d);
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::averageAcrossRowsAndColumns ( const TMat< T > &  mat,
TVec< T > &  avg_across_rows,
TVec< T > &  avg_across_columns,
bool  ignored 
)

Definition at line 4839 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLearn::TVec< T >::resize(), w, and PLearn::TMat< T >::width().

{
    avg_across_rows.resize(mat.width());
    avg_across_columns.resize(mat.length());
    avg_across_rows.clear();
    avg_across_columns.clear();
    T* row_i=mat.data();
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T& avg_cols_i=avg_across_columns[i];
        T* avg_rows = avg_across_rows.data();
        for (int j=0;j<w;j++)
        {
            T row_ij=row_i[j];
            avg_cols_i += row_ij;
            avg_rows[j] += row_ij;
        }
        row_i+=mat.mod();
    }
    avg_across_rows /= mat.length();
    avg_across_columns /= mat.width();
}

Here is the call graph for this function:

template<class T >
void PLearn::averageAcrossRowsAndColumns ( RowMapSparseMatrix< T >  mat,
Vec  avg_across_rows,
Vec  avg_across_columns,
bool  only_on_non_zeros = true 
)

Definition at line 972 of file RowMapSparseMatrix.h.

References PLearn::RowMapSparseMatrix< T >::averageAcrossRowsAndColumns().

{
    mat.averageAcrossRowsAndColumns(avg_across_rows, avg_across_columns, only_on_non_zeros);
}

Here is the call graph for this function:

template<class T >
T PLearn::avgdev ( const TVec< T > &  vec,
meanval,
bool  ignore_missing = false 
)

Definition at line 552 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, is_missing(), PLearn::TVec< T >::length(), MISSING_VALUE, n, PLERROR, and PLearn::TVec< T >::size().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T avgdev(const TVec<T>& vec, T meanval) vec has zero length");
#endif
    double res = 0.0;
    int n = 0;
    if (vec.size() == 0)
        return MISSING_VALUE;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
        if (!is_missing(v[i]))
        {
            res += fabs(v[i]-meanval);
            n++;
        }
        else if (!ignore_missing)
            return MISSING_VALUE;
    if (n == 0)
        return MISSING_VALUE;
    else
        return T(res/n);
}

Here is the call graph for this function:

void PLearn::backConvolve1D ( const Vec &  source_signal,
const Vec &  kernel,
const Vec &  dest_signal,
int  step = 1,
bool  accumulate = true 
)

Back-convolve INTO a "source" signal of length NS with a kernel of length NK and FROM a "destination" signal which should be of length NS-NK+1 This is EXACTLY the TRANSPOSE operation of a convolve1D with the same arguments, with computations flowing in the other direction.

for i=0 to nd-1: for j=0 to nk-1: source_signal[i*step+j] += dest_signal[i]*kernel[j] If the accumulate flag is not set, then source_signal is first cleared. N.B. THIS IS THE SAME AS COMPUTING dC/dsource_signal (into the source_signal argument), GIVEN dC/ddest_signal, i.e. this function does part of the work done by convolve1Dbackprop.

for i=0 to nd-1: for j=0 to nk-1: source_signal[i*step+j] += dest_signal[i]*kernel[j]

Definition at line 81 of file convolutions.cc.

References PLearn::TVec< T >::clear(), d, PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), and PLERROR.

{
    int nk=kernel.length();
    int nd=dest_signal.length();
#ifdef BOUNDCHECK
    int ns=source_signal.length();
    if (step<1)
        PLERROR("backConvolve1D: step (%d) should be a positive integer\n",
                step);
    if (ns!=step*(nd-1)+nk)
        PLERROR("backConvolve1D: source_signal.length() (%d) should equal %d:\n"
                "step (%d) * (dest_signal.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                ns,step*(nd-1)+nk,step,nd,nk);
#endif
    if (!accumulate)
        source_signal.clear();
    real* s=source_signal.data();
    real* k=kernel.data();
    real* d=dest_signal.data();
    for (int i=0;i<nd;i++,s+=step)
    {
        real di=d[i];
        for (int j=0;j<nk;j++)
            s[j] += di*k[j];
    }
}

Here is the call graph for this function:

void PLearn::backConvolve1Dbackprop ( const Vec &  kernel,
const Vec &  dest_signal,
const Vec &  dC_ddest_signal,
const Vec &  dC_dsource_signal,
const Vec &  dC_dkernel,
int  step,
bool  accumulate 
)

Increment dC/ddest_signal and dC/dkernel, given dC/ddest_signal, with source_signal computed as per backConvolve1D(source_signal, kernel, dest_signal): dC/ddest_signal[i] += sum_{j=0}^{NK-1} dC_dsource_signal[i+j]*kernel[j] dC/dkernel[j] += sum_{i=0}^{ND-1} dC_dsource_signal[i+j]*dest_signal[i].

for i=0 to nd-1: for j=0 to nk-1: dC_ddest_signal[i] += dC_dsource_signal[i*step+j]*kernel[j] dC_dkernel[j] += dC_dsource_signal[i*step+j]*dest_signal[i]

Definition at line 206 of file convolutions.cc.

References PLearn::TVec< T >::clear(), d, PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), and PLERROR.

{
    int nk=kernel.length();
    int nd=dest_signal.length();
#ifdef BOUNDCHECK
    int ns=dC_dsource_signal.length();
    if (step<1)
        PLERROR("backConvolve1Dbackprop: step (%d) should be a positive"
                " integer\n",
                step);
    if (ns!=step*(nd-1)+nk)
        PLERROR("backConvolve1Dbackprop: dC_dsource_signal.length() (%d)\n"
                "should equal %d:\n"
                "step (%d) * (dest_signal.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                ns,step*(nd-1)+nk,step,nd,nk);
    if (dC_ddest_signal.length()!=nd)
        PLERROR("backConvolve1Dbackprop: dest_signal.length() (%d) should"
                " equal:\n"
                "dC_ddest_signal.length() (%d)\n",
                nd,dC_ddest_signal.length());
    if (dC_dkernel.length()!=nk)
        PLERROR("backConvolve1Dbackprop: kernel.length() (%d) should equal:\n"
                " dC_dkernel.length() (%d)\n",
                nk,dC_dkernel.length());
#endif
    if (!accumulate)
    {
        dC_ddest_signal.clear();
        dC_dkernel.clear();
    }
    real* k=kernel.data();
    real* dCdk=dC_dkernel.data();
    real* dCdd=dC_ddest_signal.data();
    real* d=dest_signal.data();
    real* dCds=dC_dsource_signal.data();

    for (int i=0;i<nd;i++,dCds+=step)
    {
        real di = d[i];
        real dCdd_i_sum = 0;
        for (int j=0;j<nk;j++)
        {
            dCdd_i_sum += dCds[j]*k[j];
            dCdk[j] += dCds[j]*di;
        }
        dCdd[i] += dCdd_i_sum;
    }
}

Here is the call graph for this function:

void PLearn::backConvolve1Dbackprop ( const Vec &  dest_signal,
const Vec &  dC_dsource_signal,
const Vec &  dC_dkernel,
int  step,
bool  accumulate 
)

Same as above, but increments only dC/dkernel, not dC/ddest_signal dC/dkernel[j] += sum_{i=0}^{ND-1} dC_dsource_signal[i+j]*dest_signal[i].

for i=0 to nd-1: for j=0 to nk-1: dC_dkernel[j] += dC_dsource_signal[i*step+j]*dest_signal[i]

Definition at line 265 of file convolutions.cc.

References PLearn::TVec< T >::clear(), d, PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), and PLERROR.

{
    int nk=dC_dkernel.length();
    int nd=dest_signal.length();
#ifdef BOUNDCHECK
    int ns=dC_dsource_signal.length();
    if (step<1)
        PLERROR("backConvolve1Dbackprop: step (%d) should be a positive"
                " integer\n",
                step);
    if (ns!=step*(nd-1)+nk)
        PLERROR("backConvolve1Dbackprop: dC_dsource_signal.length() (%d)\n"
                "should equal %d:\n"
                "step (%d) * (dest_signal.length() (%d) - 1) + dC_dkernel.length()"
                " (%d)\n",
                ns,step*(nd-1)+nk,step,nd,nk);
#endif
    if (!accumulate)
        dC_dkernel.clear();

    real* dCdk=dC_dkernel.data();
    real* d=dest_signal.data();
    real* dCds=dC_dsource_signal.data();

    for (int i=0;i<nd;i++,dCds+=step)
    {
        real di = d[i];
        for (int j=0;j<nk;j++)
            dCdk[j] += dCds[j]*di;
    }
}

Here is the call graph for this function:

void PLearn::backConvolve2D ( const Mat &  source_image,
const Mat &  kernel,
const Mat &  dest_image,
int  step1 = 1,
int  step2 = 1,
bool  accumulate = true 
)

Back-convolve INTO a (N1S x N2S) "source" image with a (N1K x N2K) kernel matrix, and FROM a "destination" image of dimensions (N1D x N2D), with NiS = NiD + NiK - 1.

This is EXACTLY the TRANSPOSE of convolve2D(source_image, kernel, dest_image, 1, 1) with the same arguments, computations flowing in the other direction. The kernel window is stepped by one in both directions. The destination image is for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: source_image[i1+j1,i2+j2] += dest_image[i1,i2]*kernel[j1,j2] If the accumulate flag is not set, then source_image is first cleared. N.B. When dest_image has been computed from kernel and source_image using convolve2D, THIS IS THE SAME AS COMPUTING dC/dsource_image (into the source_image argument), GIVEN dC/ddest_image, i.e. this function does part of the work done by convolve2Dbackprop.

Definition at line 356 of file convolutions.cc.

References PLearn::TMat< T >::clear(), d, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::Subsampling2DModule::bbpropUpdate(), PLearn::Convolution2DModule::bbpropUpdate(), PLearn::RBMConv2DConnection::computeProduct(), PLearn::RBMConv2DConnection::computeProducts(), PLearn::RBMConv2DLLParameters::computeUnitActivations(), PLearn::Supersampling2DModule::fprop(), and PLearn::BackConvolution2DModule::fprop().

{
    int n1k=kernel.length();
    int n2k=kernel.width();
    int n1d=dest_image.length();
    int n2d=dest_image.width();
#ifdef BOUNDCHECK
    int n1s=source_image.length();
    int n2s=source_image.width();
    if (step1<1)
        PLERROR("backConvolve2D: step1 (%d) should be a positive integer\n",
                step1);
    if (n1s!=step1*(n1d-1)+n1k)
        PLERROR("backConvolve2D: source_image.length() (%d) should equal %d:\n"
                "step1 (%d) * (dest_image.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                n1s,step1*(n1d-1)+n1k,step1,n1d,n1k);

    if (step2<1)
        PLERROR("backConvolve2D: step2 (%d) should be a positive integer\n",
                step2);
    if (n2s!=step2*(n2d-1)+n2k)
        PLERROR("backConvolve2D: source_image.width() (%d) should equal %d:\n"
                "step2 (%d) * (dest_image.width() (%d) - 1) + kernel.width()"
                " (%d)\n",
                n2s,step2*(n2d-1)+n2k,step2,n2d,n2k);
#endif
    if (!accumulate)
        source_image.clear();
    int sm = source_image.mod();
    int dm = dest_image.mod();
    int km = kernel.mod();
    real* s = source_image.data();
    real* d = dest_image.data();
    for (int i=0;i<n1d;i++,s+=sm*step1,d+=dm)
    {
        real* s1 = s; // copy to iterate over columns
        for (int j=0;j<n2d;j++,s1+=step2)
        {
            real* k = kernel.data();
            real* ss = s1; // copy to iterate over sub-rows
            real d_ij=d[j];
            for (int l=0;l<n1k;l++,ss+=sm,k+=km)
            {
                for (int m=0;m<n2k;m++)
                    ss[m] += d_ij * k[m];
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::backConvolve2Dbackprop ( const Mat &  kernel,
const Mat &  dest_image,
const Mat &  dC_ddest_image,
const Mat &  dC_dsource_image,
const Mat &  dC_dkernel,
int  step1,
int  step2,
bool  accumulate 
)

Increment dC/ddest_image and dC/dkernel, given dC/dsource_image, with source_image computed as per backConvolve2D(source_image, kernel, dest_image): for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/ddest_image[i1,i2] += dC/dsource_image[i1+j1,i2+j2]*kernel[j1,j2] dC/dkernel[j1,j2] += dC/dsource_image[i1+j1,i2+j2]*dest_image[i1,i2].

Definition at line 556 of file convolutions.cc.

References PLearn::TMat< T >::clear(), d, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::RBMConv2DConnection::bpropAccUpdate(), PLearn::Supersampling2DModule::bpropUpdate(), and PLearn::BackConvolution2DModule::bpropUpdate().

{
    int n1k=kernel.length();
    int n2k=kernel.width();
    int n1d=dest_image.length();
    int n2d=dest_image.width();
#ifdef BOUNDCHECK
    int n1s=dC_dsource_image.length();
    int n2s=dC_dsource_image.width();
    if (step1<1)
        PLERROR("backConvolve2Dbackprop: step1 (%d) should be a positive"
                " integer\n",
                step1);
    if (n1s!=step1*(n1d-1)+n1k)
        PLERROR("backConvolve2Dbackprop: dC_dsource_image.length() (%d)\n"
                "should equal %d:\n"
                "step1 (%d) * (dest_image.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                n1s,step1*(n1d-1)+n1k,step1,n1d,n1k);
    if (dC_ddest_image.length()!=n1d)
        PLERROR("backConvolve2Dbackprop: dest_image.length() (%d) should"
                " equal:\n"
                "dC_ddest_image.length() (%d)\n",
                n1d,dC_ddest_image.length());
    if (dC_dkernel.length()!=n1k)
        PLERROR("backConvolve2Dbackprop: kernel.length() (%d) should equal:\n"
                " dC_dkernel.length() (%d)\n",
                n1k,dC_dkernel.length());

    if (step2<1)
        PLERROR("backConvolve2Dbackprop: step2 (%d) should be a positive"
                " integer\n",
                step2);
    if (n2s!=step2*(n2d-1)+n2k)
        PLERROR("backConvolve2Dbackprop: source_image.width() (%d)\n"
                "should equal %d:\n"
                "step2 (%d) * (dest_image.width() (%d) - 1) + kernel.width()"
                " (%d)\n",
                n2s,step2*(n2d-1)+n2k,step2,n2d,n2k);
    if (dC_ddest_image.width()!=n2d)
        PLERROR("backConvolve2Dbackprop: dest_image.width() (%d) should"
                " equal:\n"
                "dC_ddest_image.width() (%d)\n",
                n2d,dC_ddest_image.width());
    if (dC_dkernel.length()!=n2k)
        PLERROR("backConvolve2Dbackprop: kernel.width() (%d) should equal:\n"
                " dC_dkernel.width() (%d)\n",
                n2k,dC_dkernel.width());
#endif
    if (!accumulate)
    {
        dC_ddest_image.clear();
        dC_dkernel.clear();
    }
    int km = kernel.mod();
    int dCdkm = dC_dkernel.mod();
    int dm = dest_image.mod();
    int dCddm = dC_ddest_image.mod();
    int dCdsm = dC_dsource_image.mod();

    real* d = dest_image.data();
    real* dCdd = dC_ddest_image.data();
    real* dCds = dC_dsource_image.data();

    for (int i=0;i<n1d;i++,d+=dm,dCdd+=dCddm,dCds+=dCdsm*step1)
    {
        real* dCds1 = dCds; // copy to iterate over columns
        for (int j=0;j<n2d;j++,dCds1+=step2)
        {
            real* k = kernel.data();
            real* dCdk = dC_dkernel.data();
            real* dCdss = dCds1; // copy to iterate over sub-rows
            real d_ij=d[j];
            real dCdd_ij_sum = 0;
            for (int l=0;l<n1k;l++,dCdss+=dCdsm,k+=km,dCdk+=dCdkm)
            {
                for (int m=0;m<n2k;m++)
                {
                    dCdd_ij_sum += dCdss[m]*k[m];
                    dCdk[m] += dCdss[m]*d_ij;
                }
            }
            dCdd[j] += dCdd_ij_sum;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::backConvolve2Dbackprop ( const Mat &  dest_image,
const Mat &  dC_dsource_image,
const Mat &  dC_dkernel,
int  step1,
int  step2,
bool  accumulate 
)

As above, but increments only dC/dkernel, not dC/ddest_image for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/dkernel[j1,j2] += dC/dsource_image[i1+j1,i2+j2]*dest_image[i1,i2].

Definition at line 646 of file convolutions.cc.

References PLearn::TMat< T >::clear(), d, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
    int n1k=dC_dkernel.length();
    int n2k=dC_dkernel.width();
    int n1d=dest_image.length();
    int n2d=dest_image.width();
#ifdef BOUNDCHECK
    int n1s=dC_dsource_image.length();
    int n2s=dC_dsource_image.width();
    if (step1<1)
        PLERROR("backConvolve2Dbackprop: step1 (%d) should be a positive"
                " integer\n",
                step1);
    if (n1s!=step1*(n1d-1)+n1k)
        PLERROR("backConvolve2Dbackprop: dC_dsource_image.length() (%d)\n"
                "should equal %d:\n"
                "step1 (%d) * (dest_image.length() (%d) - 1) +"
                " dC_dkernel.length() (%d)\n",
                n1s,step1*(n1d-1)+n1k,step1,n1d,n1k);

    if (step2<1)
        PLERROR("backConvolve2Dbackprop: step2 (%d) should be a positive"
                " integer\n",
                step2);
    if (n2s!=step2*(n2d-1)+n2k)
        PLERROR("backConvolve2Dbackprop: source_image.width() (%d)\n"
                "should equal %d:\n"
                "step2 (%d) * (dest_image.width() (%d) - 1) +"
                " dC_dkernel.width() (%d)\n",
                n2s,step2*(n2d-1)+n2k,step2,n2d,n2k);
#endif
    if (!accumulate)
        dC_dkernel.clear();

    int dCdkm = dC_dkernel.mod();
    int dm = dest_image.mod();
    int dCdsm = dC_dsource_image.mod();

    real* d = dest_image.data();
    real* dCds = dC_dsource_image.data();

    for (int i=0;i<n1d;i++,d+=dm,dCds+=dCdsm*step1)
    {
        real* dCds1 = dCds; // copy to iterate over columns
        for (int j=0;j<n2d;j++,dCds1+=step2)
        {
            real* dCdk = dC_dkernel.data();
            real* dCdss = dCds1; // copy to iterate over sub-rows
            real d_ij=d[j];
            for (int l=0;l<n1k;l++,dCdss+=dCdsm,dCdk+=dCdkm)
                for (int m=0;m<n2k;m++)
                    dCdk[m] += dCdss[m]*d_ij;
        }
    }
}

Here is the call graph for this function:

string PLearn::backslash_to_slash ( string  str)

replaces all backslashes with slash

Definition at line 323 of file stringutils.cc.

References i.

{
    for(size_t i=0; i<str.size(); i++)
    {
        if(str[i]=='\\')
            str[i] = '/';
    }
    return str;
}
void PLearn::backslashes ( )

Definition at line 213 of file PPathTest.cc.

{
    string absolute_str;
    string drive;
    string display_str = "HOME:dorionc";
#ifdef WIN32
    absolute_str = "r:/dorionc"; 
    drive        = "r:"; 
#else
    absolute_str = "/home/dorionc";
    drive        = "";
#endif

    PPath absolute( absolute_str );

    split_behavior( "isAbsPath()",                  
                    "r:/dorionc",
real PLearn::beta_density ( real  x,
real  alpha,
real  beta 
)

Returns the density of a proportion x under a Beta(alpha,beta) distribution, equal to x^{alpha-1} (1-x}^{beta-1} / Beta(a,b) where Beta(a,b) = Gamma(a)Gamma(b)/Gamma(a+b)

Returns the density of a proportion x under a Beta(alpha,beta) distribution, equal to /f$ x^{alpha-1} (1-x}^{beta-1} / Beta(a,b) /f$ where Beta(a,b) = Gamma(a)Gamma(b)/Gamma(a+b)

Definition at line 261 of file distr_maths.cc.

References exp(), and log_beta_density().

{
    return exp(log_beta_density(x,alpha,beta));
}

Here is the call graph for this function:

Var PLearn::bias_weight_affine_transform ( Var  vec,
Var  weights,
Var  bias,
bool  transpose_weights = false 
) [inline]

first row of transformation is the bias.

Definition at line 101 of file BiasWeightAffineTransformVariable.h.

Referenced by PLearn::DeepFeatureExtractorNNet::hiddenLayer().

{ 
    return new BiasWeightAffineTransformVariable(vec & weights & bias, 
                                                 transpose_weights);
}

Here is the caller graph for this function:

Var PLearn::binary_classification_loss ( Var  network_output,
Var  classnum 
) [inline]

Definition at line 86 of file BinaryClassificationLossVariable.h.

References PLERROR.

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::DeepFeatureExtractorNNet::buildCosts(), and PLearn::NNet::getCost().

{ 
    if (classnum->isScalar()) {
        return new BinaryClassificationLossVariable(network_output, classnum); 
    } else {
        PLERROR("In binary_classification_loss : Can only be used with a scalar output");
        // The line below is just for the compiler to stop complaining.
        return new BinaryClassificationLossVariable(network_output, classnum);
    }
}

Here is the caller graph for this function:

template<class T >
int PLearn::binary_search ( const TVec< T > &  src,
x 
)

Definition at line 289 of file TMat_sort.h.

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

Referenced by estimatedCumProb(), PLearn::SDBVMFieldRemapIntervals::getDiscreteValue(), positionOfClosestElement(), and rebalanceNClasses().

{
    const int len = src.length();

    if (x < src[0]) return -1;
    else if (x >= src[len-1]) return len-1;

    int start = 0;
    int end = len-1;
    for (;;) {
        int k = (start+end)/2;
        if (x >= src[k]  &&  x < src[k+1]) {
            if (src[k] == src[k+1]) {
                start = k;
                end = k+1;
                while (start>0  &&  src[start-1]==src[start]) start--;
                while (end<len-1  &&  src[end]==src[end+1]) end++;
                k = (start+end)/2;
            }
            return k;
        }
        else if (x > src[k])
            start = k+1;
        else
            end = k;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
int PLearn::binary_search ( const TMat< T > &  src,
int  c,
x 
)

Definition at line 321 of file TMat_sort.h.

References PLearn::TMat< T >::length().

{
    const int len = src.length();

    if (x < src(0,c))
        return -1;
    else if (x >= src(len-1,c))
        return len-1;

    int start = 0, end = len-1;
    for (;;) {
        int k = (start+end)/2;
        if (x >= src(k,c) && x < src(k+1,c)) {
            if (src(k,c) == src(k+1,c)) {
                start = k;
                end = k+1;
                while (start > 0 && src(start-1,c) == src(start,c))
                    --start;
                while (end < len-1 && src(end,c) == src(end+1,c))
                    ++end;
                k = (start+end)/2;
            }
            return k;
        }
        else if (x > src(k,c))
            start = k+1;
        else
            end = k;
    }
}

Here is the call graph for this function:

real PLearn::binomial_sample ( real  prob1) [inline]

alias

Definition at line 116 of file random.h.

References bnldev().

Referenced by PLearn::CompactVMatrix::perturb().

{ return bnldev(prob1); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::binread ( istream &  in,
TVec< T > &  v 
)

Definition at line 173 of file TVec_impl.h.

References binread(), PLearn::TVec< T >::data(), i, min, and PLearn::TVec< T >::resize().

{
    int l;
    PLearn::binread(in,l);
    v.resize(l);
    if (l<200000)
        PLearn::binread(in,v.data(),l);
    else for (int i=0;i<l;i+=200000)
        PLearn::binread(in,&v[i],std::min(200000,l-i));
}

Here is the call graph for this function:

template<class T >
void PLearn::binread ( istream &  in,
T *  x,
int  n 
) [inline]

Definition at line 92 of file pl_io.h.

References i, and n.

Referenced by binread(), binread_compressed(), binread_double(), binreadField(), read_compr_mode_and_size(), and PLearn::Learner::test().

{ for (int i=0;i<n;i++) binread(in,x[i]); }

Here is the caller graph for this function:

template<class A , class B >
void PLearn::binread ( istream &  in,
pair< A, B > &  x 
) [inline]

Definition at line 100 of file pl_io.h.

References binread().

{ binread(in,x.first); binread(in,x.second); }

Here is the call graph for this function:

void PLearn::binread ( istream &  in,
char &  x 
) [inline]

Definition at line 106 of file pl_io.h.

{ in.get(x); }
void PLearn::binread ( istream &  in,
unsigned char &  x 
) [inline]

Definition at line 108 of file pl_io.h.

{ in.get((char&)x); }
void PLearn::binread ( istream &  in,
int x 
) [inline]

Definition at line 110 of file pl_io.h.

{ in.read((char*)&x,sizeof(int));  }
void PLearn::binread ( istream &  in,
unsigned int x 
) [inline]

Definition at line 112 of file pl_io.h.

{ in.read((char*)&x,sizeof(unsigned int));  }
void PLearn::binread ( istream &  in,
short &  x 
) [inline]

Definition at line 114 of file pl_io.h.

{ in.read((char*)&x,sizeof(short));  }
void PLearn::binread ( istream &  in,
unsigned short &  x 
) [inline]

Definition at line 116 of file pl_io.h.

{ in.read((char*)&x,sizeof(unsigned short));  }
void PLearn::binread ( istream &  in,
bool x 
) [inline]

Definition at line 122 of file pl_io.h.

References binread(), and u.

                                          { 
    unsigned short u; binread(in,u); 
    u == 0 ? x = false : x = true;
}

Here is the call graph for this function:

void PLearn::binread ( istream &  in,
float &  x 
) [inline]

Definition at line 129 of file pl_io.h.

{ in.read((char*)&x,sizeof(float));  }
void PLearn::binread ( istream &  in,
double &  x 
) [inline]

Definition at line 131 of file pl_io.h.

References binread().

{ float f; binread(in,f); x = double(f); }

Here is the call graph for this function:

void PLearn::binread ( istream &  in,
int x,
int  n 
) [inline]

Definition at line 143 of file pl_io.h.

    { in.read((char*)x, int(n*sizeof(int))); }
void PLearn::binread ( istream &  in,
unsigned int x,
int  n 
) [inline]

Definition at line 147 of file pl_io.h.

    { in.read((char*)x, int(n*sizeof(unsigned int))); }
void PLearn::binread ( istream &  in,
short *  x,
int  n 
) [inline]

Definition at line 151 of file pl_io.h.

    { in.read((char*)x, int(n*sizeof(short))); }
void PLearn::binread ( istream &  in,
unsigned short *  x,
int  n 
) [inline]

Definition at line 155 of file pl_io.h.

    { in.read((char*)x, int(n*sizeof(unsigned short))); }
void PLearn::binread ( istream &  in,
float *  x,
int  n 
) [inline]

Definition at line 161 of file pl_io.h.

    { in.read((char*)x, int(n*sizeof(float))); }
void PLearn::binread ( istream &  in,
double *  x,
int  n 
) [inline]

Definition at line 164 of file pl_io.h.

References binread(), i, and n.

{ for(int i=0; i<n; i++) binread(in,x[i]); }

Here is the call graph for this function:

template<class T >
void PLearn::binread ( FILE *  in,
T *  x,
int  n 
) [inline]

Definition at line 191 of file pl_io.h.

References binread(), i, and n.

{ for (int i=0;i<n;i++) binread(in,x[i]); }

Here is the call graph for this function:

template<class A , class B >
void PLearn::binread ( FILE *  in,
pair< A, B > &  x 
) [inline]

Definition at line 199 of file pl_io.h.

References binread().

{ binread(in,x.first); binread(in,x.second); }

Here is the call graph for this function:

void PLearn::binread ( FILE *  in,
char &  x 
) [inline]

Definition at line 205 of file pl_io.h.

{ x = (char)getc(in); }
void PLearn::binread ( FILE *  in,
unsigned char &  x 
) [inline]

Definition at line 207 of file pl_io.h.

{ x = (unsigned char)getc(in); }
void PLearn::binread ( FILE *  in,
short &  x 
) [inline]

Definition at line 213 of file pl_io.h.

{ fread(&x,sizeof(short),1,in);  }
void PLearn::binread ( FILE *  in,
unsigned short &  x 
) [inline]

Definition at line 215 of file pl_io.h.

{ fread(&x,sizeof(unsigned short),1,in);  }
void PLearn::binread ( FILE *  in,
int x 
) [inline]

Definition at line 209 of file pl_io.h.

{ fread(&x,sizeof(int),1,in);  }
void PLearn::binread ( FILE *  in,
bool x 
) [inline]

Definition at line 220 of file pl_io.h.

References binread(), and u.

                                       { 
    unsigned short u; binread(in,u); 
    u == 0 ? x = false : x = true;
}

Here is the call graph for this function:

void PLearn::binread ( FILE *  in,
float &  x 
) [inline]

Definition at line 227 of file pl_io.h.

{ fread(&x,sizeof(float),1,in);  }
void PLearn::binread ( FILE *  in,
unsigned int x 
) [inline]

Definition at line 211 of file pl_io.h.

{ fread(&x,sizeof(unsigned int),1,in);  }
void PLearn::binread ( FILE *  in,
double &  x 
) [inline]

Definition at line 229 of file pl_io.h.

References binread().

{ float f; binread(in,f); x = double(f); }

Here is the call graph for this function:

void PLearn::binread ( FILE *  in,
int x,
int  n 
) [inline]

Definition at line 240 of file pl_io.h.

{ fread(x, sizeof(int),n,in);  }
void PLearn::binread ( FILE *  in,
unsigned int x,
int  n 
) [inline]

Definition at line 242 of file pl_io.h.

{ fread(x, sizeof(unsigned int),n,in);  }
void PLearn::binread ( FILE *  in,
short *  x,
int  n 
) [inline]

Definition at line 244 of file pl_io.h.

{ fread(x, sizeof(short),n,in);  }
void PLearn::binread ( FILE *  in,
unsigned short *  x,
int  n 
) [inline]

Definition at line 246 of file pl_io.h.

{ fread(x, sizeof(unsigned short),n,in);  }
void PLearn::binread ( FILE *  in,
float *  x,
int  n 
) [inline]

Definition at line 250 of file pl_io.h.

{ fread(x, sizeof(float),n,in);  }
void PLearn::binread ( FILE *  in,
double *  x,
int  n 
) [inline]

Definition at line 252 of file pl_io.h.

References binread(), i, and n.

{ for(int i=0; i<n; i++) binread(in,x[i]); }

Here is the call graph for this function:

void PLearn::binread_ ( PStream &  in,
bool x,
unsigned int  n,
unsigned char  typecode 
)

Definition at line 1945 of file PStream.cc.

References c, PLearn::PStream::get(), PLERROR, and x.

Referenced by binread_(), PLearn::TMat< pair< real, real > >::read(), and readSequence().

{
    if(typecode!=TypeTraits<bool>::little_endian_typecode())
        PLERROR("In binread_ incompatible typecode");

    while(n--)
    {
        int c = in.get();
        if(c=='0')
            *x = false;
        else if(c=='1')
            *x = true;
        else
            PLERROR("In binread_(PStream& in, bool* x, unsigned int n, unsigned char typecode): "
                    "read invalid value for a boolean: should be '1' or '0', not %c", c);
        ++x;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Iterator >
void PLearn::binread_ ( PStream &  in,
Iterator  it,
unsigned int  n,
unsigned char  typecode 
)

Definition at line 1188 of file PStream.h.

References PLERROR.

{
    if(typecode!=0xFF)
        PLERROR("In binread_ : bug! A specialised binread_ should have been called for a typecode other than the 'generic' 0xFF");

    while(n--)
    {
        in >> *it;
        ++it;
    }
}
void PLearn::binread_ ( PStream &  in,
char *  x,
unsigned int  n,
unsigned char  typecode 
) [inline]

Definition at line 1229 of file PStream.h.

References PLERROR, and PLearn::PStream::read().

{
    // big endian and little endian have the same typecodes
    // so we need to check only one for consistency

    if(typecode!=TypeTraits<char>::little_endian_typecode()
       && typecode!=TypeTraits<unsigned char>::little_endian_typecode())
        PLERROR("In binread_ incompatible typecode");

    in.read((char*)x, n);
}

Here is the call graph for this function:

void PLearn::binread_ ( PStream &  in,
signed char *  x,
unsigned int  n,
unsigned char  typecode 
) [inline]

Definition at line 1242 of file PStream.h.

References binread_().

{ binread_(in, (char *)x, n, typecode); }

Here is the call graph for this function:

void PLearn::binread_ ( PStream &  in,
unsigned char *  x,
unsigned int  n,
unsigned char  typecode 
) [inline]

Definition at line 1246 of file PStream.h.

References binread_().

{ binread_(in, (char *)x, n, typecode); }

Here is the call graph for this function:

void PLearn::binread_ ( PStream &  in,
short *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
unsigned short *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
unsigned int x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
long *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
int x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
unsigned long *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
long long *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
unsigned long long *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
float *  x,
unsigned int  n,
unsigned char  typecode 
)
void PLearn::binread_ ( PStream &  in,
double *  x,
unsigned int  n,
unsigned char  typecode 
)
template<class I , class J >
void PLearn::binread_as ( PStream &  in,
J *  x,
unsigned int  n,
bool  inverted_byte_order 
)

Auxiliary function that reads n elements of type I, optionally swaps their endianness, then converts them into J, and puts them in a J array.

Definition at line 1204 of file PStream.h.

References endianswap(), PLearn::PStream::read(), and x.

{
    I y;
    while(n--)
    {
        in.read(reinterpret_cast<char*>(&y), sizeof(I));
        if (inverted_byte_order)
            endianswap(&y);

#ifdef __INTEL_COMPILER
#pragma warning(disable:1682)
// Yes, I know that "implicit conversion of a 64-bit integral type to a smaller
// integral type (potential portability problem)", but the conversion is
// explicit here.
#endif
        *x = static_cast<J>(y);
#ifdef __INTEL_COMPILER
#pragma warning(default:1682)
#endif
        ++x;
    }
}

Here is the call graph for this function:

void PLearn::binread_compressed ( istream &  in,
double *  data,
int  l 
)

Definition at line 129 of file pl_io.cc.

References binread(), n, PLERROR, and read_compr_mode_and_size().

Referenced by PLearn::DiskVMatrix::getNewRow().

{
    unsigned char mode;
    int n;
    double* p = data;
    char cval;
    while(l>0)
    {
        read_compr_mode_and_size(in, mode, n);
        //cerr << "mode: " << int(mode) << " size: " << n << endl;
        l -= n;
        switch(mode)
        {
        case 0:          
            while(n--)
                *p++ = 0;
            break;
        case 1:
            while(n--)
                *p++ = 0;
            *p++ = 1; 
            --l;
            break;
        case 2:
            while(n--)
            {
                binread(in,cval);
                *p++ = double(cval);
            }
            break;
        case 3:
            binread(in,p,n);
            p += n;
            break;
        default:
            PLERROR("BUG IN binread_compressed: mode is only 2 bits, so how can it be other than 0,1,2,3 ?");
        }
    }

    if(l!=0)
        PLERROR("In binread_compressed : l is not 0 at exit of function, wrong data?");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::binread_compressed ( istream &  in,
float *  data,
int  l 
)

Definition at line 221 of file pl_io.cc.

References binread(), n, PLERROR, and read_compr_mode_and_size().

{
    unsigned char mode;
    int n;
    float* p = data;
    while(l>0)
    {
        read_compr_mode_and_size(in, mode, n);
        //cerr << "mode: " << int(mode) << " size: " << n << endl;
        if(mode==0 || mode==1)
        {
            while(n--)
            { *p++ = 0; --l; }
            if(mode==1)
            { *p++ = 1; --l; }
        }
        else if(mode==2)
        {
            char val; 
            while(n--)
            {
                binread(in,val);
                *p++ = float(val);
                --l;
            }
        }
        else if(mode==3)
        {
            binread(in,p,n);
            p += n;
            l -= n;
        }
        else 
            PLERROR("BUG IN binread_compressed: mode is only 2 bits, so how can it be other than 0,1,2,3 ?");
    }

    if(l!=0)
        PLERROR("In binread_compressed : l is not 0 at exit of function, wrong data?");
}

Here is the call graph for this function:

void PLearn::binread_compressed ( FILE *  in,
double *  data,
int  l 
)

Definition at line 340 of file pl_io.cc.

References binread(), n, PLERROR, and read_compr_mode_and_size().

{
    unsigned char mode;
    int n;
    double* p = data;
    char cval;
    while(l>0)
    {
        read_compr_mode_and_size(in, mode, n);
        //cerr << "mode: " << int(mode) << " size: " << n << endl;
        l -= n;
        switch(mode)
        {
        case 0:          
            while(n--)
                *p++ = 0;
            break;
        case 1:
            while(n--)
                *p++ = 0;
            *p++ = 1; 
            --l;
            break;
        case 2:
            while(n--)
            {
                binread(in,cval);
                *p++ = double(cval);
            }
            break;
        case 3:
            binread(in,p,n);
            p += n;
            break;
        default:
            PLERROR("BUG IN binread_compressed: mode is only 2 bits, so how can it be other than 0,1,2,3 ?");
        }
    }

    if(l!=0)
        PLERROR("In binread_compressed : l is not 0 at exit of function, wrong data?");
}

Here is the call graph for this function:

void PLearn::binread_compressed ( FILE *  in,
float *  data,
int  l 
)

Definition at line 388 of file pl_io.cc.

References binread(), n, PLERROR, and read_compr_mode_and_size().

{
    unsigned char mode;
    int n;
    float* p = data;
    while(l>0)
    {
        read_compr_mode_and_size(in, mode, n);
        //cerr << "mode: " << int(mode) << " size: " << n << endl;
        if(mode==0 || mode==1)
        {
            while(n--)
            { *p++ = 0; --l; }
            if(mode==1)
            { *p++ = 1; --l; }
        }
        else if(mode==2)
        {
            char val; 
            while(n--)
            {
                binread(in,val);
                *p++ = float(val);
                --l;
            }
        }
        else if(mode==3)
        {
            binread(in,p,n);
            p += n;
            l -= n;
        }
        else 
            PLERROR("BUG IN binread_compressed: mode is only 2 bits, so how can it be other than 0,1,2,3 ?");
    }

    if(l!=0)
        PLERROR("In binread_compressed : l is not 0 at exit of function, wrong data?");
}

Here is the call graph for this function:

template<class T >
void PLearn::binread_double ( istream &  in,
TVec< T > &  v 
)

Definition at line 196 of file TVec_impl.h.

References binread(), binread_double(), PLearn::TVec< T >::data(), i, min, and PLearn::TVec< T >::resize().

{
    int l;
    PLearn::binread(in,l);
    v.resize(l);
    if (l<200000)
        PLearn::binread_double(in,v.data(),l);
    else for (int i=0;i<l;i+=200000)
        PLearn::binread_double(in,&v[i],std::min(200000,l-i));
}

Here is the call graph for this function:

void PLearn::binread_double ( istream &  in,
float &  x 
) [inline]

Definition at line 137 of file pl_io.h.

References binread_double(), and d.

{ double d; binread_double(in,d); x = float(d); }

Here is the call graph for this function:

void PLearn::binread_double ( istream &  in,
double &  x 
) [inline]

Definition at line 135 of file pl_io.h.

Referenced by binread_double(), and binreadField_double().

{ in.read((char*)&x,sizeof(double));  }

Here is the caller graph for this function:

void PLearn::binread_double ( istream &  in,
double *  x,
int  n 
) [inline]

Definition at line 169 of file pl_io.h.

    { in.read((char*)x, int(n*sizeof(double))); }
void PLearn::binread_double ( istream &  in,
float *  x,
int  n 
) [inline]

Definition at line 172 of file pl_io.h.

References binread(), i, and n.

{ for(int i=0; i<n; i++) binread(in,x[i]); }

Here is the call graph for this function:

void PLearn::binread_double ( FILE *  in,
double &  x 
) [inline]

Definition at line 233 of file pl_io.h.

{ fread(&x,sizeof(double),1,in);  }
void PLearn::binread_double ( FILE *  in,
float &  x 
) [inline]

Definition at line 235 of file pl_io.h.

References binread_double(), and d.

{ double d; binread_double(in,d); x = float(d); }

Here is the call graph for this function:

void PLearn::binread_double ( FILE *  in,
double *  x,
int  n 
) [inline]

Definition at line 256 of file pl_io.h.

{ fread(x, sizeof(double),n,in);  }
void PLearn::binread_double ( FILE *  in,
float *  x,
int  n 
) [inline]

Definition at line 258 of file pl_io.h.

References binread(), i, and n.

{ for(int i=0; i<n; i++) binread(in,x[i]); }

Here is the call graph for this function:

template<class T >
void PLearn::binreadField ( istream &  in,
const string &  fieldname,
T &  x 
)

Definition at line 245 of file pl_io_deprecated.h.

References binread(), and readFieldName().

{ readFieldName(in,fieldname,true); binread(in,x); in.get(); }

Here is the call graph for this function:

template<class T >
void PLearn::binreadField_double ( istream &  in,
const string &  fieldname,
T &  x 
)

Definition at line 253 of file pl_io_deprecated.h.

References binread_double(), and readFieldName().

{ readFieldName(in,fieldname,true); binread_double(in,x); in.get(); }

Here is the call graph for this function:

template<class T >
void PLearn::binwrite ( ostream &  out,
const TVec< T > &  v 
)

Definition at line 162 of file TVec_impl.h.

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

{
    int l = v.length();
    PLearn::binwrite(out,l);
    if (l<200000)
        PLearn::binwrite(out,v.data(),l);
    else for (int i=0;i<l;i+=200000)
        PLearn::binwrite(out,&v[i],std::min(200000,l-i));
}

Here is the call graph for this function:

template<class T >
void PLearn::binwrite ( ostream &  out,
const T *  x,
int  n 
) [inline]

general purpose (but less efficient) version for pointers to things that have a binwrite/binread function

Definition at line 88 of file pl_io.h.

References i, and n.

Referenced by binwrite(), binwrite_compressed(), binwrite_double(), binwriteField(), main(), PLearn::Learner::test(), and write_compr_mode_and_size().

{ for (int i=0;i<n;i++) binwrite(out,x[i]); }

Here is the caller graph for this function:

template<class A , class B >
void PLearn::binwrite ( ostream &  out,
const pair< A, B >  x 
) [inline]

Definition at line 96 of file pl_io.h.

References binwrite().

{ binwrite(out,x.first); binwrite(out,x.second); }

Here is the call graph for this function:

void PLearn::binwrite ( ostream &  out,
char  x 
) [inline]

binwrite and binread for a few basic types

Definition at line 105 of file pl_io.h.

{ out.put(x); }
void PLearn::binwrite ( ostream &  out,
unsigned char  x 
) [inline]

Definition at line 107 of file pl_io.h.

{ out.put(x); }
void PLearn::binwrite ( ostream &  out,
int  x 
) [inline]

Definition at line 109 of file pl_io.h.

{ out.write((char*)&x,sizeof(int)); }
void PLearn::binwrite ( ostream &  out,
unsigned int  x 
) [inline]

Definition at line 111 of file pl_io.h.

{ out.write((char*)&x,sizeof(unsigned int)); }
void PLearn::binwrite ( ostream &  out,
short  x 
) [inline]

Definition at line 113 of file pl_io.h.

{ out.write((char*)&x,sizeof(short)); }
void PLearn::binwrite ( ostream &  out,
unsigned short  x 
) [inline]

Definition at line 115 of file pl_io.h.

{ out.write((char*)&x,sizeof(unsigned short)); }
void PLearn::binwrite ( ostream &  out,
bool  x 
) [inline]

note that bool are saved as unsigned short

Definition at line 118 of file pl_io.h.

References binwrite().

{ binwrite(out,(unsigned short)x); }

Here is the call graph for this function:

void PLearn::binwrite ( ostream &  out,
float  x 
) [inline]

Definition at line 128 of file pl_io.h.

{ out.write((char*)&x,sizeof(float)); }
void PLearn::binwrite ( ostream &  out,
double  x 
) [inline]

Definition at line 130 of file pl_io.h.

References binwrite().

{ binwrite(out, float(x)); }

Here is the call graph for this function:

void PLearn::binwrite ( ostream &  out,
const int x,
int  n 
) [inline]

multi-element versions, giving address and number of elements

Definition at line 141 of file pl_io.h.

    { out.write((char*)x, int(n*sizeof(int))); }
void PLearn::binwrite ( ostream &  out,
const unsigned int x,
int  n 
) [inline]

Definition at line 145 of file pl_io.h.

    { out.write((char*)x, int(n*sizeof(unsigned int))); }
void PLearn::binwrite ( ostream &  out,
const short *  x,
int  n 
) [inline]

Definition at line 149 of file pl_io.h.

    { out.write((char*)x, int(n*sizeof(short))); }
void PLearn::binwrite ( ostream &  out,
const unsigned short *  x,
int  n 
) [inline]

Definition at line 153 of file pl_io.h.

    { out.write((char*)x, int(n*sizeof(unsigned short))); }
void PLearn::binwrite ( ostream &  out,
const float *  x,
int  n 
) [inline]

Definition at line 159 of file pl_io.h.

    { out.write((char*)x, int(n*sizeof(float))); }
void PLearn::binwrite ( ostream &  out,
const double *  x,
int  n 
) [inline]

Definition at line 163 of file pl_io.h.

References binwrite(), i, and n.

{ for(int i=0; i<n; i++) binwrite(out,x[i]); }

Here is the call graph for this function:

template<class T >
void PLearn::binwrite ( FILE *  out,
const T *  x,
int  n 
) [inline]

general purpose (but less efficient) version for pointers to things that have a binwrite/binread function

Definition at line 187 of file pl_io.h.

References binwrite(), i, and n.

{ for (int i=0;i<n;i++) binwrite(out,x[i]); }

Here is the call graph for this function:

template<class A , class B >
void PLearn::binwrite ( FILE *  out,
const pair< A, B >  x 
) [inline]

Definition at line 195 of file pl_io.h.

References binwrite().

{ binwrite(out,x.first); binwrite(out,x.second); }

Here is the call graph for this function:

void PLearn::binwrite ( FILE *  out,
char  x 
) [inline]

binwrite and binread for a few basic types

Definition at line 204 of file pl_io.h.

{ putc((unsigned char)x, out); }
void PLearn::binwrite ( FILE *  out,
unsigned char  x 
) [inline]

Definition at line 206 of file pl_io.h.

{ putc(x,out); }
void PLearn::binwrite ( FILE *  out,
int  x 
) [inline]

Definition at line 208 of file pl_io.h.

{ fwrite(&x,sizeof(int),1,out); }
void PLearn::binwrite ( FILE *  out,
short  x 
) [inline]

Definition at line 212 of file pl_io.h.

{ fwrite(&x,sizeof(short),1,out); }
void PLearn::binwrite ( FILE *  out,
unsigned short  x 
) [inline]

Definition at line 214 of file pl_io.h.

{ fwrite(&x,sizeof(unsigned short),1,out); }
void PLearn::binwrite ( FILE *  out,
unsigned int  x 
) [inline]

Definition at line 210 of file pl_io.h.

{ fwrite(&x,sizeof(unsigned int),1,out); }
void PLearn::binwrite ( FILE *  out,
bool  x 
) [inline]

note that bool are saved as unsigned short

Definition at line 217 of file pl_io.h.

References binwrite().

{ binwrite(out,(unsigned short)x); }

Here is the call graph for this function:

void PLearn::binwrite ( FILE *  out,
float  x 
) [inline]

Definition at line 226 of file pl_io.h.

{ fwrite(&x,sizeof(float),1,out); }
void PLearn::binwrite ( FILE *  out,
double  x 
) [inline]

Definition at line 228 of file pl_io.h.

References binwrite().

{ binwrite(out, float(x)); }

Here is the call graph for this function:

void PLearn::binwrite ( FILE *  out,
const int x,
int  n 
) [inline]

multi-element versions, giving address and number of elements

Definition at line 239 of file pl_io.h.

{ fwrite(x, sizeof(int),n,out); }
void PLearn::binwrite ( FILE *  out,
const unsigned int x,
int  n 
) [inline]

Definition at line 241 of file pl_io.h.

{ fwrite(x, sizeof(unsigned int),n,out); }
void PLearn::binwrite ( FILE *  out,
const short *  x,
int  n 
) [inline]

Definition at line 243 of file pl_io.h.

{ fwrite(x, sizeof(short),n,out); }
void PLearn::binwrite ( FILE *  out,
const unsigned short *  x,
int  n 
) [inline]

Definition at line 245 of file pl_io.h.

{ fwrite(x, sizeof(unsigned short),n,out); }
void PLearn::binwrite ( FILE *  out,
const float *  x,
int  n 
) [inline]

Definition at line 249 of file pl_io.h.

{ fwrite(x, sizeof(float),n,out); }
void PLearn::binwrite ( FILE *  out,
const double *  x,
int  n 
) [inline]

Definition at line 251 of file pl_io.h.

References binwrite(), i, and n.

{ for(int i=0; i<n; i++) binwrite(out,x[i]); }

Here is the call graph for this function:

template<class Iterator >
void PLearn::binwrite_ ( PStream &  out,
Iterator  it,
unsigned int  n 
)

Serialization of sequences.

Definition at line 1096 of file PStream.h.

References PLearn::PStream::outmode, PLearn::PStream::plearn_binary, and PLearn::PStream::raw_binary.

Referenced by PLearn::TMat< pair< real, real > >::write(), and writeSequence().

{
    PStream::mode_t outmode = out.outmode; // store previous outmode
    if(outmode!=PStream::raw_binary && outmode!=PStream::plearn_binary)
        out.outmode = PStream::plearn_binary;
    while(n--)
    {
        out << *it;
        ++it;
    }
    out.outmode = outmode; // restore previous outmode
}

Here is the caller graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const bool x,
unsigned int  n 
) [inline]

Definition at line 1109 of file PStream.h.

References PLearn::PStream::put().

{
    while(n--)
    {
        if(*x++)
            out.put('1');
        else
            out.put('0');
    }
}

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const signed char *  x,
unsigned int  n 
) [inline]

Definition at line 1125 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(signed char))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
signed char *  x,
unsigned int  n 
) [inline]

Definition at line 1127 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(signed char))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
unsigned char *  x,
unsigned int  n 
) [inline]

Definition at line 1132 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned char))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const unsigned char *  x,
unsigned int  n 
) [inline]

Definition at line 1130 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned char))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const short *  x,
unsigned int  n 
) [inline]

Definition at line 1135 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(short))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
short *  x,
unsigned int  n 
) [inline]

Definition at line 1137 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(short))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
unsigned short *  x,
unsigned int  n 
) [inline]

Definition at line 1142 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned short))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const int x,
unsigned int  n 
) [inline]

Definition at line 1145 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(int))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
int x,
unsigned int  n 
) [inline]

Definition at line 1147 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(int))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const unsigned short *  x,
unsigned int  n 
) [inline]

Definition at line 1140 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned short))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
unsigned int x,
unsigned int  n 
) [inline]

Definition at line 1152 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned int))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const unsigned int x,
unsigned int  n 
) [inline]

Definition at line 1150 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned int))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const long *  x,
unsigned int  n 
) [inline]

Definition at line 1155 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
long *  x,
unsigned int  n 
) [inline]

Definition at line 1157 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
unsigned long *  x,
unsigned int  n 
) [inline]

Definition at line 1162 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const long long *  x,
unsigned int  n 
) [inline]

Definition at line 1165 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(long long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
long long *  x,
unsigned int  n 
) [inline]

Definition at line 1167 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(long long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const unsigned long long *  x,
unsigned int  n 
) [inline]

Definition at line 1170 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned long long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
unsigned long long *  x,
unsigned int  n 
) [inline]

Definition at line 1172 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned long long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const float *  x,
unsigned int  n 
) [inline]

Definition at line 1175 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(float))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
float *  x,
unsigned int  n 
) [inline]

Definition at line 1177 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(float))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const unsigned long *  x,
unsigned int  n 
) [inline]

Definition at line 1160 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(unsigned long))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const double *  x,
unsigned int  n 
) [inline]

Definition at line 1180 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(double))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
double *  x,
unsigned int  n 
) [inline]

Definition at line 1182 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(double))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
char *  x,
unsigned int  n 
) [inline]

Definition at line 1122 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(char))); }

Here is the call graph for this function:

void PLearn::binwrite_ ( PStream &  out,
const char *  x,
unsigned int  n 
) [inline]

Definition at line 1120 of file PStream.h.

References PLearn::PStream::write().

{ out.write((char*)x, streamsize(n*sizeof(char))); }

Here is the call graph for this function:

void PLearn::binwrite_compressed ( ostream &  out,
const double *  data,
int  l 
)

version for compressed array (efficient for sparse data, and small integer values) (format is detailed in .cc, see write_compr_mode_and_size function in general.cc)

Definition at line 172 of file pl_io.cc.

References binwrite(), fast_exact_is_equal(), n, and write_compr_mode_and_size().

Referenced by PLearn::DiskVMatrix::appendRow().

{
    double val = 0.;
    while(l)
    {
        val = *data;
        if(fast_exact_is_equal(val, 0.))
        {
            int n=0;
            while(l && fast_exact_is_equal(*data, 0.))
            { ++n; ++data; --l; }
            if(l && fast_exact_is_equal(*data, 1.))
            {
                write_compr_mode_and_size(out, 1, n);
                ++data; --l;
            }
            else
                write_compr_mode_and_size(out, 0, n);              
        }
        else if(fast_exact_is_equal(val,1.))
        {
            write_compr_mode_and_size(out, 1, 0);
            ++data; --l;
        }
        else if( fast_exact_is_equal(double(char(val)),val) )
        {
            const double* start = data;
            int n=0;
            while(l && fast_exact_is_equal(double(char(val=*data)), val)
                    && !fast_exact_is_equal(val, 0)
                    && !fast_exact_is_equal(val, 1))
            { ++n; ++data; --l; }
            write_compr_mode_and_size(out, 2, n);
            while(n--)
                binwrite(out,char(*start++));
        }
        else
        {
            const double* start = data;
            int n=0; 
            while(l && !fast_exact_is_equal((val=*data), 0)
                    && !fast_exact_is_equal(val, 1)
                    && !fast_exact_is_equal(double(char(val)), val))
            { ++n; ++data; --l; }
            write_compr_mode_and_size(out, 3, n);
            binwrite(out,start,n);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::binwrite_compressed ( ostream &  out,
const float *  data,
int  l 
)

Definition at line 261 of file pl_io.cc.

References binwrite(), fast_exact_is_equal(), n, and write_compr_mode_and_size().

{
    float val = 0.;
    while(l)
    {
        val = *data;
        if(fast_exact_is_equal(val, 0.))
        {
            int n=0;
            while(l && fast_exact_is_equal(*data, 0.))
            { ++n; ++data; --l; }
            if(l && fast_exact_is_equal(*data, 1.))
            {
                write_compr_mode_and_size(out, 1, n);
                ++data; --l;
            }
            else
                write_compr_mode_and_size(out, 0, n);              
        }
        else if(fast_exact_is_equal(val, 1.))
        {
            write_compr_mode_and_size(out, 1, 0);
            ++data; --l;
        }
        else if( fast_exact_is_equal(float(char(val)), val) )
        {
            const float* start = data;
            int n=0;
            while(l && fast_exact_is_equal(float(char(val=*data)), val)
                    && !fast_exact_is_equal(val, 0)
                    && !fast_exact_is_equal(val, 1))
            { ++n; ++data; --l; }
            write_compr_mode_and_size(out, 2, n);
            while(n--)
                binwrite(out,char(*start++));
        }
        else
        {
            const float* start = data;
            int n=0; 
            while(l && !fast_exact_is_equal((val=*data), 0)
                    && !fast_exact_is_equal(val, 1)
                    && !fast_exact_is_equal(float(char(val)), val))
            { ++n; ++data; --l; }
            write_compr_mode_and_size(out, 3, n);
            binwrite(out,start,n);
        }
    }
}

Here is the call graph for this function:

void PLearn::binwrite_compressed ( FILE *  out,
const double *  data,
int  l 
)

Definition at line 383 of file pl_io.cc.

References PLERROR.

{
    PLERROR("Not implemented");
}
void PLearn::binwrite_compressed ( FILE *  out,
const float *  data,
int  l 
)

Definition at line 428 of file pl_io.cc.

References PLERROR.

{
    PLERROR("Not implemented");
}
template<class T >
void PLearn::binwrite_double ( ostream &  out,
const TVec< T > &  v 
)

Definition at line 185 of file TVec_impl.h.

References binwrite(), binwrite_double(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), and min.

{
    int l = v.length();
    PLearn::binwrite(out,l);
    if (l<200000)
        PLearn::binwrite_double(out,v.data(),l);
    else for (int i=0;i<l;i+=200000)
        PLearn::binwrite_double(out,&v[i],std::min(200000,l-i));
}

Here is the call graph for this function:

void PLearn::binwrite_double ( ostream &  out,
float  x 
) [inline]

Definition at line 136 of file pl_io.h.

References binwrite_double().

{ binwrite_double(out, double(x)); }

Here is the call graph for this function:

void PLearn::binwrite_double ( ostream &  out,
double  x 
) [inline]

Definition at line 134 of file pl_io.h.

Referenced by binwrite_double(), and binwriteField_double().

{ out.write((char*)&x,sizeof(double)); }

Here is the caller graph for this function:

void PLearn::binwrite_double ( ostream &  out,
const double *  x,
int  n 
) [inline]

Definition at line 167 of file pl_io.h.

    { out.write((char*)x, int(n*sizeof(double))); }
void PLearn::binwrite_double ( ostream &  out,
const float *  x,
int  n 
) [inline]

Definition at line 171 of file pl_io.h.

References binwrite(), i, and n.

{ for(int i=0; i<n; i++) binwrite(out,x[i]); }

Here is the call graph for this function:

void PLearn::binwrite_double ( FILE *  out,
double  x 
) [inline]

Definition at line 232 of file pl_io.h.

{ fwrite(&x,sizeof(double),1,out); }
void PLearn::binwrite_double ( FILE *  out,
float  x 
) [inline]

Definition at line 234 of file pl_io.h.

References binwrite_double().

{ binwrite_double(out, double(x)); }

Here is the call graph for this function:

void PLearn::binwrite_double ( FILE *  out,
const double *  x,
int  n 
) [inline]

Definition at line 255 of file pl_io.h.

{ fwrite(x, sizeof(double),n,out); }
void PLearn::binwrite_double ( FILE *  out,
const float *  x,
int  n 
) [inline]

Definition at line 257 of file pl_io.h.

References binwrite(), i, and n.

{ for(int i=0; i<n; i++) binwrite(out,x[i]); }

Here is the call graph for this function:

template<class T >
void PLearn::binwriteField ( ostream &  out,
const string &  fieldname,
const T &  x 
)

generic field BINARY writing and reading

Definition at line 241 of file pl_io_deprecated.h.

References binwrite(), and writeFieldName().

{ writeFieldName(out,fieldname); binwrite(out,x); out << '\n'; }

Here is the call graph for this function:

template<class T >
void PLearn::binwriteField_double ( ostream &  out,
const string &  fieldname,
const T &  x 
)

Definition at line 249 of file pl_io_deprecated.h.

References binwrite_double(), and writeFieldName().

{ writeFieldName(out,fieldname); binwrite_double(out,x); out << '\n'; }

Here is the call graph for this function:

real PLearn::bnldev ( real  pp,
int  n = 1 
)

returns a binomial random number with probability = 'pp' and trials number = 'n'

Definition at line 431 of file random.cc.

References exp(), fast_exact_is_equal(), g, j, log_gamma(), n, Pi, pl_log, sqrt(), and uniform_sample().

Referenced by binomial_sample().

{
    int j;
    static int nold=(-1);
    real am,em,g,angle,p,bnl,sq,t,y;
    static real pold=(-1.0),pc,plog,pclog,en,oldg;

    p=(pp <= 0.5 ? pp : 1.0-pp);
    am=n*p;
    if (n < 25) {
        bnl=0.0;
        for (j=1;j<=n;j++)
            if (uniform_sample() < p) ++bnl;
    } else if (am < 1.0) {
        g=exp(-am);
        t=1.0;
        for (j=0;j<=n;j++) {
            t *= uniform_sample();
            if (t < g) break;
        }
        bnl=(j <= n ? j : n);
    } else {
        if (n != nold) {
            en=n;
            oldg=log_gamma(en+1.0);
            nold=n;
        } if (!fast_exact_is_equal(p, pold)) {
            pc=1.0-p;
            plog=pl_log(p);
            pclog=pl_log(pc);
            pold=p;
        }
        sq=sqrt(2.0*am*pc);
        do {
            do {
                angle=Pi*uniform_sample();
                y=tan(angle);
                em=sq*y+am;
            } while (em < 0.0 || em >= (en+1.0));
            em=floor(em);
            t=1.2*sq*(1.0+y*y)*exp(oldg-log_gamma(em+1.0)
                                   -log_gamma(en-em+1.0)+em*plog+(en-em)*pclog);
        } while (uniform_sample() > t);
        bnl=em;
    }
    if (!fast_exact_is_equal(p, pp)) bnl=n-bnl;
    return bnl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::boolstr ( bool  b)

Definition at line 207 of file PPathTest.cc.

    {
        success = true;
    }
#endif
VMat PLearn::bootstrap ( VMat  d,
bool  reorder = true,
bool  norepeat = true 
)

returns a SelectRowsVMatrix that has d's rows bootstrapped (sample with replacement and optionally re-ordered).

Optionally the repeated rows are eliminated (this is actually done by shuffling and taking the first 2/3 of the rows, so the length() will be always the same). Note that the default values are fine for "on-line" learning algorithms but does not correspond to the usual "bootstrap".

Definition at line 147 of file VMat_operations.cc.

References i, PLearn::VMat::length(), PLearn::TVec< T >::resize(), PLearn::VMat::rows(), shuffleElements(), sortElements(), PLearn::TVec< T >::subVec(), and uniform_multinomial_sample().

{
    Vec indices;
    if (norepeat)
    {
        indices = Vec(0, d.length()-1, 1); // Range-vector
        shuffleElements(indices);
        indices = indices.subVec(0,int(0.667 * d.length()));
        if (reorder)
            sortElements(indices);
        return d.rows(indices);
    }
    else
    {
        indices.resize(d.length());
        for (int i=0;i<d.length();i++)
            indices[i] = uniform_multinomial_sample(d.length());
    }
    if (reorder)
        sortElements(indices);
    return d.rows(indices);
}

Here is the call graph for this function:

template<class T >
void PLearn::bootstrap_rows ( const TMat< T > &  source,
TMat< T >  destination 
)

sample with replacement the rows of source and put them in destination.

Definition at line 126 of file random.h.

References i, j, PLearn::TMat< T >::length(), N, PLearn::TMat< T >::resize(), uniform_multinomial_sample(), and PLearn::TMat< T >::width().

{
    int N=source.length();
    destination.resize(N,source.width());
    for (int i=0;i<N;i++)
    {
        int j = uniform_multinomial_sample(N);
        destination(i) << source(j);
    }
}

Here is the call graph for this function:

real PLearn::bounded_uniform ( real  a,
real  b 
)

returns a random number uniformly distributed between a and b

Definition at line 259 of file random.cc.

References a, RNMX, and uniform_sample().

Referenced by PLearn::PLearnServer::findFreeObjID(), PLearn::UniformSampleVariable::fprop(), PLearn::HeapTest::perform(), and randomTransformation().

{
    real res = uniform_sample()*(b-a) + a;
    if (res >= b) return b*RNMX;
    else return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::boundingBoxToVertices ( const Mat &  bbox)

Definition at line 119 of file geometry.cc.

Referenced by PLearn::ICP::iterate().

{
  /*
  Mat vertices( 8, 3 );

  ostringstream buf;
  buf << bbox(0,0) << " " << bbox(0,1) << " " << bbox(0,2) << " "
      << bbox(0,0) << " " << bbox(0,1) << " " << bbox(1,2) << " "
      << bbox(0,0) << " " << bbox(1,1) << " " << bbox(0,2) << " "
      << bbox(0,0) << " " << bbox(1,1) << " " << bbox(1,2) << " "
      << bbox(1,0) << " " << bbox(0,1) << " " << bbox(0,2) << " "
      << bbox(1,0) << " " << bbox(0,1) << " " << bbox(1,2) << " "
      << bbox(1,0) << " " << bbox(1,1) << " " << bbox(0,2) << " "
      << bbox(1,0) << " " << bbox(1,1) << " " << bbox(1,2) << " ";

  vertices << buf.str();
   */

  real buf_[24] = {
    bbox(0,0), bbox(0,1), bbox(0,2),
    bbox(0,0), bbox(0,1), bbox(1,2),
    bbox(0,0), bbox(1,1), bbox(0,2),
    bbox(0,0), bbox(1,1), bbox(1,2),
    bbox(1,0), bbox(0,1), bbox(0,2),
    bbox(1,0), bbox(0,1), bbox(1,2),
    bbox(1,0), bbox(1,1), bbox(0,2),
    bbox(1,0), bbox(1,1), bbox(1,2)
  };

  Mat vertices( 8, 3, buf_ );

  return vertices;
}

Here is the caller graph for this function:

template<class T >
void PLearn::bprop_tanh ( const TVec< T > &  tanh_x,
const TVec< T > &  d_tanh_x,
TVec< T > &  d_x 
)

Definition at line 1382 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, PLearn::TVec< T >::resize(), and PLearn::TVec< T >::size().

Referenced by PLearn::IncrementalNNet::train().

{
#ifdef BOUNDCHECK
    if(tanh_x.length()!=d_tanh_x.length())
        PLERROR("In bprop_tanh, src and dest vectors must have the same length");
#endif
    if (tanh_x.size() > 0 && d_tanh_x.size() > 0 && d_x.size() > 0) {
        int n = tanh_x.length();
        if (n != d_x.length()) d_x.resize(n);
        T* y = tanh_x.data();
        T* dy = d_tanh_x.data();
        T* dx = d_x.data();
        for(int i=0; i<n; i++)
        {
            real yi = *y++;
            *dx++ = *dy++ * (1 - yi*yi);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::bprop_update_layer ( real dy,
real x,
real dx,
real w,
int  n_y,
int  n_x,
real  learning_rate,
real  weight_decay 
) [inline]

Definition at line 676 of file TMat_maths_specialisation.h.

References i, j, prefetchnta, w, and x.

{
#ifdef BUNDLE
    int nx8 = (n_x >> 3) << 3;
    int j8=0;
    real* xj = x;
    real* dxj = dx;
    int delta_w1 = n_x - 8;
    int delta_w2 = n_y*n_x - 8;
    real* w_ij = w;
    for (;j8<nx8;j8+=8,xj+=8,dxj+=8,w_ij-=delta_w2)
    {
        real* dy_ = dy;
        for (int i=0;i<n_y;i++)
        {
            real* next_w = w_ij + delta_w1;
            prefetchnta(*next_w);
            real* x_j = xj;
            real* dx_j = dxj;
            real d_y = dy_[i];
            *dx_j   += d_y * *w_ij;
            *w_ij   -= learning_rate*(d_y * *x_j + weight_decay * *w_ij);
            dx_j[1] += d_y * w_ij[1];
            w_ij[1] -= learning_rate*(d_y * x_j[1] + weight_decay * w_ij[1]);
            dx_j[2] += d_y * w_ij[2];
            w_ij[2] -= learning_rate*(d_y * x_j[2] + weight_decay * w_ij[2]);
            dx_j[3] += d_y * w_ij[3];
            w_ij[3] -= learning_rate*(d_y * x_j[3] + weight_decay * w_ij[3]);
            dx_j[4] += d_y * w_ij[4];
            w_ij[4] -= learning_rate*(d_y * x_j[4] + weight_decay * w_ij[4]);
            dx_j[5] += d_y * w_ij[5];
            w_ij[5] -= learning_rate*(d_y * x_j[5] + weight_decay * w_ij[5]);
            dx_j[6] += d_y * w_ij[6];
            w_ij[6] -= learning_rate*(d_y * x_j[6] + weight_decay * w_ij[6]);
            dx_j[7] += d_y * w_ij[7];
            w_ij[7] -= learning_rate*(d_y * x_j[7] + weight_decay * w_ij[7]);
            w_ij = next_w;
        }
    }
    for (int i=0;i<n_y;i++)
    {
        real dy_i = dy[i];
        real *dx_j = dx;
        real *x_j = x;
        for (int j=j8;j<n_x;j++)
        {
            *dx_j++ += dy_i * *w;
            *w++ -= learning_rate*(dy_i * *x_j++ + weight_decay * *w);
        }
    }

#else
#ifdef UNFOLD
    int nx4 = (n_x >> 2) << 2;
    real *w_i = w;
    for (int i=0;i<n_y;i++,w_i+=n_x)
    {
        real dy_i = dy[i];
        real *dx_j = dx;
        real *x_j = x;
        int j=0;
        for (;j<nx4;j+=4)
        {
            real w_ij0 = w_i[j];
            real w_ij1 = w_i[j+1];
            real w_ij2 = w_i[j+2];
            real w_ij3 = w_i[j+3];
            dx_j[j] += dy_i * w_ij0;
            dx_j[j+1] += dy_i * w_ij1;
            dx_j[j+2] += dy_i * w_ij2;
            dx_j[j+3] += dy_i * w_ij3;
            w_i[j] -= learning_rate*(dy_i * x_j[j] + weight_decay * w_ij0);
            w_i[j+1] -= learning_rate*(dy_i * x_j[j+1] + weight_decay * w_ij1);
            w_i[j+2] -= learning_rate*(dy_i * x_j[j+2] + weight_decay * w_ij2);
            w_i[j+3] -= learning_rate*(dy_i * x_j[j+3] + weight_decay * w_ij3);
        }
        for (;j<n_x;j++)
        {
            real w_ij = w_i[j];
            dx_j[j] += dy_i * w_ij;
            w_i[j] -= learning_rate*(dy_i * x_j[j] + weight_decay * w_ij);
        }
    }
#else
    for (int i=0;i<n_y;i++)
    {
        real dy_i = dy[i];
        real *dx_j = dx;
        real *x_j = x;
        for (int j=0;j<n_x;j++)
        {
            *dx_j++ += dy_i * *w;
            *w++ -= learning_rate*(dy_i * *x_j++ + weight_decay * *w);
        }
    }
#endif
#endif
}
template<class T >
void PLearn::bpropCholeskyDecomposition ( const TMat< T > &  A,
const TMat< T > &  L,
TMat< T > &  dC_dA,
TMat< T > &  dC_dL 
)

Definition at line 6256 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), n, and PLearn::TMat< T >::resize().

{
    int n = A.length();
    if (dC_dA)
        dC_dA.resize(n,n);
    int i,j,k;
    for (i=n-1;i>=0;i--)
    {
        const T* Li = L[i];
        T* dC_dLi = dC_dL[i];
        T* dC_dAi = dC_dA[i];
        T invLii = 1.0/Li[i];
        for (j=n-1;j>i;j--)
        {
            const T* Lj = L[j];
            T* dC_dLj = dC_dL[j];
            T dC_dLji = dC_dLj[i];
            dC_dLi[i] -= dC_dLji * Lj[i] * invLii;
            dC_dAi[j] += dC_dLji * invLii;
            for (k=0;k<i;k++)
            {
                dC_dLi[k] -= dC_dLji * Lj[k] * invLii;
                dC_dLj[k] -= dC_dLji * Li[k] * invLii;
            }
        }
        T dC_dLii = dC_dLi[i];
        dC_dAi[i] += 0.5 * dC_dLii * invLii;
        for (k=0;k<i;k++)
            dC_dLi[k] -= dC_dLii * Li[k] * invLii;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::bpropCholeskySolve ( const TMat< T > &  L,
const TVec< T > &  x,
const TVec< T > &  y,
TMat< T > &  dC_dL,
TVec< T > &  dC_db,
TVec< T > &  dC_dx 
)

Definition at line 6462 of file TMat_maths_impl.h.

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

{
    int n = L.length();
    int i,k;
    TVec<T> dC_dy(n);
    const T *xp = x.data();
    const T *yp = y.data();
    T *dC_dbp = dC_db.data();
    T *dC_dxp = dC_dx.data();
    T* dC_dyp = dC_dy.data();

    // (1) back-prop through step L' x = y:
    for (i=0;i<n;i++)
    {
        const T* Li = L[i];
        T invLii = 1.0 / Li[i];
        dC_dyp[i] = dC_dxp[i] * invLii;
        T dC_dxi = dC_dxp[i];
        dC_dL[i][i] -= dC_dxp[i] * xp[i] * invLii;
        for (k=i+1;k<n;k++)
        {
            dC_dxp[k] -= dC_dxi * L[k][i] * invLii;
            dC_dL[k][i] -= dC_dxi * xp[k] * invLii;
        }
    }

    // (2) back-prop through step L y = b:
    for (i=n-1;i>=0;i--)
    {
        const T* Li = L[i];
        T* dC_dLi = dC_dL[i];
        T invLii = 1.0 / Li[i];
        T dC_dyi = dC_dyp[i];
        T dC_dyi_over_Lii = dC_dyi * invLii;
        dC_dbp[i] += dC_dyi_over_Lii;
        dC_dLi[i] -= dC_dyi_over_Lii * yp[i];
        for (k=0;k<i;k++)
        {
            dC_dyp[k] -= dC_dyi_over_Lii * Li[k];
            dC_dLi[k]  -= dC_dyi_over_Lii * yp[k];
        }
    };
}

Here is the call graph for this function:

char PLearn::byte_order ( ) [inline]
real PLearn::calcNormal ( graph mesh,
const vertex_descriptor &  vtx,
Vec &  norm 
)

Definition at line 492 of file geometry.cc.

References calcPlaneParams(), d, dist(), dot(), findSumsFromPts(), n, sqrt(), and vertex_ppt.

Referenced by PLearn::SurfaceMesh::findNormals(), and isOverlapping().

{
  set<vertex_descriptor> points;

  adjacency_iterator ai, ai_end;
  for( tie(ai,ai_end)=adjacent_vertices(vtx,mesh) ; ai!=ai_end ; ai++ )
  {
    adjacency_iterator bi, bi_end;
    for( tie(bi,bi_end)=adjacent_vertices(*ai,mesh) ; bi!=bi_end ; bi++ )
    {
      points.insert( *bi );
    }
  }

  /* determine the sums used to calculate the surface normal by fitting 
     a plane to the neighborhood of points */

  Vec sums( 10 );
  real d;
  real fit_error;
  findSumsFromPts( mesh, points, sums );
  calcPlaneParams( sums, norm, d, fit_error ); // fit the plane to get normal

  real n = sums[0];

  real error_sum = 0;
  for( tie(ai,ai_end)=adjacent_vertices(vtx,mesh) ; ai!=ai_end ; ai++ )
  {
    real dist = dot( norm, get(vertex_ppt,mesh,*ai)->coord ) + d;
    error_sum += dist*dist;
  }

  fit_error = sqrt( error_sum )/n;

  if( n <= 3 )
  { fit_error = INFINITY; }

  /* return the fit error on the plane */
  return fit_error;

}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::calcNormal ( const Vec &  v1,
const Vec &  v2,
const Vec &  v3,
const Vec &  n1,
const Vec &  n2,
const Vec &  n3,
const Vec &  target 
)

Definition at line 534 of file geometry.cc.

References normal(), and normalize().

{
  // just use avg of the 3 normals for now (later use barycentric coords)
  Vec normal = n1 + n2 + n3;
  normalize( normal, 2 );

  return normal;
}

Here is the call graph for this function:

void PLearn::calcPlaneParams ( const Vec &  sums,
Vec &  norm,
real d,
real err 
)

Definition at line 595 of file geometry.cc.

References getNormFromEigVecs(), jacobi(), and PLearn::TVec< T >::resize().

Referenced by calcNormal().

{
  if( sums[0] >= 3 )
  {
    real one_over_n = 1./sums[0];

    Mat inertia( 3, 3 );

    inertia(0,0) = ( sums[4] - sums[1]*sums[1]*one_over_n );
    inertia(1,1) = ( sums[5] - sums[2]*sums[2]*one_over_n );
    inertia(2,2) = ( sums[6] - sums[3]*sums[3]*one_over_n );
    inertia(1,0) = inertia(0,1) = (sums[7]-sums[1]*sums[2]*one_over_n );
    inertia(2,0) = inertia(0,2) = (sums[8]-sums[1]*sums[3]*one_over_n );
    inertia(2,1) = inertia(1,2) = (sums[9]-sums[2]*sums[3]*one_over_n );

    Mat e( 3, 3 );
    Vec ev( 3 );
    int nrot;

    if( jacobi( inertia, ev, e, nrot ) )
    {
      // The eigen vector corresponding to the smallest eigen value of
      // the inertia matrix is the normal of the plane.

      int sm_ev = getNormFromEigVecs( ev, e, norm );
      err = fabs( ev[sm_ev] );
      d = -( sums[1]*norm[0] + sums[2]*norm[1]+sums[3]*norm[2])/sums[0];
      return;
    }
  }

  norm.resize( 3 );
  norm << "0 0 1";
  d = 0;
  err = INFINITY;
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::callFunction ( const string &  funcname,
int  nargs,
PStream &  io 
)

Calls a function previously declared with the declareFunction mechanism.

This is used by the remote function call mechanism, and is the equivalent of method Object::call but for global functions and static methods.

Definition at line 1007 of file Object.cc.

References getGlobalFunctionMap(), PLearn::RemoteMethodMap::lookup(), and PLERROR.

{
    // Look up methodname in the RemoteMethodMap
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    if (const RemoteTrampoline* trampoline = rmm.lookup(funcname,nargs))
        trampoline->call(0, nargs, io);
    else
        PLERROR("No function has been registered with name '%s' and %d arguments",
                funcname.c_str(), nargs);
}

Here is the call graph for this function:

void PLearn::canonical ( )

void relativePathAsserts(); { PPath home_ = PPath::home(); PPath cwd = PPath::getcwd();

chdir( home_ ); PPath ppath = PPath("foo/bar"); MAND_LOG << PPath ppath = PPath("foo/bar"); << endl; PRINT_TEST( "Process current working directory:", PPath::getcwd() ); }

Definition at line 455 of file PPathTest.cc.

References PLearn::PPath::absolute(), PLearn::PPath::addProtocol(), PLearn::PPath::canonical(), endl(), PLearn::PPath::isAbsPath(), PLearn::PPath::isFilePath(), PLearn::PPath::isFtpPath(), PLearn::PPath::isHttpPath(), MAND_LOG, plhead(), PRINT_TEST, and PLearn::PPath::protocol().

Referenced by PLearn::PPath::setCanonicalInErrors().

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::catch_interrupt_signal ( )

Definition at line 86 of file plearn_main.cc.

References handler_of_interrup_signal().

Referenced by plearn_main().

                             {                                           
#ifndef WIN32                                                            
    struct sigaction my_action;                                          
    my_action.sa_handler = handler_of_interrup_signal;                   
    my_action.sa_flags = SA_RESTART;                                     
    sigaction (SIGINT, &my_action, NULL);                                
#endif                                                                   
}                                                                        

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::cccost ( VMat  distr,
Func  the_f_error,
Func  the_f_candidate 
) [inline]

sumOf

Definition at line 100 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
string PLearn::center ( const string &  s,
size_t  width,
char  padding 
)
Vec PLearn::centerSubVec ( Vec  v,
int  n = 16 
)

returns a subvector made of the (max) n "central" values of v

Definition at line 308 of file DisplayUtils.cc.

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

  {
    int l = v.length();
    if(l<=n)
      return v;    
    return v.subVec((l-n)/2,n);
  }

Here is the call graph for this function:

static std::string PLearn::char_string ( int  c) [static]

Returns a string with the character, or "EOF" for the end of file value.

Definition at line 144 of file PStreamBufTest.cc.

References c.

Referenced by test().

{
    char string_template[] = { '\'', '!', '\'', '\0' };
    if (c == EOF)
        return "EOF";
    else {
        string_template[1] = c;
        return std::string(string_template);
    }
}

Here is the caller graph for this function:

int PLearn::chdir ( const PPath &  path)

Change current directory.

Definition at line 103 of file fileutils.cc.

References PLearn::PPath::absolute(), PLERROR, and SYSTEM_CHDIR.

Referenced by PLearn::PLearnServer::callFunction(), PLearn::PLearnServer::cd(), PLearn::Plide::executePyPLearn(), and readFileAndMacroProcess().

{ 
    int status = ::SYSTEM_CHDIR(path.absolute().c_str()); 
    if (status!=0)
        PLERROR("Could not chdir to %s.",path.absolute().c_str());
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::check_prob ( ProbabilitySparseMatrix &  pYX,
string  Yname,
string  Xname 
) [inline]

Definition at line 463 of file ProbabilitySparseMatrix.h.

References PLearn::Set::begin(), PLearn::Set::end(), PLearn::ProbabilitySparseMatrix::getPYx(), PLERROR, PLearn::ProbabilitySparseMatrix::X, and x.

{
    bool failed = false;
    real sum_pY = 0.0;
    Set X = pYX.X;
    for (SetIterator x_it = X.begin(); x_it!=X.end(); ++x_it)
    {
        int x = *x_it;
        const map<int,real>& pYx = pYX.getPYx(x);
        sum_pY = 0.0;
        for (map<int,real>::const_iterator y_it=pYx.begin();y_it!=pYx.end();++y_it)
        {
            sum_pY += y_it->second;
        }
        if (fabs(sum_pY - 1.0) > 1e-4)
        {
            failed = true;
            break;
        }
    }
    if (failed)
        PLERROR("check_prob failed for %s -> %s (sum of a column = %g)", Xname.c_str(), Yname.c_str(), sum_pY);
}

Here is the call graph for this function:

void PLearn::check_prob ( Set  Y,
const map< int, real > &  pYx 
) [inline]

Definition at line 487 of file ProbabilitySparseMatrix.h.

References PLearn::Set::contains(), if(), and PLERROR.

{
    real sum_y=0;
    for (map<int,real>::const_iterator y_it=pYx.begin();y_it!=pYx.end();++y_it)
        if (Y.contains(y_it->first))
            sum_y += y_it->second;
    if (fabs(sum_y-1)>1e-4 && pYx.size() != 0)
        PLERROR("check_prob failed, sum_y=%g",sum_y);
}

Here is the call graph for this function:

void PLearn::checkWrappedObjects ( const string &  msg)

Definition at line 581 of file PythonObjectWrapper.cc.

References PLearn::PStream::clearInOutMaps(), endl(), and PLearn::PythonObjectWrapper::m_wrapped_objects.

{
    DBG_MODULE_LOG << msg << endl;
    map<PyObject*, const Object*> rev_map;
    for(PythonObjectWrapper::wrapped_objects_t::iterator it= PythonObjectWrapper::m_wrapped_objects.begin();
        it != PythonObjectWrapper::m_wrapped_objects.end(); ++it)
    {
        DBG_MODULE_LOG << "checking:" << (void*)it->first << " -> " << (void*)it->second << endl;
        map<PyObject*, const Object*>::iterator jt= rev_map.find(it->second);
        DBG_MODULE_LOG.clearInOutMaps();
        if(jt != rev_map.end())
            DBG_MODULE_LOG << "*** ALREADY IN MAP:" << it->second << "w/" << it->first << " ; now " << jt->second << endl;
        //else
        rev_map[it->second]= it->first;
    }
    DBG_MODULE_LOG << "FINISHED checking wrapped objects:\t" << rev_map.size() << '\t' << msg << endl;
}

Here is the call graph for this function:

void PLearn::chol_dxch ( Mat &  R,
int  l,
int  m 
)

From 'Matrix Algorithms, Vol1' by G. W. Stewart, p.272, 273, 335, 338.

Definition at line 228 of file Cholesky_utils.cc.

References c, chol_rotapp(), chol_rotgen(), PLearn::TMat< T >::length(), m, n, PLearn::TMat< T >::subMatRows(), and PLearn::TMat< T >::swapColumns().

{
    if (l == m)
        return;
    if (l > m) {
        int tmp = l;
        l = m;
        m = tmp;
    }
    //static Vec tmp;
    int n = R.length();
    int p = n;
    //Mat first_m_rows = R.subMatRows(0, m + 1);
    R.subMatRows(0, m + 1).swapColumns(l, m);
    real c, s;
    for (int k = m - 1; k >= l + 1; k--) {
        chol_rotgen(R(k, l), R(k + 1, l), c, s);
        chol_rotapp(c, s, R(k).subVec(k, p - k), R(k + 1).subVec(k, p - k));
    }
    for (int k = l; k < m; k++) {
        chol_rotgen(R(k, k), R(k + 1, k), c, s);
        chol_rotapp(c, s, R(k).subVec(k + 1, p - k - 1),
                          R(k + 1).subVec(k + 1, p - k - 1));
    }
}

Here is the call graph for this function:

void PLearn::chol_dxch_tr ( Mat &  R_t,
int  l,
int  m 
)

These two functions are variants of the above functions, where the R matrix is given as its transpose (which is the case in the Cholesky decomposition).

This allows a more efficient implementation of choleskyRemoveDimension(..).

Definition at line 257 of file Cholesky_utils.cc.

References c, chol_rotapp_tr_opt(), chol_rotgen(), m, n, PLearn::TMat< T >::subMatColumns(), swapRows(), and PLearn::TMat< T >::width().

Referenced by choleskyRemoveDimension().

{
    if (l == m)
        return;
    if (l > m) {
        int tmp = l;
        l = m;
        m = tmp;
    }
    int n = R.width();
    int p = n;
    swapRows(R.subMatColumns(0, m + 1), l, m);
    real c, s;
    for (int k = m - 1; k >= l + 1; k--) {
        chol_rotgen(R(l, k), R(l, k + 1), c, s);
        chol_rotapp_tr_opt(c, s, R, k, k, k + 1, p - k);
        /*
        chol_rotapp_tr(c, s, R.subMat(k, k, p - k, 1),
                             R.subMat(k, k + 1, p - k, 1));
        */
    }
    for (int k = l; k < m; k++) {
        chol_rotgen(R(k, k), R(k, k + 1), c, s);
        chol_rotapp_tr_opt(c, s, R, k + 1, k, k + 1, p - k - 1);
        /*
        chol_rotapp_tr(c, s, R.subMat(k + 1, k, p - k - 1, 1),
                             R.subMat(k + 1, k + 1, p - k - 1, 1));
        */
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::chol_rotapp ( real  c,
real  s,
const Vec &  x,
const Vec &  y 
)

Definition at line 291 of file Cholesky_utils.cc.

References PLearn::TVec< T >::length(), multiplyScaledAdd(), PLASSERT, PLearn::TVec< T >::resize(), and x.

Referenced by chol_dxch().

{
    static Vec t;
    PLASSERT( x.length() == y.length() );
    t.resize(x.length());
    t << x;
    multiplyScaledAdd(y, c, s, t);
    multiplyScaledAdd(x, c, -s, y);
    x << t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::chol_rotapp_tr ( real  c,
real  s,
const Mat &  x,
const Mat &  y 
)

Definition at line 305 of file Cholesky_utils.cc.

References c, PLearn::TMat< T >::length(), multiplyAcc(), PLASSERT, PLearn::TMat< T >::resize(), PLearn::TMat< T >::width(), and x.

Referenced by chol_rotapp_tr_opt().

{
    static Mat t;
    PLASSERT( x.length() == y.length() );
    PLASSERT( x.width() == 1 );
    t.resize(x.length(), x.width());
    t << x;
    x *= c;
    multiplyAcc(x, y, s);
    y *= c;
    multiplyAcc(y, t, -s);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::chol_rotapp_tr_opt ( real  c,
real  s,
const Mat &  R,
int  i,
int  j,
int  k,
int  m 
)

Optimized version of 'chol_rotapp_tr' that directly call BLAS functions.

Same as chol_rotapp_tr(c, s, R.subMat(i, j, m, 1), R.subMat(i, k, m, 1)).

Definition at line 321 of file Cholesky_utils.cc.

References chol_rotapp_tr(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::mod(), PLearn::TMat< T >::resize(), and PLearn::TMat< T >::subMat().

Referenced by chol_dxch_tr().

{
#ifdef USE_BLAS_SPECIALISATIONS
    static Mat t;
    t.resize(m, 1);
    real* t_data = t.data();
    real* R_i = R[i];
    real* x_data = R_i + j;
    real* y_data = R_i + k;
    int one = 1;
    int mod = R.mod();
    BLAS_COPY(&m, x_data, &mod, t_data, &one);
    BLAS_SCALE(&m, &c, x_data, &mod);
    BLAS_MULT_ACC(&m, &s, y_data, &mod, x_data, &mod);
    BLAS_SCALE(&m, &c, y_data, &mod);
    real minus_s = -s;
    BLAS_MULT_ACC(&m, &minus_s, t_data, &one, y_data, &mod);
#else
    chol_rotapp_tr(c, s, R.subMat(i, j, m, 1), R.subMat(i, k, m, 1));
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::chol_rotgen ( real a,
real b,
real c,
real s 
)

Definition at line 347 of file Cholesky_utils.cc.

References fast_exact_is_equal(), and sqrt().

Referenced by chol_dxch(), and chol_dxch_tr().

{
    real t = fabs(a) + fabs(b);
    if (fast_exact_is_equal(t, 0)) {
        c = 1;
        s = 0;
        return;
    }
    real a_over_t = a / t;
    real b_over_t = b / t;
    t *= sqrt( a_over_t * a_over_t + b_over_t * b_over_t);
    c = a / t;
    s = b / t;
    a = t;
    b = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::choleskyAppendDimension ( Mat &  L,
const Vec &  new_row 
)

Update the Cholesky decomposition of A = L L' when a new row is appended to the matrix A.

Since A is symmetric, this of course means that this 'new_row' vector is also appended as a column in A. The matrix L is modified as follows:

  • its dimensions (length and width) are increased by 1
  • its last row (except the bottom-right element) is the vector x such that Lx = new_row (obtained by back-substitution)
  • its bottom-right element is set to sqrt(new_row.last() - ||y||^2) Computational cost: O(n^2)

Definition at line 57 of file Cholesky_utils.cc.

References PLearn::TVec< T >::append(), choleskyLeftSolve(), PLearn::TVec< T >::hasMissing(), PLearn::TMat< T >::hasMissing(), PLearn::TVec< T >::last(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), n, PLASSERT, pownorm(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), sqrt(), PLearn::TVec< T >::subVec(), and PLearn::TMat< T >::width().

Referenced by PLearn::GaussMix::updateCholeskyFromPrevious().

{
    static Vec last_row;
    int n = L.length();
    PLASSERT( L.width() == n);
    PLASSERT( new_row.length() == n + 1 );
    PLASSERT( new_row.last() >= 0 );

    if (n == 0) {
        // Simpler version for this specific case.
        L.resize(1, 1);
        L(0, 0) = sqrt(new_row[0]);
        PLASSERT( !L.hasMissing() );
        return;
    }

    last_row.resize(n);
    choleskyLeftSolve(L, new_row.subVec(0, n), last_row);
    last_row.append(sqrt(new_row.last() - pownorm(last_row)));
    PLASSERT( !last_row.hasMissing() );
    L.resize(n + 1, n + 1, 0, true);
    L(n) << last_row;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::choleskyDecomposition ( const TMat< T > &  A,
TMat< T > &  L 
)

Definition at line 6187 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), eps, fast_exact_is_equal(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), n, PLERROR, PLWARNING, PLearn::TMat< T >::resize(), sqrt(), sum(), and PLearn::TMat< T >::width().

Referenced by choleskyInvert(), choleskySolve(), PLearn::GaussMix::computeLogLikelihood(), logOfNormal(), solveLinearSystemByCholesky(), solveTransposeLinearSystemByCholesky(), and testCholeskyRoutines().

{
    int n = A.length();
    if (n!=A.width())
        PLERROR("choleskyDecomposition: non-square matrix %dx%d\n",n,A.width());
    L.resize(n,n);
    int i,j,k;
    T sum;
    bool restart=false;
    do
    {
        restart=false;
        for (i=0;i<n;i++)
        {
            const T* Ai = A[i];
            T* Li = L[i];
            T Lii=0;
            for (j=i;j<n;j++)
            {
                T* Lj = L[j];
                for (sum=Ai[j],k=i-1;k>=0;k--) sum -= Li[k] * Lj[k];
                if (i==j)
                {
                    if (sum <= 0.0)
                    {
                        T eps = -1.1*sum;
                        if (fast_exact_is_equal(sum,0.0)) eps=1e-8;
                        PLWARNING("Cholesky decomposition would fail: add %g to diagonal",eps);
                        // saveAscii("A.amat",A);
                        T* Aii=A.data();
                        int addm=A.mod()+1;
                        for (int ii=0;ii<n;ii++,Aii+=addm) *Aii += eps;
                        restart=true;
                        break;
                    }
                    Lii = sqrt(sum);
                }
                else Lj[i] = sum/Lii;
            }
            if (restart) break;
            Li[i] = Lii;
        }
    }
    while (restart);

}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::choleskyInsertBasis ( Mat &  L,
Mat  active_bases_outputs,
Vec  new_basis_outputs,
real  lambda,
real  min_Lii 
)

Definition at line 112 of file Cholesky_utils.cc.

References choleskyLeftSolve(), PLearn::TVec< T >::data(), dot(), i, PLearn::TMat< T >::length(), pownorm(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), and sqrt().

Referenced by testCholeskyRoutines().

{
    // Let us write f = new_basis_outputs.
    // Let L* be the new L (we will do it in-place, though). 
    // It is easy to show that  L*(1:n_active,1:n_active) = L, so we only need to find
    // the new row of L* and its last element d=L*(n_active+1,n_active+1).
    // Let l be the vector with the first (current) n_active elements of that new row
    // and l*=L*(n_active+1,n_active+1).
    // 
    // The elements of the last row of L* L*' should be y_i = sum_t phi_{ti} f_t = f . phi_{:,i}.
    // The last element of the new row (lower right corner) of L* L*' should be lambda + f . f.
    // But the elements of the last row of L* L*' are L l. Hence we must choose l s.t. L l = y.
    // This can be obtained by a simple back-substitution. 
    // In the corner element of L* L*' we will get l*^2 + l'l but we want f'f+lambda.
    // Hence we set the corner element of L*, l* = sqrt(f'f+lambda-l'l).
    // 
    
    int n_active = L.length();
    static Vec y,l;
    if (n_active==0) { y.resize(1); l.resize(1); } // to avoid error when asking for data()
    y.resize(n_active);
    real* yp=y.data();
    l.resize(n_active);
    real* lp=l.data();

    // O(n_bases * n_examples)
    for (int i=0;i<n_active;i++)
        yp[i] = dot(new_basis_outputs, active_bases_outputs(i));
    // O(n_bases^2)
    choleskyLeftSolve(L,y,l);
    
    L.resize(n_active+1,n_active+1,n_active*n_active,true);
    real* Lplast=L[n_active];
    real ll=0;
    // O(n_bases)
    for (int i=0;i<n_active;i++)
    {
        Lplast[i] = lp[i];
        ll+=lp[i]*lp[i];
    }
    real arg = lambda + pownorm(new_basis_outputs) - ll;
    if (arg>0)
        Lplast[n_active]=sqrt(arg);
    else
        Lplast[n_active]=min_Lii;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
real PLearn::choleskyInvert ( const TMat< T > &  A,
TMat< T > &  Ainv 
)

Definition at line 6529 of file TMat_maths_impl.h.

References choleskyDecomposition(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), n, pl_log, PLearn::TMat< T >::resize(), and sum().

Referenced by choleskyInvert().

{
    int n= A.length();
    TMat<T> L(n,n);
    Ainv.resize(n,n);

    choleskyDecomposition(A,L);
    // now L L' = A

    real logdet = pl_log(fabs(L(0,0)));
    for(int i=1; i<n; i++)
        logdet += pl_log(fabs(L(i,i)));
    logdet *= 2;

    // Compute Linv and put its transpose above L's diagonal.
    // and put Linv[i][i] = 1 / L[i][i] in L's diagonal.
    int i,j;
    T *Lii = L.data();
    for (i=0;i<n;i++,Lii+=1+n)
        *Lii = 1.0 / *Lii;

    for (j=0;j<n;j++)
    {
        T *Linv_xj = L[j]; // Linv' in L's upper triangle
        for (i=j+1;i<n;i++)
        {
            T sum=0.0;
            T* Li = L[i];
            int k;
            for (k=j;k<i;k++) sum -= Li[k] * Linv_xj[k];
            Linv_xj[i] = sum * Li[i]; // * not / because inverse already done above
        }
    }
    // recall: now Linv above and on diagonal of L, L below it,

    // compute A's inverse
    for (j=0;j<n;j++)
    {
        T* Linv_xj = L[j];
        for (i=n-1;i>=j;i--)
        {
            T sum = Linv_xj[i]; // this is Linv[i][j]
            int k;
            for (k=i+1;k<n;k++)
                sum -= L[k][i] * Ainv[k][j];
            Ainv[i][j] = sum * L[i][i];
        }
        for (i=j-1;i>=0;i--) // symmetric part
            Ainv[i][j] = Ainv[j][i];
    };

    return logdet;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TMat<T> PLearn::choleskyInvert ( const TMat< T > &  A)

Definition at line 6599 of file TMat_maths_impl.h.

References choleskyInvert(), PLearn::TMat< T >::length(), and n.

{
    int n=A.length();
    TMat<T> Ainv(n,n);
    choleskyInvert(A,Ainv);
    return Ainv;
}

Here is the call graph for this function:

template<class T >
void PLearn::choleskyLeftSolve ( const TMat< T > &  L,
const TVec< T > &  b,
const TVec< T > &  y 
)

Definition at line 6291 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), n, PLERROR, sum(), and PLearn::TMat< T >::width().

Referenced by choleskyAppendDimension(), choleskyInsertBasis(), choleskySolve(), choleskyUpgrade(), and PLearn::GaussMix::computeLogLikelihood().

{
    int i,k;
    T sum;
    int n = L.length();
#ifdef BOUNDCHECK
    if (L.width()!=n)
        PLERROR("choleskySolve: matrix L (%d x %d) is not square!",
                n, L.width());
    if (b.length()!=n || y.length()!=n)
        PLERROR("choleskySolve: RHS vector b(%d) or unknown y(%d) incompatible with L(%d,%d)",
                b.length(),y.length(),n,n);
#endif

    if (n == 0)
        // Empty matrix, there is nothing that needs being solved.
        return;

    T* bp = b.data();
    T* yp = y.data();

    // solve L y = b (in variable x if y=0):
    // for i=0..n-1
    //   y[i] = (b[i] - sum_{k<i} L[i][k] y[k])/L[i][i]
    for (i=0;i<n;i++)
    {
        const T* Li = L[i];
        for (sum=bp[i],k=i-1;k>=0;k--) sum -= Li[k] * yp[k];
        if (Li[i]==0)
            PLERROR("choleskyLeftSolve: found zero entry in diagonal of L (%d)",i);
        yp[i] = sum / Li[i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::choleskyRemoveDimension ( Mat &  L,
int  i 
)

Update the Cholesky decomposition of A = L L' when dimension i is removed (i.e.

row and column i are deleted in A).

Definition at line 84 of file Cholesky_utils.cc.

References chol_dxch_tr(), j, PLearn::TMat< T >::length(), and PLearn::TMat< T >::subMat().

Referenced by PLearn::GaussMix::updateCholeskyFromPrevious().

{
    int p = L.length();
    /* Old version, will be removed when the fast version below is tested

    // Note that in order to use the exact algorithms from the matrix
    // algorithms book, we need to transpose L (since R = L' in the QR
    // decomposition). There may be a more efficient way to do the same
    // operations.
    L.transpose();
    for (int j = i; j < p - 1; j++)
        chol_dxch(L, j, j + 1);
    L = L.subMat(0, 0, p - 1, p - 1);
    L.transpose();
    */
    for (int j = i; j < p - 1; j++)
        chol_dxch_tr(L, j, j + 1);
    L = L.subMat(0, 0, p - 1, p - 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::choleskyRightSolve ( const TMat< T > &  L,
TVec< T > &  y,
TVec< T > &  x 
)

Definition at line 6327 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), n, PLERROR, sum(), and PLearn::TMat< T >::width().

Referenced by choleskySolve().

{
    int i,k;
    T sum;
    int n = L.length();
#ifdef BOUNDCHECK
    if (L.width()!=n)
        PLERROR("choleskySolve: matrix L (%d x %d) is not square!",
                n, L.width());
    if (x.length()!=n || y.length()!=n)
        PLERROR("choleskySolve: RHS vector y(%d) or unknown x(%d) incompatible with L(%d,%d)",
                y.length(),x.length(),n,n);
#endif

    if (n == 0)
        // Empty matrix, there is nothing that needs being solved.
        return;

    T* xp = x.data();
    T* yp = y.data();

    // for i=n-1..0
    //   x[i] = (y[i] - sum_{k>i} L[k][i] x[k])/L[i][i]
    for (i=n-1;i>=0;i--)
    {
        for (sum=yp[i],k=i+1;k<n;k++) sum -= L[k][i] * xp[k];
        xp[i] = sum / L[i][i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::choleskySolve ( const TMat< T > &  L,
TVec< T >  b,
TVec< T >  x,
TVec< T > &  y 
)

Definition at line 6377 of file TMat_maths_impl.h.

References choleskyLeftSolve(), and choleskyRightSolve().

Referenced by choleskySolve(), PLearn::GaussMix::computeLogLikelihood(), logOfNormal(), PLearn::PentaTest::perform(), solveLinearSystemByCholesky(), and solveTransposeLinearSystemByCholesky().

{
    // solve L y = b
    choleskyLeftSolve(L,b,y);
    // solve L' x = y
    choleskyRightSolve(L,y,x);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::choleskySolve ( const TMat< T > &  L,
const TMat< T > &  B,
TMat< T > &  X,
TVec< T > &  y 
)

Definition at line 6388 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, sum(), and PLearn::TMat< T >::width().

{
    int i,k;
    T sum;
    int n = L.length();
    int m = X.width();
    if (L.width()!=n)
        PLERROR("choleskySolve: matrix L (%d x %d) is not square!",
                n, L.width());
    if (B.length()!=n || B.width() !=m)
        PLERROR("choleskySolve: RHS matrix B(%d,%d) instead of (%d,%d) like X",
                B.length(),B.width(), n, m);
    if (X.length()!=n)
        PLERROR("choleskySolve: X(%d,%d) not compatible with L(%d,%d)",
                X.length(),m,n,n);
    if (y.length()!=n)
        PLERROR("choleskySolve: y(%d) not compatible with L(%d,%d)",
                y.length(),n,n);
    int bmod = B.mod();
    int xmod = X.mod();
    // loop over columns b and x of B and X
    for (int j=0;j<m;j++)
    {
        T* bp = B.data()+j;
        T* yp = y.data();
        // solve L y = b (in variable x if y=0):
        // for i=0..n-1
        //   y[i] = (b[i] - sum_{k<i} L[i][k] y[k])/L[i][i]
        for (i=0;i<n;i++,bp+=bmod)
        {
            const T* Li = L[i];
            for (sum = *bp,k=i-1;k>=0;k--) sum -= Li[k] * yp[k];
            yp[i] = sum / Li[i];
        }
        // solve L' x = y
        // for i=n-1..0
        //   x[i] = (y[i] - sum_{k>i} L[k][i] x[k])/L[i][i]
        for (i=n-1;i>=0;i--)
        {
            sum=yp[i];
            if (i+1<n)
            {
                T* xp = &X(i+1,j);
                for (k=i+1;k<n;k++,xp+=xmod) sum -= L[k][i] * *xp;
            }
            X(i,j) = sum / L[i][i];
        }
    }
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::choleskySolve ( const TMat< T > &  A,
const TVec< T > &  b 
)

Definition at line 6586 of file TMat_maths_impl.h.

References choleskyDecomposition(), choleskySolve(), PLearn::TMat< T >::length(), n, and x.

{
    int n = A.length();
    TMat<T> L(n,n);
    TVec<T> x(n);
    choleskyDecomposition(A,L);
    choleskySolve(L,b,x);
    return x;
}

Here is the call graph for this function:

template<class T >
void PLearn::choleskySolve ( const TMat< T > &  L,
TVec< T >  b,
TVec< T >  x 
) [inline]
Parameters:
xSo that y be optional

Definition at line 7231 of file TMat_maths_impl.h.

References choleskySolve(), and PLearn::TVec< T >::size().

{ TVec<T> y(b.size()); choleskySolve(L,b,x,y); }

Here is the call graph for this function:

void PLearn::choleskyUpgrade ( Mat &  L,
Vec  v 
)

Definition at line 162 of file Cholesky_utils.cc.

References a, b, choleskyLeftSolve(), d, PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), n, PLearn::TVec< T >::resize(), sqrt(), and u.

Referenced by testCholeskyRoutines().

{
    // Algorithm: See tech report "Low Rank Updates for the Cholesky Decomposition" by Matthias Seeger, UC Berkeley, 2005.
    // Denote n=dim(L)
    // - find vector p s.t. L p = v (back-substitution)
    // - compute elements of vectors b and d as follows:
    //     u=1
    //     for i=1 to n-1
    //       a = u + p_i^2
    //       d_i = a/u
    //       b_i = p_i/a
    //       u = a 
    //     d_n = 1 + p_n^2 / u
    // - update other elements of L as follows:
    //     for i=1 to n
    //       s=0
    //       new L_ii = L_ii * sqrt(d_i)
    //       if i>1 r = L_ii p_i
    //       for j=i-1 down to 1
    //          s = s + r; r = L_ij p_j
    //          new L_ij = (L_ij + s b_j) * sqrt(d_j)
    //
    int n=L.length();
    static Vec p, b, d;
    p.resize(n);
    b.resize(n);
    d.resize(n);
    real* p_=p.data();
    real* b_=b.data();
    real* d_=d.data();
    choleskyLeftSolve(L,v,p);
    real u=1;
    for (int i=0;i<n-1;i++)
    {
        real pi = p_[i];
        real a = u + pi*pi;
        d_[i] = a/u;
        b_[i] = pi/a;
        u=a;
    }
    real lp = p_[n-1];
    d_[n-1]=1+lp*lp/u;
    for (int i=0;i<n;i++)
        d_[i] = sqrt(d_[i]);
    real r;
    for (int i=0;i<n;i++)
    {
        real s=0;
        real* Li = L[i];
        real Lii = Li[i];
        Li[i] *= d_[i];
        if (i>0) {
            r = Lii*p_[i];
            for (int j=i-1;j>=0;j--)
            {
                s=s+r;
                r=Li[j]*p_[j];
                Li[j] = (Li[j] + s*b_[j])*d_[j];
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

CostFunc PLearn::class_distance_proportion ( ) [inline]

if outputs are neg distances to each class: dist_to_correct_class/(dist_to_correct_class+dist_to_closest_other_class)

Definition at line 79 of file ClassDistanceProportionCostFunction.h.

{ 
    return new ClassDistanceProportionCostFunction(); 
}
CostFunc PLearn::class_error ( bool  output_is_classnum = false,
bool  ignore_missing_values = true 
) [inline]
CostFunc PLearn::class_lift ( bool  make_positive = false) [inline]

Definition at line 87 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
CostFunc PLearn::class_margin ( bool  binary_target_is_01 = false,
bool  output_is_positive = false 
) [inline]

difference between correct class score and max of other class' scores

Definition at line 96 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
template<class T >
void PLearn::classification_confusion_matrix ( TMat< T >  outputs,
TMat< T >  target_classes,
TMat< T >  confusion_matrix 
)

Definition at line 7116 of file TMat_maths_impl.h.

References argmax(), i, j, PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

{
    int argmax, target;
    T v_max, tmp;

    for (int i=0; i<outputs.length(); i++) {
        // Find argmax(outputs)
        v_max = outputs(i,0);
        argmax = 0;
        for (int j=1; j<outputs.width(); ++j) {
            tmp = outputs(i,j);
            if (tmp > v_max) {
                argmax = j;
                v_max = tmp;
            }
        }
        // Update confusion matrix
        target = (int) target_classes(i,0);
        confusion_matrix(argmax, target) ++;
    }
}

Here is the call graph for this function:

Var PLearn::classification_loss ( Var  network_output,
Var  classnum 
) [inline]

Definition at line 79 of file ClassificationLossVariable.h.

Referenced by PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::NNet::getCost(), and main().

{ 
    if(classnum->isScalar())
        return new ClassificationLossVariable(network_output, classnum); 
    else return new MiniBatchClassificationLossVariable(network_output, classnum); 
}

Here is the caller graph for this function:

template<class T >
void PLearn::clear ( const TMat< T > &  x)
void PLearn::clear_1 ( unsigned char &  x) [inline]

Definition at line 175 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( signed char &  x) [inline]

Definition at line 176 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( char &  x) [inline]

Definition at line 174 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( unsigned short &  x) [inline]

Definition at line 178 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( short &  x) [inline]

Definition at line 177 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( unsigned int x) [inline]

Definition at line 180 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( int x) [inline]

Definition at line 179 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( unsigned long &  x) [inline]

Definition at line 182 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( float &  x) [inline]

Definition at line 183 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( double &  x) [inline]

Definition at line 184 of file general.h.

{ x = 0; }
void PLearn::clear_1 ( bool x) [inline]

Definition at line 185 of file general.h.

{ x = false; }
template<class T >
void PLearn::clear_1 ( T &  x) [inline]

clearing an element (that's called by clear_n...) Default implementation for clearing any type

(will work for objects, but not for base types like int, because the default "constructor" for int leaves it uninitialised... Hence the specialisations below

Definition at line 171 of file general.h.

Referenced by clear_n().

{ x = T(); }

Here is the caller graph for this function:

void PLearn::clear_1 ( long &  x) [inline]

Definition at line 181 of file general.h.

{ x = 0; }
template<class For >
void PLearn::clear_n ( For  begin,
int  n 
) [inline]

clears n elements starting at iterator position begin

Definition at line 189 of file general.h.

References clear_1().

Referenced by PLearn::TVec< PP< RegressionTreeNode > >::clear(), PLearn::TMat< pair< real, real > >::clear(), PLearn::Storage< PP< RegressionTreeNode > >::mem_alloc(), PLearn::Storage< PP< RegressionTreeNode > >::resize(), and PLearn::Storage< PP< RegressionTreeNode > >::resizeMat().

{
    while(n--)
    {
        clear_1(*begin);
        ++begin;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::clear_n ( float *  begin,
int  n 
) [inline]

efficient specialisation for built-in types

Definition at line 199 of file general.h.

{ memset(begin,0,n*sizeof(float)); }
void PLearn::clear_n ( double *  begin,
int  n 
) [inline]

Definition at line 202 of file general.h.

{ memset(begin,0,n*sizeof(double)); }
void PLearn::clear_n ( unsigned char *  begin,
int  n 
) [inline]

Definition at line 211 of file general.h.

{ memset(begin,0,n*sizeof(unsigned char)); }
void PLearn::clear_n ( char *  begin,
int  n 
) [inline]

Definition at line 208 of file general.h.

{ memset(begin,0,n*sizeof(char)); }
void PLearn::clear_n ( short *  begin,
int  n 
) [inline]

Definition at line 214 of file general.h.

{ memset(begin,0,n*sizeof(short)); }
void PLearn::clear_n ( int begin,
int  n 
) [inline]

Definition at line 220 of file general.h.

{ memset(begin,0,n*sizeof(int)); }
void PLearn::clear_n ( unsigned short *  begin,
int  n 
) [inline]

Definition at line 217 of file general.h.

{ memset(begin,0,n*sizeof(unsigned short)); }
void PLearn::clear_n ( bool begin,
int  n 
) [inline]

Definition at line 205 of file general.h.

{ memset(begin,0,n*sizeof(bool)); }
void PLearn::clear_n ( unsigned int begin,
int  n 
) [inline]

Definition at line 223 of file general.h.

{ memset(begin,0,n*sizeof(unsigned int)); }
void PLearn::clear_n ( long *  begin,
int  n 
) [inline]

Definition at line 226 of file general.h.

{ memset(begin,0,n*sizeof(long)); }  
void PLearn::clear_n ( unsigned long *  begin,
int  n 
) [inline]

Definition at line 229 of file general.h.

{ memset(begin,0,n*sizeof(unsigned long)); }  
bool PLearn::closestFacePoint ( const Vec &  m1pt,
const set< int > &  m2faces,
const SurfMesh &  mesh2,
const real  dist_t,
Vec &  closest_pt,
real closest_dist,
int closest_face,
TriType &  closest_tri_type 
)

Definition at line 945 of file geometry.cc.

References closestPointOnTriangle(), dist(), and i.

Referenced by isOverlapping().

{
  bool found_closer( false );
  closest_dist = dist_t;

  set<int>::const_iterator loop_iter;
  for( loop_iter = m2faces.begin() ; loop_iter != m2faces.end() ; loop_iter++ )
  {
    int i = *loop_iter;
    MFace mf = mesh2->getFace( i );
    Vec m2coord1 = mesh2->getVertex( mf->pts[0] )->coord;
    Vec m2coord2 = mesh2->getVertex( mf->pts[1] )->coord;
    Vec m2coord3 = mesh2->getVertex( mf->pts[2] )->coord;

    Vec face_pt(3);
    TriType tri_type;
    real dist;
    if( closestPointOnTriangle( m1pt, m2coord1, m2coord2, m2coord3,
                                closest_dist, face_pt, tri_type, dist ) )
    {
      if( dist < closest_dist + REAL_EPSILON )
      {
        found_closer = true;
        closest_pt << face_pt;
        closest_dist = dist;
        closest_face = i;
        closest_tri_type = tri_type;
      }
    }
  }
  return found_closer;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::closestPointOnHyperplane ( const Vec &  x,
const Mat &  points,
real  weight_decay = 0. 
) [inline]

closest point to x on hyperplane that passes through all points (with weight decay)

Definition at line 797 of file plapack.h.

References constrainedLinearRegression(), and transposeProduct().

Referenced by hyperplaneDistance().

{ return transposeProduct(points, constrainedLinearRegression(points,x,weight_decay)); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::closestPointOnTriangle ( const Vec &  p,
const Vec &  v1,
const Vec &  v2,
const Vec &  v3,
const real  dist_t,
Vec &  closest,
TriType &  tri_type,
real dist 
)

Definition at line 1025 of file geometry.cc.

References cross(), dot(), endl(), FACE, norm(), normal(), normalize(), powdistance(), r1_table, r2_table, region1ClosestPoint(), region2ClosestPoint(), VERTEX1, VERTEX2, and VERTEX3.

Referenced by closestFacePoint().

{
  bool stop = false;

  if( powdistance( p, v1, 2 ) < REAL_EPSILON )
  {
    tri_type = VERTEX1;
    stop = true;
  }
  else if( powdistance( p, v2, 2 ) < REAL_EPSILON )
  {
    tri_type = VERTEX2;
    stop = true;
  }
  else if( powdistance( p, v3, 2 ) < REAL_EPSILON )
  {
    tri_type = VERTEX3;
    stop = true;
  }

  if( stop )
  {
    closest << p;
    dist = 0;
  }

  // determine triangle plane equation nx+d=0 and make sure triangle is
  // well defined
  Vec normal = cross( v2-v1, v3-v2 );
  real norm_length = norm( normal );

  if( norm_length < REAL_EPSILON ) // 2 edges of triangle pll (singularity)
  {
    return false;
  }

  // normalize the normal
  normalize( normal, 2 );

  // determine distance to plane
  dist = dot( normal, p ) - dot( normal, v1 );

  // quick test -- no point can be less than dist_t if the distance to
  // the plane containing the triangle is greater than dist_t
  if( fabs(dist) > dist_t + REAL_EPSILON )
  {
    return false;
  }

  // determine point on plane (planep = p - dist*normal)
  Vec planep = p - (dist*normal);

  // determine the position of planep with respect to the 3 lines making
  // up the triangle
  // si > 0 => point is to the left of the edge
  // si = (ei cross planep - vi) dot n

  Vec e1 = v2-v1;
  Vec e2 = v3-v2;
  Vec e3 = v1-v3;

  real s1 = dot( cross( e1, planep ), normal );
  real s2 = dot( cross( e2, planep ), normal );
  real s3 = dot( cross( e3, planep ), normal );

  // region 3 - point projects inside triangle, so return planep
  if( (s1 >= 0) && (s2 >= 0) && (s3 >= 0 ) )
  {
    closest << planep;
    dist = fabs( dist );
    tri_type = FACE;

    if( dist > dist_t + REAL_EPSILON )
      return false;
    else
      return true;

  }

  // region 1 tests - point is inside the u-shaped region formed by one
  // edge and the extension of the adjacent edges
  if( (s1<0) && (s2 >= 0) && (s3 >= 0) )
  {
    int edge_type = region1ClosestPoint( planep, v1, v2, e1, closest );
    tri_type = r1_table[0][edge_type];
    stop = true;
  }
  else if( (s1 >= 0) && (s2 < 0) && (s3 >= 0) )
  {
    int edge_type = region1ClosestPoint( planep, v2, v3, e2, closest );
    tri_type = r1_table[1][edge_type];
    stop = true;
  }
  else if( (s1 >= 0) && (s2 >= 0) && (s3 < 0) )
  {
    int edge_type = region1ClosestPoint( planep, v3, v1, e3, closest );
    tri_type = r1_table[2][edge_type];
    stop = true;
  }

  if( stop )
  {
    dist = norm( p-closest );

    if( dist > dist_t + REAL_EPSILON )
      return false;
    else
      return true;

  }

  // region 2 tests - point is inside the v-shaped region formed by the
  // extension of two edges
  if( (s1 < 0) && (s3 < 0) )
  {
    int edge_type = region2ClosestPoint( planep, v3, v1, v2, e3, e1, closest );
    tri_type = r2_table[0][edge_type];
    stop = true;
  }
  else if( (s2 < 0) && (s1 < 0) )
  {
    int edge_type = region2ClosestPoint( planep, v1, v2, v3, e1, e2, closest );
    tri_type = r2_table[1][edge_type];
    stop = true;
  }
  else if( (s3 < 0) && (s2 < 0) )
  {
    int edge_type = region2ClosestPoint( planep, v2, v3, v1, e2, e3, closest );
    tri_type = r2_table[2][edge_type];
    stop = true;
  }

  if( stop )
  {
    dist = norm( p-closest );

    if( dist > dist_t + REAL_EPSILON )
      return false;
    else
      return true;
  }
  else
  {
    // should not occur, since all solutions should be covered by
    // regions 1, 2 and 3
    cout << "closestPointOnTriangle failed" << endl;
    return false;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::color ( int  colornum,
real  lightness 
)

Definition at line 562 of file Grapher.cc.

References PLERROR, and rgb2real().

Referenced by PLearn::Grapher::plot_2D_classification(), and PLearn::GraphicalBiText::printNode().

{
    real col = 0;
    switch(colornum)
    {
    case 0:
        col = rgb2real(lightness,1,1);
        break;
    case 1:
        col = rgb2real(1,lightness,1);
        break;
    case 2:
        col = rgb2real(1,1,lightness);
        break;
    case 3:
        col = rgb2real(1,lightness,lightness);
        break;
    case 4:
        col = rgb2real(lightness,1,lightness);
    case 5:
        col = rgb2real(lightness,lightness,1);
    default:
        PLERROR("No color setting for colornum %d", colornum);
    }
    return col;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::color_luminance_to_rgb ( int  colornum,
real  luminance,
real r,
real g,
real b 
)

Definition at line 85 of file DisplayUtils.cc.

References PLERROR.

Referenced by color_luminance_to_rgbreal().

  {
    if(luminance<0 || luminance>1)
      PLERROR("In color_luminance_to_rgb luminance %f outside of range [0,1]",luminance);    
  }

Here is the caller graph for this function:

real PLearn::color_luminance_to_rgbreal ( int  colornum,
real  luminance 
)

Definition at line 91 of file DisplayUtils.cc.

References b, color_luminance_to_rgb(), g, and rgb2real().

Referenced by color_luminance_to_rgbreal(), and regulargrid_x_y_outputs_to_bitmap().

  {
    real r=0, g=0, b=0;
    color_luminance_to_rgb(colornum, luminance, r, g, b);
    return rgb2real(r,g,b);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::color_luminance_to_rgbreal ( Vec  colornum,
Vec  luminance,
Vec &  rgbreal 
)

Definition at line 98 of file DisplayUtils.cc.

References color_luminance_to_rgbreal(), i, PLearn::TVec< T >::length(), and PLearn::TVec< T >::resize().

  {
    int l = colornum.length();
    rgbreal.resize(l);
    for(int i=0; i<l; i++)
      rgbreal[i] = color_luminance_to_rgbreal((int)colornum[i],luminance[i]);
  }

Here is the call graph for this function:

template<class T >
void PLearn::columnArgmax ( const TMat< T > &  mat,
TVec< T > &  result 
)

Definition at line 5582 of file TMat_maths_impl.h.

References argmax(), PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width() || mat.length()==0)
        PLERROR("IN void columnMax(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width of mat and mat must have non-zero length");
#endif
    int imax, jmax;
    for(int j=0; j<mat.width(); j++)
    {
        argmax(mat.column(j), imax, jmax);
        result[j] = imax;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::columnArgmin ( const TMat< T > &  mat,
TVec< T > &  result 
)

Definition at line 5597 of file TMat_maths_impl.h.

References argmin(), PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width() || mat.length()==0)
        PLERROR("IN void columnMax(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width of mat and mat must have non-zero length");
#endif
    int imin, jmin;
    for(int j=0; j<mat.width(); j++)
    {
        argmin(mat.column(j), imin, jmin);
        result[j] = imin;
    }
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::columnmatrix ( const TVec< T > &  v) [inline]

returns a view of this vector as a single column matrix

Definition at line 865 of file TMat_impl.h.

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

Referenced by PLearn::GaussMix::computeMeansAndCovariances(), PLearn::Binner::getBins(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::LocallyWeightedDistribution::log_density(), and PLearn::GaussMix::updateSampleWeights().

{ return v.toMat(v.length(),1); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::columnMax ( const TMat< T > &  mat,
TVec< T > &  result 
)

Definition at line 5560 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), max(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::SurfaceMesh::boundingBox(), PLearn::StackedLearner::computeOutput(), and PLearn::MatrixSoftmaxVariable::fprop().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width() || mat.length()==0)
        PLERROR("IN void columnMax(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width of mat and mat must have non-zero length");
#endif
    for(int j=0; j<mat.width(); j++)
        result[j] = max(mat.column(j));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::columnMean ( const TMat< T > &  mat,
TVec< T > &  result 
)
template<class T >
void PLearn::columnMin ( const TMat< T > &  mat,
TVec< T > &  result 
)

Definition at line 5571 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), min(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::SurfaceMesh::boundingBox(), and PLearn::StackedLearner::computeOutput().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width() || mat.length()==0)
        PLERROR("IN void columnMax(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width of mat and mat must have non-zero length");
#endif
    for(int j=0; j<mat.width(); j++)
        result[j] = min(mat.column(j));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::columnSum ( const TMat< T > &  mat,
TVec< T > &  result 
)

all the operations below result in a row vector and are obtained by iterating (e.g. summing) over the row index, e.g. yielding the sum of each column in the result.

Definition at line 5476 of file TMat_maths_impl.h.

References j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width())
        PLERROR("IN void columnSum(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width of mat");
#endif
    int l = mat.length();
    result << mat(0);
    for(int j=1; j<l; j++)
        result += mat(j);
}

Here is the call graph for this function:

Var PLearn::columnSum ( Var  v) [inline]

Definition at line 78 of file ColumnSumVariable.h.

{ 
    if(v->isRowVec())
        return v;
    else
        return new ColumnSumVariable(v); 
}
template<class T >
void PLearn::columnSum ( RowMapSparseMatrix< T >  mat,
TVec< T > &  result 
)
template<class T >
void PLearn::columnSumOfSquares ( const TMat< T > &  mat,
TVec< T > &  result 
)

Definition at line 5489 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, PLearn::TVec< T >::length(), PLERROR, sum_of_squares(), and PLearn::TMat< T >::width().

Referenced by PLearn::StackedLearner::computeOutput(), and DirichletEstimatorMMoments().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width())
        PLERROR("IN void columnSumOfSquares(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width of mat");
#endif
    for(int j=0; j<mat.width(); j++)
        result[j] = sum_of_squares(mat.column(j));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::columnVariance ( const TMat< T > &  mat,
TVec< T > &  result,
const TVec< T > &  columnmean 
)

Definition at line 5529 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, variance(), and PLearn::TMat< T >::width().

Referenced by computeMeanAndStddev(), computeMeanAndVariance(), PLearn::StackedLearner::computeOutput(), and DirichletEstimatorMMoments().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width() || columnmean.length()!=mat.width() || mat.length()==0)
        PLERROR("IN void columnVariance(const TMat<T>& mat, TVec<T>& result, const TVec<T>& columnmean) the length of result and columnmean must equal the width of mat and mat must have non-zero length");
#endif
    for(int j=0; j<mat.width(); j++)
        result[j] = variance(mat.column(j),columnmean[j]);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::columnWeightedMean ( const TMat< T > &  mat,
TVec< T > &  result 
)

Definition at line 5511 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, weighted_mean(), and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width()-1 || mat.length()<=1)
        PLERROR("IN void columnWeightedMean(const TMat<T>& mat, TVec<T>& result) the length of result must equal the width - 1 of mat and mat must have at least 1 length");
#endif
    TVec<T> column_j_vec(mat.length()), weights_vec(mat.length());
    TMat<T> column_j_mat(mat.length(), 1), weights_mat(mat.length(), 1);
    for(int j=0; j<mat.width()-1; j++){
        column_j_mat = mat.column(j);
        weights_mat = mat.column(mat.width()-1);
        column_j_vec = column_j_mat.toVecCopy();
        weights_vec = weights_mat.toVecCopy();
        result[j] = weighted_mean(column_j_vec, weights_vec);
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::columnWeightedVariance ( const TMat< T > &  mat,
TVec< T > &  result,
const TVec< T > &  column_weighted_mean 
)

Definition at line 5540 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), mean(), PLERROR, weighted_variance(), and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(result.length()!=mat.width()-1 || column_weighted_mean.length()!=mat.width()-1 || mat.length()<=1)
        PLERROR("IN void columnWeightedVariance(const TMat<T>& mat, TVec<T>& result, const TVec<T>& column_weighted_mean) the length of result and column_weighted_mean must equal the width - 1 of mat and mat must have at least 1 length");
#endif
    T column_no_weighted_mean_j;
    TVec<T> column_j_vec(mat.length()), weights_vec(mat.length());
    TMat<T> column_j_mat(mat.length(), 1), weights_mat(mat.length(), 1);
    for(int j=0; j<mat.width()-1; j++){
        column_j_mat = mat.column(j);
        weights_mat = mat.column(mat.width()-1);
        column_j_vec = column_j_mat.toVecCopy();
        weights_vec = weights_mat.toVecCopy();
        column_no_weighted_mean_j = mean(mat.column(j));
        result[j] = weighted_variance(column_j_vec, weights_vec, column_no_weighted_mean_j, column_weighted_mean[j]);
    }
}

Here is the call graph for this function:

void PLearn::compactRepresentation ( char *  t)

gives a (intermediate) code for a numeric string (starting with #)

Definition at line 202 of file TypesNumeriques.cc.

References c, compactRepresentationRangesAndOrdinals(), compactRepresentationShrinkNum(), compactRepresentationTranslate(), and d.

Referenced by numericType().

{
    compactRepresentationTranslate(t); // remplace les lettres et chiffres par des codes.
    compactRepresentationShrinkNum(t); // replace n.n par n, etc.
    compactRepresentationRangesAndOrdinals(t); // remplace n-n par r et no par o

    int s=0;
    int d=0;

    // strip les tirets -  
    while (t[s]) 
        if (t[s]!='-') 
            t[d++]=t[s++]; 
        else s++;

    t[d]=0;

    // copie une seule instance du meme symbole.
    s=0;
    d=0;
    while (t[s])
    {
        t[d++]=t[s++];
        while (t[s] && (t[s]==t[d-1])) s++;
    }

    if (t[d-1]=='.') d--; // trailing .
    t[d]=0;

    char c = '#';
    d=0;
    do 
    {
        char tt = t[d];
        t[d]=c;
        c=tt;
        d++;
    } while (c);
    t[d]=0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::compactRepresentationRangesAndOrdinals ( char *  t)

Definition at line 178 of file TypesNumeriques.cc.

References d.

Referenced by compactRepresentation().

{
    // remplace n-n par r et no par o
    int d=0;
    int s=0;

    while (t[s])
    {
        if ( strstr(&t[s],"n-n") == &t[s])
        {
            t[d++]='r';
            s+=3;
        }
        else if ( strstr(&t[s],"no") == &t[s])
        {
            t[d++]='o';
            s+=2;
        }
        else t[d++]=t[s++];
    }
    t[d]=0;
}

Here is the caller graph for this function:

void PLearn::compactRepresentationShrinkNum ( char *  t)

Definition at line 148 of file TypesNumeriques.cc.

References d.

Referenced by compactRepresentation().

{
    // remplace n.n ou .n par n, 
    // mais laisse les constructions du genre n.n.n intactes
    int d=0;
    int s=0;

    while (t[s])
    {
        if ( (strstr(&t[s],"n.n") == &t[s]) && 
             (t[s+3]!='.') && 
             ( (s-1<0) || (t[s-1]!='.') )
            )
        {
            t[d++]='n';
            s+=3;
        }
        else if ( (strstr(&t[s],".n") == &t[s]) &&
                  (t[s+2]!='.') &&
                  ( (s-1<0) || t[s-1]!='n')) 
        {
            t[d++]='n';
            s+=2;
        }
        else t[d++]=t[s++];
    }
    t[d]=0;
}

Here is the caller graph for this function:

void PLearn::compactRepresentationTranslate ( char *  t)

Definition at line 119 of file TypesNumeriques.cc.

References ALPHAsymbols, d, DIGITsymbols, elementOf(), ORDINALS, and stringPos().

Referenced by compactRepresentation().

{
    int d=0;
    int s=0;

    while (t[s])
    { 
        if (elementOf(DIGITsymbols,t[s]))
        {
            t[d++]='n';
            // skip to the next non-digit
            do { s++; } while (t[s] && (elementOf(DIGITsymbols,t[s]) || (t[s]==',')) );
        }
        else if (elementOf(ALPHAsymbols,t[s]))
        {
            if ( (stringPos(&t[s],ORDINALS)==&t[s]) // starts here
                 && (t[d-1]=='n') ) // and the previous run was composed of digits
                t[d++]='o';
            else t[d++]='a';
            // skip to the next non-alpha
            do { s++; } while (t[s] && elementOf(ALPHAsymbols,t[s]));
        }
        else t[d++]=t[s++];
    }
    t[d]=0;

}

Here is the call graph for this function:

Here is the caller graph for this function:

static int PLearn::compare_string_pointers ( const void *  ts1,
const void *  ts2 
) [static]

Definition at line 1091 of file MatIO.cc.

Referenced by loadSTATLOG(), and loadUCIMLDB().

{
    return strcmp(*((char **)ts1),*((char **)ts2));
}

Here is the caller graph for this function:

template<class T >
void PLearn::complement_indices ( TVec< T > &  indices,
int  n,
TVec< T > &  complement_indices,
TVec< T > &  buffer 
)

Definition at line 2273 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TVec< T >::fill(), i, j, PLearn::TVec< T >::length(), n, and PLearn::TVec< T >::resize().

{
    int ni=indices.length();
    T* ind = indices.data();
    T* cind = complement_indices.data();
    buffer.resize(n);
    buffer.fill(0);
    T* buf=buffer.data();
    for (int i=0;i<ni;i++)
        buf[(int)ind[i]]=1.0;
    for (int i=0,j=0;i<n;i++)
        if (buf[i]==0.0)
            cind[j++]=i;
}

Here is the call graph for this function:

void PLearn::compress_vec ( char *  comprbuf,
const double *  data,
int  l,
bool  double_stored_as_float 
)

Definition at line 547 of file pl_io.cc.

References fast_exact_is_equal(), n, and write_compr_mode_and_size_ptr().

{
    //  char* comprbufold=comprbuf;
    double val = 0.;
    while(l)
    {
        val = *data;
        if(fast_exact_is_equal(val, 0.))
        {
            int n=0;
            while(l && fast_exact_is_equal(*data, 0.))
            { ++n; ++data; --l; }
            if(l && fast_exact_is_equal(*data, 1.))
            {
                write_compr_mode_and_size_ptr(comprbuf, 1, n);
                ++data; --l;
            }
            else
                write_compr_mode_and_size_ptr(comprbuf, 0, n);              
        }
        else if(fast_exact_is_equal(val, 1.))
        {
            write_compr_mode_and_size_ptr(comprbuf, 1, 0);
            ++data; --l;
        }
        else if( fast_exact_is_equal(double(char(val)), val) )
        {
            const double* start = data;
            int n=0;
            while(l && fast_exact_is_equal(double(char(val=*data)), val)
                    && !fast_exact_is_equal(val, 0)
                    && !fast_exact_is_equal(val, 1))
            { ++n; ++data; --l; }
            write_compr_mode_and_size_ptr(comprbuf, 2, n);
            while(n--)
                (*comprbuf++) = char(*start++);
        }
        else
        {
            const double* start = data;
            int n=0; 
            while(l && !fast_exact_is_equal((val=*data), 0)
                    && !fast_exact_is_equal(val, 1)
                    && !fast_exact_is_equal(double(char(val)), val))
            { ++n; ++data; --l; }
            write_compr_mode_and_size_ptr(comprbuf, 3, n);
            memcpy(comprbuf,start,n*sizeof(double));
            comprbuf += n*sizeof(double);
        }
    }
}

Here is the call graph for this function:

Mat PLearn::compute2dGridOutputs ( PP< PLearner >  learner,
real  min_x,
real  max_x,
real  min_y,
real  max_y,
int  length,
int  width,
real  singleoutput_threshold 
)

Definition at line 830 of file DisplayUtils.cc.

References i, j, m, and PLERROR.

Referenced by displayDecisionSurface().

{
  Mat m(length,width);
  real delta_x = (max_x-min_x)/(width-1);
  real delta_y = (max_y-min_y)/(length-1);

  if(learner->inputsize()!=2 || (learner->outputsize()!=1 && learner->outputsize()!=2) )
     PLERROR("learner is expected to have an inputsize of 2, and an outputsize of 1 (or possibly 2 for binary classification)");

  Vec input(2);
  Vec output(learner->outputsize());
  for(int i=0; i<length; i++)
  {
    input[1] = min_y+(length-i-1)*delta_y;
    for(int j=0; j<width; j++)
      {
        input[0] = min_x+j*delta_x;
        learner->computeOutput(input,output);
        if(learner->outputsize()==2)
          m(i,j) = output[0]-output[1];
        else
          m(i,j) = output[0]-singleoutput_threshold;
      }
  }
  return m;
}

Here is the caller graph for this function:

template<class T >
void PLearn::compute_fastsigmoid ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1465 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), fastsigmoid(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::size().

Referenced by fastsigmoid().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In fastsigmoid, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = fastsigmoid(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_fasttanh ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1408 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), fasttanh(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::size().

Referenced by fasttanh().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In fasttanh, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = fasttanh(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_inverse_sigmoid ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1485 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, inverse_sigmoid(), PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::size().

Referenced by inverse_sigmoid().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In inverse_sigmoid, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = inverse_sigmoid(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::compute_learner_outputs ( PP< PLearner >  learner,
VMat  inputs 
)

Definition at line 48 of file learner_utils.cc.

References i, and PLearn::VMat::length().

{
    Vec input(learner->inputsize());
    int l = inputs.length();
    Mat outputs(l,learner->outputsize());
    for(int i=0; i<l; i++)
    {
        inputs->getRow(i,input);
        Vec output = outputs(i);
        learner->computeOutput(input, output);
    }
    return outputs;
}

Here is the call graph for this function:

Mat PLearn::compute_learner_outputs_on_grid ( PP< PLearner >  learner,
int  nx,
int  ny,
real  x0,
real  y0,
real  deltax,
real  deltay 
)

Returns a nx*ny x learner->outputsize() matrix of outputs corresponding to the nx*ny grid points.

Definition at line 88 of file learner_utils.cc.

References i, j, PLERROR, tostring(), PLearn::ProgressBar::update(), and x.

{
    if(learner->inputsize()!=2)
        PLERROR("In compute_learner_outputs_on_grid learner's input must be 2D");

    int noutputs = learner->outputsize();
    Vec input(2);
    Mat results(nx*ny, noutputs);

    ProgressBar pb("Computing " + tostring(nx) + " x " + tostring(ny) + " learner outputs",nx*ny);

    real x = x0;
    for(int i=0; i<nx; i++, x+=deltax)
    {
        real y = y0;
        for(int j=0; j<ny; j++, y+=deltay)
        {
            input[0] = x;
            input[1] = y;
            Vec output = results(i*nx+j);
            learner->computeOutput(input,output);
            // cerr << input << " --> " << output << endl;
            pb.update(i*nx+j);
        }
    }

    return results;
}

Here is the call graph for this function:

template<class T >
void PLearn::compute_log ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1306 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, pl_log, PLERROR, and PLearn::TVec< T >::size().

Referenced by PLearn::TransformOutputLearner::computeCostsFromOutputs(), and log().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In log, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = pl_log(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_safelog ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1346 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, safelog(), and PLearn::TVec< T >::size().

Referenced by safelog().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In safelog, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = safelog(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_sigmoid ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1428 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, sigmoid(), and PLearn::TVec< T >::size().

Referenced by PLearn::NeuralProbabilisticLanguageModel::add_transfer_func(), PLearn::FeatureSetSequentialCRF::add_transfer_func(), PLearn::FeatureSetNNet::add_transfer_func(), and sigmoid().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In sigmoid, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = sigmoid(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_sign ( const TVec< T > &  vec,
const TVec< T > &  dest 
)

Definition at line 77 of file TMat_maths_impl.h.

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

Referenced by PLearn::IncrementalNNet::computeOutput().

{
    int len = vec.length();
    if (len > 0) {
        T*  v   = vec.data();
        T*  s   = dest.data();
        while(--len >= 0)
        {
            *s = sign( *v );
            v++; s++;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_sqrt ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1326 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, PLearn::TVec< T >::size(), and sqrt().

Referenced by PLearn::NatGradEstimator::operator()(), and sqrt().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In sqrt, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = sqrt(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::compute_tanh ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1366 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, PLearn::TVec< T >::size(), and tanh().

Referenced by PLearn::NeuralProbabilisticLanguageModel::add_transfer_func(), PLearn::FeatureSetSequentialCRF::add_transfer_func(), PLearn::FeatureSetNNet::add_transfer_func(), PLearn::EntropyContrast::computeNNcontinuous_hidden(), PLearn::IncrementalNNet::computeOutput(), PLearn::NatGradSMPNNet::fpropNet(), PLearn::NatGradNNet::fpropNet(), PLearn::mNNet::fpropNet(), and tanh().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In tanh, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = tanh(*ps++);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::computeBasicStats ( const VMat &  m)

The returned Mat is structured as follows: row 0: mean row 1: stddev row 2: min row 3: max row 4: nmissing row 5: nzero (==0) row 6: npositive (>0) row 7: nnegative (<0) row 8: mean of positive row 9: stddev of positive

Definition at line 123 of file VMat_basic_stats.cc.

References fast_exact_is_equal(), PLearn::TVec< T >::fill(), i, is_missing(), j, PLearn::VMat::length(), MAX_ROW, MEAN_ROW, MEANPOS_ROW, MIN_ROW, NMISSING_ROW, NNEGATIVE_ROW, NPOSITIVE_ROW, NZERO_ROW, sqrt(), square(), STDDEV_ROW, STDDEVPOS_ROW, and PLearn::VMat::width().

Referenced by computeConditionalMeans().

{
    // TODO Use StatsCollector instead ?
    Vec v(m.width());
    real* vdata = v.data();
    Mat stats(10,m.width());
    Vec mean_row = stats(MEAN_ROW);
    Vec stddev_row = stats(STDDEV_ROW);
    Vec min_row = stats(MIN_ROW);
    Vec max_row = stats(MAX_ROW);
    Vec nmissing_row = stats(NMISSING_ROW);
    Vec nzero_row = stats(NZERO_ROW);
    Vec npositive_row = stats(NPOSITIVE_ROW);
    Vec nnegative_row = stats(NNEGATIVE_ROW);
    Vec meanpos_row = stats(MEANPOS_ROW);
    Vec stddevpos_row = stats(STDDEVPOS_ROW);
    min_row.fill(FLT_MAX);
    max_row.fill(-FLT_MAX);

    for(int i=0; i<m.length(); i++)
    {
        m->getRow(i,v);
        for(int j=0; j<v.length(); j++)
        {
            real val = vdata[j];
            if(is_missing(val))
                nmissing_row[j]++;
            else
            {
                if(val<min_row[j])
                    min_row[j] = val;
                if(val>max_row[j])
                    max_row[j] = val;

                if(fast_exact_is_equal(val, 0.))
                    nzero_row[j]++;
                else if(val>0.)
                {
                    npositive_row[j]++;
                    mean_row[j] += val;
                    stddev_row[j] += val*val;
                    meanpos_row[j] += val;
                    stddevpos_row[j] += val*val;
                }
                else // val < 0.
                {
                    nnegative_row[j]++;
                    mean_row[j] += val;
                    stddev_row[j] += val*val;
                }
            }
        }
    }
    for(int j=0; j<stats.width(); j++)
    {
        real nnonmissing = nzero_row[j]+nnegative_row[j]+npositive_row[j];
        mean_row[j] /= nnonmissing;
        meanpos_row[j] /= npositive_row[j];
        stddev_row[j] = sqrt(stddev_row[j]/nnonmissing - square(mean_row[j]));
        stddevpos_row[j] = sqrt(stddevpos_row[j]/npositive_row[j] - square(meanpos_row[j]));
    }
    return stats;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::computeColumnsMeanAndStddev ( const TMat< T > &  m,
TMat< T > &  meanvec,
TMat< T > &  stddevvec 
)

compute the mean and standard deviations of the colums of m (looping over s) (the result is stored in column vectors meanvec and stddevvec)

Definition at line 5725 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), rowMean(), rowVariance(), and sqrt().

{
    rowMean(m,meanvec);
    rowVariance(m,stddevvec,meanvec);
    int l=stddevvec.length();
    for(int i=0; i<l; i++)
        stddevvec[i][0] = sqrt(stddevvec[i][0]);
}

Here is the call graph for this function:

TVec<Mat> PLearn::computeConditionalMeans ( const VMat &  trainset,
int  targetsize,
Mat &  basic_stats 
)

Definition at line 195 of file VMat_basic_stats.cc.

References a, computeBasicStats(), i, is_integer(), PLearn::TMat< T >::isNotEmpty(), j, PLearn::TMat< T >::length(), PLearn::VMat::length(), PLearn::TVec< T >::length(), m, MAX_ROW, mean(), MIN_ROW, n, sqrt(), square(), PLearn::TVec< T >::subVec(), sum(), sumsquare(), variance(), and PLearn::VMat::width().

{
    if(!basic_stats)
        basic_stats = computeBasicStats(trainset);

    int inputsize = trainset.width()-targetsize;
    TVec<Mat> a(inputsize);
    for(int j=0; j<inputsize; j++)
    {
        real minval = basic_stats(MIN_ROW,j);
        real maxval = basic_stats(MAX_ROW,j);
        if(is_integer(minval) && is_integer(maxval) && maxval-minval<400)
        {
            a[j] = Mat(int(maxval-minval+1),2+targetsize*4);
            for(int k=0; k<a[j].length(); k++)
                a[j](k,0) = minval+k;
        }
    }

    Vec row(trainset.width());
    Vec input = row.subVec(0,inputsize);
    Vec target = row.subVec(inputsize,targetsize);
    for(int i=0; i<trainset.length(); i++)
    {
        trainset->getRow(i,row);
        for(int j=0; j<inputsize; j++)
        {
            Mat& m = a[j];
            if(m.isNotEmpty())
            {
                int k = int(input[j]-basic_stats(MIN_ROW,j));
                Vec m_k = m(k);
                m_k[1]++;
                for(int l=0; l<targetsize; l++)
                {
                    real targetval = target[l];
                    m_k[2+4*l] += targetval;
                    m_k[3+4*l] += square(targetval);
                }
            }
        }
    }

    // postprocessing:
    for(int j=0; j<inputsize; j++)
    {
        Mat& m = a[j];
        if(m.isNotEmpty())
        {
            for(int k=0; k<m.length(); k++)
            {
                Vec m_k = m(k);
                real n = m_k[1];
                if(n>0.)
                {
                    // replace sum by mean and sumsquare by variance
                    for(int l=0; l<targetsize; l++)
                    {
                        real sum = m_k[2+4*l];
                        real sumsquare = m_k[3+4*l];
                        real mean = sum/n;
                        real variance = (sumsquare-square(sum)/n)/(n-1);
                        real mse = sumsquare/n - square(sum/n);
                        real stddev_of_mean = sqrt(variance/n);
                        real stddev_of_mse = variance*sqrt(2./n);
                        m_k[2+4*l] = mean;
                        m_k[3+4*l] = stddev_of_mean;
                        m_k[4+4*l] = mse;
                        m_k[5+4*l] = stddev_of_mse;
                    }
                }
            }
        }
    }

    return a;
}

Here is the call graph for this function:

TVec<Mat> PLearn::computeConditionalMeans ( VMat  trainset,
int  targetsize,
Mat &  basic_stats 
)

Computes conditional mean and variance of each target, conditoned on the values of categorical integer input feature. The basic_stats matrix may be passed if previously computed (see computeBasicStats) or an empty matrix may be passed otherwise, that will compute the basic statistics.

An input feature i is considered a categorical integer input if its min and max (as found in basic_stats) are integers and are not too far apart. For these, the correponding returned array[i] matrix will contain max-min+1 rows (one for each integer value between min and max inclusive), each row containing the corresponding input value, the number of times it occured, and mean and variance for each target. The returned matrix array[i] for input features that are not considered categorical integers are empty.

PP< ConditionalStatsCollector > PLearn::computeConditionalStats ( VMat  m,
int  condfield,
TVec< RealMapping >  ranges 
)

returns the cooccurence statistics conditioned on the given field

Definition at line 51 of file VMat_computeConditionalStats.cc.

References endl(), i, PLearn::VMat::length(), w, and PLearn::VMat::width().

{
    PP<ConditionalStatsCollector> condst = new ConditionalStatsCollector;
    condst->setBinMappingsAndCondvar(ranges, condfield);
    int l = m.length();
    int w = m.width();
    Vec v(w);
    for(int i=0; i<l; i++)
    {
        if(i%10000==0)
            cerr << "computeConditionalStats: row " << i << " of " << l << endl;
        m->getRow(i,v);
        condst->update(v);
    }
    return condst;
}

Here is the call graph for this function:

template<class T >
void PLearn::computeCovar ( const TMat< T > &  m,
const TVec< T > &  meanvec,
TMat< T > &  covarmat 
)

Definition at line 5681 of file TMat_maths_impl.h.

References externalProductScaleAcc(), PLearn::TMat< T >::length(), n, PLearn::TMat< T >::resize(), transposeProduct(), and PLearn::TMat< T >::width().

Referenced by PLearn::GaussianDistribution::train().

{
    int n = m.width();
    covarmat.resize(n,n);
    transposeProduct(covarmat,m,m);
    covarmat /= T(m.length());
    externalProductScaleAcc(covarmat,meanvec,meanvec,T(-1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeCovar ( const VMat &  d,
const Vec &  mu,
Mat &  covarmat,
real  epsilon 
)

Computes covariance matrix given mean mu.

Definition at line 473 of file VMat_basic_stats.cc.

References addToDiagonal(), PLearn::TMat< T >::clear(), externalProductAcc(), i, PLearn::VMat::length(), PLearn::TMat< T >::resize(), w, and PLearn::VMat::width().

{
    int w = d->width();
    int l = d->length();
    covarmat.resize(w,w);
    covarmat.clear();
    Vec samplevec(w);
    Vec diffvec(w);
    Mat sqdiffmat(w,w);
    for(int i=0; i<l; i++)
    {
        d->getRow(i,samplevec);
        samplevec -= mu;
        externalProductAcc(covarmat, samplevec, samplevec);
    }
    covarmat /= l-1;
    addToDiagonal(covarmat, epsilon);
}

Here is the call graph for this function:

void PLearn::computeInputCovar ( const VMat &  d,
const Vec &  mu,
Mat &  covarmat,
real  epsilon 
)

Computes covariance matrix given mean mu.

Definition at line 492 of file VMat_basic_stats.cc.

References addToDiagonal(), PLearn::TMat< T >::clear(), externalProductScaleAcc(), PLearn::VMat::getExample(), i, PLearn::VMat::length(), PLASSERT, PLearn::TMat< T >::resize(), and w.

Referenced by PLearn::DiverseComponentAnalysis::train(), and PLearn::GaussianDistribution::train().

{
    PLASSERT( d->inputsize() >= 0 );
    int w = d->inputsize();
    int l = d->length();
    covarmat.resize(w,w);
    covarmat.clear();
    Vec input(w);
    Vec target;
    real weight;
    Vec diffvec(w);
    Mat sqdiffmat(w,w);
    real weightsum = 0;
    for(int i=0; i<l; i++)
    {
        d->getExample(i, input, target, weight);
        input -= mu;
        externalProductScaleAcc(covarmat, input, input, weight);
        weightsum += weight;
    }
    covarmat *= real(1./weightsum);
    addToDiagonal(covarmat, epsilon);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeInputMean ( const VMat &  d,
Vec &  meanvec 
)

Definition at line 296 of file VMat_basic_stats.cc.

References PLearn::VMat::getExample(), PLearn::VecStatsCollector::getMean(), i, PLearn::VMat::length(), n, and PLearn::VecStatsCollector::update().

Referenced by PLearn::GaussianDistribution::train().

{
    VecStatsCollector sc;
    int n = d->length();
    Vec input, target;
    real weight;
    for (int i = 0; i < n; i++) {
        d->getExample(i, input, target, weight);
        sc.update(input, weight);
    }
    sc.getMean(meanvec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeInputMeanAndCovar ( const VMat &  d,
Vec &  meanvec,
Mat &  covarmat,
real  epsilon 
)

Definition at line 312 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::compute_covariance, PLearn::VMat::getExample(), i, PLearn::VMat::length(), n, and PLASSERT.

Referenced by PLearn::PCA::classical_algo(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::GaussianDistribution::train(), and PLearn::DiverseComponentAnalysis::train().

{
    PLASSERT( d->inputsize() >= 0 );
    VecStatsCollector sc;
    sc.compute_covariance = true;
    sc.epsilon = epsilon;
    sc.build();
    int n = d->length();
    Vec input, target;
    real weight;
    for (int i = 0; i < n; i++) {
        d->getExample(i, input, target, weight);
        sc.update(input, weight);
    }
    sc.getMean(meanvec);
    sc.getCovariance(covarmat);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeInputMeanAndStddev ( const VMat &  d,
Vec &  meanvec,
Vec &  stddev,
real  epsilon 
)

Definition at line 356 of file VMat_basic_stats.cc.

References computeInputMeanAndVariance(), i, PLearn::TVec< T >::length(), PLERROR, and sqrt().

Referenced by PLearn::GaussMix::computeMeansAndCovariances(), and PLearn::PartsDistanceKernel::train().

{
    computeInputMeanAndVariance(d, meanvec, stddev, epsilon);
    for (int i = 0; i < stddev.length(); i++) {
#ifdef BOUNDCHECK
        if (stddev[i] < 0)
            PLERROR("In computeInputMeanAndStddev - The computed variance should be >= 0");
#endif
        stddev[i] = sqrt(stddev[i]);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeInputMeanAndVariance ( const VMat &  d,
Vec &  meanvec,
Vec &  var,
real  epsilon 
)

Definition at line 334 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::epsilon, PLearn::VMat::getExample(), i, PLearn::VMat::length(), n, PLASSERT, and PLearn::TVec< T >::resize().

Referenced by computeInputMeanAndStddev(), and PLearn::GaussMix::computeMeansAndCovariances().

{
    PLASSERT( d->inputsize() >= 0 );
    VecStatsCollector sc;
    sc.epsilon=epsilon;
    sc.build();
    int n = d->length();
    Vec input, target;
    real weight;
    for (int i = 0; i < n; i++) {
        d->getExample(i, input, target, weight);
        sc.update(input, weight);
    }
    sc.getMean(meanvec);
    var.resize(d->inputsize());
    var << sc.getVariance();
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::computeInverseStandardDeviationFromMeanAndSquareMean ( const TMat< T > &  inverse_standard_deviation,
const TMat< T > &  means,
const TMat< T > &  mean_of_squares,
real  default_stddev = 1,
real  min_stddev = -1 
)

inverse_standard_deviation[i,j] = 1/sqrt(mean_of_squares[i,j] - means[i,j]^2) If 'min_stddev' is provided, any standard deviation less than this value will be set to 'default_stddev' without any warning being issued (even when a negative variance is encountered, which can happen because of numerical approximation for an almost constant variable).

Definition at line 5638 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), diff(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, PLWARNING, sqrt(), and PLearn::TMat< T >::width().

Referenced by PLearn::FNetLayerVariable::bprop().

{
    int n=inverse_standard_deviation.length();
    int m=inverse_standard_deviation.width();
    int invs_mod = inverse_standard_deviation.mod();
    int mu_mod = means.mod();
    int mu2_mod = mean_of_squares.mod();
#ifdef BOUNDCHECK
    if (means.length()!=n || means.width()!=m || mean_of_squares.length()!=n
        || mean_of_squares.width()!=m)
        PLERROR("In computeInverseStandardDeviationFromMeanAndSquareMean - Arguments have incompatible sizes");
#endif
    T* invs = inverse_standard_deviation.data();
    T* mu = means.data();
    T* mu2 = mean_of_squares.data();
    for (int i=0;i<n;i++, invs += invs_mod, mu += mu_mod, mu2 += mu2_mod) {
        for (int j=0;j<m;j++)
        {
            real diff = mu2[j] - mu[j] * mu[j];
            if (diff>0) {
                real sqrt_diff = sqrt(diff);
                if (sqrt_diff < min_stddev)    // NB: Cannot happen if 'min_stddev' is -1.
                    invs[j] = real(1.0 / default_stddev);
                else
                    invs[j] = real(1.0 / sqrt_diff);
            }
            else {
                if (min_stddev < 0)
                    // No minimum standard deviation provided, this is suspect.
                    PLWARNING("In computeInverseStandardDeviationFromMeanAndSquareMean - Variance is not > 0");
                invs[j] = real(1.0 / default_stddev);
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeLocalPrincipalComponents ( Mat &  dataset,
int  which_pattern,
Mat &  delta_neighbors,
Vec &  eig_values,
Mat &  eig_vectors,
Vec &  mean,
bool  learn_mu = false,
real  global_lambda0 = 0 
)

Definition at line 194 of file ManifoldParzen2.cc.

References columnMean(), computeNearestNeighbors(), computePrincipalComponents(), PLearn::TVec< T >::hasMissing(), mean(), PLERROR, PLearn::TVec< T >::resize(), and PLearn::TMat< T >::width().

Referenced by PLearn::ManifoldParzen2::train().

{
    Vec center_ = dataset(which_pattern);
    if (center_.hasMissing())
        PLERROR("dataset row %d has missing values!", which_pattern);
    computeNearestNeighbors(dataset, center_, delta_neighbors, which_pattern);
    if(learn_mu)
    {
        mean.resize(delta_neighbors.width());  // Hugo: the mean should be the current point...
        columnMean(delta_neighbors, mean);
    }
    delta_neighbors -= mean;
    computePrincipalComponents(delta_neighbors, eig_values, eig_vectors,global_lambda0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::computeMean ( const TMat< T > &  m,
TVec< T > &  meanvec 
) [inline]

compute the mean of the rows of m (looping over columns)

Definition at line 5621 of file TMat_maths_impl.h.

References columnMean().

Referenced by PLearn::KNNImputationVMatrix::build_(), PLearn::CenteredVMatrix::build_(), PLearn::MeanImputationVMatrix::computeMeanVector(), PLearn::EmpiricalDistribution::expectation(), and PLearn::GaussianDistribution::train().

{ columnMean(m,meanvec); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeMean ( const VMat &  d,
Vec &  meanvec 
)

Compute basic statistics over all samples.

The first methods will compute statistics over *all* columns of a VMat, including target and weight columns (an additional weight vector must be supplied if one wants to compute weighted statistics). The last methods (computeInput...) will compute statistics only on the input* part of a VMat, and weighted statistics can be obtained directly using the weights in the VMat.

Definition at line 114 of file VMat_basic_stats.cc.

References computeWeightedMean(), and PLearn::VMat::length().

{
    Vec constant_weight(d->length(), 1.0);
    computeWeightedMean(constant_weight, d, meanvec);
}

Here is the call graph for this function:

template<class T >
void PLearn::computeMeanAndCovar ( const TMat< T > &  m,
TVec< T > &  meanvec,
TMat< T > &  covarmat 
)

Definition at line 5691 of file TMat_maths_impl.h.

References columnMean(), externalProductScaleAcc(), PLearn::TMat< T >::length(), n, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), transposeProduct(), and PLearn::TMat< T >::width().

Referenced by affineNormalization(), logPFittedGaussian(), PLearn::GaussianDistribution::train(), PLearn::ConditionalGaussianDistribution::train(), and PLearn::EmpiricalDistribution::variance().

{
    int n = m.width();
    meanvec.resize(n);
    covarmat.resize(n,n);
    columnMean(m,meanvec);

    transposeProduct(covarmat,m,m);
    covarmat /= T(m.length());
    externalProductScaleAcc(covarmat,meanvec,meanvec,T(-1));

    /*
      Mat mm = m.copy();
      mm -= meanvec;
      transposeProduct(covarmat,mm,mm);
      covarmat /= T(m.length());
    */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeMeanAndCovar ( const VMat &  d,
Vec &  meanvec,
Mat &  covarmat,
real  epsilon 
)

Definition at line 392 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::build(), PLearn::VecStatsCollector::compute_covariance, PLearn::VecStatsCollector::epsilon, PLearn::VecStatsCollector::getCovariance(), PLearn::VecStatsCollector::getMean(), i, PLearn::VMat::length(), n, PLearn::VecStatsCollector::update(), and PLearn::VMat::width().

{
    VecStatsCollector sc;
    sc.compute_covariance = true;
    sc.epsilon = epsilon;
    sc.build();
    int n = d->length();
    Vec row(d->width());
    for (int i = 0; i < n; i++) {
        d->getRow(i, row);
        sc.update(row);
    }
    sc.getMean(meanvec);
    sc.getCovariance(covarmat);

    /* Commented out old code that had an optimized MPI version, but was probably
       not used anymore.

       int w = m->width();
       int l = m->length();
       meanvec.resize(w);
       covarmat.resize(w,w);

       MemoryVMatrix* memvm = dynamic_cast<MemoryVMatrix*>((VMatrix*)m);
       if(memvm)
       computeMeanAndCovar(m->toMat(), meanvec, covarmat);
       else
       {
       meanvec.clear();
       covarmat.clear();
       Vec v(w);

       ProgressBar progbar("Computing covariance",l);

       if(USING_MPI && PLMPI::synchronized && PLMPI::size>1)
       { //!<  Parallel implementation
       #if USING_MPI
       PLMPI::synchronized = false;

       if(!covarmat.isCompact())
       PLERROR("In computeMeanAndCovar: MPI implementation cannot handle non-compact covariance matrices, please pass a compact matrix");

       // temporary storages for mpi
       Vec meanvec_b(meanvec.length());
       Mat covarmat_b(covarmat.length(),covarmat.width());

       for(int i=PLMPI::rank; i<l; i+=PLMPI::size)
       {
       m->getRow(i,v);
       meanvec_b += v;
       externalProductAcc(covarmat_b, v, v);
       progbar(i);
       }

       MPI_Reduce(meanvec_b.data(), meanvec.data(), meanvec.length(), PLMPI_REAL, MPI_SUM, 0, MPI_COMM_WORLD);
       MPI_Bcast(meanvec.data(), meanvec.length(), PLMPI_REAL, 0, MPI_COMM_WORLD);
       MPI_Reduce(covarmat_b.data(), covarmat.data(), covarmat.size(), PLMPI_REAL, MPI_SUM, 0, MPI_COMM_WORLD);
       MPI_Bcast(covarmat.data(), covarmat.size(), PLMPI_REAL, 0, MPI_COMM_WORLD);

       PLMPI::synchronized = true;
       #endif
       }
       else //!<  default sequential implementation
       {
       for(int i=0; i<l; i++)
       {
       m->getRow(i,v);
       meanvec += v;
       externalProductAcc(covarmat, v, v);
       progbar(i);
       }
       }

       // get the real averages and covariances, and priors
       meanvec /= real(l);
       covarmat /= real(l);
       externalProductScaleAcc(covarmat,meanvec,meanvec,real(-1.));
       }
    */
}

Here is the call graph for this function:

template<class T >
void PLearn::computeMeanAndStddev ( const TMat< T > &  m,
TVec< T > &  meanvec,
TVec< T > &  stddevvec 
)

compute the mean and standard deviations of the rows of m (looping over columns)

Definition at line 5712 of file TMat_maths_impl.h.

References columnMean(), columnVariance(), i, PLearn::TVec< T >::length(), and sqrt().

Referenced by PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::GaussMix::kmeans(), loadClassificationDataset(), normalize(), normalizeDataSet(), normalizeDataSets(), and PLearn::TestDependenciesCommand::run().

{
    columnMean(m,meanvec);
    columnVariance(m,stddevvec,meanvec);
    int l=stddevvec.length();
    for(int i=0; i<l; i++)
        stddevvec[i] = sqrt(stddevvec[i]);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeMeanAndStddev ( const VMat &  d,
Vec &  meanvec,
Vec &  stddevvec,
real  epsilon 
)

Definition at line 520 of file VMat_basic_stats.cc.

References computeMeanAndVariance(), i, PLearn::TVec< T >::length(), and sqrt().

{
    computeMeanAndVariance(d, meanvec, stddevvec, epsilon);
    for(int i=0; i<stddevvec.length(); i++)
        stddevvec[i] = sqrt(stddevvec[i]);
}

Here is the call graph for this function:

template<class T >
void PLearn::computeMeanAndVariance ( const TMat< T > &  m,
TVec< T > &  meanvec,
TVec< T > &  variancevec 
)

compute the mean and variance of the rows of m (looping over columns)

Definition at line 5625 of file TMat_maths_impl.h.

References columnMean(), and columnVariance().

Referenced by computeMeanAndStddev(), PLearn::PCA::em_orth_algo(), and PLearn::CorrelationKernel::setDataForKernelMatrix().

{
    columnMean(m,meanvec);
    columnVariance(m,variancevec,meanvec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeMeanAndVariance ( const VMat &  d,
Vec &  meanvec,
Vec &  variancevec,
real  epsilon 
)

Definition at line 276 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::build(), PLearn::VecStatsCollector::epsilon, PLearn::VecStatsCollector::getMean(), PLearn::VecStatsCollector::getVariance(), i, PLearn::VMat::length(), n, PLearn::TVec< T >::resize(), PLearn::VecStatsCollector::update(), and PLearn::VMat::width().

{
    VecStatsCollector sc;
    sc.epsilon = epsilon;
    sc.build();
    int n = d->length();
    Vec row(d->width());
    for (int i = 0; i < n; i++) {
        d->getRow(i, row);
        sc.update(row);
    }
    sc.getMean(meanvec);
    variancevec.resize(d->width());
    variancevec << sc.getVariance();
}

Here is the call graph for this function:

void PLearn::computeNearestNeighbors ( VMat  dataset,
Vec  x,
TVec< int > &  neighbors,
int  ignore_row 
)

Definition at line 54 of file VMat_computeNearestNeighbors.cc.

References PLearn::BottomNI< T >::getBottomN(), i, PLearn::VMat::length(), PLearn::TVec< T >::length(), PLearn::BottomNI< T >::nZeros(), PLERROR, powdistance(), PLearn::BottomNI< T >::sort(), PLearn::BottomNI< T >::update(), and PLearn::VMat::width().

Referenced by PLearn::LocalNeighborsDifferencesVMatrix::build_(), PLearn::AppendNeighborsVMatrix::build_(), computeLocalPrincipalComponents(), PLearn::StackedFocusedAutoassociatorsNet::computeOutput(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::StackedFocusedAutoassociatorsNet::setTrainingSet(), PLearn::ManifoldParzen::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::DeepNonLocalManifoldParzen::train(), and PLearn::DiscriminativeDeepBeliefNet::updateNearestNeighbors().

{
    int K = neighbors.length(); // how many neighbors do we want?
    BottomNI<real> neighbs(K);
    Vec row(dataset->width());
    for(int i=0; i<dataset->length(); i++)
        if(i!=ignore_row)
        {
            dataset->getRow(i,row);
            neighbs.update(powdistance(row,x), i);
        }
    neighbs.sort();
    TVec< pair<real,int> > indices = neighbs.getBottomN();
    int nonzero=0;
    for(int k=0; k<K; k++)
    {
        if(indices[k].first>0)
            nonzero++;
        neighbors[k] = indices[k].second;
    }
    if(nonzero==0)
        PLERROR("All neighbors had 0 distance. Use more neighbors. (There were %i other patterns with same values)",neighbs.nZeros());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeNearestNeighbors ( Mat  dataset,
Vec  x,
Mat &  neighbors,
int  ignore_row = -1 
)

Definition at line 148 of file ManifoldParzen2.cc.

References PLearn::BottomNI< T >::getBottomN(), i, PLearn::TMat< T >::length(), PLearn::BottomNI< T >::nZeros(), PLERROR, powdistance(), PLearn::BottomNI< T >::sort(), and PLearn::BottomNI< T >::update().

{
    int K = neighbors.length(); // how many neighbors do we want?
    BottomNI<real> neighbs(K);
    for(int i=0; i<dataset.length(); i++)
        if(i!=ignore_row)
            neighbs.update(powdistance(dataset(i),x), i);
    neighbs.sort();
    TVec< pair<real,int> > indices = neighbs.getBottomN();
    int nonzero=0;
    for(int k=0; k<K; k++)
    {
        if(indices[k].first>0)
            nonzero++;
        neighbors(k) << dataset(indices[k].second);
    }
    if(nonzero==0)
        PLERROR("All neighbors had 0 distance. Use more neighbors. (There were %i other patterns with same values)",neighbs.nZeros());
}

Here is the call graph for this function:

TVec<Mat> PLearn::computeOutputFields ( PP< PLearner >  learner,
Vec  X,
Vec  Y 
)

Definition at line 152 of file GenerateDecisionPlot.cc.

References i, j, PLearn::TVec< T >::length(), tostring(), and PLearn::ProgressBar::update().

Referenced by computeOutputFieldsAutoRange().

{
    int noutputs = learner->outputsize();

    int nx = X.length();
    int ny = Y.length();
    int nfields = noutputs;
    TVec<Mat> fields(nfields);

    for(int k=0; k<nfields; k++)
        fields[k].resize(nx,ny);

    Vec input(2);
    Vec output(noutputs);

    ProgressBar pb("Computing " + tostring(nx) + " x " + tostring(ny) + " output field",nx*ny);
  
    for(int i=0; i<nx; i++)
        for(int j=0; j<ny; j++)
        {
            input[0] = X[i];
            input[1] = Y[j];
            learner->computeOutput(input,output);
            // cerr << "in: " << input << " out: " << output << endl;
            for(int k=0; k<noutputs; k++)
                fields[k](i,j) = output[k];
            pb.update(i*nx+j);
        }

    return fields;
}

Here is the call graph for this function:

Here is the caller graph for this function:

TVec< Mat > PLearn::computeOutputFields ( PP< PLearner >  learner,
int  nx,
int  ny,
real  x0,
real  y0,
real  deltax,
real  deltay 
)

Definition at line 185 of file GenerateDecisionPlot.cc.

References i, j, tostring(), PLearn::ProgressBar::update(), and x.

{
    int noutputs = learner->outputsize();
    int nfields = noutputs;

    TVec<Mat> fields(nfields);
    for(int k=0; k<nfields; k++)
        fields[k].resize(nx,ny);

    Vec input(2);
    Vec output(noutputs);

    ProgressBar pb("Computing " + tostring(nx) + " x " + tostring(ny) + " output field",nx*ny);

    real x = x0;
    real y = y0;
    for(int i=0; i<nx; i++, x+=deltax)
        for(int j=0; j<ny; j++, y+=deltay)
        {
            input[0] = x;
            input[1] = y;
            learner->computeOutput(input,output);
            // cerr << "in: " << input << " out: " << output << endl;
            for(int k=0; k<noutputs; k++)
                fields[k](i,j) = output[k];
            pb.update(i*nx+j);
        }

    return fields;
}

Here is the call graph for this function:

TVec< Mat > PLearn::computeOutputFieldsAutoRange ( PP< PLearner >  learner,
VMat  dataset,
int  nx,
int  ny,
real x0,
real y0,
real deltax,
real deltay,
real  extraspace = .10 
)

Definition at line 218 of file GenerateDecisionPlot.cc.

References computeOutputFields(), computeRange(), and PLearn::VMat::subMatColumns().

{
    Vec minv(2);
    Vec maxv(2);
    computeRange(dataset.subMatColumns(0,2), minv, maxv);
    real extrax = (maxv[0]-minv[0])*extraspace;
    x0 = minv[0]-extrax;
    deltax = (maxv[0]+extrax-x0)/nx;
    real extray = (maxv[1]-minv[1])*extraspace;
    y0 = minv[1]-extray;
    deltay = (maxv[1]+extray-y0)/ny;
    return computeOutputFields(learner, nx, ny, x0, y0, deltax, deltay);
}

Here is the call graph for this function:

void PLearn::computePrincipalComponents ( Mat  dataset,
Vec &  eig_values,
Mat &  eig_vectors,
real  global_lambda0 
)

Definition at line 172 of file ManifoldParzen2.cc.

References eigenVecOfSymmMat(), i, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, PLearn::TMat< T >::resize(), transposeProduct(), and PLearn::TMat< T >::width().

Referenced by computeLocalPrincipalComponents().

{
#ifdef BOUNDCHECK
    if(eig_vectors.width()!=dataset.width())
        PLERROR("In computePrincipalComponents eig_vectors and dataset must have same width");
    if(eig_values.length() != eig_vectors.length())
        PLERROR("In computePrincipalComponents eig_values vec and eig_vectors mat must have same length");
#endif

    static Mat covar;
    int ncomp = eig_values.length(); // number of components we want
    covar.resize(dataset.width(), dataset.width());
    transposeProduct(covar, dataset,dataset);
    eigenVecOfSymmMat(covar, ncomp,  eig_values, eig_vectors);
    for (int i=0;i<eig_values.length();i++)
    {
        if (eig_values[i]<0)
            eig_values[i] = 0;
        eig_values[i] = eig_values[i]/dataset.length() + global_lambda0;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeRange ( const VMat &  d,
Vec &  minvec,
Vec &  maxvec 
)

Definition at line 78 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::getStats(), i, j, PLearn::VMat::length(), PLearn::StatsCollector::max(), PLearn::StatsCollector::min(), n, PLearn::TVec< T >::resize(), PLearn::VecStatsCollector::update(), w, and PLearn::VMat::width().

Referenced by computeOutputFieldsAutoRange(), computeXYPositions(), determine_grid_for_dataset(), and DX_create_grid_outputs_file().

{
    int n = d->length();
    int w = d->width();
    minvec.resize(w);
    maxvec.resize(w);
    VecStatsCollector sc;
    Vec row(w);
    for (int i = 0; i < n; i++) {
        d->getRow(i, row);
        sc.update(row);
    }
    for (int j = 0; j < w; j++) {
        minvec[j] = sc.getStats(j).min();
        maxvec[j] = sc.getStats(j).max();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

TVec< RealMapping > PLearn::computeRanges ( TVec< StatsCollector >  stats,
int  discrete_mincount,
int  continuous_mincount 
)

Definition at line 1402 of file StatsCollector.cc.

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

Referenced by PLearn::VMatrix::getRanges().

{
    TVec<RealMapping> ranges;
    int n = stats.length();
    ranges.resize(n);
    for(int k=0; k<n; k++)
        ranges[k] = stats[k].getBinMapping(discrete_mincount, continuous_mincount);
    return ranges;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<int> PLearn::computeRanks ( const TMat< T > &  mat,
TMat< T > &  ranks,
bool  ignore_missing = false 
)

For each column of 'mat', sort the elements and put in the 'ranks' matrix (of the same dimensions) the rank of original elements.

More precisely, Let mat(i,j) be the k-th largest element of column j, than ranks(i,j) will be k. If the boolean 'ignore_missing' is true, missing values are ignored in the ranking, and will be assigned rank -1. The returned vector is also filled with the number of non-missing values in each column. If 'ignore_missing' is false, the returned vector is empty, and there should not be missing values in the input matrices (this could lead to crash / NaN).

Definition at line 199 of file random.h.

References PLearn::TMat< T >::fill(), i, is_missing(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), n, PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), shuffleRows(), sortRows(), and PLearn::TMat< T >::width().

Referenced by SpearmanRankCorrelation().

{
    TVec<int> result;
    int width=mat.width();
    int n=mat.length();
    ranks.resize(n,width);
    TVec<Mat> sorted(width); 
    // Sort all the y's.
    for (int j=0;j<width;j++)
        sorted[j].resize(n,2);
    if (ignore_missing) {
        // We do not know in advance how many non-missing values there are.
        for (int j = 0; j < width; j++)
            sorted[j].resize(0,2);
        Vec val(2);
        for (int i = 0; i < n; i++)
            for (int j = 0; j < width; j++) {
                val[0] = mat(i,j);
                if (!is_missing(val[0])) {
                    val[1] = i;
                    sorted[j].appendRow(val);
                }
            }
        result.resize(width);
        for (int j = 0; j < width; j++)
            result[j] = sorted[j].length();
    } else {
        for (int i=0;i<n;i++)
        {
            for (int j=0;j<width;j++)
            {
                sorted[j](i,0)=mat(i,j);
#ifdef BOUNDCHECK
                if (is_missing(sorted[j](i,0)))
                    PLERROR("In computeRanks - Found a missing value, but 'ignore_missing' is false");
#endif
                sorted[j](i,1)=i;
            }
        }
    }
    for (int j=0;j<width;j++)
    {
        shuffleRows(sorted[j]); // To randomly permute the order of elements which have the same value, i.e. their rank within their category
        sortRows(sorted[j]);
    }
    // Compute the ranks.
    if (ignore_missing)
        ranks.fill(-1);
    for (int j=0;j<width;j++)
        for (int i=0;i<sorted[j].length();i++)
            ranks(int(sorted[j](i,1)),j) = i;
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeRowMean ( const VMat &  d,
Vec &  meanvec 
)

Compute mean of each row (the returned vector has length d->length()).

Definition at line 99 of file VMat_basic_stats.cc.

References i, PLearn::VMat::length(), mean(), n, PLearn::TVec< T >::resize(), and PLearn::VMat::width().

{
    int n = d->length();
    meanvec.resize(n);
    Vec samplevec(d->width());
    for(int i = 0; i < n; i++)
    {
        d->getRow(i,samplevec);
        meanvec[i] = mean(samplevec);
    }
}

Here is the call graph for this function:

TVec< StatsCollector > PLearn::computeStats ( VMat  m,
int  maxnvalues,
bool  report_progress 
)

Returns the unconditional statistics of each field.

Definition at line 52 of file VMat_computeStats.cc.

References i, j, PLearn::VMat::length(), PLCHECK, update(), w, and PLearn::VMat::width().

Referenced by PLearn::VMatrix::getPrecomputedStatsFromFile().

{
    int w = m.width();
    int l = m.length();
    PLCHECK(w>=0);
    TVec<StatsCollector> stats(w, StatsCollector(maxnvalues));
    Vec v(w);
    PP<ProgressBar> pbar;
    if (report_progress)
        pbar = new ProgressBar("Computing statistics", l);
    for(int i=0; i<l; i++)
    {
        m->getRow(i,v);
        for(int j=0; j<w; j++)
            stats[j].update(v[j]);
        if (report_progress)
            pbar->update(i);
    }
    return stats;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeStats ( VMat  m,
VecStatsCollector &  st,
bool  report_progress 
)

Definition at line 51 of file VMat_computeStats_VecStatsCollector.cc.

References PLearn::VecStatsCollector::finalize(), PLearn::VecStatsCollector::forget(), i, PLearn::VMat::length(), PLearn::VecStatsCollector::setFieldNames(), PLearn::VecStatsCollector::update(), and PLearn::VMat::width().

{
    st.forget();
    st.setFieldNames(m->fieldNames());
    Vec v(m.width());
    int l = m.length();
    PP<ProgressBar> pbar;
    if (report_progress)
        pbar = new ProgressBar("Computing statistics", l);
    for(int i=0; i<l; i++)
    {
        m->getRow(i,v);
        st.update(v);
        if (report_progress)
            pbar->update(i);
    }
    st.finalize();
}

Here is the call graph for this function:

void PLearn::computeWeightedInputOutputMeansAndStddev ( const VMat &  d,
Vec &  means,
Vec &  stddev 
)

Definition at line 379 of file WPLS.cc.

References PLearn::TVec< T >::fill(), PLearn::VMat::getExample(), i, j, PLearn::VMat::length(), m, n, PLASSERT, PLWARNING, PLearn::TVec< T >::resize(), sqrt(), and var().

Referenced by PLearn::WPLS::train().

{
    PLASSERT( d->inputsize() >= 0 );
    int n = d->length();
    int p = d->inputsize();
    int m = d->targetsize();
    means.resize(p+m);
    stddev.resize(p+m);
    Vec input(p+m), target(p+m);
    real weight;
    real sum_wi = 0.0;
    real sum_wi2 = 0.0;
    Vec sum_wixi(p+m), sum_wixi2(p+m);
    sum_wixi.fill(0.0);
    sum_wixi2.fill(0.0);
    for (int i = 0; i < n; i++) {
        d->getExample(i, input, target, weight);
        sum_wi += weight;
        sum_wi2 += weight * weight;
        for (int j = 0; j<p; j++) {  
            sum_wixi[j]  += weight*input[j];
            sum_wixi2[j] += weight*input[j]*input[j];
        }
        for (int j = 0; j<m; j++) {  
            sum_wixi[p+j]  += weight*target[j];
            sum_wixi2[p+j] += weight*target[j]*target[j];
        }
    }
  
    real adjust = sqrt( sum_wi - sum_wi2 /sum_wi );
    real xbar;
    real var;
    for (int j = 0; j<p+m; j++) 
    {
        xbar      = sum_wixi[j]/sum_wi;
        means[j]  = xbar; 
        //make sure we do sqrt of a number >= 0
        var= sum_wixi2[j] - xbar * xbar * sum_wi;
        if(var < 0.)
        {
            PLWARNING("In WPLS::computeWeightedInputOutputMeansAndStddev: var < 0; setting it to 0.");
            var= 0.;
        }
        stddev[j] = sqrt(var) / adjust;
        if (stddev[j] < 1e-10)
            stddev[j] = 1.0;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeWeightedMean ( const Vec &  weights,
const VMat &  d,
Vec &  meanvec 
)

Definition at line 61 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::getMean(), i, PLearn::TVec< T >::length(), PLearn::VMat::length(), n, PLERROR, PLearn::VecStatsCollector::update(), and PLearn::VMat::width().

Referenced by computeMean().

{
    VecStatsCollector sc;
    int n = d->length();
    if (weights.length() != n)
        PLERROR("In computeWeightedMean - weights.length() != d->length()");
    Vec row(d->width());
    for (int i = 0; i < n; i++) {
        d->getRow(i, row);
        sc.update(row, weights[i]);
    }
    sc.getMean(meanvec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::computeWeightedMeanAndCovar ( const Vec &  weights,
const VMat &  d,
Vec &  meanvec,
Mat &  covarmat,
real  epsilon 
)

Definition at line 372 of file VMat_basic_stats.cc.

References PLearn::VecStatsCollector::build(), PLearn::VecStatsCollector::compute_covariance, PLearn::VecStatsCollector::epsilon, PLearn::VecStatsCollector::getCovariance(), PLearn::VecStatsCollector::getMean(), i, PLearn::VMat::length(), n, PLearn::VecStatsCollector::update(), and PLearn::VMat::width().

{
    VecStatsCollector sc;
    sc.compute_covariance = true;
    sc.epsilon = epsilon;
    sc.build();
    int n = d->length();
    Vec row(d->width());
    for (int i = 0; i < n; i++) {
        d->getRow(i, row);
        sc.update(row, weights[i]);
    }
    sc.getMean(meanvec);
    sc.getCovariance(covarmat);
}

Here is the call graph for this function:

void PLearn::computeXYPositions ( VMat  dataset,
int  nx,
int  ny,
Vec &  X,
Vec &  Y,
real  extraspace = .10 
)

Definition at line 234 of file GenerateDecisionPlot.cc.

References computeRange(), PLearn::TVec< T >::data(), i, j, PLearn::VMat::length(), PLearn::TVec< T >::resize(), PLearn::VMat::subMatColumns(), and x.

{
    Vec minv(2);
    Vec maxv(2);
    computeRange(dataset.subMatColumns(0,2), minv, maxv);
    real extrax = (maxv[0]-minv[0])*extraspace;
    real x0 = minv[0]-extrax;
    real deltax = (maxv[0]+extrax-x0)/nx;
    real extray = (maxv[1]-minv[1])*extraspace;
    real y0 = minv[1]-extray;
    real deltay = (maxv[1]+extray-y0)/ny;

    set<real> xpos;
    set<real> ypos;
    int l = dataset.length();
    Vec datapoint(2);
    for(int i=0; i<l; i++)
    {
        dataset->getRow(i,datapoint);
        xpos.insert(datapoint[0]);
        ypos.insert(datapoint[1]);
    }
    real x = x0;
    for(int i=0; i<nx; i++, x+=deltax)
        xpos.insert(x);
    real y = y0;
    for(int j=0; j<ny; j++, y+=deltay)
        ypos.insert(y);
    set<real>::iterator it;
    X.resize(xpos.size());
    real* xptr = X.data();
    it = xpos.begin();
    while(it!=xpos.end())
        *xptr++ = *it++;
    Y.resize(ypos.size());
    real* yptr = Y.data();
    it = ypos.begin();
    while(it!=ypos.end())
        *yptr++ = *it++;
}

Here is the call graph for this function:

template<class T >
TVec< T > PLearn::concat ( const TVec< T > &  v1,
const TVec< T > &  v2 
)

Returns a TVec which is a concatenation of v1 and v2.

Definition at line 236 of file TVec_impl.h.

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

{
    TVec<T> result(v1.length()+v2.length());
    for(int i=0; i<v1.length(); i++)
        result[i] = v1[i];
    for(int i=0; i<v2.length(); i++)
        result[i+v1.length()] = v2[i];
    return result;
}

Here is the call graph for this function:

template<class T >
TVec< T > PLearn::concat ( const TVec< T > &  v1,
const TVec< T > &  v2,
const TVec< T > &  v3 
)

Returns a TVec which is a concatenation of v1,v2,v3.

Definition at line 247 of file TVec_impl.h.

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

{
    TVec<T> result;
    result.concat(v1,v2,v3);
    return result;
}

Here is the call graph for this function:

template<class T >
TVec< T > PLearn::concat ( const TVec< T > &  v1,
const TVec< T > &  v2,
const TVec< T > &  v3,
const TVec< T > &  v4 
)

Returns a TVec which is a concatenation of v1,v2,v3,v4.

Definition at line 255 of file TVec_impl.h.

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

{
    TVec<T> result;
    result.concat(v1,v2,v3,v4);
    return result;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::concat ( const Array< TVec< T > > &  varray)

Definition at line 149 of file Array_impl.h.

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

Referenced by PLearn::DeepReconstructorNet::computeAndSaveLayerActivationStats(), PLearn::VPLPreprocessedLearner2::computeConfidenceFromOutput(), PLearn::VPLPreprocessedLearner2::computeOutput(), PLearn::VPLPreprocessedLearner2::computeOutputAndCosts(), PLearn::Learner::computeTestStatistics(), PLearn::StackedAutoassociatorsNet::fantasizeKTimeOnMultiSrcImg(), PLearn::DeepBeliefNet::fantasizeKTimeOnMultiSrcImg(), PLearn::VPLPreprocessedLearner2::initializeOutputPrograms(), PLearn::VPLCombinedLearner::initializeOutputPrograms(), local_neighbors_differences(), PLearn::SequentialModelSelector::matlabSave(), removeElement(), and PLearn::Learner::test().

{
    int l = 0;
    for(int k=0; k<varray.size(); k++)
        l += varray[k].length();
 
    TVec<T> result(l);
    real* resdata = result.data();
    for(int k=0; k<varray.size(); k++)
    {
        const TVec<T>& v = varray[k];
        real* vdata = varray[k].data();
        for(int i=0; i<v.length(); i++)
            resdata[i] = vdata[i];
        resdata += v.length();
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::concatOf ( VMat  distr,
Func  f 
) [inline]

concatOf

Definition at line 88 of file ConcatOfVariable.h.

Referenced by concatOf().

{ return new ConcatOfVariable(distr,f); }

Here is the caller graph for this function:

Var PLearn::concatOf ( Var  output,
const VarArray &  inputs,
VMat  distr,
int  nsamples,
VarArray  parameters = VarArray() 
) [inline]

deprecated old version, do not use!

Definition at line 92 of file ConcatOfVariable.h.

References concatOf().

{ return concatOf(distr,Func(inputs,output)); }

Here is the call graph for this function:

CostFunc PLearn::condprob_cost ( bool  normalize = false,
bool  smooth_map_outputs = false 
) [inline]

negative log conditional probability

Definition at line 103 of file NegLogProbCostFunction.h.

References normalize().

Referenced by PLearn::ClassifierFromDensity::computeCostsFromOutputs().

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs); }

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::conf_rated_adaboost_cost ( Var  output,
Var  target,
Var  alpha 
) [inline]

Definition at line 76 of file ConfRatedAdaboostCostVariable.h.

Referenced by PLearn::NNet::getCost().

{
    return new ConfRatedAdaboostCostVariable(output, target, alpha);
}

Here is the caller graph for this function:

Vec PLearn::constrainedLinearRegression ( const Mat &  Xt,
const Vec &  Y,
real  lambda = 0. 
)

Returns w that minimizes ||X.w - Y||^2 + lambda.||w||^2 under constraint $ \sum w_i = 1 $ Xt is the transposed of the input matrix X; Y is the target vector. This doesn't include any bias term.

Definition at line 385 of file plapack.cc.

References b, dot(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), n, PLERROR, solveLinearSystem(), PLearn::TVec< T >::subVec(), and PLearn::TMat< T >::width().

Referenced by closestPointOnHyperplane().

{
    if(Y.length()!=Xt.width())
        PLERROR("In hyperplane_distance, incompatible dimensions");

    int n = Xt.length();
    Mat A(n+1,n+1);
    Vec b(n+1);

    for(int i=0; i<n; i++)
    {
        A(n,i) = 0.5;
        A(i,n) = 0.5;
        b[i] = dot(Y,Xt(i));
        for(int j=0; j<n; j++)
        {
            real dotprod = dot(Xt(i),Xt(j));
            if(i!=j)
                A(i,j) = dotprod;
            else
                A(i,j) = dotprod + lambda;
        }
    }
    A(n,n) = 0.;
    b[n] = 0.5;
    
    // cerr << "A = " << A << endl;
    // cerr << "b = " << b << endl;
    // cerr << "b\\A = " << solveLinearSystem(A,b) << endl;

    Vec w_and_l = solveLinearSystem(A,b);
    return w_and_l.subVec(0,n); // return w
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::containsChar ( const char *  s,
const char *  symbols 
)

true if string s contains any one of the characters in symbols.

Definition at line 79 of file TypesNumeriques.cc.

References i.

Referenced by looksNumeric().

{
    bool found = false;
    int  i=0;
    while (!found && symbols[i])
    {
        found = (bool)strchr(s,symbols[i]);
        i++;
    }
    return found;
}

Here is the caller graph for this function:

PyObject * PLearn::convertArrayCheck ( PyObject *  pyobj,
int  numpy_type,
int  ndim,
bool  print_traceback 
)

Definition at line 417 of file PythonObjectWrapper.cc.

References PLearn::PythonObjectWrapper::initializePython(), and PLPythonConversionError().

Referenced by PLearn::ConvertFromPyObject< TMat< T > >::convert(), PLearn::ConvertFromPyObject< Array< T > >::convert(), and PLearn::ConvertFromPyObject< TVec< T > >::convert().

{
    PythonGlobalInterpreterLock gil;         // For thread-safety
    static PythonEmbedder embedder;
    PythonObjectWrapper::initializePython();

    if(!PyArray_Check(pyobj)) return 0; //not an array

    PyObject* pyarr0= PyArray_CheckFromAny(pyobj, NULL,
                                           ndim, ndim, NPY_CARRAY_RO, Py_None);
    PyObject* pyarr= 
        PyArray_CastToType(reinterpret_cast<PyArrayObject*>(pyarr0),
                           PyArray_DescrFromType(numpy_type), 0);
    Py_XDECREF(pyarr0);
    if(!pyarr)
        PLPythonConversionError("convertArrayCheck", pyobj,
                                print_traceback);
    return pyarr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::convertible ( )

Definition at line 38 of file object_conversions.cc.

References endl(), i, isConvertibleToObjectPtr(), PLearn::PLearnError::message(), toObjectPtr(), and u.

Referenced by main().

{
  Object* u = 0;
  StatsCollector sc;
  PP<StatsCollector> ppsc = new StatsCollector;
  StatsCollector*    psc  = ppsc;
  const StatsCollector* cpsc = ppsc;
  TVec<StatsCollector> vsc;
  TVec< PP<StatsCollector> > ppvsc;
  int i;

  cout << endl << "*** SHOULD BE CONVERTIBLE: ***" << endl;
  cout << "isConvertibleToObjectPtr(Object*)                    : " << isConvertibleToObjectPtr(u)     << endl;
  cout << "isConvertibleToObjectPtr(StatsCollector)             : " << isConvertibleToObjectPtr(sc)    << endl;
  cout << "isConvertibleToObjectPtr(StatsCollector*)            : " << isConvertibleToObjectPtr(psc)   << endl;
  cout << "isConvertibleToObjectPtr(const StatsCollector*)      : " << isConvertibleToObjectPtr(cpsc)  << endl;
  cout << "isConvertibleToObjectPtr(PP<StatsCollector>)         : " << isConvertibleToObjectPtr(ppsc)  << endl;
  cout << "isConvertibleToObjectPtr(TVec<StatsCollector>)       : " << isConvertibleToObjectPtr(vsc)   << endl;
  cout << "isConvertibleToObjectPtr(TVec< PP<StatsCollector> >) : " << isConvertibleToObjectPtr(ppvsc) << endl;

  cout << endl << "*** TEST CONVERSIONS: ***" << endl;
  cout << "toObjectPtr(Object*)               : " << toObjectPtr(u)    << endl
       << "toObjectPtr(StatsCollector)        : " << toObjectPtr(sc)   << endl
       << "toObjectPtr(StatsCollector) [2]    : " << toObjectPtr(*psc) << endl
       << "toObjectPtr(StatsCollector*)       : " << toObjectPtr(psc)  << endl
       << "toObjectPtr(const StatsCollector*) : " << toObjectPtr(cpsc) << endl
       << "toObjectPtr(PP<StatsCollector>)    : " << toObjectPtr(ppsc) << endl;

  try {
    cout << "toObjectPtr(int)                 : " << toObjectPtr(i) << endl;
  }
  catch (PLearnError e) {
    cout << "... caught error '" << e.message() << "'" << endl;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::convolve ( TMat< T >  m,
TMat< T >  mask,
TMat< T >  result 
)

Definition at line 7077 of file TMat_maths_impl.h.

References c, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, sum(), w, and PLearn::TMat< T >::width().

Referenced by PLearn::ConvolveVariable::fprop().

{
    if(result.length() != m.length()-mask.length()+1 || result.width() != m.width()-mask.width()+1)
        PLERROR("In convolve(TMat<T> m, TMat<T> mask, TMat<T> result), result does not have the appropriate dimensions");
    T sum;
    for(int i=0; i<result.length(); i++)
        for(int j=0; j<result.width(); j++)
        {
            T* maskptr = mask.data();
            T* mptr = m[i]+j;
            sum = 0.0;
            int w=mask.width();

            for(int l=0; l<mask.length(); l++, maskptr += mask.mod(), mptr += m.mod())
                for(int c=0; c<w; c++)
                    sum += maskptr[c] * mptr[c];
            result(i,j) = sum;
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::convolve ( Var  input,
Var  mask 
) [inline]

Definition at line 74 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
void PLearn::convolve1D ( const Vec &  source_signal,
const Vec &  kernel,
const Vec &  dest_signal,
int  step = 1,
bool  accumulate = true 
)

Convolve a source signal of length NS with a kernel of length NK with steps S, and put result in a destination signal which should be of length NS-NK+1.

The destination signal is dest_signal[i] = sum_{j=0}^{NK-1} source_signal[i*step+j]*kernel[j]

Definition at line 52 of file convolutions.cc.

References PLearn::TVec< T >::clear(), d, PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), and PLERROR.

{
    int nk=kernel.length();
    int nd=dest_signal.length();
#ifdef BOUNDCHECK
    int ns=source_signal.length();
    if (step<1)
        PLERROR("convolve1D: step (%d) should be a positive integer\n",step);
    if (ns!=step*(nd-1)+nk)
        PLERROR("convolve1D: source_signal.length() (%d) should equal %d:\n"
                "step (%d) * (dest_signal.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                ns,step*(nd-1)+nk,step,nd,nk);
#endif
    if (!accumulate)
        dest_signal.clear();
    real* s=source_signal.data();
    real* k=kernel.data();
    real* d=dest_signal.data();
    for (int i=0;i<nd;i++,s+=step)
    {
        real somme=0;
        for (int j=0;j<nk;j++)
            somme += s[j]*k[j];
        d[i]+=somme;
    }
}

Here is the call graph for this function:

void PLearn::convolve1Dbackprop ( const Vec &  source_signal,
const Vec &  kernel,
const Vec &  dC_ddest_signal,
const Vec &  dC_dsource_signal,
const Vec &  dC_dkernel,
int  step,
bool  accumulate 
)

Increment dC/dsource_signal and dC/dkernel, given dC/ddest_signal, with dest_signal computed as per convolve1D(source_signal, kernel, dest_signal): dC/dsource_signal[k] += sum_{j=0}^{NK-1} 1_{k>=j && k-j<ND} dC_ddest_signal[k-j]*kernel[j] dC/dkernel[j] += sum_{k=0}^{ND-1} 1_{k>=j && k-j<ND} dC_ddest_signal[k-j]*source_signal[k] (consider the equivalence: k = i+j)

for i=0 to nd-1: for j=0 to nk-1: dC_dsource_signal[i*step+j] += dC_ddest_signal[i]*kernel[j] dC_dkernel[j] += dC_ddest_signal[i]*source_signal[i*step+j]

Definition at line 114 of file convolutions.cc.

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

{
    int nk=kernel.length();
    int nd=dC_ddest_signal.length();
#ifdef BOUNDCHECK
    int ns=source_signal.length();
    if (step<1)
        PLERROR("convolve1Dbackprop: step (%d) should be a positive integer\n",
                step);
    if (ns!=step*(nd-1)+nk)
        PLERROR("convolve1Dbackprop: source_signal.length() (%d) should"
                " equal %d:\n"
                "step (%d) * (dC_ddest_signal.length() (%d) - 1) +"
                " kernel.length() (%d)\n",
                ns,step*(nd-1)+nk,step,nd,nk);
    if (dC_dsource_signal.length()!=ns)
        PLERROR("convolve1Dbackprop: source_signal.length() (%d) should"
                " equal:\n"
                "dC_dsource_signal.length() (%d)\n",
                ns,dC_dsource_signal.length());
    if (dC_dkernel.length()!=nk)
        PLERROR("convolve1Dbackprop: kernel.length() (%d) should equal:\n"
                " dC_dkernel.length() (%d)\n",
                nk,dC_dkernel.length());
#endif
    if (!accumulate)
    {
        dC_dsource_signal.clear();
        dC_dkernel.clear();
    }
    real* s=source_signal.data();
    real* dCds=dC_dsource_signal.data();
    real* k=kernel.data();
    real* dCdk=dC_dkernel.data();
    real* dCdd=dC_ddest_signal.data();

    for (int i=0;i<nd;i++,dCds+=step,s+=step)
    {
        real di=dCdd[i];
        for (int j=0;j<nk;j++)
        {
            dCds[j] += di*k[j];
            dCdk[j] += di*s[j];
        }
    }
}

Here is the call graph for this function:

void PLearn::convolve1Dbackprop ( const Vec &  source_signal,
const Vec &  dC_ddest_signal,
const Vec &  dC_dkernel,
int  step,
bool  accumulate 
)

Same as above, but increments only dC/dkernel, not dC/dsource_signal dC/dkernel[j] += sum_{k=0}^{ND-1} 1_{k>=j && k-j<ND} dC_ddest_signal[k-j]*source_signal[k] (consider the equivalence: k = i+j)

for i=0 to nd-1: for j=0 to nk-1: dC_dkernel[j] += dC_ddest_signal[i]*source_signal[i*step+j]

Definition at line 168 of file convolutions.cc.

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

{
    int nk=dC_dkernel.length();
    int nd=dC_ddest_signal.length();
#ifdef BOUNDCHECK
    int ns=source_signal.length();
    if (step<1)
        PLERROR("convolve1Dbackprop: step (%d) should be a positive integer\n",
                step);
    if (ns!=step*(nd-1)+nk)
        PLERROR("convolve1Dbackprop: source_signal.length() (%d) should"
                " equal %d:\n"
                "step (%d) * (dC_ddest_signal.length() (%d) - 1) +"
                " dC_dkernel.length() (%d)\n",
                ns,step*(nd-1)+nk,step,nd,nk);
#endif
    if (!accumulate)
        dC_dkernel.clear();

    real* s=source_signal.data();
    real* dCdk=dC_dkernel.data();
    real* dCdd=dC_ddest_signal.data();

    for (int i=0;i<nd;i++,s+=step)
    {
        real di=dCdd[i];
        for (int j=0;j<nk;j++)
            dCdk[j] += di*s[j];
    }
}

Here is the call graph for this function:

void PLearn::convolve2D ( const Mat &  source_image,
const Mat &  kernel,
const Mat &  dest_image,
int  step1 = 1,
int  step2 = 1,
bool  accumulate = true 
)

Convolve a (N1S x N2S) source image with a (N1K x N2K) kernel matrix, and put result in a destination matrix of dimensions (N1D x N2D), stepping by (step1,step2) in each direction, with NiS = NiD*stepi + NiK - 1.

The destination image is dest_image[i,j] = sum_{k1=0}^{N1K-1} sum_{k2=0}^{N2K-1} source_image[i*step1+k1,j*step2+k2]*kernel[k1,k2]

Definition at line 304 of file convolutions.cc.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, sum(), and PLearn::TMat< T >::width().

Referenced by PLearn::Supersampling2DModule::bbpropUpdate(), PLearn::BackConvolution2DModule::bbpropUpdate(), PLearn::RBMConv2DConnection::computeProduct(), PLearn::RBMConv2DConnection::computeProducts(), PLearn::RBMConv2DLLParameters::computeUnitActivations(), PLearn::Subsampling2DModule::fprop(), and PLearn::Convolution2DModule::fprop().

{
    int kl = kernel.length();
    int kw = kernel.width();
    int dl = dest_image.length();
    int dw = dest_image.width();

#ifdef BOUNDCHECK
    int sl = source_image.length();
    int sw = source_image.width();

    if (step1<1)
        PLERROR("convolve2D: step1 (%d) should be a positive integer\n",step1);
    if (sl != step1*(dl-1)+kl)
        PLERROR("convolve2D: source_image.length() (%d) should equal %d:\n"
                "step1 (%d) * (dest_image.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                sl, step1*(dl-1)+kl, step1, dl, kl);

    if (step2<1)
        PLERROR("convolve2D: step2 (%d) should be a positive integer\n",step2);
    if (sw != step2*(dw-1)+kw)
        PLERROR("convolve2D: source_image.width() (%d) should equal %d:\n"
                "step2 (%d) * (dest_image.width() (%d) - 1) + kernel.width()"
                " (%d)\n",
                sw, step2*(dw-1)+kw, step2, dw, kw);
#endif
    if (!accumulate)
        dest_image.clear();
    int sm = source_image.mod();
    int dm = dest_image.mod();
    int km = kernel.mod();
    real* source_i = source_image.data(); // source_image[i*step1]
    real* dest_i = dest_image.data(); // dest_image[i]
    for (int i=0; i<dl; i++, source_i+=sm*step1, dest_i+=dm)
    {
        real* source_i_j = source_i; // source_image[i*step1][j*step2]
        for (int j=0; j<dw; j++, source_i_j+=step2)
        {
            real sum = 0;
            real* kernel_k = kernel.data(); // kernel[k]
            real* source_ik_j = source_i_j; // source_image[i*step1+k][j*step2]
            for (int k=0; k<kl; k++, source_ik_j+=sm, kernel_k+=km)
                for (int l=0; l<kw; l++)
                    sum += source_ik_j[l] * kernel_k[l];
            dest_i[j] += sum;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::convolve2Dbackprop ( const Mat &  source_image,
const Mat &  kernel,
const Mat &  dC_ddest_image,
const Mat &  dC_dsource_image,
const Mat &  dC_dkernel,
int  step1,
int  step2,
bool  accumulate 
)

Increment dC/dsource_image and dC/dkernel, given dC/ddest_image, with dest_image computed as per convolve2D(source_image, kernel, dest_image): for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/dsource_image[i1+j1,i2+j2] += dC/dest_image[i1,i2]*kernel[j1,j2] dC/dkernel[j1,j2] += dC/dest_image[i1,i2]*source_image[i1+j1,i2+j2].

Definition at line 409 of file convolutions.cc.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::RBMConv2DLLParameters::accumulateNegStats(), PLearn::RBMConv2DConnection::accumulateNegStats(), PLearn::RBMConv2DLLParameters::accumulatePosStats(), PLearn::RBMConv2DConnection::accumulatePosStats(), PLearn::RBMConv2DConnection::bpropAccUpdate(), PLearn::Convolution2DModule::bpropAccUpdate(), PLearn::Subsampling2DModule::bpropUpdate(), PLearn::RBMConv2DLLParameters::bpropUpdate(), PLearn::RBMConv2DConnection::bpropUpdate(), and PLearn::Convolution2DModule::bpropUpdate().

{
    int n1k=kernel.length();
    int n2k=kernel.width();
    int n1d=dC_ddest_image.length();
    int n2d=dC_ddest_image.width();
#ifdef BOUNDCHECK
    int n1s=source_image.length();
    int n2s=source_image.width();
    if (step1<1)
        PLERROR("convolve2Dbackprop: step1 (%d) should be a positive integer\n",
                step1);
    if (n1s!=step1*(n1d-1)+n1k)
        PLERROR("convolve2Dbackprop: source_image.length() (%d) should equal"
                " %d:\n"
                "step1 (%d) * (dest_image.length() (%d) - 1) + kernel.length()"
                " (%d)\n",
                n1s,step1*(n1d-1)+n1k,step1,n1d,n1k);
    if (dC_dsource_image.length()!=n1s)
        PLERROR("convolve2Dbackprop: source_image.length() (%d) should"
                " equal:\n"
                "dC_dsource_image.length() (%d)\n",
                n1s,dC_dsource_image.length());
    if (dC_dkernel.length()!=n1k)
        PLERROR("convolve2Dbackprop: kernel.length() (%d) should equal:\n"
                " dC_dkernel.length() (%d)\n",
                n1k,dC_dkernel.length());

    if (step2<1)
        PLERROR("convolve2Dbackprop: step2 (%d) should be a positive integer\n",
                step2);
    if (n2s!=step2*(n2d-1)+n2k)
        PLERROR("convolve2Dbackprop: source_image.width() (%d) should equal"
                " %d:\n"
                "step2 (%d) * (dest_image.width() (%d) - 1) + kernel.width()"
                " (%d)\n",
                n2s,step2*(n2d-1)+n2k,step2,n2d,n2k);
    if (dC_dsource_image.width()!=n2s)
        PLERROR("convolve2Dbackprop: source_image.width() (%d) should"
                " equal:\n"
                "dC_dsource_image.width() (%d)\n",
                n2s,dC_dsource_image.width());
    if (dC_dkernel.width()!=n2k)
        PLERROR("convolve2Dbackprop: kernel.width() (%d) should equal:\n"
                " dC_dkernel.width() (%d)\n",
                n2k,dC_dkernel.width());
#endif
    if (!accumulate)
    {
        dC_dsource_image.clear();
        dC_dkernel.clear();
    }
    int sm = source_image.mod();
    int dCdsm = dC_dsource_image.mod();
    int km = kernel.mod();
    int dCdkm = dC_dkernel.mod();
    int dCddm = dC_ddest_image.mod();

    real* s = source_image.data();
    real* dCds = dC_dsource_image.data();
    real* dCdd = dC_ddest_image.data();

    for (int i=0;i<n1d;i++,s+=sm*step1,dCds+=dCdsm*step1,dCdd+=dCddm)
    {
        real* s1 = s; // copy to iterate over columns
        real* dCds1 = dCds;
        for (int j=0;j<n2d;j++,s1+=step2,dCds1+=step2)
        {
            real* k = kernel.data();
            real* dCdk = dC_dkernel.data();
            real* ss = s1; // copy to iterate over sub-rows
            real* dCdss = dCds1;
            real dCdd_ij=dCdd[j];
            for (int l=0;l<n1k;l++,ss+=sm,dCdss+=dCdsm,k+=km,dCdk+=dCdkm)
            {
                for (int m=0;m<n2k;m++)
                {
                    dCdss[m] += dCdd_ij * k[m];
                    dCdk[m] += dCdd_ij * ss[m];
                }
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::convolve2Dbackprop ( const Mat &  source_image,
const Mat &  dC_ddest_image,
const Mat &  dC_dkernel,
int  step1,
int  step2,
bool  accumulate 
)

As above, but increments only dC/dkernel, not dC/dsource_image for i1=0 to N1D-1: for i2=0 to N2D-1: for j1=0 to N1K-1: for j2=0 to N2K-1: dC/dkernel[j1,j2] += dC/dest_image[i1,i2]*source_image[i1+j1,i2+j2].

Definition at line 498 of file convolutions.cc.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
    int n1k=dC_dkernel.length();
    int n2k=dC_dkernel.width();
    int n1d=dC_ddest_image.length();
    int n2d=dC_ddest_image.width();
#ifdef BOUNDCHECK
    int n1s=source_image.length();
    int n2s=source_image.width();
    if (step1<1)
        PLERROR("convolve2Dbackprop: step1 (%d) should be a positive integer\n",
                step1);
    if (n1s!=step1*(n1d-1)+n1k)
        PLERROR("convolve2Dbackprop: source_image.length() (%d) should equal"
                " %d:\n"
                "step1 (%d) * (dest_image.length() (%d) - 1) +"
                " dC_dkernel.length() (%d)\n",
                n1s,step1*(n1d-1)+n1k,step1,n1d,n1k);

    if (step2<1)
        PLERROR("convolve2Dbackprop: step2 (%d) should be a positive integer\n",
                step2);
    if (n2s!=step2*(n2d-1)+n2k)
        PLERROR("convolve2Dbackprop: source_image.width() (%d) should equal"
                " %d:\n"
                "step2 (%d) * (dest_image.width() (%d) - 1) +"
                " dC_dkernel.width() (%d)\n",
                n2s,step2*(n2d-1)+n2k,step2,n2d,n2k);
#endif
    if (!accumulate)
        dC_dkernel.clear();

    int sm = source_image.mod();
    int dCdkm = dC_dkernel.mod();
    int dCddm = dC_ddest_image.mod();

    real* s = source_image.data();
    real* dCdd = dC_ddest_image.data();

    for (int i=0;i<n1d;i++,s+=sm*step1,dCdd+=dCddm)
    {
        real* s1 = s; // copy to iterate over columns
        for (int j=0;j<n2d;j++,s1+=step2)
        {
            real* dCdk = dC_dkernel.data();
            real* ss = s1; // copy to iterate over sub-rows
            real dCdd_ij=dCdd[j];
            for (int l=0;l<n1k;l++,ss+=sm,dCdk+=dCdkm)
                for (int m=0;m<n2k;m++)
                    dCdk[m] += dCdd_ij * ss[m];
        }
    }
}

Here is the call graph for this function:

template<class In , class Out >
Out PLearn::copy_cast ( In  first,
In  last,
Out  res 
) [inline]

Like std::copy, but with an explicit cast to the destination type.

Definition at line 156 of file general.h.

Referenced by operator<<().

{
    typedef typename iterator_traits<Out>::value_type out_t;
    for(; first!=last; ++first, ++res)
        *res = out_t(*first);
    return res;
}

Here is the caller graph for this function:

template<class In , class Out , class Pred >
Out PLearn::copy_if ( In  first,
In  last,
Out  res,
Pred  p 
)

copy_if: Function that is embarassingly missing from the C++ standard...

Definition at line 55 of file stl_utilities.h.

{
    while (first != last) {
        if (p(*first))
            *res++ = *first;
        ++first;
    }
    return res;
}
template<class T >
T PLearn::correlation ( const TMat< T > &  mat)

Definition at line 5043 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), n, PLERROR, sqrt(), PLearn::TMat< T >::width(), and x.

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

{
    int n = mat.length();
#ifdef BOUNDCHECK
    if(n==0 || mat.width()==0)
        PLERROR("In T correlation(const TMat<T>& mat) mat has 0 size");
#endif
    if (mat.width() != 2)
        PLERROR("In T correlation(const TMat<T>& mat), mat width (%d) must be 2", mat.width());

    double s_x=0, s_y=0, s_xy=0, s_x2=0, s_y2=0;
    for (int i=0; i<n; i++)
    {
        T x = mat(i,0);
        T y = mat(i,1);
        s_x += x;
        s_x2 += x*x;
        s_y += y;
        s_y2 += y*y;
        s_xy += x*y;
    }

    return (n*s_xy - s_x*s_y)/sqrt((n*s_x2 - s_x*s_x)*(n*s_y2 - s_y*s_y));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::correlation ( const TVec< T > &  x,
const TVec< T > &  y 
)

Definition at line 5069 of file TMat_maths_impl.h.

References i, PLearn::TVec< T >::length(), n, PLERROR, and sqrt().

{
    int n = x.length();
#ifdef BOUNDCHECK
    if(n==0 || y.length()==0)
        PLERROR("In T correlation(const TVec<T>& x, const TVec<T>& y), one Vec has 0 size");
#endif
    if (n != y.length())
        PLERROR("In T correlation(const TVec<T>& x, const TVec<T>& y), both Vec must have same length (%d != %d)", n, y.length());

    double s_x=0, s_y=0, s_xy=0, s_x2=0, s_y2=0;
    for (int i=0; i<n; i++)
    {
        T x_val = x[i];
        T y_val = y[i];
        s_x += x_val;
        s_x2 += x_val*x_val;
        s_y += y_val;
        s_y2 += y_val*y_val;
        s_xy += x_val*y_val;
    }

    return (n*s_xy - s_x*s_y)/sqrt((n*s_x2 - s_x*s_x)*(n*s_y2 - s_y*s_y));
}

Here is the call graph for this function:

void PLearn::correlations ( const VMat &  x,
const VMat &  y,
Mat &  r,
Mat &  pvalues,
bool  ignore_missing = false 
)

Compute the correlations between each of the columns of x and each of the columns of y.

The results are in the x.width() by y.width() matrix r. The p-values of the corresponding test (no correlation) are stored in the same-sized matrix pvalues. If 'ignore_missing' is set to true, for each pair of columns, only rows which have non-missing values will be taken into account. This method should not be called with 'ignore_missing' set to false if there are missing values in the VMats.

Definition at line 626 of file VMat_basic_stats.cc.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::fill(), i, is_missing(), j, PLearn::VMat::length(), n, PLERROR, PLWARNING, PLearn::TMat< T >::resize(), sqrt(), testNoCorrelationAsymptotically(), and PLearn::VMat::width().

Referenced by PLearn::LayerCostModule::computeCorrelationStatistics(), PLearn::CorrelationKernel::evaluate(), PLearn::LayerCostModule::fprop(), PLearn::TestDependencyCommand::run(), and PLearn::TestDependenciesCommand::run().

{
    TMat<int> n_nonmissing; // Store the number of non-missing values for each pair.
    int n=x.length();
    if (n!=y.length())
        PLERROR("correlations: x and y must have the same length");
    int wx=x.width();
    int wy=y.width();
    r.resize(wx,wy);
    r.clear();
    Mat sxy(wx,wy);
    Vec sx2(wx);
    Vec sy2(wy);
    Vec sx(wx);
    Vec sy(wy);
    Vec xt(wx);
    Vec yt(wy);
    Mat sy_m, sx_m, sy2_m, sx2_m;
    if (ignore_missing) {
        n_nonmissing.resize(wx, wy);
        sy_m.resize(wx, wy);
        sy2_m.resize(wx, wy);
        sx_m.resize(wx, wy);
        sx2_m.resize(wx, wy);
        n_nonmissing.fill(0);
        sy_m.fill(0);
        sy2_m.fill(0);
        sx_m.fill(0);
        sx2_m.fill(0);
    }
    for (int t=0;t<n;t++)
    {
        x->getRow(t,xt);
        y->getRow(t,yt);
        for (int j=0;j<wy;j++)
        {
            real ytj = yt[j];
            if (!ignore_missing) {
#ifdef BOUNDCHECK
                if (is_missing(ytj))
                    PLWARNING("In correlations - You should not compute correlations "
                              "with missing values and 'ignore_ missing' set to false");
#endif
                sy[j] += ytj;
                sy2[j] += ytj*ytj;
            }
            for (int i=0;i<wx;i++)
            {
                real xti = xt[i];
                if (ignore_missing) {
                    if (!is_missing(ytj) && !is_missing(xti)) {
                        sy_m(i,j) += ytj;
                        sy2_m(i,j) += ytj * ytj;
                        sx_m(i,j) += xti;
                        sx2_m(i,j) += xti * xti;
                        sxy(i,j) += xti * ytj;
                        n_nonmissing(i,j)++;
                    }
                } else {
#ifdef BOUNDCHECK
                    if (is_missing(xti))
                        PLWARNING("In correlations - You should not compute correlations "
                                  "with missing values and 'ignore_ missing' set to false");
#endif
                    sxy(i,j) += xti*ytj;
                    sx[i] += xti;
                    sx2[i] += xti*xti;
                }
            }
        }
    }
    for (int i=0;i<wx;i++)
        for (int j=0;j<wy;j++)
        {
            real nv; // = n * variance of x
            if (ignore_missing) {
                nv = sx2_m(i,j) - sx_m(i,j) / real(n_nonmissing(i,j)) * sx_m(i,j);
            } else {
                nv = sx2[i] - sx[i]/real(n)*sx[i];
            }
            if (nv>0) // don't bother if variance is 0
                if (ignore_missing)
                    r(i,j) = (n_nonmissing(i,j)*sxy(i,j)-sx_m(i,j)*sy_m(i,j)) /
                        sqrt( (n_nonmissing(i,j)*sx2_m(i,j)-sx_m(i,j)*sx_m(i,j)) *
                              (n_nonmissing(i,j)*sy2_m(i,j)-sy_m(i,j)*sy_m(i,j)));
                else
                    r(i,j) = (n*sxy(i,j)-sx[i]*sy[j])/sqrt((n*sx2[i]-sx[i]*sx[i])*(n*sy2[j]-sy[j]*sy[j]));
            else
                r(i,j) = 0;
            if (r(i,j)<-1.01 || r(i,j)>1.01)
                PLWARNING("correlation: weird correlation coefficient, %f for %d-th input, %d-target",
                          r(i,j),i,j);
        }
    pvalues.resize(wx, wy);
    for (int i=0;i<wx;i++)
        for (int j=0;j<wy;j++)
            if (ignore_missing)
                pvalues(i,j) = testNoCorrelationAsymptotically(r(i,j),n_nonmissing(i,j));
            else
                pvalues(i,j) = testNoCorrelationAsymptotically(r(i,j),n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::countNonBlankLinesOfFile ( const PPath &  filename)

Will return the number of non-blank lines of file.

#-style comments are considered blank.

Definition at line 515 of file fileutils.cc.

References c, PLearn::PStream::get(), in, openFile(), and PLearn::PStream::raw_ascii.

Referenced by PLearn::AsciiVMatrix::build_(), parseSizeFromRemainingLines(), and PLearn::StringTable::StringTable().

{
    PStream in = openFile(filename, PStream::raw_ascii, "r");
    int count = 0;
    int c = in.get();
    while(c!=EOF)
    {
        while(c=='\n' || c==' ' || c=='\t' || c=='\r')
            c = in.get();
        if(c!='\n' && c!='#' && c!=EOF) // We've found a non-blank, non-comment char.
            ++count;
        while(c!='\n' && c!=EOF) // Read until end of line.
            c = in.get();
        c = in.get();
    }
    return count;  
}

Here is the call graph for this function:

Here is the caller graph for this function:

map< real, int > PLearn::countOccurencesInColumn ( VMat  m,
int  col 
)

returns a map mapping all different values appearing in column col to their number of occurences

Definition at line 69 of file VMat_operations.cc.

References i, is_missing(), PLearn::VMat::length(), m, and PLERROR.

Referenced by indicesOfOccurencesInColumn().

{
    map<real, int> counts; // result we will return
    map<real, int>::iterator found;
    int l = m.length();
    for(int i=0; i<l; i++)
    {
        real val = m(i,col);
        if (is_missing(val))
            // The 'nan' real value has to be dealt with separately. Here, we just
            // raise an error to keep it simple.
            PLERROR("In countOccurencesInColumn - Found a missing value, this case is currently not handled");
        found = counts.find(val);
        if(found==counts.end())
            counts[val] = 1;
        else
            found->second++;
    }
    return counts;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::cov2corr ( Var  v,
int  diagonal_choice = 1,
double  epsilon = 0. 
) [inline]

Definition at line 84 of file Cov2CorrVariable.h.

Referenced by PLearn::DiverseComponentAnalysis::build_().

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }

Here is the caller graph for this function:

template<class T >
T PLearn::covariance ( const TVec< T > &  vec1,
const TVec< T > &  vec2,
mean1,
mean2 
)

Definition at line 658 of file TMat_maths_impl.h.

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

Referenced by PLearn::VecStatsCollector::getCovariance().

{
#ifdef BOUNDCHECK
    if(vec1.length()<=1)
        PLERROR("IN T covariance(const TVec<T>& vec1, const TVec<T>& vec2, T mean1, T mean2) vec1's length must be more than one");
    if(vec2.length()<=1)
        PLERROR("IN T covariance(const TVec<T>& vec1, const TVec<T>& vec2, T mean1, T mean2) vec2's length must be more than one");
    if(vec1.length() != vec2.length())
        PLERROR("IN T covariance(const TVec<T>& vec1, const TVec<T>& vec2, T mean1, T mean2) the lengths of vec1 and vec2 must be same");
#endif
    if (vec1.size() == 0 || vec2.size() == 0)
        return MISSING_VALUE;
    int length = vec1.length();
    double res = 0.0;
    T* v1 = vec1.data();
    T* v2 = vec2.data();
    for(int i=0; i<length; i++)
    {
        double temp = (v1[i]-mean1)*(v2[i]-mean2);
        res += temp;
    }
    return res/(length - 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::cp ( const PPath &  srcpath,
const PPath &  destpath 
)

Calls system with cp -R to recursively copy source to destination.

Definition at line 346 of file fileutils.cc.

References PLearn::PPath::absolute().

Referenced by PLearn::ProcessSymbolicSequenceVMatrix::fill_current_row(), PLearn::ProcessSymbolicSequenceVMatrix::getExample(), PLearn::ProcessSymbolicSequenceVMatrix::getNewRow(), loadSTATLOG(), and loadUCIMLDB().

{
    // TODO Cross-platform version ?
    string command = "\\cp -R " + srcpath.absolute() + " " + destpath.absolute();
    system(command.c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::create_list ( const TVec< int > &  parent_,
const TVec< TVec< int > > &  children_,
TVec< int > &  nodes_,
TVec< bool > &  use_previous_,
TVec< bool > &  can_free_,
int  current_,
bool  cur_use_prev,
bool  cur_can_free 
)

Definition at line 3275 of file GaussMix.cc.

References PLearn::TVec< T >::append(), and i.

Referenced by PLearn::GaussMix::train().

{
    // Create list of nodes in the tree.
    nodes_.append(current_);
    use_previous_.append(cur_use_prev);
    can_free_.append(cur_can_free);
    for (int i = 0; i < children_[current_].length(); i++) {
        cur_use_prev = (i == 0);
        cur_can_free = (i == children_[current_].length() - 1);
        create_list(parent_, children_, nodes_, use_previous_, can_free_,
                    children_[current_][i], cur_use_prev, cur_can_free);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::createWrappedObjectsSet ( PyObject *  module)

Definition at line 423 of file PythonExtension.cc.

References PLERROR.

Referenced by setPythonModuleAndInject().

{
    /* can't set logging before this gets called
    perr << "[pid=" << getPid() << "] "
         << "createWrappedObjectsSet for module: " << PythonObjectWrapper(module) << endl;
    */

    string code= "";
#if PL_PYTHON_VERSION <= 230
    code+= "\nfrom sets import Set as set\n";
#endif // PL_PYTHON_VERSION <= 230
    code+= "\nwrapped_PLearn_instances= set()\n";
    PyObject* res= PyRun_String(code.c_str(), Py_file_input, 
                                PyModule_GetDict(module), PyModule_GetDict(module));
    if(!res)
    {
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in createWrappedObjectsSet : cannot create set.");
    }
    Py_DECREF(res);
 }

Here is the caller graph for this function:

Vec PLearn::cross ( const Vec &  v1,
const Vec &  v2 
)

Definition at line 689 of file geometry.cc.

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

Referenced by closestPointOnTriangle(), and PLearn::SurfaceMesh::findNormals().

{
  if( v1.size()!=3 || v2.size()!=3 )
  {
    PLERROR("cross-product of 2 Vec is only defined for Vec of size 3");
  }

  Vec res( 3 );

  res[0] = v1[1]*v2[2] - v2[1]*v1[2];
  res[1] = -( v1[0]*v2[2] - v2[0]*v1[2] );
  res[2] = v1[0]*v2[1] - v2[0]*v1[1];

  return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::cross_entropy ( Var  network_output,
Var  targets 
) [inline]
void PLearn::cross_valid ( const string &  modelalias,
string  trainalias,
int  kval 
)

Definition at line 279 of file old_plearn_main.cc.

References endl(), exitmsg(), getDataSet(), getModelAliases(), i, isfile(), PLearn::TMat< T >::length(), PLearn::VMat::length(), loadAscii(), PLWARNING, read(), PLearn::TMat< T >::resize(), save(), PLearn::TVec< T >::size(), split(), tostring(), PLearn::VMat::width(), and PLearn::TMat< T >::width().

Referenced by old_plearn_main().

{
    map<string,string> dataset_aliases = getDatasetAliases(".");
    if(dataset_aliases.empty())
        exitmsg("Problem: No dataset.aliases found in the current directory or its parents");
    if(dataset_aliases.find(trainalias)==dataset_aliases.end())
        exitmsg("Problem: No alias '%s' found in dataset.aliases",trainalias.c_str());
    string trainsetdef = dataset_aliases[trainalias];
    cout << ">> Will be crossvalidating with a kfold value of "<<kval<<" on alias '" << trainalias << "': " << trainsetdef << endl;
    VMat trainset = getDataSet(trainsetdef,trainalias);
    cout << "   size of whole dataset: " << trainset.length() << " x " << trainset.width() << endl;

    if(!isfile("model.aliases"))
        exitmsg("Problem: No model.aliases file in current directory");
    map<string, string> model_aliases = getModelAliases("model.aliases");
    if(model_aliases.find(modelalias)==model_aliases.end())
        exitmsg("Problem: Could not find alias %s in file model.aliases",modelalias.c_str());

/* not implemented for now, Julien
   string use_saved_model = ""; // look for a possibly last saved model in modelalias directory
   if(isdir(modelalias))
   {
   vector<string> dirlist = lsdir(modelalias);
   vector<string>::iterator it = dirlist.begin();
   vector<string>::iterator itend = dirlist.end();
   int maxmodelnum = -1;
   for(; it!=itend; ++it)
   {
   int itl = it->length();
   if(*it == "model.psave")
   {
   use_saved_model = modelalias + "/" + *it;
   break;
   }
   else if(itl>11 && it->substr(0,5)=="model" && it->substr(itl-6,6)==".psave")
   {
   int modelnum = toint(it->substr(5,itl-11));
   if(modelnum>maxmodelnum)
   {
   modelnum = maxmodelnum;
   use_saved_model = modelalias + "/" + *it;
   }
   }
   }
   }
*/

    PP<Learner> learner;
/*  if(use_saved_model!="")
    {
    cout << ">> Loading saved learner from file " << use_saved_model << endl;
    learner = dynamic_cast<Learner*>(loadObject(use_saved_model));
    if(!learner)
    exitmsg("Problem in making file %s into a Learner",use_saved_model.c_str());
    }
    else*/
    {
        string modelspec = model_aliases[modelalias];
        cout << ">> Creating learner: " << modelspec << endl;
        PLearn::read(modelspec, learner);
        // learner = dynamic_cast<Learner*>(newObject(modelspec));  
    }

    //  learner->setOption("save_at_every_epoch","true");

    cout << ">> Learner has inputsize=" << learner->inputsize() << " targetsize=" << learner->targetsize() << " outputsize=" << learner->outputsize() << endl;

    if(trainset.width()!=learner->inputsize()+learner->targetsize())
        exitmsg("Problem: learner's inputsize+targetsize differs from the width of the trainingset!!!");

    learner->setExperimentDirectory(modelalias);
  
    Mat mglobal(0,0);
    Mat mhist(0,0);
    TVec<std::string> fnames;
  
    for(int i=0;i<kval;i++)
    {
        VMat train_k,test_k;
        split(trainset, 1.0f/kval, train_k, test_k, kval-i-1);
        train_k->setAlias(trainset->getAlias()+"_kf"+tostring(kval)+"_"+tostring(i));
        test_k->setAlias(trainset->getAlias()+"_kf"+tostring(kval)+"_-"+tostring(i));
    
        learner->forget();
        learner->setTestDuringTrain(test_k);

        cout << "Training and testing ... train.length="<<train_k.length()<<" test.length="<<test_k.length()<<" step:" << i+1 <<" / "<<kval<<endl;
        learner->train(train_k);
    
        string psavefile = learner->basename()+".psave";
        cout << ">>> Saving final trained model in file: " << psavefile << endl;
        save(psavefile, *learner);

        // collect each k's results to make global results file

        Mat mmhist;
        loadAscii(learner->basename()+"."+test_k->getAlias()+".hist.results",mmhist,fnames);
        if(mhist.width()!=mmhist.width() || mhist.length()!=mmhist.length())
        {
            if(mhist.width()!=0)
                PLWARNING("While merging results file in hist.results: differents parts of the kfold don't have the same number of epochs (are you using early stopping?)");
            mhist.resize(mmhist.length(),mmhist.width());
        }
        mhist+=mmhist;
    }
  
    mhist/=kval;
    Vec best(mhist.width(),FLT_MAX);

    // the following generates a global .results with the best epoch (even without earlystopping)
    // It assumes that the value we minimize is on the third column
    for(int i=0;i<mhist.length();i++)
        if(mhist[i][2]<best[2])
            best=mhist(i);
    ofstream out((learner->getExperimentDirectory()+trainset->getAlias()+".results").c_str());
    string fields;
    for(int i=0;i<fnames.size();i++)
        fields+=fnames[i]+=" ";
    out<<"#: "<<fields<<endl;
    out<<best<<endl;

    ofstream out2((learner->getExperimentDirectory()+trainset->getAlias()+".hist.results").c_str());
    out2<<"#: "<<fields<<endl;
    out2<<mhist<<endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char * PLearn::cstr ( string &  str)

Takes a string and returns a char array of that string.

Helps, when a char array representation that doesn't need to be constant (const) is needed.

Definition at line 51 of file WordNetSenseDictionary.cc.

References i.

Referenced by extractSenses(), PLearn::WordNetOntology::extractSenses(), PLearn::WordNetOntology::extractTaggedWordFrequencies(), PLearn::WordNetSenseDictionary::getId(), getSynsetPtr(), PLearn::WordNetOntology::getWordSenseIdForSenseKey(), PLearn::WordNetOntology::hasSenseInWordNet(), stemsOfWord(), and stemWord().

{
    char* cstr = new char[str.size() + 1];
    for (unsigned int i = 0; i < str.size(); i++)
        *(cstr + i) = str[i];
    cstr[str.size()] = '\0';
    return cstr;
}

Here is the caller graph for this function:

double PLearn::cube ( double  x) [inline]

Definition at line 299 of file RBMLQParameters.cc.

References x.

Referenced by PLearn::WeightedLogGaussian::bprop(), and PLearn::RBMLQParameters::bpropUpdate().

                            {
    return x*x*x ; 
}

Here is the caller graph for this function:

Var PLearn::cutAboveThreshold ( Var  v,
real  threshold 
) [inline]

Definition at line 76 of file CutAboveThresholdVariable.h.

Referenced by negative().

{ return new CutAboveThresholdVariable(v,threshold); }

Here is the caller graph for this function:

Var PLearn::cutBelowThreshold ( Var  v,
real  threshold 
) [inline]

Definition at line 76 of file CutBelowThresholdVariable.h.

Referenced by positive().

{ return new CutBelowThresholdVariable(v,threshold); }

Here is the caller graph for this function:

Var PLearn::d_hard_slope ( Var  x,
Var  left,
Var  right 
) [inline]

Definition at line 79 of file HardSlopeVariable.h.

References ifThenElse(), invertElements(), and var().

{
    return ifThenElse((x>=left)*(x<=right), invertElements(right-left), var(0.0));
}

Here is the call graph for this function:

real PLearn::d_hinge_loss ( const real output,
int  target 
) [inline]

Definition at line 391 of file pl_math.h.

Referenced by one_against_all_hinge_loss_bprop(), PLearn::PLMathTest::perform(), and PLearn::IncrementalNNet::train().

{
    real margin = target*output;
    if (margin<1) return -target;
    return 0;
}

Here is the caller graph for this function:

real PLearn::d_soft_slope ( real  x,
real  smoothness = 1,
real  left = 0,
real  right = 1 
) [inline]

Definition at line 548 of file pl_math.h.

References left(), right(), and sigmoid().

Referenced by PLearn::ConditionalDensityNet::build_(), and PLearn::PLMathTest::perform().

{
    // note that d(softplus(z))/dz = sigmoid(z)
    return (-sigmoid(-smoothness*(x-left))+sigmoid(-smoothness*(x-right)))/(right-left);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::d_soft_slope ( Var  x,
Var  smoothness,
Var  left,
Var  right 
) [inline]

Definition at line 85 of file SoftSlopeVariable.h.

References left(), and sigmoid().

{
    return (-sigmoid(-smoothness*(x-left))+sigmoid(-smoothness*(x-right)))/(right-left);
}

Here is the call graph for this function:

string * PLearn::data_filename_2_filenames ( const string &  filename,
int nb_files 
)

take a filename containing the name of a file per line, and return theses names as a string* of length nb_files

Definition at line 128 of file stringutils.cc.

References in, and PLERROR.

{
    ifstream in(filename.c_str());
    if (!in)
        PLERROR("In data_filename_2_filenames: couldn't open file %s",
                filename.c_str());
 
    const int buffersize = 100;
    string* filenames = new string[buffersize];
    nb_files = 0;
    string fname;
    while (getline(in, fname, '\n'))
        filenames[nb_files++] = fname;
 
    return filenames;
}
double PLearn::date_to_double ( const PDate &  t)

Converts date to double: ex: September 29 1972: 720929; December 25 2002: 20021225 Also converts missing date to missing double value and vice-versa.

The format for a double date is YYYYMMDD.

Definition at line 351 of file PDate.cc.

References PLearn::PDate::day, PLearn::PDate::isMissing(), MISSING_VALUE, PLearn::PDate::month, and PLearn::PDate::year.

Referenced by operator<<().

{
    if (t.isMissing())
        return MISSING_VALUE;
    else
        return double((t.year)*10000 + t.month*100 + t.day);  
}

Here is the call graph for this function:

Here is the caller graph for this function:

float PLearn::date_to_float ( const PDate &  t)

Converts date to float: ex: September 29 1972: 720929; December 25 2002: 1021225 Also converts missing date to missing float value and vice-versa.

The format for a float date is CYYMMDD.

Definition at line 330 of file PDate.cc.

References PLearn::PDate::day, PLearn::PDate::isMissing(), MISSING_VALUE, PLearn::PDate::month, and PLearn::PDate::year.

Referenced by PLearn::VMatLanguage::run(), PLearn::RowIterator::toDouble(), PLearn::FieldValue::toDouble(), and PLearn::TextFilesVMatrix::transformStringToValue().

{
    if (t.isMissing())
        return MISSING_VALUE;
    else
        return float((t.year-1900)*10000 + t.month*100 + t.day);
}

Here is the call graph for this function:

Here is the caller graph for this function:

double PLearn::datetime_to_double ( const PDateTime &  t)

converts date/time to double: for example: September 29 1972: 720929; December 25 2002: 1021225.

Hours/minutes/seconds are represented as FRACTIONS of days. Also converts missing date to missing double value and vice-versa.

Definition at line 228 of file PDateTime.cc.

References PLearn::PDateTime::day, hhmmss_to_double(), PLearn::PDateTime::hour, PLearn::PDateTime::isMissing(), PLearn::PDateTime::min, MISSING_VALUE, PLearn::PDateTime::month, PLearn::PDateTime::sec, and PLearn::PDateTime::year.

Referenced by PLearn::PDateTime::operator<().

{
    if (t.isMissing())
        return MISSING_VALUE;
    else
        return double((t.year-1900)*10000 + t.month*100 + t.day) +
            hhmmss_to_double(t.hour,t.min,t.sec);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PLLogTest  )

Definition at line 130 of file PLLogTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PPathTest  )

Definition at line 126 of file PPathTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PStreamBufTest  )

Definition at line 130 of file PStreamBufTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( TupleTest  )

Definition at line 126 of file TupleTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( LocallyPrecomputedVMatrix  )

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ARDBaseKernel  )

Definition at line 120 of file ARDBaseKernel.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( CachedFeatureSet  )

Definition at line 139 of file CachedFeatureSet.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ConcatDisjointFeatureSet  )

Definition at line 132 of file ConcatDisjointFeatureSet.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( IIDNoiseKernel  )

Definition at line 146 of file IIDNoiseKernel.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( CheckDond2FileSequence  )

Definition at line 111 of file CheckDond2FileSequence.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ComputePurenneError  )

Definition at line 79 of file ComputePurenneError.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( KroneckerBaseKernel  )

Definition at line 139 of file KroneckerBaseKernel.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( SecondIterationWrapper  )

Definition at line 118 of file SecondIterationWrapper.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( StabilisationLearner  )

Definition at line 145 of file StabilisationLearner.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( LinearARDKernel  )

Definition at line 148 of file LinearARDKernel.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( BinaryStump  )

Definition at line 159 of file BinaryStump.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ClassifierFromConditionalPDistribution  )

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ClassifierFromDensity  )

Definition at line 146 of file ClassifierFromDensity.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( KFoldLogisticClassifier  )

Definition at line 177 of file KFoldLogisticClassifier.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( LocalGaussianClassifier  )

Definition at line 214 of file LocalGaussianClassifier.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ToBagClassifier  )

Definition at line 159 of file ToBagClassifier.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ConditionalDistribution  )

Definition at line 88 of file ConditionalDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ConditionalGaussianDistribution  )

Definition at line 105 of file ConditionalGaussianDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( Distribution  )

Definition at line 147 of file Distribution.h.

:654)
PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( EmpiricalDistribution  )

Definition at line 101 of file EmpiricalDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( LocallyWeightedDistribution  )

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( Matern1ARDKernel  )

Definition at line 141 of file Matern1ARDKernel.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( GaussianDistribution  )

Definition at line 112 of file GaussianDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( MixtureDistribution  )

Definition at line 217 of file MixtureDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( NGramDistribution  )

Definition at line 182 of file NGramDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PDistribution  )

Definition at line 349 of file PDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMDistribution  )

Definition at line 186 of file RBMDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( SpiralDistribution  )

Definition at line 145 of file SpiralDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( UnconditionalDistribution  )

Definition at line 133 of file UnconditionalDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( UniformDistribution  )

Definition at line 144 of file UniformDistribution.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ArgmaxModule  )

Definition at line 263 of file ArgmaxModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( BackConvolution2DModule  )

Definition at line 248 of file BackConvolution2DModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( BinarizeModule  )

Definition at line 289 of file BinarizeModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ClassErrorCostModule  )

Definition at line 150 of file ClassErrorCostModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( CombiningCostsModule  )

Definition at line 175 of file CombiningCostsModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( Convolution2DModule  )

Definition at line 257 of file Convolution2DModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( CostModule  )

Definition at line 198 of file CostModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( CrossEntropyCostModule  )

Definition at line 123 of file CrossEntropyCostModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMBinomialLayer  )

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ConstrainedSourceVariable  )

Definition at line 124 of file ConstrainedSourceVariable.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMGaussianLayer  )

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMMixedLayer  )

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMMultinomialLayer  )

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMTruncExpLayer  )

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( LogaddOnBagsModule  )

Definition at line 108 of file LogaddOnBagsModule.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ConstantRealFunction  )

Definition at line 121 of file ConstantRealFunction.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( ObjectGraphIteratorTest  )

Definition at line 130 of file ObjectGraphIteratorTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMLateralBinomialLayer  )

Definition at line 302 of file RBMLateralBinomialLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMLocalMultinomialLayer  )

Definition at line 181 of file RBMLocalMultinomialLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMRateLayer  )

Definition at line 158 of file RBMRateLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( RBMWoodsLayer  )

Definition at line 211 of file RBMWoodsLayer.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PLCheckTest  )

Definition at line 126 of file PLCheckTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PPTest  )

Definition at line 130 of file PPTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( MoleculeTemplate  )

Definition at line 139 of file MoleculeTemplate.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( Template  )

Definition at line 61 of file Template.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PLStringutilsTest  )

Definition at line 126 of file PLStringutilsTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PentaTest  )

Definition at line 130 of file PentaTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( PLMathTest  )

Definition at line 128 of file PLMathTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( TMatTest  )

Definition at line 139 of file TMatTest.h.

PLearn::DECLARE_SPECIALIZED_DIFF_CLASS ( AddBagInformationVMatrix  )

Definition at line 126 of file AddBagInformationVMatrix.h.

PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE ( void  ,
0xFF  ,
0xFF   
)
PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE ( bool  ,
0x30  ,
0x30   
)
PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE ( double  ,
0x10  ,
0x11   
)
PLearn::DECLARE_TYPE_TRAITS_FOR_BASETYPE ( float  ,
0x0E  ,
0x0F   
)
PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE ( char  )
PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE ( signed  char)
PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE ( short  )
PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE ( int  )
PLearn::DECLARE_TYPE_TRAITS_FOR_INTTYPE ( long  )
PLearn::DECLARE_TYPE_TRAITS_FOR_UINTTYPE ( unsigned long  long)
PLearn::DECLARE_TYPE_TRAITS_FOR_UINTTYPE ( unsigned  char)
PLearn::declareFunction ( "helpMethods"  ,
&HelpSystem::helpMethods  ,
(BodyDoc("Returns a list of all registered methods ""for the given class as text."), ArgDoc("classname","The name of the class whose methods you want to list."), RetDoc("Text list of method names"))   
)
PLearn::declareFunction ( "listMethodPrototypes"  ,
&HelpSystem::listMethodPrototypes  ,
(BodyDoc("Returns a list of the prototypes of ""all registered methods for the given class"), ArgDoc("classname","The name of the class ""whose method prototypes you want to list."), RetDoc("vector of prototypes as strings"))   
)
PLearn::declareFunction ( "helpOnMethod"  ,
&HelpSystem::helpOnMethod  ,
(BodyDoc("Will return full help on all registered ""methods of the class with the given name"), ArgDoc("classname","The name of the class"), ArgDoc("methodname","The name of the method"), ArgDoc("arity","The number of params"), RetDoc("help text"))   
)
PLearn::declareFunction ( "helpMethodsHTML"  ,
&HelpSystem::helpMethodsHTML  ,
(BodyDoc("Returns a list of all registered methods ""for the given class as an HTML page."), ArgDoc("classname","The name of the class whose methods you want to list."), RetDoc("HTML list of method names"))   
)
PLearn::declareFunction ( "helpOnMethodHTML"  ,
&HelpSystem::helpOnMethodHTML  ,
(BodyDoc("Will return full help on all registered ""methods of the class with the given name"), ArgDoc("classname","The name of the class"), ArgDoc("methodname","The name of the method"), ArgDoc("arity","The number of params"), RetDoc("help text in HTML"))   
)
PLearn::declareFunction ( "helpIndexHTML"  ,
&HelpSystem::helpIndexHTML  ,
(BodyDoc("Returns the global help index in HTML."), RetDoc("HTML global help index"))   
)
PLearn::declareFunction ( "setResourcesPathHTML"  ,
&HelpSystem::setResourcesPathHTML  ,
(BodyDoc("Sets the help resource path ""for HTML resources."), ArgDoc("path","HTML help resource path"))   
)
PLearn::declareFunction ( "getResourcesPathHTML"  ,
&HelpSystem::getResourcesPathHTML  ,
(BodyDoc("Gets the help resource path ""for HTML resources."), RetDoc("path of HTML resources"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "setProgressBarPlugin"  ,
setProgressBarPlugin,
(BodyDoc("Sets the progress bar plugin.\n"), ArgDoc("pb_type","one of: 'none','text'."))   
)
template<class R >
void PLearn::declareFunction ( const string &  funcname,
R(*)()  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 71 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_0<R> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

template<class R , class A1 , class A2 >
void PLearn::declareFunction ( const string &  funcname,
R(*)(A1, A2)  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 101 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_2<R,A1,A2> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

template<class R , class A1 >
void PLearn::declareFunction ( const string &  funcname,
R(*)(A1)  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 86 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_1<R,A1> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

template<class R , class A1 , class A2 , class A3 >
void PLearn::declareFunction ( const string &  funcname,
R(*)(A1, A2, A3)  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 116 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_3<R,A1,A2,A3> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

template<class R , class A1 , class A2 , class A3 , class A4 >
void PLearn::declareFunction ( const string &  funcname,
R(*)(A1, A2, A3, A4)  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 131 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_4<R,A1,A2,A3,A4> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

template<class R , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
void PLearn::declareFunction ( const string &  funcname,
R(*)(A1, A2, A3, A4, A5, A6)  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 159 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_6<R,A1,A2,A3,A4,A5,A6> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

template<class R , class A1 , class A2 , class A3 , class A4 , class A5 >
void PLearn::declareFunction ( const string &  funcname,
R(*)(A1, A2, A3, A4, A5)  func,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 145 of file RemoteDeclareMethod.h.

References getGlobalFunctionMap(), and PLearn::RemoteMethodMap::insert().

{
    RemoteMethodMap& rmm = getGlobalFunctionMap();
    typedef FRemoteTrampoline_5<R,A1,A2,A3,A4,A5> Trampoline;
    rmm.insert(funcname, Trampoline::expected_nargs,
               new Trampoline(funcname, doc, func, flgs));
}

Here is the call graph for this function:

BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "newObject"  ,
newObject,
(BodyDoc("Returns PLearn object from a string description.\n"), ArgDoc("representation","the string representation of the object"), RetDoc("newly created object"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "cd"  ,
&PLearnServer::cd  ,
(BodyDoc("change directory (calls chdir)\n"), ArgDoc("path","Path of directory where to go"))   
)
PLearn::declareFunction ( "binary"  ,
&PLearnServer::binary  ,
(BodyDoc("change the mode of the io of the PLearnServer instance to plearn_binary \n"))   
)
PLearn::declareFunction ( "implicit_storage"  ,
&PLearnServer::implicit_storage  ,
(BodyDoc("change the implicit_storage mode of the io of the PLearnServer instance.\n"), ArgDoc("impl_stor","Whether or not to use implicit_storage"))   
)
PLearn::declareFunction ( "loggingControl"  ,
&PLearnServer::loggingControl  ,
(BodyDoc("Set current logging level and modules.\n"), ArgDoc("vlevel","the verbosity level"), ArgDoc("modules","list of modules names to log"))   
)
PLearn::declareFunction ( "setOptionLevel"  ,
&PLearnServer::setOptionLevel  ,
(BodyDoc("Set current option level.\n"), ArgDoc("level","option level"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "globalConnectToServers"  ,
globalConnectToServers,
(BodyDoc("Connect the PLearnService instance to the listed servers."), ArgDoc("hostname_and_port","List of ('hostname', port#) pairs"))   
)
PLearn::declareFunction ( "ascii"  ,
&PLearnServer::ascii  ,
(BodyDoc("change the mode of the io of the PLearnServer instance to plearn_ascii\n"))   
)
PLearn::declareFunction ( "newObjectFromClassname"  ,
newObjectFromClassname,
(BodyDoc("Returns PLearn object from a class name (string.)\n"), ArgDoc("classname","the class of the object, as a string"), RetDoc("newly created object"))   
)
PLearn::declareFunction ( "loadObject"  ,
loadObject,
(BodyDoc("Returns PLearn object from a file describing it.\n"), ArgDoc("filename","file containing the object to load"), RetDoc("newly created object"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "viewVMat"  ,
viewVMat,
(BodyDoc("Displays a VMat's contents using curses.\n"), ArgDoc("vm","the VMat to display"), ArgDoc("filename","optional filename of the dataset, that may be used to reload it (\"\" works just fine)"))   
)
PLearn::declareFunction ( "macroLoadObject"  ,
static_cast< Object *(*)(const PPath &, map< string, string > &)> &  macroLoadObject,
(BodyDoc("Returns PLearn object from a file describing it,"" after macro-processing.\n"), ArgDoc("filename","file containing the object to load"), ArgDoc("vars","map of vars to values."), RetDoc("newly created object"))   
)
PLearn::declareFunction ( "deepCopy"  ,
remote_deepCopy,
(BodyDoc("Returns deep copy of a PLearn object.\n"), ArgDoc("source","object to be deep-copied"), RetDoc("deep copy of the object"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "setNullPout"  ,
setNullPout,
(BodyDoc("Sets the pout output stream to be null.\n"))   
)
PLearn::declareFunction ( "setPoutToPerr"  ,
setPoutToPerr,
(BodyDoc("Sets the pout output stream to be perr.\n"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "printWrappedObjects"  ,
printWrappedObjects,
(BodyDoc("Prints PLearn objects wrapped into python.\n"))   
)
PLearn::declareFunction ( "ramassePoubelles"  ,
ramassePoubelles,
(BodyDoc("GC for wrapped objects.\n"))   
)
PLearn::declareFunction ( "getVMatAsPtr"  ,
getVMatAsPtr,
(BodyDoc("Returns current setting of 'VMatAsPtr'.\n""true= wrapped VMat; false= numpy array.\n"), RetDoc("current VMatAsPtr"))   
)
PLearn::declareFunction ( "setVMatAsPtr"  ,
setVMatAsPtr,
(BodyDoc("Sets 'VMatAsPtr', returns previous setting.\n""true= wrapped VMat; false= numpy array.\n"), ArgDoc("vmat_as_ptr","wrap VMats instead of converting to numpy?"), RetDoc("Previous setting"))   
)
PLearn::declareFunction ( "getProcessDataMemory"  ,
getProcessDataMemory,
(BodyDoc("Return the total data memory used by the current process in bytes."), RetDoc("Used memory size"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "getSystemTotalMemory"  ,
getSystemTotalMemory,
(BodyDoc("Return the total memory installed in the system in bytes."), RetDoc("Memory size"))   
)
PLearn::declareFunction ( "helpOnCommand"  ,
&HelpSystem::helpOnCommand  ,
(BodyDoc("Will return full help for the ""command with the given name "), ArgDoc("commandname","The name of the command on which to get help"), RetDoc("help text for the command"))   
)
PLearn::declareFunction ( "helpCommandsHTML"  ,
&HelpSystem::helpCommandsHTML  ,
(BodyDoc("Returns an HTML list of all ""registered commands."), RetDoc("HTML list of commands"))   
)
PLearn::declareFunction ( "helpOnCommandHTML"  ,
&HelpSystem::helpOnCommandHTML  ,
(BodyDoc("Will return full help for the ""command with the given name, in HTML"), ArgDoc("commandname","The name of the command on which to get help"), RetDoc("help text for the command, in HTML"))   
)
PLearn::declareFunction ( "helpCommands"  ,
&HelpSystem::helpCommands  ,
(BodyDoc("Returns a plain text list of all ""registered commands."), RetDoc("plain text list of commands"))   
)
PLearn::declareFunction ( "listFunctions"  ,
&HelpSystem::listFunctions  ,
(BodyDoc("Returns a list of all registered global ""functions as pairs of (funtionname, nargs)"), RetDoc("vector of function names, arity"))   
)
PLearn::declareFunction ( "helpFunctions"  ,
&HelpSystem::helpFunctions  ,
(BodyDoc("Returns a list of all registered global ""functions as plain text"), RetDoc("plain text list of functions"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "listCommands"  ,
&HelpSystem::listCommands  ,
(BodyDoc("Returns a list of all registered ""commands as strings."), RetDoc("vector of command names"))   
)
PLearn::declareFunction ( "helpOnFunction"  ,
&HelpSystem::helpOnFunction  ,
(BodyDoc("Will return full help on all registered ""global functions with the given name "), ArgDoc("functionname","The name of the function on which to get help"), ArgDoc("arity","The number of params"), RetDoc("help text for the function"))   
)
PLearn::declareFunction ( "helpFunctionsHTML"  ,
&HelpSystem::helpFunctionsHTML  ,
(BodyDoc("Returns a list of all registered global ""functions as an HTML page."), RetDoc("HTML list of functions"))   
)
PLearn::declareFunction ( "listClasses"  ,
&HelpSystem::listClasses  ,
(BodyDoc("Returns a list of all registered Object classes"), RetDoc("vector of class names"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "versionString"  ,
version_string,
(BodyDoc("Returns PLearn version as a string.\n"), RetDoc("version string"))   
)
PLearn::declareFunction ( "listFunctionPrototypes"  ,
&HelpSystem::listFunctionPrototypes  ,
(BodyDoc("Returns a list of the prototypes ""of all registered global functions"), RetDoc("vector of function prototypes as strings"))   
)
PLearn::declareFunction ( "getClassTree"  ,
&HelpSystem::getClassTree  ,
(BodyDoc("Returns a map, mapping all registered ""Object classnames to their parentclassname"), RetDoc("map of class names to class names"))   
)
PLearn::declareFunction ( "helpClasses"  ,
&HelpSystem::helpClasses  ,
(BodyDoc("Returns a plain text list of all registered Object classes"), RetDoc("plain text list of class names"))   
)
PLearn::declareFunction ( "helpOnFunctionHTML"  ,
&HelpSystem::helpOnFunctionHTML  ,
(BodyDoc("Will return full HTML help on all registered ""global functions with the given name "), ArgDoc("functionname","The name of the function on which to get help"), ArgDoc("arity","The number of params"), RetDoc("HTML help text for the function"))   
)
PLearn::declareFunction ( "precisOnClass"  ,
&HelpSystem::precisOnClass  ,
(BodyDoc("Will return short class descr. and list of build options"), ArgDoc("classname","The name of the class on which to get help"), RetDoc("pair of classname and list of options"))   
)
PLearn::declareFunction ( "helpOnClass"  ,
&HelpSystem::helpOnClass  ,
(BodyDoc("Will return full help for ""the class with the given name"), ArgDoc("classname","The name of the class on which to get help"), RetDoc("help text for the class"))   
)
PLearn::declareFunction ( "helpOnClassHTML"  ,
&HelpSystem::helpOnClassHTML  ,
(BodyDoc("Will return full HTML help for ""the class with the given name"), ArgDoc("classname","The name of the class on which to get help"), RetDoc("HTML help text for the class"))   
)
PLearn::declareFunction ( "helpClassesHTML"  ,
&HelpSystem::helpClassesHTML  ,
(BodyDoc("Returns a list of all registered Object ""classes as an HTML page."), RetDoc("HTML list of class names"))   
)
PLearn::declareFunction ( "listClassParents"  ,
&HelpSystem::listClassParents  ,
(BodyDoc("List of parent classes."), ArgDoc("classname","The name of the class on which to get parents"), RetDoc("vector of parent class names"))   
)
PLearn::declareFunction ( "helpClassParents"  ,
&HelpSystem::helpClassParents  ,
(BodyDoc("Text list of parent classes."), ArgDoc("classname","The name of the class on which to get parents"), RetDoc("text list of parent class names"))   
)
PLearn::declareFunction ( "helpClassParentsHTML"  ,
&HelpSystem::helpClassParentsHTML  ,
(BodyDoc("HTML list of parent classes."), ArgDoc("classname","The name of the class on which to get parents"), RetDoc("HTML list of parent class names"))   
)
PLearn::declareFunction ( "listDerivedClasses"  ,
&HelpSystem::listDerivedClasses  ,
(BodyDoc("List of derived classes."), ArgDoc("classname","The name of the class on which to get children"), RetDoc("List of derived class names"))   
)
PLearn::declareFunction ( "helpDerivedClasses"  ,
&HelpSystem::helpDerivedClasses  ,
(BodyDoc("Text list of derived classes."), ArgDoc("classname","The name of the class on which to get children"), RetDoc("Text list of derived class names"))   
)
PLearn::declareFunction ( "helpDerivedClassesHTML"  ,
&HelpSystem::helpDerivedClassesHTML  ,
(BodyDoc("HTML list of derived classes."), ArgDoc("classname","The name of the class on which to get children"), RetDoc("HTML list of derived class names"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "KS_test"  ,
remote_KS_test,
(BodyDoc("Returns result of Kolmogorov-Smirnov test between 2 samples.\n"), ArgDoc("v1","Vec1: first distr."), ArgDoc("v2","Vec2: second distr."), ArgDoc("conv","precision"), RetDoc("tuple of (D, p-value)"))   
)
PLearn::declareFunction ( "KS_tests"  ,
remote_KS_tests,
(BodyDoc("Returns result of Kolmogorov-Smirnov test between 2 VMats, for each column.\n"), ArgDoc("m1","VMat1: first distr."), ArgDoc("m2","VMat2: second distr."), ArgDoc("conv","precision"), RetDoc("tuple of (Ds, p-values)"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "pl_repository_revision"  ,
pl_repository_revision,
(BodyDoc("Return a string giving the version-control repository revision(s)\n""with which this PLearn executable has been compiled.\n"))   
)
PLearn::declareFunction ( "listClassOptions"  ,
&HelpSystem::listClassOptions  ,
(BodyDoc("Returns a list of all options ""for the given class."), ArgDoc("classname","The name of the class ""on which to get option help"), RetDoc("vector of option names"))   
)
PLearn::declareFunction ( "listBuildOptions"  ,
&HelpSystem::listBuildOptions  ,
(BodyDoc("Returns a list of build options ""for the given class."), ArgDoc("classname","The name of the class ""on which to get option help"), RetDoc("vector of option names"))   
)
PLearn::declareFunction ( "helpOnOption"  ,
&HelpSystem::helpOnOption  ,
(BodyDoc("Will return full help for the option with ""the given name within the given class"), ArgDoc("classname","The name of the class ""on which to get option help"), ArgDoc("optionname","The name of the option on which to get help"), RetDoc("help text for the option"))   
)
PLearn::declareFunction ( "helpClassOptionsHTML"  ,
&HelpSystem::helpClassOptionsHTML  ,
(BodyDoc("Returns a list of all options ""for the given class as an HTML page."), ArgDoc("classname","The name of the class ""on which to get option help"), RetDoc("HTML list of option names"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "getDataSet"  ,
getDataSet,
(BodyDoc("Returns a VMat from a path to the corresponding file.\n"), ArgDoc("dataset_path","the path to the VMat file or directory"), RetDoc("corresponding VMat object"))   
)
PLearn::declareFunction ( "helpOnOptionHTML"  ,
&HelpSystem::helpOnOptionHTML  ,
(BodyDoc("Will return full HTML help for the option ""with the given name within the given class"), ArgDoc("classname","The name of the class ""on which to get option help"), ArgDoc("optionname","The name of the option on which to get help"), RetDoc("HTML help text for the option"))   
)
BEGIN_DECLARE_REMOTE_FUNCTIONS PLearn::declareFunction ( "solveLinearSystemByCholesky"  ,
remote_solveLinearSystemByCholesky,
(BodyDoc("Solve a linear regression problem using Cholesky ""decomposition."), ArgDoc("XtX","Result of X'X, where X is the input data matrix, with samples ""as rows. A constant input can be added to compute a bias term.""Weight decay can be added on the diagonal terms (that do not ""correspond to the constant input when a bias is computed)."), ArgDoc("XtY","Result of X'Y, where Y is the target data matrix, with samples "" as rows."), RetDoc("The weights W of the linear regression, s.t. XW ~= Y"))   
)
PLearn::declareFunction ( "listMethods"  ,
&HelpSystem::listMethods  ,
(BodyDoc("Returns a list of all registered methods ""for the given class as pairs of (methodname, nargs)"), ArgDoc("classname","The name of the class whose methods you want to list."), RetDoc("vector of method names"))   
)
template<class T , class R >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)()  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 178 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

Referenced by PLearn::VMatrix::declareMethods(), PLearn::VecStatsCollector::declareMethods(), PLearn::Variable::declareMethods(), PLearn::TreeDBNModule::declareMethods(), PLearn::TransformationLearner::declareMethods(), PLearn::StatsCollector::declareMethods(), PLearn::StackedAutoassociatorsNet::declareMethods(), PLearn::Splitter::declareMethods(), PLearn::RPPath::declareMethods(), PLearn::RBMTrainer::declareMethods(), PLearn::RBMSparse1DMatrixConnection::declareMethods(), PLearn::RBMModule::declareMethods(), PLearn::RBMLayer::declareMethods(), PLearn::RBMConnection::declareMethods(), PLearn::PTester::declareMethods(), PLearn::PLearner::declareMethods(), PLearn::PDistribution::declareMethods(), PLearn::ParentableObject::declareMethods(), PLearn::Optimizer::declareMethods(), PLearn::OnlineLearningModule::declareMethods(), PLearn::Object::declareMethods(), PLearn::NatGradSMPNNet::declareMethods(), PLearn::Kernel::declareMethods(), PLearn::InferenceRBM::declareMethods(), PLearn::HyperCommand::declareMethods(), PLearn::GaussianizeVMatrix::declareMethods(), PLearn::GaussianDistribution::declareMethods(), PLearn::EmbeddedLearner::declareMethods(), PLearn::DTWKernel::declareMethods(), PLearn::DiverseComponentAnalysis::declareMethods(), PLearn::DeepReconstructorNet::declareMethods(), PLearn::DeepBeliefNet::declareMethods(), and PLearn::Calendar::declareMethods().

{
    typedef RemoteTrampoline_0<T,R> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class R , class A1 >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)(A1)  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 207 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

{
    typedef RemoteTrampoline_1<T,R,A1> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

template<class T , class R , class A1 , class A2 , class A3 >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)(A1, A2, A3)  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 265 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

{
    typedef RemoteTrampoline_3<T,R,A1,A2,A3> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

template<class T , class R , class A1 , class A2 >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)(A1, A2)  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 236 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

{
    typedef RemoteTrampoline_2<T,R,A1,A2> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

template<class T , class R , class A1 , class A2 , class A3 , class A4 >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)(A1, A2, A3, A4)  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 294 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

{
    typedef RemoteTrampoline_4<T,R,A1,A2,A3,A4> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)(A1, A2, A3, A4, A5)  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 323 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

{
    typedef RemoteTrampoline_5<T,R,A1,A2,A3,A4,A5> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

template<class T , class R , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
void PLearn::declareMethod ( RemoteMethodMap &  rmm,
const string &  methodname,
R(T::*)(A1, A2, A3, A4, A5, A6)  method,
const RemoteMethodDoc &  doc,
const RemoteTrampoline::flag_t &  flgs = 0 
) [inline]

Definition at line 352 of file RemoteDeclareMethod.h.

References PLearn::RemoteMethodMap::insert(), and METHOD_UNCONST.

{
    typedef RemoteTrampoline_6<T,R,A1,A2,A3,A4,A5,A6> Trampoline;
    rmm.insert(methodname, Trampoline::expected_nargs,
               new Trampoline(methodname, doc, METHOD_UNCONST(method), flgs));
}

Here is the call graph for this function:

template<class ObjectType , class OptionType >
void PLearn::declareOption ( OptionList &  ol,
const string &  optionname,
OptionType ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Declare an individual option with a declareOptions() member function.

For flags, you should specify one of OptionBase::buildoption, OptionBase::learntoption or OptionBase::tuningoption If the option is not to be serialized, you can additionally specify OptionBase::nosave

The "type" printed in the help is given by TypeTraits<OptionType>::name(). The "default value" printed in optionHelp() will be a serialization of the value of the field in a default constructed instance, (which should be ok in most cases), unless you explicitly specify it as the last argument here (It is recomended that you *don't* specify it explicitly, unless you really must).

Parameters:
ollist to which this option should be appended
optionnamethe name of this option
member_ptr&YourClass::your_field
flagssee the flags in OptionBase
descriptiona description of the option
levelOption level (see OptionBase)
defaultvaldefault value for this option, as set by the default constructor

Definition at line 370 of file Option.h.

Referenced by PLearn::YMDDatedVMatrix::declareOptions(), PLearn::WPLS::declareOptions(), PLearn::WordNetSenseDictionary::declareOptions(), PLearn::WordNetFeatureSet::declareOptions(), PLearn::WeightedQuadraticPolynomialKernel::declareOptions(), PLearn::WeightedDistance::declareOptions(), PLearn::WeightedCostFunction::declareOptions(), PLearn::VVMatrix::declareOptions(), PLearn::VVec::declareOptions(), PLearn::VPLProcessor::declareOptions(), PLearn::VPLPreprocessedLearner2::declareOptions(), PLearn::VPLPreprocessedLearner::declareOptions(), PLearn::VPLCombinedLearner::declareOptions(), PLearn::VMatrixFromDistribution::declareOptions(), PLearn::VMatrix::declareOptions(), PLearn::PreprocessingVMatrix::declareOptions(), PLearn::VMatLanguage::declareOptions(), PLearn::VMatKernel::declareOptions(), PLearn::ViewSplitterVMatrix::declareOptions(), PLearn::VecStatsCollector::declareOptions(), PLearn::VecExtendedVMatrix::declareOptions(), PLearn::VecElementVariable::declareOptions(), PLearn::VecDictionary::declareOptions(), PLearn::VBoundDBN2::declareOptions(), PLearn::VarUtilsTest::declareOptions(), PLearn::VariablesTest::declareOptions(), PLearn::VariableSelectionWithDirectedGradientDescent::declareOptions(), PLearn::VariableDeletionVMatrix::declareOptions(), PLearn::ValueSelectRowsVMatrix::declareOptions(), PLearn::UniformVMatrix::declareOptions(), PLearn::UniformizeVMatrix::declareOptions(), PLearn::UniformizeLearner::declareOptions(), PLearn::UniformDistribution::declareOptions(), PLearn::UnfrozenDeepBeliefNet::declareOptions(), PLearn::UnfoldedSumOfVariable::declareOptions(), PLearn::UnfoldedFuncVariable::declareOptions(), PLearn::UnequalConstantVariable::declareOptions(), PLearn::UndirectedSoftmaxModule::declareOptions(), PLearn::UnaryVariable::declareOptions(), PLearn::UnaryHardSlopeVariable::declareOptions(), PLearn::UCISpecification::declareOptions(), PLearn::UCIDataVMatrix::declareOptions(), PLearn::TruncatedRealFunction::declareOptions(), PLearn::TreeDBNModule::declareOptions(), PLearn::TransformOutputLearner::declareOptions(), PLearn::TransformationLearner::declareOptions(), PLearn::TrainValidTestSplitter::declareOptions(), PLearn::TrainTestSplitter::declareOptions(), PLearn::Train::declareOptions(), PLearn::TorchLearner::declareOptions(), PLearn::TopDownAsymetricDeepNetwork::declareOptions(), PLearn::ToBagSplitter::declareOptions(), PLearn::ToBagClassifier::declareOptions(), PLearn::TMatTest::declareOptions(), PLearn::TimesConstantVariable::declareOptions(), PLearn::ThresholdedKernel::declareOptions(), PLearn::ThresholdBpropVariable::declareOptions(), PLearn::TextStreamVMatrix::declareOptions(), PLearn::TextSenseSequenceVMatrix::declareOptions(), PLearn::TextFilesVMatrix::declareOptions(), PLearn::TestMethod::declareOptions(), PLearn::TestLearner::declareOptions(), PLearn::TestInTrainSplitter::declareOptions(), PLearn::TestingLearner::declareOptions(), PLearn::TestImputations::declareOptions(), PLearn::TemporalHorizonVMatrix::declareOptions(), PLearn::Template::declareOptions(), PLearn::TargetEncodingLearner::declareOptions(), PLearn::TanhModule::declareOptions(), PLearn::TangentLearner::declareOptions(), PLearn::SymbolNode::declareOptions(), PLearn::SVMClassificationTorch::declareOptions(), PLearn::SurfaceTemplateLearner::declareOptions(), PLearn::SurfaceMesh::declareOptions(), PLearn::SupervisedDBN::declareOptions(), PLearn::Supersampling2DModule::declareOptions(), PLearn::SumVarianceOfLinearTransformedCategoricals::declareOptions(), PLearn::SumOverBagsVariable::declareOptions(), PLearn::SumOfVariable::declareOptions(), PLearn::SummationKernel::declareOptions(), PLearn::SubVMatrix::declareOptions(), PLearn::SubsamplingDBN::declareOptions(), PLearn::Subsampling2DModule::declareOptions(), PLearn::SubsampleVariable::declareOptions(), PLearn::SubMatVariable::declareOptions(), PLearn::SubMatTransposeVariable::declareOptions(), PLearn::SubInputVMatrix::declareOptions(), PLearn::StructuralLearner::declareOptions(), PLearn::StochasticBinarizeVMatrix::declareOptions(), PLearn::StepwiseSelectionOracle::declareOptions(), PLearn::QuantilesStatsIterator::declareOptions(), PLearn::LiftStatsIterator::declareOptions(), PLearn::SharpeRatioStatsIterator::declareOptions(), PLearn::StderrStatsIterator::declareOptions(), PLearn::StddevStatsIterator::declareOptions(), PLearn::ExpMeanStatsIterator::declareOptions(), PLearn::MeanStatsIterator::declareOptions(), PLearn::StatsIterator::declareOptions(), PLearn::StatsCollector::declareOptions(), PLearn::StatefulLearner::declareOptions(), PLearn::StackedSVDNet::declareOptions(), PLearn::StackedSplitter::declareOptions(), PLearn::StackedModulesModule::declareOptions(), PLearn::StackedModulesLearner::declareOptions(), PLearn::StackedLearner::declareOptions(), PLearn::StackedFocusedAutoassociatorsNet::declareOptions(), PLearn::StackedAutoassociatorsNet::declareOptions(), PLearn::StabilisationLearner::declareOptions(), PLearn::SquaredErrorCostFunction::declareOptions(), PLearn::SplitWiseValidationVMatrix::declareOptions(), PLearn::Splitter::declareOptions(), PLearn::SplitModule::declareOptions(), PLearn::SpiralDistribution::declareOptions(), PLearn::SpectralClustering::declareOptions(), PLearn::SparseIncrementalAffineTransformVariable::declareOptions(), PLearn::SourceVMatrixSplitter::declareOptions(), PLearn::SourceVMatrix::declareOptions(), PLearn::SourceVariable::declareOptions(), PLearn::SourceKernel::declareOptions(), PLearn::SortRowsVMatrix::declareOptions(), PLearn::SoftSlopeVariable::declareOptions(), PLearn::SoftSlopeIntegralVariable::declareOptions(), PLearn::SoftHistogramBinner::declareOptions(), PLearn::SigmoidPrimitiveKernel::declareOptions(), PLearn::SigmoidalKernel::declareOptions(), PLearn::ShuntingNNetLayerModule::declareOptions(), PLearn::ShuffleColumnsVMatrix::declareOptions(), PLearn::ShiftAndRescaleVMatrix::declareOptions(), PLearn::ShiftAndRescaleFeatureRealFunction::declareOptions(), PLearn::ShellScript::declareOptions(), PLearn::SetOption::declareOptions(), PLearn::SequentialValidation::declareOptions(), PLearn::SequentialSplitter::declareOptions(), PLearn::SequentialModelSelector::declareOptions(), PLearn::SequentialLearner::declareOptions(), PLearn::SeparateInputVMatrix::declareOptions(), PLearn::SemiSupervisedProbClassCostVariable::declareOptions(), PLearn::SemiSupervisedDBN::declareOptions(), PLearn::SelectSetsSplitter::declareOptions(), PLearn::SelectRowsVMatrix::declareOptions(), PLearn::SelectRowsMultiInstanceVMatrix::declareOptions(), PLearn::SelectRowsFileIndexVMatrix::declareOptions(), PLearn::SelectInputSubsetLearner::declareOptions(), PLearn::SelectedOutputCostFunction::declareOptions(), PLearn::SelectColumnsVMatrix::declareOptions(), PLearn::SecondIterationWrapper::declareOptions(), PLearn::ScoreLayerVariable::declareOptions(), PLearn::ScaleGradientModule::declareOptions(), PLearn::ScaledGeneralizedDistanceRBFKernel::declareOptions(), PLearn::ScaledGaussianKernel::declareOptions(), PLearn::ScaledConditionalCDFSmoother::declareOptions(), PLearn::SaltPepperNoiseVariable::declareOptions(), PLearn::RunObject::declareOptions(), PLearn::RPPath::declareOptions(), PLearn::RowsSubVMatrix::declareOptions(), PLearn::RowOfVariable::declareOptions(), PLearn::RowBufferedVMatrixTest::declareOptions(), PLearn::RowAtPositionVariable::declareOptions(), PLearn::ReshapeVariable::declareOptions(), PLearn::ReplicateSamplesVMatrix::declareOptions(), PLearn::RepeatVMatrix::declareOptions(), PLearn::RepeatSplitter::declareOptions(), PLearn::ReorderByMissingVMatrix::declareOptions(), PLearn::RemoveRowsVMatrix::declareOptions(), PLearn::RemoveDuplicateVMatrix::declareOptions(), PLearn::RemapLastColumnVMatrix::declareOptions(), PLearn::ReIndexedTargetVMatrix::declareOptions(), PLearn::ReIndexedTargetVariable::declareOptions(), PLearn::RegularGridVMatrix::declareOptions(), PLearn::RegressorFromDistribution::declareOptions(), PLearn::RegressionTreeRegisters::declareOptions(), PLearn::RegressionTreeQueue::declareOptions(), PLearn::RegressionTreeNode::declareOptions(), PLearn::RegressionTreeMulticlassLeaveProb::declareOptions(), PLearn::RegressionTreeMulticlassLeaveFast::declareOptions(), PLearn::RegressionTreeMulticlassLeave::declareOptions(), PLearn::RegressionTreeLeave::declareOptions(), PLearn::RegressionTree::declareOptions(), PLearn::Redirect::declareOptions(), PLearn::ReconstructionWeightsKernel::declareOptions(), PLearn::RealValueIndicatorFunction::declareOptions(), PLearn::RealRangeIndicatorFunction::declareOptions(), PLearn::RealMapping::declareOptions(), PLearn::RealFunctionsProcessedVMatrix::declareOptions(), PLearn::RealFunctionProduct::declareOptions(), PLearn::RealFunctionOfInputFeature::declareOptions(), PLearn::RealFunctionFromKernel::declareOptions(), PLearn::RealFunction::declareOptions(), PLearn::RBMWoodsLayer::declareOptions(), PLearn::RBMTrainer::declareOptions(), PLearn::RBMSparse1DMatrixConnection::declareOptions(), PLearn::RBMRateLayer::declareOptions(), PLearn::RBMQLParameters::declareOptions(), PLearn::RBMParameters::declareOptions(), PLearn::RBMMultitaskClassificationModule::declareOptions(), PLearn::RBMModule::declareOptions(), PLearn::RBMMixedLayer::declareOptions(), PLearn::RBMMixedConnection::declareOptions(), PLearn::RBMMatrixTransposeConnection::declareOptions(), PLearn::RBMMatrixConnectionNatGrad::declareOptions(), PLearn::RBMMatrixConnection::declareOptions(), PLearn::RBMLQParameters::declareOptions(), PLearn::RBMLocalMultinomialLayer::declareOptions(), PLearn::RBMLLParameters::declareOptions(), PLearn::RBMLayer::declareOptions(), PLearn::RBMLateralBinomialLayer::declareOptions(), PLearn::RBMJointLLParameters::declareOptions(), PLearn::RBMJointGenericParameters::declareOptions(), PLearn::RBMGenericParameters::declareOptions(), PLearn::RBMDistribution::declareOptions(), PLearn::RBMDiagonalMatrixConnection::declareOptions(), PLearn::RBMConv2DLLParameters::declareOptions(), PLearn::RBMConv2DConnection::declareOptions(), PLearn::RBMConnection::declareOptions(), PLearn::RBMClassificationModule::declareOptions(), PLearn::RationalQuadraticARDKernel::declareOptions(), PLearn::RankLearner::declareOptions(), PLearn::RankingFromKernel::declareOptions(), PLearn::RankedVMatrix::declareOptions(), PLearn::RangeVMatrix::declareOptions(), PLearn::RandomSamplesVMatrix::declareOptions(), PLearn::RandomSamplesFromVMatrix::declareOptions(), PLearn::RandomNeighborsDifferencesVMatrix::declareOptions(), PLearn::RandomGaussMix::declareOptions(), PLearn::RandomForcedValuesVariable::declareOptions(), PLearn::QuadraticUtilityCostFunction::declareOptions(), PLearn::PythonTableVMatrix::declareOptions(), PLearn::PythonProcessedVMatrix::declareOptions(), PLearn::PythonProcessedLearner::declareOptions(), PLearn::PythonFeatureSet::declareOptions(), PLearn::PythonCodeSnippet::declareOptions(), PLearn::PyPLearnScript::declareOptions(), PLearn::PvGradNNet::declareOptions(), PLearn::PutSubVMatrix::declareOptions(), PLearn::PTimer::declareOptions(), PLearn::PTest::declareOptions(), PLearn::PseudolikelihoodRBM::declareOptions(), PLearn::PruningLinearRegressor::declareOptions(), PLearn::ProcessSymbolicSequenceVMatrix::declareOptions(), PLearn::ProcessInputCostModule::declareOptions(), PLearn::ProcessingVMatrix::declareOptions(), PLearn::ProcessDatasetVMatrix::declareOptions(), PLearn::ProbabilityPairsVariable::declareOptions(), PLearn::ProbabilityPairsInverseVariable::declareOptions(), PLearn::PricingTransactionPairProfitFunction::declareOptions(), PLearn::Preprocessing::declareOptions(), PLearn::PrecomputedVMatrix::declareOptions(), PLearn::PrecomputedProcessedLearner::declareOptions(), PLearn::PrecomputedKernel::declareOptions(), PLearn::PRandom::declareOptions(), PLearn::PowVariable::declareOptions(), PLearn::PowDistanceKernel::declareOptions(), PLearn::PotentialsVariable::declareOptions(), PLearn::PolynomialKernel::declareOptions(), PLearn::PlusConstantVariable::declareOptions(), PLearn::PLS::declareOptions(), PLearn::PLMathTest::declareOptions(), PLearn::PLearnerOutputVMatrix::declareOptions(), PLearn::PLearnerDiagonalKernel::declareOptions(), PLearn::PLearner::declareOptions(), PLearn::PLearnDiff::declareOptions(), PLearn::PTester::declareOptions(), PLearn::PDistributionVariable::declareOptions(), PLearn::PDistribution::declareOptions(), PLearn::PConditionalDistribution::declareOptions(), PLearn::PCA::declareOptions(), PLearn::ParzenWindow::declareOptions(), PLearn::PartSupervisedDBN::declareOptions(), PLearn::PartsDistanceKernel::declareOptions(), PLearn::PairsVMatrix::declareOptions(), PLearn::OracleObjectGenerator::declareOptions(), PLearn::Optimizer::declareOptions(), PLearn::OptimizeOptionOracle::declareOptions(), PLearn::OnlineLearningModule::declareOptions(), PLearn::OnlineGramNaturalGradientOptimizer::declareOptions(), PLearn::OneHotVMatrix::declareOptions(), PLearn::OneHotVariable::declareOptions(), PLearn::OneHotSquaredLoss::declareOptions(), PLearn::OnBagsModule::declareOptions(), PLearn::ObservationWindow::declareOptions(), PLearn::Z::declareOptions(), PLearn::X::declareOptions(), PLearn::ObjectGenerator::declareOptions(), PLearn::NxProfileLearner::declareOptions(), PLearn::NormalizedDotProductKernel::declareOptions(), PLearn::NormalizationLearner::declareOptions(), PLearn::NonLocalManifoldParzenKernel::declareOptions(), PLearn::NonLocalManifoldParzen::declareOptions(), PLearn::NoBpropVariable::declareOptions(), PLearn::NnlmWordRepresentationLayer::declareOptions(), PLearn::NnlmOutputLayer::declareOptions(), PLearn::NnlmOnlineLearner::declareOptions(), PLearn::NNet::declareOptions(), PLearn::NLLNeighborhoodWeightsVariable::declareOptions(), PLearn::NGramTree::declareOptions(), PLearn::NGramDistribution::declareOptions(), PLearn::NeuralProbabilisticLanguageModel::declareOptions(), PLearn::NeuralNet::declareOptions(), PLearn::NetworkModule::declareOptions(), PLearn::NetworkConnection::declareOptions(), PLearn::NetflixVMatrix::declareOptions(), PLearn::NeighborhoodSmoothnessNNet::declareOptions(), PLearn::NeighborhoodImputationVMatrix::declareOptions(), PLearn::NeighborhoodConditionalMean::declareOptions(), PLearn::NeighborhoodBoxVolumeDensityEstimator::declareOptions(), PLearn::NegLogProbCostFunction::declareOptions(), PLearn::NegKernel::declareOptions(), PLearn::NegCrossEntropySigmoidVariable::declareOptions(), PLearn::NearestNeighborPredictionCost::declareOptions(), PLearn::NatGradSMPNNet::declareOptions(), PLearn::NatGradNNet::declareOptions(), PLearn::NatGradEstimator::declareOptions(), PLearn::NaryVariable::declareOptions(), PLearn::MultiToUniInstanceSelectRandomVMatrix::declareOptions(), PLearn::MultiTaskSeparationSplitter::declareOptions(), PLearn::MultiTargetOneHotVMatrix::declareOptions(), PLearn::MultiSampleVariable::declareOptions(), PLearn::MultiMaxVariable::declareOptions(), PLearn::MultiInstanceVMatrix::declareOptions(), PLearn::MultiInstanceNNet::declareOptions(), PLearn::MultiClassAdaBoost::declareOptions(), PLearn::MovingAverageVMatrix::declareOptions(), PLearn::MovingAverage::declareOptions(), PLearn::MoleculeTemplateLearner::declareOptions(), PLearn::MoleculeTemplate::declareOptions(), PLearn::Molecule::declareOptions(), PLearn::ModuleTester::declareOptions(), PLearn::ModuleStackModule::declareOptions(), PLearn::ModulesLearner::declareOptions(), PLearn::ModuleLearner::declareOptions(), PLearn::mNNet::declareOptions(), PLearn::MixUnlabeledNeighbourVMatrix::declareOptions(), PLearn::MixtureVMatrix::declareOptions(), PLearn::MixtureDistribution::declareOptions(), PLearn::MissingInstructionVMatrix::declareOptions(), PLearn::MissingIndicatorVMatrix::declareOptions(), PLearn::MeshVertex::declareOptions(), PLearn::MeshMatch::declareOptions(), PLearn::MeshGraph::declareOptions(), PLearn::MeshFace::declareOptions(), PLearn::MeshEdge::declareOptions(), PLearn::MergeDond2Files::declareOptions(), PLearn::MemoryVMatrix::declareOptions(), PLearn::MemoryStressTest::declareOptions(), PLearn::MemoryCachedKernel::declareOptions(), PLearn::MeanMedianModeImputationVMatrix::declareOptions(), PLearn::MeanImputationVMatrix::declareOptions(), PLearn::MaxSubsamplingTest::declareOptions(), PLearn::MaxSubsampling2DModule::declareOptions(), PLearn::MatRowVariable::declareOptions(), PLearn::MatrixSumOfVariable::declareOptions(), PLearn::MatrixOneHotSquaredLoss::declareOptions(), PLearn::MatrixModule::declareOptions(), PLearn::MatrixElementsVariable::declareOptions(), PLearn::Matern1ARDKernel::declareOptions(), PLearn::MarginPerceptronCostVariable::declareOptions(), PLearn::ManualBinner::declareOptions(), PLearn::ManifoldParzenKernel::declareOptions(), PLearn::ManifoldParzen2::declareOptions(), PLearn::ManifoldParzen::declareOptions(), PLearn::ManifoldKNNDistribution::declareOptions(), PLearn::LogOfGaussianDensityKernel::declareOptions(), PLearn::LogAddVariable::declareOptions(), PLearn::LocalNeighborsDifferencesVMatrix::declareOptions(), PLearn::LocalMedBoost::declareOptions(), PLearn::LocallyWeightedDistribution::declareOptions(), PLearn::LocallyPrecomputedVMatrix::declareOptions(), PLearn::LocallyMagnifiedDistribution::declareOptions(), PLearn::LocalizedFeaturesLayerVariable::declareOptions(), PLearn::LocalGaussianClassifier::declareOptions(), PLearn::LLEKernel::declareOptions(), PLearn::LLE::declareOptions(), PLearn::LLC::declareOptions(), PLearn::LinearRegressor::declareOptions(), PLearn::LinearInductiveTransferClassifier::declareOptions(), PLearn::LinearFilterModule::declareOptions(), PLearn::LinearCombinationOfScalarVariables::declareOptions(), PLearn::LinearCombinationModule::declareOptions(), PLearn::LiftStatsCollector::declareOptions(), PLearn::LiftBinaryCostFunction::declareOptions(), PLearn::LIBSVMSparseVMatrix::declareOptions(), PLearn::LemmatizeVMatrix::declareOptions(), PLearn::LearnerProcessedVMatrix::declareOptions(), PLearn::Learner::declareOptions(), PLearn::LayerCostModule::declareOptions(), PLearn::LaplacianKernel::declareOptions(), PLearn::KroneckerBaseKernel::declareOptions(), PLearn::KPCATangentLearner::declareOptions(), PLearn::KNNVMatrix::declareOptions(), PLearn::KNNRegressor::declareOptions(), PLearn::KNNImputationVMatrix::declareOptions(), PLearn::KNNClassifier::declareOptions(), PLearn::KMeansClustering::declareOptions(), PLearn::KLp0p1RBMModule::declareOptions(), PLearn::KFoldSplitter::declareOptions(), PLearn::KFoldLogisticClassifier::declareOptions(), PLearn::KernelVMatrix::declareOptions(), PLearn::KernelRidgeRegressor::declareOptions(), PLearn::KernelProjection::declareOptions(), PLearn::KernelPCA::declareOptions(), PLearn::KernelDensityEstimator::declareOptions(), PLearn::Kernel::declareOptions(), PLearn::JoinVMatrix::declareOptions(), PLearn::IsomapTangentLearner::declareOptions(), PLearn::Isomap::declareOptions(), PLearn::IsMissingVariable::declareOptions(), PLearn::IsAboveThresholdVariable::declareOptions(), PLearn::InterleaveVMatrix::declareOptions(), PLearn::InfiniteMNISTVMatrix::declareOptions(), PLearn::InferenceRBM::declareOptions(), PLearn::IndexedVMatrixTest::declareOptions(), PLearn::IndexedVMatrix::declareOptions(), PLearn::IndexAtPositionVariable::declareOptions(), PLearn::IncrementalNNet::declareOptions(), PLearn::ImputationVMatrix::declareOptions(), PLearn::IIDNoiseKernel::declareOptions(), PLearn::ICP::declareOptions(), PLearn::HyperSetOption::declareOptions(), PLearn::HyperRetrain::declareOptions(), PLearn::HyperOptimize::declareOptions(), PLearn::HyperLearner::declareOptions(), PLearn::HyperCommand::declareOptions(), PLearn::HTMLHelpGenerator::declareOptions(), PLearn::HTMLHelpConfig::declareOptions(), PLearn::HorizonStatefulLearner::declareOptions(), PLearn::HistogramDistribution::declareOptions(), PLearn::HintonDeepBeliefNet::declareOptions(), PLearn::HeterogenuousAffineTransformWeightPenalty::declareOptions(), PLearn::HeterogenuousAffineTransformVariable::declareOptions(), PLearn::HeapTest::declareOptions(), PLearn::HashMapFeatureSet::declareOptions(), PLearn::GraphicalBiText::declareOptions(), PLearn::Grapher::declareOptions(), PLearn::GramVMatrix::declareOptions(), PLearn::GradNNetLayerModule::declareOptions(), PLearn::GradientOptimizer::declareOptions(), PLearn::GradientCorrector::declareOptions(), PLearn::GeodesicDistanceKernel::declareOptions(), PLearn::GenericNearestNeighbors::declareOptions(), PLearn::GenerateDecisionPlot::declareOptions(), PLearn::GeneralizedOneHotVMatrix::declareOptions(), PLearn::GeneralizedDistanceRBFKernel::declareOptions(), PLearn::GaussPartSupervisedDBN::declareOptions(), PLearn::GaussMixLocalProjections::declareOptions(), PLearn::GaussMix::declareOptions(), PLearn::GaussianProcessRegressor::declareOptions(), PLearn::GaussianProcessNLLVariable::declareOptions(), PLearn::GaussianKernel::declareOptions(), PLearn::GaussianizeVMatrix::declareOptions(), PLearn::GaussianDistribution::declareOptions(), PLearn::GaussianDensityKernel::declareOptions(), PLearn::GaussianDBNRegression::declareOptions(), PLearn::GaussianDBNClassification::declareOptions(), PLearn::GaussianContinuumDistribution::declareOptions(), PLearn::GaussianContinuum::declareOptions(), PLearn::Function::declareOptions(), PLearn::FractionSplitter::declareOptions(), PLearn::ForwardVMatrix::declareOptions(), PLearn::ForwardModule::declareOptions(), PLearn::FNetLayerVariable::declareOptions(), PLearn::FixDond2BinaryVariables::declareOptions(), PLearn::FinancePreprocVMatrix::declareOptions(), PLearn::FilterSplitter::declareOptions(), PLearn::FilteredVMatrix::declareOptions(), PLearn::FileVMatrix::declareOptions(), PLearn::FileDictionary::declareOptions(), PLearn::FeatureSetSequentialCRF::declareOptions(), PLearn::FeatureSetNNet::declareOptions(), PLearn::FeatureSetNaiveBayesClassifier::declareOptions(), PLearn::ExtractNNetParamsVMatrix::declareOptions(), PLearn::ExtendedVMatrix::declareOptions(), PLearn::ExtendedVariable::declareOptions(), PLearn::ExplicitSplitter::declareOptions(), PLearn::ExplicitListOracle::declareOptions(), PLearn::Experimentation::declareOptions(), PLearn::Experiment::declareOptions(), PLearn::ExhaustiveNearestNeighbors::declareOptions(), PLearn::EqualConstantVariable::declareOptions(), PLearn::EpanechnikovKernel::declareOptions(), PLearn::EntropyContrastLearner::declareOptions(), PLearn::EntropyContrast::declareOptions(), PLearn::EncodedVMatrix::declareOptions(), PLearn::EmbeddedSequentialLearner::declareOptions(), PLearn::EmbeddedLearner::declareOptions(), PLearn::ElementAtPositionVariable::declareOptions(), PLearn::EarlyStoppingOracle::declareOptions(), PLearn::DynamicallyLinkedRBMsModel::declareOptions(), PLearn::DuplicateScalarVariable::declareOptions(), PLearn::DuplicateRowVariable::declareOptions(), PLearn::DuplicateColumnVariable::declareOptions(), PLearn::DTWKernel::declareOptions(), PLearn::DivisiveNormalizationKernel::declareOptions(), PLearn::DiverseComponentAnalysis::declareOptions(), PLearn::Distribution::declareOptions(), PLearn::DistRepNNet::declareOptions(), PLearn::DistanceKernel::declareOptions(), PLearn::DisregardRowsVMatrix::declareOptions(), PLearn::DiskVMatrix::declareOptions(), PLearn::DiscriminativeRBM::declareOptions(), PLearn::DiscriminativeDeepBeliefNet::declareOptions(), PLearn::DictionaryVMatrix::declareOptions(), PLearn::Dictionary::declareOptions(), PLearn::DichotomizeVMatrix::declareOptions(), PLearn::DichotomizeDond2DiscreteVariables::declareOptions(), PLearn::DenoisingRecurrentNet::declareOptions(), PLearn::DeepReconstructorNet::declareOptions(), PLearn::DeepNonLocalManifoldParzen::declareOptions(), PLearn::DeepNNet::declareOptions(), PLearn::DeepFeatureExtractorNNet::declareOptions(), PLearn::DeepBeliefNet::declareOptions(), PLearn::DBSplitter::declareOptions(), PLearn::DatedJoinVMatrix::declareOptions(), PLearn::CutBelowThresholdVariable::declareOptions(), PLearn::CutAboveThresholdVariable::declareOptions(), PLearn::CumVMatrix::declareOptions(), PLearn::CubicSpline::declareOptions(), PLearn::CrossReferenceVMatrix::declareOptions(), PLearn::CovariancePreservationImputationVMatrix::declareOptions(), PLearn::Cov2CorrVariable::declareOptions(), PLearn::CostModule::declareOptions(), PLearn::Correspondence::declareOptions(), PLearn::CorrelationProfiler::declareOptions(), PLearn::CorrelationKernel::declareOptions(), PLearn::Convolution2DModule::declareOptions(), PLearn::ConvexBasisKernel::declareOptions(), PLearn::Variable::declareOptions(), PLearn::ConstrainedSourceVariable::declareOptions(), PLearn::ConstantVMatrix::declareOptions(), PLearn::ConstantRegressor::declareOptions(), PLearn::ConstantRealFunction::declareOptions(), PLearn::ConjRosenbrock::declareOptions(), PLearn::ConjGradientOptimizer::declareOptions(), PLearn::ConditionalStatsCollector::declareOptions(), PLearn::ConditionalMeanImputationVMatrix::declareOptions(), PLearn::ConditionalGaussianDistribution::declareOptions(), PLearn::ConditionalDictionary::declareOptions(), PLearn::ConditionalDensityNet::declareOptions(), PLearn::ConditionalCDFSmoother::declareOptions(), PLearn::ConcatSetsSplitter::declareOptions(), PLearn::ConcatRowsVMatrix::declareOptions(), PLearn::ConcatRowsSubVMatrix::declareOptions(), PLearn::ConcatOfVariable::declareOptions(), PLearn::ConcatDisjointFeatureSet::declareOptions(), PLearn::ConcatColumnsVMatrix::declareOptions(), PLearn::ComputeDond2Target::declareOptions(), PLearn::CompareLearner::declareOptions(), PLearn::CompactVMatrixPolynomialKernel::declareOptions(), PLearn::CompactVMatrixGaussianKernel::declareOptions(), PLearn::CompactFileVMatrix::declareOptions(), PLearn::CombiningCostsModule::declareOptions(), PLearn::ClassSubsetVMatrix::declareOptions(), PLearn::ClassSeparationSplitter::declareOptions(), PLearn::ClassMarginCostFunction::declareOptions(), PLearn::ClassifierFromDensity::declareOptions(), PLearn::ClassifierFromConditionalPDistribution::declareOptions(), PLearn::ClassErrorCostModule::declareOptions(), PLearn::ClassErrorCostFunction::declareOptions(), PLearn::ChemicalICP::declareOptions(), PLearn::CheckDond2FileSequence::declareOptions(), PLearn::ChainedLearners::declareOptions(), PLearn::CenteredVMatrix::declareOptions(), PLearn::CCCostVariable::declareOptions(), PLearn::CartesianProductOracle::declareOptions(), PLearn::Calendar::declareOptions(), PLearn::CachedFeatureSet::declareOptions(), PLearn::BootstrapVMatrix::declareOptions(), PLearn::BootstrapSplitter::declareOptions(), PLearn::BinSplitter::declareOptions(), PLearn::BinaryVariable::declareOptions(), PLearn::BinaryStump::declareOptions(), PLearn::BinaryOpVMatrix::declareOptions(), PLearn::BinaryNumbersVMatrix::declareOptions(), PLearn::BinaryKernelDiscrimination::declareOptions(), PLearn::BinaryClassificationLossVariable::declareOptions(), PLearn::BinaryBallTree::declareOptions(), PLearn::BinarizeModule::declareOptions(), PLearn::BetaKernel::declareOptions(), PLearn::BestAveragingPLearner::declareOptions(), PLearn::BernoulliSampleVariable::declareOptions(), PLearn::BatchVMatrix::declareOptions(), PLearn::BasisSelectionRegressor::declareOptions(), PLearn::BaseRegressorWrapper::declareOptions(), PLearn::BaseRegressorConfidence::declareOptions(), PLearn::BallTreeNearestNeighbors::declareOptions(), PLearn::BaggingLearner::declareOptions(), PLearn::BackConvolution2DModule::declareOptions(), PLearn::AutoVMatrix::declareOptions(), PLearn::AutoScaledGradientOptimizer::declareOptions(), PLearn::AutoLinearRegressor::declareOptions(), PLearn::AsciiVMatrix::declareOptions(), PLearn::ARDBaseKernel::declareOptions(), PLearn::AppendNeighborsVMatrix::declareOptions(), PLearn::AnalyzeFieldStats::declareOptions(), PLearn::AnalyzeDond2DiscreteVariables::declareOptions(), PLearn::AffineTransformWeightPenalty::declareOptions(), PLearn::AffineTransformVariable::declareOptions(), PLearn::AddMissingVMatrix::declareOptions(), PLearn::AddLayersNNet::declareOptions(), PLearn::AdditiveNormalizationKernel::declareOptions(), PLearn::AdditiveGaussianNoiseVariable::declareOptions(), PLearn::AddCostToLearner::declareOptions(), PLearn::AddBagInformationVMatrix::declareOptions(), PLearn::AdaptGradientOptimizer::declareOptions(), and PLearn::AdaBoost::declareOptions().

{
    ol.push_back(new Option<ObjectType, OptionType>(optionname, member_ptr, flags, 
                                                    TypeTraits<OptionType>::name(), 
                                                    defaultval, description, level));
}
template<class ObjectType , class OptionType >
void PLearn::declareOption ( OptionList &  ol,
const string &  optionname,
OptionType *ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Definition at line 386 of file Option.h.

{
    ol.push_back(new Option<ObjectType, OptionType *>(optionname, member_ptr, flags,
                                                      TypeTraits<OptionType *>::name(), 
                                                      defaultval, description, level));
}
template<class ObjectType , class VecElementType >
void PLearn::declareOption ( OptionList &  ol,
const string &  optionname,
TVec< VecElementType > ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Definition at line 437 of file Option.h.

{
    ol.push_back(new TVecOption<ObjectType, VecElementType>(
                     optionname, member_ptr, flags,
                     TypeTraits< TVec<VecElementType> >::name(),
                     defaultval, description, level));
}
template<class OptionType >
void PLearn::declareStaticOption ( OptionList &  ol,
const string &  optionname,
OptionType *  ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Overload for pointer to static member.

Note that the code to declare static options has not been thoroughly tested and thus may contain some bugs (especially with the Python interface). Use at your own risk!

Parameters:
ollist to which this option should be appended
optionnamethe name of this option
ptr&YourClass::your_static_field
flagssee the flags in OptionBase
descriptiona description of the option
levelOption level (see OptionBase)
defaultvaldefault value for this option, as set by the default constructor

Definition at line 404 of file Option.h.

Referenced by PLearn::RegressionTree::declareOptions(), PLearn::RegressionTreeLeave::declareOptions(), and PLearn::RegressionTreeNode::declareOptions().

{
    ol.push_back(new StaticOption<OptionType>(optionname, ptr, flags, 
                                                    TypeTraits<OptionType>::name(), 
                                                    defaultval, description, level));
}

Here is the caller graph for this function:

template<class VecElementType >
void PLearn::declareStaticOption ( OptionList &  ol,
const string &  optionname,
TVec< VecElementType > *  ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]
Parameters:
ollist to which this option should be appended
optionnamethe name of this option
ptr&YourClass::your_static_field
flagssee the flags in OptionBase
descriptiona description of the option
levelOption level (see OptionBase)
defaultvaldefault value for this option, as set by the default constructor

Definition at line 419 of file Option.h.

{
    ol.push_back(new TVecStaticOption<VecElementType>(
                     optionname, ptr, flags, 
                     TypeTraits< TVec<VecElementType> >::name(), 
                     defaultval, description, level));
}
template<class T >
T* PLearn::deepCopy ( PP< T >  source,
CopiesMap &  copies 
)

A simple template function.

Definition at line 229 of file PP.h.

References deepCopy().

{ return deepCopy((T*)source, copies); }

Here is the call graph for this function:

template<class T >
T* PLearn::deepCopy ( PP< T >  source) [inline]

This function simply calls the previous one with an initially empty map.

makes a copie of the PP with all it's fields, respecting the dependance shceme between elements and without allowing double copies of equal elements.

< create empty map

Definition at line 238 of file PP.h.

References deepCopy(), and PLearn::PP< T >::isNull().

{ 
    if (source.isNull()) return NULL;

    CopiesMap copies; 
    return deepCopy(source, copies);
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::deepCopy ( const TVec< T > &  source) [inline]

< create empty map

Definition at line 80 of file TVec_impl.h.

References deepCopy().

{ 
    CopiesMap copies; 
    return deepCopy(source, copies);
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::deepCopy ( const TVec< T > &  source,
CopiesMap &  copies 
) [inline]

Definition at line 87 of file TVec_impl.h.

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

{ 
    return source.deepCopy(copies);
}

Here is the call graph for this function:

template<class T >
T* PLearn::deepCopy ( const T *  source) [inline]

This function simply calls the previous one with an initially empty map.

< create empty map

Definition at line 246 of file CopiesMap.h.

References deepCopy().

{ 
    CopiesMap copies; 
    return deepCopy(source, copies);
}

Here is the call graph for this function:

template<class T >
T* PLearn::deepCopy ( const T *  source,
CopiesMap &  copies 
)
template<class T >
TMat<T> PLearn::deepCopy ( const TMat< T >  source,
CopiesMap  copies 
) [inline]

Definition at line 719 of file TMat_impl.h.

References PLearn::TMat< T >::deepCopy().

{ return source.deepCopy(copies); }

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::deepCopy ( const TMat< T >  source) [inline]

< create empty map

Definition at line 712 of file TMat_impl.h.

References deepCopy().

{
    CopiesMap copies; 
    return deepCopy(source, copies);
}

Here is the call graph for this function:

template<class T , class Compare , class Alloc >
void PLearn::deepCopyField ( multiset< T, Compare, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 194 of file CopiesMap.h.

References deepCopyField().

{
    for (typename multiset<T,Compare,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<class T >
void PLearn::deepCopyField ( PP< T > &  field,
CopiesMap &  copies 
) [inline]

Any pointer or smart pointer: call deepCopy()

Definition at line 211 of file PP.h.

References PLWARNING.

{
    if (field) {
        // Check the usage of the object pointed by 'field': it should be > 1,
        // because 'field' is a shallow copy. However, it *could* happen that it
        // is only 1, if the object that pointed to the same object has been deleted.
        // Since this is usually not wanted, we display a warning if this happens.
        // Indeed, there is a risk of this causing trouble, because the 'copies' map
        // may contain invalid mappings refering to now deleted objects.
        if (field->usage() == 1)
            PLWARNING("In deepCopyField(PP<T>& field, ...) - The usage() of the underlying object is only 1, this is unusual\n"
                      "( Did you call inherited::makeDeepCopyFromShallowCopy twice?  You can't. )");
        field = field->deepCopy(copies);
    }
}
template<class T , class U , class Compare , class Alloc >
void PLearn::deepCopyField ( multimap< T, U, Compare, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 178 of file CopiesMap.h.

References deepCopyField().

{
    for (typename multimap<T,U,Compare,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<class T , class Alloc >
void PLearn::deepCopyField ( list< T, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 202 of file CopiesMap.h.

References deepCopyField().

{
    for (typename list<T,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<class T , class Compare , class Alloc >
void PLearn::deepCopyField ( set< T, Compare, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 186 of file CopiesMap.h.

References deepCopyField().

{
    for (typename set<T,Compare,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<class T >
void PLearn::deepCopyField ( T &  ,
CopiesMap &   
) [inline]

Any type not handled below: do nothing.

no op

Definition at line 221 of file CopiesMap.h.

References PLWARNING.

{
    PLWARNING(
        "In CopiesMap.h - deepCopyField not handled for the type '%s'. "
        "If it actually doesn't need deep copy, edit CopiesMap.h and add"
        " NODEEPCOPY(your_type) to remove this warning.",
        TypeTraits<T>().name().c_str()
        );
}
template<class T >
void PLearn::deepCopyField ( TVec< T > &  field,
CopiesMap &  copies 
) [inline]

Definition at line 93 of file TVec_impl.h.

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

{
    field.makeDeepCopyFromShallowCopy(copies);
}

Here is the call graph for this function:

template<>
void PLearn::deepCopyField ( VMat &  field,
CopiesMap &  copies 
)

Definition at line 119 of file VMat.cc.

{
    if (field)
        field = static_cast<VMatrix*>(field->deepCopy(copies));
}
template<class T , class Alloc >
void PLearn::deepCopyField ( vector< T, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 210 of file CopiesMap.h.

References deepCopyField().

{
    for (typename vector<T,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<class T >
void PLearn::deepCopyField ( T *&  field,
CopiesMap &  copies 
) [inline]

Definition at line 233 of file CopiesMap.h.

{
    if (field)
        field = field->deepCopy(copies);
}
template<>
void PLearn::deepCopyField ( Ker &  field,
CopiesMap &  copies 
) [inline]

Definition at line 291 of file Kernel.h.

{
    if (field)
        field = static_cast<Kernel*>(field->deepCopy(copies));
}
template<class T >
void PLearn::deepCopyField ( Array< T > &  field,
CopiesMap &  copies 
) [inline]

Definition at line 86 of file Array_impl.h.

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

Referenced by PLearn::VMatAccessBuffer::deepCopy(), PLearn::Storage< PP< RegressionTreeNode > >::deepCopy(), deepCopyField(), PLearn::WPLS::makeDeepCopyFromShallowCopy(), PLearn::WordNetSenseDictionary::makeDeepCopyFromShallowCopy(), PLearn::WeightedCostFunction::makeDeepCopyFromShallowCopy(), PLearn::VVMatrix::makeDeepCopyFromShallowCopy(), PLearn::VPLProcessor::makeDeepCopyFromShallowCopy(), PLearn::VPLPreprocessedLearner2::makeDeepCopyFromShallowCopy(), PLearn::VPLPreprocessedLearner::makeDeepCopyFromShallowCopy(), PLearn::VPLCombinedLearner::makeDeepCopyFromShallowCopy(), PLearn::VMatrix::makeDeepCopyFromShallowCopy(), PLearn::VMatLanguage::makeDeepCopyFromShallowCopy(), PLearn::VMatKernel::makeDeepCopyFromShallowCopy(), PLearn::VecStatsCollector::makeDeepCopyFromShallowCopy(), PLearn::VecElementVariable::makeDeepCopyFromShallowCopy(), PLearn::VecDictionary::makeDeepCopyFromShallowCopy(), PLearn::VBoundDBN2::makeDeepCopyFromShallowCopy(), PLearn::VariableSelectionWithDirectedGradientDescent::makeDeepCopyFromShallowCopy(), PLearn::VariableDeletionVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Variable::makeDeepCopyFromShallowCopy(), PLearn::ValueSelectRowsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::UniformizeVMatrix::makeDeepCopyFromShallowCopy(), PLearn::UniformizeLearner::makeDeepCopyFromShallowCopy(), PLearn::UnfoldedSumOfVariable::makeDeepCopyFromShallowCopy(), PLearn::UnfoldedFuncVariable::makeDeepCopyFromShallowCopy(), PLearn::UndirectedSoftmaxModule::makeDeepCopyFromShallowCopy(), PLearn::TVec< T >::makeDeepCopyFromShallowCopy(), PLearn::TreeDBNModule::makeDeepCopyFromShallowCopy(), PLearn::TrainTestSplitter::makeDeepCopyFromShallowCopy(), PLearn::TopDownAsymetricDeepNetwork::makeDeepCopyFromShallowCopy(), PLearn::ToBagSplitter::makeDeepCopyFromShallowCopy(), PLearn::ToBagClassifier::makeDeepCopyFromShallowCopy(), PLearn::TMat< T >::makeDeepCopyFromShallowCopy(), PLearn::ThresholdedKernel::makeDeepCopyFromShallowCopy(), PLearn::TextSenseSequenceVMatrix::makeDeepCopyFromShallowCopy(), PLearn::TestImputations::makeDeepCopyFromShallowCopy(), PLearn::TemporaryDiskVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Template::makeDeepCopyFromShallowCopy(), PLearn::TangentLearner::makeDeepCopyFromShallowCopy(), PLearn::SymbolNode::makeDeepCopyFromShallowCopy(), PLearn::SurfaceTemplateLearner::makeDeepCopyFromShallowCopy(), PLearn::SupervisedDBN::makeDeepCopyFromShallowCopy(), PLearn::Supersampling2DModule::makeDeepCopyFromShallowCopy(), PLearn::SumVarianceOfLinearTransformedCategoricals::makeDeepCopyFromShallowCopy(), PLearn::SumVarianceOfLinearTransformedBernoullis::makeDeepCopyFromShallowCopy(), PLearn::SumOverBagsVariable::makeDeepCopyFromShallowCopy(), PLearn::SumOfVariable::makeDeepCopyFromShallowCopy(), PLearn::SummationKernel::makeDeepCopyFromShallowCopy(), PLearn::SubsamplingDBN::makeDeepCopyFromShallowCopy(), PLearn::Subsampling2DModule::makeDeepCopyFromShallowCopy(), PLearn::StructuralLearner::makeDeepCopyFromShallowCopy(), PLearn::StepwiseSelectionOracle::makeDeepCopyFromShallowCopy(), PLearn::QuantilesStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::LiftStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::SharpeRatioStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StderrStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StddevStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StackedSVDNet::makeDeepCopyFromShallowCopy(), PLearn::StackedModulesModule::makeDeepCopyFromShallowCopy(), PLearn::StackedModulesLearner::makeDeepCopyFromShallowCopy(), PLearn::StackedLearner::makeDeepCopyFromShallowCopy(), PLearn::StackedFocusedAutoassociatorsNet::makeDeepCopyFromShallowCopy(), PLearn::StackedAutoassociatorsNet::makeDeepCopyFromShallowCopy(), PLearn::SplitWiseValidationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Splitter::makeDeepCopyFromShallowCopy(), PLearn::SplitModule::makeDeepCopyFromShallowCopy(), PLearn::SparseIncrementalAffineTransformVariable::makeDeepCopyFromShallowCopy(), PLearn::SourceVMatrix::makeDeepCopyFromShallowCopy(), PLearn::SourceVariable::makeDeepCopyFromShallowCopy(), PLearn::SourceKernel::makeDeepCopyFromShallowCopy(), PLearn::SortRowsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ShuntingNNetLayerModule::makeDeepCopyFromShallowCopy(), PLearn::ShiftAndRescaleVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ShellScript::makeDeepCopyFromShallowCopy(), PLearn::SequentialValidation::makeDeepCopyFromShallowCopy(), PLearn::SequentialModelSelector::makeDeepCopyFromShallowCopy(), PLearn::SequentialLearner::makeDeepCopyFromShallowCopy(), PLearn::SelectSetsSplitter::makeDeepCopyFromShallowCopy(), PLearn::SelectRowsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::SelectRowsMultiInstanceVMatrix::makeDeepCopyFromShallowCopy(), PLearn::SelectInputSubsetLearner::makeDeepCopyFromShallowCopy(), PLearn::SelectedOutputCostFunction::makeDeepCopyFromShallowCopy(), PLearn::SelectColumnsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::SecondIterationWrapper::makeDeepCopyFromShallowCopy(), PLearn::ScoreLayerVariable::makeDeepCopyFromShallowCopy(), PLearn::ScaledLaplacianKernel::makeDeepCopyFromShallowCopy(), PLearn::ScaledGeneralizedDistanceRBFKernel::makeDeepCopyFromShallowCopy(), PLearn::ScaledGaussianKernel::makeDeepCopyFromShallowCopy(), PLearn::SaltPepperNoiseVariable::makeDeepCopyFromShallowCopy(), PLearn::RunICPVariable::makeDeepCopyFromShallowCopy(), PLearn::RowOfVariable::makeDeepCopyFromShallowCopy(), PLearn::RowBufferedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ReplicateSamplesVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RepeatSplitter::makeDeepCopyFromShallowCopy(), PLearn::ReorderByMissingVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RemoveObservationTest::makeDeepCopyFromShallowCopy(), PLearn::ReIndexedTargetVariable::makeDeepCopyFromShallowCopy(), PLearn::RegularGridVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RegressorFromDistribution::makeDeepCopyFromShallowCopy(), PLearn::RegressionTreeRegisters::makeDeepCopyFromShallowCopy(), PLearn::RegressionTreeQueue::makeDeepCopyFromShallowCopy(), PLearn::RegressionTreeNode::makeDeepCopyFromShallowCopy(), PLearn::RegressionTreeMulticlassLeaveProb::makeDeepCopyFromShallowCopy(), PLearn::RegressionTreeMulticlassLeaveFast::makeDeepCopyFromShallowCopy(), PLearn::RegressionTreeMulticlassLeave::makeDeepCopyFromShallowCopy(), PLearn::RegressionTree::makeDeepCopyFromShallowCopy(), PLearn::Redirect::makeDeepCopyFromShallowCopy(), PLearn::RealFunctionsProcessedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RealFunctionProduct::makeDeepCopyFromShallowCopy(), PLearn::RealFunctionFromKernel::makeDeepCopyFromShallowCopy(), PLearn::RBMWoodsLayer::makeDeepCopyFromShallowCopy(), PLearn::RBMQLParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMMultitaskClassificationModule::makeDeepCopyFromShallowCopy(), PLearn::RBMModule::makeDeepCopyFromShallowCopy(), PLearn::RBMMixedLayer::makeDeepCopyFromShallowCopy(), PLearn::RBMMixedConnection::makeDeepCopyFromShallowCopy(), PLearn::RBMMatrixTransposeConnection::makeDeepCopyFromShallowCopy(), PLearn::RBMMatrixConnectionNatGrad::makeDeepCopyFromShallowCopy(), PLearn::RBMMatrixConnection::makeDeepCopyFromShallowCopy(), PLearn::RBMLQParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMLLParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMLayer::makeDeepCopyFromShallowCopy(), PLearn::RBMLateralBinomialLayer::makeDeepCopyFromShallowCopy(), PLearn::RBMJointLLParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMJointGenericParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMGenericParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMDiagonalMatrixConnection::makeDeepCopyFromShallowCopy(), PLearn::RBMConv2DLLParameters::makeDeepCopyFromShallowCopy(), PLearn::RBMConv2DConnection::makeDeepCopyFromShallowCopy(), PLearn::RBMConnection::makeDeepCopyFromShallowCopy(), PLearn::RBMClassificationModule::makeDeepCopyFromShallowCopy(), PLearn::RationalQuadraticARDKernel::makeDeepCopyFromShallowCopy(), PLearn::RankLearner::makeDeepCopyFromShallowCopy(), PLearn::RankedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RandomSamplesVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RandomSamplesFromVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RandomNeighborsDifferencesVMatrix::makeDeepCopyFromShallowCopy(), PLearn::RandomForcedValuesVariable::makeDeepCopyFromShallowCopy(), PLearn::PythonProcessedLearner::makeDeepCopyFromShallowCopy(), PLearn::PvGradNNet::makeDeepCopyFromShallowCopy(), PLearn::PTimer::makeDeepCopyFromShallowCopy(), PLearn::PTester::makeDeepCopyFromShallowCopy(), PLearn::PseudolikelihoodRBM::makeDeepCopyFromShallowCopy(), PLearn::PruningLinearRegressor::makeDeepCopyFromShallowCopy(), PLearn::ProcessSymbolicSequenceVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ProcessInputCostModule::makeDeepCopyFromShallowCopy(), PLearn::ProcessingVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Preprocessing::makeDeepCopyFromShallowCopy(), PLearn::PrecomputedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::PrecomputedKernel::makeDeepCopyFromShallowCopy(), PLearn::PotentialsVariable::makeDeepCopyFromShallowCopy(), PLearn::PLS::makeDeepCopyFromShallowCopy(), PLearn::PLearnerOutputVMatrix::makeDeepCopyFromShallowCopy(), PLearn::PLearnerDiagonalKernel::makeDeepCopyFromShallowCopy(), PLearn::PLearner::makeDeepCopyFromShallowCopy(), PLearn::PDistributionVariable::makeDeepCopyFromShallowCopy(), PLearn::PDistribution::makeDeepCopyFromShallowCopy(), PLearn::PCA::makeDeepCopyFromShallowCopy(), PLearn::PartSupervisedDBN::makeDeepCopyFromShallowCopy(), PLearn::ParentableObject::makeDeepCopyFromShallowCopy(), PLearn::OracleObjectGenerator::makeDeepCopyFromShallowCopy(), PLearn::Optimizer::makeDeepCopyFromShallowCopy(), PLearn::OnlineLearningModule::makeDeepCopyFromShallowCopy(), PLearn::OnlineGramNaturalGradientOptimizer::makeDeepCopyFromShallowCopy(), PLearn::OnBagsModule::makeDeepCopyFromShallowCopy(), PLearn::ObservationWindow::makeDeepCopyFromShallowCopy(), PLearn::ObjectOptionVariable::makeDeepCopyFromShallowCopy(), PLearn::NxProfileLearner::makeDeepCopyFromShallowCopy(), PLearn::NonLocalManifoldParzen::makeDeepCopyFromShallowCopy(), PLearn::NnlmWordRepresentationLayer::makeDeepCopyFromShallowCopy(), PLearn::NnlmOutputLayer::makeDeepCopyFromShallowCopy(), PLearn::NnlmOnlineLearner::makeDeepCopyFromShallowCopy(), PLearn::NNet::makeDeepCopyFromShallowCopy(), PLearn::NLLNeighborhoodWeightsVariable::makeDeepCopyFromShallowCopy(), PLearn::NllGeneralGaussianVariable::makeDeepCopyFromShallowCopy(), PLearn::NGramDistribution::makeDeepCopyFromShallowCopy(), PLearn::NeuralProbabilisticLanguageModel::makeDeepCopyFromShallowCopy(), PLearn::NeuralNet::makeDeepCopyFromShallowCopy(), PLearn::NetworkModule::makeDeepCopyFromShallowCopy(), PLearn::NetworkConnection::makeDeepCopyFromShallowCopy(), PLearn::NetflixVMatrix::makeDeepCopyFromShallowCopy(), PLearn::NeighborhoodSmoothnessNNet::makeDeepCopyFromShallowCopy(), PLearn::NeighborhoodImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::NeighborhoodConditionalMean::makeDeepCopyFromShallowCopy(), PLearn::NeighborhoodBoxVolumeDensityEstimator::makeDeepCopyFromShallowCopy(), PLearn::NegKernel::makeDeepCopyFromShallowCopy(), PLearn::NatGradSMPNNet::makeDeepCopyFromShallowCopy(), PLearn::NatGradNNet::makeDeepCopyFromShallowCopy(), PLearn::NatGradEstimator::makeDeepCopyFromShallowCopy(), PLearn::NaryVariable::makeDeepCopyFromShallowCopy(), PLearn::MultiTaskSeparationSplitter::makeDeepCopyFromShallowCopy(), PLearn::MultiTargetOneHotVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MultiMaxVariable::makeDeepCopyFromShallowCopy(), PLearn::MultiInstanceVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MultiInstanceNNet::makeDeepCopyFromShallowCopy(), PLearn::MultiClassAdaBoost::makeDeepCopyFromShallowCopy(), PLearn::MovingAverageVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MoleculeTemplateLearner::makeDeepCopyFromShallowCopy(), PLearn::MoleculeTemplate::makeDeepCopyFromShallowCopy(), PLearn::Molecule::makeDeepCopyFromShallowCopy(), PLearn::ModuleStackModule::makeDeepCopyFromShallowCopy(), PLearn::ModulesLearner::makeDeepCopyFromShallowCopy(), PLearn::ModuleLearner::makeDeepCopyFromShallowCopy(), PLearn::mNNet::makeDeepCopyFromShallowCopy(), PLearn::MixUnlabeledNeighbourVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MixtureVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MissingInstructionVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MissingIndicatorVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MeshVertex::makeDeepCopyFromShallowCopy(), PLearn::MeshGraph::makeDeepCopyFromShallowCopy(), PLearn::MeshFace::makeDeepCopyFromShallowCopy(), PLearn::MergeDond2Files::makeDeepCopyFromShallowCopy(), PLearn::MemoryVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MemoryCachedKernel::makeDeepCopyFromShallowCopy(), PLearn::MeanMedianModeImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MeanImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::MaxSubsamplingTest::makeDeepCopyFromShallowCopy(), PLearn::MaxSubsampling2DModule::makeDeepCopyFromShallowCopy(), PLearn::MatRowVariable::makeDeepCopyFromShallowCopy(), PLearn::MatrixSumOfVariable::makeDeepCopyFromShallowCopy(), PLearn::MatrixModule::makeDeepCopyFromShallowCopy(), PLearn::MatrixElementsVariable::makeDeepCopyFromShallowCopy(), PLearn::ManifoldParzen::makeDeepCopyFromShallowCopy(), PLearn::ManifoldKNNDistribution::makeDeepCopyFromShallowCopy(), PLearn::LogSumVariable::makeDeepCopyFromShallowCopy(), PLearn::LogAddVariable::makeDeepCopyFromShallowCopy(), PLearn::LogaddOnBagsModule::makeDeepCopyFromShallowCopy(), PLearn::LocalNeighborsDifferencesVMatrix::makeDeepCopyFromShallowCopy(), PLearn::LocalMedBoost::makeDeepCopyFromShallowCopy(), PLearn::LocallyMagnifiedDistribution::makeDeepCopyFromShallowCopy(), PLearn::LocalizedFeaturesLayerVariable::makeDeepCopyFromShallowCopy(), PLearn::LinearRegressor::makeDeepCopyFromShallowCopy(), PLearn::LinearInductiveTransferClassifier::makeDeepCopyFromShallowCopy(), PLearn::LinearFilterModule::makeDeepCopyFromShallowCopy(), PLearn::LinearCombinationOfScalarVariables::makeDeepCopyFromShallowCopy(), PLearn::LinearCombinationModule::makeDeepCopyFromShallowCopy(), PLearn::LiftStatsCollector::makeDeepCopyFromShallowCopy(), PLearn::LIBSVMSparseVMatrix::makeDeepCopyFromShallowCopy(), PLearn::LemmatizeVMatrix::makeDeepCopyFromShallowCopy(), PLearn::LearnerProcessedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Learner::makeDeepCopyFromShallowCopy(), PLearn::LayerCostModule::makeDeepCopyFromShallowCopy(), PLearn::KroneckerBaseKernel::makeDeepCopyFromShallowCopy(), PLearn::KNNVMatrix::makeDeepCopyFromShallowCopy(), PLearn::KNNRegressor::makeDeepCopyFromShallowCopy(), PLearn::KNNImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::KNNClassifier::makeDeepCopyFromShallowCopy(), PLearn::KMeansClustering::makeDeepCopyFromShallowCopy(), PLearn::KLp0p1RBMModule::makeDeepCopyFromShallowCopy(), PLearn::KernelVMatrix::makeDeepCopyFromShallowCopy(), PLearn::KernelRidgeRegressor::makeDeepCopyFromShallowCopy(), PLearn::KernelProjection::makeDeepCopyFromShallowCopy(), PLearn::KernelPCA::makeDeepCopyFromShallowCopy(), PLearn::Kernel::makeDeepCopyFromShallowCopy(), PLearn::JulianizeVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Isomap::makeDeepCopyFromShallowCopy(), PLearn::IsMissingVariable::makeDeepCopyFromShallowCopy(), PLearn::InterleaveVMatrix::makeDeepCopyFromShallowCopy(), PLearn::InsertZerosVariable::makeDeepCopyFromShallowCopy(), PLearn::InferenceRBM::makeDeepCopyFromShallowCopy(), PLearn::IndexedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::IncrementalNNet::makeDeepCopyFromShallowCopy(), PLearn::ImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ICP::makeDeepCopyFromShallowCopy(), PLearn::HyperSetOption::makeDeepCopyFromShallowCopy(), PLearn::HyperRetrain::makeDeepCopyFromShallowCopy(), PLearn::HyperOptimize::makeDeepCopyFromShallowCopy(), PLearn::HyperLearner::makeDeepCopyFromShallowCopy(), PLearn::HyperCommand::makeDeepCopyFromShallowCopy(), PLearn::HistogramDistribution::makeDeepCopyFromShallowCopy(), PLearn::HintonDeepBeliefNet::makeDeepCopyFromShallowCopy(), PLearn::HeterogenuousAffineTransformWeightPenalty::makeDeepCopyFromShallowCopy(), PLearn::HeterogenuousAffineTransformVariable::makeDeepCopyFromShallowCopy(), PLearn::HashMapFeatureSet::makeDeepCopyFromShallowCopy(), PLearn::GradNNetLayerModule::makeDeepCopyFromShallowCopy(), PLearn::GeodesicDistanceKernel::makeDeepCopyFromShallowCopy(), PLearn::GenericNearestNeighbors::makeDeepCopyFromShallowCopy(), PLearn::GeneralizedOneHotVMatrix::makeDeepCopyFromShallowCopy(), PLearn::GaussPartSupervisedDBN::makeDeepCopyFromShallowCopy(), PLearn::GaussMix::makeDeepCopyFromShallowCopy(), PLearn::GaussianProcessRegressor::makeDeepCopyFromShallowCopy(), PLearn::GaussianProcessNLLVariable::makeDeepCopyFromShallowCopy(), PLearn::GaussianKernel::makeDeepCopyFromShallowCopy(), PLearn::GaussianizeVMatrix::makeDeepCopyFromShallowCopy(), PLearn::GaussianDistribution::makeDeepCopyFromShallowCopy(), PLearn::GaussianDBNRegression::makeDeepCopyFromShallowCopy(), PLearn::GaussianDBNClassification::makeDeepCopyFromShallowCopy(), PLearn::GaussianContinuumDistribution::makeDeepCopyFromShallowCopy(), PLearn::GaussianContinuum::makeDeepCopyFromShallowCopy(), PLearn::Function::makeDeepCopyFromShallowCopy(), PLearn::FractionSplitter::makeDeepCopyFromShallowCopy(), PLearn::ForwardVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ForwardModule::makeDeepCopyFromShallowCopy(), PLearn::FNetLayerVariable::makeDeepCopyFromShallowCopy(), PLearn::FixDond2BinaryVariables::makeDeepCopyFromShallowCopy(), PLearn::FinancePreprocVMatrix::makeDeepCopyFromShallowCopy(), PLearn::FilterSplitter::makeDeepCopyFromShallowCopy(), PLearn::FilteredVMatrix::makeDeepCopyFromShallowCopy(), PLearn::FeatureSetSequentialCRF::makeDeepCopyFromShallowCopy(), PLearn::FeatureSetNNet::makeDeepCopyFromShallowCopy(), PLearn::FeatureSetNaiveBayesClassifier::makeDeepCopyFromShallowCopy(), PLearn::ExtendedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ExplicitSplitter::makeDeepCopyFromShallowCopy(), PLearn::ExplicitListOracle::makeDeepCopyFromShallowCopy(), PLearn::Experimentation::makeDeepCopyFromShallowCopy(), PLearn::ExhaustiveNearestNeighbors::makeDeepCopyFromShallowCopy(), PLearn::EncodedVMatrix::makeDeepCopyFromShallowCopy(), PLearn::EmpiricalDistribution::makeDeepCopyFromShallowCopy(), PLearn::EmbeddedSequentialLearner::makeDeepCopyFromShallowCopy(), PLearn::EmbeddedLearner::makeDeepCopyFromShallowCopy(), PLearn::EarlyStoppingOracle::makeDeepCopyFromShallowCopy(), PLearn::DynamicallyLinkedRBMsModel::makeDeepCopyFromShallowCopy(), PLearn::DTWKernel::makeDeepCopyFromShallowCopy(), PLearn::DiverseComponentAnalysis::makeDeepCopyFromShallowCopy(), PLearn::DistRepNNet::makeDeepCopyFromShallowCopy(), PLearn::DisregardRowsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::DiskVMatrix::makeDeepCopyFromShallowCopy(), PLearn::DiscriminativeRBM::makeDeepCopyFromShallowCopy(), PLearn::DiscriminativeDeepBeliefNet::makeDeepCopyFromShallowCopy(), PLearn::DictionaryVMatrix::makeDeepCopyFromShallowCopy(), PLearn::Dictionary::makeDeepCopyFromShallowCopy(), PLearn::DichotomizeVMatrix::makeDeepCopyFromShallowCopy(), PLearn::DichotomizeDond2DiscreteVariables::makeDeepCopyFromShallowCopy(), PLearn::DenoisingRecurrentNet::makeDeepCopyFromShallowCopy(), PLearn::DeepReconstructorNet::makeDeepCopyFromShallowCopy(), PLearn::DeepNonLocalManifoldParzen::makeDeepCopyFromShallowCopy(), PLearn::DeepNNet::makeDeepCopyFromShallowCopy(), PLearn::DeepFeatureExtractorNNet::makeDeepCopyFromShallowCopy(), PLearn::DeepBeliefNet::makeDeepCopyFromShallowCopy(), PLearn::DatedJoinVMatrix::makeDeepCopyFromShallowCopy(), PLearn::CumVMatrix::makeDeepCopyFromShallowCopy(), PLearn::CubicSpline::makeDeepCopyFromShallowCopy(), PLearn::CovariancePreservationImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::CostModule::makeDeepCopyFromShallowCopy(), PLearn::CorrelationProfiler::makeDeepCopyFromShallowCopy(), PLearn::CorrelationKernel::makeDeepCopyFromShallowCopy(), PLearn::Convolution2DModule::makeDeepCopyFromShallowCopy(), PLearn::ConjGradientOptimizer::makeDeepCopyFromShallowCopy(), PLearn::ConditionalStatsCollector::makeDeepCopyFromShallowCopy(), PLearn::ConditionalMeanImputationVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ConditionalDictionary::makeDeepCopyFromShallowCopy(), PLearn::ConditionalDensityNet::makeDeepCopyFromShallowCopy(), PLearn::ConditionalCDFSmoother::makeDeepCopyFromShallowCopy(), PLearn::ConcatSetsSplitter::makeDeepCopyFromShallowCopy(), PLearn::ConcatRowsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ConcatOfVariable::makeDeepCopyFromShallowCopy(), PLearn::ConcatDisjointFeatureSet::makeDeepCopyFromShallowCopy(), PLearn::ConcatColumnsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ComputeDond2Target::makeDeepCopyFromShallowCopy(), PLearn::CompareLearner::makeDeepCopyFromShallowCopy(), PLearn::CompactVMatrix::makeDeepCopyFromShallowCopy(), PLearn::CompactFileVMatrix::makeDeepCopyFromShallowCopy(), PLearn::CombiningCostsModule::makeDeepCopyFromShallowCopy(), PLearn::ClassSubsetVMatrix::makeDeepCopyFromShallowCopy(), PLearn::ClassSeparationSplitter::makeDeepCopyFromShallowCopy(), PLearn::ClassifierFromDensity::makeDeepCopyFromShallowCopy(), PLearn::ClassifierFromConditionalPDistribution::makeDeepCopyFromShallowCopy(), PLearn::ClassErrorCostModule::makeDeepCopyFromShallowCopy(), PLearn::ChemicalICP::makeDeepCopyFromShallowCopy(), PLearn::CheckDond2FileSequence::makeDeepCopyFromShallowCopy(), PLearn::ChainedLearners::makeDeepCopyFromShallowCopy(), PLearn::CCCostVariable::makeDeepCopyFromShallowCopy(), PLearn::CartesianProductOracle::makeDeepCopyFromShallowCopy(), PLearn::Calendar::makeDeepCopyFromShallowCopy(), PLearn::CachedFeatureSet::makeDeepCopyFromShallowCopy(), PLearn::BootstrapVMatrix::makeDeepCopyFromShallowCopy(), PLearn::BootstrapSplitter::makeDeepCopyFromShallowCopy(), PLearn::BinaryOpVMatrix::makeDeepCopyFromShallowCopy(), PLearn::BinaryBallTree::makeDeepCopyFromShallowCopy(), PLearn::BestAveragingPLearner::makeDeepCopyFromShallowCopy(), PLearn::BernoulliSampleVariable::makeDeepCopyFromShallowCopy(), PLearn::BatchVMatrix::makeDeepCopyFromShallowCopy(), PLearn::BasisSelectionRegressor::makeDeepCopyFromShallowCopy(), PLearn::BaseRegressorWrapper::makeDeepCopyFromShallowCopy(), PLearn::BaseRegressorConfidence::makeDeepCopyFromShallowCopy(), PLearn::BallTreeNearestNeighbors::makeDeepCopyFromShallowCopy(), PLearn::BaggingLearner::makeDeepCopyFromShallowCopy(), PLearn::BackConvolution2DModule::makeDeepCopyFromShallowCopy(), PLearn::AutoLinearRegressor::makeDeepCopyFromShallowCopy(), PLearn::Array< T >::makeDeepCopyFromShallowCopy(), PLearn::ArgminOfVariable::makeDeepCopyFromShallowCopy(), PLearn::ARDBaseKernel::makeDeepCopyFromShallowCopy(), PLearn::AppendNeighborsVMatrix::makeDeepCopyFromShallowCopy(), PLearn::AnalyzeFieldStats::makeDeepCopyFromShallowCopy(), PLearn::AnalyzeDond2DiscreteVariables::makeDeepCopyFromShallowCopy(), PLearn::AddMissingVMatrix::makeDeepCopyFromShallowCopy(), PLearn::AddLayersNNet::makeDeepCopyFromShallowCopy(), PLearn::AdditiveNormalizationKernel::makeDeepCopyFromShallowCopy(), PLearn::AdditiveGaussianNoiseVariable::makeDeepCopyFromShallowCopy(), PLearn::AddCostToLearner::makeDeepCopyFromShallowCopy(), and PLearn::AdaBoost::makeDeepCopyFromShallowCopy().

{ field.makeDeepCopyFromShallowCopy(copies); }

Here is the call graph for this function:

template<>
void PLearn::deepCopyField ( Func &  field,
CopiesMap &  copies 
)

Definition at line 730 of file Func.cc.

{
    if (field)
        field = static_cast<Function*>(field->deepCopy(copies));
}
template<>
void PLearn::deepCopyField ( StatsItArray &  field,
CopiesMap &  copies 
) [inline]

Definition at line 422 of file StatsIterator.h.

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

{ field.makeDeepCopyFromShallowCopy(copies); }

Here is the call graph for this function:

template<>
void PLearn::deepCopyField ( Vec &  field,
CopiesMap &  copies 
) [inline]

Definition at line 72 of file Mat.h.

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

{
    field.makeDeepCopyFromShallowCopy(copies);
}

Here is the call graph for this function:

template<>
void PLearn::deepCopyField ( Mat &  field,
CopiesMap &  copies 
) [inline]

Definition at line 103 of file Mat.h.

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

{
    field.makeDeepCopyFromShallowCopy(copies);
}

Here is the call graph for this function:

class U inline void PLearn::deepCopyField ( pair< T, U > &  p,
CopiesMap &  copies 
)

Definition at line 146 of file CopiesMap.h.

References deepCopyField().

{
    deepCopyField(p.first, copies);
    deepCopyField(p.second, copies);
}

Here is the call graph for this function:

template<typename T0 >
void PLearn::deepCopyField ( tuple< T0 > &  t,
CopiesMap &  copies 
) [inline]

Tuples handle deepCopying by distributing it to each element.

Definition at line 331 of file tuple.h.

References deepCopyField().

{
    deepCopyField(get<0>(t), copies);
}

Here is the call graph for this function:

template<typename T0 , typename T1 >
void PLearn::deepCopyField ( tuple< T0, T1 > &  t,
CopiesMap &  copies 
) [inline]

Definition at line 336 of file tuple.h.

References deepCopyField().

{
    deepCopyField(get<0>(t), copies);
    deepCopyField(get<1>(t), copies);
}

Here is the call graph for this function:

template<typename T0 , typename T1 , typename T2 >
void PLearn::deepCopyField ( tuple< T0, T1, T2 > &  t,
CopiesMap &  copies 
) [inline]

Definition at line 342 of file tuple.h.

References deepCopyField().

{
    deepCopyField(get<0>(t), copies);
    deepCopyField(get<1>(t), copies);
    deepCopyField(get<2>(t), copies);
}

Here is the call graph for this function:

template<typename T0 , typename T1 , typename T2 , typename T3 >
void PLearn::deepCopyField ( tuple< T0, T1, T2, T3 > &  t,
CopiesMap &  copies 
) [inline]

Definition at line 349 of file tuple.h.

References deepCopyField().

{
    deepCopyField(get<0>(t), copies);
    deepCopyField(get<1>(t), copies);
    deepCopyField(get<2>(t), copies);
    deepCopyField(get<3>(t), copies);
}

Here is the call graph for this function:

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void PLearn::deepCopyField ( tuple< T0, T1, T2, T3, T4 > &  t,
CopiesMap &  copies 
) [inline]

Definition at line 357 of file tuple.h.

References deepCopyField().

{
    deepCopyField(get<0>(t), copies);
    deepCopyField(get<1>(t), copies);
    deepCopyField(get<2>(t), copies);
    deepCopyField(get<3>(t), copies);
    deepCopyField(get<4>(t), copies);
}

Here is the call graph for this function:

template<class T , class Alloc >
void PLearn::deepCopyField ( deque< T, Alloc > &  c,
CopiesMap &  copies 
)

Standard containers handle deepcopying by distributing it to each element.

Definition at line 154 of file CopiesMap.h.

References deepCopyField().

{
    for (typename deque<T,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void PLearn::deepCopyField ( tuple< T0, T1, T2, T3, T4, T5 > &  t,
CopiesMap &  copies 
) [inline]

Definition at line 366 of file tuple.h.

References deepCopyField().

{
    deepCopyField(get<0>(t), copies);
    deepCopyField(get<1>(t), copies);
    deepCopyField(get<2>(t), copies);
    deepCopyField(get<3>(t), copies);
    deepCopyField(get<4>(t), copies);
    deepCopyField(get<5>(t), copies);
}

Here is the call graph for this function:

template<>
void PLearn::deepCopyField ( Var &  field,
CopiesMap &  copies 
) [inline]

Specialized in order to display a warning message.

Definition at line 74 of file Var.h.

References PLWARNING.

{
    PLWARNING(
        "In Var.h - You called deepCopyField on a Var, but this is known to sometimes "
        "cause bugs in optimized mode. Use varDeepCopyField instead! "
        "This warning may also appear when using a TVec<Var>, in this case, just switch "
        "to a VarArray."
        );
    if (field)
        field = field->deepCopy(copies);
}
template<>
void PLearn::deepCopyField ( VarArray &  field,
CopiesMap &  copies 
) [inline]

Definition at line 246 of file VarArray.h.

References PLearn::VarArray::makeDeepCopyFromShallowCopy().

{
    field.makeDeepCopyFromShallowCopy(copies);
}

Here is the call graph for this function:

template<>
void PLearn::deepCopyField ( StatsCollector &  field,
CopiesMap &  copies 
) [inline]

Apparently needed to specialize this method, otherwise it was the generic deepCopyField from CopiesMap.h that was called when deep copying a TVec<StatsCollector>.

Definition at line 406 of file StatsCollector.h.

References PLearn::Object::makeDeepCopyFromShallowCopy().

{
    field.makeDeepCopyFromShallowCopy(copies);
}

Here is the call graph for this function:

void PLearn::deepCopyField ( Mat *&  field,
CopiesMap &  copies 
) [inline]

Definition at line 917 of file TMat_impl.h.

References PLERROR.

{
    if (field)
    {
        CopiesMap::iterator it = copies.find(field);
        if (it != copies.end())                
            field = static_cast<Mat*>(it->second);
        else
        {
            // Throw an error. The reason is that:
            // - if the Mat* pointer points to a matrix that has already been
            // deep-copied, I am unsure whether 'copies' contains the correct
            // pointer, thus we may end up here even though we should reuse the
            // previous deep copy,
            // - if the Mat* pointer points to a matrix that has not been deep
            // copied yet, then when that matrix is deep copied it will not
            // actually be the same as the matrix we may create here.
            PLERROR("In deepCopyField(Mat*& field, CopiesMap& copies) - You "
                    "cannot deep copy a Mat* directly.");
            /* Old code.
            Mat* newM = new Mat; 
            (*newM) = field->deepCopy(copies);
            copies[field] = newM;
            field = newM;
            */
        }
    }
}
template<class T , class U , class Compare , class Alloc >
void PLearn::deepCopyField ( map< T, U, Compare, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 162 of file CopiesMap.h.

References deepCopyField().

{
    for (typename map<T,U,Compare,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

template<class T >
void PLearn::deepCopyField ( TMat< T > &  field,
CopiesMap &  copies 
) [inline]

Definition at line 723 of file TMat_impl.h.

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

{
    field.makeDeepCopyFromShallowCopy(copies);
}

Here is the call graph for this function:

template<class T , class U , class Compare , class Alloc >
void PLearn::deepCopyField ( hash_map< T, U, Compare, Alloc > &  c,
CopiesMap &  copies 
)

Definition at line 170 of file CopiesMap.h.

References deepCopyField().

{
    for (typename hash_map<T,U,Compare,Alloc>::iterator it = c.begin(), end=c.end()
             ; it != end ; ++it)
        deepCopyField(*it, copies);
}

Here is the call graph for this function:

int PLearn::delta_seconds ( const PDateTime &  current,
const PDateTime &  past 
)

Return the number of seconds between the two dates.

Current date *can* be lower than past one: the delta will be negative.

Definition at line 273 of file PDateTime.cc.

References SECONDS_PER_DAY, and PLearn::PDateTime::toJulianDay().

{
    if ( current == past )
        return 0;

    double jcurrent   = current.toJulianDay();
    double jpast      = past.toJulianDay();
    double delta_days = jcurrent - jpast;

    return int( round(delta_days*SECONDS_PER_DAY) ); 
}

Here is the call graph for this function:

void void void PLearn::deprecationmsg ( const char *  msg,
  ... 
)

Definition at line 162 of file plerror.cc.

References endl(), ERROR_MSG_SIZE, and NORMAL_LOG.

{
    va_list args;
    va_start(args,msg);
    char message[ERROR_MSG_SIZE];

#if !defined(ULTRIX) && !defined(_MINGW_) && !defined(WIN32)
    vsnprintf(message,ERROR_MSG_SIZE,msg,args);
#else
    vsprintf(message,msg,args);
#endif

    va_end(args);

    // *error_stream <<" DEPRECATION_WARNING: "<<message<<endl;
    NORMAL_LOG << " DEPRECATION_WARNING: " << message << endl;
}

Here is the call graph for this function:

template<class T >
T PLearn::det ( const TMat< T > &  A,
bool  log_det = false 
)

Return the determinant of A, using LU decomposition.

If 'log_det' is set to true, the log determinant is returned.

Definition at line 6676 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), LU_decomposition(), maxabs(), n, PLERROR, PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), and PLearn::TMat< T >::width().

Referenced by PLearn::GaussMix::computeLogLikelihood(), PLearn::DeterminantVariable::fprop(), PLearn::ProductRandomVariable::invertible(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

{
    // Work storage.
    static TMat<T> LU;
    static TVec<T> Trow, p;

    int n = A.length();
    if (n!=A.width())
        PLERROR("det(const TMat<T>& A): A(%d,%d) is not square!",n,A.width());
    for (int i=0;i<n;i++)
    {
        T max_abs = maxabs(A(i));
        if (max_abs==0)
            return 0.0;
    }
    LU.resize(A.length(), A.width());
    LU << A;
    Trow.resize(n);
    p.resize(n);
    int detsign;
    LU_decomposition(LU, Trow, detsign, &p);
    return det(LU, detsign, log_det);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::det ( const TMat< T > &  LU,
int  detsign,
bool  log_det = false 
)

Return the determinant of A, whose LU decomposition is given ('detsign' is as set by the LU_decomposition(..) function).

If 'log_det' is set to true, the log determinant is returned.

Definition at line 6704 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, minus(), MISSING_VALUE, PLearn::TMat< T >::mod(), n, pl_log, PLERROR, and PLearn::TMat< T >::width().

{
    T determinant = detsign;
    bool minus = false;
    if (log_det) {
        if (detsign < 0) {
            minus = !minus;
            detsign = - detsign;
        }
        determinant = pl_log(double(detsign));
    }
    int mod = LU.mod();
    int n = LU.width();
    if (n!=LU.width())
        PLERROR("det(const TMat<T>& LU, int detsign): LU(%d,%d) is not square!",n,LU.width());
    T* LUii = LU.data();
    if (log_det) {
        for (int i=0;i<n;i++, LUii+=1+mod) {
            real LUii_ = *LUii;
            if (LUii_ < 0) {
                minus = !minus;
                LUii_ = - LUii_;
            }
            determinant += pl_log(LUii_);
        }
    } else {
        for (int i=0;i<n;i++, LUii+=1+mod)
            determinant *= *LUii;
    }
    if (log_det && minus)
        // The determinant is negative: its log should be NaN.
        determinant = MISSING_VALUE;
    return determinant;
}

Here is the call graph for this function:

Var PLearn::det ( Var  m) [inline]

Definition at line 78 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
double PLearn::determine_density_integral_from_log_densities_on_grid ( Vec  log_densities,
real  deltax,
real  deltay 
)

Definition at line 80 of file learner_utils.cc.

References exp(), and logadd().

{
    double logsum = logadd(log_densities);
    double surfelem = deltax*deltay;
    double surfintegral = exp(logsum)*surfelem;
    return surfintegral;
}

Here is the call graph for this function:

void PLearn::determine_grid_for_dataset ( VMat  dataset,
int  nx,
int  ny,
real x0,
real y0,
real deltax,
real deltay,
real  extraspace 
)

Definition at line 65 of file learner_utils.cc.

References computeRange(), and PLearn::VMat::subMatColumns().

{
    Vec minv(2);
    Vec maxv(2);
    computeRange(dataset.subMatColumns(0,2), minv, maxv);
    real extrax = (maxv[0]-minv[0])*extraspace;
    x0 = minv[0]-extrax;
    deltax = (maxv[0]+extrax-x0)/nx;
    real extray = (maxv[1]-minv[1])*extraspace;
    y0 = minv[1]-extray;
    deltay = (maxv[1]+extray-y0)/ny;
}

Here is the call graph for this function:

void PLearn::dgesdd_ ( char *  JOBZ,
int M,
int N,
double *  A,
int LDA,
double *  S,
double *  U,
int LDU,
double *  VT,
int LDVT,
double *  WORK,
int LWORK,
int IWORK,
int INFO 
)

Referenced by lapack_Xgesdd_().

Here is the caller graph for this function:

void PLearn::dgesv_ ( int N,
int NRHS,
double *  A,
int LDA,
int IPIV,
double *  B,
int LDB,
int INFO 
)

Referenced by lapackSolveLinearSystem().

Here is the caller graph for this function:

void PLearn::dgetrf_ ( int M,
int N,
double *  A,
int LDA,
int IPIV,
int INFO 
)

Referenced by matInvert().

Here is the caller graph for this function:

void PLearn::dgetri_ ( int N,
double *  A,
int LDA,
int IPIV,
double *  WORK,
int LWORK,
int INFO 
)

Referenced by matInvert().

Here is the caller graph for this function:

template<class T >
void PLearn::diag ( const TMat< T > &  mat,
const TVec< T > &  d 
)

Copy diagonal of mat in d (which must have correct size)

Definition at line 4802 of file TMat_maths_impl.h.

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

Referenced by PLearn::DiverseComponentAnalysis::build_(), PLearn::EntropyContrast::compute_df_dx(), diag(), PLearn::MatTPlusSumSquaredVec< MatT >::diag(), PLearn::ReverseMatT< MatT >::diag(), PLearn::ReverseMatT< MatT >::diagonalOfSquare(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), SolveLinearSymmSystemByCG(), and PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    T* d_ = d.data();
    int l=mat.length();
    for (int i=0;i<l;i++)
        d_[i] = mat(i,i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::diag ( const TMat< T > &  mat)

Definition at line 4811 of file TMat_maths_impl.h.

References d, diag(), and PLearn::TMat< T >::length().

{
    TVec<T> d(mat.length());
    diag(mat, d);
    return d;
}

Here is the call graph for this function:

Var PLearn::diag ( Var  v) [inline]

Definition at line 83 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
Var PLearn::diagonalized_factors_product ( Var  left_matrix,
Var  center_diagonal,
Var  right_matrix 
) [inline]

Definition at line 87 of file DiagonalizedFactorsProductVariable.h.

Referenced by PLearn::TangentLearner::build_(), PLearn::GaussianContinuumDistribution::build_(), and PLearn::GaussianContinuum::build_().

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsProduct ( TMat< T > &  result,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
bool  accumulate = false 
)

return the matrix with elements (i,j) = sum_k U_{ik} d_k V_{kj}

Definition at line 3139 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::EntropyContrast::compute_df_dx(), PLearn::DiagonalizedFactorsProductVariable::fprop(), and PLearn::NatGradEstimator::operator()().

{
#ifdef BOUNDCHECK
    if (result.length()!=U.length() || result.width()!=V.width() || U.width()!=d.length() || V.length()!=d.length())
        PLERROR("diagonalizedFactorsProduct: incompatible arguments: (%dx%d)*(%d)*(%dx%d) --> (%dx%d)",
                U.length(),U.width(),d.length(),V.length(),V.width(),result.length(),result.width());
#endif
    int n1=U.length();
    int n2=U.width();
    int n3=V.width();
    T *r_ij = result.data();
    if (accumulate)
        for (int i=0;i<n1;i++)
        {
            T *u_i = U[i];
            for (int j=0;j<n3;j++,r_ij++)
            {
                T* d_k = d.data();
                T res=0;
                for (int k=0;k<n2;k++,d_k++)
                    res += *d_k * u_i[k] * V(k,j);
                *r_ij += res;
            }
        }
    else
        for (int i=0;i<n1;i++)
        {
            T *u_i = U[i];
            for (int j=0;j<n3;j++,r_ij++)
            {
                T* d_k = d.data();
                T res=0;
                for (int k=0;k<n2;k++,d_k++)
                    res += *d_k * u_i[k] * V(k,j);
                *r_ij = res;
            }
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsProductBprop ( const TMat< T > &  dCdresult,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
TMat< T > &  dCdU,
TVec< T > &  dCdd,
TMat< T > &  dCdV 
)

GIVEN that res(i,j) = sum_k U_{ik} d_k V_{kj}, and given dC/dres, U,d and V, accumulate gradients on dC/dU, dC/dd and dC/dV: dC/dU[i,k] += sum_j dC/dres[i,j] d_k V[k,j] dC/dd[k] += sum_{ij} dC/dres[i,j] U[i,k] V[k,j] dC/dV[k,j] += d_k * sum_i U[i,k] dC/dres[i,j].

Definition at line 3184 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::bprop().

{
#ifdef BOUNDCHECK
    if (dCdU.length()!=U.length() || dCdU.width()!=U.width() || dCdd.length()!=d.length()
        || dCdV.length()!=V.length() || dCdV.width()!=V.width() ||
        U.width()!=d.length() || V.length()!=d.length())
        PLERROR("diagonalizedFactorsProductBprop: incompatible arguments");
#endif
    int n1=U.length();
    int n2=U.width();
    int n3=V.width();
    T *dCdr_ij = dCdresult.data();
    for (int i=0;i<n1;i++)
    {
        T *u_i = U[i];
        T *dCdu_i = dCdU[i];
        for (int j=0;j<n3;j++,dCdr_ij++)
        {
            T dcdr = *dCdr_ij;
            T* d_k = d.data();
            T* dCdd_k = dCdd.data();
            for (int k=0;k<n2;k++,d_k++,dCdd_k++)
            {
                T dk = *d_k;
                T u_ik = u_i[k];
                T v_kj = V(k,j);
                dCdu_i[k] += dcdr * dk * v_kj;
                *dCdd_k += dcdr * u_ik * v_kj;
                dCdV(k,j) += dk * u_ik * dcdr;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsProductTranspose ( TMat< T > &  result,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
bool  accumulate = false 
)

return the matrix with elements (i,j) = sum_k U_{ik} d_k V_{jk}

Definition at line 3221 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::fprop().

{
#ifdef BOUNDCHECK
    if (result.length()!=U.length() || result.width()!=V.length() || U.width()!=d.length() || V.width()!=d.length())
        PLERROR("diagonalizedFactorsProductTranspose: incompatible arguments: (%dx%d)*(%d)*(%dx%d)' --> (%dx%d)",
                U.length(),U.width(),d.length(),V.length(),V.width(),result.length(),result.width());
#endif
    int n1=U.length();
    int n2=U.width();
    int n3=V.length();
    T *r_ij = result.data();
    for (int i=0;i<n1;i++)
    {
        T *u_i = U[i];
        for (int j=0;j<n3;j++,r_ij++)
        {
            T* d_k = d.data();
            T* v_j = V[j];
            T res=0;
            for (int k=0;k<n2;k++,d_k++)
                res += *d_k * u_i[k] * v_j[k];
            if (accumulate)
                *r_ij += res;
            else
                *r_ij = res;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsProductTransposeBprop ( const TMat< T > &  dCdresult,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
TMat< T > &  dCdU,
TVec< T > &  dCdd,
TMat< T > &  dCdV 
)

Definition at line 3256 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::bprop().

{
#ifdef BOUNDCHECK
    if (dCdU.length()!=U.length() || dCdU.width()!=U.width() || dCdd.length()!=d.length()
        || dCdV.length()!=V.length() || dCdV.width()!=V.width() ||
        U.width()!=d.length() || V.width()!=d.length())
        PLERROR("diagonalizedFactorsProductTransposeBprop: incompatible arguments");
#endif
    int n1=U.length();
    int n2=U.width();
    int n3=V.length();
    T *dCdr_ij = dCdresult.data();
    for (int i=0;i<n1;i++)
    {
        T *u_i = U[i];
        T *dCdu_i = dCdU[i];
        for (int j=0;j<n3;j++,dCdr_ij++)
        {
            T* d_k = d.data();
            T* dCdd_k = dCdd.data();
            T* v_j = V[j];
            T* dCdv_j = dCdV[j];
            for (int k=0;k<n2;k++,d_k++,dCdd_k++)
            {
                T dcdr = *dCdr_ij;
                T dk = *d_k;
                T v_jk = v_j[k];
                T u_ik = u_i[k];
                dCdu_i[k] += dcdr * dk * v_jk;
                *dCdd_k += dcdr * u_ik * v_jk;
                dCdv_j[k] += dcdr * dk * u_ik;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsTransposeProduct ( TMat< T > &  result,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
bool  accumulate = false 
)

return the matrix with elements (i,j) = sum_k U_{ki} d_k V_{kj}

Definition at line 3296 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::fprop().

{
#ifdef BOUNDCHECK
    if (result.length()!=U.width() || result.width()!=V.width() || U.length()!=d.length() || V.length()!=d.length())
        PLERROR("diagonalizedFactorsTransposeProduct: incompatible arguments: (%dx%d)'*(%d)*(%dx%d) --> (%dx%d)",
                U.length(),U.width(),d.length(),V.length(),V.width(),result.length(),result.width());
#endif
    int n1=U.width();
    int n2=U.length();
    int n3=V.width();
    if (!accumulate)
        result.clear();
    T* d_k = d.data();
    for (int k=0;k<n2;k++,d_k++)
    {
        T *u_k = U[k];
        T *v_k = V[k];
        T *r_ij = result.data();
        for (int i=0;i<n1;i++)
        {
            T u_ki = u_k[i];
            for (int j=0;j<n3;j++,r_ij++)
                *r_ij += *d_k * u_ki * v_k[j];
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsTransposeProductBprop ( const TMat< T > &  dCdresult,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
TMat< T > &  dCdU,
TVec< T > &  dCdd,
TMat< T > &  dCdV 
)

Definition at line 3329 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::bprop().

{
#ifdef BOUNDCHECK
    if (dCdU.length()!=U.length() || dCdU.width()!=U.width() || dCdd.length()!=d.length()
        || dCdV.length()!=V.length() || dCdV.width()!=V.width() ||
        U.length()!=d.length() || V.length()!=d.length())
        PLERROR("diagonalizedFactorsTransposeProductBprop: incompatible arguments");
#endif
    int n1=U.width();
    int n2=U.length();
    int n3=V.width();
    T* d_k = d.data();
    T* dCdd_k = dCdd.data();
    for (int k=0;k<n2;k++,d_k++,dCdd_k++)
    {
        T dk = *d_k;
        T *u_k = U[k];
        T *dCdu_k = dCdU[k];
        T *v_k = V[k];
        T *dCdv_k = dCdV[k];
        T *dCdr_ij = dCdresult.data();
        for (int i=0;i<n1;i++)
        {
            T u_ki = u_k[i];
            T& dCdu_ki = dCdu_k[i];
            for (int j=0;j<n3;j++,dCdr_ij++)
            {
                T dcdr = *dCdr_ij;
                T v_kj = v_k[j];
                dCdu_ki +=  dcdr * dk * v_kj;
                *dCdd_k += dcdr * u_ki * v_kj;
                dCdv_k[j] += dcdr * dk * u_ki;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsTransposeProductTranspose ( TMat< T > &  result,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
bool  accumulate = false 
)

return the matrix with elements (i,j) = sum_k U_{ki} d_k V_{jk}

Definition at line 3370 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::fprop().

{
#ifdef BOUNDCHECK
    if (result.length()!=U.width() || result.width()!=V.length() || U.length()!=d.length() || V.width()!=d.length())
        PLERROR("diagonalizedFactorsTransposeProductTranspose: incompatible arguments: (%dx%d)'*(%d)*(%dx%d)' --> (%dx%d)",
                U.length(),U.width(),d.length(),V.length(),V.width(),result.length(),result.width());
#endif
    int n1=U.width();
    int n2=U.length();
    int n3=V.length();
    if (!accumulate)
        result.clear();
    T* d_k = d.data();
    for (int k=0;k<n2;k++,d_k++)
    {
        T *u_k = U[k];
        T *r_ij = result.data();
        for (int i=0;i<n1;i++)
        {
            T u_ki = u_k[i];
            for (int j=0;j<n3;j++,r_ij++)
                *r_ij += *d_k * u_ki * V(j,k);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalizedFactorsTransposeProductTransposeBprop ( const TMat< T > &  dCdresult,
const TMat< T > &  U,
const TVec< T >  d,
const TMat< T >  V,
TMat< T > &  dCdU,
TVec< T > &  dCdd,
TMat< T > &  dCdV 
)

Definition at line 3402 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::DiagonalizedFactorsProductVariable::bprop().

{
#ifdef BOUNDCHECK
    if (dCdU.length()!=U.length() || dCdU.width()!=U.width() || dCdd.length()!=d.length()
        || dCdV.length()!=V.length() || dCdV.width()!=V.width() ||
        U.length()!=d.length() || V.width()!=d.length())
        PLERROR("diagonalizedFactorsTransposeProductTransposeBprop: incompatible arguments");
#endif
    int n1=U.width();
    int n2=U.length();
    int n3=V.length();
    T* d_k = d.data();
    T* dCdd_k = dCdd.data();
    for (int k=0;k<n2;k++,d_k++,dCdd_k++)
    {
        T dk = *d_k;
        T *u_k = U[k];
        T *dCdu_k = dCdU[k];
        T *dCdr_ij = dCdresult.data();
        for (int i=0;i<n1;i++)
        {
            T u_ki = u_k[i];
            T& dCdu_ki = dCdu_k[i];
            for (int j=0;j<n3;j++,dCdr_ij++)
            {
                T dcdr = *dCdr_ij;
                T v_jk = V(j,k);
                dCdu_ki += dcdr * dk * v_jk;
                *dCdd_k += dcdr * u_ki * v_jk;
                dCdV(j,k) += dcdr * dk * u_ki;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class MatT >
void PLearn::diagonalizeSubspace ( MatT &  A,
Mat &  X,
Vec &  Ax,
Mat &  solutions,
Vec &  evalues,
Mat &  evectors 
)

Diagonalize the sub-space spanned by the rows of X(mxn) with respect to symmetric matrix A(nxn), m<=n. The eigenpairs will be put in the evalues/evectors arguments (expressed in the basis of X), and the corresponding basis in R^n will be put in the solutions(kxn) matrix.

The function proceeds as follows:

GramSchmid orthornormalize X, so that X X' = I(mxm) C(mxm) = X A X' solve small eigensystem C = V' S V (V = evectors, S = evalues) solutions = V X

Thus in the end we have

solutions solutions' = V X X' V' = I if X was orthonormal to start with solutions A solutions' = V X A X' V' = V C V' = S

first collect C = X A X'

symmetric part

then diagonalize C = evectors' * diag(evalues) * evectors

the eigen-values should be in increasing order

convert the eigenvectors corresponding to the smallest eigenvalues

< already 0

Definition at line 823 of file plapack.h.

References PLearn::TVec< T >::clear(), PLearn::TMat< T >::copy(), dot(), eigen_SymmMat(), endl(), GramSchmidtOrthogonalization(), i, j, PLearn::TMat< T >::length(), multiplyAcc(), norm(), product(), and PLearn::TMat< T >::subMatRows().

Referenced by findSmallestEigenPairOfSymmMat(), and GDFindSmallEigenPairs().

{
    int n_try=X.length();

    n_try=GramSchmidtOrthogonalization(X);
    X = X.subMatRows(0,n_try);

    int n_soln=solutions.length();
    Mat C(n_try,n_try);
    for (int i=0;i<n_try;i++)
    {
        real* Ci = C[i];
        Vec x_i=X(i);
        A.product(x_i,Ax);
        for (int j=0;j<=i;j++)
            Ci[j] = dot(X(j),Ax);
    }
    for (int i=0;i<n_try;i++)
    {
        real* Ci = C[i];
        for (int j=i+1;j<n_try;j++)
            Ci[j] = C(j,i);
    }

    int n_evalues_found=0;
    Mat CC=C.copy();
    eigen_SymmMat(CC,evalues,evectors,n_evalues_found,true,n_try,true,true);
#if 0

    Vec Cv(n_try);
    for (int i=0;i<n_try;i++)
    {
        Vec vi=evectors(i);
        if (fabs(norm(vi)-1)>1e-5)
            cout << "norm v[" << i << "] = " << norm(vi) << endl;
        product(C, vi,Cv);
        real ncv=norm(Cv);
        if (fabs(ncv-evalues[i])>1e-5)
            cout << "C v[" << i << "] = " << ncv << " but evalue = " << evalues[i] << endl;
        real vcv = dot(vi,Cv);
        if (fabs(vcv-evalues[i])>1e-5)
            cout << "v' C v[" << i << "] = " << vcv << " but evalue = " << evalues[i] << endl;
        for (int j=0;j<i;j++)
        {
            Vec vj=evectors(j);
            real dij = dot(vi,vj);
            if (fabs(dij)>1e-5)
                cout << "v[" << i << "] . v[" << j << "] = " << dij << endl;
        }
    }
#endif

    for (int i=0;i<n_soln;i++)
    {
        Vec xi=solutions(i);
        xi.clear(); 
        for (int j=0;j<n_try;j++)
            multiplyAcc(xi, X(j),evectors(i,j));
    }
#if 0

    for (int i=0;i<n_soln;i++)
    {
        Vec xi=solutions(i);
        real normxi=norm(xi);
        if (fabs(normxi-1)>1e-5)
            cout << "norm x[" << i << "]=" << normxi << endl;
        product(A, xi,Ax); 
        cout << "Ax[" << i << "]=" << norm(Ax) << endl;
        real xAx = dot(Ax,xi);
        real err=fabs(xAx-evalues[i]);
        if (err>1e-5)
            cout << "xAx [" << i << "]=" << xAx << " but evalue = " << evalues[i] << endl;
        for (int j=0;j<i;j++)
        {
            Vec xj=solutions(j);
            err = fabs(dot(xi,xj));
            if (err>1e-5)
                cout << "|x[" << i << "] . x[" << j << "]| = " << err << endl;
        }
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TMat< T > PLearn::diagonalmatrix ( const TVec< T > &  v)

Definition at line 698 of file TMat_impl.h.

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

Referenced by jacobi(), rotationFromWeightedMatchedPoints(), and weightedRotationFromMatchedPoints().

{
    TMat<T> m(v.length(), v.length());
    for(int i=0; i<v.length(); i++)
        m(i,i) = v[i];
    return m;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diagonalOfSquare ( const TMat< T > &  mat,
const TVec< T > &  d 
)

Definition at line 4819 of file TMat_maths_impl.h.

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

Referenced by PLearn::SquaredSymmMatT< MatT >::diag(), and PLearn::ReverseMatT< MatT >::diagonalOfSquare().

{
    T* d_=d.data();
    for (int i=0;i<mat.length();i++)
        d_[i]=pownorm(mat(i));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatSetsSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file ConcatSetsSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PyPLearnScript > *  opt,
PLearnDiff *  diffs 
)

Definition at line 183 of file PyPLearnScript.h.

{ time_t d=0; return smartLoadObject(filepath, args, d); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConstantVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 114 of file ConstantVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CrossReferenceVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file CrossReferenceVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CumVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file CumVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DatedJoinVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 135 of file DatedJoinVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RPPath > *  opt,
PLearnDiff *  diffs 
)

Definition at line 105 of file RPPath.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DatedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file DatedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DBSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file DBSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BatchVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 86 of file BatchVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LearnerProcessedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 114 of file LearnerProcessedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLLogTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file PLLogTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RemoveRowsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file RemoveRowsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, YMDDatedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 141 of file YMDDatedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DichotomizeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 125 of file DichotomizeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UCISpecification > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file UCISpecification.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DictionaryVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 186 of file DictionaryVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DiskVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file DiskVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DisregardRowsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file DisregardRowsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EncodedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 87 of file EncodedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NetflixVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 238 of file NetflixVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExplicitSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 114 of file ExplicitSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExtendedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file ExtendedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PPathTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file PPathTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExtractNNetParamsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file ExtractNNetParamsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalDictionary > *  opt,
PLearnDiff *  diffs 
)

Definition at line 137 of file ConditionalDictionary.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FileVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file FileVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FilteredVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 136 of file FilteredVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FilterSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file FilterSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FinancePreprocVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 170 of file FinancePreprocVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ForwardVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 186 of file ForwardVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FractionSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 125 of file FractionSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianizeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 150 of file GaussianizeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GeneralizedOneHotVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 110 of file GeneralizedOneHotVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PStreamBufTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file PStreamBufTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GetInputVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file GetInputVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GramVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file GramVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Dictionary > *  opt,
PLearnDiff *  diffs 
)

Definition at line 190 of file Dictionary.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file ImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IndexedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file IndexedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TupleTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file TupleTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InfiniteMNISTVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 168 of file InfiniteMNISTVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InterleaveVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file InterleaveVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, JoinVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file JoinVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, JulianizeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 157 of file JulianizeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FileDictionary > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file FileDictionary.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KernelVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 93 of file KernelVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KFoldSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 117 of file KFoldSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KNNImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 135 of file KNNImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KNNVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 151 of file KNNVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LemmatizeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file LemmatizeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AdditiveNormalizationKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 163 of file AdditiveNormalizationKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LIBSVMSparseVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 137 of file LIBSVMSparseVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocallyPrecomputedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocalNeighborsDifferencesVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 120 of file LocalNeighborsDifferencesVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeanImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file MeanImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeanMedianModeImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file MeanMedianModeImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MemoryVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 117 of file MemoryVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MemoryVMatrixNoSave > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file MemoryVMatrixNoSave.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MissingIndicatorVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 101 of file MissingIndicatorVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VecDictionary > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file VecDictionary.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ARDBaseKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 120 of file ARDBaseKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MissingInstructionVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file MissingInstructionVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MixtureVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file MixtureVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MixUnlabeledNeighbourVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file MixUnlabeledNeighbourVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BetaKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file BetaKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MovingAverageVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file MovingAverageVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiInstanceVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file MultiInstanceVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiTargetOneHotVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file MultiTargetOneHotVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiTaskSeparationSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file MultiTaskSeparationSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiToUniInstanceSelectRandomVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 96 of file MultiToUniInstanceSelectRandomVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassDistanceProportionCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file ClassDistanceProportionCostFunction.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NoSplitSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file NoSplitSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OneHotVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file OneHotVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OneVsAllVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file OneVsAllVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PairsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 92 of file PairsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLearnerOutputVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 148 of file PLearnerOutputVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassErrorCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 99 of file ClassErrorCostFunction.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PrecomputedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file PrecomputedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProcessDatasetVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file ProcessDatasetVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProcessingVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file ProcessingVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassMarginCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 93 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProcessSymbolicSequenceVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 314 of file ProcessSymbolicSequenceVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PutSubVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file PutSubVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PythonTableVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 91 of file PythonTableVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WordNetSenseDictionary > *  opt,
PLearnDiff *  diffs 
)

Definition at line 209 of file WordNetSenseDictionary.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RandomNeighborsDifferencesVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 117 of file RandomNeighborsDifferencesVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RandomSamplesFromVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file RandomSamplesFromVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RandomSamplesVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 155 of file RandomSamplesVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CompactVMatrixGaussianKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 83 of file CompactVMatrixGaussianKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RangeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file RangeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RankedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file RankedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealFunctionsProcessedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file RealFunctionsProcessedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegularGridVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file RegularGridVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ReIndexedTargetVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file ReIndexedTargetVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealMapping > *  opt,
PLearnDiff *  diffs 
)

Definition at line 265 of file RealMapping.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CompactVMatrixPolynomialKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file CompactVMatrixPolynomialKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RemapLastColumnVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file RemapLastColumnVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConvexBasisKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file ConvexBasisKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RemoveDuplicateVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 110 of file RemoveDuplicateVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ReorderByMissingVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 107 of file ReorderByMissingVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RepeatSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 131 of file RepeatSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RepeatVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file RepeatVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ReplicateSamplesVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file ReplicateSamplesVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowBufferedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file RowBufferedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CorrelationKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 162 of file CorrelationKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowsSubVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 102 of file RowsSubVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectColumnsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 149 of file SelectColumnsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectRowsFileIndexVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file SelectRowsFileIndexVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectRowsMultiInstanceVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 136 of file SelectRowsMultiInstanceVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CosKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 72 of file CosKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectRowsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file SelectRowsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectSetsSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file SelectSetsSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SeparateInputVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file SeparateInputVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SequentialSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 111 of file SequentialSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DifferenceKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 67 of file DifferenceKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ShiftAndRescaleVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file ShiftAndRescaleVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ShuffleColumnsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 110 of file ShuffleColumnsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SortRowsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file SortRowsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SourceVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 157 of file SourceVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SourceVMatrixSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file SourceVMatrixSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DistanceKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 90 of file DistanceKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SparseVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file SparseVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Splitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file Splitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DivisiveNormalizationKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 154 of file DivisiveNormalizationKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SplitWiseValidationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file SplitWiseValidationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file StackedSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StochasticBinarizeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file StochasticBinarizeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CachedFeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file CachedFeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StrTableVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 60 of file StrTableVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SubInputVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file SubInputVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SubVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file SubVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TemporalHorizonVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 104 of file TemporalHorizonVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DotProductKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 69 of file DotProductKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TemporaryDiskVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file TemporaryDiskVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TemporaryFileVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file TemporaryFileVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DTWKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 154 of file DTWKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AutoVMatrixTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file AutoVMatrixTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FileVMatrixTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file FileVMatrixTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatDisjointFeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file ConcatDisjointFeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IndexedVMatrixTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file IndexedVMatrixTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowBufferedVMatrixTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file RowBufferedVMatrixTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EpanechnikovKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file EpanechnikovKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TestInTrainSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 153 of file TestInTrainSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TextStreamVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 120 of file TextStreamVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PartsDistanceKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file PartsDistanceKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ToBagSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 136 of file ToBagSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TrainTestSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file TrainTestSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TrainValidTestSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 141 of file TrainValidTestSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransposeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file TransposeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UCIDataVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file UCIDataVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UniformizeVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file UniformizeVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TruncatedRealFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 125 of file TruncatedRealFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UniformVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file UniformVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UpsideDownVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 100 of file UpsideDownVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file FeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianDensityKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file GaussianDensityKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file GaussianKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NullModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 207 of file NullModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ValueSelectRowsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file ValueSelectRowsVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VariableDeletionVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 96 of file VariableDeletionVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VecExtendedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 106 of file VecExtendedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ViewSplitterVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file ViewSplitterVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HashMapFeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 143 of file HashMapFeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GeneralizedDistanceRBFKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file GeneralizedDistanceRBFKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VecStatsCollector > *  opt,
PLearnDiff *  diffs 
)

Definition at line 338 of file VecStatsCollector.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GeodesicDistanceKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 176 of file GeodesicDistanceKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Calendar > *  opt,
PLearnDiff *  diffs 
)

Definition at line 312 of file Calendar.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IdentityFeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 101 of file IdentityFeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HTMLHelpGenerator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file HTMLHelpGenerator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VMatLanguage > *  opt,
PLearnDiff *  diffs 
)

Definition at line 163 of file VMatLanguage.h.

: public RowBufferedVMatrix
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IIDNoiseKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 146 of file IIDNoiseKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PreprocessingVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 198 of file VMatLanguage.h.

:1125)
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NearestNeighborPredictionCost > *  opt,
PLearnDiff *  diffs 
)

Definition at line 125 of file NearestNeighborPredictionCost.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 901 of file VMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VMatrixFromDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 125 of file VMatrixFromDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ObjectGenerator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 96 of file ObjectGenerator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 137 of file VVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AnalyzeDond2DiscreteVariables > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file AnalyzeDond2DiscreteVariables.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PythonFeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file PythonFeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AnalyzeFieldStats > *  opt,
PLearnDiff *  diffs 
)

Definition at line 178 of file AnalyzeFieldStats.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CheckDond2FileSequence > *  opt,
PLearnDiff *  diffs 
)

Definition at line 111 of file CheckDond2FileSequence.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Kernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 270 of file Kernel.h.

: public PP<Kernel>
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file PTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ComputeDond2Target > *  opt,
PLearnDiff *  diffs 
)

Definition at line 154 of file ComputeDond2Target.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ComputePurenneError > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file ComputePurenneError.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SetOption > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file SetOption.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PTimer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 142 of file PTimer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalMeanImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file ConditionalMeanImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Redirect > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file Redirect.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CovariancePreservationImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file CovariancePreservationImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DichotomizeDond2DiscreteVariables > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file DichotomizeDond2DiscreteVariables.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Experimentation > *  opt,
PLearnDiff *  diffs 
)

Definition at line 203 of file Experimentation.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WordNetFeatureSet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file WordNetFeatureSet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RunObject > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file RunObject.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FixDond2BinaryVariables > *  opt,
PLearnDiff *  diffs 
)

Definition at line 137 of file FixDond2BinaryVariables.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KroneckerBaseKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file KroneckerBaseKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MergeDond2Files > *  opt,
PLearnDiff *  diffs 
)

Definition at line 188 of file MergeDond2Files.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ShellScript > *  opt,
PLearnDiff *  diffs 
)

Definition at line 117 of file ShellScript.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeighborhoodConditionalMean > *  opt,
PLearnDiff *  diffs 
)

Definition at line 233 of file NeighborhoodConditionalMean.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeighborhoodImputationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file NeighborhoodImputationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LaplacianKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file LaplacianKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HeapTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file HeapTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Preprocessing > *  opt,
PLearnDiff *  diffs 
)

Definition at line 144 of file Preprocessing.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SecondIterationTester > *  opt,
PLearnDiff *  diffs 
)

Definition at line 100 of file SecondIterationTester.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SecondIterationWrapper > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file SecondIterationWrapper.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StabilisationLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file StabilisationLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TestImputations > *  opt,
PLearnDiff *  diffs 
)

Definition at line 197 of file TestImputations.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LiftBinaryCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 85 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WeightedDistance > *  opt,
PLearnDiff *  diffs 
)

Definition at line 83 of file WeightedDistance.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AutoScaledGradientOptimizer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file AutoScaledGradientOptimizer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OnlineGramNaturalGradientOptimizer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 156 of file OnlineGramNaturalGradientOptimizer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryStump > *  opt,
PLearnDiff *  diffs 
)

Definition at line 159 of file BinaryStump.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassifierFromConditionalPDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassifierFromDensity > *  opt,
PLearnDiff *  diffs 
)

Definition at line 146 of file ClassifierFromDensity.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LinearARDKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 148 of file LinearARDKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GradientOptimizer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file GradientOptimizer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KFoldLogisticClassifier > *  opt,
PLearnDiff *  diffs 
)

Definition at line 177 of file KFoldLogisticClassifier.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocalGaussianClassifier > *  opt,
PLearnDiff *  diffs 
)

Definition at line 214 of file LocalGaussianClassifier.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Optimizer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 181 of file Optimizer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FeatureSetNaiveBayesClassifier > *  opt,
PLearnDiff *  diffs 
)

Definition at line 165 of file FeatureSetNaiveBayesClassifier.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KNNClassifier > *  opt,
PLearnDiff *  diffs 
)

Definition at line 217 of file KNNClassifier.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LLEKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 160 of file LLEKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiInstanceNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 172 of file MultiInstanceNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SVMClassificationTorch > *  opt,
PLearnDiff *  diffs 
)

Definition at line 161 of file SVMClassificationTorch.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConjRosenbrock > *  opt,
PLearnDiff *  diffs 
)

Definition at line 97 of file ConjRosenbrock.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PythonCodeSnippet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 366 of file PythonCodeSnippet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ToBagClassifier > *  opt,
PLearnDiff *  diffs 
)

Definition at line 159 of file ToBagClassifier.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalDensityNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 320 of file ConditionalDensityNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 88 of file ConditionalDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LogOfGaussianDensityKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file LogOfGaussianDensityKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ManifoldParzenKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 87 of file ManifoldParzenKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalGaussianDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 105 of file ConditionalGaussianDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Distribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 147 of file Distribution.h.

:654)
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EmpiricalDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 101 of file EmpiricalDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianContinuumDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 279 of file GaussianContinuumDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianProcessRegressor > *  opt,
PLearnDiff *  diffs 
)
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocallyWeightedDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Matern1ARDKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 141 of file Matern1ARDKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocallyMagnifiedDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 161 of file LocallyMagnifiedDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeighborhoodBoxVolumeDensityEstimator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 147 of file NeighborhoodBoxVolumeDensityEstimator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransformationLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 917 of file TransformationLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MemoryCachedKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 199 of file MemoryCachedKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file GaussianDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussMix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 536 of file GaussMix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HistogramDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 179 of file HistogramDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PythonProcessedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 195 of file PythonProcessedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KernelDensityEstimator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 177 of file KernelDensityEstimator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MulticlassErrorCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 72 of file MulticlassErrorCostFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ManifoldParzen2 > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file ManifoldParzen2.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BasicIdentityCallsTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 144 of file BasicIdentityCallsTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MixtureDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 217 of file MixtureDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InjectionTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file InjectionTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NGramDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 182 of file NGramDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NGramTree > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file NGramTree.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NegKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file NegKernel.h.

{ return new NegKernel(k); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NonLocalManifoldParzen > *  opt,
PLearnDiff *  diffs 
)

Definition at line 288 of file NonLocalManifoldParzen.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InstanceSnippetTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 197 of file InstanceSnippetTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ParzenWindow > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file ParzenWindow.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NegLogProbCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file NegLogProbCostFunction.h.

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs,outstart,outend); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InterfunctionXchgTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file InterfunctionXchgTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 349 of file PDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RandomGaussMix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 107 of file RandomGaussMix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 186 of file RBMDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MemoryStressTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file MemoryStressTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SpiralDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file SpiralDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SymbolNode > *  opt,
PLearnDiff *  diffs 
)

Definition at line 144 of file SymbolNode.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NegOutputCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 67 of file NegOutputCostFunction.h.

{ return new NegOutputCostFunction(); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnconditionalDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file UnconditionalDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UniformDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 144 of file UniformDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeuralNetworkARDKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 144 of file NeuralNetworkARDKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AddCostToLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 228 of file AddCostToLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AddLayersNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 147 of file AddLayersNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BestAveragingPLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 228 of file BestAveragingPLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ChainedLearners > *  opt,
PLearnDiff *  diffs 
)

Definition at line 186 of file ChainedLearners.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DeepNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 213 of file DeepNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Learner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 568 of file Learner.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeuralNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 158 of file NeuralNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NonLocalManifoldParzenKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 83 of file NonLocalManifoldParzenKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DistRepNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 353 of file DistRepNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AbsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file AbsVariable.h.

{ return new AbsVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EmbeddedLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 200 of file EmbeddedLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CorrelationProfiler > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file CorrelationProfiler.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DeepReconstructorNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 274 of file DeepReconstructorNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NormalizedDotProductKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 73 of file NormalizedDotProductKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AffineTransformVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 89 of file AffineTransformVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, mNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 220 of file mNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NatGradEstimator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 192 of file NatGradItEstimator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NatGradNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 314 of file NatGradNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLearnerDiagonalKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file PLearnerDiagonalKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AffineTransformWeightPenalty > *  opt,
PLearnDiff *  diffs 
)

Definition at line 111 of file AffineTransformWeightPenalty.h.

{ return new AffineTransformWeightPenalty(transformation, weight_decay, bias_decay, penalty_type); } 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NatGradSMPNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 364 of file NatGradSMPNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ArgmaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PvGradNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 171 of file PvGradNNet.h.

int PLearn::diff ( PP< Object >  refer,
PP< Object >  other,
PLearnDiff *  diffs 
)

Useful function to compare two objects.

Definition at line 66 of file diff.cc.

References PLearn::PLearnDiff::diff(), and PLASSERT.

Referenced by PLearn::AdaptGradientOptimizer::adaptLearningRateBasic(), PLearn::HyperLearner::auto_save(), autoThreshLP(), PLearn::MarginPerceptronCostVariable::bprop(), PLearn::ModuleTester::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::ChemicalICP::cacheFeatureDistances(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::GaussianProcessRegressor::computeCostsFromOutputs(), PLearn::CompareLearner::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::SquaredExponentialARDKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::SquaredExponentialARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::NeuralNetworkARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspInputSigma(), computeInverseStandardDeviationFromMeanAndSquareMean(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), diff(), diffSquareMultiplyAcc(), diffSquareMultiplyScaledAcc(), PLearn::CompactVMatrix::dot(), PLearn::RowMapSparseValueMatrix< T >::euclidianDistance(), PLearn::RowMapSparseMatrix< real >::euclidianDistance(), PLearn::ProbSparseMatrix::euclidianDistance(), PLearn::SquaredExponentialARDKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), PLearn::PLMPI::exchangeBlocks(), PLearn::RBMModule::fprop(), PLearn::MarginPerceptronCostVariable::fprop(), PLearn::NatGradSMPNNet::fpropNet(), PLearn::NatGradNNet::fpropNet(), PLearn::StatsCollector::kurtosis(), log_rbf(), mahalanobis_distance(), max_cdf_diff(), powdistance(), PLearn::VMatCommand::run(), PLearn::DiffCommand::run(), PLearn::StatsCollector::skewness(), PLearn::GraphicalBiText::test_WSD(), PLearn::NGramDistribution::train(), variance(), and weighted_powdistance().

{
    bool delete_diffs = false;
    if (!diffs) {
        diffs = new PLearnDiff();
        delete_diffs = true;
    }
    PLASSERT(diffs);
    // Check objects are of the same class.
    string refer_class = refer ? refer->classname() : "null";
    string other_class = other ? other->classname() : "null";
    int n_diffs = diffs->diff(refer_class, other_class, "classname");
    if (n_diffs > 0)
        return n_diffs; // We cannot compare two objects from different classes.
    else if (!other && !refer)
        return 0; // Both objects are null pointers.
    PLASSERT( other && refer );
    OptionList& options = refer->getOptionList();
    for (OptionList::const_iterator it = options.begin(); it != options.end(); it++) {
        // pout << "Comparing " << (*it)->optionname() << endl;
        string option = (*it)->optionname();
        string refer_opt = refer->getOption(option);
        string other_opt = other->getOption(option);
        n_diffs += (*it)->diff(refer_opt, other_opt, diffs);
    }
    if (delete_diffs)
        delete diffs;
    return n_diffs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PolynomialKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 103 of file PolynomialKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FeatureSetNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 441 of file FeatureSetNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GradientCorrector > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file GradientCorrector.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ArgminVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HorizonStatefulLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 106 of file HorizonStatefulLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IdentityPLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 93 of file IdentityPLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IncrementalNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 254 of file IncrementalNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BiasWeightAffineTransformVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 98 of file BiasWeightAffineTransformVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeighborhoodSmoothnessNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 173 of file NeighborhoodSmoothnessNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PowDistanceKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file PowDistanceKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 291 of file NNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryClassificationLossVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file BinaryClassificationLossVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 727 of file PLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 101 of file BinaryVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PythonProcessedLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 208 of file PythonProcessedLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectInputSubsetLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 149 of file SelectInputSubsetLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 221 of file StackedLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PrecomputedKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 99 of file PrecomputedKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CCCostVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 97 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StatefulLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 153 of file StatefulLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TestingLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 177 of file TestingLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TorchLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 180 of file TorchLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PricingTransactionPairProfitFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file PricingTransactionPairProfitFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassificationLossVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file ClassificationLossVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransformOutputLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file TransformOutputLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VPLCombinedLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 183 of file VPLCombinedLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, QuadraticUtilityCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 83 of file QuadraticUtilityCostFunction.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ColumnIndexVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file ColumnIndexVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VPLPreprocessedLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 197 of file VPLPreprocessedLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VPLPreprocessedLearner2 > *  opt,
PLearnDiff *  diffs 
)

Definition at line 215 of file VPLPreprocessedLearner2.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VPLProcessor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 177 of file VPLProcessor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatColumnsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CartesianProductOracle > *  opt,
PLearnDiff *  diffs 
)

Definition at line 111 of file CartesianProductOracle.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatOfVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 85 of file ConcatOfVariable.h.

{ return new ConcatOfVariable(distr,f); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EarlyStoppingOracle > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file EarlyStoppingOracle.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExplicitListOracle > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file ExplicitListOracle.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RationalQuadraticARDKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 172 of file RationalQuadraticARDKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HyperCommand > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file HyperCommand.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatRowsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HyperLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file HyperLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HyperOptimize > *  opt,
PLearnDiff *  diffs 
)

Definition at line 194 of file HyperOptimize.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HyperRetrain > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file HyperRetrain.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConfRatedAdaboostCostVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file ConfRatedAdaboostCostVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HyperSetOption > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file HyperSetOption.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ReconstructionWeightsKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 213 of file ReconstructionWeightsKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OptimizeOptionOracle > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file OptimizeOptionOracle.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConvolveVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 72 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OptionsOracle > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file OptionsOracle.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OracleObjectGenerator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 102 of file OracleObjectGenerator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StepwiseSelectionOracle > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file StepwiseSelectionOracle.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CrossEntropyVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file CrossEntropyVariable.h.

{ return new CrossEntropyVariable(network_output, targets); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ScaledGaussianKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file ScaledGaussianKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CutAboveThresholdVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file CutAboveThresholdVariable.h.

{ return new CutAboveThresholdVariable(v,threshold); }
int PLearn::diff ( PLearnDiff *  diffs,
const string &  refer,
const string &  other,
const string &  name 
)

Just call diffs->diff(refer, other, name); This function is used so that it can be forward-declared.

Definition at line 133 of file PLearnDiff.cc.

References PLearn::PLearnDiff::diff(), and PLASSERT.

{
    PLASSERT( diffs );
    return diffs->diff(refer, other, name);
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CutBelowThresholdVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file CutBelowThresholdVariable.h.

{ return new CutBelowThresholdVariable(v,threshold); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ScaledGeneralizedDistanceRBFKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file ScaledGeneralizedDistanceRBFKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AdaBoost > *  opt,
PLearnDiff *  diffs 
)

Definition at line 226 of file AdaBoost.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BaggingLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 154 of file BaggingLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ScaledLaplacianKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 73 of file ScaledLaplacianKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CompareLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 171 of file CompareLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DeterminantVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiClassAdaBoost > *  opt,
PLearnDiff *  diffs 
)

Definition at line 220 of file MultiClassAdaBoost.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Experiment > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file Experiment.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DiagonalizedFactorsProductVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 85 of file DiagonalizedFactorsProductVariable.h.

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GenerateDecisionPlot > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file GenerateDecisionPlot.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PTester > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file PExperiment.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SelectedOutputCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file SelectedOutputCostFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DilogarithmVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 73 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Grapher > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file Grapher.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DivVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file DivVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DotProductVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PrecomputedProcessedLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 141 of file PrecomputedProcessedLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SigmoidalKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 73 of file SigmoidalKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DuplicateColumnVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file DuplicateColumnVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VariableSelectionWithDirectedGradientDescent > *  opt,
PLearnDiff *  diffs 
)
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BallTreeNearestNeighbors > *  opt,
PLearnDiff *  diffs 
)

Definition at line 210 of file BallTreeNearestNeighbors.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryBallTree > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file BinaryBallTree.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SigmoidPrimitiveKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file SigmoidPrimitiveKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExhaustiveNearestNeighbors > *  opt,
PLearnDiff *  diffs 
)

Definition at line 197 of file ExhaustiveNearestNeighbors.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DuplicateRowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file DuplicateRowVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GenericNearestNeighbors > *  opt,
PLearnDiff *  diffs 
)

Definition at line 179 of file GenericNearestNeighbors.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ArgmaxModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 263 of file ArgmaxModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BackConvolution2DModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 248 of file BackConvolution2DModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SourceKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file SourceKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DuplicateScalarVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file DuplicateScalarVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinarizeModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 289 of file BinarizeModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ElementAtPositionVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file ElementAtPositionVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassErrorCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 150 of file ClassErrorCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CombiningCostsModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 175 of file CombiningCostsModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EqualConstantVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Convolution2DModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 257 of file Convolution2DModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SquaredErrorCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 86 of file SquaredErrorCostFunction.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 198 of file CostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EqualScalarVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file EqualScalarVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CrossEntropyCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file CrossEntropyCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DeepBeliefNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 528 of file DeepBeliefNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianDBNClassification > *  opt,
PLearnDiff *  diffs 
)

Definition at line 299 of file GaussianDBNClassification.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SquaredExponentialARDKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 153 of file SquaredExponentialARDKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EqualVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file EqualVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianDBNRegression > *  opt,
PLearnDiff *  diffs 
)

Definition at line 286 of file GaussianDBNRegression.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ErfVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 69 of file ErfVariable.h.

{ return new ErfVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussPartSupervisedDBN > *  opt,
PLearnDiff *  diffs 
)

Definition at line 380 of file GaussPartSupervisedDBN.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HintonDeepBeliefNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 342 of file HintonDeepBeliefNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NLLErrModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file NLLErrModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AdditiveGaussianNoiseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file AdditiveGaussianNoiseVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PartSupervisedDBN > *  opt,
PLearnDiff *  diffs 
)

Definition at line 375 of file PartSupervisedDBN.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SummationKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file SummationKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BernoulliSampleVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 137 of file BernoulliSampleVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMBinomialLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMConv2DLLParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 236 of file RBMConv2DLLParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMGaussianLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConstrainedSourceVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file ConstrainedSourceVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMGenericParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 214 of file RBMGenericParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ThresholdedKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 178 of file ThresholdedKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMJointGenericParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 197 of file RBMJointGenericParameters.h.

template<class ObjectType , class OptionType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OptionType > *  opt,
PLearnDiff *  diffs 
)

Default diff function: compare the two strings.

Definition at line 85 of file diff.h.

References diff(), PLearn::OptionBase::optionname(), and PLASSERT.

{
    /*
    pout << "Calling basic diff with Option< ObjectType, "
         << opt->optiontype() << " >" << endl;
    */
    PLASSERT( diffs );
    return diff(diffs, refer, other, opt->optionname());
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConstrainVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMJointLLParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 184 of file RBMJointLLParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 166 of file DEPRECATED/RBMLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Cov2CorrVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file Cov2CorrVariable.h.

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMLLParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 208 of file RBMLLParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VMatKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 149 of file VMatKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMLQParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 195 of file RBMLQParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMixedLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DiagVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file DiagVariable.h.

{ return new DiagVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WeightedCostFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMultinomialLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DoubleProductVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 138 of file DoubleProductVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 196 of file RBMParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMQLParameters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 195 of file RBMQLParameters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LinearCombinationOfScalarVariables > *  opt,
PLearnDiff *  diffs 
)

Definition at line 157 of file LinearCombinationOfScalarVariables.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMTruncExpLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SquaredErrModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file SquaredErrModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WeightedQuadraticPolynomialKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 93 of file WeightedQuadraticPolynomialKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LogSoftSoftMaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file LogSoftSoftMaxVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedModulesLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 214 of file StackedModulesLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiMaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 162 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedModulesModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 199 of file StackedModulesModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SupervisedDBN > *  opt,
PLearnDiff *  diffs 
)

Definition at line 383 of file SupervisedDBN.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MultiSampleVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 142 of file MultiSampleVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UndirectedSoftmaxModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 147 of file UndirectedSoftmaxModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnfrozenDeepBeliefNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 125 of file UnfrozenDeepBeliefNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NonDiagVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file NonDiagVariable.h.

{ return new NonDiagVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KLp0p1RBMModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 338 of file KLp0p1RBMModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SemiSupervisedDBN > *  opt,
PLearnDiff *  diffs 
)

Definition at line 170 of file SemiSupervisedDBN.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SubsamplingDBN > *  opt,
PLearnDiff *  diffs 
)

Definition at line 439 of file SubsamplingDBN.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProbabilityPairsInverseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file ProbabilityPairsInverseVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TreeDBNModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 372 of file TreeDBNModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ForwardModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 178 of file ForwardModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GradNNetLayerModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 185 of file GradNNetLayerModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Binner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file Binner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProbabilityPairsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 143 of file ProbabilityPairsVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IdentityModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 190 of file IdentityModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InferenceRBM > *  opt,
PLearnDiff *  diffs 
)

Definition at line 184 of file InferenceRBM.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RandomForcedValuesVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 141 of file RandomForcedValuesVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LayerCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 245 of file LayerCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LinearCombinationModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 279 of file LinearCombinationModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SaltPepperNoiseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 143 of file SaltPepperNoiseVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LinearFilterModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 188 of file LinearFilterModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LogaddOnBagsModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file LogaddOnBagsModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 224 of file MatrixModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftSoftMaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file SoftSoftMaxVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MaxSubsampling2DModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 203 of file MaxSubsampling2DModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ModuleLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 210 of file ModuleLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumEntropyOfBernoullis > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file SumEntropyOfBernoullis.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ModulesLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 184 of file ModulesLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalCDFSmoother > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file ConditionalCDFSmoother.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumEntropyOfCategoricals > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file SumEntropyOfCategoricals.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ModuleStackModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 182 of file ModuleStackModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ModuleTester > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file ModuleTester.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NetworkConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 143 of file NetworkConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumVarianceOfLinearTransformedBernoullis > *  opt,
PLearnDiff *  diffs 
)

Definition at line 144 of file SumVarianceOfLinearTransformedBernoullis.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NetworkModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 185 of file NetworkModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NLLCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 145 of file NLLCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConditionalStatsCollector > *  opt,
PLearnDiff *  diffs 
)

Definition at line 172 of file ConditionalStatsCollector.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumVarianceOfLinearTransformedCategoricals > *  opt,
PLearnDiff *  diffs 
)
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OnBagsModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 155 of file OnBagsModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TimesConstantScalarVariable2 > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file TimesConstantScalarVariable2.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OnlineLearningModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 333 of file OnlineLearningModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConstantRealFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file ConstantRealFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProcessInputCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 190 of file ProcessInputCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMClassificationModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 190 of file RBMClassificationModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TraceVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file TraceVariable.h.

{ return new TraceVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 291 of file RBMConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMConv2DConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 242 of file RBMConv2DConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, X > *  opt,
PLearnDiff *  diffs 
)

Definition at line 172 of file ObjectGraphIteratorTest.cc.

: public X
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransposedDoubleProductVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file TransposedDoubleProductVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMDiagonalMatrixConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 220 of file RBMDiagonalMatrixConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMLateralBinomialLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 302 of file RBMLateralBinomialLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExpVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file ExpVariable.h.

{ return new ExpVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMLocalMultinomialLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 181 of file RBMLocalMultinomialLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExtendedVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 97 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMatrixConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 296 of file RBMMatrixConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMatrixConnectionNatGrad > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file RBMMatrixConnectionNatGrad.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMatrixTransposeConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 216 of file RBMMatrixTransposeConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExtractVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 86 of file ExtractVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMixedConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 243 of file RBMMixedConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 388 of file RBMModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FNetLayerVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file FNetLayerVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMMultitaskClassificationModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 201 of file RBMMultitaskClassificationModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Y > *  opt,
PLearnDiff *  diffs 
)

Definition at line 192 of file ObjectGraphIteratorTest.cc.

: public Object
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMRateLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 158 of file RBMRateLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Function > *  opt,
PLearnDiff *  diffs 
)

Definition at line 208 of file Func.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMSparse1DMatrixConnection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 146 of file RBMSparse1DMatrixConnection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMTrainer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 174 of file RBMTrainer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeanStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 134 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RBMWoodsLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 211 of file RBMWoodsLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianProcessNLLVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 230 of file GaussianProcessNLLVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ScaleGradientModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file ScaleGradientModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ShuntingNNetLayerModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 172 of file ShuntingNNetLayerModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GradientAdaboostCostVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file GradientAdaboostCostVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftmaxModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file SoftmaxModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ExpMeanStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 161 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftmaxNLLCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 147 of file SoftmaxNLLCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SplitModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 184 of file SplitModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HardSlopeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 73 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SquaredErrorCostModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file SquaredErrorCostModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedAutoassociatorsNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 595 of file StackedAutoassociatorsNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StddevStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 190 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HeterogenuousAffineTransformVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file HeterogenuousAffineTransformVariable.h.

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Subsampling2DModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 229 of file Subsampling2DModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Supersampling2DModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 229 of file Supersampling2DModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, HeterogenuousAffineTransformWeightPenalty > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file HeterogenuousAffineTransformWeightPenalty.h.

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TanhModule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 137 of file TanhModule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MaxSubsamplingTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 136 of file MaxSubsamplingTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StderrStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 219 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VBoundDBN2 > *  opt,
PLearnDiff *  diffs 
)

Definition at line 297 of file VBoundDBN2.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IdentityVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 61 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AutoLinearRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 185 of file AutoLinearRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, double > *  opt,
PLearnDiff *  diffs 
)

diff for double.

Definition at line 98 of file diff.h.

References diff(), PLearn::PStream::flush(), get_absolute_tolerance(), get_relative_tolerance(), in, is_equal(), openString(), and PLearn::OptionBase::optionname().

{
    double x_refer, x_other;
    PStream in = openString(refer, PStream::plearn_ascii);
    in >> x_refer;
    in.flush();
    in = openString(other, PStream::plearn_ascii);
    in >> x_other;
    in.flush();
    if (is_equal(real(x_refer), real(x_other), 1.0,
                 get_absolute_tolerance(diffs), get_relative_tolerance(diffs)))
        return 0;
    else
        return diff(diffs, refer, other, opt->optionname());
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BaseRegressorConfidence > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file BaseRegressorConfidence.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IfThenElseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BaseRegressorWrapper > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file BaseRegressorWrapper.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SharpeRatioStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 254 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BasisSelectionRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 248 of file BasisSelectionRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConstantRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 163 of file ConstantRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Z > *  opt,
PLearnDiff *  diffs 
)

Definition at line 219 of file ObjectGraphIteratorTest.cc.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IndexAtPositionVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file IndexAtPositionVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CubicSpline > *  opt,
PLearnDiff *  diffs 
)

Definition at line 152 of file CubicSpline.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, float > *  opt,
PLearnDiff *  diffs 
)

diff for float.

Definition at line 116 of file diff.h.

References diff(), PLearn::PStream::flush(), get_absolute_tolerance(), get_relative_tolerance(), in, is_equal(), openString(), and PLearn::OptionBase::optionname().

{
    // TODO Avoid code duplication with double.
    float x_refer, x_other;
    PStream in = openString(refer, PStream::plearn_ascii);
    in >> x_refer;
    in.flush();
    in = openString(other, PStream::plearn_ascii);
    in >> x_other;
    in.flush();
    if (is_equal(real(x_refer), real(x_other), 1.0,
                 get_absolute_tolerance(diffs), get_relative_tolerance(diffs)))
        return 0;
    else
        return diff(diffs, refer, other, opt->optionname());
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KernelRidgeRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 170 of file KernelRidgeRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InsertZerosVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 72 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MinStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 277 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KNNRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 195 of file KNNRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LinearRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 210 of file LinearRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InterValuesVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocalMedBoost > *  opt,
PLearnDiff *  diffs 
)

Definition at line 162 of file LocalMedBoost.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLS > *  opt,
PLearnDiff *  diffs 
)

Definition at line 192 of file PLS.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MaxStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 300 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, InvertElementsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 70 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PruningLinearRegressor > *  opt,
PLearnDiff *  diffs 
)

Definition at line 136 of file PruningLinearRegressor.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RankLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 178 of file RankLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IsAboveThresholdVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTree > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file RegressionTree.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeLeave > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file RegressionTreeLeave.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ObjectGraphIteratorTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file ObjectGraphIteratorTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LiftStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 338 of file StatsIterator.h.

: public StatsIterator
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeMulticlassLeave > *  opt,
PLearnDiff *  diffs 
)

Definition at line 97 of file RegressionTreeMulticlassLeave.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeMulticlassLeaveFast > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file RegressionTreeMulticlassLeaveFast.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IsLargerVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeMulticlassLeaveProb > *  opt,
PLearnDiff *  diffs 
)

Definition at line 96 of file RegressionTreeMulticlassLeaveProb.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeNode > *  opt,
PLearnDiff *  diffs 
)

Definition at line 147 of file RegressionTreeNode.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, QuantilesStatsIterator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 372 of file StatsIterator.h.

: public Array<StatsIt>
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IsMissingVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 96 of file IsMissingVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeQueue > *  opt,
PLearnDiff *  diffs 
)

Definition at line 94 of file RegressionTreeQueue.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressionTreeRegisters > *  opt,
PLearnDiff *  diffs 
)

Definition at line 196 of file RegressionTreeRegisters.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RegressorFromDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 174 of file RegressorFromDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IsSmallerVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WPLS > *  opt,
PLearnDiff *  diffs 
)

Definition at line 185 of file WPLS.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EmbeddedSequentialLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file EmbeddedSequentialLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LeftPseudoInverseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file LeftPseudoInverseVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MovingAverage > *  opt,
PLearnDiff *  diffs 
)

Definition at line 93 of file MovingAverage.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SequentialLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 174 of file SequentialLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LiftOutputVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 69 of file LiftOutputVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SequentialModelSelector > *  opt,
PLearnDiff *  diffs 
)

Definition at line 187 of file SequentialModelSelector.h.

template<class ObjectType , class VecElementType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TVec< VecElementType > > *  opt,
PLearnDiff *  diffs 
)

diff for TVec<>.

Definition at line 135 of file diff.h.

References diff(), PLearn::PStream::flush(), i, in, n, openString(), and tostring().

{
    // pout << "Calling diff(..., const Option<ObjectType, TVec<T> > opt, ...)" << endl;
    int n_diffs = 0;
    TVec<VecElementType> refer_vec;
    TVec<VecElementType> other_vec;
    string option = opt->optionname();
    PStream in;
    in = openString(refer, PStream::plearn_ascii);
    in >> refer_vec;
    in = openString(other, PStream::plearn_ascii);
    in >> other_vec;
    in.flush();
    int n = refer_vec.length();
    if (other_vec.length() != n) {
        // pout << "Not same length" << endl;
        // If the two vectors do not have the same size, no need to go further.
        n_diffs += diff(diffs, tostring(n), tostring(other_vec.length()),
                        opt->optionname() + ".length");
    }
    else {
        PP<OptionBase> option_elem = new Option<ObjectType, VecElementType>
            ("", 0, 0, TypeTraits<VecElementType>::name(), "", "", opt->level());//level could be anything here, I guess? -xsm
        string refer_i, other_i;
        // pout << "TVec of " << TypeTraits<VecElementType>::name() << endl;
        for (int i = 0; i < n; i++) {
            option_elem->setOptionName(opt->optionname() + "[" + tostring(i) + "]");
            PStream out = openString(refer_i, PStream::plearn_ascii, "w");
            out << refer_vec[i];
            out.flush();
            out = openString(other_i, PStream::plearn_ascii, "w");
            out << other_vec[i];
            out.flush();
            n_diffs += option_elem->diff(refer_i, other_i, diffs);
        }
    }
    return n_diffs;
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SequentialValidation > *  opt,
PLearnDiff *  diffs 
)

Definition at line 265 of file SequentialValidation.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LocalizedFeaturesLayerVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file LocalizedFeaturesLayerVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TestMethod > *  opt,
PLearnDiff *  diffs 
)

Definition at line 89 of file TestMethod.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PerformanceEvaluator > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file PerformanceEvaluator.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Train > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file Train.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LogAddVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 108 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EntropyContrast > *  opt,
PLearnDiff *  diffs 
)

Definition at line 281 of file EntropyContrast.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LogSoftmaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file LogSoftmaxVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, EntropyContrastLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 218 of file EntropyContrastLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DiverseComponentAnalysis > *  opt,
PLearnDiff *  diffs 
)

Definition at line 240 of file DiverseComponentAnalysis.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussianContinuum > *  opt,
PLearnDiff *  diffs 
)

Definition at line 281 of file GaussianContinuum.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LogVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 70 of file LogVariable.h.

{ return new LogVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, GaussMixLocalProjections > *  opt,
PLearnDiff *  diffs 
)

Definition at line 165 of file GaussMixLocalProjections.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Isomap > *  opt,
PLearnDiff *  diffs 
)

Definition at line 135 of file Isomap.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MarginPerceptronCostVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file MarginPerceptronCostVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, IsomapTangentLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 181 of file IsomapTangentLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KernelPCA > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file KernelPCA.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KernelProjection > *  opt,
PLearnDiff *  diffs 
)

Definition at line 189 of file KernelProjection.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixAffineTransformFeedbackVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file MatrixAffineTransformFeedbackVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KMeansClustering > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file KMeansClustering.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixAffineTransformVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file MatrixAffineTransformVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, KPCATangentLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 179 of file KPCATangentLearner.h.

template<class ObjectType , class MatElementType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TMat< MatElementType > > *  opt,
PLearnDiff *  diffs 
)

diff for TMat<>.

Definition at line 176 of file diff.h.

References diff(), PLearn::PStream::flush(), i, in, j, n, openString(), tostring(), and w.

{
    // pout << "Calling diff(..., const Option<ObjectType, TMat<T> > opt, ...)" << endl;
    TMat<MatElementType> refer_mat;
    TMat<MatElementType> other_mat;
    string option = opt->optionname();
    PStream in;
    in = openString(refer, PStream::plearn_ascii);
    in >> refer_mat;
    in = openString(other, PStream::plearn_ascii);
    in >> other_mat;
    in.flush();
    int n = refer_mat.length();
    if (other_mat.length() != n)
        // If the two matrices do not have the same length, no need to go further.
        return diff(diffs, tostring(n), tostring(other_mat.length()),
                    opt->optionname() + ".length");
    int w = refer_mat.width();
    if (other_mat.width() != w)
        // If the two matrices do not have the same width, no need to go further.
        return diff(diffs, tostring(w), tostring(other_mat.width()),
                    opt->optionname() + ".width");
    int n_diffs = 0;
    PP<OptionBase> option_elem = new Option<ObjectType, MatElementType>
        ("", 0, 0, TypeTraits<MatElementType>::name(), "", "", opt->level());//level could be anything here, I guess? -xsm
    string refer_ij, other_ij;
    for (int i = 0; i < n; i++)
        for (int j = 0; j < w; j++) {
            option_elem->setOptionName(opt->optionname() + "(" + tostring(i)
                                       + "," + tostring(j) + ")");
            PStream out = openString(refer_ij, PStream::plearn_ascii, "w");
            out << refer_mat(i,j);
            out.flush();
            out = openString(other_ij, PStream::plearn_ascii, "w");
            out << other_mat(i,j);
            out.flush();
            n_diffs += option_elem->diff(refer_ij, other_ij, diffs);
        }
    return n_diffs;
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LLC > *  opt,
PLearnDiff *  diffs 
)

Definition at line 163 of file LLC.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LLE > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file LLE.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLCheckTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file PLCheckTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixElementsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 92 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NormalizationLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 187 of file NormalizationLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PCA > *  opt,
PLearnDiff *  diffs 
)

Definition at line 234 of file PCA.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixInverseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file MatrixInverseVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SpectralClustering > *  opt,
PLearnDiff *  diffs 
)

Definition at line 123 of file SpectralClustering.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TangentLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 206 of file TangentLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixOneHotSquaredLoss > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file MatrixOneHotSquaredLoss.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TargetEncodingLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 196 of file TargetEncodingLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UniformizeLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 187 of file UniformizeLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryKernelDiscrimination > *  opt,
PLearnDiff *  diffs 
)

Definition at line 146 of file BinaryKernelDiscrimination.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixSoftmaxLossVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file MatrixSoftmaxLossVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Correspondence > *  opt,
PLearnDiff *  diffs 
)

Definition at line 117 of file Correspondence.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixSoftmaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file MatrixSoftmaxVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DeepFeatureExtractorNNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 340 of file DeepFeatureExtractorNNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DeepNonLocalManifoldParzen > *  opt,
PLearnDiff *  diffs 
)

Definition at line 353 of file DeepNonLocalManifoldParzen.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatrixSumOfVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 94 of file MatrixSumOfVariable.h.

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DenoisingRecurrentNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 524 of file DenoisingRecurrentNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MoleculeTemplateLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 236 of file MoleculeTemplateLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TestLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 176 of file TestLearner.h.

template<class ObjectType , class MapKeyType , class MapElementType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, map< MapKeyType, MapElementType > > *  opt,
PLearnDiff *  diffs 
)

diff for map.

Definition at line 219 of file diff.h.

References PLearn::TVec< T >::append(), diff(), PLearn::TVec< T >::first(), PLearn::PStream::flush(), i, in, j, PLearn::TVec< T >::length(), openString(), PLearn::TVec< T >::remove(), setSaveDiffs(), and tostring().

{
    // pout << "Calling diff(..., const Option<ObjectType, TVec<T> > opt, ...)" << endl;
    int n_diffs = 0;
    map<MapKeyType, MapElementType> refer_map;
    map<MapKeyType, MapElementType> other_map;
    string option = opt->optionname();
    PStream in;
    in = openString(refer, PStream::plearn_ascii);
    in >> refer_map;
    in = openString(other, PStream::plearn_ascii);
    in >> other_map;
    in.flush();
    PP<OptionBase> option_elem = new Option<ObjectType, MapElementType>
        ("", 0, 0, TypeTraits<MapElementType>::name(), "", "", opt->level());//level could be anything here, I guess? -xsm
    string refer_i, other_i;
    typename map<MapKeyType, MapElementType>::iterator it_refer;
    typename map<MapKeyType, MapElementType>::iterator it_other;
    it_refer = refer_map.begin();
    it_other = other_map.begin();
    TVec<string> missing_in_refer, missing_in_other;
    while (it_refer != refer_map.end()) {
        const MapKeyType& refer_key = it_refer->first;
        option_elem->setOptionName(opt->optionname() + "[ " +
                tostring(refer_key) + " ]");
        if (other_map.find(refer_key) == other_map.end()) {
            // 'refer_map' contains a key 'other_map' does not.
            PStream out =
                openString(refer_i, PStream::plearn_ascii, "w");
            out << refer_key;
            out.flush();
            /*
            refer_i = "<In map>";
            other_i = "<Not in map>";
            n_diffs += option_elem->diff(refer_i, other_i, diffs);
            */
            missing_in_other.append(refer_i);
        } else {
            // Compare the two values.
            const MapElementType& refer_val = it_refer->second;
            const MapElementType& other_val = other_map[refer_key];
            PStream out =
                openString(refer_i, PStream::plearn_ascii, "w");
            out << refer_val;
            out.flush();
            out =
                openString(other_i, PStream::plearn_ascii, "w");
            out << other_val;
            out.flush();
            n_diffs += option_elem->diff(refer_i, other_i, diffs);
        }
        it_refer++;
    }
    // Now look for keys in 'other_map' not present in 'refer_map'.
    while (it_other != other_map.end()) {
        const MapKeyType& other_key = it_other->first;
        option_elem->setOptionName(opt->optionname() + "[ " +
                tostring(other_key) + " ]");
        if (refer_map.find(other_key) == refer_map.end()) {
            PStream out =
                openString(other_i, PStream::plearn_ascii, "w");
            out << other_key;
            out.flush();
            /*
            refer_i = "<Not in map>";
            other_i = "<In map>";
            n_diffs += option_elem->diff(refer_i, other_i, diffs);
            */
            missing_in_refer.append(other_i);
        }
        it_other++;
    }
    /* TODO See how to compare keys properly.
     */
    // Now deal with different keys.
    PP<OptionBase> option_key = new Option<ObjectType, MapKeyType>
        ("", 0, 0, TypeTraits<MapKeyType>::name(), "", "", opt->level());//level could be anything here, I guess? -xsm
    bool save_diffs_backup;
    setSaveDiffs(diffs, false, &save_diffs_backup);
    for (int i = 0; i < missing_in_other.length(); i++) {
        for (int j = 0; j < missing_in_refer.length(); j++) {
            int is_diff =
                option_key->diff(missing_in_other[i], missing_in_refer[j],
                        diffs);
            if (is_diff == 0) {
                // The keys are actually the same (even if not exactly).
                missing_in_refer.remove(j);
                j = missing_in_refer.length(); // No need to go further.
                missing_in_other.remove(i);
                i--;
            }
        }
    }
    setSaveDiffs(diffs, save_diffs_backup, 0);
    for (int i = 0; i < missing_in_other.length(); i++) {
        n_diffs += diff(diffs, "<In map>", "<Not in map>",
                opt->optionname() + "[ " + missing_in_other[i] + " ] ");
    }
    for (int i = 0; i < missing_in_refer.length(); i++) {
        n_diffs += diff(diffs, "<Not in map>", "<In map>",
                opt->optionname() + "[ " + missing_in_refer[i] + " ] ");
    }

    return n_diffs;
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLStringutilsTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file PLStringutilsTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DiscriminativeDeepBeliefNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 315 of file DiscriminativeDeepBeliefNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MatRowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DiscriminativeRBM > *  opt,
PLearnDiff *  diffs 
)

Definition at line 311 of file DiscriminativeRBM.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, DynamicallyLinkedRBMsModel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 291 of file DynamicallyLinkedRBMsModel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, FeatureSetSequentialCRF > *  opt,
PLearnDiff *  diffs 
)

Definition at line 434 of file FeatureSetSequentialCRF.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Max2Variable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 70 of file MaxVariable.h.

{ return new MaxVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ParentableObject > *  opt,
PLearnDiff *  diffs 
)

Definition at line 160 of file ParentableObject.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Min2Variable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LiftStatsCollector > *  opt,
PLearnDiff *  diffs 
)

Definition at line 170 of file LiftStatsCollector.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ICP > *  opt,
PLearnDiff *  diffs 
)

Definition at line 205 of file ICP.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MiniBatchClassificationLossVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file MiniBatchClassificationLossVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LinearInductiveTransferClassifier > *  opt,
PLearnDiff *  diffs 
)

Definition at line 283 of file LinearInductiveTransferClassifier.h.

template<class ObjectType , class PointedType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PP< PointedType > > *  opt,
PLearnDiff *  diffs 
)

diff for PP<PointedType>.

If PointedType does not inherit from Object, use the default 'diff' function that simply compares the two strings.

Definition at line 330 of file diff.h.

References addDiffPrefix(), diff(), in, PLearn::PP< T >::isNotNull(), PLearn::PP< T >::isNull(), openString(), and PLASSERT.

{
    // pout << "Calling diff with Option< ObjectType, " << opt->optiontype() << " >" << endl;
    PP<PointedType> refer_pp, other_pp;
    PP<Object> refer_obj, other_obj;
    PStream in = openString(refer, PStream::plearn_ascii);
    in >> refer_pp;
    in = openString(other, PStream::plearn_ascii);
    in >> other_pp;
    refer_obj = dynamic_cast<Object*>((PointedType*) refer_pp);
    if (refer_obj.isNull())
        // This is actually not an object: just compare the two strings.
        return diff(diffs, refer, other, opt->optionname());
    other_obj = dynamic_cast<Object*>((PointedType*) other_pp);
    PLASSERT( other_obj.isNotNull() );
    int n_diffs = diff(refer_obj, other_obj, diffs);
    addDiffPrefix(diffs, opt->optionname() + ".", n_diffs);
    return n_diffs;
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, LimitedGaussianSmoother > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file LimitedGaussianSmoother.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MinusColumnVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file MinusColumnVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ManifoldKNNDistribution > *  opt,
PLearnDiff *  diffs 
)

Definition at line 198 of file ManifoldKNNDistribution.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ManifoldParzen > *  opt,
PLearnDiff *  diffs 
)

Definition at line 186 of file ManifoldParzen.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeshEdge > *  opt,
PLearnDiff *  diffs 
)

Definition at line 120 of file MeshEdge.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MinusRowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file MinusRowVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeshFace > *  opt,
PLearnDiff *  diffs 
)

Definition at line 142 of file MeshFace.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MinusTransposedColumnVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file MinusTransposedColumnVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeshGraph > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file MeshGraph.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ManualBinner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file ManualBinner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MinusVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file MinusVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeshMatch > *  opt,
PLearnDiff *  diffs 
)

Definition at line 131 of file MeshMatch.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MeshVertex > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file MeshVertex.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Molecule > *  opt,
PLearnDiff *  diffs 
)

Definition at line 67 of file Molecule.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MinVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 68 of file MinVariable.h.

{ return new MinVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NxProfileLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 207 of file NxProfileLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NeuralProbabilisticLanguageModel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 465 of file NeuralProbabilisticLanguageModel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MulticlassLossVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file MulticlassLossVariable.h.

{ return new MulticlassLossVariable(network_output, targets); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NLLNeighborhoodWeightsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file NLLNeighborhoodWeightsVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PPTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file PPTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NnlmOnlineLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 280 of file NnlmOnlineLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NegateElementsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file NegateElementsVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NnlmOutputLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 334 of file NnlmOutputLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NnlmWordRepresentationLayer > *  opt,
PLearnDiff *  diffs 
)

Definition at line 194 of file NnlmWordRepresentationLayer.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PseudolikelihoodRBM > *  opt,
PLearnDiff *  diffs 
)

Definition at line 437 of file PseudolikelihoodRBM.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NegCrossEntropySigmoidVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 87 of file NegCrossEntropySigmoidVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RankingFromKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 179 of file RankingFromKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedFocusedAutoassociatorsNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 365 of file StackedFocusedAutoassociatorsNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StackedSVDNet > *  opt,
PLearnDiff *  diffs 
)

Definition at line 270 of file StackedSVDNet.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ObservationWindow > *  opt,
PLearnDiff *  diffs 
)

Definition at line 143 of file ObservationWindow.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NegLogPoissonVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file NegLogPoissonVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StructuralLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 244 of file StructuralLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SurfaceMesh > *  opt,
PLearnDiff *  diffs 
)

Definition at line 227 of file SurfaceMesh.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NllGeneralGaussianVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 103 of file NllGeneralGaussianVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ChemicalICP > *  opt,
PLearnDiff *  diffs 
)

Definition at line 288 of file ChemicalICP.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NllSemisphericalGaussianVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 91 of file NllSemisphericalGaussianVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, NoBpropVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 88 of file var/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, MoleculeTemplate > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file MoleculeTemplate.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RunICPVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 181 of file RunICPVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ScoreLayerVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 202 of file ScoreLayerVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ObjectOptionVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 171 of file ObjectOptionVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SurfaceTemplateLearner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 148 of file SurfaceTemplateLearner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Template > *  opt,
PLearnDiff *  diffs 
)

Definition at line 61 of file Template.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TopDownAsymetricDeepNetwork > *  opt,
PLearnDiff *  diffs 
)

Definition at line 282 of file TopDownAsymetricDeepNetwork.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WeightedLogGaussian > *  opt,
PLearnDiff *  diffs 
)

Definition at line 90 of file WeightedLogGaussian.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OneHotSquaredLoss > *  opt,
PLearnDiff *  diffs 
)

Definition at line 86 of file OneHotSquaredLoss.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OneHotVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file OneHotVariable.h.

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, OutputVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file OutputVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PDistributionVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 83 of file PDistributionVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLogPVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file PLogPVariable.h.

{ return new PLogPVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PlusColumnVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file PlusColumnVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PlusConstantVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 94 of file PlusConstantVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PlusManyVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file PlusManyVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VMat > *  opt,
PLearnDiff *  diffs 
)

diff for VMat.

Definition at line 390 of file diff.h.

References diff().

{
    return diff(refer, other,
                (Option<ObjectType, PP<VMatrix> >*) opt, diffs);
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PlusRowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file PlusRowVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PlusScalarVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file PlusScalarVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransparentParentable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 316 of file ParentableObject.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PlusVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file PlusVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Var > *  opt,
PLearnDiff *  diffs 
)

diff for Var.

Definition at line 399 of file diff.h.

References diff().

{
    return diff(refer, other,
                (Option<ObjectType, PP<Variable> >*) opt, diffs);
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PotentialsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 95 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file PowVariable.h.

{ return new PowVariable(v,power); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PowVariableVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 88 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProductTransposeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file ProductTransposeVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProductVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ProjectionErrorVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 96 of file ProjectionErrorVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ReIndexedTargetVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 103 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ReshapeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file ReshapeVariable.h.

{ return new ReshapeVariable(v,newlength,newwidth); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RightPseudoInverseVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file RightPseudoInverseVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowAtPositionVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 87 of file RowAtPositionVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowOfVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 84 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowSumSquareVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file RowSumSquareVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RowSumVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file RowSumVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SemiSupervisedProbClassCostVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 127 of file SemiSupervisedProbClassCostVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SigmoidVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SignVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 70 of file SignVariable.h.

{ return new SignVariable(input); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftmaxLossVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file SoftmaxLossVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftmaxVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 72 of file SoftmaxVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftplusVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PRandom > *  opt,
PLearnDiff *  diffs 
)

Definition at line 307 of file PRandom.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftSlopeIntegralVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file SoftSlopeIntegralVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftSlopeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SourceVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 118 of file SourceVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SparseIncrementalAffineTransformVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 109 of file SparseIncrementalAffineTransformVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SquareRootVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SquareVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file SquareVariable.h.

{ return new SquareVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SubMatTransposeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 88 of file SubMatTransposeVariable.h.

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SubMatVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 104 of file SubMatVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SubsampleVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumAbsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumOfVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 158 of file SumOfVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file RealFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumOverBagsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file SumOverBagsVariable.h.

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealFunctionFromKernel > *  opt,
PLearnDiff *  diffs 
)

Definition at line 120 of file RealFunctionFromKernel.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumSquareVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 71 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SumVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file SumVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SVDVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 76 of file SVDVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealFunctionOfInputFeature > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file RealFunctionOfInputFeature.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TanhVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 73 of file TanhVariable.h.

{ return new TanhVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VariablesTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file VariablesTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealFunctionProduct > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file RealFunctionProduct.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VarUtilsTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file VarUtilsTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealRangeIndicatorFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 117 of file RealRangeIndicatorFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ThresholdBpropVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 88 of file ThresholdBpropVariable.h.

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TimesColumnVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file TimesColumnVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TimesConstantVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 87 of file TimesConstantVariable.h.

{ 
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RealValueIndicatorFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file RealValueIndicatorFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TimesRowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file TimesRowVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TimesScalarVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file TimesScalarVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TimesVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 75 of file TimesVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ScaledConditionalCDFSmoother > *  opt,
PLearnDiff *  diffs 
)

Definition at line 129 of file ScaledConditionalCDFSmoother.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransposeProductVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file TransposeProductVariable.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TransposeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 36 of file TransposeVariable.h.

{ return new TransposeVariable(v); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ShiftAndRescaleFeatureRealFunction > *  opt,
PLearnDiff *  diffs 
)

Definition at line 119 of file ShiftAndRescaleFeatureRealFunction.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnaryHardSlopeVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 81 of file UnaryHardSlopeVariable.h.

{ return new UnaryHardSlopeVariable(v,l,r); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnaryVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 112 of file UnaryVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Smoother > *  opt,
PLearnDiff *  diffs 
)

Definition at line 124 of file Smoother.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnequalConstantVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, SoftHistogramBinner > *  opt,
PLearnDiff *  diffs 
)

Definition at line 133 of file SoftHistogramBinner.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnfoldedFuncVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 93 of file UnfoldedFuncVariable.h.

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, UnfoldedSumOfVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 89 of file UnfoldedSumOfVariable.h.

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StatsCollectorCounts > *  opt,
PLearnDiff *  diffs 
)

Definition at line 100 of file StatsCollector.h.

References PLearn::Option< T, Enclosing >::diff(), in, PLearn::OptionBase::level(), openString(), PLearn::OptionBase::optionname(), PLearn::PStream::plearn_ascii, PLearn::OptionBase::setOptionName(), and tostring().

{
    StatsCollectorCounts refer_sc, other_sc;
    PStream in = openString(refer, PStream::plearn_ascii);
    in >> refer_sc;
    in = openString(other, PStream::plearn_ascii);
    in >> other_sc;
    int n_diffs = 0;
    PP<OptionBase> opt_double = new Option<ObjectType, double>
        ("", 0, 0, TypeTraits<double>::name(), "", "", opt->level());
    PP<OptionBase> opt_int = new Option<ObjectType, int>
        ("", 0, 0, TypeTraits<int>::name(), "", "", opt->level());
    opt_double->setOptionName(opt->optionname() + ".n");
    n_diffs +=  opt_double->diff(tostring(refer_sc.n),
                                 tostring(other_sc.n), diffs);
    opt_double->setOptionName(opt->optionname() + ".nbelow");
    n_diffs += opt_double->diff(tostring(refer_sc.nbelow),
                                tostring(other_sc.nbelow), diffs);
    opt_double->setOptionName(opt->optionname() + ".sum");
    n_diffs += opt_double->diff(tostring(refer_sc.sum),
                                tostring(other_sc.sum), diffs);
    opt_double->setOptionName(opt->optionname() + ".sumsquare");
    n_diffs += opt_double->diff(tostring(refer_sc.sumsquare),
                                tostring(other_sc.sumsquare), diffs);
    opt_int->setOptionName(opt->optionname() + ".id");
    n_diffs += opt_int->diff(tostring(refer_sc.id),
                                tostring(other_sc.id), diffs);
    return n_diffs;
}

Here is the call graph for this function:

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VarArrayElementVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 77 of file VarArrayElementVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, StatsCollector > *  opt,
PLearnDiff *  diffs 
)

Definition at line 400 of file StatsCollector.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VarColumnsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 74 of file VarColumnsVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VarElementVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 82 of file VarElementVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, Variable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 485 of file Variable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PentaTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file PentaTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VarRowsVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 79 of file VarRowsVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VarRowVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file VarRowVariable.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLMathTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 128 of file PLMathTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, VecElementVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file VecElementVariable.h.

{ return new VecElementVariable(v,index); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, WeightedSumSquareVariable > *  opt,
PLearnDiff *  diffs 
)

Definition at line 78 of file WeightedSumSquareVariable.h.

{ return new WeightedSumSquareVariable(v,w); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, TMatTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 139 of file TMatTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AddBagInformationVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 126 of file AddBagInformationVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, RemoveObservationTest > *  opt,
PLearnDiff *  diffs 
)

Definition at line 111 of file RemoveObservationTest.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AddMissingVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 131 of file AddMissingVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AppendNeighborsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 130 of file AppendNeighborsVMatrix.h.

{
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AsciiVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 115 of file AsciiVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AutoVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 103 of file AutoVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, AutoVMatrixSaveSource > *  opt,
PLearnDiff *  diffs 
)

Definition at line 90 of file AutoVMatrixSaveSource.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryNumbersVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 146 of file BinaryNumbersVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinaryOpVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 121 of file BinaryOpVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, PLearnDiff > *  opt,
PLearnDiff *  diffs 
)

Definition at line 140 of file PLearnDiff.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BinSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 131 of file BinSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BootstrapSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 136 of file BootstrapSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, BootstrapVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 102 of file BootstrapVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ByteMemoryVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 80 of file ByteMemoryVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CenteredVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 120 of file CenteredVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassSeparationSplitter > *  opt,
PLearnDiff *  diffs 
)

Definition at line 143 of file ClassSeparationSplitter.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ClassSubsetVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 132 of file ClassSubsetVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CompactFileVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 181 of file CompactFileVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CompactVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 203 of file CompactVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, CompressedVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 122 of file CompressedVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatColumnsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 113 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatRowsSubVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 116 of file ConcatRowsSubVMatrix.h.

template<class ObjectType >
int PLearn::diff ( const string &  refer,
const string &  other,
const Option< ObjectType, ConcatRowsVMatrix > *  opt,
PLearnDiff *  diffs 
)

Definition at line 151 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
void PLearn::difference ( Set  a,
Set  b,
Set  res 
) [inline]

Definition at line 93 of file Set.h.

References PLearn::Set::begin(), and PLearn::Set::end().

{
    set_difference(a.begin(), a.end(),
                   b.begin(), b.end(),
                   insert_iterator<PPointableSet>(*res, res.begin()));
}

Here is the call graph for this function:

template<class T >
void PLearn::diffSquareMultiplyAcc ( const TVec< T > &  vec,
const TVec< T > &  x,
const TVec< T > &  y,
scale 
)

TVec[i] += (x[i]-y[i])^2*scale;.

Definition at line 2770 of file TMat_maths_impl.h.

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

Referenced by PLearn::DiagonalNormalRandomVariable::EMBprop(), and PLearn::LinearInductiveTransferClassifier::train().

{
    int n=x.length();
    if (vec.length()!=n || y.length()!=n)
        PLERROR("TVec::diffSquareMultiplyAcc this.length_=%d, x.length_=%d, y.length_=%d",
                vec.length(),n,y.length());
    T* p=vec.data();
    T* xp=x.data();
    T* yp=y.data();
    for (int i=0;i<n;i++)
    {
        T diff = xp[i]-yp[i];
        p[i] += scale * diff * diff;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::diffSquareMultiplyAcc ( const TMat< T > &  mat,
const TMat< T > &  x,
const TMat< T > &  y,
scale 
)

Definition at line 4683 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), diff(), i, PLearn::TMat< T >::length(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=x.length()*x.width();
    if (mat.length()*mat.width()!=n)
        PLERROR("diffSquareMultiplyAcc this has size=%d and x has size=%d",
                mat.width()*mat.length(),n);
    T* p=mat.data();
    T* xp=x.data();
    T* yp=y.data();
    for (int i=0;i<n;i++)
    {
        T diff = (xp[i]-yp[i]);
        p[i] += scale * diff * diff;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::diffSquareMultiplyScaledAcc ( const TVec< T > &  vec,
const TVec< T > &  x,
const TVec< T > &  y,
fact1,
fact2 
)

TVec[i] = TVec[i]*fact1 + (x[i]-y[i])^2*fact2;.

Definition at line 2788 of file TMat_maths_impl.h.

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

{
    int n=x.length();
    if (vec.length()!=n || y.length()!=n)
        PLERROR("TVec::diffSquareMultiplyAcc this.length_=%d, x.length_=%d, y.length_=%d",
                vec.length(),n,y.length());
    T* p=vec.data();
    T* xp=x.data();
    T* yp=y.data();
    for (int i=0;i<n;i++)
    {
        T diff = xp[i]-yp[i];
        p[i] = fact1 * p[i] + fact2 * diff * diff;
    }
}

Here is the call graph for this function:

Var PLearn::dilogarithm ( Var  v) [inline]

Definition at line 75 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
real PLearn::dilogarithm ( real  x)

It is also useful because -dilogarithm(-exp(x)) is the primitive of the softplus function log(1+exp(x)).

Definition at line 260 of file pl_math.cc.

References fast_exact_is_equal(), is_missing(), MISSING_VALUE, PLWARNING, and positive_dilogarithm().

Referenced by PLearn::DilogarithmVariable::fprop(), PLearn::PLMathTest::perform(), and softplus_primitive().

{
    if (is_missing(x))
    {
#ifdef BOUNDCHECK
        PLWARNING("Dilogarithm taking NaN as input");
#endif
        return MISSING_VALUE;
    }
    if (x<0)
        return -positive_dilogarithm(-x) + 0.5*positive_dilogarithm(x*x);
    else 
        if (fast_exact_is_equal(x, 0)) return 0;
        else
            return positive_dilogarithm(x);
}

Here is the call graph for this function:

Here is the caller graph for this function:

CostFunc PLearn::directnegative_costfunc ( ) [inline]

Definition at line 67 of file DirectNegativeCostFunction.h.

{ return new DirectNegativeCostFunction(); }
void PLearn::DirichletEstimatorMaxLik ( const Mat &  p,
Vec  alpha 
)

Estimate the parameters of a Dirichlet by maximum-likelihood.

p(t,i) are the observed probabilities (all between 0 and 1) for t-th case, i ranging from 0 to N-1. alphal[i] are the resulting parameters of the Dirichlet, with i ranging from 0 to N-1.

The method of moments is used to initialize the estimator, and a globally convergent iteration is then followed.

Definition at line 415 of file stats_utils.cc.

References DirichletEstimatorMMoments(), and PLERROR.

{
    DirichletEstimatorMMoments(p,alpha);
    // int N=alpha.length(); Commented out to remove compiler warning.
    PLERROR("In DirichletEstimatorMaxLik - Not implemented yet");
    // Have a look at Tom Minka's paper on estimating Dirichlet parameters...
    // TO BE IMPLEMENTED
}

Here is the call graph for this function:

void PLearn::DirichletEstimatorMaxLik ( const Mat &  p,
Vec &  alpha 
)

Estimate the parameters of a Dirichlet by maximum-likelihood.

p(t,i) are the observed probabilities (all between 0 and 1) for t-th case, i ranging from 0 to N-1. alphal[i] are the resulting parameters of the Dirichlet, with i ranging from 0 to N-1.

The method of moments is used to initialize the estimator, and a globally convergent iteration is then followed.

void PLearn::DirichletEstimatorMMoments ( const Mat &  p,
Vec &  alpha 
)

Estimate the parameters of a Dirichlet by maximum-likelihood.

p(t,i) are the observed probabilities (all between 0 and 1) for t-th case, i ranging from 0 to N-1. alphal[i] are the resulting parameters of the Dirichlet, with i ranging from 0 to N-1.

Definition at line 384 of file stats_utils.cc.

References columnMean(), columnSumOfSquares(), columnVariance(), exp(), i, multiply(), N, PLearn::TVec< T >::resize(), safeflog(), and PLearn::TMat< T >::width().

Referenced by DirichletEstimatorMaxLik().

{
    static Vec mean_p, mean_p2, var_p; // NON-REENTRANT CODE
    int N=p.width();
    alpha.resize(N);
    mean_p.resize(N);
    mean_p2.resize(N);
    var_p.resize(N);
    columnMean(p, mean_p);
    columnSumOfSquares(p, mean_p2);
    mean_p2 *= real(1.0/N);
    columnVariance(p, var_p, mean_p);
    real log_sum_alpha = 0;
    for (int i=0;i<N;i++)
        log_sum_alpha += safeflog(mean_p[i]*(1-mean_p[i])/var_p[i]-1);
    log_sum_alpha /= (N-1);
    multiply(mean_p, exp(log_sum_alpha), alpha);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::displayBasicStats ( VMat  vm)

Definition at line 427 of file vmatmain.cc.

References endl(), PLearn::VMat::fieldName(), left(), max(), right(), and PLearn::VMat::width().

Referenced by vmatmain().

{
    int nfields = vm.width();
    TVec<StatsCollector> stats = vm->getStats(true);        

    // find longest field name
    size_t fieldlen = 0;
    for (int k=0; k<nfields; ++k)
        fieldlen = max(fieldlen, vm->fieldName(k).size());
    fieldlen++;
  
    cout << std::left << setw(6)  << "# "
         << setw(int(fieldlen)) << " fieldname " << std::right
         << setw(15) << " mean "
         << setw(15) << " stddev "
         << setw(15) << " min "
         << setw(15) << " max "
         << setw(15) << " count "
         << setw(15) << " nmissing "
         << setw(15) << " stderr" << endl; 
    for(int k=0; k<nfields; k++)
    {
        cout << std::left << setw(6)  << k << " " 
             << setw(int(fieldlen)) << vm->fieldName(k) << " " << std::right
             << setw(15) << stats[k].mean() << " " 
             << setw(15) << stats[k].stddev() << " "
             << setw(15) << stats[k].min() << " " 
             << setw(15) << stats[k].max() << " " 
             << setw(15) << stats[k].n() << " " 
             << setw(15) << stats[k].nmissing() << " " 
             << setw(15) << stats[k].stderror() << " " 
             << endl;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::displayDecisionSurface ( GhostScript &  gs,
real  destx,
real  desty,
real  destwidth,
real  destheight,
PP< PLearner >  learner,
Mat  trainset,
Vec  svindexes = Vec(),
Vec  outlierindexes = Vec(),
int  nextsvindex = -1,
real  min_x = -1,
real  max_x = +1,
real  min_y = -1,
real  max_y = +1,
real  radius = 0.05,
int  nx = 200,
int  ny = 200 
)

This will display a rectangle (0,0,nx,ny) containing a 2D image of the decision surface for the given learner with the points of each class displayed with + and x, and optionally, the points in svindexes circled in black and the points in outlierindexes circled in gray.

Definition at line 904 of file DisplayUtils.cc.

References PLearn::TMat< T >::column(), compute2dGridOutputs(), PLearn::GhostScript::displayGray(), displayPoints(), PLearn::GhostScript::drawCircle(), PLearn::GhostScript::grestore(), PLearn::GhostScript::gsave(), i, j, PLearn::TVec< T >::length(), PLearn::GhostScript::mapping(), max(), min(), PLearn::GhostScript::setdash(), PLearn::GhostScript::setlinewidth(), and x.

  {
    gs.gsave();
    real scalefactor = (max_x-min_x)/destwidth;
    gs.mapping(min_x,min_y,max_x-min_x,max_y-min_y, destx, desty, destwidth, destheight);
    gs.setlinewidth(1.0*scalefactor);

    real singleoutput_threshold = 0.;
    if(learner->outputsize()==1)
    {
      Mat targets = trainset.column(learner->inputsize());
      singleoutput_threshold = 0.5*(min(targets)+max(targets));
    }
    Mat decisions = compute2dGridOutputs(learner, min_x, max_x, min_y, max_y, ny, nx, singleoutput_threshold);

    //real posrange = max(decisions);
    //real negrange = min(decisions);

    for(int i=0; i<ny; i++)
      for(int j=0; j<nx; j++)
        {
          decisions(i,j) = (decisions(i,j)<0. ? 0.75 : 1.0);
          /*
          if(decisions(i,j) < 0.0)
            decisions(i,j) = 1.0-.5*decisions(i,j)/negrange;
          else
            decisions(i,j) = .5+.5*decisions(i,j)/posrange;
          */
        }

    gs.displayGray(decisions,min_x,min_y,max_x-min_x,max_y-min_y);

    // draw x and +
    displayPoints(gs, trainset, radius, false);

    // draw black circles around support vectors
    for(int k=0; k<svindexes.length(); k++)
      {
        real x = trainset(int(svindexes[k]),0);
        real y = trainset(int(svindexes[k]),1);
        // cerr << "{" << x << "," << y << "}";
        gs.drawCircle(x,y,radius);
      }
    // cerr << endl;

    // draw half radius circle around next support vector
    if(nextsvindex>=0)
    {
      real x = trainset(nextsvindex,0);
      real y = trainset(nextsvindex,1);
      gs.drawCircle(x,y,radius/2);
    }

    // draw white circles around outliers
    Vec dashpattern(2,4.0*scalefactor);
    gs.setdash(dashpattern);
    for(int k=0; k<outlierindexes.length(); k++)
      {
        real x = trainset(int(outlierindexes[k]),0);
        real y = trainset(int(outlierindexes[k]),1);
        gs.drawCircle(x,y,radius);
      }

    gs.grestore();
  }

Here is the call graph for this function:

void PLearn::displayFunction ( Func  f,
bool  display_values,
bool  display_differentiation,
real  boxwidth,
const char *  the_filename,
bool  must_wait 
)

Definition at line 816 of file DisplayUtils.cc.

References displayVarGraph(), tagVariables(), and untagVariables().

Referenced by displayVarFn(), PLearn::SumOfVariable::fbprop(), and PLearn::ConditionalDensityNet::train().

{ 
  tagVariables(f->inputs,"INPUT");
  tagVariables(f->parameters,"PARAM");
  tagVariables(f->outputs,"OUTPUT");
  if(display_differentiation)
    displayVarGraph(f->outputs & f->differentiate()->outputs, display_values, boxwidth, the_filename, must_wait);
  else
    displayVarGraph(f->outputs, display_values, boxwidth, the_filename, must_wait); 
  untagVariables(f->outputs,"OUTPUT");
  untagVariables(f->parameters,"PARAM");
  untagVariables(f->inputs,"INPUT");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::displayHistogram ( Gnuplot &  gs,
Mat  dataColumn,
int  n_bins = 0,
Vec *  bins = 0,
bool  regular_bins = false,
bool  normalized = false,
string  extra_args = "" 
)

Display a histogram of the density of the data column. By default set n_bins according to the number of data points: n_bins = min(5+dataColumn.length()/10,1000), but user can override this. By default (n_bins=0) the bins are equally spaced such that each bin receives approximately the same number of points. The user can override that by providing a vector of bin boundaries (min to bins[0], bins[0] to bins[1], ... bins[n_bins-2] to max) then n_bins will be bins.length()+1, or the user can specify regularly spaced bins with the bool argument. If normalized the the relative frequencies rather than actual frequencies are plotted.

Definition at line 187 of file DisplayUtils.cc.

References b, PLearn::TVec< T >::data(), fast_exact_is_equal(), histogram(), i, left(), PLearn::TVec< T >::length(), MIN, n, PLearn::Gnuplot::plot(), PLWARNING, PLearn::TVec< T >::resize(), sortElements(), and PLearn::TMat< T >::toVecCopy().

{
  Vec sorted_data = dataColumn.toVecCopy();
  sortElements(sorted_data);
  int n=sorted_data.length();
  real minv = sorted_data[0];
  real maxv = sorted_data[n-1];

  // compute "bins" vector, which specifies histogram intervals
  // [minv, bins[0]), [bins[0],bins[1]), ... [bin[n_bins-2],maxv]
  Vec bins;
  if (pbins)
    {
      bins = *pbins;
      n_bins = bins.length()+1;
    }
  else
    {
      if (n_bins==0)
        n_bins = MIN(5+n/10,1000);
      bins.resize(n_bins-1);

      // fill the bins
      if (regular_bins)
        {
          real delta = (maxv-minv)/n_bins;
          real v = minv+delta;
          real* b=bins.data();
          for (int i=0;i<n_bins-1;i++,v+=delta) b[i]=v;
        }
      else
        {
          real n_expected_per_bin = n/(real)n_bins;
          int current_bin=0;
          real* v=sorted_data.data();
          real* b=bins.data();
          real previous = 1e30;
          int n_repeat = 0;
          int previous_n_repeat = 0;
          int first_of_mass_point = 0;
          for (int i=0;i<n;i++)
            {
              if (fast_exact_is_equal(previous, v[i]))
                {
                  if (previous_n_repeat==0) first_of_mass_point = i-1;
                  n_repeat++;
                }
              else
                n_repeat=0;
              if (n_repeat==0  && current_bin < n_bins-1) // put a left_side at i only if v[i]!=v[i-1]
                {
                  if (previous_n_repeat==0)
                    {
                      if (i+1 >= n_expected_per_bin*(1+current_bin))
                        b[current_bin++]=v[i];
                    }
                  else
                    {
                      if (n_repeat/(real)n > n_expected_per_bin)
                        {
                          if (current_bin>0 && b[current_bin-1] < v[first_of_mass_point])
                            b[current_bin++]=v[first_of_mass_point];
                          if (current_bin < n_bins-1)
                            b[current_bin++]=v[i];
                        }
                      else
                        if (i+1 >= n_expected_per_bin*(1+current_bin))
                          b[current_bin++]=v[i];
                    }
                }
              previous = v[i];
              previous_n_repeat = n_repeat;
            }
        }
    }

  // fill histogram vector with counts in each interval:
  // first column is the left border of each bin, 2nd is the count
  Mat histogram(n_bins+1,2);
  real* left_side = &histogram(0,0);
  real* frequency = left_side+1;
  real* b = bins.data();
  real* v=sorted_data.data();
  int current_bin=0;
  real left = minv;
  for (int i=0;i<n;i++)
    {
      if (current_bin<n_bins-1 &&
          v[i]>=b[current_bin])
        {
          left_side[2*current_bin]=left;
          left = v[i];
          current_bin++;
        }
      frequency[2*current_bin]++;
    }
  left_side[2*current_bin]=left;
  left_side[2*n_bins]=maxv+(maxv-minv)/n;
  real norm_factor = normalized? (1.0/n) : 1.0;
  for (int i=0;i<n_bins;i++)
    {
      real deltax = left_side[2*(i+1)]-left_side[2*i];
      if (fast_exact_is_equal(deltax, 0)) {
          PLWARNING("displayHistogram: 0 deltax!");
          deltax=1.0;
      }
      frequency[i*2] *= norm_factor/deltax;
    }

  histogram(n_bins,1)=histogram(n_bins-1,1);

  // display the histogram
  string comm = string(" with steps")+extra_args;
  gp.plot(histogram,comm.c_str());
}

Here is the call graph for this function:

void PLearn::displayPoints ( GhostScript &  gs,
Mat  data,
real  radius,
bool  color 
)

this draws x and + with the given radius for all the points in data (supposed to have width 3: [x, y, classnum]

Definition at line 857 of file DisplayUtils.cc.

References PLearn::GhostScript::drawCross(), i, PLearn::TMat< T >::length(), and PLearn::GhostScript::setcolor().

Referenced by displayDecisionSurface().

{
  for(int i=0; i<data.length(); i++)
    {
      Vec point = data(i);
      if(color)
        {
          if(point[2]<=0.0)
            gs.setcolor(1.0,0.0,0.0);
          else
            gs.setcolor(0.0,0.0,1.0);
          gs.drawCross(point[0], point[1], radius);
        }
      else
        gs.drawCross(point[0], point[1], radius, point[2]<=0);
    }
} 

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::displayVarFn ( const Func &  f,
bool  display_values 
)

Definition at line 66 of file EntropyContrastLearner.cc.

References displayFunction().

{
    displayFunction(f,display_values,200);
}

Here is the call graph for this function:

void PLearn::displayVarGr ( const Var &  v,
bool  display_values 
)

Definition at line 61 of file EntropyContrastLearner.cc.

References displayVarGraph().

{
    displayVarGraph(v,display_values,200);
}

Here is the call graph for this function:

void PLearn::displayVarGraph ( const VarArray &  outputs,
bool  display_values = false,
real  boxwidth = 100,
const char *  the_filename = 0,
bool  must_wait = true,
VarArray  display0_only_these = VarArray() 
)

VarGraph.

* VarGraph *

Definition at line 362 of file DisplayUtils.cc.

References PLearn::TmpFilenames::addFilename(), PLearn::VarArray::ancestors(), PLearn::TVec< T >::append(), center(), PLearn::GhostScript::centerShow(), PLearn::VarArray::clearMark(), PLearn::TVec< T >::contains(), distance(), PLearn::GhostScript::drawArrow(), PLearn::GhostScript::drawBox(), fast_exact_is_equal(), PLearn::TMat< T >::fill(), i, j, PLearn::Var::length(), PLearn::Variable::nvars, openString(), PLearn::VarArray::parents(), PLearn::PStream::raw_ascii, PLearn::VarArray::setMark(), PLearn::TVec< T >::size(), PLearn::VarArray::sources(), summarizedVecString(), PLearn::VarArray::unmarkAncestors(), PLearn::GhostScript::usefont(), PLearn::Var::width(), and x.

Referenced by displayFunction(), displayVarGr(), PLearn::LogVariable::fprop(), PLearn::GradientOptimizer::optimizeN(), and PLearn::AutoScaledGradientOptimizer::optimizeN().

{
  // parameters controlling appearance...
  real deltay = 100;
  real boxheight = 50;

  char filename[100];
  if(the_filename)
    strcpy(filename, the_filename);
  else
  {
    TmpFilenames tmpnam;
    strcpy(filename, tmpnam.addFilename().c_str());
  }
  
  multimap<real,Var> layers; 
  typedef multimap<real,Var>::iterator mmit;

  Mat center(Variable::nvars+1,2);
  center.fill(FLT_MAX);
  
  int n_display_only_these = display_only_these.size();
  bool display_all = n_display_only_these==0;

  // find sources of outputs which are not in the outputs array:
  outputs.unmarkAncestors();
  VarArray sources = outputs.sources();
  outputs.unmarkAncestors();
  // We dont want any source Var that is in outputs to be in sources so we remove them:
  outputs.setMark();
  VarArray nonoutputsources;
  for(int i=0; i<sources.size(); i++)
    if(!sources[i]->isMarked() && (display_all || display_only_these.contains(sources[i])))
      nonoutputsources.append(sources[i]);
  sources = nonoutputsources;
  outputs.clearMark();
  
  sources.setMark();

  // Place everything but the sources starting from outputs at the bottom

  outputs.unmarkAncestors();

  real y = boxheight;
  VarArray varray = outputs;
  
  while(varray.size()>0)
    {
      // varray.setMark(); // so that these don't get put in subsequent parents() calls
      VarArray parents;
      int nvars = varray.size();
      for(int i=0; i<nvars; i++)
        {
          Var v = varray[i];
          real old_y = center(v->varnum,1);
          if (!fast_exact_is_equal(old_y, FLT_MAX)) // remove pair (old_y,v) from layers
          {
            pair<mmit,mmit> range = layers.equal_range(old_y);
            for (mmit it = range.first; it != range.second; it++)
              if (v->varnum == it->second->varnum)
              {
                layers.erase(it);
                break;
              }
          }
          layers.insert(pair<real,Var>(y, v));
          center(v->varnum,1) = y;
          VarArray parents_i = v->parents();
          for (int j=0;j<parents_i.size();j++)
            if((display_all || display_only_these.contains(parents_i[j])) && !parents.contains(parents_i[j]))
              parents &= parents_i[j];
        }
      varray = parents;
      y += deltay;
    }
  // now place the sources
  int nvars = sources.size();
  for(int i=0; i<nvars; i++)
    {
      Var v = sources[i];
      real old_y = center(v->varnum,1);
      if (!fast_exact_is_equal(old_y, FLT_MAX)) // remove pair (old_y,v) from layers
      {
        pair<mmit,mmit> range = layers.equal_range(old_y);
        for (mmit it = range.first; it != range.second; it++)
          if (v->varnum == it->second->varnum)
          {
            layers.erase(it);
            break;
          }
      }
      layers.insert(pair<real,Var>(y,v));
    }
  real topy = y;

  outputs.unmarkAncestors();
  if (display_all)
  {
    VarArray ancestors = outputs.ancestors();
    outputs.unmarkAncestors();   
    varray = ancestors;
  }
  else varray = display_only_these;

  // Find the maximum number of vars in a level...
  int maxvarsperlevel = sources.size();

  for (real y_=boxheight;y_<=topy;y_+=deltay)
  {
    pair<mmit,mmit> range = layers.equal_range(y_);
    int nvars_ = (int)distance(range.first,range.second);
    if (maxvarsperlevel < nvars_)
      maxvarsperlevel = nvars_;
  }

  real usewidth = (maxvarsperlevel+1)*(boxwidth+boxheight);

  // Compute the bounding box:
  real min_x = 0;
  real min_y = 0;
  real max_x = usewidth;
  real max_y = topy;

  min_x -= boxwidth/2;
  max_x += boxwidth/2;
  min_y -= boxheight/2;
  max_y += boxheight/2;

  for (real y_=boxheight;y_<=topy;y_+=deltay)
  {
    pair<mmit,mmit> range = layers.equal_range(y_);
    int nvars_ = (int)distance(range.first,range.second);
    real deltax = usewidth/(nvars_+1);
    real x = deltax;
    for (mmit it = range.first; it != range.second; it++, x+=deltax)
    {
      Var v = it->second;
      center(v->varnum,0) = x;
      center(v->varnum,1) = y_;
    }
  }

  // Start outputting to the file
  {
    // make it an eps file with the computed bounding box
    GhostScript gs(filename,min_x,min_y,max_x,max_y);

  // Now paint

  // gs.setlinewidth(1.0);

  for (real y_=boxheight;y_<=topy;y_+=deltay)
  {
    pair<mmit,mmit> range = layers.equal_range(y_);
    int nvars_ = (int)distance(range.first,range.second);
    real deltax = usewidth/(nvars_+1);
    real x = deltax;
    for (mmit it = range.first; it != range.second; it++, x+=deltax)
    {
      Var v = it->second;
      real my_x = x;
      real my_y = y_;

      // Display v
      gs.drawBox(my_x-boxwidth/2, my_y-boxheight/2, boxwidth, boxheight);
      char nameline[100];
      sprintf(nameline,"%s (%d,%d)",v->getName().c_str(), v->matValue.length(), v->matValue.width());
      
      string descr;
      PStream str_descr = openString(descr, PStream::raw_ascii, "w");
      str_descr << v;

      if(display_values)
        {
          gs.usefont("Times-Bold", 11.0);
          gs.centerShow(my_x, my_y+boxheight/4, descr);
          gs.usefont("Times-Roman", 10.0);
          gs.centerShow(my_x, my_y, nameline);
          gs.usefont("Courrier", 6.0);
          if (v->rValue.length()>0) // print rvalue if there are some...
          {
            gs.centerShow(my_x, my_y-boxheight/5, summarizedVecString(v->value));
            gs.centerShow(my_x, my_y-boxheight/3, summarizedVecString(v->gradient));
            gs.centerShow(my_x, my_y-boxheight/1, summarizedVecString(v->rValue));
          }
          else
          {
            gs.centerShow(my_x, my_y-boxheight/5, summarizedVecString(v->value));
            gs.centerShow(my_x, my_y-boxheight/2.5, summarizedVecString(v->gradient));
          }
          /*
          cout << descr << " " << nameline << " (" << v->value.length() << ")" << endl;
          cout << "value:    " << v->value << endl;
          cout << "gradient: " << v->gradient << endl;
          */
        }
      else
        {
          gs.usefont("Times-Bold", 12.0);
          gs.centerShow(my_x, my_y+boxheight/4, descr.c_str());
          gs.usefont("Times-Roman", 11.0);
          gs.centerShow(my_x, my_y-boxheight/4, nameline);
        }

      // Display the arrows from the parents
      VarArray parents = v->parents();
      int nparents = parents.size();
      for(int p=0; p<nparents; p++)
        {
          Var parent = parents[p];
          if (display_all || display_only_these.contains(parent))
          {
            real parent_x = center(parent->varnum,0);
            real parent_y = center(parent->varnum,1);

            gs.drawArrow(parent_x, parent_y-boxheight/2, 
                         my_x+0.75*boxwidth*(real(p+1)/real(nparents+1)-0.5), 
                         my_y+boxheight/2);
          }
        }
    }
  }
  outputs.unmarkAncestors();      
  }
  char command[1000];
  if (must_wait)
    sprintf(command,"gv %s",filename);
  else
    sprintf(command,"gv %s &",filename);

  system(command);

  if(the_filename==0 && must_wait)
    unlink(filename);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::dist ( const TVec< T > &  vec1,
const TVec< T > &  vec2,
double  n 
)

Definition at line 1118 of file TMat_maths_impl.h.

References fast_exact_is_equal(), mypow(), powdistance(), and sqrt().

Referenced by PLearn::BallTreeNearestNeighbors::BallKNN(), PLearn::EntropyContrastLearner::build_(), PLearn::SurfaceMesh::buildEdges(), calcNormal(), closestFacePoint(), PLearn::RBMLateralBinomialLayer::computeExpectation(), PLearn::GeodesicDistanceKernel::computeNearestGeodesicNeighbour(), PLearn::LocalizedFeaturesLayerVariable::computeSubsets(), PLearn::ICP::computeWeightedDistance(), PLearn::ICP::computeWeights(), dist3D(), PLearn::DTWKernel::dtw(), PLearn::Kernel::estimateHistograms(), PLearn::GeodesicDistanceKernel::evaluate(), PLearn::DistanceKernel::evaluate(), PLearn::ManifoldParzen2::find_nearest_neighbor(), findClosestPairsOfDifferentClass(), PLearn::TransformationLearner::findNearestNeighbors(), PLearn::StackedFocusedAutoassociatorsNet::fineTuningStep(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::ICP::iterate(), PLearn::GaussMix::kmeans(), L1distance(), L2distance(), positionOfClosestElement(), ridgeRegressionByGCV(), PLearn::GeodesicDistanceKernel::setDataForKernelMatrix(), PLearn::BallTreeNearestNeighbors::smallestContainer(), PLearn::PLS::train(), PLearn::KMeansClustering::train(), and PLearn::GaussMix::train().

{
    if(fast_exact_is_equal(n, T(1.0)))
        return powdistance(vec1, vec2, T(1.0));
    else if(fast_exact_is_equal(n, T(2.0)))
        return sqrt(powdistance(vec1, vec2, T(2.0)));
    else
        return mypow(powdistance(vec1, vec2, n), T(1.0)/n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::dist3D ( const MeshVertex &  p,
const MeshVertex &  q 
)

Definition at line 141 of file MeshVertex.cc.

References PLearn::MeshVertex::coord, and dist().

{
  return dist( p.coord, q.coord, 2 );
}

Here is the call graph for this function:

Var PLearn::distance ( Var  input1,
Var  input2,
real  n 
)

Definition at line 103 of file Var_utils.cc.

References norm().

Referenced by PLearn::BaseRegressorConfidence::computeOutput(), PLearn::ICP::computeWeightedDistance(), PLearn::ICP::computeWeights(), displayVarGraph(), PLearn::ProbSparseMatrix::euclidianDistance(), PLearn::ManifoldParzen2::find_nearest_neighbor(), and PLearn::VarUtilsTest::perform().

{ return norm(input1-input2, n); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::divide ( const TVec< T > &  source1,
source2,
TVec< T > &  destination 
) [inline]

Definition at line 2092 of file TMat_maths_impl.h.

References multiply().

Referenced by PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), and makeRowsSumTo1().

{ multiply(source1,1.0/source2,destination); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::divide ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2097 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("divide: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = s1[i]/s2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::divide ( source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2116 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, and PLearn::TVec< T >::resize().

{
    int n=source2.length();
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = source1/s2[i];
    }
}

Here is the call graph for this function:

int PLearn::dnaupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short   
)

Referenced by eigenSparseNonSymmMat().

Here is the caller graph for this function:

int PLearn::dneupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
double *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short  ,
short   
)

Referenced by eigenSparseNonSymmMat().

Here is the caller graph for this function:

template<class T >
T PLearn::dot ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
)

Definition at line 1539 of file TMat_maths_impl.h.

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

Referenced by PLearn::LinearCombinationModule::bpropAccUpdate(), PLearn::SoftmaxModule::bpropUpdate(), PLearn::ShuntingNNetLayerModule::bpropUpdate(), PLearn::RBMMultinomialLayer::bpropUpdate(), PLearn::RBMLocalMultinomialLayer::bpropUpdate(), PLearn::TreeDBNModule::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::ConditionalDensityNet::build_(), calcNormal(), choleskyInsertBasis(), closestPointOnTriangle(), PLearn::EntropyContrast::compute_extra_grad_wrt_df_dx(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::GaussianProcessRegressor::computeConfidenceFromOutput(), PLearn::ConjGradientOptimizer::computeCostAndDerivative(), PLearn::PseudolikelihoodRBM::computeCostsFromOutputs(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::ConjGradientOptimizer::computeDerivative(), PLearn::RBMModule::computeEnergy(), PLearn::KLp0p1RBMModule::computeEnergy(), PLearn::GaussMix::computeLogLikelihood(), PLearn::PCA::computeOutput(), PLearn::NxProfileLearner::computeOutput(), PLearn::ManifoldParzen2::computeOutput(), PLearn::ManifoldParzen::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::BasisSelectionRegressor::computeOutputFromFeaturevec(), PLearn::LinearRegressor::computeResidualsVariance(), constrainedLinearRegression(), diagonalizeSubspace(), PLearn::VMatrix::dot(), PLearn::PCA::em_orth_algo(), PLearn::RBMWoodsLayer::energy(), PLearn::RBMRateLayer::energy(), PLearn::RBMMultinomialLayer::energy(), PLearn::RBMLocalMultinomialLayer::energy(), PLearn::RBMLateralBinomialLayer::energy(), PLearn::RBMBinomialLayer::energy(), PLearn::SigmoidPrimitiveKernel::evaluate(), PLearn::SigmoidalKernel::evaluate(), PLearn::PolynomialKernel::evaluate(), PLearn::NormalizedDotProductKernel::evaluate(), PLearn::LinearARDKernel::evaluate(), PLearn::DotProductKernel::evaluate(), PLearn::CosKernel::evaluate(), PLearn::CorrelationKernel::evaluate(), PLearn::CompactVMatrixPolynomialKernel::evaluate(), PLearn::GaussianProcessRegressor::expectation(), extract_directory(), PLearn::SurfaceMesh::findNormals(), findSmallestEigenPairOfSymmMat(), PLearn::DeepNonLocalManifoldParzen::fineTuningStep(), PLearn::DeepBeliefNet::fineTuningStep(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), PLearn::KLp0p1RBMModule::fprop(), PLearn::GradNNetLayerModule::fprop(), PLearn::GaussianProcessNLLVariable::fprop(), PLearn::CombiningCostsModule::fprop(), GDFindSmallEigenPairs(), PLearn::GaussianProcessRegressor::inverseCovTimesVec(), InversePowerIteration(), isOverlapping(), linearRegression(), PLearn::NonLocalManifoldParzen::log_density(), log_fullGaussianRBF(), logOfCompactGaussian(), logOfNormal(), mahalanobis_distance(), PLearn::NatGradEstimator::operator()(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), PLearn::ConjGradientOptimizer::polakRibiere(), PowerIteration(), PLearn::MatTPlusSumSquaredVec< MatT >::product(), productTranspose(), projectOnOrthogonalSubspace(), PLearn::GaussianProcessRegressor::QFormInverse(), region1ClosestPoint(), region2ClosestPoint(), SolveLinearSymmSystemByCG(), PLearn::TimesScalarVariable::symbolicBprop(), PLearn::PowVariableVariable::symbolicBprop(), SymmMatNullSpaceByInversePowerIteration(), PLearn::WPLS::train(), PLearn::PLS::train(), PLearn::NxProfileLearner::train(), PLearn::LinearRegressor::train(), PLearn::IncrementalNNet::train(), PLearn::EntropyContrast::train(), PLearn::AutoLinearRegressor::train(), unitTest(), PLearn::ConjGradientOptimizer::updateSearchDirection(), PLearn::Function::verifyGradient(), and weightedLinearRegression().

{
#ifdef BOUNDCHECK
    if(vec1.length()!=vec2.length())
        PLERROR("In T operator*(const TVec<T>& vec1, const TVec<T>& vec2) (dot product) the 2 vecs must have the same length.");
#endif
    T res = 0;
    if (vec1.size() > 0 && vec2.size() > 0) {
        T* v1 = vec1.data();
        T* v2 = vec2.data();
        for(int i=0; i<vec1.length(); i++)
            res += v1[i]*v2[i];
    }
    return res;
}

Here is the call graph for this function:

template<class V , class T , class U >
V PLearn::dot ( const TVec< T > &  vec1,
const TVec< U > &  vec2 
)

Special dot product that allows TVec's of different types, as long as operator*(T,U) is defined.

The return type V must be specified in all circumstances, e.g. : TVec<int> v1; TVec<float> v2; double result = dot<double>(v1,v2);

Definition at line 1561 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if(vec1.length()!=vec2.length())
        PLERROR("In T operator*(const TVec<T>& vec1, const TVec<T>& vec2) (dot product) the 2 vecs must have the same length.");
#endif
    V res = 0;
    if (vec1.size() > 0 && vec2.size() > 0) {
        T* v1 = vec1.data();
        U* v2 = vec2.data();
        for(int i=0; i<vec1.length(); i++)
            res += v1[i]*v2[i];
    }
    return res;
}

Here is the call graph for this function:

template<class T >
T PLearn::dot ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 1578 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isCompact(), PLERROR, and PLearn::TMat< T >::size().

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In T operator*(const TMat<T>& m1, const TVec<T>& vec2) (dot product) the 2 matrices must have the same number of elements.");
#endif

    T res = 0;
    if (m1.size() > 0 && m2.size() > 0) {
        T* v1 = m1.data();
        T* v2 = m2.data();
        if (m1.isCompact() && m2.isCompact())
            for(int i=0; i<m1.size(); i++)
                res += v1[i]*v2[i];
        else
        {
            TMatElementIterator<T> p1 = m1.begin();
            TMatElementIterator<T> p2 = m2.begin();
            for (int i=0; i<m1.size(); i++,++p1,++p2)
                res += *p1 * *p2;
        }
    }
    return res;
}

Here is the call graph for this function:

Var PLearn::dot ( Var  v1,
Var  v2 
) [inline]

dot product

Definition at line 82 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
real PLearn::dot_product ( real  s,
real x,
real y,
int  n 
) [inline]

Definition at line 646 of file TMat_maths_specialisation.h.

References i, and n.

Referenced by PLearn::CompactVMatrix::dot(), PLearn::CompactVMatrixPolynomialKernel::evaluate(), and PLearn::FNetLayerVariable::fprop().

{
#ifdef UNFOLD
    int n4 = (n >> 2) << 2;
    int i=0;
    for (;i<n4;i+=4)
    {
        real s1 = x[i] * y[i];
        real s2 = x[i+1] * y[i+1];
        real s3 = x[i+2] * y[i+2];
        real s4 = x[i+3] * y[i+3];
        s += s1+s2+s3+s4;
    }
    for (;i<n;i++)
        s += x[i] * y[i];
#else
    for (int i=0;i<n;i++)
        s += *x++ * *y++;
#endif
    return s;
}

Here is the caller graph for this function:

PDate PLearn::double_to_date ( double  d)

Definition at line 359 of file PDate.cc.

References PLearn::PDate::day, is_missing(), PLearn::PDate::month, and PLearn::PDate::year.

Referenced by operator>>().

{
    PDate date;                     // missing by default
    if (! is_missing(d)) {
        long l = long(d);
        date.year = short(l/10000);
        l %= 10000;
        date.month = (unsigned char) (l/100);
        date.day = (unsigned char) (l%100);
    }
    return date;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PDateTime PLearn::double_to_datetime ( double  f)

Definition at line 237 of file PDateTime.cc.

References d, PLearn::PDateTime::day, double_to_hhmmss(), PLearn::PDateTime::hour, is_missing(), PLearn::PDateTime::min, PLearn::PDateTime::month, PLearn::PDateTime::sec, and PLearn::PDateTime::year.

{
    PDateTime date;                     // missing by default
    if (! is_missing(f)) {
        long d = long(f);
        double fraction = f-d;
        date.year = short(1900 + d/10000);
        d %= 10000;
        date.month = (unsigned char) (d/100);
        date.day = (unsigned char) (d%100);

        int hh,mm,ss;
        double_to_hhmmss(fraction,hh,mm,ss);
        date.hour = hh;
        date.min  = mm;
        date.sec  = ss;
    }
    return date;
}

Here is the call graph for this function:

void PLearn::double_to_hhmmss ( double  fraction,
int hh,
int mm,
int ss 
)

convert a day fraction (< 1) to hours/minutes/seconds

Definition at line 264 of file PDateTime.cc.

Referenced by double_to_datetime(), and PLearn::PDateTime::PDateTime().

{
    hh = int(fraction *= 24);
    fraction -= hh;
    mm = int(fraction *= 60);
    fraction -= mm;
    ss = int(fraction * 60);
}

Here is the caller graph for this function:

template<class T >
void PLearn::doubleCentering ( RowMapSparseMatrix< T > &  mat,
TVec< T > &  avg,
RowMapSparseMatrix< T > &  res,
scale = 1 
)

Definition at line 894 of file RowMapSparseMatrix.h.

References a, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), mean(), n, and PLearn::RowMapSparseMatrix< T >::rows.

Referenced by metricMultiDimensionalScaling().

{
    T moy = mean(avg);
    int n=avg.length();
    T* a = avg.data();
    if (scale==T(1))
    {
        if (&mat != &res)
            for (int i=0;i<n;i++)
            {
                map<int,T>& Mi = mat.rows[i];
                map<int,T>& Ri = res.rows[i];
                T term = moy-a[i];
                typename map<int,T>::iterator Mit = Mi.begin();
                typename map<int,T>::const_iterator Mend = Mi.end();
                typename map<int,T>::iterator Rit = Ri.begin();
                typename map<int,T>::const_iterator Rend = Ri.end();
                for (;Mit!=Mend && Rit!=Rend;)
                {
                    if (Mit->first==Rit->first)
                        Rit->second = Mit->second - a[Rit->first] + term;
                    else if (Mit->first<Rit->first)
                        ++Mit;
                    else
                        ++Rit;
                }
            }
        else
            for (int i=0;i<n;i++)
            {
                map<int,T>& Ri = res.rows[i];
                typename map<int,T>::iterator Rit = Ri.begin();
                typename map<int,T>::const_iterator Rend = Ri.end();
                T term = moy-a[i];
                for (;Rit!=Rend;++Rit)
                    Rit->second += term - a[Rit->first];

            }
    }
    else
    {
        if (&mat != &res)
            for (int i=0;i<n;i++)
            {
                map<int,T>& Mi = mat.rows[i];
                map<int,T>& Ri = res.rows[i];
                T term = moy-a[i];
                typename map<int,T>::iterator Mit = Mi.begin();
                typename map<int,T>::const_iterator Mend = Mi.end();
                typename map<int,T>::iterator Rit = Ri.begin();
                typename map<int,T>::const_iterator Rend = Ri.end();
                for (;Mit!=Mend && Rit!=Rend;)
                {
                    if (Mit->first==Rit->first)
                        Rit->second = scale*(Mit->second - a[Rit->first] + term);
                    else if (Mit->first<Rit->first)
                        ++Mit;
                    else
                        ++Rit;
                }
            }
        else
            for (int i=0;i<n;i++)
            {
                map<int,T>& Ri = res.rows[i];
                typename map<int,T>::iterator Rit = Ri.begin();
                typename map<int,T>::const_iterator Rend = Ri.end();
                T term = moy-a[i];
                for (;Rit!=Rend;++Rit)
                    Rit->second = scale*(Rit->second + term - a[Rit->first]);

            }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::doubleCentering ( const TMat< T > &  mat,
TVec< T > &  avg,
TMat< T > &  res,
scale = T(1) 
)

Definition at line 354 of file TMat_maths_impl.h.

References a, PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), mean(), and n.

{
    T moy = mean(avg);
    int n=avg.length();
    if (!n)
        return;
    T* a = avg.data();
    if (scale==T(1))
        for (int i=0;i<n;i++)
        {
            T* Mi = mat[i];
            T* Ri = res[i];
            T term = moy-a[i];
            for (int j=0;j<n;j++)
                Ri[j] = Mi[j] - a[j] + term;
        }
    else
        for (int i=0;i<n;i++)
        {
            T* Mi = mat[i];
            T* Ri = res[i];
            T term = moy-a[i];
            for (int j=0;j<n;j++)
                Ri[j] = scale*(Mi[j] - a[j] + term);
        }
}

Here is the call graph for this function:

void PLearn::dposvx_ ( char *  FACT,
char *  UPLO,
int N,
int NRHS,
double *  A,
int LDA,
double *  AF,
int LDAF,
char *  EQUED,
double *  S,
double *  B,
int LDB,
double *  X,
int LDX,
double *  RCOND,
double *  FERR,
double *  BERR,
double *  WORK,
int IWORK,
int INFO 
)

Referenced by lapack_Xposvx_().

Here is the caller graph for this function:

void PLearn::dpotrf_ ( char *  UPLO,
int N,
double *  A,
int LDA,
int INFO 
)

Referenced by lapack_Xpotrf_().

Here is the caller graph for this function:

void PLearn::dpotrs_ ( char *  UPLO,
int N,
int NRHS,
double *  A,
int LDA,
double *  B,
int LDB,
int INFO 
)

Referenced by lapack_Xpotrs_().

Here is the caller graph for this function:

int PLearn::dsaupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short   
)

Referenced by eigenSparseSymmMat().

Here is the caller graph for this function:

int PLearn::dseupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
double *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
double *  ,
double *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short  ,
short   
)

Referenced by eigenSparseSymmMat().

Here is the caller graph for this function:

void PLearn::dsyev_ ( char *  JOBZ,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  W,
double *  WORK,
int LWORK,
int INFO 
)

Referenced by eigen_SymmMat().

Here is the caller graph for this function:

void PLearn::dsyevr_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  VL,
double *  VU,
int IL,
int IU,
double *  ABSTOL,
int M,
double *  W,
double *  Z,
int LDZ,
int ISUPPZ,
double *  WORK,
int LWORK,
int IWORK,
int LIWORK,
int INFO 
)

Referenced by lapack_Xsyevr_().

Here is the caller graph for this function:

void PLearn::dsyevx_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  VL,
double *  VU,
int IL,
int IU,
double *  ABSTOL,
int M,
double *  W,
double *  Z,
int LDZ,
double *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
)

Referenced by lapack_Xsyevx_().

Here is the caller graph for this function:

void PLearn::dsygvx_ ( int ITYPE,
char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  B,
int LDB,
double *  VL,
double *  VU,
int IL,
int IU,
double *  ABSTOL,
int M,
double *  W,
double *  Z,
int LDZ,
double *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
)

Referenced by lapack_Xsygvx_().

Here is the caller graph for this function:

Var PLearn::duplicateColumn ( Var  v,
int  the_width 
) [inline]

Definition at line 81 of file DuplicateColumnVariable.h.

References PLERROR.

{ 
    if(!v->isColumnVec())
        PLERROR("In duplicateColumn: v is not a single-column var");
    if(the_width==1)
        return v;
    else
        return new DuplicateColumnVariable(v,the_width); 
}
Var PLearn::duplicateRow ( Var  v,
int  the_length 
) [inline]

Definition at line 80 of file DuplicateRowVariable.h.

References PLERROR.

Referenced by PLearn::LinearInductiveTransferClassifier::build_().

{ 
    if(!v->isRowVec())
        PLERROR("In duplicateRow: v is not a single-row var");
    if(the_length==1)
        return v;
    else
        return new DuplicateRowVariable(v,the_length); 
}

Here is the caller graph for this function:

Var PLearn::duplicateScalar ( Var  v,
int  the_length,
int  the_width 
) [inline]

Definition at line 81 of file DuplicateScalarVariable.h.

References PLERROR.

{ 
    if(!v->isScalar())
        PLERROR("In duplicateScalar: v is not a scalar var");
    if(the_length*the_width==1)
        return v;
    else
        return new DuplicateScalarVariable(v,the_length,the_width); 
}
void PLearn::DX_create_dataset_outputs_file ( const string &  filename,
PP< PLearner >  learner,
VMat  dataset 
)

Will write a file containing a field with the dataset positions "dset" field will be input -> target, outputs.

Definition at line 279 of file GenerateDecisionPlot.cc.

References endl(), PLearn::VMat::getExample(), i, j, PLearn::VMat::length(), and PLearn::ProgressBar::update().

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

{
    ofstream out(filename.c_str());

    int l = dataset.length();
    int inputsize = learner->inputsize();
    int targetsize = learner->targetsize();
    int outputsize = learner->outputsize();

    // First write data points (input -> target, output)
    Vec input(inputsize);
    Vec target(targetsize);
    real weight;
    Vec output(outputsize);

    // write 2D positions
    out << "object \"dset_pos\" class array type float rank 1 shape " << inputsize << " items " << l << " data follows \n";
    for(int i=0; i<l; i++)
    {
        dataset->getExample(i,input,target,weight);
        for(int j=0; j<inputsize; j++)
            out << input[j] << " ";
        out << "\n";
    }
    out << "\n\n\n";

    // Now write data for those positions (target and output)
    if(targetsize+outputsize>0)
    {
        ProgressBar pb("Computing outputs for dataset points",l);
        out << "object \"dset_value\" class array type float rank 1 shape " << targetsize+outputsize << " items " << l << " data follows \n";
        for(int i=0; i<l; i++)
        {
            dataset->getExample(i,input,target,weight);
            for(int j=0; j<targetsize; j++)
                out << target[j] << " ";
            learner->computeOutput(input, output);
            for(int j=0; j<outputsize; j++)
                out << output[j] << " ";
            out << "\n";
            pb.update(i);
        }
        out << "attribute \"dep\" string \"positions\" \n\n\n";
    }

    // Field is created with two components: "positions" and "data"
    out << "object \"dset\" class field \n"
        << "component \"positions\" \"dset_pos\" \n";
    if(targetsize+outputsize>0)
        out << "component \"data\" \"dset_value\" \n";
    out << "\n\n\n";


  
    out << "end" << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::DX_create_grid_outputs_file ( const string &  filename,
PP< PLearner >  learner,
VMat  dataset,
int  nx,
int  ny,
bool  include_datapoint_grid = false,
real  xmin = MISSING_VALUE,
real  xmax = MISSING_VALUE,
real  ymin = MISSING_VALUE,
real  ymax = MISSING_VALUE,
real  extraspace = .10 
)

The "outputs" field will contain sample-grid inputs -> outputs Where the sample grid is made of a regular grid of nx.ny points (in the range [xmin, xmax] x [ymin, ymax]) xmin, xmax, ymin and ymax may be left to MISSING_VALUE, in which case an automatic range will be determined from the range of the points in the given dataset extended by extraspace (ex: .10 == 10%).

This regular grid is possibly complemented (if include_datapoint_grid) with an irregular grid made of the x and y coordinates of the dataset that fall within the [xmin, xmax] x [ymin, ymax] range.

Definition at line 344 of file GenerateDecisionPlot.cc.

References PLearn::ProgressBar::close(), computeRange(), endl(), exp(), PLearn::VMat::getExample(), i, PLearn::TVec< T >::insert(), is_missing(), j, PLearn::VMat::length(), logadd(), n, PLearn::VMat::subMatColumns(), tostring(), PLearn::ProgressBar::update(), and x.

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

{
    ofstream out(filename.c_str());

    double logsum = -FLT_MAX;

    int l = dataset.length();
    int inputsize = learner->inputsize();
    int targetsize = learner->targetsize();
    int outputsize = learner->outputsize();

    Vec input(inputsize);
    Vec target(targetsize);
    real weight;
    Vec output(outputsize);

    // Create the grid field

    set<real> xpos;
    set<real> ypos;

    // First the regular grid coordinates
    Vec minv(2);
    Vec maxv(2);
    computeRange(dataset.subMatColumns(0,2), minv, maxv);
    real extrax = (maxv[0]-minv[0])*extraspace;
    real extray = (maxv[1]-minv[1])*extraspace;
    if(is_missing(xmin))
        xmin = minv[0]-extrax;
    if(is_missing(xmax))
        xmax = maxv[0]+extrax;
    if(is_missing(ymin))
        ymin = minv[1]-extray;
    if(is_missing(ymax))
        ymax = maxv[1]+extray;
    real deltax = (xmax-xmin)/nx;
    real deltay = (ymax-ymin)/ny;

    real x = xmin;
    for(int i=0; i<nx; i++, x+=deltax)
        xpos.insert(x);
    real y = ymin;
    for(int j=0; j<ny; j++, y+=deltay)
        ypos.insert(y);

    // also include irregular grid coordinates based on coordinates of dataset points?
    if(include_datapoint_grid) 
    {
        for(int i=0; i<l; i++)
        {
            dataset->getExample(i,input,target,weight);
            x = input[0];
            y = input[1];
            if(x>xmin && x<xmax)
                xpos.insert(x);
            if(y>ymin && y<ymax)
                ypos.insert(y);
        }
    }

    nx = xpos.size();
    ny = ypos.size();
    set<real>::iterator itx;
    set<real>::iterator ity;

    out << "object \"outputs_gridpos\" class array type float rank 1 shape 2 items " << nx*ny << " data follows\n";
    for(itx=xpos.begin(); itx!=xpos.end(); ++itx)
        for(ity=ypos.begin(); ity!=ypos.end(); ++ity)
            out << *itx << " " << *ity << "\n";
    out << "\n\n";

    out << "object \"outputs_gridcon\" class gridconnections counts " << nx << " " << ny << "\n"
        //      << "attribute \"element type\" string \"cubes\" \n"
        << "attribute \"ref\" string \"positions\" \n\n\n";

    out << "object \"outputs_values\" class array type float rank 1 shape " << outputsize << " items " << nx*ny << " data follows \n";
  
    ProgressBar pb("Computing outputs for grid positions: " + tostring(nx)+"x"+tostring(ny), nx*ny);
    int n = 0;
    for(itx=xpos.begin(); itx!=xpos.end(); ++itx)
    {
        input[0] = *itx;
        for(ity=ypos.begin(); ity!=ypos.end(); ++ity)
        {
            input[1] = *ity;
            learner->computeOutput(input, output);
            for(int j=0; j<outputsize; j++)
                out << output[j] << " ";
            out << "\n";
            if(logsum==-FLT_MAX)
                logsum = output[0];
            else 
                logsum = logadd(logsum, output[0]);
            pb.update(n++);
        }
    }
    pb.close();
    out << "attribute \"dep\" string \"positions\" \n\n\n";

    out << "object \"outputs\" class field \n"
        << "component \"positions\" \"outputs_gridpos\" \n"
        << "component \"connections\" \"outputs_gridcon\" \n"
        << "component \"data\" \"outputs_values\" \n\n\n";
  
    out << "end" << endl;

    double surfelem = deltax*deltay;
    double surfintegral = exp(logsum)*surfelem;
    cerr << "Estimated integral over sampled domain: " << surfintegral << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::DX_save_2D_data ( const string &  filename,
const string &  basename,
Mat  data 
)

considers data to have 2d input (first 2 columns of data)

Definition at line 207 of file learner_utils.cc.

References DX_write_2D_data(), and PLERROR.

{
    ofstream out(filename.c_str());
    if(!out)
        PLERROR("Could not open %s for writing",filename.c_str());
    DX_write_2D_data(out, basename, data);
}

Here is the call graph for this function:

void PLearn::DX_save_2D_data_for_grid ( const string &  filename,
const string &  basename,
int  nx,
int  ny,
real  x0,
real  y0,
real  deltax,
real  deltay,
Mat  data 
)

data must have nx*ny rows and must corresponds to values associated with the 2D positions of the grid (typically learner outputs on that grid)

Definition at line 215 of file learner_utils.cc.

References DX_write_2D_data_for_grid(), and PLERROR.

{
    ofstream out(filename.c_str());
    if(!out)
        PLERROR("Could not open %s for writing",filename.c_str());
    DX_write_2D_data_for_grid(out, basename, nx, ny, x0, y0, deltax, deltay, data); 
}

Here is the call graph for this function:

void PLearn::DX_write_2D_data ( ostream &  out,
const string &  basename,
Mat  data 
)

considers data to have 2d input (first 2 columns of data)

Definition at line 117 of file learner_utils.cc.

References i, j, PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

Referenced by DX_save_2D_data().

{
    int l = data.length();
    int nvals = data.width()-2;

    // write 2D positions
    out << "object \"" << basename << "_pos\" class array type float rank 1 shape 2 items " << l << " data follows \n";
    for(int i=0; i<l; i++)
        out << data(i,0) << " " << data(i,1) << "\n";
    out << "\n\n\n";

    // Write data, which is in a one-to-one correspondence with the positions
    if(nvals==1)  // scalar field
    {
        out << "object \"" << basename << "_value\" class array type float rank 0 items " << l << " data follows \n";
        for(int i=0; i<l; i++)
            out << data(i,2) << "\n";
        out << "attribute \"dep\" string \"positions\" \n\n\n";
    }
    else if(nvals>1) // vector field
    {
        out << "object \"" << basename << "_value\" class array type float rank 1 shape " << nvals << " items " << l << " data follows \n";
        for(int i=0; i<l; i++)
        {
            for(int j=0; j<nvals; j++)
                out << data(i,2+j) << " ";
            out << "\n";
        }
        out << "attribute \"dep\" string \"positions\" \n\n\n";
    }

    // Finally field is created with two components: "positions" and "data"
    out << "object \"" << basename << "\" class field \n"
        << "component \"positions\" \"" << basename << "_pos\" \n";
    if(nvals>0)
        out << "component \"data\" \"" << basename << "_value\" \n";

    out << "\n\n";
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::DX_write_2D_data_for_grid ( ostream &  out,
const string &  basename,
int  nx,
int  ny,
real  x0,
real  y0,
real  deltax,
real  deltay,
Mat  data 
)

data must have nx*ny rows and must corresponds to values associated with the 2D positions of the grid (typically learner outputs on that grid)

Definition at line 158 of file learner_utils.cc.

References i, j, PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

Referenced by DX_save_2D_data_for_grid().

{
    int l = data.length();
    int nvals = data.width();

    string posname = string("\"") + basename + "_gridpos\"";
    out << "object " << posname << " class gridpositions counts " << nx << " " << ny << "\n"
        << "origin  " << x0 << " " << y0 << "\n"
        << "delta   " << deltax << " 0 \n"
        << "delta    0 " << deltay << " \n\n\n";

    string conname = string("\"") + basename + "_gridcon\"";
    out << "object " << conname << " class gridconnections counts " << nx << " " << ny << "\n"
        //      << "attribute \"element type\" string \"cubes\" \n"
        << "attribute \"ref\" string \"positions\" \n\n\n";

    string dataname = string("\"") + basename + "_values\"";
    // Write data, which is in a one-to-one correspondence with the positions
    if(nvals==1)  // scalar field
    {
        out << "object " << dataname << " class array type float rank 0 items " << l << " data follows \n";
        for(int i=0; i<l; i++)
            out << data(i,0) << "\n";
        out << "attribute \"dep\" string \"positions\" \n\n\n";
    }
    else if(nvals>1) // vector field
    {
        out << "object " << dataname << " class array type float rank 1 shape " << nvals << " items " << l << " data follows \n";
        for(int i=0; i<l; i++)
        {
            for(int j=0; j<nvals; j++)
                out << data(i,j) << " ";
            out << "\n";
        }
        out << "attribute \"dep\" string \"positions\" \n\n\n";
    }

    // Finally field is created with 3 components: "positions" "connections" and "data"
    out << "object \"" << basename << "\" class field \n"
        << "component \"positions\" " << posname << " \n"
        << "component \"connections\" " << conname << " \n"
        << "component \"data\" " << dataname << " \n\n\n";

    out << "\n\n";
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::DX_write_2D_fields ( ostream &  out,
const string &  basename,
TVec< Mat >  fields,
real  x0,
real  y0,
real  deltax,
real  deltay,
TVec< string >  fieldnames = TVec<string>() 
)

If fieldnames is omitted then the fields will be named basename_0 basename_1 ... Otherwise they are named basename_ followed by the corresponding field name.

Definition at line 54 of file GenerateDecisionPlot.cc.

References i, j, PLearn::TVec< T >::length(), m, and tostring().

{
    int nfields = fields.length();
    int nx = fields[0].length();
    int ny = fields[0].width();

    string posname = string("\"") + basename + "_gridpos\"";

    out << "object " << posname << " class gridpositions counts " << nx << " " << ny << "\n"
        << "origin  " << x0 << " " << y0 << "\n"
        << "delta   " << deltax << " 0 \n"
        << "delta    0 " << deltay << " \n\n\n";

    string conname = string("\"") + basename + "_gridcon\"";

    out << "object " << conname << " class gridconnections counts " << nx << " " << ny << "\n"
        //      << "attribute \"element type\" string \"cubes\" \n"
        << "attribute \"ref\" string \"positions\" \n\n\n";

    for(int k=0; k<nfields; k++)
    {
        Mat& m = fields[k];
        string fieldname = tostring(k);
        if(fieldnames)
            fieldname = fieldnames[k];

        string dataname = string("\"") + basename + "_" + fieldname + "_data\"";

        out << "object " << dataname << " class array type float rank 0 items " << nx*ny << " data follows \n";
        for(int i=0; i<nx; i++)
        {
            for(int j=0; j<ny; j++)
                out << m(i,j) << " ";
            out << "\n";
        }
        out << "attribute \"dep\" string \"positions\" \n\n\n";

        out << "object \"" << fieldname << "\" class field \n"
            << "component \"positions\" " << posname << " \n"
            << "component \"connections\" " << conname << " \n"
            << "component \"data\" " << dataname << " \n\n\n";
    }
}

Here is the call graph for this function:

void PLearn::DX_write_2D_fields ( ostream &  out,
const string &  basename,
Vec  X,
Vec  Y,
TVec< Mat >  fields 
)

Definition at line 100 of file GenerateDecisionPlot.cc.

References i, j, PLearn::TVec< T >::length(), m, and tostring().

{
    int nfields = fields.length();
    int nx = fields[0].length();
    int ny = fields[0].width();

    /*
      out << "object \"" << basename << "_X\" class array type float rank 0 items " << nx << " data follows \n";
      for(int i=0; i<nx; i++)
      out << X[i] << "\n";
      out << "\n\n";
    
      out << "object \"" << basename << "_Y\" class array type float rank 0 items " << ny << " data follows \n";
      for(int i=0; i<ny; i++)
      out << Y[i] << "\n";
    */

    string posname = string("\"") + basename + "_gridpos\"";
    out << "object " << posname << " class array type float rank 1 shape 2 items " << nx*ny << " data follows\n";
    for(int i=0; i<nx; i++)
        for(int j=0; j<ny; j++)
            out << X[i] << " " << Y[j] << "\n";
    out << "\n\n";

    string conname = string("\"") + basename + "_gridcon\"";
    out << "object " << conname << " class gridconnections counts " << nx << " " << ny << "\n"
        //      << "attribute \"element type\" string \"cubes\" \n"
        << "attribute \"ref\" string \"positions\" \n\n\n";

    for(int k=0; k<nfields; k++)
    {
        Mat& m = fields[k];
        string fieldname = "output" + tostring(k);
        string dataname = string("\"") + basename + "_" + fieldname + "_data\"";

        out << "object " << dataname << " class array type float rank 0 items " << nx*ny << " data follows \n";
        for(int i=0; i<nx; i++)
        {
            for(int j=0; j<ny; j++)
                out << m(i,j) << " ";
            out << "\n";
        }
        out << "attribute \"dep\" string \"positions\" \n\n\n";

        out << "object \"" << fieldname << "\" class field \n"
            << "component \"positions\" " << posname << " \n"
            << "component \"connections\" " << conname << " \n"
            << "component \"data\" " << dataname << " \n\n\n";
    }
}

Here is the call graph for this function:

int PLearn::eigen_SymmMat ( Mat &  in,
Vec &  e_value,
Mat &  e_vector,
int n_evalues_found,
bool  compute_all,
int  nb_eigen,
bool  compute_vectors = true,
bool  largest_evalues = true 
)

This function compute some or all eigenvalues (and optionnaly the corresponding eigenvectors) of a symmetric matrix. The eigenvectors are returned in the ROWS of e_vector.

Note1: If compute_all==true, then the field nb_eigen will not be used.

Note2: Your input matrix `in' will be over-written

Note3: If compute_all=false only some eigen-values (and optionally e-vectors) are computed. This flag allows to select whether those largest in magnitude (the default) or smallest in magnitude are selected.

Note4: This function is slightly modified. Now, you do not have to check if your input matrix is symmetric or not. Note5: The vectors and eigenvalues seem to be sorted in increasing order (

Definition at line 49 of file plapack.cc.

References PLearn::TMat< T >::data(), dsyev_(), endl(), i, PLearn::TMat< T >::isSymmetric(), j, lapack_Xsyevx_(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), N, PLERROR, PLWARNING, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), ssyev_(), and PLearn::TMat< T >::width().

Referenced by affineNormalization(), diagonalizeSubspace(), eigen_SymmMat_decreasing(), and multivariate_normal().

{
    PLWARNING("eigen_SymmMat is deprecated: use eigenVecOfSymmMat or lapackEIGEN instead");

#ifndef USE_BLAS_SPECIALISATIONS
    PLERROR("eigen_SymmMat: LAPACK not available on this system!");
    return 0;
#else
    if (!in.isSymmetric())
        PLERROR("eigen_SymmMat: Your input matrix is not symmetric\n");

    // some check
    if (nb_eigen < 1  ||  nb_eigen > in.length())
        PLERROR("The number of desired eigenvalues (%d) must be in range [1,%d]", nb_eigen, in.length());

    if (compute_all)
    {
        if (e_vector.length() != in.length()  ||  e_vector.width() != in.width())
            e_vector.resize(in.length(), in.width());
        if (in.length() != e_value.length())
            e_value.resize(in.length());
    }
    else
    {
        if (e_vector.length() != nb_eigen  ||  e_vector.width() != in.width())
            e_vector.resize(nb_eigen, in.width());
        if (nb_eigen != e_value.length())
            e_value.resize(nb_eigen);
    }

    // for the moment, we do not accept sub-matrices...
    if (in.mod() != in.width())
        PLERROR("The input matrix cannot be a sub-matrix...");

    // we set the parameters to call the LAPACK Fortran function
    // if compute_all==true,  we call <ssyev>
    // if compute_all==false, we call <ssyevx>

    int INFO = 1;
    if (compute_all)
    {
        char JOBZ;
        if (compute_vectors)
            JOBZ = 'V';
        else
            JOBZ = 'N';
        char UPLO = 'U';
        int N = in.length();
        real* A = in.data();
        int LDA = N;
        real* W = new real[N];
        int LWORK = 3*N;
        real* WORK = new real[LWORK];

        // we now call the LAPACK Fortran function <ssyev>
#ifdef USEFLOAT
        ssyev_(&JOBZ, &UPLO, &N, A, &LDA, W, WORK, &LWORK, &INFO);
#endif
#ifdef USEDOUBLE
        dsyev_(&JOBZ, &UPLO, &N, A, &LDA, W, WORK, &LWORK, &INFO);
#endif

        if (INFO != 0)
        {
            PLWARNING("eigen_SymmMat: something in ssyev got wrong.  Error code %d",INFO);
            n_evalues_found = 0;
        }
        else
        {
            n_evalues_found = N;
            for (int i=0; i<N; i++)
                e_value[i] = W[i];

            if (compute_vectors)
            {
                real* p_evector = e_vector.data();
                real* p_a = A;
                for (int i=0; i<N; i++)
                    for (int j=0; j<N; j++, p_evector++, p_a++)
                        *p_evector = *p_a;
            }
        }
        delete[] W;
        delete[] WORK;
    }
    else
    {
        char JOBZ;
        if (compute_vectors)
            JOBZ = 'V';
        else
            JOBZ = 'N';
        char RANGE = 'I';
        char UPLO = 'U';
        int N = in.length();
        real* A = in.data();
        int LDA = N;
        real VL, VU;  // not referenced
        int IL,IU;
        if (largest_evalues)
        {
            IL = N - nb_eigen + 1;
            IU = N;
        }
        else
        {
            IL = 1;
            IU = nb_eigen;
        }
        real ABSTOL = 1e-10;
        int M;
        real* W= new real[N];
        int LDZ = N;
        real* Z = new real[LDZ*nb_eigen];
        int LWORK = 8*N;
        real* WORK = new real[LWORK];
        int* IWORK = new int[5*N];
        int* IFAIL = new int[N];

        // we now call the LAPACK Fortran function <ssyevx>
        lapack_Xsyevx_(&JOBZ, &RANGE, &UPLO, &N, A, &LDA, &VL, &VU, &IL, &IU, &ABSTOL, &M, W, Z, &LDZ, WORK, &LWORK, IWORK, IFAIL, &INFO);

        n_evalues_found = M;
        if (M != nb_eigen)
            cout << "eigen_SymmMat: something in ssyevx got wrong." << endl
                 << "The number of eigenvalues found (" << M
                 << ") is different from what we asked (" << nb_eigen << ")." << endl;

        if (INFO != 0)
        {
            //      cout << "eigen_SymmMat: something in ssyevx got wrong.  Error code "
            //           << INFO << endl << "See the man page of ssyevx for more details"
            //           << endl;
        }
        else
        {
            for (int i=0; i<M; i++)
                e_value[i] = W[i];

            if (compute_vectors)
            {
                real* p_evector = e_vector.data();
                real* p_z = Z;
                for (int i=0; i<M; i++)
                    for (int j=0; j<N; j++, p_evector++, p_z++)
                        *p_evector = *p_z;
            }
        }
        delete[] W;
        delete[] WORK;
        delete[] IWORK;
        delete[] IFAIL;
    }
    return INFO;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::eigen_SymmMat_decreasing ( Mat &  in,
Vec &  e_value,
Mat &  e_vector,
int n_evalues_found,
bool  compute_all,
int  nb_eigen,
bool  compute_vectors,
bool  largest_evalues 
)

same as the previous call, but eigenvalues/vectors are sorted by largest firat (in decreasing order)

Definition at line 207 of file plapack.cc.

References eigen_SymmMat(), PLWARNING, PLearn::TVec< T >::swap(), and PLearn::TMat< T >::swapUpsideDown().

{
    PLWARNING("eigen_SymmMat_decreasing is deprecated: use eigenVecOfSymmMat or lapackEIGEN instead");

    int res = eigen_SymmMat(in, e_value, e_vector, n_evalues_found,
                            compute_all, nb_eigen, compute_vectors, largest_evalues);
    e_value.swap();
    e_vector.swapUpsideDown();
    return res;
}

Here is the call graph for this function:

template<class MatT >
int PLearn::eigenSparseNonSymmMat ( MatT &  A,
Vec  e_values,
Mat  e_vectors,
FORTRAN_Integer &  n_evalues,
int  max_n_iter = 300,
bool  compute_vectors = true,
bool  largest_evalues = true,
bool  according_to_magnitude = true,
bool  both_ends = false 
)

Same arguments as eigenSparseSymmMat except that A is not symmetric. We ignore the imaginary part if there is one. See ARPACK/SRC files for more details. To get the eigen pairs in the same order as in plapack's eigenVecOfSymmMat, do the same thing as above, but you don't have to swap the eigen vectors and eigen values.

< half of the e-values from each end of the spectrum

< we need some extra space...

Definition at line 186 of file parpack.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), dnaupd_(), dneupd_(), FORTRAN_Integer, info, PLearn::TMat< T >::length(), MIN, n, PLERROR, PLWARNING, product(), PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), select(), snaupd_(), sneupd_(), PLearn::TVec< T >::subVec(), PLearn::TMat< T >::width(), and x.

{
#ifdef NOARPACK
    PLERROR("eigenSparseNonSymmMat: ARPACK not available on this system!");
    return 0;
#else
    FORTRAN_Integer ido=0;
    char bmat[1];
    bmat[0] = 'I';
    char which[2];
    FORTRAN_Integer n=A.length();
    if (e_vectors.length()!=n_evalues || e_vectors.width()!=n)
        PLERROR("eigenSparseNonSymmMat: expected e_vectors.width(%d)=A.length(%d), e_vectors.length(%d)=e_values.length(%d)",
                e_vectors.width(),n,e_vectors.length(),n_evalues);
    if (both_ends)
        strncpy(which,"BE",2); 
    else
    {
        which[0]= largest_evalues? 'L' : 'S';
        which[1]= according_to_magnitude? 'M' : 'R';//according to magnitude or according to real part
    }
    real tol=0;
    FORTRAN_Integer ncv=MIN(3+int(n_evalues*1.5),n-1);
    e_vectors.resize(ncv,n); 
    FORTRAN_Integer iparam[11];
    iparam[0]=1;
    iparam[2]=max_n_iter;
    iparam[6]=1;
    FORTRAN_Integer ipntr[11];
    Vec workd(3*n);
    FORTRAN_Integer lworkl = 3*(ncv * ncv) + (ncv * 6);
    Vec workl(lworkl);
    Vec resid(n);
    FORTRAN_Integer info=0;
    for (;;) {
#ifdef USEDOUBLE
        dnaupd_(&ido, bmat, &n, which, &n_evalues, &tol, resid.data(), &ncv, e_vectors.data(), &n,
                iparam, ipntr, workd.data(), workl.data(), &lworkl, &info, 1, 2);
#endif
#ifdef USEFLOAT
        snaupd_(&ido, bmat, &n, which, &n_evalues, &tol, resid.data(), &ncv, e_vectors.data(), &n,
                iparam, ipntr, workd.data(), workl.data(), &lworkl, &info, 1, 2);
#endif
        if (ido == -1 || ido == 1) {
            Vec x=workd.subVec(ipntr[0]-1,n);
            Vec z=workd.subVec(ipntr[1]-1,n);
            product(A, x, z);
        } else break;
    }
    if (info != 0 && info != 1)
    {
        PLWARNING("eigenSparseNonSymmMat: naupd returning error %ld",info);
        return info;
    }
    Vec e_valuesIm(n_evalues+1);
    Vec workev(3*ncv);
    if (info > 0)
    {
        n_evalues = iparam[4];
        e_values.resize(n_evalues+1);
    }
    e_vectors.resize(n_evalues+1,n);
    if (n_evalues>0)
    {
        FORTRAN_Integer rvec = compute_vectors;
        TVec<FORTRAN_Integer> select(ncv);
        FORTRAN_Integer ierr;
        real sigmai =0;
        real sigmar =0;
#ifdef USEDOUBLE
        dneupd_(&rvec, "A", select.data(), e_values.data(), e_valuesIm.data(), e_vectors.data(), &n,
                &sigmar, &sigmai, workev.data(), bmat, &n, which, &n_evalues, &tol, 
                resid.data(), &ncv, e_vectors.data(), &n, iparam, ipntr, workd.data(), 
                workl.data(), &lworkl, &ierr, 3, 1, 2);
#endif
#ifdef USEFLOAT
        sneupd_(&rvec, "A", select.data(), e_values.data(), e_valuesIm.data(), e_vectors.data(), &n,
                &sigmar, &sigmai, workev.data(), bmat, &n, which, &n_evalues, &tol, 
                resid.data(), &ncv, e_vectors.data(), &n, iparam, ipntr, workd.data(), 
                workl.data(), &lworkl, &ierr, 3, 1, 2);
#endif
        if (ierr != 0)
        {
            PLWARNING("eigenSparseNonSymmMat: neupd returning error %ld",ierr);
            return ierr;
        }
    }
#endif
    return info;
}

Here is the call graph for this function:

template<class MatT >
int PLearn::eigenSparseSymmMat ( MatT &  A,
Vec &  e_values,
Mat &  e_vectors,
FORTRAN_Integer &  n_evalues,
int  max_n_iter = 300,
bool  compute_vectors = true,
bool  largest_evalues = true,
bool  according_to_magnitude = true,
bool  both_ends = false,
real  ncv2nev_ratio = 1.5 
)

Compute some eigenvalues, and optionally eigenvectors, of a symmetric, possibly sparse, generalized matrix A. The only operation that will be performed on A (repetitively) is the matrix-vector product, i.e. A.product(Vec x, Vec y), yielding y = A x.

This uses the ARPACK library.

Returns 0 if all went well. Otherwise, see the INFO values set by [ds][eu]pd in the ARPACK/SRC files.

It is possible that only a subset of the eigenvalues are found (as given by n_evalues upon return, and the new size of e_vectors/e_values). Note also that e_vectors might be internally and temporarily re-allocated to a larger size, with at most 1.5 times more rows.

If you want the eigen values and eigen vectors to be returned in the same order as in plapack's eigenVecOfSymmMat, "according_to_magnitude" must be set to false and you must swap the eigen values and the eigen vectors. i.e. do something like: ............................................................. Mat evectors(nb_principal_components,train_set.length()); Vec evalues(nb_principal_components); int status; FORTRAN_Integer n_ev=nb_principal_components;

status = eigenSparseSymmMat(A, evalues, evectors, n_ev, 300, true, true, false); if (status<0 || status>1) PLERROR("MyClass: eigenSparseSymmMat return error code number %d (see ARPACK dsaupd INFO variable)", status); if (status==1 || n_ev != nb_principal_components) PLERROR("MyClass: eigenSparseSymmMat computed only %d e-vectors rather than the required %d", n_ev, nb_principal_components);

evalues.swap(); evectors.swapUpsideDown(); .............................................................

< half of the e-values from each end of the spectrum

< we need some extra space...

Definition at line 89 of file parpack.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), dsaupd_(), dseupd_(), FORTRAN_Integer, info, PLearn::TMat< T >::length(), MIN, n, PLERROR, PLWARNING, product(), PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), select(), ssaupd_(), sseupd_(), PLearn::TVec< T >::subVec(), PLearn::TMat< T >::width(), and x.

Referenced by kernelPCAfromDotProducts(), and metricMultiDimensionalScaling().

{
#ifdef NOARPACK
    PLERROR("eigenSparseSymmMat: ARPACK not available on this system!");
    return 0;
#else
    FORTRAN_Integer ido=0;
    char bmat[1];
    bmat[0] = 'I';
    char which[2];
    FORTRAN_Integer n=A.length();
    if (e_vectors.length()!=n_evalues || e_vectors.width()!=n)
        PLERROR("eigenSparseSymmMat: expected e_vectors.width(%d)=A.length(%d), e_vectors.length(%d)=e_values.length(%d)",
                e_vectors.width(),n,e_vectors.length(),n_evalues);
    if (both_ends)
        strncpy(which,"BE",2); 
    else
    {
        which[0]= largest_evalues? 'L' : 'S';
        which[1]= according_to_magnitude? 'M' : 'A';
    }
    real tol=0;
    FORTRAN_Integer ncv=MIN(3+int(n_evalues*ncv2nev_ratio),n-1);
    e_vectors.resize(ncv,n); 
    FORTRAN_Integer iparam[11];
    iparam[0]=1;
    iparam[2]=max_n_iter;
    iparam[6]=1;
    FORTRAN_Integer ipntr[11];
    Vec workd(3*n);
    FORTRAN_Integer lworkl = (ncv * ncv) + (ncv * 8);
    Vec workl(lworkl);
    Vec resid(n);
    FORTRAN_Integer info=0;
    for (;;) {
#ifdef USEDOUBLE
        dsaupd_(&ido, bmat, &n, which, &n_evalues, &tol, resid.data(), &ncv, e_vectors.data(), &n,
                iparam, ipntr, workd.data(), workl.data(), &lworkl, &info, 1, 2);
#endif
#ifdef USEFLOAT
        ssaupd_(&ido, bmat, &n, which, &n_evalues, &tol, resid.data(), &ncv, e_vectors.data(), &n,
                iparam, ipntr, workd.data(), workl.data(), &lworkl, &info, 1, 2);
#endif
        if (ido == -1 || ido == 1) {
            Vec x=workd.subVec(ipntr[0]-1,n);
            Vec z=workd.subVec(ipntr[1]-1,n);
            product(A, x, z);
        } else break;
    }
    if (info != 0 && info != 1)
    {
        PLWARNING("eigenSparseSymmMat: saupd returning error %ld",info);
        return info;
    }
    if (info > 0)
    {
        n_evalues = iparam[4];
        e_values.resize(n_evalues);
    }
    e_vectors.resize(n_evalues,n);
    if (n_evalues>0)
    {
        FORTRAN_Integer rvec = compute_vectors;
        TVec<FORTRAN_Integer> select(ncv);
        FORTRAN_Integer ierr;
        real sigma =0;
#ifdef USEDOUBLE
        dseupd_(&rvec, "All", select.data(), e_values.data(), e_vectors.data(), &n, &sigma, 
                bmat, &n, which, &n_evalues, &tol, resid.data(), &ncv, e_vectors.data(), &n, 
                iparam, ipntr, workd.data(), workl.data(), &lworkl, &ierr, 3, 1, 2);
#endif
#ifdef USEFLOAT
        sseupd_(&rvec, "All", select.data(), e_values.data(), e_vectors.data(), &n, &sigma, 
                bmat, &n, which, &n_evalues, &tol, resid.data(), &ncv, e_vectors.data(), &n, 
                iparam, ipntr, workd.data(), workl.data(), &lworkl, &ierr, 3, 1, 2);
#endif
        if (ierr != 0)
        {
            PLWARNING("eigenSparseSymmMat: seupd returning error %ld",ierr);
            return ierr;
        }
    }
#endif
    return info;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class num_t >
void PLearn::eigenVecOfSymmMat ( TMat< num_t > &  m,
int  k,
TVec< num_t > &  eigen_values,
TMat< num_t > &  eigen_vectors,
bool  verbose = true 
)

Computes up to k largest eigen_values and corresponding eigen_vectors of symmetric matrix m.

Parameters eigen_values and eigen_vectors are resized accordingly and filled by the call. The eigenvalues are returned in decreasing order (largest first). The corresponding eigenvectors are in the *ROWS* of eigen_vectors WARNING: m is destroyed during the operation.

Definition at line 356 of file plapack.h.

References fillItSymmetric(), PLearn::TMat< T >::isEmpty(), PLearn::TMat< T >::isSymmetric(), lapackEIGEN(), PLearn::TMat< T >::length(), PLWARNING, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), PLearn::TVec< T >::swap(), PLearn::TMat< T >::swapUpsideDown(), and PLearn::TMat< T >::width().

Referenced by addEigenMatrices(), PLearn::PCA::classical_algo(), PLearn::GaussianDistribution::computeEigenDecomposition(), PLearn::GaussMix::computeLogLikelihood(), PLearn::GaussMix::computeMeansAndCovariances(), computePrincipalComponents(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), PLearn::PCA::incremental_algo(), PLearn::NatGradEstimator::operator()(), rotationFromWeightedMatchedPoints(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), sums2Gaussian(), PLearn::KernelProjection::train(), and PLearn::GaussianProcessRegressor::train().

{
    if (m.isEmpty()) {
        // Empty matrix: we just need to do some resizing.
        eigen_values.resize(0);
        eigen_vectors.resize(m.length(), m.width());
        return;
    }
    if (!m.isSymmetric()) {
        if (m.isSymmetric(false))
        {
            // Almost symmetric.
            if (verbose)
                PLWARNING("In eigenVecOfSymmMat - The matrix is only 'almost' symmetric, "
                          "it will be forced to be exactly symmetric");
        }
        else
            PLWARNING("In eigenVecOfSymmMat - The matrix is not symmetric, it will "
                      "be forced to be exactly symmetric by copying the top "
                      "right part to the bottom left part");
        fillItSymmetric(m);
    }
    eigen_vectors.resize(k,m.width());
    eigen_values.resize(k);
    // FASTER
    if(k>= m.width())
        lapackEIGEN(m, eigen_values, eigen_vectors, 'A',num_t(0),num_t(0));
    else
        lapackEIGEN(m, eigen_values, eigen_vectors, 'I', num_t(m.width()-k), num_t(m.width()-1));

    // put largest (rather than smallest) first!
    eigen_values.swap();
    eigen_vectors.swapUpsideDown();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::eigsrt ( Vec &  d,
Mat &  v,
int  n 
)

Definition at line 429 of file geometry.cc.

References i, j, and n.

Referenced by weightedRotationFromMatchedPoints().

{
  for( int i=0 ; i<n-1 ; i++ )
  {
    real p = d[ i ];
    int k = i;

    for( int j=i+1 ; j<n ; j++ )
    {
      if( fabs( d[j] ) >= fabs( p ) )
      {
        p = d[ j ];
        k = j;
      }
    }

    if( k!=i )
    {
      d[ k ] = d[ i ];
      d[ i ] = p;
      for( int j=0 ; j<n ; j++ )
      {
        p = v( j, i );
        v( j, i ) = v( j, k );
        v( j, k ) = p;
      }
    }
  }
}

Here is the caller graph for this function:

bool PLearn::elementOf ( const char *  s,
const char  t 
)

Definition at line 113 of file TypesNumeriques.cc.

Referenced by compactRepresentationTranslate().

{
    return (bool)strchr(s,t);
}

Here is the caller graph for this function:

template<class T >
void PLearn::elementsEqualTo ( const TVec< T > &  source,
const T &  value,
const TVec< T > &  destination 
)

put in destination 1's when (*this)[i]==value, 0 otherwise

Definition at line 203 of file TMat_impl.h.

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

{
#ifdef BOUNDCHECK
    if (source.length()!=destination.length())
        PLERROR("elementsEqualTo(Vec(%d),%f,Vec(%d)): incompatible dimensions",
                source.length(),value,destination.length());
#endif
    T* src=source.data();
    T* dst=destination.data();
    for (int i=0;i<destination.length();i++)
        if (src[i]==value) dst[i]=1.0;
        else dst[i]=0.0;
}

Here is the call graph for this function:

Var PLearn::ElogP ( ConditionalExpression  conditional_expression,
RVInstanceArray &  parameters_to_learn,
bool  clearMarksUponReturn = true 
)

This is like logP but it represents the expected log-probability of obs=conditional_expression.LHS.v given the RHS, where the expectation is over the "hidden" random variables of EM in mixtures, as a function of the values of the parameters_to_learn.

Definition at line 642 of file RandomVar.cc.

References logP().

Referenced by EM().

{ 
    return logP(conditional_expression,clearMarksUponReturn,&parameters_to_learn);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::EM ( ConditionalExpression  conditional_expression,
RVArray  parameters_to_learn,
VMat  distr,
int  n_samples,
int  max_n_iterations = 1,
real  relative_improvement_threshold = 0.001,
bool  accept_worsening_likelihood = false,
bool  compute_final_train_NLL = true 
)

Train a part of the graphical model given by the rv_expression (e.g. obtained with an expression of the form (Y==y)|(X1==x1 && X2==x2) with an analytical solution or the EM algorithm which maximize the likelihood of the LHS of the expression given the RHS. The user must also specified the set of parameters over which EM whould be applied (parameters_to_learn). The observed Vars (e.g. x1, x2, y) in the conditional_expression will be sampled from the VMat n_samples times to form the training set. Note that a sample from VMat must contain the concatenation of the values for x1, x2 and y in that order (RHS in the given order, followed by LHS). At most max_n_iterations epoch of the EM algorithm will be performed, or until the relative improvement in log-likelihood is below the relative_improvement_threshold.

NOTE NOTE NOTE:

THE ORDER OF THE VALUES IN THE DISTRIBUTION MUST BE: (1) conditioning variables (RHS), (2) output variables

Definition at line 460 of file RandomVar.cc.

References PLearn::RVInstanceArray::instances(), PLearn::ConditionalExpression::LHS, logP(), propagationPath(), PLearn::ConditionalExpression::RHS, PLearn::RVInstance::v, PLearn::RVInstance::V, and PLearn::RVArray::values().

{
    // assign the value fields of the RV's to those provided by user
    RandomVar& LHS=conditional_expression.LHS.V;
    Var& lhs_observation=conditional_expression.LHS.v;
    VarArray prop_input_vars;
    // NOTE NOTE NOTE:
    //
    // THE ORDER OF THE VALUES IN THE DISTRIBUTION MUST BE:
    // (1) conditioning variables (RHS), (2) output variables (LHS)
    VarArray distr_observed_vars = 
        conditional_expression.RHS.instances() & (VarArray)lhs_observation;
    // note that we don't use LHS->value to put the LHS_observation
    // in case some distribution need to compare the observation
    // with a function of their parents that is put in their value field.
    Var logp = logP(conditional_expression,false);
    VarArray prop_path = 
        propagationPath(distr_observed_vars & parameters_to_learn.values(), logp);
    // do the actual EM training with multiple epochs
    real train_NLL =
        LHS->EM(parameters_to_learn,prop_path,distr_observed_vars, distr, 
                n_samples, max_n_iterations, relative_improvement_threshold,
                accept_worsening_likelihood);
    if (compute_final_train_NLL)
        train_NLL = LHS->epoch(prop_path,distr_observed_vars,distr,
                               n_samples,false);
    LHS->unmarkAncestors();
    return train_NLL;
}

Here is the call graph for this function:

real PLearn::EM ( ConditionalExpression  conditional_expression,
RVArray  parameters_to_learn,
VMat  distr,
int  n_samples,
int  max_n_iterations,
real  relative_improvement_threshold,
bool  compute_final_train_NLL 
)

Definition at line 497 of file RandomVar.cc.

References ElogP(), endl(), i, PLearn::RVInstanceArray::instances(), PLearn::ConditionalExpression::LHS, logP(), meanOf(), PLERROR, propagationPath(), PLearn::ConditionalExpression::RHS, PLearn::TVec< T >::size(), PLearn::RVInstance::v, PLearn::RVInstance::V, and PLearn::RVArray::values().

{
    // assign the value fields of the RV's to those provided by user
    RandomVar& LHS=conditional_expression.LHS.V;
    Var& lhs_observation=conditional_expression.LHS.v;
    VarArray prop_input_vars;
    // NOTE NOTE NOTE:
    //
    // THE ORDER OF THE VALUES IN THE DISTRIBUTION MUST BE:
    // (1) conditioning variables (RHS), (2) output variables (LHS)
    VarArray distr_observed_vars = 
        conditional_expression.RHS.instances() & (VarArray)lhs_observation;
    // note that we don't use LHS->value to put the LHS_observation
    // in case some distribution need to compare the observation
    // with a function of their parents that is put in their value field.
    RVInstanceArray params_to_learn(parameters_to_learn.size());
    for (int i=0;i<parameters_to_learn.size();i++)
    {
        params_to_learn[i].V=parameters_to_learn[i];
        // params_to_learn[i].v will hold "new" params in EM epoch
        params_to_learn[i].v=Var(parameters_to_learn[i]->length());
        // initialize "new" params with current value
        params_to_learn[i].v->value << params_to_learn[i].V->value->value;
    }
    Var elogp = ElogP(conditional_expression,params_to_learn,false);
    VarArray new_params = params_to_learn.instances();
    VarArray current_params = parameters_to_learn.values();
    VarArray prop_path = 
        propagationPath(distr_observed_vars & current_params & new_params, elogp);
    // do the actual EM training with N epochs, N=#free parameters
    // (this is because, assuming that maximizing the auxiliary function
    // is solvable analytically, i.e. it is quadratic in the parameters,
    // then N iterations of conjugate gradiends should suffice. With
    // numerical errors, we can tolerate a bit more...
    int n_free_params = new_params.nelems();
    int max_n_Q_iterations = 1 + (int)(n_free_params*1.5);
    Vec params(n_free_params);
    // again, assuming solvable max Q, a specialized but faster CG is enough
    Var totalElogP = meanOf(elogp,distr_observed_vars,
                            distr,n_samples,new_params);
    PLERROR("In EM (RandomVar.cc), code using ConjugateGradientOptimizer is now commented out");
    max_n_Q_iterations = max_n_Q_iterations; // TODO Remove this (just to make the compiler happy).
    /* REMOVED because not in the PLearn CVS repository.
     
    ConjugateGradientOptimizer opt(new_params, totalElogP,
    0.001,0.001,max_n_Q_iterations);
    */

    // the outer loop is over EM iterations
    real avgnegloglik = 0;
    real previous_nll=FLT_MAX, nll_change;
    bool EMfinished= !(max_n_iterations>0);
    int n_epochs=0;

    while (!EMfinished) {
        // the inner loop is over "new params" optimization of totalElogP 
        PLERROR("In EM (RandomVar.cc), code using ConjugateGradientOptimizer is now commented out");
//    opt.optimize(); COMMENTED (same as above)
        avgnegloglik = - totalElogP->value[0];
        cout << "EM epoch -Q = " << avgnegloglik << endl;
        nll_change = (previous_nll - avgnegloglik)/fabs(previous_nll);
        if (nll_change < -1e-4)
            printf("%s %s from %f to %f\n", "RandomVariable::EM",
                   "An EM epoch yielded worse negative log-likelihood,",
                   previous_nll, avgnegloglik);
        n_epochs++;
        EMfinished = 
            ((n_epochs >= max_n_iterations) ||
             (fabs(nll_change) <= relative_improvement_threshold) ||
             nll_change  <= relative_improvement_threshold);
        previous_nll=avgnegloglik;

        // copy the "new params" to the "current params"
        new_params >> params;
        current_params << params;
    }

    if (compute_final_train_NLL)
    {
        Var logp = logP(conditional_expression,false);
        Var totalLogP = meanOf(logp,distr_observed_vars,
                               distr,n_samples,current_params);
        totalLogP->fprop();
        avgnegloglik = - totalLogP->value[0];
    }

    LHS->unmarkAncestors();
    return avgnegloglik;
}

Here is the call graph for this function:

void PLearn::endianswap ( void *  ptr,
int  nelems,
int  elemsize 
) [inline]

calls endianswap2, 4, or 8 depending on elemsize (an elemsize of 1 is also valid and does nothing)

Definition at line 75 of file byte_order.h.

References endianswap2(), endianswap4(), and endianswap8().

Referenced by PLearn::IntVecFile::append(), binread_as(), PLearn::DiskVMatrix::build_(), PLearn::DiskVMatrix::closeCurrentFiles(), endianswap(), PLearn::BufferedIntVecFile::flush(), PLearn::DiskVMatrix::getNewRow(), PLearn::IntVecFile::getVec(), new_read_compressed(), PR_Read_double(), PR_Read_float(), PR_Read_int(), PR_Read_short(), PR_Write_double(), PR_Write_float(), PR_Write_int(), PLearn::TMat< pair< real, real > >::read(), PLearn::PStream::readBinaryNum(), PLearn::PStream::readBinaryNumAs(), readSequence(), reverse_double(), reverse_float(), reverse_int(), reverse_short(), reverse_uint(), and reverse_ushort().

{
    switch(elemsize)
    {
    case 1:
        break;
    case 2:
        endianswap2(ptr,nelems);
        break;
    case 4:
        endianswap4(ptr,nelems);
        break;
    case 8:
        endianswap8(ptr,nelems);
        break;
    default:
        abort();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::endianswap ( T *  ptr,
int  n = 1 
) [inline]

Definition at line 97 of file byte_order.h.

References endianswap(), and n.

{ endianswap(ptr,n,sizeof(T)); }

Here is the call graph for this function:

void PLearn::endianswap2 ( void *  ptr,
int  n 
)

swaps endians for n 2-byte elements (such as short)

Definition at line 43 of file byte_order.cc.

Referenced by endianswap(), and PLearn::BinaryNumbersVMatrix::getNewRow().

{
    char *mptr = (char *) ptr;
    char tmp;
    while(n--)
    {
        tmp = mptr[0]; mptr[0]=mptr[1]; mptr[1]=tmp;
        mptr+=2;
    }
}

Here is the caller graph for this function:

void PLearn::endianswap4 ( void *  ptr,
int  n 
)

swaps endians for n 4-byte elements (such as int or float)

Definition at line 54 of file byte_order.cc.

Referenced by endianswap(), and PLearn::BinaryNumbersVMatrix::getNewRow().

{
    char *mptr = (char *) ptr;
    char tmp;
    while(n--)
    {
        tmp = mptr[0]; mptr[0]=mptr[3]; mptr[3]=tmp;
        tmp = mptr[1]; mptr[1]=mptr[2]; mptr[2]=tmp;
        mptr+=4;
    }
}

Here is the caller graph for this function:

void PLearn::endianswap8 ( void *  ptr,
int  n 
)

swaps endians for n 8-byte elements (such as double)

Definition at line 66 of file byte_order.cc.

Referenced by endianswap(), and PLearn::BinaryNumbersVMatrix::getNewRow().

{
    char *mptr = (char *) ptr;
    char tmp;
    while(n--)
    {
        tmp = mptr[0]; mptr[0]=mptr[7]; mptr[7]=tmp;
        tmp = mptr[1]; mptr[1]=mptr[6]; mptr[6]=tmp;
        tmp = mptr[2]; mptr[2]=mptr[5]; mptr[5]=tmp;
        tmp = mptr[3]; mptr[3]=mptr[4]; mptr[4]=tmp;
        mptr+=8;
    }
}

Here is the caller graph for this function:

PStream & PLearn::endl ( PStream &  out)

Definition at line 143 of file PStream.cc.

References PLearn::PStream::endl().

Referenced by PLearn::Test_PP::accessPointedObject(), PLearn::MergeDond2Files::accumulateVec(), PLearn::LineOutputProgressBarPlugin::addProgressBar(), addToWrappedObjectsSet(), align(), alloc_from_pool(), PLearn::LearnerCommand::analyze_inputs(), PLearn::AnalyzeDond2DiscreteVariables::analyzeDiscreteVariable(), PLearn::AnalyzeFieldStats::analyzeVariableStats(), PLearn::CompactVMatrix::append(), PLearn::AsciiVMatrix::appendRow(), PLearn::NnlmOutputLayer::applyAllClassVars(), PLearn::NnlmOutputLayer::applyMuAndSigmaEmpiricalUpdate(), PLearn::AsciiVMatrix::AsciiVMatrix(), PLearn::HyperLearner::auto_save(), autoThreshLP(), PLearn::PLearnCommandRegistry::badcommand(), PLearn::BasicIdentityCallsTest::binary(), PLearn::WeightedLogGaussian::bprop(), PLearn::RBMModule::bpropAccUpdate(), PLearn::NetworkModule::bpropAccUpdate(), PLearn::KLp0p1RBMModule::bpropAccUpdate(), PLearn::PvGradNNet::bpropUpdateNet(), PLearn::VariableDeletionVMatrix::build_(), PLearn::UnfrozenDeepBeliefNet::build_(), PLearn::TreeDBNModule::build_(), PLearn::TopDownAsymetricDeepNetwork::build_(), PLearn::TestImputations::build_(), PLearn::SupervisedDBN::build_(), PLearn::Supersampling2DModule::build_(), PLearn::SubsamplingDBN::build_(), PLearn::Subsampling2DModule::build_(), PLearn::StructuralLearner::build_(), PLearn::StackedSVDNet::build_(), PLearn::StackedFocusedAutoassociatorsNet::build_(), PLearn::StackedAutoassociatorsNet::build_(), PLearn::ReorderByMissingVMatrix::build_(), PLearn::RemoveDuplicateVMatrix::build_(), PLearn::RegressionTreeRegisters::build_(), PLearn::RBMMultitaskClassificationModule::build_(), PLearn::RBMConv2DLLParameters::build_(), PLearn::RBMConv2DConnection::build_(), PLearn::RBMClassificationModule::build_(), PLearn::PyPLearnScript::build_(), PLearn::PseudolikelihoodRBM::build_(), PLearn::Preprocessing::build_(), PLearn::PartSupervisedDBN::build_(), PLearn::OnlineGramNaturalGradientOptimizer::build_(), PLearn::NxProfileLearner::build_(), PLearn::NnlmOnlineLearner::build_(), PLearn::NetflixVMatrix::build_(), PLearn::NeighborhoodConditionalMean::build_(), PLearn::NatGradSMPNNet::build_(), PLearn::MultiTargetOneHotVMatrix::build_(), PLearn::ModuleTester::build_(), PLearn::MergeDond2Files::build_(), PLearn::MaxSubsampling2DModule::build_(), PLearn::ManifoldParzen::build_(), PLearn::InferenceRBM::build_(), PLearn::HintonDeepBeliefNet::build_(), PLearn::GraphicalBiText::build_(), PLearn::GramVMatrix::build_(), PLearn::GaussPartSupervisedDBN::build_(), PLearn::GaussianDBNRegression::build_(), PLearn::GaussianDBNClassification::build_(), PLearn::FixDond2BinaryVariables::build_(), PLearn::Experimentation::build_(), PLearn::DynamicallyLinkedRBMsModel::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::DisregardRowsVMatrix::build_(), PLearn::DiscriminativeRBM::build_(), PLearn::DiscriminativeDeepBeliefNet::build_(), PLearn::DichotomizeDond2DiscreteVariables::build_(), PLearn::DenoisingRecurrentNet::build_(), PLearn::DeepReconstructorNet::build_(), PLearn::DeepNonLocalManifoldParzen::build_(), PLearn::DeepBeliefNet::build_(), PLearn::DatedJoinVMatrix::build_(), PLearn::Convolution2DModule::build_(), PLearn::ComputeDond2Target::build_(), PLearn::CheckDond2FileSequence::build_(), PLearn::BackConvolution2DModule::build_(), PLearn::AnalyzeFieldStats::build_(), PLearn::AddCostToLearner::build_(), PLearn::TestImputations::build_ball_tree(), PLearn::SubsamplingDBN::build_classification_cost(), PLearn::DiscriminativeRBM::build_classification_cost(), PLearn::DeepBeliefNet::build_classification_cost(), PLearn::StackedAutoassociatorsNet::build_costs(), PLearn::SubsamplingDBN::build_final_cost(), PLearn::DeepBeliefNet::build_final_cost(), PLearn::SupervisedDBN::build_layers(), PLearn::PartSupervisedDBN::build_layers(), PLearn::HintonDeepBeliefNet::build_layers(), PLearn::GaussPartSupervisedDBN::build_layers(), PLearn::GaussianDBNRegression::build_layers(), PLearn::GaussianDBNClassification::build_layers(), PLearn::TopDownAsymetricDeepNetwork::build_layers_and_connections(), PLearn::SubsamplingDBN::build_layers_and_connections(), PLearn::StackedFocusedAutoassociatorsNet::build_layers_and_connections(), PLearn::StackedAutoassociatorsNet::build_layers_and_connections(), PLearn::PseudolikelihoodRBM::build_layers_and_connections(), PLearn::DiscriminativeRBM::build_layers_and_connections(), PLearn::DiscriminativeDeepBeliefNet::build_layers_and_connections(), PLearn::DeepNonLocalManifoldParzen::build_layers_and_connections(), PLearn::DeepBeliefNet::build_layers_and_connections(), PLearn::SupervisedDBN::build_params(), PLearn::PartSupervisedDBN::build_params(), PLearn::HintonDeepBeliefNet::build_params(), PLearn::GaussPartSupervisedDBN::build_params(), PLearn::GaussianDBNRegression::build_params(), PLearn::GaussianDBNClassification::build_params(), PLearn::SupervisedDBN::build_regressors(), PLearn::PartSupervisedDBN::build_regressors(), PLearn::GaussPartSupervisedDBN::build_regressors(), PLearn::SurfaceMesh::buildBoundaries(), PLearn::NnlmOnlineLearner::buildCandidates(), PLearn::SurfaceMesh::buildEdges(), PLearn::TextFilesVMatrix::buildIdx(), calcTransformation4(), PLearn::RemotePLearnServer::callFunction(), PLearn::PLearnServer::callFunction(), PLearn::RemotePLearnServer::callMethod(), canonical(), PLearn::PPath::canonical(), PLearn::RBMTrainer::CD1(), PLearn::GhostScript::centerShow(), PLearn::GraphicalBiText::check_consitency(), PLearn::TxtmatCommand::checkstuff(), checkWrappedObjects(), PLearn::PCA::classical_algo(), PLearn::PyPLearnScript::close(), closestPointOnTriangle(), PLearn::CompactVMatrix::CompactVMatrix(), compare(), PLearn::RemoveObservationTest::compareCovariance(), PLearn::RemoveObservationTest::compareStats(), PLearn::VMatLanguage::compileStream(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::GraphicalBiText::compute_nodemap(), PLearn::LearnerCommand::compute_outputs_on_2D_grid(), PLearn::MoleculeTemplateLearner::compute_S_mean_std(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), computeConditionalStats(), PLearn::ConjGradientOptimizer::computeCostAndDerivative(), PLearn::Learner::computeCosts(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::ConjGradientOptimizer::computeCostValue(), PLearn::ConjGradientOptimizer::computeDerivative(), PLearn::Kernel::computeGramMatrixDerivative(), PLearn::LiftStatsCollector::computeLift(), PLearn::NeighborhoodConditionalMean::computeNeighborhood(), PLearn::StabilisationLearner::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::RBMModule::computePartitionFunction(), PLearn::SDBWithStats::computeStats(), PLearn::AdaBoost::computeTrainingError(), PLearn::PLearnService::connectToServers(), PLearn::Test_PP::conversionOPchildA(), PLearn::Test_PP::conversionOPchildB(), PLearn::Test_PP::conversionOPparent(), PLearn::Test_PP::conversionOrdinaryPtr(), PLearn::SDBVMFieldICBCTargets::convertField(), convertible(), PLearn::Test_PP::copieConsChildPP(), PLearn::Test_PP::copieConsOrdinaryPtr(), PLearn::Test_PP::copieConsSameTypePP(), PLearn::GhostScript::copypage(), PLearn::CountEventsSemaphore::CountEventsSemaphore(), PLearn::TestImputations::createHeaderFile(), PLearn::VVMatrix::createPreproVMat(), cross_valid(), PLearn::RemotePLearnServer::deleteAllObjectsAsync(), PLearn::RemotePLearnServer::deleteObjectAsync(), deprecationmsg(), diagonalizeSubspace(), PLearn::Function::differentiate(), PLearn::PLearnService::disconnectFromServer(), displayBasicStats(), PLearn::GhostScript::displayBlack(), PLearn::GhostScript::displayGray(), PLearn::ShellProgressBar::done(), PLearn::GhostScript::drawBox(), PLearn::GhostScript::drawCircle(), PLearn::GhostScript::drawLine(), DX_create_dataset_outputs_file(), DX_create_grid_outputs_file(), eigen_SymmMat(), EM(), PLearn::RandomVariable::EM(), PLearn::MixtureRandomVariable::EMBprop(), PLearn::Test_PP::emptyCons(), PLearn::RandomVariable::epoch(), PLearn::GhostScript::erasepage(), PLearn::GaussianKernel::evaluate_i_j(), exitmsg(), PLearn::Experimentation::experimentSetUp(), PLearn::NeighborhoodConditionalMean::experimentWithVariousKs(), PLearn::Gnuplot::export_ps(), PLearn::RowMapSparseMatrix< real >::exportToMatlabReadableFormat(), PLearn::WordNetOntology::extractAncestors(), PLearn::WordNetOntology::extractDescendants(), extractFiles(), PLearn::WordNetOntology::extractTaggedWordFrequencies(), X::f(), PLearn::X::f(), PLearn::GaussianProcessNLLVariable::fbpropFragments(), PLearn::Gnuplot::featureplot(), PLearn::GhostScript::fillBox(), PLearn::GhostScript::fillCircle(), PLearn::LiftStatsCollector::finalize(), PLearn::BasisSelectionRegressor::findBestCandidateFunction(), PLearn::ConjGradientOptimizer::findDirection(), PLearn::SimpleDB< KeyType, QueryResult >::findEqualLinear(), findSmallestEigenPairOfSymmMat(), PLearn::TreeDBNModule::forget(), PLearn::SupervisedDBN::forget(), PLearn::RBMModule::forget(), PLearn::PartSupervisedDBN::forget(), PLearn::NxProfileLearner::forget(), PLearn::NnlmOutputLayer::forget(), PLearn::KLp0p1RBMModule::forget(), PLearn::KernelProjection::forget(), PLearn::HintonDeepBeliefNet::forget(), PLearn::GaussPartSupervisedDBN::forget(), PLearn::GaussianDBNRegression::forget(), PLearn::GaussianDBNClassification::forget(), PLearn::DiverseComponentAnalysis::forget(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NetworkModule::fprop(), PLearn::LogVariable::fprop(), PLearn::KLp0p1RBMModule::fprop(), PLearn::PLearnService::freeServer(), PLearn::NatGradSMPNNet::freeSharedMemory(), PLearn::ProbabilitySparseMatrix::fullPrint(), PLearn::X::g(), PLearn::PythonObjectWrapper::gc_collect1(), GDFindSmallEigenPairs(), PLearn::EarlyStoppingOracle::generateNextTrial(), PLearn::VVMatrix::generateVMatIndex(), PLearn::GaussianContinuum::get_image_matrix(), getDataSet(), PLearn::SelectColumnsVMatrix::getIndicesFromFields(), PLearn::TrainTestSplitter::getRandomSubsets(), PLearn::GhostScript::GhostScript(), global_options(), PLearn::Gnuplot::Gnuplot(), goAndCreateDir(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), halfShuffleRows(), PLearn::HelpCommand::helpAboutPLearnScript(), PLearn::HelpCommand::helpAboutPyPLearnScript(), PLearn::HTMLHelpCommand::helpClasses(), PLearn::HTMLHelpCommand::helpCommands(), PLearn::HelpCommand::helpCommands(), PLearn::HelpCommand::helpDatasets(), PLearn::HTMLHelpCommand::helpIndex(), PLearn::HTMLHelpCommand::helpOnClass(), PLearn::HTMLHelpCommand::helpOnCommand(), PLearn::HelpCommand::helpOverview(), PLearn::HelpCommand::helpScripts(), PLearn::Gnuplot::histoplot(), PLearn::Test_PP::illegalCopieCons(), indexable(), PLearn::SimpleDB< KeyType, QueryResult >::indexColumn(), PLearn::GraphicalBiText::init(), PLearn::TestImputations::initialize(), PLearn::DeepReconstructorNet::initializeParams(), InjectionTest_basic_function(), interactiveDisplayCDF(), InversePowerIteration(), iterate(), PLearn::ICP::iterate(), PLearn::ProbSparseMatrix::iterativeProportionalFittingStep(), PLearn::ICP::iterativeReweight(), PLearn::LineOutputProgressBarPlugin::killProgressBar(), PLearn::RemoteProgressBarPlugin::killProgressBar(), PLearn::RemotePLearnServer::killServer(), PLearn::GaussMix::kmeans(), PLearn::MatlabInterface::launch(), PLearn::IPopen::launch(), PLearn::MatlabInterface::launchAndWaitFor(), PLearn::ConjGradientOptimizer::lineSearch(), PLearn::RemotePLearnServer::link(), PLearn::RGBImage::loadJPEG(), PLearn::SimpleDB< KeyType, QueryResult >::loadSchema(), loadToVMat(), PLearn::VMatrix::lockMetaDataDir(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::GaussianProcessNLLVariable::logVarray(), PLearn::RegressionTreeNode::lookForBestSplit(), main(), PLearn::Preprocessing::manageTrainTestUnknownSets(), matInvert(), matlabSave(), PLearn::VarMeasurer::measure(), PLearn::Learner::measure(), PLearn::X::method1(), PLearn::X::method2(), PLearn::DoublyLinkedList< KeyType >::moveToFront(), PLearn::Gnuplot::multiplot(), PLearn::PvGradNNet::neuronDiscountGrad(), PLearn::RemotePLearnServer::newObject(), PLearn::RemotePLearnServer::newObjectAsync(), PLearn::StatsCollector::newwrite(), PLearn::RealMapping::newwrite(), PLearn::RBMTrainer::NLL(), notConvertible(), notIndexable(), PLearn::BasicIdentityCallsTest::nullary(), old_plearn_main(), openSocket(), PLearn::Learner::openTestResultsStreams(), PLearn::Learner::openTrainObjectiveStream(), openUrl(), PLearn::NatGradEstimator::operator()(), operator<<(), operator>>(), PLearn::HyperSetOption::optimize(), PLearn::HyperOptimize::optimize(), PLearn::GradientOptimizer::optimizeN(), PLearn::ConjGradientOptimizer::optimizeN(), PLearn::AutoScaledGradientOptimizer::optimizeN(), PLearn::AdaptGradientOptimizer::optimizeN(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), PLearn::Learner::outputResultLineToFile(), PLearn::HTMLHelpCommand::parent_classes(), PLearn::TupleTest::perform(), PLearn::TMatTest::perform(), PLearn::RowBufferedVMatrixTest::perform(), PLearn::PStreamBufTest::perform(), PLearn::PPTest::perform(), PLearn::PLStringutilsTest::perform(), PLearn::PLLogTest::perform(), PLearn::PentaTest::perform(), PLearn::ObjectGraphIteratorTest::perform(), PLearn::MaxSubsamplingTest::perform(), PLearn::InterfunctionXchgTest::perform(), PLearn::InstanceSnippetTest::perform(), PLearn::IndexedVMatrixTest::perform(), PLearn::HeapTest::perform(), PLearn::FileVMatrixTest::perform(), PLearn::ConjRosenbrock::perform(), PLearn::BasicIdentityCallsTest::perform(), PLearn::AutoVMatrixTest::perform(), performLP(), plearn_main(), plearn_terminate_handler(), PLearn::Gnuplot::plot(), PLearn::Gnuplot::plot3d(), PLearn::Grapher::plot_1D_regression(), PLearn::Grapher::plot_2D_classification(), PLearn::Gnuplot::plotcdf(), PLearn::Gnuplot::plotClasses(), PLearn::Gnuplot::plotdensity(), plotVMats(), PowerIteration(), PLearn::DeepReconstructorNet::prepareForFineTuning(), PLearn::Object::prepareToSendResults(), prettyprint_test_results(), PLearn::WordNetOntology::print(), PLearn::RealMapping::print(), print(), PLearn::Parent::print(), PLearn::GraphicalBiText::print(), PLearn::Array< char * >::print(), print_diff(), PLearn::GraphicalBiText::print_sensemap(), PLearn::CorrelationProfiler::printAndReset(), PLearn::PLearnDiff::printDiffs(), printDistanceStatistics(), PLearn::VMatrix::printFieldInfo(), printFieldNames(), PLearn::VMatrix::printFields(), PLearn::PLearnServer::printHelp(), PLearn::UnfoldedSumOfVariable::printInfo(), PLearn::UnfoldedFuncVariable::printInfo(), PLearn::UnaryVariable::printInfo(), PLearn::SumOverBagsVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::SourceVariable::printInfo(), PLearn::ObjectOptionVariable::printInfo(), PLearn::NaryVariable::printInfo(), PLearn::MatrixSumOfVariable::printInfo(), PLearn::CCCostVariable::printInfo(), PLearn::BinaryVariable::printInfo(), PLearn::TVec< PP< RegressionTreeNode > >::println(), printmat(), PLearn::BasisSelectionRegressor::printModelFunction(), PLearn::Y::printName(), PLearn::X::printName(), PLearn::VarArray::printNames(), PLearn::GraphicalBiText::printNode(), PLearn::WordNetOntology::printNodes(), PLearn::RegressionTreeRegisters::printRegisters(), PLearn::WordNetOntology::printStats(), PLearn::RegressionTreeMulticlassLeaveProb::printStats(), PLearn::RegressionTreeMulticlassLeaveFast::printStats(), PLearn::RegressionTreeMulticlassLeave::printStats(), PLearn::RegressionTreeLeave::printStats(), PLearn::WordNetOntology::printSynset(), PLearn::WordNetOntology::printSynsetAncestors(), PLearn::RemoteProgressBarPlugin::printTitle(), printvec(), PLearn::WordNetOntology::printWordAncestors(), PLearn::WordNetOntology::printWordOntology(), printWrappedObjects(), PLearn::PrecomputedProcessedLearner::processDataSet(), PLearn::DoublyLinkedList< KeyType >::pushOnTop(), PLearn::PythonEmbedder::PythonEmbedder(), pythonGlobalFuncTramp(), PLearn::BasicIdentityCallsTest::quaternary(), ramassePoubelles(), randomShuffleRows(), readAndMacroProcess(), PLearn::PStream::readBinaryNumAs(), PLearn::SurfaceMesh::readVRMLIndexedFaceSet(), PLearn::SurfaceMesh::readVRMLIndexedLineSet(), PLearn::RBMTrainer::recError(), PLearn::TestSnippet::recTest(), PLearn::TestSnippet::recTest2(), PLearn::TestSnippet::recTestCrash(), reduceInputSize(), PLearn::WordNetOntology::reduceWordPolysemy_preserveSenseOverlapping(), PLearn::NnlmOnlineLearner::reevaluateGaussianParameters(), PLearn::VMatrixExtensionRegistrar::registerExtension(), PLearn::StatsCollector::remove_observation(), removeFromWrappedObjectsSet(), PLearn::DoublyLinkedList< KeyType >::removeLast(), PLearn::Profiler::report(), PLearn::Profiler::reportwall(), PLearn::NnlmOutputLayer::resetAllClassVars(), PLearn::NnlmOutputLayer::resetParameters(), PLearn::Storage< PP< RegressionTreeNode > >::resize(), PLearn::Hash< KeyType, DataType >::resize(), PLearn::Storage< PP< RegressionTreeNode > >::resizeMat(), PLearn::ResourceSemaphore::ResourceSemaphore(), PLearn::Experimentation::reviewGlobalStats(), PLearn::AnalyzeFieldStats::reviewGlobalStats(), PLearn::VMatViewCommand::run(), PLearn::VMatCommand::run(), PLearn::VerifyGradientCommand::run(), PLearn::TxtmatCommand::run(), PLearn::Train::run(), PLearn::TestDependencyCommand::run(), PLearn::TestDependenciesCommand::run(), PLearn::TestClientCommand::run(), PLearn::StatsCommand::run(), PLearn::Stan::run(), PLearn::ServerCommand::run(), PLearn::SequentialValidation::run(), PLearn::ReadAndWriteCommand::run(), PLearn::RBMTrainer::run(), PLearn::Plide::run(), PLearn::PLearnServer::run(), PLearn::PairwiseDiffsCommand::run(), PLearn::OutputFeaturesCommand::run(), PLearn::NearestNeighborPredictionCost::run(), PLearn::KolmogorovSmirnovCommand::run(), PLearn::JulianDateCommand::run(), PLearn::ICP::run(), PLearn::HTMLHelpCommand::run(), PLearn::Grapher::run(), PLearn::GhostScript::run(), PLearn::GenerateDecisionPlot::run(), PLearn::FillFeatureSetCommand::run(), PLearn::FieldConvertCommand::run(), PLearn::ExtractOptionCommand::run(), PLearn::DiffCommand::run(), PLearn::ConfigParsing::run(), PLearn::ChemicalICP::run(), PLearn::AutoRunCommand::run(), PLearn::WordNetOntology::save(), save_load_compare(), PLearn::VMatrix::saveAMAT(), saveAscii(), PLearn::VMatrix::saveCMAT(), PLearn::VMatrix::saveFieldInfos(), PLearn::ChemicalICP::saveMatch(), PLearn::VMatrix::savePMAT(), PLearn::RGBImage::savePPM(), PLearn::WordNetOntology::savePredominentSyntacticClasses(), PLearn::SimpleDB< KeyType, QueryResult >::saveSchema(), PLearn::VMatrix::saveStats(), PLearn::SDBWithStats::saveStats(), PLearn::VMatrix::saveStringMappings(), PLearn::WordNetOntology::saveVocInWordnet(), PLearn::GraphicalBiText::sensetag_valid_bitext(), PLearn::GraphicalBiText::senseTagBitext(), set_global_calendars(), PLearn::GraphicalBiText::set_nodemap(), PLearn::TextFilesVMatrix::setColumnNamesAndWidth(), PLearn::Gnuplot::seteps(), PLearn::ParentableObject::setParent(), PLearn::VMatrix::setSFIFFilename(), PLearn::Gnuplot::setxrange(), PLearn::Gnuplot::setyrange(), PLearn::GhostScript::show(), PLearn::GhostScript::showpage(), PLearn::ScaledConditionalCDFSmoother::smooth(), PLearn::ProbVector::smoothNormalize(), PLearn::RegressionTreeRegisters::sortRows(), split(), PLearn::Learner::stop_if_wanted(), PLearn::StructuralLearner::StructuralLearner(), SymmMatNullSpaceByInversePowerIteration(), PLearn::BasicIdentityCallsTest::ternary(), PLearn::StructuralLearner::test(), PLearn::SequentialModelSelector::test(), test(), PLearn::NnlmOnlineLearner::test(), PLearn::MultiClassAdaBoost::test(), PLearn::MovingAverage::test(), PLearn::AdaBoost::test(), PLearn::Test_PP::Test_PP(), PLearn::GraphicalBiText::test_WSD(), testCholeskyRoutines(), PLearn::WPLS::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::TestImputations::train(), PLearn::TangentLearner::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StructuralLearner::train(), PLearn::StackedSVDNet::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::SequentialModelSelector::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PLS::train(), PLearn::PartSupervisedDBN::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NnlmOnlineLearner::train(), PLearn::NNet::train(), PLearn::NGramDistribution::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NatGradSMPNNet::train(), PLearn::MultiInstanceNNet::train(), PLearn::MultiClassAdaBoost::train(), PLearn::MovingAverage::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::ManifoldParzen::train(), PLearn::LLC::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::IncrementalNNet::train(), PLearn::HyperLearner::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussMix::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::FeatureSetNNet::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::EntropyContrast::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::DistRepNNet::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DeepReconstructorNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::DeepBeliefNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::BinaryStump::train(), PLearn::BasisSelectionRegressor::train(), PLearn::BaggingLearner::train(), PLearn::AddCostToLearner::train(), PLearn::AdaBoost::train(), train_and_test(), PLearn::DeepReconstructorNet::trainHiddenLayer(), PLearn::GaussianProcessRegressor::trainProjectedProcess(), PLearn::DeepReconstructorNet::trainSupervisedLayer(), PLearn::DenoisingRecurrentNet::trainUnconditionalPredictor(), PLearn::RowMapSparseMatrix< real >::transposeProduct(), PLearn::Test_PP::tryDeepCopy(), PLearn::BasicIdentityCallsTest::unary(), PLearn::DenoisingRecurrentNet::unconditionalFprop(), UNIT_TEST(), unitTest(), PLearn::LineOutputProgressBarPlugin::update(), PLearn::RemoteProgressBarPlugin::update(), PLearn::TextProgressBarPlugin::update(), PLearn::GraphicalBiText::update_WSD_model(), PLearn::RBMMatrixConnection::updateGibbs(), PLearn::DiscriminativeDeepBeliefNet::updateNearestNeighbors(), usage(), PLearn::PLearner::use(), use(), PLearn::GhostScript::usefont(), PLearn::VariableSelectionWithDirectedGradientDescent::verbose(), PLearn::RegressionTreeRegisters::verbose(), PLearn::RegressionTreeQueue::verbose(), PLearn::RegressionTreeNode::verbose(), PLearn::RegressionTreeLeave::verbose(), PLearn::RegressionTree::verbose(), PLearn::LocalMedBoost::verbose(), PLearn::BaseRegressorWrapper::verbose(), PLearn::BaseRegressorConfidence::verbose(), PLearn::NeuralProbabilisticLanguageModel::verify_gradient(), PLearn::FeatureSetSequentialCRF::verify_gradient(), PLearn::FeatureSetNNet::verify_gradient(), PLearn::Function::verifyGradient(), PLearn::Function::verifyHessian(), PLearn::Function::verifyrfprop(), PLearn::Function::verifySymbolicGradient(), verrormsg(), vmatmain(), vwarningmsg(), PLearn::Molecule::writeToVRMLFile(), PLearn::SurfaceMesh::writeVRMLBoundaries(), PLearn::SurfaceMesh::writeVRMLFile(), PLearn::SurfaceMesh::writeVRMLIndexedFaceSet(), PLearn::SurfaceMesh::writeVRMLIndexedLineSet(), PLearn::CountEventsSemaphore::~CountEventsSemaphore(), PLearn::GhostScript::~GhostScript(), PLearn::Gnuplot::~Gnuplot(), PLearn::PythonEmbedder::~PythonEmbedder(), PLearn::RemotePLearnServer::~RemotePLearnServer(), PLearn::ResourceSemaphore::~ResourceSemaphore(), and PLearn::SharedMemory< T >::~SharedMemory().

{
    out.endl();
    return out;
}

Here is the call graph for this function:

bool PLearn::endsWith ( const string &  str,
const char &  c 
)

Definition at line 85 of file PPath.cc.

References c.

Referenced by PLearn::PPath::canonical(), and PLearn::PPath::operator/=().

{
    if (str.empty())
        return false;
    return str[str.length()-1] == c;
}

Here is the caller graph for this function:

bool PLearn::endsWith ( const string &  str,
const string &  s 
)

Definition at line 99 of file PPath.cc.

{
    if ( s.length() > str.length() )
        return false;
    return str.substr(str.length()-s.length()) == s;
}
Var PLearn::entropy ( Var  v,
bool  normalize 
)

Definition at line 91 of file Var_utils.cc.

References abs(), pl_log, plogp(), and sum().

Referenced by PLearn::VarUtilsTest::perform(), and PLearn::NnlmOnlineLearner::test().

{
    if(normalize)
    {
        Var absx = abs(v);
        Var normalized = absx/sum(absx);
        return sum(plogp(normalized))*(-1.0/pl_log(2.0));
    }
    else
        return sum(plogp(v))*(-1.0/pl_log(2.0));
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char * PLearn::eNumericTypeNames ( int  a)

converts a code in corresponding string

Definition at line 55 of file TypesNumeriques.cc.

References NT_CARDINAL, NT_CODE, NT_CURRENCY, NT_NOT_NUMERIC, NT_ORDINAL, NT_PERCENT, NT_PREFIXED, NT_RANGE, NT_SUFFIXED, NT_TIME, and NT_UNKNOWN_NUMERIC_TYPE.

{
    static char retour[128];

    // all that applies
    if (a==NT_NOT_NUMERIC)
        return "not numeric";
    else {
        retour[0]=0;
        if (a & NT_ORDINAL)  strcat(retour,"ordinal ");
        if (a & NT_CARDINAL) strcat(retour,"cardinal ");
        if (a & NT_CURRENCY) strcat(retour,"currency ");
        if (a & NT_PREFIXED) strcat(retour,"prefixe ");
        if (a & NT_SUFFIXED) strcat(retour,"suffixe ");
        if (a & NT_PERCENT)  strcat(retour,"pourcentage ");
        if (a & NT_RANGE)    strcat(retour,"range ");
        if (a & NT_TIME)     strcat(retour,"temps ");
        if (a & NT_CODE)     strcat(retour,"code ");
        if (a & NT_UNKNOWN_NUMERIC_TYPE) strcat(retour," ??? ");
        return retour;
    }
}
template<class T >
void PLearn::equals ( const TVec< T > &  src,
v,
TVec< T > &  dest 
)

Definition at line 2292 of file TMat_maths_impl.h.

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

{
    int n=src.length();
#ifdef BOUNDCHECK
    if (n!=dest.length())
        PLERROR("equals(TVec<T>(%d),T,TVec<T>(%d)) args of unequal lengths",
                n,dest.length());
#endif
    if (n > 0) {
        T* s=src.data();
        T* d=dest.data();
        for (int i=0;i<n;i++)
            if (s[i]==v) d[i]=1.0; else d[i]=0.0;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::equals ( const TMat< T > &  src,
v,
TMat< T > &  dest 
)

Definition at line 6741 of file TMat_maths_impl.h.

References d, i, j, PLearn::TMat< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

{
    int l=src.length();
    int w=src.width();
#ifdef BOUNDCHECK
    if (l!=dest.length() || w!=dest.width())
        PLERROR("equals(TMat<T>(%d,%d),T,TMat<T>(%d,%d)) args of unequal dimensions",
                src.length(),src.width(),dest.length(),dest.width());
#endif
    for (int i=0;i<l;i++)
    {
        const T* s=src[i];
        T* d=dest[i];
        for (int j=0;j<w;j++)
            if (s[j]==v) d[j]=1.0; else d[j]=0.0;
    }
}

Here is the call graph for this function:

Var PLearn::erf ( Var  v) [inline]

Definition at line 71 of file ErfVariable.h.

Referenced by pl_erf().

{ return new ErfVariable(v); }

Here is the caller graph for this function:

void void PLearn::errormsg ( const char *  msg,
  ... 
)

Definition at line 78 of file plerror.cc.

References verrormsg().

{
    va_list args;
    va_start(args,msg);
    verrormsg(msg, args);
    va_end(args);
}

Here is the call graph for this function:

void PLearn::errormsg2 ( const char *  filename,
const int  linenumber,
const char *  msg,
  ... 
)

Definition at line 63 of file plerror.cc.

References ERROR_MSG_SIZE, PLASSERT, strlen(), and verrormsg().

                                                                              {
    va_list args;
    va_start(args,msg);
    char message[ERROR_MSG_SIZE];
    
    snprintf(message, ERROR_MSG_SIZE, "In file: \"%s\" at line %d\n",
            PPath(filename).basename().c_str(), linenumber);
    PLASSERT(ERROR_MSG_SIZE>=strlen(message)+strlen(msg));
    strncat(message,msg,ERROR_MSG_SIZE);
    verrormsg(message, args);

    va_end(args);

}

Here is the call graph for this function:

int PLearn::establish_connection ( int  n_hosts,
const char *  hostnames[],
int  port_no 
)

Definition at line 99 of file IPopen.cc.

References i, if(), and PLERROR.

Referenced by establish_connection().

{
    struct sockaddr_in address;
    struct hostent *hostinfo;

    // Setup socket
    int server_socket = socket(AF_INET, SOCK_STREAM, 0);
    if (server_socket <= 0)
        PLERROR("Cannot create socket");

    address.sin_family = AF_INET;
    address.sin_port = htons(port_no);

    for (int i = 0; i < n_hosts; ++i) {
        hostinfo = gethostbyname(hostnames[i]);
        if (!hostinfo)
            inet_pton(AF_INET, hostnames[i], &address.sin_addr);
        //address.sin_addr.s_addr = inet_addr(hostnames[i]);
        else
            address.sin_addr = *(struct in_addr *)*hostinfo->h_addr_list;

        // Connect to server
        if (connect(server_socket, (struct sockaddr *)&address, sizeof(address)))
            // Try next one
            continue;
            
        // Not sure this makes a difference here...
        int nodelay = 1;
        setsockopt(server_socket, IPPROTO_TCP, TCP_NODELAY, (char *)nodelay, sizeof(int));

        // Return socket descriptor
        return server_socket;
    }
    PLERROR("Connection to server failed");
    return -1; // Never reached
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::establish_connection ( const char *  hostname,
int  port_no 
) [inline]

Definition at line 143 of file IPopen.h.

References establish_connection().

{ return establish_connection(1, &hostname, port_no); }

Here is the call graph for this function:

int PLearn::establish_connection ( const int  argc,
const char *  argv[] 
) [inline]

Definition at line 145 of file IPopen.h.

References establish_connection(), and PLERROR.

{
    if (argc >= 3) return establish_connection(1, &argv[1], atoi(argv[2]));
    PLERROR("Wrong number of arguments");
    return -1; // Dummy return value
}

Here is the call graph for this function:

template<class T >
T PLearn::estimatedCumProb ( x,
TVec< T >  bins 
)

Definition at line 2426 of file TMat_maths_impl.h.

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

{
    const int nbins = bins.length()-1;
    if (nbins<1) PLERROR("estimatedCumProb:: there should be at least two elements in the bins vector");
    // +0.5 because we allocate mass 0.25 at the left and 0.25 at the right of the interval (bins(0),bins(nbins))
    const T one_over_nbins = 1.0/(T)(nbins+0.5);

    int k = binary_search(bins, x);

    if (k == -1)
        return 0.25*one_over_nbins;
    else if (k == nbins-1)
        return 1.0 - 0.25*one_over_nbins;
    else if (bins[k] != bins[k+1])
        return one_over_nbins*(0.25 + k + (x-bins[k])/(bins[k+1]-bins[k]));
    else
        return one_over_nbins*(0.75 + k);
}

Here is the call graph for this function:

void PLearn::evaluate_functions ( const TVec< RealFunc > &  functions,
const Vec &  input,
Vec &  featurevec 
)

Computes featurevec which results from evaluating each function at the given input.

Definition at line 95 of file RealFunction.cc.

References n, PLearn::TVec< T >::resize(), and PLearn::TVec< T >::size().

Referenced by PLearn::BasisSelectionRegressor::computeOutput(), PLearn::BasisSelectionRegressor::computeWeightedAveragesWithResidue(), PLearn::RealFunctionsProcessedVMatrix::getNewRow(), PLearn::BasisSelectionRegressor::thread_wawr::operator()(), and PLearn::BasisSelectionRegressor::recomputeFeatures().

{
    int n = functions.size();
    featurevec.resize(n);
    for(int k=0; k<n; k++)
        featurevec[k] = functions[k]->evaluate(input);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::evaluateKernel ( Ker  ker,
VMat  vm,
int  v1_startcol,
int  v1_ncols,
const Vec &  v2,
const Vec &  result,
int  startrow = 0,
int  nrows = -1 
)

The following methods can be used in a straightforward manner to compute a variety of useful things: Dot products between this vmat and a vector, find the K nearest neighbours to a vector, etc... Most methods take an optional last parameter ignore_this_row which may contain the index of a row that is to be excluded from the computation (this can be seful for leave-one-out evaluations for instance).

This will compute for this vmat m a result vector (whose length must be tha same as m's) s.t. result[i] = ker( m(i).subVec(v1_startcol,v1_ncols) , v2) i.e. the kernel value betweeen each (sub)row of m and v2

Definition at line 57 of file Ker_VMat_utils.cc.

References PLearn::VMat::getSubRow(), i, PLearn::TVec< T >::length(), PLearn::VMat::length(), and PLERROR.

{
    int l = vm->length();
    int endrow = (nrows>0) ?startrow+nrows :l;
    if(result.length() != endrow-startrow)
        PLERROR("In evaluateKernel length of result vector does not match the row range");

    Vec v1(v1_ncols);
    for(int i=startrow; i<endrow; i++)
    {
        vm->getSubRow(i,v1_startcol,v1);
        result[i] = ker(v1,v2);
    }
}

Here is the call graph for this function:

TVec< pair<real,int> > PLearn::evaluateKernelBottomN ( int  N,
Ker  ker,
VMat  vm,
int  v1_startcol,
int  v1_ncols,
const Vec &  v2,
int  startrow = 0,
int  nrows = -1,
int  ignore_this_row = -1 
)

same as evaluateKernelTopN but will look for the N smallest values instead of top values.

results are sorted with smallest kernel value first

Definition at line 131 of file Ker_VMat_utils.cc.

References PLearn::BottomNI< T >::getBottomN(), PLearn::VMat::getSubRow(), i, PLearn::VMat::length(), PLearn::BottomNI< T >::sort(), and PLearn::BottomNI< T >::update().

{
    int l = vm->length();
    int endrow = (nrows>0) ?startrow+nrows :l;
    BottomNI<real> extrema(N);
    Vec v1(v1_ncols);
    for(int i=startrow; i<endrow; i++)
        if(i!=ignore_this_row)
        {
            vm->getSubRow(i,v1_startcol,v1);
            real kerval = ker(v1,v2);
            extrema.update(kerval,i);
        }
    extrema.sort();
    return extrema.getBottomN();
}

Here is the call graph for this function:

real PLearn::evaluateKernelSum ( Ker  ker,
VMat  vm,
int  v1_startcol,
int  v1_ncols,
const Vec &  v2,
int  startrow,
int  nrows,
int  ignore_this_row 
)

returns sum_i [ ker( m(i).subVec(v1_startcol,v1_ncols) , v2) ]

Definition at line 74 of file Ker_VMat_utils.cc.

References PLearn::VMat::getSubRow(), i, and PLearn::VMat::length().

{
    int l = vm->length();
    int endrow = (nrows>0) ?startrow+nrows :l;
    double result = 0.;
    Vec v1(v1_ncols);
    for(int i=startrow; i<endrow; i++)
        if(i!=ignore_this_row)
        {
            vm->getSubRow(i,v1_startcol,v1);
            result += ker(v1,v2);
        }
    return (real)result;
}

Here is the call graph for this function:

TVec< pair<real,int> > PLearn::evaluateKernelTopN ( int  N,
Ker  ker,
VMat  vm,
int  v1_startcol,
int  v1_ncols,
const Vec &  v2,
int  startrow = 0,
int  nrows = -1,
int  ignore_this_row = -1 
)

This will return the Top N kernel evaluated values (between vmat (sub)rows and v2) and their associated row_index. Result is returned as a vector of length N of pairs (kernel_value,row_index) Results are sorted with largest kernel value first

Definition at line 113 of file Ker_VMat_utils.cc.

References PLearn::VMat::getSubRow(), PLearn::TopNI< T >::getTopN(), i, PLearn::VMat::length(), PLearn::TopNI< T >::sort(), and PLearn::TopNI< T >::update().

{
    int l = vm->length();
    int endrow = (nrows>0) ?startrow+nrows :l;
    TopNI<real> extrema(N);
    Vec v1(v1_ncols);
    for(int i=startrow; i<endrow; i++)
        if(i!=ignore_this_row)
        {
            vm->getSubRow(i,v1_startcol,v1);
            real kerval = ker(v1,v2);
            extrema.update(kerval,i);
        }
    extrema.sort();
    return extrema.getTopN();
}

Here is the call graph for this function:

real PLearn::evaluateKernelWeightedTargetSum ( Ker  ker,
VMat  vm,
int  v1_startcol,
int  v1_ncols,
const Vec &  v2,
int  t_startcol,
int  t_ncols,
Vec &  targetsum,
int  startrow,
int  nrows,
int  ignore_this_row 
)

targetsum := sum_i [ m(i).subVec(t_startcol,t_ncols) * ker( m(i).subVec(v1_startcol,v1_ncols) , v2) ] and returns sum_i [ ker( m(i).subVec(v1_startcol,v1_ncols) , v2) ]

Definition at line 92 of file Ker_VMat_utils.cc.

References PLearn::TVec< T >::clear(), PLearn::VMat::getSubRow(), i, PLearn::VMat::length(), and multiplyAcc().

{
    int l = vm->length();
    int endrow = (nrows>0) ?startrow+nrows :l;
    targetsum.clear();
    double result = 0.;
    Vec v1(v1_ncols);
    Vec target(t_ncols);
    for(int i=startrow; i<endrow; i++)
        if(i!=ignore_this_row)
        {
            vm->getSubRow(i,v1_startcol,v1);
            vm->getSubRow(i,t_startcol,target);
            real kerval = ker(v1,v2);
            result += kerval;
            multiplyAcc(targetsum, target, kerval);
        }
    return (real)result;
}

Here is the call graph for this function:

void PLearn::evaluateSumOfFbprop ( VMat  vm,
Func  f,
Vec &  output_result,
Vec &  output_gradient,
int  nsamples 
)

Definition at line 76 of file VMat_Func_utils.cc.

References PLearn::TVec< T >::clear(), i, PLearn::TVec< T >::length(), PLearn::VMat::length(), w, and PLearn::VMat::width().

{
//  if(f->outputs.size()!=1)
    //   PLERROR("In evaluateSumOfFprop: function must have a single variable output (maybe you can concat the vars into a single one, if this is really what you want)");

    static int curpos = 0;
    int l = vm->length();
    int w = vm->width();
    if (nsamples == -1) nsamples = l;
    Vec input_value(w);
    Vec input_gradient(w);
    Vec output_value(output_result.length());

    f->recomputeParents();
    output_result.clear();

    for(int i=0; i<nsamples; i++)
    {
        vm->getRow(curpos++, input_value);
        f->fbprop(input_value, output_value, input_gradient, output_gradient);
        //displayFunction(f, true);
        output_result += output_value;
        if(curpos == l) curpos = 0;
    }
}

Here is the call graph for this function:

void PLearn::evaluateSumOfFprop ( VMat  vm,
Func  f,
Vec &  output_result,
int  nsamples 
)

compute fprop or fbprop of a sumOf operation

Definition at line 52 of file VMat_Func_utils.cc.

References PLearn::TVec< T >::clear(), i, PLearn::TVec< T >::length(), PLearn::VMat::length(), w, and PLearn::VMat::width().

{
    //if (f->outputs.size()!=1)
    //  PLERROR("In evaluateSumOfFprop: function must have a single variable output (maybe you can concat the vars into a single one, if this is really what you want)");

    static int curpos = 0;
    int l = vm->length();
    int w = vm->width();
    if (nsamples == -1) nsamples = l;
    Vec input_value(w);
    Vec output_value(output_result.length());

    f->recomputeParents();
    output_result.clear();

    for(int i=0; i<nsamples; i++)
    {
        vm->getRow(curpos++, input_value);
        f->fprop(input_value, output_value);
        output_result += output_value;
        if(curpos == l) curpos = 0;
    }
}

Here is the call graph for this function:

vector< string > PLearn::execute ( const string &  command,
bool  redirect_stderr = false 
)

Returns the full output of the command as a vector of strings, containing the lines of the answer (with any newline character removed). The command must not be waiting for input on its standard input or this call will never return.

Definition at line 199 of file Popen.cc.

References PLearn::PStream::getline(), PLearn::PStream::good(), and PLearn::Popen::in.

Referenced by PLearn::ShellProgressBar::getWcAsciiFileLineCount(), and PLearn::HelpCommand::helpAboutPyPLearnScript().

{
    Popen p(command, redirect_stderr);
    vector<string> result;
    while(p.in.good())
    {
        string line = p.in.getline();
        result.push_back(line);
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void void void void PLearn::exitmsg ( const char *  msg,
  ... 
)

Definition at line 180 of file plerror.cc.

References endl(), ERROR_MSG_SIZE, and error_stream.

Referenced by _tostring_static_pstream_(), cross_valid(), getMultipleModelAliases(), old_plearn_main(), train_and_test(), and use().

{
    va_list args;
    va_start(args,msg);
    char message[ERROR_MSG_SIZE];

#if !defined(ULTRIX) && !defined(_MINGW_) && !defined(WIN32)
    vsnprintf(message,ERROR_MSG_SIZE,msg,args);
#else
    vsprintf(message,msg,args);
#endif

    va_end(args);

    *error_stream << message << endl;
    exit(1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::exp ( const TVec< T > &  vec)

Definition at line 2227 of file TMat_maths_impl.h.

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

{
    TVec<T> res( vec.length() );
    exp( vec, res );
    return res;
}

Here is the call graph for this function:

RandomVar PLearn::exp ( RandomVar  x)

exponential function applied element-by-element

Definition at line 448 of file RandomVar.cc.

{ return new ExpRandomVariable(x); }
Var PLearn::exp ( Var  v) [inline]

Definition at line 73 of file ExpVariable.h.

{ return new ExpVariable(v); }
template<class T >
void PLearn::exp ( const TVec< T > &  x,
TVec< T > &  y 
)

computes y <- exp(x)

Definition at line 221 of file TMat_maths_impl.h.

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

Referenced by PLearn::DistRepNNet::add_transfer_func(), PLearn::NNet::applyTransferFunc(), autoThreshLP(), beta_density(), bnldev(), PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::NllGeneralGaussianVariable::bprop(), PLearn::NegLogPoissonVariable::bprop(), PLearn::ErfVariable::bprop(), PLearn::KLp0p1RBMModule::bpropAccUpdate(), PLearn::RBMTruncExpLayer::bpropUpdate(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::RBMModule::computeAllHiddenProbabilities(), PLearn::VariableSelectionWithDirectedGradientDescent::computeCostsFromOutputs(), PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::RBMTruncExpLayer::computeExpectation(), PLearn::RBMTruncExpLayer::computeExpectations(), PLearn::LocalMedBoost::computeFunctionWeightFormula(), PLearn::SquaredExponentialARDKernel::computeGramMatrix(), PLearn::PLearnerDiagonalKernel::computeGramMatrix(), PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::TransformOutputLearner::computeOutput(), PLearn::RankingFromKernel::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::GaussMixLocalProjections::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::ClassifierFromDensity::computeOutput(), PLearn::BaseRegressorConfidence::computeOutput(), PLearn::TransformOutputLearner::computeOutputAndCosts(), PLearn::AdaBoost::computeOutputAndCosts(), PLearn::RBMModule::computePartitionFunction(), PLearn::GaussMix::computePosteriors(), PLearn::ICP::computeWeights(), PLearn::PDistribution::density(), PLearn::Distribution::density(), PLearn::ConditionalGaussianDistribution::density(), PLearn::LayerCostModule::deriv_func_(), determine_density_integral_from_log_densities_on_grid(), DirichletEstimatorMMoments(), DX_create_grid_outputs_file(), PLearn::MixtureRandomVariable::ElogP(), PLearn::MixtureRandomVariable::EMBprop(), PLearn::DiagonalNormalRandomVariable::EMBprop(), PLearn::LogRandomVariable::EMBprop(), PLearn::SquaredExponentialARDKernel::evaluate(), PLearn::SigmoidPrimitiveKernel::evaluate(), PLearn::ScaledLaplacianKernel::evaluate(), PLearn::ScaledGeneralizedDistanceRBFKernel::evaluate(), PLearn::ScaledGaussianKernel::evaluate(), PLearn::PLearnerDiagonalKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), PLearn::ManifoldParzen2::evaluate(), PLearn::LaplacianKernel::evaluate(), PLearn::GeneralizedDistanceRBFKernel::evaluate(), PLearn::GaussianDensityKernel::evaluate(), PLearn::CorrelationKernel::evaluate(), PLearn::ConvexBasisKernel::evaluate(), PLearn::CompactVMatrixGaussianKernel::evaluate(), PLearn::BetaKernel::evaluate(), PLearn::ManifoldParzen2::evaluate_i_j(), PLearn::GaussianKernel::evaluateFromSquaredNormOfDifference(), exp(), PLearn::NatGradSMPNNet::fbpropLoss(), PLearn::NatGradNNet::fbpropLoss(), PLearn::mNNet::fbpropLoss(), PLearn::ExpMeanStatsIterator::finish(), PLearn::RBMTruncExpLayer::fprop(), PLearn::NLLNeighborhoodWeightsVariable::fprop(), PLearn::NegLogPoissonVariable::fprop(), PLearn::KLp0p1RBMModule::fprop(), PLearn::ConfRatedAdaboostCostVariable::fprop(), PLearn::LayerCostModule::func_(), gamdev(), gauss_01_density(), gauss_density_var(), PLearn::RBMTruncExpLayer::generateSample(), geometric_mean(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::NNet::hiddenLayer(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), PLearn::NeuralProbabilisticLanguageModel::importance_sampling_gradient_update(), incomplete_beta(), PLearn::ConditionalDensityNet::initialize_mu(), PLearn::TreeDBNModule::initSampling(), inverse_softplus(), PLearn::LogRandomVariable::invertible(), KS_test(), logadd(), PLearn::DiagonalNormalRandomVariable::logP(), logsub(), nodekernel(), PLearn::DiverseComponentAnalysis::nonlinear_transform(), PLearn::RandomVariable::P(), PLearn::TMatTest::perform(), PLearn::PLMathTest::perform(), pl_gcf(), pl_gser(), poidev(), PLearn::TransformationLearner::PROBA_weight(), ridgeRegressionByGCV(), PLearn::VMatLanguage::run(), safeexp(), PLearn::GaussMix::setPredictor(), PLearn::DiagonalNormalRandomVariable::setValueFromParentsValue(), PLearn::ExpRandomVariable::setValueFromParentsValue(), softmax(), softplus(), softplus_primitive(), PLearn::KroneckerBaseKernel::softplusFloor(), PLearn::SoftmaxLossVariable::symbolicBprop(), PLearn::LogAddVariable::symbolicBprop(), PLearn::ErfVariable::symbolicBprop(), PLearn::TransformOutputLearner::test(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::AdaBoost::train(), and weightedRidgeRegressionByGCV().

{
    y.resize(x.length());
    int n = x.length();
    if (!n)
        return;
    T* xp = x.data();
    T* yp = y.data();
    while(n--)
        *yp++ = exp(*xp++);
}

Here is the call graph for this function:

StatsIt PLearn::exp_mean_stats ( ) [inline]

Definition at line 439 of file StatsIterator.h.

{ return new ExpMeanStatsIterator(); }
real PLearn::expdev ( )

returns an exponential distributed random number

Definition at line 290 of file random.cc.

References fast_exact_is_equal(), pl_log, and uniform_sample().

{
    real dum;

    do
        dum=uniform_sample();
    while (fast_exact_is_equal(dum, 0.0));
    return -pl_log(dum);
}

Here is the call graph for this function:

template<class T >
void PLearn::exponentialMovingAverageUpdate ( const TVec< T > &  vec,
const TVec< T > &  x,
alpha 
)

TVec[i] = (1-alpha)*TVec[i]+x[i]*alpha;.

Definition at line 2653 of file TMat_maths_impl.h.

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

Referenced by PLearn::FNetLayerVariable::bprop().

{
    int n=x.length();
    if (vec.length()!=n)
        PLERROR("TVec::exponentialMovingAverageUpdate length_=%d and x has length_=%d",
                vec.length(),n);
    T* p=vec.data();
    T* xp=x.data();
    T one_minus_alpha = 1-alpha;
    for (int i=0;i<n;i++)
        p[i] = one_minus_alpha*p[i] + alpha*xp[i];
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::exponentialMovingSquareUpdate ( const TVec< T > &  vec,
const TVec< T > &  x,
alpha 
)

TVec[i] = (1-alpha)*TVec[i]+x[i]^2*alpha;.

Definition at line 2689 of file TMat_maths_impl.h.

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

Referenced by PLearn::FNetLayerVariable::bprop().

{
    int n=x.length();
    if (vec.length()!=n)
        PLERROR("TVec::exponentialMovingAverageUpdate length_=%d and x has length_=%d",
                vec.length(),n);
    T* p=vec.data();
    T* xp=x.data();
    T one_minus_alpha = 1-alpha;
    for (int i=0;i<n;i++)
    {
        T xpi = xp[i];
        p[i] = one_minus_alpha*p[i] + alpha*xpi*xpi;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::exponentialMovingVarianceUpdate ( const TVec< T > &  vec,
const TVec< T > &  x,
const TVec< T > &  mu,
alpha 
)

TVec[i] = (1-alpha)*TVec[i]+(x[i]-mu[i])^2*alpha;.

Definition at line 2668 of file TMat_maths_impl.h.

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

{
    int n=x.length();
    if (vec.length()!=n || vec.length()!=mu.length())
        PLERROR("TVec::exponentialVarianceAverageUpdate length_=%d and"
                "x has length_=%d, mu has length() %d",
                vec.length(),n,mu.length());
    T* p=vec.data();
    T* xp=x.data();
    T* mp=mu.data();
    T one_minus_alpha = 1-alpha;
    for (int i=0;i<n;i++)
    {
        T dif = (xp[i]-mp[i]);
        p[i] = one_minus_alpha*p[i] + alpha*dif*dif;
    }
}

Here is the call graph for this function:

RandomVar PLearn::extend ( RandomVar  v,
real  extension_value,
int  n_extend 
)

Definition at line 453 of file RandomVar.cc.

Referenced by PLearn::ExtendedRandomVariable::setValueFromParentsValue(), PLearn::SubMatTransposeVariable::symbolicBprop(), and PLearn::SubMatVariable::symbolicBprop().

{ return new ExtendedRandomVariable(v,extension_value,n_extend); }

Here is the caller graph for this function:

Var PLearn::extend ( Var  v,
int  top_extent,
int  bottom_extent,
int  left_extent,
int  right_extent,
real  fill_value = 0.0 
) [inline]

general extension of a matrix in any direction

Definition at line 100 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
Var PLearn::extend ( Var  v,
real  extension_value = 1.0,
int  n_extend = 1 
) [inline]

simple extension of a vector (same semantic as old extend, when we only had vectors)

Definition at line 104 of file ExtendedVariable.h.

References PLERROR.

{ 
    if(v->isColumnVec())
        return new ExtendedVariable(v,0,n_extend,0,0,extension_value); 
    else if(v->isRowVec())
        return new ExtendedVariable(v,0,0,0,n_extend,extension_value); 
    PLERROR("In extend(Var v, real extension_value = 1.0, int n_extend = 1) v is not a vector (single row or single column)");
    return Var();
}
template<class T >
void PLearn::externalProduct ( const TMat< T > &  mat,
const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 3798 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::VecStatsCollector::getCorrelation(), PLearn::RBMMatrixConnection::petiteCulotteOlivierUpdate(), PLearn::WPLS::train(), and PLearn::PseudolikelihoodRBM::train().

{
#ifdef BOUNDCHECK
    if (v1.length()!=mat.length() || mat.width()!=v2.length())
        PLERROR("externalProduct(Vec,Vec), incompatible arguments %dx%d= %d times %d",
                mat.length(),mat.width(),v1.length(), v2.length());
#endif
    const T* v_1=v1.data();
    const T* v_2=v2.data();
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T* mi = mat[i];
        T v1i = v_1[i];
        for (int j=0;j<w;j++)
            mi[j] = v1i * v_2[j];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::externalProductAcc ( const TMat< T > &  mat,
const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 3819 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, PLearn::TMat< T >::isCompact(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by PLearn::RBMQLParameters::accumulateNegStats(), PLearn::RBMMatrixTransposeConnection::accumulateNegStats(), PLearn::RBMMatrixConnection::accumulateNegStats(), PLearn::RBMLQParameters::accumulateNegStats(), PLearn::RBMLLParameters::accumulateNegStats(), PLearn::RBMLateralBinomialLayer::accumulateNegStats(), PLearn::RBMGenericParameters::accumulateNegStats(), PLearn::RBMQLParameters::accumulatePosStats(), PLearn::RBMMatrixTransposeConnection::accumulatePosStats(), PLearn::RBMMatrixConnection::accumulatePosStats(), PLearn::RBMLQParameters::accumulatePosStats(), PLearn::RBMLLParameters::accumulatePosStats(), PLearn::RBMLateralBinomialLayer::accumulatePosStats(), PLearn::RBMGenericParameters::accumulatePosStats(), PLearn::VMatrix::accumulateXtX(), PLearn::VMatrix::accumulateXtY(), PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::BiasWeightAffineTransformVariable::bprop(), PLearn::AffineTransformVariable::bprop(), PLearn::RBMSparse1DMatrixConnection::bpropAccUpdate(), PLearn::RBMSparse1DMatrixConnection::bpropUpdate(), PLearn::RBMQLParameters::bpropUpdate(), PLearn::RBMMultitaskClassificationModule::bpropUpdate(), PLearn::RBMLQParameters::bpropUpdate(), computeCovar(), PLearn::RBMSparse1DMatrixConnection::computeProducts(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::LinearFilterModule::fprop(), PLearn::GradNNetLayerModule::fprop(), linearRegression(), PLearn::CorrelationProfiler::operator()(), PLearn::RBMMatrixConnection::petiteCulotteOlivierUpdate(), testCholeskyRoutines(), PLearn::PseudolikelihoodRBM::train(), PLearn::LinearInductiveTransferClassifier::train(), and PLearn::IncrementalNNet::train().

{
#ifdef BOUNDCHECK
    if (v1.length()!=mat.length() || mat.width()!=v2.length())
        PLERROR("externalProductAcc(Vec,Vec), incompatible arguments %dx%d= %d times %d",
                mat.length(),mat.width(),v1.length(), v2.length());
#endif

    T* v_1=v1.data();
    T* v_2=v2.data();
    T* mp = mat.data();
    int l = mat.length();
    int w = mat.width();

    if(mat.isCompact())
    {
        T* pv1 = v_1;
        for(int i=0; i<l; i++)
        {
            T* pv2 = v_2;
            T val = *pv1++;
            for(int j=0; j<w; j++)
                *mp++ += val * *pv2++;
        }
    }
    else
    {
        cerr << "!";
        for (int i=0;i<l;i++)
        {
            T* mi = mat[i];
            T v1i = v_1[i];
            for (int j=0;j<w;j++)
                mi[j] += v1i * v_2[j];
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::externalProductDivUpdate ( const TMat< T > &  mat,
const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 3929 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), N, PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (v1.length()!=mat.length() || mat.width()!=v2.length())
        PLERROR("externalProductDivUpdate(mat,v1,v2), incompatible arguments %dx%d= %d times %d",
                mat.length(),mat.width(),v1.length(), v2.length());
#endif
    const T* v_1=v1.data();
    const T* v_2=v2.data();
    const int N = mat.length();
    const int M = mat.width();
    for (int i=0 ; i<N ; ++i) {
        T* mi = mat[i];
        T v1i = v_1[i];
        for (int j=0; j<M ; ++j)
            mi[j] /= v1i * v_2[j];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::externalProductMultUpdate ( const TMat< T > &  mat,
const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 3907 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), N, PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (v1.length()!=mat.length() || mat.width()!=v2.length())
        PLERROR("externalProductMultUpdate(mat,v1,v2), incompatible arguments %dx%d= %d times %d",
                mat.length(),mat.width(),v1.length(), v2.length());
#endif
    const T* v_1=v1.data();
    const T* v_2=v2.data();
    const int N = mat.length();
    const int M = mat.width();
    for (int i=0 ; i<N ; ++i) {
        T* mi = mat[i];
        T v1i = v_1[i];
        for (int j=0; j<M ; ++j)
            mi[j] *= v1i * v_2[j];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::externalProductScaleAcc ( const TMat< T > &  mat,
const TVec< T > &  v1,
const TVec< T > &  v2,
gamma 
)

Definition at line 3859 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::Profiler::pl_profile_end(), PLearn::Profiler::pl_profile_start(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by addEigenMatrices(), PLearn::ProjectionErrorVariable::bprop(), PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::RBMMatrixTransposeConnection::bpropUpdate(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::RBMLLParameters::bpropUpdate(), PLearn::RBMLateralBinomialLayer::bpropUpdate(), PLearn::DenoisingRecurrentNet::bpropUpdateConnection(), computeCovar(), PLearn::RBMLateralBinomialLayer::computeExpectation(), computeInputCovar(), PLearn::GaussMix::computeLogLikelihood(), computeMeanAndCovar(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden2(), PLearn::TransformationLearner::MStepTransformationDiv(), PLearn::TransformationLearner::MStepTransformations(), PLearn::CorrelationProfiler::printAndReset(), PLearn::VecStatsCollector::remove_observation(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), sums2Gaussian(), PLearn::PseudolikelihoodRBM::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::VecStatsCollector::update(), PLearn::RBMLateralBinomialLayer::update(), PLearn::DenoisingRecurrentNet::updateInputReconstructionFromHidden(), and weightedLinearRegression().

{
    Profiler::pl_profile_start("externalProductScaleAcc T");

#ifdef BOUNDCHECK
    if (v1.length()!=mat.length() || mat.width()!=v2.length())
        PLERROR("externalProductScaleAcc(Vec,Vec), incompatible arguments %dx%d= %d times %d",
                mat.length(),mat.width(),v1.length(), v2.length());
#endif
    const T* v_1=v1.data();
    const T* v_2=v2.data();
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T* mi = mat[i];
        T v1i = v_1[i];
        for (int j=0;j<w;j++)
            mi[j] += gamma * v1i * v_2[j];
    }
    Profiler::pl_profile_end("externalProductScaleAcc T");
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::externalProductScaleAcc ( const TMat< T > &  mat,
const TVec< T > &  v1,
const TVec< T > &  v2,
gamma,
alpha 
)

Definition at line 3883 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::Profiler::pl_profile_end(), PLearn::Profiler::pl_profile_start(), PLERROR, w, and PLearn::TMat< T >::width().

{
    Profiler::pl_profile_start("externalProductScaleAcc T");

#ifdef BOUNDCHECK
    if (v1.length()!=mat.length() || mat.width()!=v2.length())
        PLERROR("externalProductScaleAcc(Vec,Vec), incompatible arguments %dx%d= %d times %d",
                mat.length(),mat.width(),v1.length(), v2.length());
#endif
    const T* v_1=v1.data();
    const T* v_2=v2.data();
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T* mi = mat[i];
        T v1i = v_1[i];
        for (int j=0;j<w;j++)
            mi[j] = alpha*mi[j] + gamma * v1i * v_2[j];
    }
    Profiler::pl_profile_end("externalProductScaleAcc T");
}

Here is the call graph for this function:

Var PLearn::extract ( Var  v,
int  o,
int  l,
int  w 
) [inline]

Definition at line 88 of file ExtractVariable.h.

Referenced by PLearn::EntropyContrastLearner::build_(), and PLearn::WordNetOntology::WordNetOntology().

                                               {
    return new ExtractVariable(v, o, l, w);
}

Here is the caller graph for this function:

string PLearn::extract_directory ( const string &  filepath)

Returns everything before the last '/' including the '/' (if there's no '/' it returns "./")

Definition at line 87 of file stringutils.cc.

References dot(), and slash.

Referenced by PLearn::AutoSDBVMatrix::AutoSDBVMatrix(), PLearn::VVMatrix::createPreproVMat(), PLearn::VVMatrix::extractSourceMatrix(), and PLearn::VVMatrix::getDateOfVMat().

{
    size_t p = filepath.rfind(slash);
    if (p != string::npos)
        return filepath.substr(0,p+1);
    else
    {
        string dot = ".";
        return dot+slash;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::extract_extension ( const string &  filepath)

Returns everything after the last '.

' of the filename (i.e. excluding the directory paths if any is present), including the '.' (if there's no '.' in the filename it returns "")

Definition at line 99 of file stringutils.cc.

References extract_filename().

Referenced by loadMat(), PLearn::PyPLearnScript::openScriptFile(), PLearn::VMatDictionaryCommand::run(), PLearn::ReadAndWriteCommand::run(), PLearn::HelpCommand::run(), smartLoadObject(), and vmatmain().

{
    string filename = extract_filename(filepath);
    size_t p = filename.rfind(".");
    if (p != string::npos)
        return filename.substr(p,filename.length()-p);
    else
        return "";
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::extract_filename ( const string &  filepath)

** File path manipulation functions **

Returns everything after the last '/' (if there's no '/' returns filepath)

Definition at line 78 of file stringutils.cc.

References slash.

Referenced by PLearn::AutoSDBVMatrix::AutoSDBVMatrix(), extract_extension(), extract_filename_without_extension(), loadMat(), and matlabR11eigs().

{
    size_t p = filepath.rfind(slash);
    if (p != string::npos)
        return filepath.substr(p+1,filepath.length()-(p+1));
    else
        return filepath;
}

Here is the caller graph for this function:

string PLearn::extract_filename_without_extension ( const string &  filepath)

Returns everything before the last '.' of the filename, excluding the '.' (if there's no '.' in the filename it returns the whole filename)

Definition at line 109 of file stringutils.cc.

References extract_filename().

{
    string filename = extract_filename(filepath);
    size_t p = filename.rfind(".");
    if (p != string::npos)
        return filename.substr(0,p);
    else
        return filename;
}

Here is the call graph for this function:

void PLearn::extractAncestors ( TVec< SynsetPtr >  anc,
TVec< TVec< string > > &  anc_str,
string  root_node 
)

Extracts synset.

Definition at line 140 of file WordNetSenseDictionary.cc.

References a, std::copy(), getSynsetKey(), i, PLearn::TVec< T >::length(), and PLearn::TVec< T >::push_back().

Referenced by PLearn::GraphicalBiText::compute_node_level(), PLearn::GraphicalBiText::compute_pMC(), PLearn::WordNetOntology::extractAncestors(), extractSenses(), PLearn::WordNetOntology::getSynsetAncestors(), PLearn::WordNetOntology::printSynsetAncestors(), PLearn::WordNetOntology::printWordAncestors(), and PLearn::WordNetOntology::WordNetOntology().

{
    SynsetPtr a;
    SynsetPtr extra_a;
    int i=0;
    anc_str.resize(anc.length());
    for(int k=0; k<anc_str.length(); k++)
        anc_str[k].resize(0);

    while(i<anc.length())
    {
        // Add sense
        a = anc[i];
        anc_str[i].push_back(getSynsetKey(a));
        // Go through one level and start looking for paths
        a = a->ptrlist; 
        while(a != NULL)
        {
            extra_a = a->nextss;
            while(extra_a != NULL)
            {
                anc.push_back(extra_a);
                anc_str.push_back(anc_str[i].copy());
                extra_a = extra_a->nextss;
            }
            anc_str[i].push_back(getSynsetKey(a));
            a = a->ptrlist; 
        }
        anc_str[i].push_back(root_node);
        i++;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::extractSenses ( string  word,
int  wn_pos,
string  symbol_type,
TVec< string > &  senses,
TVec< int > &  tagcnts,
TVec< TVec< string > > &  ancestors,
bool  extract_ancestors = false 
)

Extract senses for a word and a certain POS tag, as a certain symbol type.

Appends the extracted senses to the TVec senses and appends ancestor paths to TVec<TVec> ancestors

Definition at line 84 of file WordNetSenseDictionary.cc.

References cstr(), extractAncestors(), getSynsetKey(), PLERROR, PLearn::TVec< T >::push_back(), WN_ADJ_NODE, WN_ADV_NODE, WN_NOUN_NODE, and WN_VERB_NODE.

Referenced by PLearn::WordNetOntology::extractWord(), PLearn::WordNetFeatureSet::getNewFeaturesString(), and PLearn::WordNetSenseDictionary::getSensesFromWordNet().

{
    char* cword = cstr(word);
    SynsetPtr ssp = NULL;
    IndexPtr idx = getindex(cword, wn_pos);
    ssp = findtheinfo_ds(cword, wn_pos, -HYPERPTR, ALLSENSES);
    
    if (ssp == NULL) 
    {
        if(idx) free_index(idx);
        delete cword;
        return;
    }
    
    int wnsn = 0;
    SynsetPtr head = ssp;
    // extract all senses for a given word
    while (ssp != NULL)
    {
        ++wnsn;
        if(symbol_type == "sense_key")
        {
            char *charsk = WNSnsToStr(idx, wnsn);
            senses.push_back(string(charsk));
            delete charsk;
        }
        else if(symbol_type == "synset_key")
        {
            senses.push_back(getSynsetKey(ssp));
        }
        else PLERROR("In extractSenses(): symbol_type %s not valid", symbol_type.c_str());
        if(extract_ancestors)
        {
            TVec< TVec<string> > this_anc_str;
            TVec< SynsetPtr > beg_anc(1);
            beg_anc[0] = ssp;
            if(wn_pos == NOUN)
                extractAncestors(beg_anc,this_anc_str, WN_NOUN_NODE);
            else if(wn_pos == VERB)
                extractAncestors(beg_anc,this_anc_str, WN_VERB_NODE);
            else if(wn_pos == ADJ)
                extractAncestors(beg_anc,this_anc_str, WN_ADJ_NODE);
            else if(wn_pos == ADV)
                extractAncestors(beg_anc,this_anc_str, WN_ADV_NODE);
            else
                PLERROR("In extractSenses(): wn_pos %d invalid", wn_pos);
            ancestors.append(this_anc_str);
        }
        tagcnts.push_back(GetTagcnt(idx,wnsn));
        ssp = ssp->nextss;
    }
    free_syns(head);
    free_index(idx);
    delete cword;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::FABS ( real  x) [inline]
bool PLearn::fast_exact_is_equal ( real  a,
real  b 
) [inline]

Test exact float equality.

The goal of this function is to prevent a compiler warning when comparing real values. It behaves exactly as the "==" operator. In particular, if either 'a' or 'b' is NaN (or both), the return value will be 'false'.

Definition at line 234 of file pl_math.h.

Referenced by affineNormalization(), binwrite_compressed(), bnldev(), PLearn::SoftSlopeVariable::bprop(), PLearn::SoftSlopeIntegralVariable::bprop(), PLearn::OneHotSquaredLoss::bprop(), PLearn::NegCrossEntropySigmoidVariable::bprop(), PLearn::MatrixOneHotSquaredLoss::bprop(), PLearn::IfThenElseVariable::bprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::bprop(), PLearn::FNetLayerVariable::bprop(), PLearn::CrossEntropyVariable::bprop(), PLearn::AffineTransformWeightPenalty::bprop(), PLearn::RBMSparse1DMatrixConnection::bpropAccUpdate(), PLearn::RBMMatrixConnection::bpropAccUpdate(), PLearn::CostModule::bpropAccUpdate(), PLearn::CombiningCostsModule::bpropAccUpdate(), PLearn::RBMSparse1DMatrixConnection::bpropUpdate(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::RBMDiagonalMatrixConnection::bpropUpdate(), PLearn::LayerCostModule::bpropUpdate(), PLearn::DenoisingRecurrentNet::bpropUpdateConnection(), PLearn::ThresholdedKernel::build_(), PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::RepeatSplitter::build_(), PLearn::RemoveDuplicateVMatrix::build_(), PLearn::RBMModule::build_(), PLearn::RBMLateralBinomialLayer::build_(), PLearn::RankedVMatrix::build_(), PLearn::RandomSamplesVMatrix::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::ModuleTester::build_(), PLearn::LLEKernel::build_(), PLearn::KLp0p1RBMModule::build_(), PLearn::GaussianDistribution::build_(), PLearn::FNetLayerVariable::build_(), PLearn::EarlyStoppingOracle::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::Calendar::build_(), PLearn::AsciiVMatrix::build_(), PLearn::AddMissingVMatrix::build_(), PLearn::TopDownAsymetricDeepNetwork::build_layers_and_connections(), PLearn::StackedFocusedAutoassociatorsNet::build_layers_and_connections(), PLearn::DeepNonLocalManifoldParzen::build_layers_and_connections(), PLearn::NNet::buildPenalties(), PLearn::StatsCollector::calculate_binary_integer(), chol_rotgen(), choleskyDecomposition(), PLearn::CompactVMatrix::CompactVMatrix(), compress_vec(), PLearn::VecCompressor::compressVec(), computeBasicStats(), PLearn::ConjGradientOptimizer::computeCostAndDerivative(), PLearn::SVMClassificationTorch::computeCostsFromOutputs(), PLearn::RankLearner::computeCostsFromOutputs(), PLearn::RankingFromKernel::computeCostsFromOutputs(), PLearn::ModuleLearner::computeCostsFromOutputs(), PLearn::BinaryStump::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::ConjGradientOptimizer::computeCostValue(), PLearn::ConjGradientOptimizer::computeDerivative(), PLearn::RBMLateralBinomialLayer::computeExpectation(), PLearn::RBMLateralBinomialLayer::computeExpectations(), PLearn::FilteredVMatrix::computeFilteredIndices(), PLearn::LLEKernel::computeGramMatrix(), PLearn::LayerCostModule::computeKLdiv(), PLearn::RankingFromKernel::computeOutput(), PLearn::KernelProjection::computeOutput(), PLearn::AdaBoost::computeOutputAndCosts(), PLearn::Kernel::computeSparseGramMatrix(), PLearn::RealRange::contains(), PLearn::Calendar::containsTime(), PLearn::LayerCostModule::delta_KLdivTerm(), PLearn::LayerCostModule::delta_SafeKLdivTerm(), dilogarithm(), displayHistogram(), displayVarGraph(), dist(), PLearn::StatsCollector::dmodes(), PLearn::CompactVMatrix::encodeAndPutRow(), PLearn::IndexedVMatrix::ensureMappingsConsistency(), PLearn::ConcatRowsVMatrix::ensureMappingsConsistency(), PLearn::Kernel::estimateHistograms(), PLearn::ManifoldParzen2::evaluate(), PLearn::ClassErrorCostFunction::evaluate(), PLearn::ManifoldParzen2::evaluate_i_j(), PLearn::DistanceKernel::evaluate_i_j(), PLearn::LLEKernel::evaluate_i_x_again(), expdev(), findClosestPairsOfDifferentClass(), PLearn::RBMModule::fprop(), PLearn::RBMLateralBinomialLayer::fprop(), PLearn::NegCrossEntropySigmoidVariable::fprop(), PLearn::MulticlassLossVariable::fprop(), PLearn::MatrixSoftmaxVariable::fprop(), PLearn::LiftOutputVariable::fprop(), PLearn::LayerCostModule::fprop(), PLearn::IfThenElseVariable::fprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::fprop(), PLearn::EqualVariable::fprop(), PLearn::EqualScalarVariable::fprop(), PLearn::CrossEntropyVariable::fprop(), PLearn::AffineTransformWeightPenalty::fprop(), PLearn::RBMWoodsLayer::fpropNLL(), PLearn::RBMMultinomialLayer::fpropNLL(), PLearn::RBMLocalMultinomialLayer::fpropNLL(), PLearn::RBMLateralBinomialLayer::fpropNLL(), fullyRebalance2Classes(), gauss_01_quantile(), gaussian_01(), PLearn::DynamicallyLinkedRBMsModel::generate(), PLearn::DenoisingRecurrentNet::generate(), PLearn::DenoisingRecurrentNet::generateArtificial(), PLearn::VVMatrix::generateFilterIndexFile(), PLearn::StatsCollector::getBinMapping(), PLearn::Calendar::getCalendarTime(), PLearn::VecStatsCollector::getCovariance(), PLearn::ScoreLayerVariable::getMoleculeTemplate(), PLearn::RemapLastColumnVMatrix::getNewRow(), PLearn::KFoldSplitter::getSplit(), PLearn::NeuralProbabilisticLanguageModel::gradient_affine_transform(), PLearn::FeatureSetSequentialCRF::gradient_affine_transform(), PLearn::FeatureSetNNet::gradient_affine_transform(), PLearn::NeuralProbabilisticLanguageModel::gradient_penalty(), PLearn::FeatureSetSequentialCRF::gradient_penalty(), PLearn::FeatureSetNNet::gradient_penalty(), PLearn::TopDownAsymetricDeepNetwork::greedyStep(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::StackedAutoassociatorsNet::greedyStep(), PLearn::DeepNonLocalManifoldParzen::greedyStep(), PLearn::DeepBeliefNet::greedyStep(), incbcf(), inverse_softplus(), PLearn::VecCompressor::is0(), is_integer(), PLearn::VecCompressor::isF(), PLearn::VecCompressor::isI(), isMapKeysAreInt(), PLearn::VecCompressor::issmallint(), PLearn::TMat< pair< real, real > >::isSymmetric(), PLearn::DeepBeliefNet::jointGreedyStep(), PLearn::ConjGradientOptimizer::lineSearch(), loadAscii(), loadClassificationDataset(), logadd(), max_cdf_diff(), PLearn::StatsCollector::merge(), mypow(), new_get_compr_data_type(), new_write_compressed(), newIndexedMatArray(), norm(), PLearn::StackedAutoassociatorsNet::onlineStep(), PLearn::DeepBeliefNet::onlineStep(), operator/(), PLearn::RealRange::operator<(), PLearn::RealRange::operator==(), PLearn::RealRange::operator>(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), PLearn::RBMMatrixConnection::petiteCulotteOlivierCD(), PLearn::RBMMatrixConnection::petiteCulotteOlivierUpdate(), pl_gser(), PLearn::Grapher::plot_2D_classification(), PLearn::Gnuplot::plotClasses(), PLearn::Gnuplot::plotdensity(), poidev(), positive_dilogarithm(), powdistance(), pownorm(), PLearn::StatsCollector::pseudo_quantile(), PLearn::CompactVMatrix::putSubRow(), rebalanceNClasses(), PLearn::DynamicallyLinkedRBMsModel::recurrent_update(), PLearn::DenoisingRecurrentNet::recurrentFprop(), PLearn::DenoisingRecurrentNet::recurrentUpdate(), regulargrid_x_y_rgbreal_to_bitmap(), PLearn::VecStatsCollector::remove_observation(), PLearn::StatsCollector::remove_observation(), PLearn::IfThenElseVariable::rfprop(), PLearn::VMatLanguage::run(), PLearn::FieldConvertCommand::run(), PLearn::ThresholdedKernel::setDataForKernelMatrix(), PLearn::DistanceKernel::setDataForKernelMatrix(), PLearn::GaussianizeVMatrix::setMetaDataDir(), PLearn::StackedFocusedAutoassociatorsNet::setTrainingSet(), soft_slope(), soft_slope_integral(), sortIdComparator(), PLearn::SparseVMatrix::SparseVMatrix(), SpearmanRankCorrelation(), tabulated_soft_slope(), tabulated_soft_slope_integral(), PLearn::Kernel::test(), PLearn::DynamicallyLinkedRBMsModel::test(), PLearn::DenoisingRecurrentNet::test(), tostring(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PLS::train(), PLearn::ManifoldParzen2::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::DeepBeliefNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::BinaryStump::train(), PLearn::AdaBoost::train(), PLearn::StackedAutoassociatorsNet::unsupervisedFineTuningStep(), PLearn::StatsCollector::update(), PLearn::RBMSparse1DMatrixConnection::update(), PLearn::RBMMatrixConnection::update(), PLearn::RBMDiagonalMatrixConnection::update(), PLearn::RBMMatrixConnection::updateCDandGibbs(), PLearn::RBMMatrixConnection::updateGibbs(), PLearn::ConjGradientOptimizer::updateSearchDirection(), PLearn::Function::verifyGradient(), PLearn::Function::verifyrfprop(), viewVMat(), vmatmain(), and PLearn::VecCompressor::writeCompressedVec().

{
    // TODO This could (and should) be optimized.
    return (a <= b && b <= a);
}
real PLearn::fast_gauss_01_quantile ( real  x)

Use precomputed value in a table of size GAUSSQUANTILETABLESIZE.

If value is in the first or last 1/1000 we return the result of the non-fast version as the quality is too low.

Definition at line 263 of file pl_erf.cc.

References DOUBLE_TO_INT, gauss_01_quantile(), gaussQuantiletable, GAUSSQUANTILETABLESIZE, i, is_missing(), PLASSERT, and PLERROR.

Referenced by PLearn::GaussianizeVMatrix::getNewRow().

{
#ifdef BOUNDCHECK
    if(q<0||q>1)
        PLERROR("fast_gauss_01_quantile(q=%f) - "
                "q is less then 0 or more then 1",q);
    PLASSERT(!is_missing(q));
#endif

    if(q>0.005&&q<0.995)
    {
        int i;
        DOUBLE_TO_INT( double(q*((GAUSSQUANTILETABLESIZE-1))), i);
        return real(gaussQuantiletable[i]);
    }
    else
        return gauss_01_quantile(q);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::fast_is_equal ( real  a,
real  b,
real  absolute_tolerance_threshold = 1.0,
real  absolute_tolerance = ABSOLUTE_TOLERANCE,
real  relative_tolerance = RELATIVE_TOLERANCE 
) [inline]

Test float equality (but does not deal with 'nan' and 'inf' values).

This function is faster than the 'is_equal' function.

Definition at line 212 of file pl_math.h.

References PLERROR.

Referenced by PLearn::RegressionTreeRegisters::bestSplitInRow(), PLearn::ICP::build_(), PLearn::TreeDBNModule::check_shift(), PLearn::RegressionTreeNode::compareSplit(), PLearn::VMatrix::compareStats(), PLearn::LayerCostModule::computeCorrelationStatistics(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::MultiClassAdaBoost::computeCostsFromOutputs_(), PLearn::RegressionTree::computeCostsFromOutputsAndNodes(), PLearn::KroneckerBaseKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspAlpha(), PLearn::MultiClassAdaBoost::computeOutputAndCosts(), PLearn::AdaBoost::computeTrainingError(), PLearn::LayerCostModule::deriv_func_(), PLearn::RationalQuadraticARDKernel::derivIspAlpha(), PLearn::SquaredExponentialARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspGlobalSigma(), PLearn::NeuralNetworkARDKernel::derivIspGlobalSigma(), PLearn::Matern1ARDKernel::derivIspGlobalSigma(), PLearn::LinearARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::SquaredExponentialARDKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::NeuralNetworkARDKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), PLearn::LinearARDKernel::evaluate(), PLearn::KroneckerBaseKernel::evaluate(), PLearn::CorrelationKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), fast_is_less(), fast_is_more(), PLearn::LayerCostModule::func_(), PLearn::SpiralDistribution::generate(), PLearn::VecStatsCollector::getCovariance(), PLearn::MultiClassAdaBoost::getSubLearnerTarget(), inverse_sigmoid(), is_equal(), logsub(), PLearn::RegressionTreeNode::lookForBestSplit(), PLearn::ChemicalICP::run(), PLearn::RegressionTreeLeave::uniqTarget(), and PLearn::RBMLayer::update().

{
    // Check for 'nan' or 'inf' values in debug mode.
#ifdef BOUNDCHECK
    if (isnan(a) || isinf(a) || isnan(b) || isinf(b))
        PLERROR("In fast_is_equal - Either 'a' or 'b' is 'nan' or 'inf'");
#endif
    real a_abs = fabs(a);
    real b_abs = fabs(b);
    if (a_abs < absolute_tolerance_threshold && b_abs < absolute_tolerance_threshold)
        return (fabs(a-b) <= absolute_tolerance);
    real diff_abs = fabs(a - b);
    return diff_abs <= relative_tolerance*a_abs && diff_abs <= relative_tolerance*b_abs;
}

Here is the caller graph for this function:

bool PLearn::fast_is_less ( real  a,
real  b,
real  absolute_tolerance_threshold = 1.0,
real  absolute_tolerance = ABSOLUTE_TOLERANCE,
real  relative_tolerance = RELATIVE_TOLERANCE 
) [inline]

Test float inequality (but does not deal with 'nan' and 'inf' values).

Definition at line 249 of file pl_math.h.

References fast_is_equal().

Referenced by PLearn::RegressionTreeNode::lookForBestSplit().

{
    return a<b && !fast_is_equal(a,b,absolute_tolerance_threshold,absolute_tolerance,relative_tolerance);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::fast_is_more ( real  a,
real  b,
real  absolute_tolerance_threshold = 1.0,
real  absolute_tolerance = ABSOLUTE_TOLERANCE,
real  relative_tolerance = RELATIVE_TOLERANCE 
) [inline]

Test float inequality (but does not deal with 'nan' and 'inf' values).

Definition at line 241 of file pl_math.h.

References fast_is_equal().

Referenced by PLearn::RegressionTreeRegisters::bestSplitInRow(), PLearn::RegressionTreeNode::compareSplit(), and PLearn::RegressionTreeNode::lookForBestSplit().

{
    return a>b && !fast_is_equal(a,b,absolute_tolerance_threshold,absolute_tolerance,relative_tolerance);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::fastsigmoid ( const TVec< T > &  src) [inline]

Definition at line 1481 of file TMat_maths_impl.h.

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

{ TVec<T> dest(src.length()); compute_fastsigmoid(src,dest); return dest; }

Here is the call graph for this function:

real PLearn::fastsigmoid ( const real x) [inline]
template<class T >
TVec<T> PLearn::fasttanh ( const TVec< T > &  src) [inline]

Definition at line 1424 of file TMat_maths_impl.h.

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

{ TVec<T> dest(src.length()); compute_fasttanh(src,dest); return dest; }

Here is the call graph for this function:

real PLearn::fasttanh ( const real x) [inline]

Definition at line 307 of file pl_math.h.

References DOUBLE_TO_INT, i, MAXTANHX, tanhtable, TANHTABLESIZE, and x.

Referenced by compute_fasttanh(), PLearn::RBMBinomialLayer::computeExpectations(), fastsigmoid(), PLearn::TanhModule::fprop(), PLearn::RBMBinomialLayer::fprop(), PLearn::RBMBinomialLayer::freeEnergyContributionGradient(), PLearn::TMatTest::perform(), and PLearn::PLMathTest::perform().

{
    if (isnan(x)) return x; // tanh(nan)=nan
    int is_inf=isinf(x);
    if (is_inf>0) return 1; // tanh(inf)=1
    if (is_inf<0) return -1; // tanh(-inf)=-1
    if(x>0)
    {
        if(x>MAXTANHX)
            return real(tanhtable[TANHTABLESIZE-1]);
        else
        {
            int i;
            DOUBLE_TO_INT( double(x*((TANHTABLESIZE-1)/MAXTANHX)), i);
            return real(tanhtable[i]);
        }
    }
    else
    {
        real nx = -x;
        if(nx>MAXTANHX)
            return real(-tanhtable[TANHTABLESIZE-1]);
        else
        {
            int i;
            DOUBLE_TO_INT( double(nx*((TANHTABLESIZE-1)/MAXTANHX)), i);
            return real(-tanhtable[i]);
        }
    }
}

Here is the caller graph for this function:

long PLearn::filesize ( const PPath &  filename) [inline]

Returns the length of a file, measured in bytes, as a long.

Definition at line 125 of file fileutils.h.

References filesize64().

Referenced by filter(), PLearn::IntVecFile::getVersionAndSize(), loadFileAsString(), PLearn::VMatrix::lockMetaDataDir(), and PLearn::Storage< PP< RegressionTreeNode > >::Storage().

{ return long(filesize64(filename)); }

Here is the call graph for this function:

Here is the caller graph for this function:

PRUint64 PLearn::filesize64 ( const PPath &  filename)

Returns the length of a file, measured in bytes, as a 64bit unsigned integer type defined by NSPR.

Definition at line 310 of file fileutils.cc.

References PLearn::PPath::absolute(), getPrErrorString(), PLERROR, and PR_GetFileInfo64_NoWildcards().

Referenced by filesize(), and PLearn::FileVMatrixTest::perform().

{
    PRFileInfo64 inf;
    if (PR_GetFileInfo64_NoWildcards(filename.absolute().c_str(), &inf) != PR_SUCCESS)
        PLERROR("In filesize: error getting file info for %s: %s.",
                filename.absolute().c_str(), getPrErrorString().c_str());
    return inf.size;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::fill_one_hot ( const TVec< T > &  vec,
int  hotpos,
coldvalue,
hotvalue 
)

Definition at line 1766 of file TMat_maths_impl.h.

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

Referenced by PLearn::DeepBeliefNet::computeCostsFromOutputs(), PLearn::RBMMultinomialLayer::generateSample(), PLearn::RBMLocalMultinomialLayer::generateSample(), PLearn::RBMMultinomialLayer::generateSamples(), PLearn::RBMLocalMultinomialLayer::generateSamples(), PLearn::OneHotVMatrix::getNewRow(), PLearn::GeneralizedOneHotVMatrix::getNewRow(), PLearn::DeepBeliefNet::greedyStep(), PLearn::SubsamplingDBN::jointGreedyStep(), PLearn::DeepBeliefNet::jointGreedyStep(), one_hot(), PLearn::SubsamplingDBN::onlineStep(), PLearn::DeepBeliefNet::onlineStep(), and PLearn::DeepBeliefNet::upDownStep().

{
#ifdef BOUNDCHECK
    if(!vec)
        PLERROR("In fill_one_hot given vec must have the correct size");
    if(hotpos<0 || (vec.length()==1 && hotpos>1) || (vec.length()>1 && hotpos>=vec.length()))
        PLERROR("In fill_one_hot given hotpos out of vec range");
#endif
    if(vec.length()==1)
        vec[0] = (hotpos==0 ?coldvalue :hotvalue);
    else
    {
        vec.fill(coldvalue);
        vec[hotpos] = hotvalue;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::fill_one_hot ( const TMat< T > &  mat,
int  hotpos,
coldvalue,
hotvalue 
)

Definition at line 115 of file RBMLocalMultinomialLayer.cc.

References PLearn::TMat< T >::fill(), PLearn::TMat< T >::isNotEmpty(), PLASSERT_MSG, PLearn::TMat< T >::size(), w, and PLearn::TMat< T >::width().

{
    PLASSERT_MSG( mat.isNotEmpty(), "Given mat must not be empty" );
    PLASSERT_MSG( hotpos >= 0, "hotpos out of mat range" );
    PLASSERT_MSG( mat.size() > 1 || hotpos <= 1, "hotpos out of mat range" );
    PLASSERT_MSG( hotpos < mat.size() || mat.size() == 1,
                  "hotpos out of mat range" );

    if (mat.size() == 1)
        mat(0,0) = (hotpos == 0 ? coldvalue : hotvalue);
    else
    {
        mat.fill(coldvalue);
        int w = mat.width();
        mat(hotpos / w, hotpos % w);
    }
}

Here is the call graph for this function:

void PLearn::fill_random_discrete ( const Vec &  dest,
const Vec &  set 
)

sample each element from the given set

Definition at line 531 of file random.cc.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), n, and uniform_multinomial_sample().

Referenced by PLearn::DistRepNNet::initializeParams().

{
    Vec::iterator it = dest.begin();
    Vec::iterator itend = dest.end();  
    int n=set.length();
    for(; it!=itend; ++it)
        *it = set[uniform_multinomial_sample(n)];
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fill_random_normal ( const Vec &  dest,
real  mean,
real  stdev 
)

sample each element from Normal(mean,sdev^2) distribution

Definition at line 540 of file random.cc.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), and gaussian_mu_sigma().

Referenced by PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::DistRepNNet::fillWeights(), PLearn::NeuralNet::initializeParams(), PLearn::NeighborhoodSmoothnessNNet::initializeParams(), PLearn::MultiInstanceNNet::initializeParams(), and PLearn::ConditionalDensityNet::initializeParams().

{
    Vec::iterator it = dest.begin();
    Vec::iterator itend = dest.end();  
    for(; it!=itend; ++it)
        *it = real(gaussian_mu_sigma(mean,stdev));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fill_random_normal ( const Vec &  dest,
const Vec &  mean,
const Vec &  stdev 
)

sample each element from multivariate Normal(mean,diag(sdev^2)) distribution

Definition at line 548 of file random.cc.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), gaussian_mu_sigma(), PLearn::TVec< T >::length(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(mean.length()!=dest.length() || stdev.length()!=dest.length())
        PLERROR("In fill_random_normal: dest, mean and stdev must have the same length");
#endif
    Vec::iterator it_mean = mean.begin();
    Vec::iterator it_stdev = stdev.begin();
    Vec::iterator it = dest.begin();
    Vec::iterator itend = dest.end();  
    for(; it!=itend; ++it, ++it_mean, ++it_stdev)
        *it = real(gaussian_mu_sigma(*it_mean,*it_stdev));
}

Here is the call graph for this function:

void PLearn::fill_random_normal ( const Mat &  dest,
real  mean,
real  sdev 
)

Definition at line 572 of file random.cc.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::end(), and gaussian_mu_sigma().

{ 
    Mat::iterator it = dest.begin();
    Mat::iterator itend = dest.end();
    for(; it!=itend; ++it)
        *it = real(gaussian_mu_sigma(mean,sdev));
}

Here is the call graph for this function:

void PLearn::fill_random_uniform ( const Vec &  dest,
real  minval,
real  maxval 
)
void PLearn::fill_random_uniform ( const Mat &  dest,
real  minval,
real  maxval 
)

Definition at line 563 of file random.cc.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::end(), and uniform_sample().

{ 
    double scale = maxval-minval;
    Mat::iterator it = dest.begin();
    Mat::iterator itend = dest.end();
    for(; it!=itend; ++it)
        *it = real(uniform_sample()*scale+minval); 
}

Here is the call graph for this function:

template<class T >
void PLearn::fillDiagonal ( const TMat< T > &  mat,
val 
)

Fill diagonal with the specified value.

Definition at line 4783 of file TMat_maths_impl.h.

References i, and PLearn::TMat< T >::length().

{
    int l=mat.length();
    for (int i=0;i<l;i++)
        mat(i,i) = val;
}

Here is the call graph for this function:

template<class T >
void PLearn::fillDiagonal ( const TMat< T > &  mat,
const TVec< T > &  v 
)

Fill diagonal with the specified vector.

Definition at line 4792 of file TMat_maths_impl.h.

References i, and PLearn::TMat< T >::length().

{
    int l=mat.length();
    for (int i=0;i<l;i++)
        mat(i,i) = v[i];
}

Here is the call graph for this function:

template<class T >
void PLearn::fillItSymmetric ( const TMat< T > &  mat)

Fill the bottom left part of a matrix with its top right part, so that it becomes symmetric.

Definition at line 3536 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, and PLearn::TMat< T >::mod().

Referenced by PLearn::GaussMix::addToCovariance(), PLearn::GaussMix::computeLogLikelihood(), eigenVecOfSymmMat(), PLearn::GaussianProcessNLLVariable::fbpropFragments(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), PLearn::LLC::train(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

                                         {
    int m = mat.mod();
    T* mat_data_to_fill;
    T* mat_data_to_copy;
    for (int i = 0; i < mat.length(); i++) {
        mat_data_to_fill = mat[i];
        mat_data_to_copy = &mat[0][i];
        for (int j = 0; j < i; j++) {
            *(mat_data_to_fill++) = *mat_data_to_copy;
            mat_data_to_copy += m;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::filter ( VMat  d,
const string &  indexfile 
)

returns a VMat that contains only the lines that do not have any MISSING_VALUE The indexes of the rows of the original matrix are recorded in the indexfile BEWARE: If the indexfile already exists, it is *not* recomputed, but used as is.

Definition at line 123 of file VMat_operations.cc.

References PLearn::IntVecFile::append(), filesize(), i, isfile(), PLearn::VMat::length(), PLearn::VMat::rows(), and PLearn::VMat::width().

Referenced by PLearn::StatsCommand::run(), and PLearn::EmbeddedSequentialLearner::train().

{
    if(!isfile(indexfile) || filesize(indexfile)==0)
    {
        IntVecFile indices(indexfile,true);
        Vec v(d.width());
        for(int i=0; i<d.length(); i++)
        {
            d->getRow(i,v);
            if(!v.hasMissing())
                indices.append(i);
        }
    }
    return d.rows(indexfile);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::find ( const vector< string > &  command_line,
const string &  option 
)

also useful to find "turn-on" options in a command line, i.e. of the form option this function just returns true if the option is found in the command_line. Note: this may be useful with command_line = stringvector(argc,argv);

Definition at line 675 of file stringutils.cc.

References i, and n.

Referenced by PLearn::RBMTrainer::build_(), PLearn::NnlmOnlineLearner::buildCandidates(), PLearn::TVec< PP< RegressionTreeNode > >::contains(), PLearn::Hash< KeyType, DataType >::del(), PLearn::Hash< KeyType, DataType >::element(), PLearn::PPath::expandMetaprotocols(), PLearn::FeatureSetNaiveBayesClassifier::getProbs(), PLearn::WordNetSenseDictionary::getSensesFromWordNet(), PLearn::VMatrix::getValString(), PLearn::Hash< KeyType, DataType >::hashAddress(), PLearn::PStream::operator>>(), PLearn::PPath::parseProtocol(), PLearn::VMatrix::removeStringMapping(), PLearn::PPath::resolveDoubleDots(), PLearn::PPath::resolveSingleDots(), PLearn::PPath::resolveSlashChars(), and PLearn::SimpleDB< KeyType, QueryResult >::truncateFromRow().

{
    vector<string>::size_type n = command_line.size();
    for (unsigned int i=0;i<n;i++)
        if (command_line[i]==option) return true;
    return false;
}

Here is the caller graph for this function:

Mat PLearn::findClosestPairsOfDifferentClass ( int  k,
VMat  data,
Ker  dist 
)

Definition at line 974 of file Kernel.cc.

References argmax(), PLearn::TMat< T >::column(), d, dist(), fast_exact_is_equal(), i, j, PLearn::VMat::length(), sortRows(), PLearn::TVec< T >::subVec(), and PLearn::VMat::width().

{
    Mat result(k,3);
    real maxdistinlist = -FLT_MAX;
    int posofmaxdistinlist = -1;
    int kk=0; // number of pairs already in list
    Vec rowi(data.width());
    Vec inputi = rowi.subVec(0,rowi.length()-1);
    real& targeti = rowi[rowi.length()-1];
    Vec rowj(data.width());
    Vec inputj = rowj.subVec(0,rowj.length()-1);
    real& targetj = rowj[rowj.length()-1];
    for(int i=0; i<data.length(); i++)
    {
        data->getRow(i,rowi);
        for(int j=0; j<data.length(); j++)
        {
            data->getRow(j,rowj);
            if(!fast_exact_is_equal(targeti, targetj))
            {
                real d = dist(inputi,inputj);
                if(kk<k)
                {
                    result(kk,0) = i;
                    result(kk,1) = j;
                    result(kk,2) = d;
                    if(d>maxdistinlist)
                    {
                        maxdistinlist = d;
                        posofmaxdistinlist = kk;
                    }
                    kk++;
                }
                else if(d<maxdistinlist)
                {
                    result(posofmaxdistinlist,0) = i;
                    result(posofmaxdistinlist,1) = j;
                    result(posofmaxdistinlist,2) = d;
                    posofmaxdistinlist = argmax(result.column(2));
                    maxdistinlist = result(posofmaxdistinlist,2);
                }
            }
        }
    }
    sortRows(result, 2);//use partialSortRows instead
    return result;
}

Here is the call graph for this function:

int PLearn::findpos ( const vector< string > &  v,
string  element 
)

return index of element in v, or -1 if not found

Definition at line 596 of file stringutils.cc.

References i.

Referenced by global_options(), and plearn_main().

{
    for (size_t i=0;i<v.size();i++)
        if (v[i]==element) return int(i);
    return -1;
}

Here is the caller graph for this function:

template<class MatT >
real PLearn::findSmallestEigenPairOfSymmMat ( MatT &  A,
Vec  x,
real  error_tolerance = 1e-3,
real  improvement_tolerance = 1e-4,
int  max_n_cg_iter = 0,
int  max_n_power_iter = 0,
bool  verbose = false 
)

Tries to find the smallest magnitude eigen-value / eigen-vector pair of a generic symmetric matrix A, i.e., the smallest lambda and corresponding x such that A x = lambda x |x|=1 The argument x is the initial tentative solution (and also where the solution is stored upon return). The algorithm proceeds iteratively with a call to InversePowerIteration in the inner loop, keeping the last 5 points visited in the inverse power iteration, diagonalizing them, and restarting the inverse power iteration with the vector corresponding to the smallest eigenvalue of the diagonalized system. The user must provide an error tolerance (to stop if |A x| < error_tolerance), an improvement_tolerance (to stop if x'Ax does not get down by this fraction in one iteration, the maximum number of conjugate gradients iteration during the InversePowerIteration, the maximum number of inverse power iterations, and wether to output verbose messages on cout.

let's see if this is really a good solution Vec y = try_solutions(offs);

diagonalize the subspace found by the trial solutions

Definition at line 659 of file GenMat.h.

References diagonalizeSubspace(), dot(), endl(), i, InversePowerIteration(), PLearn::TMat< T >::length(), norm(), normalize(), pl_log, pow(), product(), sqrt(), and PLearn::TVec< T >::toMat().

Referenced by SymmMatNullSpaceByInversePowerIteration().

{
    int n=A.length();
    int n_try=5;

    if (max_n_cg_iter==0)
        max_n_cg_iter = 5+int(pow(double(n),0.3));
    if (max_n_power_iter==0)
        max_n_power_iter = 5+int(pl_log(n));

    Mat try_solutions(n_try,n);
    Mat kernel_solutions = x.toMat(1,n);
    Vec Ax(n);

    int max_iter = int(sqrt(max_n_power_iter));
    real err=1e30, prev_err=1e30;
    int nrepeat=0;
    do {
        int n_iter=max_iter;
        int offs=0;
        real l0 = InversePowerIteration(A,x,n_iter,max_n_cg_iter,
                                        improvement_tolerance,
                                        try_solutions,offs,error_tolerance,verbose);
        if (verbose)
            cout << "got smallest eigenvalue = " << l0
                 << " in " << n_iter << " iterations" << endl;

        if (verbose)
        {
            n_try = try_solutions.length();
            for (int i=0;i<n_try;i++)
            {
                cout << "for solution " << i << endl;
                Vec y = try_solutions(i);
                normalize(y);
                product(A, y,Ax);
                prev_err=err;
                err = norm(Ax);
                cout << "|A y| = " << err << endl;
                cout << "y. A y = " << dot(y,Ax) << endl;
            }
        }

        Vec evalues(n_try);
        Mat evectors(n_try,n_try);
        diagonalizeSubspace(A, try_solutions, Ax, kernel_solutions, evalues, evectors);
        product(A, x,Ax);
        err = norm(Ax);
        if (verbose)
            cout << "after diagonalization, err = " << err << endl;
        nrepeat++;
    } while (err > error_tolerance && n_try>=2 && 
             prev_err/err-1>improvement_tolerance && nrepeat<max_iter);
    if (verbose)
        cout << "return from findSmallestEigenPairOfSymmMat with err=" << err << endl;
    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::findSumsFromPts ( const graph mesh,
const set< vertex_descriptor > &  points,
Vec &  sums 
)

Definition at line 559 of file geometry.cc.

References PLearn::TVec< T >::resize(), vertex_ppt, and x.

Referenced by calcNormal().

{
  sums.resize( 10 );

  set<vertex_descriptor>::const_iterator it;
  for( it=points.begin() ; it!=points.end() ; it++ )
  {
    Vec p = get( vertex_ppt, mesh, *it )->coord;
    real x = p[ 0 ];
    real y = p[ 1 ];
    real z = p[ 2 ];

    sums[0]++;
    sums[1]+=x;
    sums[2]+=y;
    sums[3]+=z;
    sums[4]+=x*x;
    sums[5]+=y*y;
    sums[6]+=z*z;
    sums[7]+=x*y;
    sums[8]+=x*z;
    sums[9]+=y*z;

  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::fixedAnglesFromRotation ( const Mat &  m)

Definition at line 49 of file geometry.cc.

References m, Pi, and sqrt().

Referenced by PLearn::ICP::iterate(), PLearn::ICP::iterativeReweight(), main(), and PLearn::ICP::run().

{
  Vec angle( 3 );

  angle[1] = atan2( -m(2,0), sqrt( m(0,0)*m(0,0) + m(1,0)*m(1,0) ) );
  angle[2] = atan2( m(1,0) / cos( angle[1] ), m(0,0) / cos( angle[1] ) );
  angle[0] = atan2( m(2,1) / cos( angle[1] ), m(2,2) / cos( angle[1] ) );

  if( angle[ 1 ] * 180 / Pi > 89.9 )
  {
    angle[ 1 ] = Pi / 2;
    angle[ 2 ] = 0;
    angle[ 0 ] = atan2( m( 0, 1 ), m( 1, 1 ) );
  }
  else if( angle[ 1 ] * 180.0 / Pi < -89.9 )
  {
    angle[ 1 ] = -Pi / 2;
    angle[ 2 ] = 0;
    angle[ 0 ] = -atan2( m( 0, 1 ), m( 1, 1 ) );
  }

  return( angle * ( real(180.0 / Pi) ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

PDate PLearn::float_to_date ( float  f)

Definition at line 338 of file PDate.cc.

References d, PLearn::PDate::day, is_missing(), PLearn::PDate::month, and PLearn::PDate::year.

Referenced by PLearn::DatedJoinVMatrix::build_(), PLearn::SDBVMFieldMonths::convertField(), PLearn::SDBVMFieldDay::convertField(), PLearn::SDBVMFieldDate::convertField(), float_to_date(), PLearn::Calendar::makeCalendar(), and PLearn::VMatLanguage::run().

{
    PDate date;                     // missing by default
    if (! is_missing(f)) {
        long d = long(f);
        date.year = short(1900 + d/10000);
        d %= 10000;
        date.month = (unsigned char) (d/100);
        date.day = (unsigned char) (d%100);
    }
    return date;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PDate PLearn::float_to_date ( double  d) [inline]

Definition at line 211 of file PDate.h.

References float_to_date().

{ return float_to_date(float(d)); }

Here is the call graph for this function:

PStream & PLearn::flush ( PStream &  out)
bool PLearn::force_mkdir ( const PPath &  dirname)

Forces directory creation if it does not already exist. (also creates any missing directory along its path). Return value indicates success (true) or failure (false). If the directory already exists, true is returned.

Definition at line 255 of file fileutils.cc.

References PLearn::PPath::absolute(), i, isdir(), PLearn::PPath::isEmpty(), PLearn::PPath::isRoot(), mkdir_lowlevel(), PLERROR, and PLearn::PPath::up().

Referenced by PLearn::AutoSDBVMatrix::AutoSDBVMatrix(), PLearn::VVMatrix::build_(), PLearn::PLearner::build_(), PLearn::PTester::build_(), PLearn::LocallyPrecomputedVMatrix::build_(), PLearn::HTMLHelpGenerator::build_(), PLearn::GaussianProcessRegressor::build_(), PLearn::DiskVMatrix::build_(), PLearn::VVMatrix::createPreproVMat(), force_mkdir_for_file(), PLearn::VMatrix::loadStringMapping(), PLearn::VMatrix::lockMetaDataDir(), matlabSave(), openFile(), PLearn::FilteredVMatrix::openIndex(), PLearn::PTester::perform1Split(), PLearn::SequentialValidation::run(), PLearn::Experiment::run(), PLearn::VMatrix::saveFieldInfos(), savePMatFieldnames(), PLearn::PLearner::setExperimentDirectory(), PLearn::PTester::setExperimentDirectory(), PLearn::Learner::setExperimentDirectory(), PLearn::HyperCommand::setExperimentDirectory(), PLearn::CompareLearner::setExperimentDirectory(), and PLearn::TextFilesVMatrix::setMetaDataDir().

{
    if (dirname.isEmpty())
        PLERROR("In force_mkdir - Parameter 'dirname' is empty");
    
    vector<PPath> paths;
    PPath path = dirname.absolute();
    while (!path.isRoot()) {
        paths.push_back(path);
        path = path.up();
    }

    for (int i = int(paths.size()) - 1; i >= 0; i--)
        mkdir_lowlevel(paths[i].absolute());

    return isdir(dirname);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::force_mkdir_for_file ( const PPath &  filepath)

Extracts the directory part of the filepath and calls force_mkdir.

Calls PLERROR in case of failure.

Definition at line 276 of file fileutils.cc.

References PLearn::PPath::absolute(), PLearn::PPath::dirname(), force_mkdir(), and PLERROR.

Referenced by PLearn::FileVMatrix::build_(), PLearn::TextFilesVMatrix::getMapping(), save(), saveStringInFile(), PLearn::VMatrix::saveStringMappings(), and PLearn::VMatrix::setSFIFFilename().

{
    PPath dirpath = filepath.dirname();
    if (!force_mkdir(dirpath))
        PLERROR("force_mkdir(%s) failed",dirpath.absolute().c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::force_rmdir ( const PPath &  dirname)

Forces removal of directory and all its content. Return value indicates success (true) or failure (false). If the directory does not exist, false is returned.

Definition at line 286 of file fileutils.cc.

References PLearn::PPath::absolute(), isdir(), and lsdir_fullpath().

Referenced by PLearn::FileVMatrix::build_(), PLearn::VVMatrix::createPreproVMat(), PLearn::FileVMatrixTest::perform(), PLearn::VMatrix::saveDMAT(), PLearn::VMatrix::savePMAT(), PLearn::PrecomputedVMatrix::usePrecomputed(), PLearn::LocallyPrecomputedVMatrix::~LocallyPrecomputedVMatrix(), PLearn::TemporaryDiskVMatrix::~TemporaryDiskVMatrix(), and PLearn::TemporaryFileVMatrix::~TemporaryFileVMatrix().

{
    if (!isdir(dirname))
        return false;

    const vector<PPath> entries = lsdir_fullpath(dirname);
    for (vector<PPath>::const_iterator it = entries.begin();
         it != entries.end(); ++it) {
        if (isdir(*it)) {
            if (!force_rmdir(*it))
                return false;
        }
        else {
            if (PR_Delete(it->absolute().c_str()) != PR_SUCCESS)
                return false;
        }
    }

    return PR_RmDir(dirname.absolute().c_str()) == PR_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fread_double ( FILE *  f,
double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 255 of file pl_io_deprecated.cc.

References reverse_double().

Referenced by fread_double(), PLearn::FileVMatrix::getNewRow(), loadPMat(), and loadPVec().

{
    fread(ptr,sizeof(double),n,f);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_double(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_double(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fread_double ( FILE *  f,
float *  ptr,
int  n,
bool  is_file_bigendian 
)

reads disk doubles into float array

Definition at line 268 of file pl_io_deprecated.cc.

References fread_double(), i, and n.

{
    double* dptr = new double[n];
    fread_double(f,dptr,n,is_file_bigendian);
    for(int i=0; i<n; i++)
        ptr[i] = float(dptr[i]);
    delete[] dptr;
}

Here is the call graph for this function:

double PLearn::fread_double ( FILE *  f,
bool  is_file_bigendian = true 
) [inline]

Definition at line 102 of file pl_io_deprecated.h.

References fread_double().

{ double res; fread_double(f,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::fread_float ( FILE *  f,
float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 233 of file pl_io_deprecated.cc.

References reverse_float().

Referenced by fread_float(), PLearn::FileVMatrix::getNewRow(), loadADMat(), loadADVec(), loadPMat(), loadPVec(), loadSNMat(), and loadSNVec().

{
    fread(ptr,sizeof(float),n,f);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_float(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_float(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fread_float ( FILE *  f,
double *  ptr,
int  n,
bool  is_file_bigendian 
)

reads disk floats into double array

Definition at line 246 of file pl_io_deprecated.cc.

References fread_float(), i, and n.

{
    float* fptr = new float[n];
    fread_float(f,fptr,n,is_file_bigendian);
    for(int i=0; i<n; i++)
        ptr[i] = double(fptr[i]);
    delete[] fptr;
}

Here is the call graph for this function:

float PLearn::fread_float ( FILE *  f,
bool  is_file_bigendian = true 
) [inline]

Definition at line 100 of file pl_io_deprecated.h.

References fread_float().

{ float res; fread_float(f,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::fread_int ( FILE *  f,
int ptr,
int  n,
bool  is_file_bigendian = true 
)

Reads binary data from a file assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness on the current architecture.

Definition at line 220 of file pl_io_deprecated.cc.

References reverse_int().

Referenced by fread_int(), PLearn::IntVecFile::get(), loadADMat(), loadADVec(), loadSNMat(), and loadSNVec().

{
    fread(ptr,sizeof(int),n,f);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_int(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_int(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::fread_int ( FILE *  f,
bool  is_file_bigendian = true 
) [inline]

The following calls read a single value from the file, assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness used on the current architecture.

Definition at line 98 of file pl_io_deprecated.h.

References fread_int().

{ int res; fread_int(f,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::fread_short ( FILE *  f,
unsigned short *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 277 of file pl_io_deprecated.cc.

References reverse_ushort().

{
    fread(ptr,sizeof(unsigned short),n,f);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_ushort(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_ushort(ptr,n);
#endif
}

Here is the call graph for this function:

real PLearn::fullGaussianRBF ( Vec  x,
Vec  mu,
Mat  evectors,
Vec  evalues,
real  remainder_evalue = 0 
) [inline]

Definition at line 69 of file distr_maths.h.

References log_fullGaussianRBF(), and safeexp().

{ return safeexp(log_fullGaussianRBF(x,mu,evectors,evalues,remainder_evalue)); }

Here is the call graph for this function:

void PLearn::fullyRebalance2Classes ( VMat  inputs,
const string &  filename,
bool  save_indices = true 
)

Rebalance a 2-class VMat such as to keep all the examples of the dominant class.

Definition at line 261 of file VMat_operations.cc.

References PLearn::TmpFilenames::addFilename(), fast_exact_is_equal(), i, isfile(), PLearn::VMat::lastColumn(), PLearn::VMat::length(), MAX, PLearn::IntVecFile::put(), PLearn::TVec< T >::resize(), PLearn::VMat::rows(), PLearn::VMat::save(), PLearn::VMat::toMat(), and PLearn::TMat< T >::toVecCopy().

{
    if (!isfile(filename))
    {
        int len = inputs.length();

        int n_zeros = 0;
        int n_ones = 0;
        Vec zeros(len);
        Vec ones(len);

        Vec last = inputs.lastColumn()->toMat().toVecCopy();
        for (int i=0; i<len;i++)
        {
            if (fast_exact_is_equal(last[i], 0))
                zeros[n_zeros++] = i;
            else
                ones[n_ones++] = i;
        }
        zeros.resize(n_zeros);
        ones.resize(n_ones);

        TmpFilenames tmpfile(1);
        string fname = save_indices ? filename : tmpfile.addFilename();
        IntVecFile indices(fname, true);
        int max_symbols = MAX(n_zeros, n_ones);
        for (int i=0; i<max_symbols; i++)
        {
            indices.put(2*i, int(zeros[i%n_zeros]));
            indices.put(2*i+1, int(ones[i%n_ones]));
        }
        if (!save_indices)
        {
            VMat vm = inputs.rows(fname);
            vm.save(filename);
        }
    }
}

Here is the call graph for this function:

void PLearn::fwrite_double ( FILE *  f,
const double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 185 of file pl_io_deprecated.cc.

References reverse_double().

Referenced by PLearn::FileVMatrix::appendRow(), fwrite_double(), PLearn::FileVMatrix::put(), and PLearn::FileVMatrix::putSubRow().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_double(ptr,n);
        fwrite(ptr,sizeof(double),n,f);
        reverse_double(ptr,n);
    }
    else
        fwrite(ptr,sizeof(double),n,f);
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        fwrite(ptr,sizeof(double),n,f);
    else
    {
        reverse_double(ptr,n);
        fwrite(ptr,sizeof(double),n,f);
        reverse_double(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fwrite_double ( FILE *  f,
const float *  ptr,
int  n,
bool  is_file_bigendian 
)

writes float array to double file

Definition at line 209 of file pl_io_deprecated.cc.

References fwrite_double(), i, and n.

{
    double* dptr = new double[n];
    for(int i=0; i<n; i++)
        dptr[i] = double(ptr[i]);
    fwrite_double(f,dptr,n,is_file_bigendian);
    delete[] dptr;
}

Here is the call graph for this function:

void PLearn::fwrite_double ( FILE *  f,
double  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 111 of file pl_io_deprecated.h.

References fwrite_double().

{ fwrite_double(f, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::fwrite_float ( FILE *  f,
const double *  ptr,
int  n,
bool  is_file_bigendian 
)

writes double array to float file

Definition at line 176 of file pl_io_deprecated.cc.

References fwrite_float(), i, and n.

{
    float* fptr = new float[n];
    for(int i=0; i<n; i++)
        fptr[i] = float(ptr[i]);
    fwrite_float(f,fptr,n,is_file_bigendian);
    delete[] fptr;
}

Here is the call graph for this function:

void PLearn::fwrite_float ( FILE *  f,
const float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 152 of file pl_io_deprecated.cc.

References reverse_float().

Referenced by PLearn::FileVMatrix::appendRow(), fwrite_float(), PLearn::FileVMatrix::put(), PLearn::FileVMatrix::putSubRow(), saveSNMat(), and saveSNVec().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_float(ptr,n);
        fwrite(ptr,sizeof(float),n,f);
        reverse_float(ptr,n);
    }
    else
        fwrite(ptr,sizeof(float),n,f);
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        fwrite(ptr,sizeof(float),n,f);
    else
    {
        reverse_float(ptr,n);
        fwrite(ptr,sizeof(float),n,f);
        reverse_float(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fwrite_float ( FILE *  f,
float  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 109 of file pl_io_deprecated.h.

References fwrite_float().

{ fwrite_float(f, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::fwrite_int ( FILE *  f,
const int ptr,
int  n,
bool  is_file_bigendian = true 
)

Writes binary data to the file in the specified representation (little or big endian) regardeless of the endianness used on the current architecture.

Definition at line 128 of file pl_io_deprecated.cc.

References reverse_int().

Referenced by fwrite_int(), PLearn::IntVecFile::put(), saveSNMat(), and saveSNVec().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_int(ptr,n);
        fwrite(ptr,sizeof(int),n,f);
        reverse_int(ptr,n);
    }
    else
        fwrite(ptr,sizeof(int),n,f);
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        fwrite(ptr,sizeof(int),n,f);
    else
    {
        reverse_int(ptr,n);
        fwrite(ptr,sizeof(int),n,f);
        reverse_int(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::fwrite_int ( FILE *  f,
int  value,
bool  is_file_bigendian = true 
) [inline]

The following calls write a single value to the file in the specified representation, regardeless of the endianness on the current architecture.

Definition at line 107 of file pl_io_deprecated.h.

References fwrite_int().

{ fwrite_int(f, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

real PLearn::gamdev ( int  ia)
Returns:
a deviate distributed as a gamma distribution from the 'numerical recipes'.

Definition at line 361 of file random.cc.

References exp(), j, pl_log, PLERROR, sqrt(), uniform_sample(), and x.

{
    int j;
    real am,e,s,v1,v2,x,y;

    if (ia < 1) PLERROR("Error in routine gamdev");
    if (ia < 6) {
        x=1.0;
        for (j=1;j<=ia;j++) x *= uniform_sample();
        x = -pl_log(x);
    } else {
        do {
            do {
                do {
                    v1=uniform_sample();
                    v2=2.0*uniform_sample()-1.0;
                } while (v1*v1+v2*v2 > 1.0);
                y=v2/v1;
                am=ia-1;
                s=sqrt(2.0*am+1.0);
                x=s*y+am;
            } while (x <= 0.0);
            e=(1.0+y*y)*exp(am*pl_log(x/am)-s*y);
        } while (uniform_sample() > e);
    }
    return x;
}

Here is the call graph for this function:

real PLearn::gauss_01_cum ( real  x)

For X ~ Normal(0,1), cumulative probability function P(X<x)

Definition at line 168 of file pl_erf.cc.

References pl_erf().

Referenced by gauss_01_quantile(), gauss_cum(), normal_cdf(), p_value(), PLearn::NatGradSMPNNet::pvGradUpdate(), testNoCorrelationAsymptotically(), and PLearn::GaussianizeVMatrix::unGauss().

                          {
    return 0.5*(1+pl_erf(x*0.707106781187));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::gauss_01_density ( real  x)

for X ~ Normal(0,1), return density of X at x

Definition at line 212 of file pl_erf.cc.

References exp(), and Sqrt2Pi.

Referenced by gauss_density_stddev().

{
    return exp(-0.5*x*x) / Sqrt2Pi;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::gauss_01_log_density ( real  x)

Definition at line 217 of file pl_erf.cc.

References Log2Pi.

{
    return -0.5*x*x - 0.5*Log2Pi;
}
real PLearn::gauss_01_quantile ( real  q)

For X ~ Normal(0,1), inverse of cumulative probability function P(X<x) i.e. approximately gauss_01_quantile(gauss_01_cum(x)) ~=~ x (the inverse is computed with a binary search, the bisection method)

Definition at line 175 of file pl_erf.cc.

References a, b, c, fast_exact_is_equal(), gauss_01_cum(), is_missing(), PLASSERT, and PLERROR.

Referenced by PLearn::PLS::computeConfidenceFromOutput(), PLearn::LinearRegressor::computeConfidenceFromOutput(), PLearn::GaussianProcessRegressor::computeConfidenceFromOutput(), PLearn::PvGradNNet::discountGrad(), fast_gauss_01_quantile(), PLearn::PvGradNNet::forget(), PLearn::PvGradNNet::neuronDiscountGrad(), PLearn::PLGaussQuantileInitializer::PLGaussQuantileInitializer(), PLearn::PvGradNNet::pvGrad(), and PLearn::FieldConvertCommand::run().

                               {
#ifdef BOUNDCHECK
    if(q<0||q>1)
        PLERROR("gauss_01_quantile(q=%f) - q is less then 0 or more then 1",q);
    PLASSERT(!is_missing(q));
#endif

    // Handle special cases that can lead to infinite loops below.
    if (fast_exact_is_equal(q, real(0)))
        return -INFINITY;
    else if (fast_exact_is_equal(q, real(1)))
        return INFINITY;

    // first find a reasonable interval (a,b) s.t. cum(a)<q<cum(b)
    real a=-2;
    real b=2;
    real cum_a=gauss_01_cum(a);
    real cum_b=gauss_01_cum(b);
    while (cum_a>q) { a*=1.5; cum_a=gauss_01_cum(a); }
    while (cum_b<q) { b*=1.5; cum_b=gauss_01_cum(b); }
    // then start the bisection loop itself
    for (;;) {
        real c=0.5*(a+b);
        real precision = fabs(b-a);
        // PRECISION HERE:
        if (precision < 1e-6) 
            return c;
        real cum_c = gauss_01_cum(c);
        if (cum_c < q)
            a=c;
        else
            b=c;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::gauss_cum ( real  x,
real  mu,
real  sigma 
) [inline]

Definition at line 74 of file pl_erf.h.

References gauss_01_cum().

Referenced by PLearn::LimitedGaussianSmoother::smooth().

{ return gauss_01_cum((x-mu)/sigma); }

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::gauss_density_stddev ( real  x,
real  mu,
real  sigma 
) [inline]

Definition at line 91 of file pl_erf.h.

References gauss_01_density().

{ return gauss_01_density((x-mu)/sigma); }

Here is the call graph for this function:

real PLearn::gauss_density_var ( real  x,
real  mu,
real  var 
)

Definition at line 229 of file pl_erf.cc.

References exp(), and Sqrt2Pi.

                                                  {
    real dx = x - mu;
    return exp(-0.5 * dx * dx / var) / Sqrt2Pi;
}

Here is the call graph for this function:

real PLearn::gauss_log_density_stddev ( real  x,
real  mu,
real  sigma 
)

Definition at line 234 of file pl_erf.cc.

References Log2Pi, and pl_log.

Referenced by PLearn::GaussMix::computeLogLikelihood().

{
    real dx = (x-mu) / sigma;
    return -0.5*(dx*dx + Log2Pi) - pl_log(sigma);
}

Here is the caller graph for this function:

real PLearn::gauss_log_density_var ( real  x,
real  mu,
real  var 
)

Definition at line 222 of file pl_erf.cc.

References Log2Pi, and pl_log.

Referenced by PLearn::GaussianProcessRegressor::computeCostsFromOutputs(), and log_of_normal_density().

{
    real dx=x-mu;
    return -0.5*(dx*dx/var + Log2Pi + pl_log(var));

}

Here is the caller graph for this function:

real PLearn::gaussian_01 ( )

returns a random number gaussian with mean 0 and standard deviation 1

Definition at line 300 of file random.cc.

References fast_exact_is_equal(), gset, iset, pl_log, sqrt(), the_seed, and uniform_sample().

Referenced by gaussian_mu_sigma(), PLearn::EntropyContrast::gen_normal_0_1(), multivariate_normal(), normal_sample(), and PLearn::HeapTest::perform().

{
    real fac,rsq,v1,v2;

    if(the_seed < 0) iset=0;
    if (iset == 0) {
        do {
            v1=2.0*uniform_sample()-1.0;
            v2=2.0*uniform_sample()-1.0;
            rsq=v1*v1+v2*v2;
        } while (rsq >= 1.0 || fast_exact_is_equal(rsq, 0.0));
        fac=sqrt(-2.0*pl_log(rsq)/rsq);
        gset=v1*fac;
        iset=1;
        return v2*fac;
    } else {
        iset=0;
        return gset;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::gaussian_mixture_mu_sigma ( Vec &  w,
const Vec &  mu,
const Vec &  sigma 
)

returns a random number with mixture of gaussians, "w" is the mixture (must be positive numbers summing to 1), "mu" and "sigma" are the vectors of means and standard deviations for each gaussian

Definition at line 341 of file random.cc.

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

{
    int    i;
    int    n = w.length();
    real *p_mu = mu.data();
    real *p_sigma = sigma.data();
    real *p_w = w.data();
    real  res = 0.0;

    for (i=0; i<n; i++, p_mu++, p_sigma++, p_w++)
        res += *p_w * gaussian_mu_sigma(*p_mu,*p_sigma);

    return res;
}

Here is the call graph for this function:

real PLearn::gaussian_mu_sigma ( real  mu,
real  sigma 
)

returns a random number gaussian with mean "mu" and standard dev "sigma"

Definition at line 328 of file random.cc.

References gaussian_01().

Referenced by fill_random_normal(), PLearn::DiagonalNormalSampleVariable::fprop(), gaussian_mixture_mu_sigma(), and PLearn::AdaBoost::train().

{
    return gaussian_01() * sigma + mu;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::GCV ( Mat  X,
Mat  Y,
real  weight_decay,
bool  X_is_transposed,
Mat *  W 
)

Compute the generalization error estimator called Generalized Cross-Validation (Craven & Wahba 1979), and the corresponding ridge regression weights in min ||Y - X*W'||^2 + weight_decay ||W||^2.

where Y is nxm, X is nxp, W is mxp. The GCV is obtained by performing and SVD of X = U D V' and using the formula from (Bates, Lindstrom, Wahba, Yandell 1986) [tech report at http://www.stat.wisc.edu/~wahba/ftp1/oldie/775r.pdf] (here for m=1): n ( ||Y||^2 - ||Z||^2 + sum_{j=1}^p z_j^2 (weight_decay / (d_j^2 + weight_decay))^2 ) GCV = ------------------------------------------------------------------------------------ ( n - p + sum_{j=1}^p (weight_decay / (d_j^2 + weight_decay)) )^2 where Z = U' Y, z_j is the j-th element of Z and d_j is the j-th singular value of X. This formula can be efficiently re-computed for different values of weight decay. For this purpose, pre-compute the SVD can call GCVfromSVD. Once a weight decay has been selected, the SVD can also be used (optionally) to obtain the minimizing weights: W = V inv(D^2 + weight_decay I) D Z

Definition at line 815 of file plapack.cc.

References PLearn::TMat< T >::column(), GCVfromSVD(), i, j, PLearn::TMat< T >::length(), m, min(), n, PLERROR, pownorm(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), sumsquare(), SVD(), PLearn::TMat< T >::toVec(), transpose(), transposeProduct(), and PLearn::TMat< T >::width().

Referenced by GCVfromSVD().

{
    int n = Y.length();
    int m = Y.width();
    int p, nx;
    if (X_is_transposed)
    { 
        nx=X.width();
        p=X.length();
    } else {
        nx=X.length();
        p=X.width();
    }
    if (nx!=n)
        PLERROR("GCV: incompatible arguments X and Y don't have same number of examples: %d and %d\n",nx,n);
    if (W && W->length()!=m)
        PLERROR("GCV: incompatible arguments W and Y don't have compatible dimensions: %d and %d\n",W->length(),m);
    if (W && W->width()!=p)
        PLERROR("GCV: incompatible arguments W and X don't have compatible dimensions: %d and %d\n",W->width(),p);
    static Mat Xcopy, U, Vt, Z;
    static Vec singular_values, eigen_values, squaredZ, s;
    Xcopy.resize(n,p);
    if (X_is_transposed)
        transpose(X, Xcopy);
    else
        Xcopy << X;
    int rank = min(n,p);
    U.resize(n,rank);
    Vt.resize(rank,p);
    singular_values.resize(rank);
    eigen_values.resize(rank);
    Z.resize(rank,1);
    squaredZ.resize(rank);
    s.resize(rank);
    Vec z=Z.toVec();
    
    SVD(Xcopy, U, singular_values, Vt, 'S');
    for (int i=0;i<rank;i++)
    {
        eigen_values[i] = singular_values[i]*singular_values[i];
        s[i] = weight_decay / (weight_decay + eigen_values[i]);
    }

    real sum_GCV=0;
    for (int j=0;j<m;j++)
    {
        Mat yj = Y.column(j);
        real y2 = sumsquare(yj);
        transposeProduct(U,yj,Z);
        real z2 = pownorm(z);
        sum_GCV += GCVfromSVD(n, y2-z2, z, s);
        if (W)
        {
            for (int i=0;i<rank;i++)
                z[i] *= s[i]*singular_values[i]/weight_decay;
            transposeProduct((*W)(j),Vt,z);
        }
    }
    return sum_GCV;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::GCVfromSVD ( real  n,
real  Y2minusZ2,
Vec  Z,
Vec  s 
)

Estimator of generalization error estimator called Generalized Cross-Validation (Craven & Wahba 1979), computed from the SVD of the input matrix X in the ridge regression.

See the comments for GCV. This function implements the formula: n ( ||Y||^2 - ||Z||^2 + sum_{j=1}^p z_j^2 (weight_decay / (d_j^2 + weight_decay))^2 ) GCV = ------------------------------------------------------------------------------------ ( n - p + sum_{j=1}^p (weight_decay / (d_j^2 + weight_decay)) )^2 where Z = U' Y, z_j is the j-th element of Z and d_j is the j-th singular value of X, with X = U D V' the SVD. The vector s with s_i = (weight_decay / (d_j^2 + weight_decay)) must also be pre-computed.

Definition at line 876 of file plapack.cc.

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

Referenced by GCV(), ridgeRegressionByGCV(), and weightedRidgeRegressionByGCV().

{
    int p = s.length();
    real numerator=Y2minusZ2, denominator=n-p;
    for (int i=0;i<p;i++)
    {
        real si_zi = s[i]*Z[i];
        numerator += si_zi*si_zi;
        denominator += s[i];
    }
    real GCV = n*numerator / (denominator*denominator);
    return GCV;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class MatT >
int PLearn::GDFindSmallEigenPairs ( MatT &  A,
Mat  X,
bool  diagonalize_in_the_end = true,
real  tolerance = 1e-6,
int  n_epochs = 0,
real  learning_rate = 0,
int  normalize_every = 0,
real  decrease_factor = 0,
bool  verbose = false 
)

Find small (ideally the smallest) eigen-pairs of a positive semi-definite generalized nxn matrix A, using stochastic gradient descent on the cost function (sum_i x_i'A x_i)/m with parameters X (whose rows are x_i). The algorithm looks for the m smallest-magnitude eigen-pairs of A (the longer you iterate, the smaller the magnitude). The function sets the results in the mxn matrix X, with in its rows an (optionally orthormal) basis for the resulting sub-space. If the optional argument diagonalize_in_the_end is set to true then the resulting vectors (rows of X) are orthonormalized and diagonalized in the last step (in increasing order of eigen-value), so the "best" eigenpairs are the first ones. The user controls the computational resources with either/or of the n_epochs (number of iterations through A, each costing mxN operations if the generalized matrix A has N non-zero elements) and tolerance. For the "default" value for n_epochs (0) the program chooses 1000+10*sqrt(n). The tolerance represents the tolerable value of the cost function to stop the iterations (when the x_i's are normalized). For the default value of the learning_rate (0), the maximum eigenvalue of A is computed. In that case tolerance represents a fraction: the actual error tolerance is set to tolerance * max_evalue. Otherwise the tolerance argument gives the actual value of the error tolerance. The other arguments are also optional and in general do not need to be set. The normalize_every argument specifies how often (every how many epochs) to renormalize the rows of X. The default value of 0 (i.e. never) works well in most cases. The learning rate is set by default to 2/largest_eigenvalue_of_A (when the default value of 0 is given). If the maximum eigen-value is known or a better value is known, the computation of that eigenvalue (through the PowerIteration method) can be skipped by providing a learning_rate > 0 (don't forget that it changes the semantic of the tolerance argument). The decrease_factor is the rate of decrease of the learning rate through the iterations, and the default value of 0 has been found to be generally optimal. The actual number of iterations taken is returned.

initialize learning rate using a power iteration

stochastic gradient descent step

cout << normalize_every << " " << normalize_every>0?:itnormalize_every:0 << endl;

< RESET LINEARLY DEPENDENT FEATURES RANDOMLY

debug

Definition at line 854 of file GenMat.h.

References d, diagonalizeSubspace(), dot(), endl(), fill_random_uniform(), GramSchmidtOrthogonalization(), i, PLearn::TMat< T >::length(), m, matRowDotVec(), n, norm(), pl_log, PowerIteration(), product(), and sqrt().

{
    int n=A.length();
    int m=X.length();
    if (n_epochs==0)
        n_epochs = 1000+10*int(sqrt(n));
    Vec Ax(n);
    real err_tolerance, sum_norms, actual_err;
    if (learning_rate==0)
    {
        fill_random_uniform(Ax,-1,1);
        Mat large_vectors(3,n);
        int offs;
        int n_iter = 10+int(sqrt(pl_log(double(n))));
        real max_eigen_value = 
            PowerIteration(A, Ax, n_iter,1e-3,large_vectors,offs,verbose);
        learning_rate = 2.0/max_eigen_value;
        if (verbose)
        {
            cout << "setting initial learning rate = 2/max_eigen_value = 2/" 
                 << max_eigen_value << " = " << learning_rate << endl;
        }
        err_tolerance = tolerance * max_eigen_value;
    }
    else err_tolerance = tolerance;
    real prev_err=1e30;
    int it=0;
    for (;it<n_epochs;it++)
    {
        real learning_rate = learning_rate / (1+it*decrease_factor);
        real err=0;
        for (int i=0;i<n;i++)
        {
            real* xi = &X(0,i);
            for (int d=0;d<m;d++, xi+=n)
            {
                real gradient = matRowDotVec(A, i,X(d));
                *xi -= learning_rate * gradient;
                err += gradient * *xi;
            }
        }
        if (verbose)
        {
            cout << "at iteration " << it << " of gradient descent, est. err.= " << err << endl;
            cout << "lrate = " << learning_rate << endl;
        }
        if (tolerance>0)
        {
            sum_norms = 0;
            for (int d=0;d<m;d++)
                sum_norms += norm(X(d));
            actual_err = err / (m*sum_norms);
            if (actual_err<err_tolerance) break;
        }
        if (err>prev_err)
            cout << "at iteration " << it << " of gradient descent, est. err.= " << err 
                 << " > previous error = " << prev_err << " ; lrate = " << learning_rate << endl;
        if (verbose)
            for (int d=0;d<m;d++)
                cout << "norm(x[" << d << "])=" << norm(X(d)) << endl;
        if (normalize_every!=0 && it%normalize_every==0)
        {
            int new_m=GramSchmidtOrthogonalization(X,1e-9);
            for (int e=new_m;e<m;e++)
                fill_random_uniform(X(e)); 
            if (verbose)
            {
                real C=0;
                for (int d=0;d<m;d++)
                {
                    Vec xd = X(d);
                    product(A, xd,Ax);
                    C += dot(xd,Ax);
                    cout << "for " << d << ", |Ax|/|x| = " << norm(Ax) << endl;
                }
                cout << "actual cost = " << 0.5*C << endl;
            }
        }
    }
    if (diagonalize_in_the_end)
    {
        Mat diagonalized_solutions(m,n);
        Mat subspace_evectors(m,m);
        Vec subspace_evalues(m);
        diagonalizeSubspace(A,X,Ax,diagonalized_solutions,subspace_evalues,subspace_evectors);
        X << diagonalized_solutions;
    }
    return it;
}

Here is the call graph for this function:

template<class num_t >
void PLearn::generalizedEigenVecOfSymmMat ( TMat< num_t > &  m1,
TMat< num_t > &  m2,
int  itype,
int  k,
TVec< num_t > &  eigen_values,
TMat< num_t > &  eigen_vectors 
)

Computes up to k largest eigen_values and corresponding eigen_vectors of a real generalized symmetric-definite eigenproblem, of the form m1*x=(lambda)*m2*x (itype = 1), m1*m2*x=(lambda)*x (itype = 2) or m2*m1*x=(lambda)*x (itype = 3) m1 and m2 are assumed to be symmetric and m2 is also positive definite.

Parameters eigen_values and eigen_vectors are resized accordingly and filled by the call. The eigenvalues are returned in decreasing order (largest first). The corresponding eigenvectors are in the *ROWS* of eigen_vectors WARNING: m1 and m2 are destroyed during the operation.

Definition at line 404 of file plapack.h.

References lapackGeneralizedEIGEN(), PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), PLearn::TVec< T >::swap(), PLearn::TMat< T >::swapUpsideDown(), and PLearn::TMat< T >::width().

Referenced by PLearn::LLC::train().

{
    if(m1.length() != m2.length() || m1.width() != m2.width())
        PLERROR("In generalizedEigenVecOfSymmMat, m1 and m2 must have the same size"); 

    eigen_vectors.resize(k,m1.width());
    eigen_values.resize(k);
    // FASTER
    if(k>= m1.width())
        lapackGeneralizedEIGEN(m1, m2, itype, eigen_values, eigen_vectors, 'A',num_t(0),num_t(0));
    else
        lapackGeneralizedEIGEN(m1, m2, itype, eigen_values, eigen_vectors, 'I', num_t(m1.width()-k), num_t(m1.width()-1));

    // put largest (rather than smallest) first!
    eigen_values.swap();
    eigen_vectors.swapUpsideDown();
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::geometric_mean ( const TVec< T > &  vec)

Definition at line 578 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), exp(), i, PLearn::TVec< T >::length(), MISSING_VALUE, PLERROR, and PLearn::TVec< T >::size().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T geometric_mean(const TVec<T>& vec) vec has zero length");
#endif
    if (vec.size() == 0)
        return MISSING_VALUE;
    double res = 0.0;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
    {
        T vi = v[i];
        if (vi<=0)
            PLERROR("geometric_mean(TVec<T>): argument %g <=0 at position [%d]",
                    vi,i);
        res += v[i];
    }
    return T(exp(res/vec.length()));
}

Here is the call graph for this function:

template<class T >
T PLearn::geometric_mean ( const TMat< T > &  mat)

Definition at line 5004 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), exp(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), pl_log, PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T geometric_mean(const TMat<T>& mat) mat has 0 size");
#endif
    double res = 0.0;
    T* m_i = mat.data();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
        {
            T mij = m_i[j];
            if (mij<=0)
                PLERROR("geometric_mean(TMat<T>): argument %g <=0 at position (%d,%d)",
                        mij,i,j);
            res += pl_log(m_i[j]);
        }
    return T(exp(res/(mat.length()*mat.width())));
}

Here is the call graph for this function:

real PLearn::get_absolute_tolerance ( PLearnDiff *  diffs)

Return the absolute tolerance of a PLearnDiff.

Definition at line 150 of file PLearnDiff.cc.

References PLearn::PLearnDiff::absolute_tolerance, and PLASSERT.

Referenced by diff().

{
    PLASSERT( diffs );
    return diffs->absolute_tolerance;
}

Here is the caller graph for this function:

string PLearn::get_error_message ( const char *  type,
const char *  expr,
const char *  function,
const char *  file,
unsigned  line,
const string &  message 
)

Return a typical error message.

Definition at line 199 of file plerror.cc.

References strlen().

Referenced by pl_assert_fail(), and pl_check_fail().

{
    // Allocate buffer.
    size_t size = strlen(type) + strlen(expr) + strlen(function) + strlen(file)
                    + message.size() + 150;
    char* msg = new char[size];
    // Format string.
    snprintf(msg, size, 
            "%s failed: %s\n"
            "Function: %s\n"
            "    File: %s\n"
            "    Line: %u"
            "%s%s",
            type, expr, function, file, line,
            (!message.empty()? "\n Message: " : ""),
            message.c_str());
    // Return as an STL string.
    string result(msg);
    delete[] msg;
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::get_input ( VMat  source,
int  inputsize,
int  targetsize,
int  weightsize = 0 
) [inline]

Definition at line 117 of file GetInputVMatrix.h.

References PLearn::GetInputVMatrix::build(), and PLearn::VMatrix::defineSizes().

Referenced by PLearn::MultiTaskSeparationSplitter::getSplit().

  {
    GetInputVMatrix* ret = new GetInputVMatrix(source);
    ret->defineSizes(inputsize,targetsize,weightsize);
    ret->build();
    return ret;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::get_option ( const vector< string > &  command_line,
const string &  option,
const string &  default_value 
)

The command_line is made of pairs of the form option value Look for an option in the command_line, and return the corresponding value if it is found, or return default_value otherwise. Note: this may be useful with command_line = stringvector(argc,argv);

Definition at line 666 of file stringutils.cc.

References i, and n.

{
    vector<string>::size_type n = command_line.size();
    for (unsigned int i=0;i<n;i++)
        if (command_line[i]==option && i+1<n) return command_line[i+1];
    return default_value;
}
PStream & PLearn::get_perr ( )

Definition at line 121 of file PStream.cc.

References perr, PLearn::PStream::raw_ascii, PLearn::PStream::setBufferCapacities(), and PLearn::PStream::setMode().

Referenced by PLearn::PL_Log::instance().

{
    static bool initialized = false;
    static PStream perr = new PrPStreamBuf(0,
                                           PR_GetSpecialFD(PR_StandardError));
    if(!initialized)
    {
        perr.setMode(PStream::raw_ascii); // raw_ascii default mode
        initialized = true;
        perr.setBufferCapacities(0,0,0);  // perr is unbuffered by default
    }
    return perr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PStream & PLearn::get_pin ( )

PStream objects to replace the standard cout, cin, ...

Definition at line 75 of file PStream.cc.

References pin, PLearn::PStream::raw_ascii, and PLearn::PStream::setMode().

{
    static bool initialized = false;
    static PStream pin = new
        PrPStreamBuf(PR_GetSpecialFD(PR_StandardInput),0);
    if(!initialized)
    {
        pin.setMode(PStream::raw_ascii); // raw_ascii default mode
        initialized = true;
    }
    return pin;
}

Here is the call graph for this function:

PStream & PLearn::get_pio ( )

Definition at line 105 of file PStream.cc.

References pio, PLearn::PStream::raw_ascii, and PLearn::PStream::setMode().

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

{
    static bool initialized = false;
    static PStream pio = new
        PrPStreamBuf(PR_GetSpecialFD(PR_StandardInput),
                     PR_GetSpecialFD(PR_StandardOutput));
    if(!initialized)
    {
        pio.setMode(PStream::raw_ascii); // raw_ascii default mode
        initialized = true;
    }
    return pio;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PStream & PLearn::get_pnull ( )

Definition at line 67 of file PStream.cc.

References pnull.

{
    static PStream pnull = new NullPStreamBuf();
    return pnull;
}
template<class T >
T* PLearn::get_pointer ( PP< T > const &  p)
PStream & PLearn::get_pout ( )

Definition at line 90 of file PStream.cc.

References pout, PLearn::PStream::raw_ascii, and PLearn::PStream::setMode().

{
    static bool initialized = false;
    static PStream pout = new PrPStreamBuf(0,
                                           PR_GetSpecialFD(PR_StandardOutput));
    if(!initialized)
    {
        pout.setMode(PStream::raw_ascii); // raw_ascii default mode
        initialized = true;
    }
    return pout;
}

Here is the call graph for this function:

real PLearn::get_relative_tolerance ( PLearnDiff *  diffs)

Return the relative tolerance of a PLearnDiff.

Definition at line 159 of file PLearnDiff.cc.

References PLASSERT, and PLearn::PLearnDiff::relative_tolerance.

Referenced by diff().

{
    PLASSERT( diffs );
    return diffs->relative_tolerance;
}

Here is the caller graph for this function:

int32_t PLearn::get_seed ( )

returns the current seed used by the random number generator

Definition at line 195 of file random.cc.

References seed(), and the_seed.

{
    int32_t seed = the_seed;
    return seed;
}

Here is the call graph for this function:

int PLearn::getAfterSkipBlanks ( PStream &  in) [inline]

Gets the first char after removal of blanks.

Definition at line 178 of file fileutils.h.

References c, and PLearn::PStream::get().

                                           {
    int c;
    do {
        c = in.get();
    } while (c != EOF && isspace(c));
    return c;
}

Here is the call graph for this function:

int PLearn::getAfterSkipBlanksAndComments ( PStream &  in) [inline]

Gets the first char after removal of blanks and comments.

Definition at line 187 of file fileutils.h.

References PLearn::PStream::get(), and skipBlanksAndComments().

Referenced by readAndMacroProcess().

{ skipBlanksAndComments(in); return in.get(); }

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::getDataSet ( const PPath &  dataset_path)

Return the dataset pointed by 'dataset_path'.

Definition at line 72 of file getDataSet.cc.

References PLearn::PPath::basename(), DBG_LOG, PLearn::PPath::dirname(), endl(), PLearn::PPath::extension(), PLearn::VMatrixExtensionRegistrar::getInstantiator(), isdir(), isfile(), PLearn::PP< T >::isNull(), loadAsciiAsVMat(), loadAsciiSingleBinaryDescriptor(), newObject(), parseBaseAndParameters(), PLDEPRECATED, PLERROR, PLWARNING, PLearn::PyPLearnScript::process(), readFileAndMacroProcess(), removeblanks(), and PLearn::VMat::width().

Referenced by accumInStatsCol(), PLearn::LearnerCommand::analyze_inputs(), PLearn::SplitWiseValidationVMatrix::build_(), PLearn::AutoVMatrix::build_(), PLearn::LearnerCommand::compute_outputs(), PLearn::LearnerCommand::compute_outputs_on_auto_grid(), PLearn::VVMatrix::createPreproVMat(), cross_valid(), getDataSetDate(), PLearn::DBSplitter::getSplit(), getVMat(), plotVMats(), PLearn::LearnerCommand::process_dataset(), PLearn::VVMatrix::processJoinSection(), PLearn::MoleculeTemplate::readFromAMATFile(), PLearn::Molecule::readFromAMATFile(), PLearn::Molecule::readMolecule(), PLearn::VMatViewCommand::run(), PLearn::VMatDictionaryCommand::run(), PLearn::VMatCommand::run(), PLearn::TestDependencyCommand::run(), PLearn::TestDependenciesCommand::run(), PLearn::OutputFeaturesCommand::run(), PLearn::KolmogorovSmirnovCommand::run(), PLearn::FillFeatureSetCommand::run(), PLearn::FieldConvertCommand::run(), set_global_calendars(), PLearn::LearnerCommand::test(), PLearn::LearnerCommand::train(), train_and_test(), use(), and viewVMat().

{
    VMat vm;
    // Parse the base file name and the potential parameters.
    string dataset_abs;
    map<string, string> params;
    if (isfile(dataset_path))
        dataset_abs = dataset_path;
    else
        // There may be parameters that need parsing.
        parseBaseAndParameters(dataset_path, dataset_abs, params);
    PPath dataset(dataset_abs);
    bool use_params = false;

    // See getDataSetHelp() for supported formats.
    string ext = dataset.extension();
    if (isfile(dataset)) {
        if (ext == "amat") {
            // Check if the extension is ".bin.amat".
            // (old deprecated extension)
            if (dataset.find(".bin.", ((string::size_type) dataset.size()) - 9) != string::npos) {
                PLERROR("In getDataSet - The '.bin.amat' extension is deprecated, you "
                        "must now use the .abmat extension");
            } else
                vm = loadAsciiAsVMat(dataset);
        } else if (ext == "abmat") {
            Mat tempMat;
            loadAsciiSingleBinaryDescriptor(dataset, tempMat);
            vm = VMat(tempMat);
            vm->updateMtime(dataset);
        } else if (ext == "pmat") {
            vm = new FileVMatrix(dataset);
        } 
        // else if (ext == "txtmat") {
        //    PLERROR("In getDataSet - The old .txtmat files are deprecated, please "
        //            "use a standard .vmat or .pymat script"); } 
        else if (ext == "vmat" || ext == "txtmat") {
            use_params = true;
            time_t date = 0;
            const string code = readFileAndMacroProcess(dataset, params, date);

            if (removeblanks(code)[0] == '<') {
                // Old XML-like format.
                PLDEPRECATED("In getDataSet - File %s is using the old XML-like VMat format, " 
                             "you should switch to a PLearn script (ideally a .pymat file).",
                             dataset.c_str());
                vm = new VVMatrix(dataset);
            } else {
                vm = dynamic_cast<VMatrix*>(newObject(code));
                if (vm.isNull())
                    PLERROR("In getDataSet - Object described in %s is not a VMatrix subclass",
                            dataset.c_str());
            }
            vm->updateMtime(date);
        } else if (ext == "pymat" || ext == "py") {
            use_params = true;
            if (ext == "py")
                PLWARNING("In getDataSet - Note that the Python code in a '.py' file must return a pl.VMatrix");
            // Convert 'params' to a vector<string> with elements "paramX=valueX".
            map<string, string>::const_iterator it = params.begin();
            vector<string> params_vec;
            for (; it != params.end(); it++)
                params_vec.push_back(it->first + "=" + it->second);
            PP<PyPLearnScript> pyplearn_script = PyPLearnScript::process(dataset, params_vec);
            const string code = pyplearn_script->getScript();
            vm = dynamic_cast<VMatrix*>(newObject(code));
            if (vm.isNull())
                PLERROR("In getDataSet - Object described in %s is not a VMatrix subclass",
                        dataset.c_str());
            //Their is two case:
            //1) params.size()>0, The mtime should be now
            //2) params.size()==0 the mtime should be the file mtime
            //     But as we can't trust the file mtime as it can
            //     have dependency in it that we don't look,
            //     we set it to 0 to be safe.
            if(params.size()==0)
                vm->updateMtime(0);
            else{
    // The NSPR PRTime is number of microseconds since the epoch, while
    // time_t is the number of seconds since the (same) epoch.
    // Translate from the former to the later by dividing by 1e6, using
    // NSPR long long manipulation macros to be extra safe.
                PRInt64 time_t_compatible_value;
                PRInt64 one_million = LL_INIT(0, 1000000);
                LL_DIV(time_t_compatible_value, PR_Now(), one_million);
                vm->updateMtime((time_t)time_t_compatible_value);

            }
        } else if (VMatrixExtensionRegistrar::VMatrixInstantiator inst =
                   VMatrixExtensionRegistrar::getInstantiator(ext))
        {
            // Support user-added extensions
            vm = inst(dataset);
            vm->updateMtime(0);
        }
        else 
            PLERROR("In getDataSet - Unknown extension for VMat file: %s", ext.c_str());
        if (!use_params && !params.empty())
            PLWARNING("In getDataSet - Ignoring parameters when reading file %s",
                      dataset.c_str());
        // Set default metadata directory if not already set.
        if (!vm->hasMetaDataDir())
            vm->setMetaDataDir(dataset.dirname() / (dataset.basename() + ".metadata"));
    }
    else if (isdir(dataset)) {
        if (ext == "dmat")
            vm = new DiskVMatrix(dataset);
        else
            PLERROR("In getDataSet - Unknown extension for VMat directory: %s", ext.c_str());
    }
    else
        PLERROR("In getDataSet - cannot open dataset \"%s\"", dataset.c_str());
  
    vm->loadAllStringMappings();
    vm->unduplicateFieldNames();

    // if (vm->inputsize() < 0 && vm->targetsize() < 0 && vm->weightsize() < 0 && vm->extrasize()<=0) 
    if (vm->inputsize() < 0 && vm->targetsize() < 0 && vm->weightsize() < 0) 
    {
        DBG_LOG << "In getDataSet - The loaded VMat has no inputsize, targetsize "
                << "or weightsize specified, setting them to (" << vm->width() << ",0,0)"
                << endl;
        vm->defineSizes(vm->width(), 0, 0);
    }

    // Set inputsize if it can be deduced from other sizes.
    if (vm->inputsize() < 0 && vm->width() >= 0 && vm->targetsize() >= 0 &&
            vm->weightsize() >= 0 && vm->extrasize() >= 0)
    {
        int is = vm->width() - vm->targetsize() - vm->weightsize() -
            vm->extrasize();
        if (is >= 0)
            vm->defineSizes(is, vm->targetsize(), vm->weightsize(),
                    vm->extrasize());
    }

    // Ensure sizes do not conflict with width.
    if (vm->inputsize() >= 0 && vm->targetsize() >= 0 && vm->weightsize() >= 0 &&
        vm->width() >= 0 &&  vm->width() < vm->inputsize() + vm->targetsize() + vm->weightsize())
        PLERROR("In getDataSet - The matrix width (%d) should not be smaller than inputsize (%d) "
                "+ targetsize (%d) + weightsize (%d)",
                vm->width(), vm->inputsize(), vm->targetsize(), vm->weightsize());

    return vm;
}

Here is the call graph for this function:

Here is the caller graph for this function:

time_t PLearn::getDataSetDate ( const PPath &  dataset_path)

Return the last time a dataset was modified.

Definition at line 64 of file getDataSet.cc.

References getDataSet().

Referenced by PLearn::VVMatrix::getDateOfVMat(), PLearn::VMatLanguage::preprocess(), PLearn::VMatLanguage::staticPreprocess(), and vmatmain().

{
    return getDataSet(dataset_path)->getMtime();
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::getDataSetHelp ( )

Return help on the dataset syntax.

Definition at line 221 of file getDataSet.cc.

References max(), and PLearn::VMatrixExtensionRegistrar::registeredExtensions().

Referenced by PLearn::AutoVMatrix::declareOptions(), PLearn::HelpCommand::helpDatasets(), old_plearn_main(), and vmatmain().

                        {

    // First make a list of all registered extensions
    string exts;
    for (VMatrixExtensionRegistrar::ExtensionMap::const_iterator
             it  = VMatrixExtensionRegistrar::registeredExtensions().begin(),
             end = VMatrixExtensionRegistrar::registeredExtensions().end()
             ; it != end ; ++it)
    {
        exts += "  ." + it->first +
            string(max(0, 7-int(it->first.size())), ' ') + ": " +
            it->second.documentation() + '\n';
    }
    
    return string(
        "Dataset specification must be either:\n"
        "- a file with extension:\n"
        "  .amat   : ASCII VMatrix\n"
        "  .abmat  : ASCII binary (0/1) VMatrix\n"
        "  .pmat   : PLearn file VMatrix\n"
        "  .vmat   : PLearn script\n"
        "  .pymat  : Python script\n")
        + exts + string(
        "- a directory with extension:\n"
        "  .dmat   : Disk VMatrix\n"
        "\n"
        "Optionally, arguments for scripts can be given with the following syntax:\n"
        "  path/file.ext::arg1=val1::arg2=val2::arg3=val3\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

time_t PLearn::getDateOfCode ( const string &  codefile)

Definition at line 205 of file VMatLanguage.cc.

References in, mtime(), and PLERROR.

Referenced by PLearn::VVMatrix::getDateOfVMat().

{
    time_t latest = mtime(codefile);
    string token;
    ifstream in(codefile.c_str());
    if(in.bad())
        PLERROR("Cannot open file : %s",codefile.c_str());

    in >> token;
    while(!in.eof())
    {
        if(token=="INCLUDE")
        {
            in >> token;
            time_t t=getDateOfCode(token);
            if(t>latest)
                latest=t;
        }
        in >> token;
    }
    return latest;
}

Here is the call graph for this function:

Here is the caller graph for this function:

RemoteMethodMap & PLearn::getGlobalFunctionMap ( )

This function returns the map in which all remote functions and static methods are to be registered (with declareFunction).

Definition at line 44 of file RemoteDeclareMethod.cc.

References m.

Referenced by callFunction(), declareFunction(), PLearn::HelpSystem::helpOnFunction(), PLearn::HelpSystem::helpOnFunctionHTML(), injectPLearnGlobalFunctions(), PLearn::HelpSystem::listFunctionPrototypes(), and PLearn::HelpSystem::listFunctions().

{
    static RemoteMethodMap m;
    return m;
}

Here is the caller graph for this function:

bool PLearn::getList ( char *  str,
int  curj,
const VMat &  vm,
Vec &  outList,
char *  strReason 
)

Definition at line 72 of file viewVMat.cc.

References PLearn::TVec< T >::clear(), pl_isnumber(), PLearn::TVec< T >::push_back(), split(), toint(), and PLearn::VMat::width().

Referenced by viewVMat().

{
    vector<string>columnList;
    if (str[0] == '\0')
    {
        // nothing was inserted, then gets the current column
        char strj[10];
        sprintf(strj, "%d", curj);
        columnList.push_back(strj);
    }
    else
    {
        columnList = split(str, " -,", true);
    }

    vector<string>::iterator vsIt;

    // checks for errors
    bool invalidInput = false;
    int colVal = 0;
    char separator = 0;

    for (vsIt = columnList.begin(); vsIt != columnList.end(); vsIt++)
    {
        if (pl_isnumber(*vsIt))
        {
            if (colVal > toint(*vsIt) && separator == '-')
            {
                invalidInput = true;
                strcpy(strReason,
                       "Second element in range smaller than the first");
                break;
            }
            colVal = toint(*vsIt);
            if (colVal < 0 || colVal >= vm->width())
            {
                invalidInput = true;
                strcpy(strReason, "Invalid column number");
                break;
            }
        }
        else
        {
            // there was already a separator!
            if (separator == '-')
            {
                invalidInput = true;
                strcpy(strReason, "Too many '-' separators");
                break;
            }

            separator = (*vsIt)[0];
            if (separator != '-' &&
                separator != ',')
            {
                invalidInput = true;
                strcpy(strReason, "Invalid column separator");
                break;
            }
        }
    }

    outList.clear();
    if (separator == '-')
    {
        int start = toint(columnList.front());
        int end = toint(columnList.back());
        for (int colIdx = start; colIdx <= end; ++colIdx)
            outList.push_back(colIdx);
    }
    else if (separator == ',')
    {
        for (vsIt = columnList.begin(); vsIt != columnList.end(); ++vsIt)
        {
            if (pl_isnumber(*vsIt))
                outList.push_back(toint(*vsIt));
        }
    }
    else if (separator == 0)
    {
        outList.push_back(toint(columnList.front()));
    }

    return invalidInput;
}

Here is the call graph for this function:

Here is the caller graph for this function:

map< string, string > PLearn::getModelAliases ( const string &  filename)

reads a modelalias -> object_representation map from a model.aliases file

Definition at line 72 of file old_plearn_main.cc.

References i, in, n, PLERROR, remove_comments(), removeblanks(), and ws().

Referenced by cross_valid(), getMultipleModelAliases(), and train_and_test().

{
    map<string, string> aliases;
    ifstream in(filename.c_str());
    if(!in)
        PLERROR("In getModelAliases: could not open file %s", filename.c_str());
    while(in)
    {
        string alias;
        getline(in,alias,'=');
        alias = removeblanks(alias);
        if(alias.length()==0) // read all aliases already
            break; 
        if(alias.find_first_of(" \t\n\r")!=string::npos)
            PLERROR("In getModelAliases: problem, expecting a single word alias followed by an equal (=) sign; read %s",alias.c_str());

        in >> ws;//skipBlanks(in);
        string definition;
        smartReadUntilNext(in, ";", definition);
        remove_comments(definition);
        aliases.insert(make_pair(alias,removeblanks(definition)));
    }  
  
    //  cerr << "Aliases:\n";
    // ::write(cerr,aliases);
    // cerr << endl;
  
    //preprocess references to local aliases
    // e.g.:
    // nn= NeuralNet(...);
    // xx= MultiLearner(learner0= $nn; ...);
    for(map<string, string>::iterator it= aliases.begin(); it != aliases.end(); ++it)
    {
        unsigned int pos= 0;
        while(string::npos != (pos= it->second.find('$', pos)))
        {
            const string delimiters= ";]";
            unsigned int n= string::npos;
            for(unsigned int i= 0; i < delimiters.length(); ++i)
            {
                unsigned int n0= it->second.find(delimiters[i], pos);
                if(n0 < n)
                    n= n0;
            }
            n-= pos;
            string alias= removeblanks(it->second.substr(pos+1, n-1));
            if(aliases.find(alias) == aliases.end())
                PLERROR("In getModelAliases: alias %s is referenced but not defined.", alias.c_str());
            it->second.replace(pos, n, aliases[alias]);
        }
    }

    return aliases;
}

Here is the call graph for this function:

Here is the caller graph for this function:

vector< string > PLearn::getMultipleModelAliases ( const string &  model)

Definition at line 260 of file old_plearn_main.cc.

References exitmsg(), getModelAliases(), and isfile().

Referenced by old_plearn_main().

{
    vector<string> result;
    if(model[model.length()-1]!='*')
    {
        result.push_back(model);
        return result;
    }
    string modelprefix=model.substr(0,model.length()-1);
    if(!isfile("model.aliases"))
        exitmsg("Problem: No model.aliases file in current directory");
    map<string, string> model_aliases = getModelAliases("model.aliases");
    for(map<string,string>::iterator it=model_aliases.begin();it!=model_aliases.end();it++)
        if(modelprefix=="" || it->first.find(modelprefix)==0)
            result.push_back(it->first);
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::getNearestVertex ( const Vec &  test_pt,
const SurfMesh &  mesh2,
const GenericNN &  btl,
int closest_vertex,
Vec &  closest_pt,
real closest_dist 
)

Definition at line 772 of file geometry.cc.

References PLearn::TVec< T >::size(), and PLearn::TVec< T >::subVec().

Referenced by isOverlapping(), and PLearn::ICP::iterate().

{
  // find closest vertex on mesh2
  Vec dists;
  Vec outputs;
  btl-> computeOutputAndCosts( test_pt, Vec(), outputs, dists );

  int dimension = outputs.size()-1;
  closest_pt << outputs.subVec( 0, dimension );
  closest_vertex = (int) outputs[dimension];
  closest_dist = dists[0];
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::getNextNonBlankLine ( PStream &  in,
string &  line 
)

Fills 'line' with the next non blank line (#-style comments are considered blank, and automatically stripped out of 'line').

Definition at line 476 of file fileutils.cc.

References c, PLearn::PStream::getline(), PLearn::PStream::good(), and i.

Referenced by PLearn::ConditionalDictionary::build_(), PLearn::AsciiVMatrix::build_(), and parseSizeFromRemainingLines().

{
    while (in.good()) {
        in.getline(line);
        size_t l = line.size();
        bool ok = false;
        size_t i = 0;
        while (i < l) {
            char& c = line[i];
            if (!isspace(c)) {
                if (c == '#') {
                    if (!ok)
                        // The first non-blank character is a comment.
                        break;
                    else {
                        // We get rid of the comments.
                        line.resize(i);
                        return;
                    }
                } else {
                    // We got a non-blank, non-comment character.
                    ok = true;
                    i++;
                }
            } else
                // Read a blank character.
                i++;
        }
        if (ok)
            // We read a non-blank line with no comment.
            return;
    }
    // Could not find a non-blank line.
    line = "";
}

Here is the call graph for this function:

Here is the caller graph for this function:

vector< string > PLearn::getNonBlankLines ( const string &  in)

Returns a vector of string containing only non-empty lines, as you guessed it.

Definition at line 683 of file stringutils.cc.

References i, isBlank(), and split().

Referenced by PLearn::VVMatrix::buildFilteredVMatFromVPL(), PLearn::VVMatrix::extractSourceMatrix(), PLearn::TextFilesVMatrix::loadMappings(), and PLearn::FieldConvertCommand::run().

{
    vector<string> lines;
    vector<string> nblines;

    char sep[3]={10,13,0};
    lines= split(in,sep);
    for(size_t i=0;i<lines.size();i++)
        if(!isBlank(lines[i]))
            nblines.push_back(lines[i]);
    return nblines;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::getNormFromEigVecs ( const Vec &  ev,
const Mat &  e,
Vec &  norm 
)

Definition at line 645 of file geometry.cc.

Referenced by calcPlaneParams().

{
  int sm_ev;
  if( fabs(ev[0]) <= fabs(ev[1]) )
  {
    if( fabs(ev[0]) <= fabs(ev[2]) )
    { sm_ev = 0; }
    else
    { sm_ev = 2; }
  }
  else
  {
    if( fabs(ev[1]) <= fabs(ev[2]) )
    { sm_ev = 1; }
    else
    { sm_ev = 2; }
  }

  /* set normal */
  if( e(2, sm_ev) >= 0 )
  {
    norm[0] = e(0, sm_ev);
    norm[1] = e(1, sm_ev);
    norm[2] = e(2, sm_ev);
  }
  else
  {
    norm[0] = -e(0, sm_ev);
    norm[1] = -e(1, sm_ev);
    norm[2] = -e(2, sm_ev);
  }

  return sm_ev;
}

Here is the caller graph for this function:

int PLearn::getPid ( )

Return the processus id.

Definition at line 67 of file procinfo.cc.

Referenced by PLearn::VMatrix::lockMetaDataDir().

{
#if _POSIX_VERSION >= 200112L
#include <unistd.h>
    return getpid();
#else
    return -999;
#endif
}

Here is the caller graph for this function:

std::string PLearn::getPrErrorString ( )

Utility function that returns a std::string describing the last NSPR error.

Definition at line 53 of file PrUtils.cc.

Referenced by filesize64(), PLearn::Popen::launch(), lsdir(), openSocket(), PLearn::PrPStreamBuf::read_(), PLearn::ServerCommand::run(), PLearn::Popen::wait(), and PLearn::Poll::waitForEvents().

{
    // We hardcode the language to English because PR_ErrorToString()
    // is defined as returning a UTF-8 string. If we restrict ourselves
    // to ASCII, UTF-8 is the same as ASCII, so by asking for English
    // messages (which will not use accented letters, etc.) we don't
    // need to convert the UTF-8 to Latin-1 or something before displaying it.
    return PR_ErrorToString(PR_GetError(), PR_LANGUAGE_EN);
} 

Here is the caller graph for this function:

size_t PLearn::getProcessDataMemory ( )

Return the total data memory used by the current process in bytes.

Definition at line 42 of file procinfo.cc.

References pgetline(), PLERROR, split(), toint(), and tostring().

Referenced by PLearn::InstanceSnippetTest::perform(), PLearn::PrecomputedProcessedLearner::processDataSet(), PLearn::Storage< PP< RegressionTreeNode > >::resize(), and PLearn::Storage< PP< RegressionTreeNode > >::resizeMat().

{
    pid_t pid = getpid();
    size_t memory_size=0;
    string file = "/proc/"+tostring(pid)+"/status";
    ifstream ifs(file.c_str());
    while (ifs) {
        string line = pgetline(ifs);
        if (line.substr(0,7) == "VmData:") {
            vector<string> elements = split(line);
            memory_size = size_t(toint(elements[1]));
            if (elements[2] == "kB")
                memory_size *= 1024;
            else
                PLERROR("getProcessDataMemory: unknown memory units '%s'",
                        elements[2].c_str());
            break;
        }
    }
    return memory_size;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::getQuantiles ( const TVec< T > &  vec,
int  q 
)

returns a vector of length q+1 that contains the q quantiles of the sorted vector v and the last value corresponds to the last value of the vector vec.

Definition at line 2545 of file TMat_maths_impl.h.

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

{
    int l = vec.length();
    T* v = vec.data();
    TVec<T> w(q+1);
    T linvq = T(l)/q;
    for(int i=0;i<q;i++) w[i] = v[int(linvq*i)];
    w[q]=v[l-1];
    return w;
}

Here is the call graph for this function:

string PLearn::getSynsetKey ( SynsetPtr  ssp)

Returns a synset key from a SynsetPtr.

Definition at line 61 of file WordNetSenseDictionary.cc.

References i, PLERROR, and tostring().

Referenced by extractAncestors(), extractSenses(), and PLearn::WordNetSenseDictionary::getId().

{
    if(!ssp) PLERROR("In getSynsetKey(): SynsetPtr is NULL");
    string ssk = tostring(ssp->words[0]);
    for(int i=1; i<ssp->wcount && i<3; i++)
        ssk = ssk + "," + tostring(ssp->words[i]);
    ssk = ssk + ":" + tostring(ssp->pos) + "#" + tostring(ssp->hereiam);
    return ssk;
}

Here is the call graph for this function:

Here is the caller graph for this function:

SynsetPtr PLearn::getSynsetPtr ( string  synset_key)

Returns a SynsetPtr from a synset key.

Definition at line 72 of file WordNetSenseDictionary.cc.

References cstr(), split(), tolong(), and tostring().

{
    vector<string> splits = split(synset_key,",:#");
    char* srch_str = cstr(splits[0]);
    string pos = tostring(splits[splits.size()-2]);
    int pos_int = getpos(&pos[0]);
    long hereiam = tolong(splits[splits.size()-1]);
    SynsetPtr ret = read_synset(pos_int,hereiam,srch_str);
    delete(srch_str);
    return ret;
}

Here is the call graph for this function:

size_t PLearn::getSystemTotalMemory ( )

Return the total memory installed in the system in bytes.

Definition at line 27 of file procinfo.cc.

References PLERROR.

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

{
    unsigned int memory_size_uint = 0;
    char units[1000];
    FILE* p=popen("grep MemTotal /proc/meminfo","r");
    fscanf(p,"%*s %u %s", &memory_size_uint, units);
    size_t memory_size = size_t(memory_size_uint);
    if (strcmp(units,"kB")==0)
        memory_size*=1024;
    else 
        PLERROR("getSystemTotalMemory: unknown memory units %s",units);
    pclose(p);
    return memory_size;
}

Here is the caller graph for this function:

string PLearn::getUser ( )

Definition at line 80 of file procinfo.cc.

References tostring().

Referenced by PLearn::VMatrix::lockMetaDataDir().

{
    const char* h = PR_GetEnv("USER");
    if (!h)
        h = PR_GetEnv("LOGNAME");
    if (!h)
        return "USERNAME_NOT_FOUND";
    return tostring(h);
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::getVMat ( const PPath &  source,
const PPath &  indexf 
)

Definition at line 605 of file vmatmain.cc.

References getDataSet().

Referenced by vmatmain().

{
    VMat vm= getDataSet(source);
    if(indexf != "")
        vm= new SelectRowsFileIndexVMatrix(vm, indexf);
    return vm;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::getVMatAsPtr ( )

Definition at line 1111 of file PythonObjectWrapper.cc.

References PLearn::PythonObjectWrapper::VMatAsPtr.

{
    return PythonObjectWrapper::VMatAsPtr;
}
static string PLearn::global_options ( vector< string > &  command_line) [static]

Definition at line 171 of file plearn_main.cc.

References c, PLearn::PLearnService::connectToServers(), PLearn::PL_Log::enableNamedLogging(), endl(), findpos(), PLearn::PLearnService::instance(), PLearn::PL_Log::instance(), is_command(), join(), output_version(), perr, PLearn::Profiler::pl_profile_activate(), PLERROR, pout, set_global_calendars(), PLearn::ProgressBar::setPlugin(), split(), tostring(), PLearn::PL_Log::verbosity(), VLEVEL_NORMAL, PLearn::PL_Log::vlevelFromString(), and PLearn::PStream::windows_endl.

Referenced by plearn_main().

{
    int argc                 = int(command_line.size());

    // Note that the findpos function (stringutils.h) returns -1 if the
    // option is not found.
    int profile_pos       = findpos( command_line, "--profile" );
    int profile_wall_pos       = findpos( command_line, "--profile-wall" );
    if(profile_pos != -1 || profile_wall_pos != -1)
        Profiler::pl_profile_activate();
    // Note that the findpos function (stringutils.h) returns -1 if the
    // option is not found.
    int no_version_pos       = findpos( command_line, "--no-version" );

    // If we don't want no progress bars
    int no_progress_bars     = findpos( command_line, "--no-progress" );

    int windows_endl         = findpos( command_line, "--windows_endl" );
    
    // Note that the verbosity_value_pos IS NOT EQUAL TO verbosity_pos+1 if
    // (verbosity_pos == -1)!!!
    int verbosity_pos                = findpos( command_line, "--verbosity"  );
    int verbosity_value_pos          = -1; // ... 
    int quiet_pos                   = findpos( command_line, "--quiet" );
    VerbosityLevel verbosity_value   = VLEVEL_NORMAL;

    if ( verbosity_pos != -1 )
    {
        // ... here we can set verbosity_value_pos:
        verbosity_value_pos = verbosity_pos+1;
        if ( verbosity_value_pos >= argc )
            PLERROR("Option --verbosity must be followed by a VerbosityLevel name "
                    "or by an integer value.");
        verbosity_value =
            PL_Log::vlevelFromString( command_line[verbosity_value_pos] );
    }
    // set verbosity level now so that it is valid for the rest of global_options
    PL_Log::instance().verbosity( verbosity_value );

/*
    int option_level_pos= findpos(command_line, "--option-level");
    int option_level_value_pos= -1;
    if (option_level_pos != -1)
    {
        option_level_value_pos= option_level_pos+1;
        if(option_level_value_pos >= argc)
            PLERROR("Option --option-level must be followed by an OptionLevel.");
        OptionBase::setCurrentOptionLevel(OptionBase::optionLevelFromString(command_line[option_level_value_pos]));
    }
*/

    // Option to enable logging for the specified modules, specified as
    // --enable-logging module1,module2,module3,... i.e. as a comma-separated
    // list of modules (without spaces).  Special keywords __ALL__ and __NONE__
    // can be specified to log for all modules or no modules respectively.
    int enable_logging_pos  = findpos(command_line, "--enable-logging");
    int enabled_modules_pos = -1;
    if (enable_logging_pos != -1)
    {
        enabled_modules_pos = enable_logging_pos+1;
        if (enabled_modules_pos >= argc)
            PLERROR("Option --enable-logging must be followed by a list of the form\n"
                    "module1,module2,module3,... (comma-separated list without spaces)");
        vector<string> modules = split(command_line[enabled_modules_pos], ',');
        PL_Log::instance().enableNamedLogging(modules);
    }
    
    // Option to establish global calendars loaded from a matrix
    int global_calendar_pos = findpos(command_line, "--global-calendars");
    int global_calendar_value_pos = -1;
    if (global_calendar_pos != -1) 
    {
        global_calendar_value_pos = global_calendar_pos+1;
        if (global_calendar_value_pos >= argc)
            PLERROR("Option --global-calendars must be followed by a list of the form\n"
                    "CalendarName1:CalendarFilename1,CalendarName2:CalendarFilename2,...");
        set_global_calendars(command_line[global_calendar_value_pos]);
    }
  
    // Option for parallel processing through PLearnService
    int servers_pos = findpos(command_line, "--servers");
    int serversfile_pos = -1;
    if (servers_pos != -1)
    {
        serversfile_pos = servers_pos+1;
        if ( serversfile_pos >= argc)
            PLERROR("Option --servers must be followed by the name of a servers file containing a list of hostname pid tcpport\n");
        string serversfile = command_line[serversfile_pos];
        PLearnService::instance().connectToServers(serversfile);
    }
  
    // The following removes the options from the command line. It also
    // parses the plearn command as being the first non-optional argument on
    // the line. IF ANY OPTION IS ADDED, PLEASE MAKE SURE TO REMOVE IT BY
    // ADDING A CONDITION IN THE if STATEMENT.
    int    cleaned     = 0;
    string the_command = "";
    vector<string> old( command_line );

    for ( int c=0; c < argc; c++ )
        // Neglecting to copy options
        if ( c != no_version_pos             &&
             c != profile_pos                &&
             c != profile_wall_pos           &&
             c != no_progress_bars           &&
             c != windows_endl               &&
             c != verbosity_pos              &&
             c != verbosity_value_pos        &&
             c != enable_logging_pos         &&
             c != enabled_modules_pos        &&
             c != global_calendar_pos        &&
             c != global_calendar_value_pos  &&
             c != servers_pos                &&
             c != quiet_pos                  &&
             c != serversfile_pos            /*&&
             c != option_level_pos           &&
             c != option_level_value_pos*/
            )
        {
            if ( the_command == "" )
            {
                the_command = old[c];

                // If it is not a command, then it is a file that must be forwarded
                // to the run command (See the is_command function).
                if ( !is_command( the_command ) )  
                    command_line[cleaned++] = old[c];
            }
            else
                command_line[cleaned++] = old[c];
        }
    command_line.resize( cleaned ); // Truncating the end of the vector.
  
    if (no_version_pos == -1 && quiet_pos == -1){
        output_version( );
#ifdef _OPENMP
        pout<<"Using OPENMP with "+tostring(omp_get_max_threads())+" threads."<<endl;
#endif
    }
    if (no_progress_bars != -1)
        ProgressBar::setPlugin(new NullProgressBarPlugin);

    if (windows_endl != -1)
        PStream::windows_endl = true;

    if (enabled_modules_pos != -1 && quiet_pos == -1)
        perr << "Logging enabled for modules: "
             << join(PL_Log::instance().namedLogging(), ", ")
             << endl;
    
    return the_command;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::globalConnectToServers ( TVec< pair< string, int > >  hostname_and_port)

Definition at line 446 of file PLearnService.cc.

References PLearn::PLearnService::connectToServers(), and PLearn::PLearnService::instance().

{
    PLearnService::instance().connectToServers(hostname_and_port);
}

Here is the call graph for this function:

Var PLearn::gradient_adaboost_cost ( Var  output,
Var  target 
) [inline]

Definition at line 82 of file GradientAdaboostCostVariable.h.

Referenced by PLearn::NNet::getCost().

{
    return new GradientAdaboostCostVariable(output, target);
}

Here is the caller graph for this function:

template<class T >
int PLearn::GramSchmidtOrthogonalization ( TMat< T >  A,
tolerance = 1e-6 
)

Orthonormalize in-place the rows of the given matrix, using successive projections on the orthogonal subspace of the previously found basis.

The resulting matrix has the following properties:

  • its rows spans the same space as A
  • its rows are orthogonal (dot product = 0)
  • its rows are of norm 1 However, it may happen that the original rows of A were not linearly independent. In that case the, algorithm returns the number of rows that were successfully obtained (and the user should probably then do A = A.subMatRows(0,result) to obtain the basis). The tolerance argument is the minimum value of the norm of a row when projected orthogonal to the previous ones for this row to contribute to the basis.

Definition at line 7152 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), norm(), projectOnOrthogonalSubspace(), and PLearn::TMat< T >::subMatRows().

{
    int n_basis = 0;
    for (int i=0;i<A.length();i++)
    {
        TVec<T> Ai=A(i);
        if (n_basis!=i)
        {
            TVec<T> Ab = A(n_basis);
            Ab << Ai;
            Ai=Ab;
        }
        if (i>0)
            projectOnOrthogonalSubspace(Ai, A.subMatRows(0,n_basis));
        T normAi = norm(Ai);
        if (normAi>1e-6)
        {
            if (normAi!=1)
                Ai/=normAi;
            n_basis++;
        }
        // else ignore row i
    }
    return n_basis;
}

Here is the call graph for this function:

int PLearn::GramSchmidtOrthogonalization ( Mat  A,
real  tolerance = 1e-6 
)

Orthonormalize in-place the rows of the given matrix, using successive projections on the orthogonal subspace of the previously found basis. The resulting matrix has the following properties:

  • its rows spans the same space as A
  • its rows are orthogonal (dot product = 0)
  • its rows are of norm 1 However, it may happen that the original rows of A were not linearly independent. In that case the, algorithm returns the number of rows that were successfully obtained (and the user should probably then do A = A.subMatRows(0,result) to obtain the basis). The tolerance argument is the minimum value of the norm of a row when projected orthogonal to the previous ones for this row to contribute to the basis.

Referenced by PLearn::RandomGaussMix::build_(), diagonalizeSubspace(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), GDFindSmallEigenPairs(), and SymmMatNullSpaceByInversePowerIteration().

Here is the caller graph for this function:

template<class T >
TMat<T> PLearn::grep ( TMat< T >  data,
int  col,
TVec< T >  values,
bool  exclude = false 
)

Definition at line 7059 of file TMat_maths_impl.h.

References PLearn::TVec< T >::contains(), i, PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

Referenced by grep().

{
    TMat<T> result(data.length(),data.width());
    int length=0;

    for(int i=0; i<data.length(); i++)
    {
        bool contains = values.contains(data(i,col));
        if( (!exclude && contains) || (exclude && !contains) )
            result(length++) << data(i);
    }
    result.resize(length,result.width());
    result.compact(); // use less memory
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TMat<T> PLearn::grep ( TMat< T >  data,
int  col,
value,
bool  exclude = false 
) [inline]

Same as above, but with a single value argument.

Definition at line 7236 of file TMat_maths_impl.h.

References grep().

{ return grep(data,col,TVec<T>(1,value),exclude); }

Here is the call graph for this function:

VMat PLearn::grep ( VMat  d,
int  col,
Vec  values,
bool  exclude = false 
)

If exclude==false (the default) returns a VMat containing only the rows whose column col has a value that belongs to the given set of authorized values If exclude==true returns a VMat with all the other rows (corresponds to grep -v) [MISSING_VALUE is a possible value and is handled correctly]

Definition at line 54 of file VMat_operations.cc.

References PLearn::TVec< T >::contains(), d, i, PLearn::VMat::length(), and PLearn::VMat::rows().

{
    Vec indices(d.length());
    int nrows = 0;
    for(int i=0; i<d.length(); i++)
    {
        bool contains = values.contains(d(i,col));
        if( (!exclude && contains) || (exclude && !contains) )
            indices[nrows++] = i;
    }
    indices = indices.subVec(0,nrows);
    return d.rows(indices.copy());
}

Here is the call graph for this function:

VMat PLearn::grep ( VMat  d,
int  col,
Vec  values,
const string &  indexfile,
bool  exclude = false 
)

Same as above, except that the indexes of the rows are stored on disk rather than in memory (a SelectRowsFileIndexVMatrix is returned rather than a SelectRowsVMatrix) BEWARE: If the indexfile already exists, it is *not* recomputed, but used as is.

Definition at line 108 of file VMat_operations.cc.

References PLearn::IntVecFile::append(), PLearn::TVec< T >::contains(), d, i, isfile(), PLearn::VMat::length(), and PLearn::VMat::rows().

{
    if(!isfile(indexfile))
    {
        IntVecFile indices(indexfile,true);
        for(int i=0; i<d.length(); i++)
        {
            bool contains = values.contains(d(i,col));
            if( (!exclude && contains) || (exclude && !contains) )
                indices.append(i);
        }
    }
    return d.rows(indexfile);
}

Here is the call graph for this function:

void PLearn::halfShuffleRows ( SDB &  sdb)

not quite a random shuffle (see implementation) but more efficient use of disk cache

Definition at line 937 of file SimpleDB.cc.

References endl(), PLearn::SimpleDB< KeyType, QueryResult >::getInRow(), PLearn::SimpleDB< KeyType, QueryResult >::getSchema(), PLearn::SimpleDB< KeyType, QueryResult >::length(), and PLearn::SimpleDB< KeyType, QueryResult >::setRow().

{
    Row rowi(&sdb.getSchema());
    Row rowj(&sdb.getSchema());
    int length = int(sdb.length());
    for(int k=1; k<length/2; k+=2)
    {
        if(k%100000==1)
            cerr << k << endl;
        sdb.getInRow(k,rowi);
        sdb.getInRow(length-k,rowj);
        sdb.setRow(rowi,length-k);
        sdb.setRow(rowj,k);
    }
}

Here is the call graph for this function:

void PLearn::handler_of_interrup_signal ( int  sig)

Definition at line 81 of file plearn_main.cc.

References PLERROR.

Referenced by catch_interrupt_signal().

                                         {                               
    PLERROR("We received an interrup signal!");                          
}

Here is the caller graph for this function:

Var PLearn::hard_slope ( Var  x,
Var  left,
Var  right 
) [inline]

Definition at line 75 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
real PLearn::hard_slope ( real  x,
real  left = 0,
real  right = 1 
) [inline]

Definition at line 512 of file pl_math.h.

References left(), and right().

Referenced by PLearn::UnaryHardSlopeVariable::fprop(), PLearn::HardSlopeVariable::fprop(), PLearn::PLMathTest::perform(), soft_slope(), and tabulated_soft_slope().

{
    if (x<left) return 0;
    if (x>right) return 1;
    return (x-left)/(right-left);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::hard_slope_integral ( real  l,
real  r,
real  a,
real  b 
)

Definition at line 277 of file pl_math.cc.

References a.

Referenced by PLearn::PLMathTest::perform(), soft_slope_integral(), and tabulated_soft_slope_integral().

{
    if (b<l) return 0;
    if (b<r)
    {
        if (a<l) 
            return 0.5*(b-l)*(b-l)/(r-l);
        else // a>=l
            return 0.5*((b-l)*(b-l)-(a-l)*(a-l))/(r-l);
    }
    else // b>=r
    {
        if (a<l)
            return 0.5*(r-l)+(b-r);
        else if (a<r) // l<a<r
            return 0.5*((r-l) - (a-l)*(a-l)/(r-l)) + (b-r);
        else // a>r
            return b-a;
    }
}

Here is the caller graph for this function:

template<class T >
T PLearn::harmonic_mean ( const TVec< T > &  vec,
bool  ignore_missing = false 
)

Definition at line 507 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, is_missing(), PLearn::TVec< T >::length(), MISSING_VALUE, n, PLERROR, and PLearn::TVec< T >::size().

Referenced by PLearn::TMatTest::perform().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T mean(const TVec<T>& vec) vec has zero length");
#endif
    if (vec.size() == 0)
        return MISSING_VALUE;
    double res = 0.0;
    int n = 0;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
    {
        if (!is_missing(v[i]))
        {
            res += 1.0/v[i];
            n++;
        }
        else if (!ignore_missing)
            return MISSING_VALUE;
    }

    if (n == 0)
        return MISSING_VALUE;
    return T(double(n)/res);
}

Here is the call graph for this function:

Here is the caller graph for this function:

size_t PLearn::hashbytes ( const char *  byte_start,
size_t  byte_length 
)

**************** Hash tables support *************************

basic hashing function that can be used in defining the hashing functions for objects or any type. This one mixes the bits in the byte_length bytes starting at byte_start, and returns an integer between 0 and MAXINT

Definition at line 78 of file pl_hash_fun.cc.

References i, PL_HASH_NOMBRES_MAGIQUES, and u.

Referenced by hashval().

{
    unsigned int HKey=0u;
    for (size_t i=0; i<byte_length; i++)
    {
        unsigned char t = (HKey >> 24);
        HKey = (HKey << 8) + byte_start[i];
        HKey ^= (unsigned int) PL_HASH_NOMBRES_MAGIQUES[t];
    }
    return HKey;
}

Here is the caller graph for this function:

template<class T , unsigned SizeBits, class Allocator >
unsigned int PLearn::hashval ( const SmallVector< T, SizeBits, Allocator > &  v) [inline]

hash function for hash tables

Definition at line 170 of file SmallVector.h.

References hashbytes().

{ return hashbytes(const_cast<char*>(&v[0]),sizeof(T)*size()); }

Here is the call graph for this function:

size_t PLearn::hashval ( const char *  strng) [inline]

hashing function which must be redefined for classes that can be used as keys:

unsigned int hash(const T& object); or unsigned int hash(const T object);

This function returns ANY unsigned int (i.e. between 0 and MAXINT) (it is hash(x)table_size that will be used to choose an address in the hash table).

It is defined here for some built-in types:

Definition at line 70 of file pl_hash_fun.h.

References hashbytes(), and strlen().

{ return hashbytes(strng, strlen(strng)); }

Here is the call graph for this function:

template<class T >
size_t PLearn::hashval ( const T &  x) [inline]

default which will work in many cases but not all

Definition at line 75 of file pl_hash_fun.h.

References hashbytes().

{ return hashbytes((char*)&x,sizeof(T)); }

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::hconcat ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

Definition at line 214 of file Array_impl.h.

References hconcat().

{ return hconcat(Array< TMat<T> >(m1,m2)); }

Here is the call graph for this function:

RandomVar PLearn::hconcat ( const RVArray &  a)

Definition at line 456 of file RandomVar.cc.

{ return new ConcatColumnsRandomVariable(a); }
Var PLearn::hconcat ( const VarArray &  varray) [inline]

Definition at line 81 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
template<class T >
TMat<T> PLearn::hconcat ( const Array< TMat< T > > &  ar)

Definition at line 190 of file Array_impl.h.

References n, PLERROR, PLearn::TMat< T >::subMatColumns(), and w.

Referenced by PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::DeepReconstructorNet::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::NNet::buildCosts(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::LinearInductiveTransferClassifier::buildFuncs(), PLearn::VVMatrix::createPreproVMat(), hconcat(), loadUSPS(), PLearn::LocallyWeightedDistribution::log_density(), PLearn::LocallyMagnifiedDistribution::log_density(), main(), PLearn::SequentialModelSelector::matlabSave(), removeColumn(), PLearn::ConcatColumnsRandomVariable::setValueFromParentsValue(), PLearn::TangentLearner::train(), PLearn::StructuralLearner::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::AutoLinearRegressor::train(), PLearn::DeepReconstructorNet::trainSupervisedLayer(), and PLearn::MoleculeTemplate::writeToAMATFile().

{
    int w = 0;
    int l = ar[0].length();
    for(int n=0; n<ar.size(); n++)
    {
        if(ar[n].length() != l)
            PLERROR("In Mat hconcat(Array<Mat> ar) all Mats do not have the same length()!");
        w += ar[n].width();
    }
    TMat<T> result(l, w);
    int pos = 0;
    for(int n=0; n<ar.size(); n++)
    {
        result.subMatColumns(pos, ar[n].width()) << ar[n];
        pos+=ar[n].width(); // do not put this line after the n++ in the for loop, or it will cause a bug!
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::hconcat ( VMat  d1,
VMat  d2 
) [inline]

Definition at line 115 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
VMat PLearn::hconcat ( TVec< VMat >  ds) [inline]

Definition at line 118 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(ds); }
Var PLearn::heterogenuous_affine_transform ( Var  input,
VarArray  weights,
TVec< bool the_input_is_discrete 
) [inline]

Definition at line 115 of file HeterogenuousAffineTransformVariable.h.

Referenced by PLearn::DistRepNNet::buildSparseAffineTransform().

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }

Here is the caller graph for this function:

Var PLearn::heterogenuous_affine_transform_weight_penalty ( Var  input,
VarArray  weights,
TVec< bool the_input_is_discrete,
real  weight_decay,
real  bias_decay = 0,
string  penalty_type = "L2_square" 
) [inline]

Definition at line 121 of file HeterogenuousAffineTransformWeightPenalty.h.

Referenced by PLearn::DistRepNNet::buildSparseAffineTransformWeightPenalty().

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }

Here is the caller graph for this function:

double PLearn::hhmmss_to_double ( int  hh,
int  mm,
int  ss 
)

converts an hours/minutes/seconds to a day fraction

Definition at line 257 of file PDateTime.cc.

Referenced by datetime_to_double(), and PLearn::PDateTime::toJulianDay().

{
    // There are 1440 minutes in a day.
    // There are 86400 seconds in a day.
    return double(hh)/24. + double(mm)/1440. + double(ss)/86400;
}

Here is the caller graph for this function:

real PLearn::hinge_loss ( const real output,
int  target 
) [inline]

Definition at line 383 of file pl_math.h.

Referenced by one_against_all_hinge_loss(), and PLearn::PLMathTest::perform().

{
    real off_margin = 1-target*output;
    return off_margin>0?off_margin:0;
}

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::histogram ( const TVec< T > &  vec,
minval,
maxval,
int  nbins 
)

Definition at line 703 of file TMat_maths_impl.h.

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

Referenced by displayHistogram(), and PLearn::Gnuplot::histoplot().

{
    TVec<T> histo(nbins);
    T deltaval = maxval-minval + 1e-6;
    for(int i=0; i<vec.length(); i++)
    {
        T val = vec[i];
        int binpos = int((val-minval)/deltaval*nbins);
        if(binpos>=0 && binpos<nbins)
            histo[binpos]++;
    }
    return histo;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::hostname ( )

Definition at line 114 of file general.cc.

References PLERROR.

Referenced by PLearn::PLearnService::connectToServers(), PLearn::VMatrix::lockMetaDataDir(), PLearn::IPServer::machine_name(), and openUrl().

{
    char tmp[1024];
    if(PR_GetSystemInfo(PR_SI_HOSTNAME,tmp,500)==PR_SUCCESS)
        return string(tmp);
    else{
        const char* h = PR_GetEnv("HOSTNAME");
        if (!h)
            h = PR_GetEnv("HOST");
        if (!h)
            PLERROR("hostname: could not find the host name from NSPR"
                    " or from the variable $HOSTNAME or $HOST in environment!");
        return h;
    }
}

Here is the caller graph for this function:

real PLearn::hyperplaneDistance ( const Vec &  x,
const Mat &  points,
real  weight_decay = 0. 
) [inline]

Distance between point x and closest point on hyperplane that passes through all points.

Definition at line 801 of file plapack.h.

References closestPointOnHyperplane(), and L2distance().

{ return L2distance(x, closestPointOnHyperplane(x,points,weight_decay)); }

Here is the call graph for this function:

int PLearn::ICBCpartition ( const Vec &  claims,
real  threshold 
)

Given a vector of claims (representing the claim values for different KOLs) and a threshold value, the following function returns the class (integer between 0 and 3) of the claims vector. There are 4 classes:

  • class 0: "neg" claim vector (i.e. at least one claim in the vector < 0 and the others = 0)
  • class 1: "zero" claim vector (i.e. all claims in the vector are 0)
  • class 2: "smallpos" claim vector (i.e. at least one claim in the vector > 0 and all claims < threshold)
  • class 3: "largepos" claim vector (i.e. at least one claim in the vector >= threshold)

Definition at line 1210 of file SDBVMat.cc.

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

Referenced by PLearn::SDBVMFieldICBCClassification::convertField().

{
    bool flag_big = 0;
    bool flag_pos = 0;
    bool flag_neg = 0;

    for (int j=0; j<claims.length(); j++)
    {
        if (claims[j]>threshold)  {flag_big=1;}
        else if (claims[j]>0) {flag_pos=1;}
        else if (claims[j]<0) {flag_neg=1;}
    }

    if (flag_big) return 3;
    else if (flag_pos) return 2;
    else if (flag_neg) return 0;
    else return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::iden ( Var  v) [inline]

Definition at line 63 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
template<class T >
void PLearn::identityMatrix ( TMat< T >  m)

set m to the identity matrix, more precisely set m(i,j) = 1_{i==j} (works also for non-square matrices)

Definition at line 7438 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), w, and PLearn::TMat< T >::width().

Referenced by PLearn::GaussianProcessNLLVariable::fbpropFragments(), identityMatrix(), sums2Gaussian(), testCholeskyRoutines(), and PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    int l=m.length();
    int w=m.width();
    for (int i=0;i<l;i++)
    {
        T* mi = m[i];
        for (int j=0;j<w;j++)
            if (j==i)
                mi[j]=1;
            else
                mi[j]=0;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TMat<T> PLearn::identityMatrix ( int  n,
int  m = -1 
)

Return the identity matrix, more precisely an n x n or n x m matrix with result(i,j) = 1_{i==j}.

Definition at line 7455 of file TMat_maths_impl.h.

References identityMatrix(), m, and n.

{
    if (m<0) m=n;
    TMat<T> result(n,m);
    identityMatrix(result);
    return result;
}

Here is the call graph for this function:

template<class T >
void PLearn::ifThenElse ( const TVec< T > &  if_vec,
const TVec< T > &  then_vec,
const TVec< T > &  else_vec,
TVec< T > &  dest 
)

Definition at line 2378 of file TMat_maths_impl.h.

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

Referenced by PLearn::NeuralNet::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::ConditionalDensityNet::build_(), d_hard_slope(), PLearn::PowVariableVariable::symbolicBprop(), PLearn::IfThenElseVariable::symbolicBprop(), and PLearn::AbsVariable::symbolicBprop().

{
    int n=if_vec.length();
    if (n!=then_vec.length() || n!=else_vec.length() || n!=dest.length())
        PLERROR("ifThenElse(TVec<T>(%d), TVec<T>(%d), TVec<T>(%d), TVec<T>(%d)) args of unequal lengths",
                n, then_vec.length(), else_vec.length(), dest.length());
    if (n > 0) {
        T* i_=if_vec.data();
        T* t_=then_vec.data();
        T* e_=else_vec.data();
        T* d_=dest.data();
        for (int i=0;i<n;i++)
            d_[i] = i_[i] ? t_[i] : e_[i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::ifThenElse ( Var  If,
Var  Then,
Var  Else 
) [inline]

IT WOULD BE NICE IF WE COULD REDEFINE (:?)

Definition at line 87 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
double PLearn::incbcf ( double  a,
double  b,
double  x 
)

Definition at line 772 of file random.cc.

References a, b, big, biginv, fast_exact_is_equal(), MACHEP, and n.

{
    double xk, pk, pkm1, pkm2, qk, qkm1, qkm2;
    double k1, k2, k3, k4, k5, k6, k7, k8;
    double r, t, ans, thresh;
    int n;

    k1 = a;
    k2 = a + b;
    k3 = a;
    k4 = a + 1.0;
    k5 = 1.0;
    k6 = b - 1.0;
    k7 = k4;
    k8 = a + 2.0;

    pkm2 = 0.0;
    qkm2 = 1.0;
    pkm1 = 1.0;
    qkm1 = 1.0;
    ans = 1.0;
    r = 1.0;
    n = 0;
    thresh = 3.0 * MACHEP;
    do
    {
        
        xk = -( x * k1 * k2 )/( k3 * k4 );
        pk = pkm1 +  pkm2 * xk;
        qk = qkm1 +  qkm2 * xk;
        pkm2 = pkm1;
        pkm1 = pk;
        qkm2 = qkm1;
        qkm1 = qk;

        xk = ( x * k5 * k6 )/( k7 * k8 );
        pk = pkm1 +  pkm2 * xk;
        qk = qkm1 +  qkm2 * xk;
        pkm2 = pkm1;
        pkm1 = pk;
        qkm2 = qkm1;
        qkm1 = qk;

        if( !fast_exact_is_equal(qk, 0) )
            r = pk/qk;
        if( !fast_exact_is_equal(r, 0) )
        {
            t = fabs( (ans - r)/r );
            ans = r;
        }
        else
            t = 1.0;

        if( t < thresh )
            goto cdone;

        k1 += 1.0;
        k2 += 1.0;
        k3 += 2.0;
        k4 += 2.0;
        k5 += 1.0;
        k6 -= 1.0;
        k7 += 2.0;
        k8 += 2.0;

        if( (fabs(qk) + fabs(pk)) > big )
        {
            pkm2 *= biginv;
            pkm1 *= biginv;
            qkm2 *= biginv;
            qkm1 *= biginv;
        }
        if( (fabs(qk) < biginv) || (fabs(pk) < biginv) )
        {
            pkm2 *= big;
            pkm1 *= big;
            qkm2 *= big;
            qkm1 *= big;
        }
    }
    while( ++n < 300 );

 cdone:
    return(ans);
}

Here is the call graph for this function:

real PLearn::incomplete_beta ( real  z,
real  x,
real  y 
)

returns the incomplete beta function B_z(x,y) (BUGGED?)

Note that z must be in [0,1]

Definition at line 139 of file random.cc.

References exp(), incomplete_beta_continued_fraction(), log_beta(), pl_log, PLERROR, and x.

Referenced by student_t_cdf().

{
    if (z>1 || z<0) PLERROR("incomplete_beta(z,x,y): z =%f must be in [0,1]",z);
    real coeff = 0;
    if (z>0 && z<1) coeff = exp(x*pl_log(z)+y*pl_log(1.-z)-log_beta(x,y));
    if (z*(x+y+2)<x+1) {
        return coeff*incomplete_beta_continued_fraction(z,x,y)/x;
    }
    return 1-coeff*incomplete_beta_continued_fraction(1-z,y,x)/y;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::incomplete_beta_continued_fraction ( real  z,
real  x,
real  y 
)

Definition at line 89 of file random.cc.

References PLWARNING.

Referenced by incomplete_beta().

{
    real x_minus_1 = x-1;
    real x_plus_1 = x+1;
    real x_plus_y = x+y;
    real denom = -z*x_plus_y/x_plus_1+1;
    if (fabs(denom)<1e-35) {
        denom=1e-35;
    }
    real rat1=1/denom;
    real rat2=1.0;
    real frac=rat1;
    for (int k=1;k<100;k++)
    {
        real f=z*k*(y-k)/((x+2*k)*(x_minus_1+2*k));
        rat2 = f/rat2 + 1;
        rat1 = rat1*f+1;
        if (fabs(rat1)<1e-35) {
            rat1=1e-35;
        }
        if (fabs(rat2)<1e-35) {
            rat2=1e-35;
        }
        rat1=1/rat1;
        frac *= rat1*rat2;

        f=-z*(x+k)*(x_plus_y+k)/((x_plus_1+2*k)*(x+2*k));
        rat2 = f/rat2+ 1;
        rat1 = rat1*f+1;
        if (fabs(rat1)<1e-35) {
            rat1=1e-35;
        }
        if (fabs(rat2)<1e-35) {
            rat2=1e-35;
        }
        rat1=1/rat1;

        real delta = rat1*rat2;
        frac *= delta;
        // stopping criterion
        if (fabs(1-delta) < 2e-7) {
            return frac;
        }
    }
    // If that happens, increase the number of k iterations or increase
    // the stopping criterion tolerance.
    PLWARNING("incomplete_beta_continued_fraction: insufficient precision!"); 
    return frac;
}

Here is the caller graph for this function:

void PLearn::indexable ( )

Definition at line 105 of file object_conversions.cc.

References endl(), i, indexableObjectSize(), PLearn::TVec< T >::push_back(), and toIndexedObjectPtr().

Referenced by main().

{
  TVec<StatsCollector> vsc(5);
  TVec< PP<StatsCollector> > ppvsc;

  for (int i=0 ; i<5 ; ++i)
    ppvsc.push_back(new StatsCollector);

  cout << endl << "*** INDEXABLE SIZE SHOULD BE 5: ***" << endl;
  cout << "indexableObjectSize(TVec<StatsCollector>)       : " << indexableObjectSize(vsc) << endl
       << "indexableObjectSize(TVec< PP<StatsCollector> >) : " << indexableObjectSize(ppvsc) << endl;

  cout << endl << "*** TRY INDEXING: ***" << endl;
  for (int i=0 ; i<5 ; ++i)
    cout << "toIndexedObjectPtr(TVec<StatsCollector>[" << i << "])       : "
         << toIndexedObjectPtr(vsc, i) << endl;
  for (int i=0 ; i<5 ; ++i)
    cout << "toIndexedObjectPtr(TVec< PP<StatsCollector> >[" << i << "]) : "
         << toIndexedObjectPtr(ppvsc, i) << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
int PLearn::indexableObjectSize ( const T &  x) [inline]

Return 0 if the object is not indexable; otherwise, return one more than the maximum index allowed by toIndexedObjectPtr(); in other words, return the equivalent of the size() accessor on a vector.

Note:
Minor hack: if the object is indexable and its size() is zero, we cannot return zero since this would mean the object is not indexable. In this case, we return -1. I know, this is not the most elegant thing in the world...

Note that, for performance, the function isConvertibleToObjectPtr() is not called again; it is assumed that the user _knows_ that the object is accessible.

Definition at line 122 of file ObjectConversions.h.

Referenced by indexable(), PLearn::Option< DeallocatorType, self >::indexableSize(), PLearn::StaticOption< TVec< VecElementType > >::indexableSize(), and notIndexable().

{
    return 0;
}

Here is the caller graph for this function:

template<class T >
int PLearn::indexableObjectSize ( const Array< T > &  x) [inline]

Definition at line 128 of file ObjectConversions.h.

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

{
    return (x.size() > 0? x.size() : -1);
}

Here is the call graph for this function:

template<class T >
int PLearn::indexableObjectSize ( const TVec< T > &  x) [inline]

Definition at line 134 of file ObjectConversions.h.

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

{
    return (x.size() > 0? x.size() : -1);
}

Here is the call graph for this function:

map< real, TVec< int > > PLearn::indicesOfOccurencesInColumn ( VMat  m,
int  col 
)

returns a map mapping all different values appearing in column col to a vector of the corresponding row indices in the VMat

returns a map mapping all different values appearing in column col to a vector of the corresponding row indices in the VMat (this proceeds in 2 passes, first calling countOccurencesInColumn to allocate the exact memory)

Definition at line 91 of file VMat_operations.cc.

References countOccurencesInColumn(), i, PLearn::VMat::length(), and m.

Referenced by PLearn::ClassifierFromDensity::train().

{
    map< real, TVec<int> > indices; // result we will return
    map<real, int> counts = countOccurencesInColumn(m,col);
    map<real, int>::iterator it = counts.begin();
    map<real, int>::iterator itend = counts.end();
    for(; it!=itend; ++it)
    {
        indices[it->first].resize(it->second); // allocate the exact amount of memory
        indices[it->first].resize(0); // reset the size to 0 so we can do appends...
    }
    int l = m.length();
    for(int i=0; i<l; i++)
        indices[m(i,col)].push_back(i);
    return indices;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::initPythonExtensionModule ( char const *  module_name)

Definition at line 486 of file PythonExtension.cc.

References PLearn::PythonObjectWrapper::initializePython(), and setPythonModuleAndInject().

{
    /* // can't set logging before this gets called
    perr << "[pid=" << getPid() << "] "
         << "initPythonExtensionModule name=" << module_name << endl;
    */
    PythonObjectWrapper::initializePython();
    PyObject* plext= Py_InitModule(const_cast<char*>(module_name), NULL);
    setPythonModuleAndInject(plext);
}

Here is the call graph for this function:

PythonObjectWrapper PLearn::InjectionTest_basic_function ( const TVec< PythonObjectWrapper > &  args)

Definition at line 147 of file InjectionTest.cc.

References endl().

Referenced by PLearn::InjectionTest::perform().

{
    cout << "basic_function called with arg[0]="
         << args[0].as<int>() << endl;
    return PythonObjectWrapper(42);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::injectPLearnClasses ( PyObject *  module)

Definition at line 136 of file PythonExtension.cc.

References PLearn::PythonObjectWrapper::as(), PLearn::RemoteMethodMap::begin(), PLearn::TVec< T >::begin(), PLearn::RemoteMethodMap::end(), PLearn::TVec< T >::end(), PLearn::TypeFactory::getTypeMap(), PLearn::HelpSystem::helpOnClass(), PLearn::HelpSystem::helpOnMethod(), i, PLearn::RemoteMethodMap::inheritedMethods(), PLearn::PythonObjectWrapper::initializePython(), PLearn::TypeFactory::instance(), PLearn::TVec< T >::last(), PLearn::PythonObjectWrapper::m_newCPPObj_method_def, PLearn::PythonObjectWrapper::m_pypl_classes, PLearn::PythonObjectWrapper::m_refCPPObj_method_def, PLearn::PythonObjectWrapper::m_unref_method_def, PLearn::PythonObjectWrapper::newCPPObj(), PLearn::RemoteTrampoline::nopython, PLERROR, PLearn::TVec< T >::push_back(), PLearn::PythonObjectWrapper::python_del(), PLearn::PythonObjectWrapper::refCPPObj(), search_replace(), PLearn::RemoteMethodMap::size(), PLearn::PythonObjectWrapper::trampoline(), and PLearn::PythonObjectWrapper::transfer_ownership.

Referenced by setPythonModuleAndInject().

{
    PythonGlobalInterpreterLock gil;         // For thread-safety
    PythonObjectWrapper::initializePython();

    if(!PyModule_Check(module))
        PLERROR("In injectPLearnClasses : "
                "module param. should be a python module.");
    // import python class for wrapping PLearn objects
    string importcode= "\nfrom plearn.pybridge.wrapped_plearn_object "
        "import *\n";
    PyObject_SetAttrString(module, const_cast<char*>("__builtins__"), PyEval_GetBuiltins());
    PyObject* res= PyRun_String(importcode.c_str(), Py_file_input, 
                                PyModule_GetDict(module), PyModule_GetDict(module));
    if(!res)
    {
        Py_DECREF(module);
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in injectPLearnClasses : cannot import plearn.pybridge.wrapped_plearn_object.");
    }
    Py_DECREF(res);

    string wrapper_name= "WrappedPLearnObject";
    // now find the class in the env.
    typedef map<string, PyObject*> env_t;
    env_t env= PythonObjectWrapper(
        PyModule_GetDict(module), 
        PythonObjectWrapper::transfer_ownership).as<env_t>();
    env_t::iterator clit= env.find(wrapper_name);
    if(clit == env.end())
        PLERROR("in injectPLearnClasses : "
                "class %s not defined "
                "in plearn.pybridge.wrapped_plearn_object",
                wrapper_name.c_str());
    PyObject* wrapper= clit->second;

    //inject unref and newCPPObj methods
    PyMethodDef* py_method= &PythonObjectWrapper::m_unref_method_def;
    py_method->ml_name  = const_cast<char*>("_unref");
    py_method->ml_meth  = PythonObjectWrapper::python_del;
    py_method->ml_flags = METH_VARARGS;
    py_method->ml_doc   = const_cast<char*>("Injected unref function from PythonObjectWrapper; "
                                            "DO NOT USE THIS FUNCTION! IT MAY DEALLOCATE THE PLEARN OBJECT!");
    PyObject* py_funcobj= PyCFunction_NewEx(py_method, NULL, NULL);
    PyObject* py_methobj= PyMethod_New(py_funcobj, NULL, wrapper);
    Py_XDECREF(py_funcobj);
    if(!py_funcobj || !py_methobj) 
    {
        Py_DECREF(module);
        Py_XDECREF(py_methobj);
        PLERROR("in injectPLearnClasses : "
                "can't inject method '%s' (i.e. __del__)", 
                py_method->ml_name);
    }
    PyObject_SetAttrString(wrapper, py_method->ml_name, py_methobj);
    Py_DECREF(py_methobj);

    // inject 'newCPPObj' and 'refCPPObj' class methods
    TVec<PyMethodDef*> classmethods(2);
    classmethods[0]= &PythonObjectWrapper::m_newCPPObj_method_def;
    classmethods[0]->ml_name  = const_cast<char*>("_newCPPObj");
    classmethods[0]->ml_meth  = PythonObjectWrapper::newCPPObj;
    classmethods[0]->ml_flags = METH_VARARGS;
    classmethods[0]->ml_doc   = const_cast<char*>("Injected new function from PythonObjectWrapper; "
                                                  "DO NOT USE THIS FUNCTION!");
    classmethods[1]= &PythonObjectWrapper::m_refCPPObj_method_def;
    classmethods[1]->ml_name  = const_cast<char*>("_refCPPObj");
    classmethods[1]->ml_meth  = PythonObjectWrapper::refCPPObj;
    classmethods[1]->ml_flags = METH_VARARGS;
    classmethods[1]->ml_doc   = const_cast<char*>("Injected new function from PythonObjectWrapper; "
                                                  "DO NOT USE THIS FUNCTION!");

    for(TVec<PyMethodDef*>::iterator mit= classmethods.begin();
        mit != classmethods.end(); ++mit)
    {
        py_method= *mit;
        py_funcobj= PyCFunction_NewEx(py_method, NULL, NULL);
        py_methobj= PyMethod_New(py_funcobj, NULL, wrapper);
        Py_XDECREF(py_funcobj);
        if(!py_funcobj || !py_methobj) 
        {
            Py_DECREF(module);
            Py_XDECREF(py_methobj);
            PLERROR("in injectPLearnClasses : "
                    "can't inject method '%s' (i.e. C++'s new)", 
                    py_method->ml_name);
        }
        PyObject_SetAttrString(wrapper, py_method->ml_name, py_methobj);
        Py_DECREF(py_methobj);
        
        string classmethodname= wrapper_name+"."+py_method->ml_name;
        res= PyRun_String((classmethodname
                           +"= classmethod("+classmethodname+".im_func)").c_str(), 
                          Py_file_input, 
                          PyModule_GetDict(module), PyModule_GetDict(module));
        Py_DECREF(res);
        if (PyErr_Occurred()) 
        {
            Py_DECREF(module);
            PyErr_Print();
            PLERROR("in injectPLearnClasses : error making "
                    "newCPPObj a classmethod.");
        }
    }

    if(0 != PyType_Ready(reinterpret_cast<PyTypeObject*>(wrapper)))
        PLERROR("in injectPLearnClasses : "
                "failed PyType_Ready on wrapper class.");

    if(!PyCallable_Check(wrapper))
        PLERROR("in injectPLearnClasses : "
                "%s is not callable [not a class?]",
                wrapper_name.c_str());

    PyObject* the_pyclass= 0;
    const TypeMap& tp_map= TypeFactory::instance().getTypeMap();
    for(TypeMap::const_iterator tit= tp_map.begin();
        tit != tp_map.end(); ++tit)
    {
        if(!tit->second.constructor)
            continue; //skip abstract classes

        string actual_wrapper_name= wrapper_name;
        Object* temp_obj= tit->second.constructor();
        // use different wrapper for VMats (w/ len, getitem, etc.)
        if(dynamic_cast<VMatrix*>(temp_obj))
            actual_wrapper_name= "WrappedPLearnVMat";
        delete temp_obj;

        // create new python type deriving from WrappedPLearnObject
        string classname= tit->first;
        string class_help_text= HelpSystem::helpOnClass(classname);
        search_replace(class_help_text, "\"\"\"", "\\\"\\\"\\\"");
        string pyclassname= classname;
        search_replace(pyclassname, " ", "_");
        search_replace(pyclassname, "<", "_");
        search_replace(pyclassname, ">", "_");
        string derivcode= string("\nclass ")
            + pyclassname + "(" + actual_wrapper_name + "):\n"
            "  \"\"\" \n" + class_help_text + "\n \"\"\"\n"
            "  def __new__(cls,*args,**kwargs):\n"
            "    #get_plearn_module().loggingControl(500, ['__ALL__'])"
            "    #print '** "+pyclassname+".__new__',args,kwargs\n"
            "    #import sys; sys.stdout.flush()\n"
            "    obj= object.__new__(cls)\n"
            "    if '_cptr' not in kwargs:\n"
            "      obj._cptr= cls._newCPPObj('"+classname+"')\n"
            "      cls._refCPPObj(obj)\n"
            "    return obj\n";
        PyObject* res= PyRun_String(derivcode.c_str(), 
                                    Py_file_input, 
                                    PyModule_GetDict(module), PyModule_GetDict(module));

        Py_XDECREF(res);
        env= PythonObjectWrapper(
            PyModule_GetDict(module), 
            PythonObjectWrapper::transfer_ownership).as<env_t>();
        clit= env.find(pyclassname);
        if(clit == env.end())
            PLERROR("in injectPLearnClasses : "
                    "Cannot create new python class deriving from "
                    "%s (%s).", 
                    actual_wrapper_name.c_str(),
                    classname.c_str());

        //set option names
        OptionList& options= tit->second.getoptionlist_method();
        unsigned int nopts= options.size();
        //set<string> optionnames;
        map<string, vector<string> > optionnames;
        for(unsigned int i= 0; i < nopts; ++i)
            //optionnames.insert(options[i]->optionname());
            optionnames[options[i]->optionname()]= options[i]->flagStrings();
        the_pyclass= clit->second;
        if(-1==PyObject_SetAttrString(the_pyclass, const_cast<char*>("_optionnames"), 
                                      PythonObjectWrapper(optionnames).getPyObject()))
        {
            Py_DECREF(module);
            if (PyErr_Occurred()) PyErr_Print();
            PLERROR("in injectPLearnClasses : "
                    "cannot set attr _optionnames for class %s",
                    classname.c_str());
        }

        // inject all declared methods
        const RemoteMethodMap* methods= &tit->second.get_remote_methods();

        PP<PObjectPool<PyMethodDef> > meth_def_pool= 
            new PObjectPool<PyMethodDef>(methods->size()+1);

        PythonObjectWrapper::m_pypl_classes.insert(
            make_pair(classname, PLPyClass(the_pyclass, meth_def_pool)));
        TVec<string>& methods_help= 
            PythonObjectWrapper::m_pypl_classes.find(classname)->second.methods_help;

        set<pair<string, int> > methods_done;
        while(methods)
        {
            for(RemoteMethodMap::MethodMap::const_iterator it= methods->begin();
                it != methods->end(); ++it)
            {
                //skip methods already injected, or not to inject
                if(methods_done.find(it->first) != methods_done.end()) continue;
                methods_done.insert(it->first);
                if(it->second->flags() & RemoteTrampoline::nopython) continue;

                //get the RemoteTrampoline
                PyObject* tramp= PyCObject_FromVoidPtr(it->second, NULL);
            
                // Create a Python Function Object
                PyMethodDef* py_method= meth_def_pool->allocate();
                py_method->ml_name  = const_cast<char*>(it->first.first.c_str());
                py_method->ml_meth  = PythonObjectWrapper::trampoline;
                py_method->ml_flags = METH_VARARGS;
                methods_help.push_back(HelpSystem::helpOnMethod(classname,
                                                                it->first.first.c_str(),
                                                                it->first.second));
                py_method->ml_doc   = const_cast<char*>(methods_help.last().c_str());
    
                PyObject* py_funcobj= PyCFunction_NewEx(py_method, tramp, module);

                // create an unbound method from the function
                PyObject* py_methobj= PyMethod_New(py_funcobj, NULL, the_pyclass);

                Py_DECREF(tramp);
                Py_XDECREF(py_funcobj);
                if(!py_funcobj || !py_methobj) 
                {
                    Py_DECREF(module);
                    Py_XDECREF(py_methobj);
                    PLERROR("in injectPLearnClasses : "
                            "can't inject method '%s'", py_method->ml_name);
                }

                if(-1==PyObject_SetAttrString(the_pyclass, py_method->ml_name, py_methobj))
                {
                    Py_DECREF(py_methobj);
                    if (PyErr_Occurred()) PyErr_Print();
                    PLERROR("in injectPLearnClasses : "
                            "cannot set attr %s for class %s",
                            py_method->ml_name,
                            classname.c_str());
                }
                Py_DECREF(py_methobj);
            }
            methods= methods->inheritedMethods();//get parent class methods
        }
        if(0 != PyType_Ready(reinterpret_cast<PyTypeObject*>(the_pyclass)))
            PLERROR("in injectPLearnClasses : "
                    "failed PyType_Ready on class %s.",classname.c_str());
        if(module)
            if(-1==PyObject_SetAttrString(module, 
                                          const_cast<char*>(pyclassname.c_str()), 
                                          the_pyclass))
            {
                if (PyErr_Occurred()) PyErr_Print();
                PLERROR("in injectPLearnClasses : "
                        "cannot inject class %s.",
                        classname.c_str());
            }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::injectPLearnException ( PyObject *  module)

Definition at line 400 of file PythonExtension.cc.

References PLERROR, and the_PLearn_python_exception.

Referenced by setPythonModuleAndInject().

{
    PyObject* res= PyRun_String("class PLearnError(Exception):\n\tpass\n", 
                                Py_file_input, 
                                PyModule_GetDict(module), 
                                PyModule_GetDict(module));
    if(!res)
    {
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in injectPLearnException : cannot create PLearnException class.");
    }
    Py_DECREF(res);

    the_PLearn_python_exception= PyObject_GetAttrString(module, "PLearnError");
    if(!the_PLearn_python_exception)
    {
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in injectPLearnException : cannot retrieve PLearnException class.");
    }
    //keep ref. to PLearnError forever.
}

Here is the caller graph for this function:

void PLearn::injectPLearnGlobalFunctions ( PyObject *  env)

Definition at line 92 of file PythonExtension.cc.

References PLearn::PObjectPool< T >::allocate(), funcs_help, getGlobalFunctionMap(), PLearn::RemoteMethodMap::getMap(), PLearn::HelpSystem::helpOnFunction(), PLearn::TVec< T >::last(), PLERROR, PLearn::TVec< T >::push_back(), pyfuncs, and pythonGlobalFuncTramp().

Referenced by setPythonModuleAndInject().

{
    const RemoteMethodMap::MethodMap& global_funcs= 
        getGlobalFunctionMap().getMap();

    for(RemoteMethodMap::MethodMap::const_iterator it=
            global_funcs.begin();
        it != global_funcs.end(); ++it)
    {
        PyObject* self= 
            PyCObject_FromVoidPtr(it->second, NULL);
    
        PyMethodDef* py_method= pyfuncs.allocate();
        py_method->ml_name= 
            const_cast<char*>(it->first.first.c_str());
        py_method->ml_meth= pythonGlobalFuncTramp;
        py_method->ml_flags= METH_VARARGS;
        funcs_help.push_back(
            HelpSystem::helpOnFunction(it->first.first.c_str(), 
                                       it->first.second));
        py_method->ml_doc= const_cast<char*>(funcs_help.last().c_str());
    
        /* module= env if env is a module; NULL otherwise */
        PyObject* module= 0;
        if(PyModule_Check(env))
            module= env;

        // N.B.: module == NULL works on python2.3, 2.4 and 2.5, but is not
        // documented
        PyObject* pyfunc= 
            PyCFunction_NewEx(py_method, self, module);
            
        if(pyfunc) 
            PyObject_SetAttrString(env, 
                                   py_method->ml_name, 
                                   pyfunc);
        else
            PLERROR("Cannot inject global function "
                    "'%s' into python.",
                    py_method->ml_name);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::input2dSet ( const PPath &  filename)

This will input a 2d binary classification problem (launches a java applet)

Definition at line 62 of file databases.cc.

References JAVA, loadAscii(), pathexists(), and shuffleRows().

Referenced by loadClassificationDataset().

{
    Mat data;
    if(!pathexists(filename))
    {
        string systemstring = string(JAVA) + " InputPoints " + filename + " -1 1 -1 1";
        system(systemstring.c_str());
    }
    loadAscii(filename, data);
    shuffleRows(data);
    return data;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::insert_zeros ( Var  v,
TVec< int the_rows 
) [inline]

Definition at line 74 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
template<class I >
I PLearn::integerFromPyObject ( PyObject *  pyobj,
bool  print_traceback 
)

Used to retrieve integer values from python if possible without precision loss, and convert them to requested type.

Todo:

: put I's name in error message?

: call PyErr_Print() before PyErr_Clear()?

Definition at line 99 of file PythonObjectWrapper.h.

References PLASSERT, PLPythonConversionError(), and x.

{
    PLASSERT( pyobj );

    I result = (I) 0;
    if (PyInt_Check(pyobj))
    {
        // pyobj is represented in Python as a long,
        // so we are sure it fits into a long, no need to check.
        long x = PyInt_AS_LONG(pyobj);
        result = static_cast<I>(x);

        // Check if x fits into type I (overflow or sign problem)
#ifdef __INTEL_COMPILER
#pragma warning(disable:1682)
// Yes, I know that "implicit conversion of a 64-bit integral type to a smaller
// integral type (potential portability problem)", but the conversion is
// explicit here.
#endif
        if (static_cast<long>(result) != x
            || (!(numeric_limits<I>::is_signed) && x<0))
        {
            PLPythonConversionError("integerFromPyObject<I>", pyobj,
                                    print_traceback);
        }
#ifdef __INTEL_COMPILER
#pragma warning(default:1682)
#endif
    }
    else if (PyLong_Check(pyobj))
    {
        if (numeric_limits<I>::is_signed)
        {
            // If I is signed, we have to accept negative values, so we use a
            // signed long long to hold the result.
            // No signed type can hold values greater than a long long anyway.
            long long x = PyLong_AsLongLong(pyobj);

            // Check for possible overflow during conversion
            if (!PyErr_Occurred())
            {
#ifdef __INTEL_COMPILER
#pragma warning(disable:1682)
// Yes, I know that "implicit conversion of a 64-bit integral type to a smaller
// integral type (potential portability problem)", but the conversion is
// explicit here.
#endif
                result = static_cast<I>(x);
#ifdef __INTEL_COMPILER
#pragma warning(default:1682)
#endif

                // Check if x fits into type I (overflow only, there
                // cannot be any sign error because I is signed, too)
                if (static_cast<long long>(result) != x)
                {
                    PLPythonConversionError("integerFromPyObject<I>", pyobj,
                                            print_traceback);
                }
            }
            else if (PyErr_ExceptionMatches(PyExc_OverflowError))
            {
                PyErr_Clear();
                PLPythonConversionError("integerFromPyObject<I>", pyobj,
                                        print_traceback);
            }
            // else?
        }
        else
        {
            // I is unsigned
            unsigned long long x = PyLong_AsUnsignedLongLong(pyobj);

            // Check for possible overflow during conversion
            if (!PyErr_Occurred())
            {
#ifdef __INTEL_COMPILER
#pragma warning(disable:1682)
// Yes, I know that "implicit conversion of a 64-bit integral type to a smaller
// integral type (potential portability problem)", but the conversion is
// explicit here.
#endif
                result = static_cast<I>(x);
#ifdef __INTEL_COMPILER
#pragma warning(default:1682)
#endif

                // Check if x fits into type I (overflow only)
                if (static_cast<unsigned long long>(result) != x)
                {
                    PLPythonConversionError("integerFromPyObject<I>", pyobj,
                                            print_traceback);
                }
            }
            else if (PyErr_ExceptionMatches(PyExc_OverflowError) // too big
                     || PyErr_ExceptionMatches(PyExc_TypeError)) // negative
            {
                PyErr_Clear();
                PLPythonConversionError("integerFromPyObject<I>", pyobj,
                                        print_traceback);
            }
            // else?
        }
    }
    else
        PLPythonConversionError("integerFromPyObject<I>", pyobj,
                                print_traceback);
    return result;
}

Here is the call graph for this function:

template<class I >
PyObject* PLearn::integerToPyObject ( const I &  x)

Used to convert integer values to python, using PyInt if possible.

Definition at line 503 of file PythonObjectWrapper.h.

References x.

Referenced by PLearn::ConvertToPyObject< short >::newPyObject(), PLearn::ConvertToPyObject< unsigned long long >::newPyObject(), PLearn::ConvertToPyObject< unsigned short >::newPyObject(), PLearn::ConvertToPyObject< long >::newPyObject(), PLearn::ConvertToPyObject< unsigned int >::newPyObject(), PLearn::ConvertToPyObject< long long >::newPyObject(), PLearn::ConvertToPyObject< unsigned long >::newPyObject(), and PLearn::ConvertToPyObject< int >::newPyObject().

{
    // Try to convert x to a long
#ifdef __INTEL_COMPILER
#pragma warning(disable:1682)
// Yes, I know that "implicit conversion of a 64-bit integral type to a smaller
// integral type (potential portability problem)", but the conversion is
// explicit here.
#endif
    long y = static_cast<long>(x);
#ifdef __INTEL_COMPILER
#pragma warning(default:1682)
#endif

    // Check if we lost value information or sign
    if (static_cast<I>(y) == x && (numeric_limits<I>::is_signed || y >= 0))
        return PyInt_FromLong(y);
    else if (numeric_limits<I>::is_signed)
        return PyLong_FromLongLong(static_cast<long long>(x));
    else
        return PyLong_FromUnsignedLongLong(static_cast<unsigned long long>(x));
}

Here is the caller graph for this function:

void PLearn::interactiveDisplayCDF ( const Array< VMat > &  vmats)

Definition at line 343 of file vmatmain.cc.

References PLearn::StatsCollector::cdf(), endl(), flush(), i, is_equal(), PLearn::TVec< T >::length(), m, pgetline(), PLearn::Gnuplot::plot(), pout, PLearn::TVec< T >::size(), split(), and w.

Referenced by vmatmain().

{
    int k = vmats.size();
    int w = vmats[0]->width();

    Array<string> name(k);
    pout << ">>>> Dimensions of vmats: \n";
    for(int i=0; i<k; i++)
    {
        name[i] = vmats[i]->getMetaDataDir();
        name[i] = name[i].erase(name[i].size()-10);
        pout << name[i] << ": \t " << vmats[i]->length() << " x " << vmats[i]->width() << endl;
    }

    vmats[0]->printFields(pout);

    Gnuplot gp;

    for(;;)
    {
        // TVec<RealMapping> ranges = vm->getRanges();

        vector<string> command;
        int varnum = -1;
        real low = -FLT_MAX; // means autorange
        real high = FLT_MAX; // means autorange
        do
        {
            pout << "Field (0.." << w-1 << ") [low high] or exit? " << flush;
            command = split(pgetline(cin));
            if(command.size()==0)
                vmats[0]->printFields(pout);
            else if(command.size()==1&&command[0]=="exit")
                exit(0);
            else
            {
                varnum = vmats[0]->getFieldIndex(command[0],false);
                if(varnum == -1)
                    pout<<"Bad column name or number("<<command[0]<<")"<<endl;
                if(varnum<0 || varnum>=w)
                    vmats[0]->printFields(pout);
                else if(command.size()==3)
                {
                    low = toreal(command[1]);
                    high = toreal(command[2]);
                }
            }
        } while(varnum<0 || varnum>=w);


        pout << "\n\n*************************************" << endl;
        pout << "** #" << varnum << ": " << vmats[0]->fieldName(varnum) << " **" << endl;
        pout << "*************************************" << endl;

        Array<Mat> m(k);

        for(int i=0; i<k; i++)
        {
            TVec<StatsCollector> stats = vmats[i]->getStats();        
            StatsCollector& st = stats[varnum];
            m[i] = st.cdf(true);
            pout << "[ " << name[i]  << " ]" << endl;
            pout << st << endl;
        }
        // pout << "RANGES: " << endl;
        // pout << ranges[varnum];

        if(is_equal(low,-FLT_MAX))
            gp << "set xrange [*:*]" << endl;      
        else
            //The -0.01 and 0.01 is to clearly see the end value.
            gp << "set xrange [" << low-0.01 << ":" << high+0.01 << "]" << endl;

        if(k>=4)
            gp.plot(m[0],"title '"+name[0]+"'", m[1], "title '" + name[1]+"'", m[2], "title '" + name[2]+"'", m[3], "title '"+name[3]+"'");    
        else if(k>=3)
            gp.plot(m[0],"title '"+name[0]+"'", m[1], "title '"+name[1]+"'", m[2], "title '"+name[2]+"'");
        else if(k>=2)
            gp.plot(m[0],"title '"+name[0]+"'", m[1], "title '"+name[1]+"'");
        else
            gp.plot(m[0],"title '"+name[0]+"'");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::intersection ( Set  a,
Set  b,
Set  res 
) [inline]

Definition at line 100 of file Set.h.

References PLearn::Set::begin(), and PLearn::Set::end().

Referenced by PLearn::Calendar::intersect().

{
    set_intersection(a.begin(), a.end(),
                     b.begin(), b.end(),
                     insert_iterator<PPointableSet>(*res, res.begin()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::interValues ( Var  values) [inline]

if values = [x1,x2,...,x10], the resulting variable is [(x1+x2)/2,(x2+x3)/2, ...

(x9+x10)/2]

Definition at line 80 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
template<class T >
TMat<T> PLearn::inverse ( TMat< T > &  m)

Definition at line 6092 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length().

Referenced by PLearn::MatrixInverseVariable::fprop(), leftPseudoInverse(), and rightPseudoInverse().

{
    TMat<T> inv(m.length(),m.length());
    inverse(m,inv);
    return inv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::inverse ( const TMat< T > &  m,
TMat< T > &  inv 
)

Definition at line 6102 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TMat< T >::length(), n, PLERROR, PLearn::TMat< T >::resize(), and PLearn::TMat< T >::width().

{
    int n=m.length();
    if (m.width()!=n)
        PLERROR("inverse(TMat<T>,TMat<T>): argument(%d,%d) must be square matrix",
                m.width(), n);
    inv.resize(n,n);
    if (n==1)
        inv.data()[0]=1.0/m.data()[0];
    else
        PLERROR("matrix inverse not implemented yet");
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::inverse_sigmoid ( const TVec< T > &  src) [inline]

Definition at line 1501 of file TMat_maths_impl.h.

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

{ TVec<T> dest(src.length()); compute_inverse_sigmoid(src,dest); return dest; }

Here is the call graph for this function:

real PLearn::inverse_sigmoid ( real  x) [inline]

Numerically stable version of inverse_sigmoid(x) = log(x/(1-x)).

Definition at line 446 of file pl_math.h.

References fast_is_equal(), is_missing(), pl_log, and PLERROR.

Referenced by compute_inverse_sigmoid(), PLearn::ConditionalDensityNet::initializeParams(), PLearn::PLMathTest::perform(), PLearn::ConditionalDensityNet::train(), PLearn::RBMMatrixConnection::updateGibbs(), and PLearn::RBMLayer::updateGibbs().

{
#ifdef BOUNDCHECK
    if (x < 0. || x > 1. || is_missing(x))
        PLERROR("In inv_sigmoid_value: a should be in [0,1]");
#endif
    // We specify an absolute 1e-5 threshold to have the same behavior as with
    // the old FEQUAL macro.
    if (fast_is_equal(x,0.,REAL_MAX,1e-5))
        return -88.;
    else if (fast_is_equal(x,1.,REAL_MAX,1e-5))
        return 14.5;
    else
        return real(-pl_log(1./x - 1.));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::inverse_softplus ( real  y) [inline]

inverse of softplus function

Definition at line 501 of file pl_math.h.

References exp(), fast_exact_is_equal(), MISSING_VALUE, and pl_log.

Referenced by PLearn::ConditionalDensityNet::initializeParams(), PLearn::PLMathTest::perform(), and PLearn::ConditionalDensityNet::train().

{
    if (y<0) 
        return MISSING_VALUE;
    if (y>=30)
        return y;
    if (fast_exact_is_equal(y, 0))
        return -30;
    return pl_log(exp(y)-1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class MatT >
real PLearn::InversePowerIteration ( MatT  A,
Vec  x0,
int n_iterations,
int  max_n_cg_iter,
real  RTolerance,
Mat  final_vectors,
int final_offset,
real  regularizer,
bool  verbose = false 
)

Perform an inverse power iteration to find the smallest eigen-pairs of a generic (square and symmetric positive semi-definite) matrix A (i.e. quasi-eigenvectors whose eigenvalues are the smallest in magnitude). The algorithm essentially iterates SOLVE x_t FOR A x_t = x_{t-1} using conjugate gradients (the SolveLinearSymmSystemByCG function) to solve, and where x0 is provided in argument. The user specifies the maximum number of iterations in n_iterations (and upon return this variable contains the actual number of iterations taken). The iterations also stop if the Rayleigh quotient does not improve (decrease) by more than the fraction RTolerance. The last N set of x_t's that were visited will be in the rows of final_vectors (where N is specified by the length of this matrix, and N must be at least 3 for temporary storage). Since the algorithm uses final_vectors as a shift register for the x_t's the final x_T will be at row final_offset. The conjugate gradients procedure needs a regularizer: it actually solves the system (A + regularizer I) x_t = x_{t-1} and if A is ill-conditionned it is important to provide one. Returns the "error", i.e. | A x_T| (which should be as small as possible) and is an estimator of the associated eigen-value. Note also that the final_vectors all have norm 1 but are not generally orthogonal.

< save memory but destroy argument

check Rayleigh quotient (note that norm(current)=1)

stop

iterate

Definition at line 575 of file GenMat.h.

References dot(), endl(), PLearn::TMat< T >::length(), max(), N, norm(), normalize(), PLERROR, PLWARNING, product(), and SolveLinearSymmSystemByCG().

Referenced by findSmallestEigenPairOfSymmMat().

{
    int N=final_vectors.length();
    if (N<2) PLERROR("PowerIteration: final_vectors.length_ = %d should be >= 2",N);
    Vec previous=final_vectors(0);
    Vec current=final_vectors(1);
    previous << x0; 
    real max_x = max(previous);
    if (max_x<0) previous*=-1;
    real current_Rq, previous_Rq=0;
    max_x = max(current);
    if (max_x<0) current*=-1;
    normalize(previous);
    int it=1;
    Vec Ax = x0; 
    real current_error =0;
    for (;it<=n_iterations;it++)
    {
        int CGniter = max_n_cg_iter;
        real residue = RTolerance;
        current << previous;
        bool success=SolveLinearSymmSystemByCG(A, current, previous, CGniter, residue, regularizer);
        if (verbose)
        {
            if (success)
                cout << "done CG in " << CGniter << " iterations with residue = " << residue << endl;
            else
                cout << "done incomplete CG in " << CGniter << " iterations with residue = " << residue << endl;
        }
        max_x = max(current);
        if (max_x<0) current*=-1;
        normalize(current);
        product(A, current,Ax);
        current_Rq = dot(current,Ax);
        current_error = norm(Ax);
        if (verbose)
            cout << "at iteration " << it << ", R(A,x) = " << current_Rq << ", |Ax|/|x| = " 
                 << current_error << endl;
        if (verbose && current_Rq > (1+RTolerance)*previous_Rq)
            PLWARNING("InversePowerIteration: something strange, x'Ax/x'x is decreasing %g->%g",
                      previous_Rq, current_Rq);
        if (it>=N && 1 - current_Rq / previous_Rq  < RTolerance)
        {
            n_iterations = it;
            final_offset = it%N;
            if (verbose)
                cout << "inverse power iteration finishes with |Ax|/|x| = " << current_error << endl;
            return current_error;
        }
        previous_Rq = current_Rq;
        previous = current;
        current = final_vectors((it+1)%N);
    }
    final_offset = it%N;
    if (verbose)
        cout << "power iteration finishes FAILING with |Ax|/|x| = " << current_error << endl;
    return current_error;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::inverted ( const TVec< T > &  vec)

Definition at line 1526 of file TMat_maths_impl.h.

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

Referenced by PLearn::TMatTest::perform().

{
    TVec<T> ret(vec.length());
    if (vec.size() > 0) {
        T* v = vec.data();
        for(int i=0; i<vec.length(); i++)
            ret[i] = 1.0/v[i];
    }
    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::invertElements ( const TVec< T > &  vec)

Definition at line 1516 of file TMat_maths_impl.h.

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

Referenced by PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::EntropyContrastLearner::build_(), d_hard_slope(), normalize(), operator/(), SolveLinearSymmSystemByCG(), PLearn::DivVariable::symbolicBprop(), PLearn::WPLS::train(), and PLearn::PLS::train().

{
    if (vec.size() > 0) {
        T* v = vec.data();
        for(int i=0; i<vec.length(); i++)
            v[i] = 1.0/v[i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::invertElements ( const TMat< T > &  m)

x'_ij = 1.0/x_ij;

Definition at line 6034 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T* m_i = m.data();
    int w=m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] = 1.0/m_i[j];
}

Here is the call graph for this function:

Var PLearn::invertElements ( Var  v) [inline]

Definition at line 72 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
real PLearn::ipow ( real  x,
int  p 
) [inline]
int PLearn::ipow ( int  x,
int  p 
) [inline]

Definition at line 428 of file pl_math.h.

References PLASSERT, and x.

{ 
    PLASSERT( p >= 0 );
    int result = 1;
    while(p--)
        result *= x;
    return result;
}
static bool PLearn::is_command ( string &  possible_command) [static]

Definition at line 95 of file plearn_main.cc.

References PLearn::PLearnCommandRegistry::is_registered(), isfile(), and PLERROR.

Referenced by global_options().

{
    if(PLearnCommandRegistry::is_registered(possible_command))
        return true; 

    if( isfile(possible_command) )
    {
        possible_command = "run";
        return false;
    }
  
    PLERROR( "%s appears to neither be a known PLearn command, "
             "nor an existing .plearn script", possible_command.c_str() );
    return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::is_equal ( real  a,
real  b,
real  absolute_tolerance_threshold,
real  absolute_tolerance,
real  relative_tolerance 
)

Test float equality (correctly deals with 'nan' and 'inf' values).

Definition at line 76 of file pl_math.cc.

References fast_is_equal().

Referenced by PLearn::RBMMatrixConnection::addWeightPenalty(), PLearn::RBMDiagonalMatrixConnection::addWeightPenalty(), PLearn::RegressionTreeRegisters::bestSplitInRow(), PLearn::VariableDeletionVMatrix::build_(), PLearn::SoftHistogramBinner::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::ModuleTester::build_(), PLearn::MixtureDistribution::build_(), PLearn::GaussMix::build_(), PLearn::FinancePreprocVMatrix::build_(), PLearn::EarlyStoppingOracle::build_(), PLearn::BootstrapVMatrix::build_(), compare(), PLearn::PartSupervisedDBN::computeCostsFromOutputs(), PLearn::KFoldLogisticClassifier::computeCostsFromOutputs(), PLearn::HintonDeepBeliefNet::computeCostsFromOutputs(), PLearn::GaussPartSupervisedDBN::computeCostsFromOutputs(), PLearn::GaussianDBNClassification::computeCostsFromOutputs(), PLearn::BinaryStump::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::KNNRegressor::computeOutput(), PLearn::RBMModule::computePartitionFunction(), PLearn::SupervisedDBN::density(), PLearn::PartSupervisedDBN::density(), PLearn::HintonDeepBeliefNet::density(), PLearn::GaussPartSupervisedDBN::density(), PLearn::GaussianDBNRegression::density(), PLearn::GaussianDBNClassification::density(), diff(), PLearn::RealValueIndicatorFunction::evaluateFeature(), PLearn::PartSupervisedDBN::fineTuneByGradientDescent(), PLearn::HintonDeepBeliefNet::fineTuneByGradientDescent(), PLearn::GaussPartSupervisedDBN::fineTuneByGradientDescent(), PLearn::UnfoldedFuncVariable::fprop(), PLearn::SoftmaxNLLCostModule::fprop(), PLearn::RBMModule::fprop(), PLearn::NLLCostModule::fprop(), PLearn::RBMMultinomialLayer::fpropNLL(), PLearn::RBMLocalMultinomialLayer::fpropNLL(), PLearn::SumOverBagsVariable::fpropOneBag(), PLearn::RBMDistribution::generateN(), PLearn::RegressionTreeRegisters::getAllRegisteredRowLeave(), PLearn::StatsCollector::getApproximateCounts(), PLearn::SoftHistogramBinner::getBins(), PLearn::RegressionTreeNode::getErrorImprovment(), PLearn::AddBagInformationVMatrix::getNewRow(), PLearn::FractionSplitter::getSplit(), PLearn::NLLErrModule::getTarget(), PLearn::VMatrix::hasFieldInfos(), interactiveDisplayCDF(), is_more(), PLearn::TMat< T >::isEqual(), PLearn::TMat< pair< real, real > >::isSymmetric(), PLearn::PartSupervisedDBN::jointGreedyStep(), PLearn::GaussPartSupervisedDBN::jointGreedyStep(), PLearn::GaussMix::kmeans(), PLearn::RealMapping::operator==(), PLearn::PLMathTest::perform(), print_diff(), PLearn::GaussMix::resizeDataBeforeTraining(), PLearn::StatsCollector::sharperatio(), PLearn::SortRowsVMatrix::sortRows(), PLearn::AdaBoost::train(), universal_compare(), PLearn::ToBagClassifier::updateCostAndBagOutput(), and viewVMat().

{
    if (isnan(a)){
        if (isnan(b))
            return true;
        else
            return false;
    }
    if (isnan(b))
        return false;
    if (int inf_a = isinf(a))
        return inf_a == isinf(b);
    if (isinf(b))
        return false;
    return fast_is_equal(a, b, absolute_tolerance_threshold, absolute_tolerance, relative_tolerance);
}

Here is the call graph for this function:

bool PLearn::is_integer ( real  x) [inline]

Definition at line 409 of file pl_math.h.

References fast_exact_is_equal().

Referenced by computeConditionalMeans(), PLearn::ClassErrorCostFunction::evaluate(), and PLearn::PLMathTest::perform().

{ return fast_exact_is_equal(real(int(x)), x); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
bool PLearn::is_missing ( const T &  x) [inline]

Tells if the passed value means "missing" for its data-type.

The default version of returns false (not a "missing value")

Definition at line 401 of file pl_math.h.

Referenced by PLearn::MergeDond2Files::accumulateVec(), PLearn::GaussMix::addToCovariance(), PLearn::AnalyzeDond2DiscreteVariables::analyzeDiscreteVariable(), PLearn::AnalyzeFieldStats::analyzeVariableStats(), argmax(), argmin(), avgdev(), PLearn::RealMapping::binnumber(), PLearn::NegCrossEntropySigmoidVariable::bprop(), PLearn::OnBagsModule::bpropUpdate(), PLearn::ReplicateSamplesVMatrix::build_(), PLearn::ReorderByMissingVMatrix::build_(), PLearn::ProcessSymbolicSequenceVMatrix::build_(), PLearn::MultiTargetOneHotVMatrix::build_(), PLearn::ModuleTester::build_(), PLearn::KNNImputationVMatrix::build_(), PLearn::FinancePreprocVMatrix::build_(), PLearn::MissingIndicatorVMatrix::buildNewRecordFormat(), PLearn::RegressionTreeRegisters::checkMissing(), PLearn::MergeDond2Files::combineAndPut(), PLearn::MeanMedianModeImputationVMatrix::compare(), computeBasicStats(), PLearn::VariableSelectionWithDirectedGradientDescent::computeCostsFromOutputs(), PLearn::PseudolikelihoodRBM::computeCostsFromOutputs(), PLearn::LinearInductiveTransferClassifier::computeCostsFromOutputs(), PLearn::DiscriminativeRBM::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::CovariancePreservationImputationVMatrix::computeCovariances(), PLearn::StructuralLearner::computeFeatures(), PLearn::CovariancePreservationImputationVMatrix::computeImputation(), PLearn::GaussMix::computeLogLikelihood(), PLearn::MeanMedianModeImputationVMatrix::computeMeanMedianModeVectors(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::TestImputations::computeNeighborhoodStats(), PLearn::StabilisationLearner::computeOutput(), PLearn::PCA::computeOutput(), PLearn::NormalizationLearner::computeOutput(), PLearn::KNNRegressor::computeOutput(), PLearn::BaseRegressorWrapper::computeOutput(), PLearn::LinearInductiveTransferClassifier::computeOutputAndCosts(), PLearn::RegressionTreeNode::computeOutputAndNodes(), PLearn::GaussMix::computePosteriors(), PLearn::UniformizeLearner::computeRankMap(), computeRanks(), PLearn::SecondIterationWrapper::computeSalesStatistics(), PLearn::ComputeDond2Target::computeTarget(), PLearn::UniformizeLearner::computeWeightedRankMap(), PLearn::SDBVMFieldICBCTargets::convertField(), PLearn::SDBVMFieldDate::convertField(), PLearn::SDBVMField::convertMissing(), correlations(), countOccurencesInColumn(), PLearn::TestImputations::covariancePreservationValue(), PLearn::NGramDistribution::density(), PLearn::DichotomizeDond2DiscreteVariables::dichotomizeDiscreteVariables(), dilogarithm(), double_to_date(), double_to_datetime(), DX_create_grid_outputs_file(), PLearn::ClassErrorCostFunction::evaluate(), PLearn::TruncatedRealFunction::evaluateFeature(), PLearn::ShiftAndRescaleFeatureRealFunction::evaluateFeature(), PLearn::RegressionTreeNode::expandNode(), fast_gauss_01_quantile(), PLearn::ManifoldParzen2::find_nearest_neighbor(), PLearn::ConditionalStatsCollector::findrange(), PLearn::FixDond2BinaryVariables::fixBinaryVariables(), float_to_date(), PLearn::SoftmaxNLLCostModule::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::NLLNeighborhoodWeightsVariable::fprop(), PLearn::NLLCostModule::fprop(), PLearn::NegLogPoissonVariable::fprop(), PLearn::NegCrossEntropySigmoidVariable::fprop(), PLearn::LiftOutputVariable::fprop(), PLearn::DilogarithmVariable::fprop(), PLearn::ProcessSymbolicSequenceVMatrix::from_string_to_int_format(), PLearn::IndexedVMatrix::fullyCheckMappings(), PLearn::ConcatRowsVMatrix::fullyCheckMappings(), gauss_01_quantile(), PLearn::NeighborhoodImputationVMatrix::get(), PLearn::MissingIndicatorVMatrix::get(), PLearn::MeanMedianModeImputationVMatrix::get(), PLearn::CovariancePreservationImputationVMatrix::get(), PLearn::ConditionalMeanImputationVMatrix::get(), PLearn::ConcatRowsVMatrix::get(), PLearn::RegressionTreeRegisters::getAllRegisteredRowLeave(), PLearn::NeighborhoodImputationVMatrix::getColumn(), PLearn::MissingIndicatorVMatrix::getColumn(), PLearn::MeanMedianModeImputationVMatrix::getColumn(), PLearn::CovariancePreservationImputationVMatrix::getColumn(), PLearn::ConditionalMeanImputationVMatrix::getColumn(), PLearn::NeighborhoodImputationVMatrix::getExample(), PLearn::MissingIndicatorVMatrix::getExample(), PLearn::CovariancePreservationImputationVMatrix::getExample(), PLearn::ConditionalMeanImputationVMatrix::getExample(), PLearn::MultiTargetOneHotVMatrix::getNewRow(), PLearn::MovingAverageVMatrix::getNewRow(), PLearn::MissingInstructionVMatrix::getNewRow(), PLearn::MeanImputationVMatrix::getNewRow(), PLearn::JoinVMatrix::getNewRow(), PLearn::IndexedVMatrix::getNewRow(), PLearn::GeneralizedOneHotVMatrix::getNewRow(), PLearn::GaussianizeVMatrix::getNewRow(), PLearn::FinancePreprocVMatrix::getNewRow(), PLearn::DichotomizeVMatrix::getNewRow(), PLearn::CumVMatrix::getNewRow(), PLearn::NGramDistribution::getNGrams(), PLearn::NeighborhoodImputationVMatrix::getRow(), PLearn::MeanMedianModeImputationVMatrix::getRow(), PLearn::CovariancePreservationImputationVMatrix::getRow(), PLearn::ConditionalMeanImputationVMatrix::getRow(), PLearn::NeighborhoodImputationVMatrix::getSubRow(), PLearn::MeanMedianModeImputationVMatrix::getSubRow(), PLearn::CovariancePreservationImputationVMatrix::getSubRow(), PLearn::ConditionalMeanImputationVMatrix::getSubRow(), PLearn::ConcatRowsVMatrix::getSubRow(), PLearn::VMatrix::getValString(), PLearn::LemmatizeVMatrix::getValString(), PLearn::DictionaryVMatrix::getValString(), PLearn::SDBVMOutputCoder::handleOtherAndMissing(), harmonic_mean(), PLearn::TVec< PP< RegressionTreeNode > >::hasMissing(), PLearn::TMat< pair< real, real > >::hasMissing(), PLearn::NeighborhoodImputationVMatrix::impute(), PLearn::DisregardRowsVMatrix::inferIndices(), PLearn::TestImputations::initialize(), PLearn::StructuralLearner::initPreviousLabelCurrentWordBigramMapping(), inverse_sigmoid(), PLearn::ICP::iterate(), PLearn::GaussMix::kmeans(), PLearn::RegressionTreeNode::lookForBestSplit(), PLearn::RealMapping::map(), PLearn::UniformizeLearner::mapToRank(), matlabSave(), mean(), PLearn::GaussMix::missingExpectation(), PLearn::NnlmOnlineLearner::myGetExample(), new_get_compr_data_type(), new_write_raw_data_as(), PLearn::RealMapping::newwrite(), PLearn::HyperOptimize::optimize(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), p_value(), PLearn::PLMathTest::perform(), pl_gcf(), pl_strtof(), powdistance(), PLearn::VMatLanguage::preprocess(), PLearn::RealMapping::print(), PLearn::StatsCollector::pseudo_quantile(), remove_missing(), remove_missing_inplace(), PLearn::VecStatsCollector::remove_observation(), PLearn::StatsCollector::remove_observation(), PLearn::HyperOptimize::reportResult(), PLearn::VMatLanguage::run(), PLearn::TxtmatCommand::run(), PLearn::FieldConvertCommand::run(), save_vmat_as_arff(), PLearn::SDBVMOutputCoder::setOutput(), PLearn::GaussMix::setPredictor(), PLearn::StatsCollector::sharperatio(), PLearn::VecStatsCollector::shouldUpdateWindow(), PLearn::RegressionTreeRegisters::sortEachDim(), PLearn::SortRowsVMatrix::sortRows(), PLearn::StrTableVMatrix::StrTableVMatrix(), sum(), PLearn::StructuralLearner::test(), PLearn::ImputationVMatrix::testResultantVMatrix(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::GaussMix::train(), PLearn::DiscriminativeRBM::train(), PLearn::CubicSpline::train(), PLearn::TextFilesVMatrix::transformStringToValue(), universal_compare(), PLearn::VMFieldStat::update(), PLearn::VecStatsCollector::update(), PLearn::StatsCollector::update(), PLearn::LiftStatsCollector::update(), PLearn::ConditionalStatsCollector::update(), PLearn::ToBagClassifier::updateCostAndBagOutput(), PLearn::StructuralLearner::updateFeatures(), variance(), PLearn::Function::verifyGradient(), PLearn::TxtmatCommand::view(), viewVMat(), vmatmain(), weighted_mean(), PLearn::PStream::writeAsciiNum(), and PLearn::StatsCollector::zpr1t().

{ return false; }
bool PLearn::is_missing ( double  x) [inline]

Missing value for double and float are represented by NaN.

Definition at line 404 of file pl_math.h.

{ return isnan(x); }
bool PLearn::is_missing ( float  x) [inline]

Missing value for double and float are represented by NaN.

Definition at line 407 of file pl_math.h.

{ return isnan(x); }
bool PLearn::is_more ( real  a,
real  b,
real  absolute_tolerance_threshold = 1.0,
real  absolute_tolerance = ABSOLUTE_TOLERANCE,
real  relative_tolerance = RELATIVE_TOLERANCE 
) [inline]

Test float inequality while dealling with 'nan' and 'inf' values.

Definition at line 257 of file pl_math.h.

References is_equal().

{
    return a>b && !is_equal(a,b,absolute_tolerance_threshold,absolute_tolerance,relative_tolerance);

}

Here is the call graph for this function:

real PLearn::is_positive ( real  x) [inline]

"hard" version of the sigmoid, i.e.

the indicator function that is 1 if its argument is STRICTLY positive, and 0 otherwise

Definition at line 443 of file pl_math.h.

Referenced by PLearn::PLMathTest::perform().

{ return x>0? 1 : 0; }

Here is the caller graph for this function:

template<typename RandomAccessIterator >
bool PLearn::is_valid_heap ( RandomAccessIterator  first,
RandomAccessIterator  last 
) [inline]

Version of is_valid_heap that uses less<T> as the strict weak ordering.

Definition at line 135 of file heap_utilities.h.

References is_valid_heap().

{
    typedef typename std::iterator_traits<RandomAccessIterator>::value_type value_type;
    return is_valid_heap(first,last,std::less<value_type>());
}

Here is the call graph for this function:

template<typename RandomAccessIterator , typename StrictWeakOrdering >
bool PLearn::is_valid_heap ( RandomAccessIterator  first,
RandomAccessIterator  last,
StrictWeakOrdering  comp 
)

Verify that the heap condition is satisfied.

Similar to the non-standard 'is_heap' function of the SGI STL implementation. Return true if the heap is valid.

Definition at line 114 of file heap_utilities.h.

References i.

Referenced by is_valid_heap(), and PLearn::HeapTest::perform().

{
    if (first==last)
        return true;

    RandomAccessIterator parent = first;
    int i=1;
    for (RandomAccessIterator it = first+1 ; it < last ; ++it, ++i) {
        if (comp(*parent, *it))
            return false;
        if ((i & 1) == 0)
            ++parent;
    }
    return true;
}

Here is the caller graph for this function:

Var PLearn::isAboveThreshold ( Var  v,
real  threshold = 0,
real  truevalue = 1,
real  falsevalue = 0,
bool  strict = false 
) [inline]

Definition at line 80 of file IsAboveThresholdVariable.h.

Referenced by PLearn::ConditionalDensityNet::build_().

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }

Here is the caller graph for this function:

bool PLearn::isAlpha ( char  c)

Definition at line 2857 of file WordNetOntology.cc.

References isDigit(), and isLetter().

Referenced by isPunctuation().

{
    return (isLetter(c) || isDigit(c));
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::isBlank ( const string &  s)

returns true if s is a blank line (containing only space, tab, until end of line or a # comment-character is reached

Definition at line 271 of file stringutils.cc.

References c, and i.

Referenced by PLearn::TextFilesVMatrix::buildIdx(), getNonBlankLines(), PLearn::VMatLanguage::preprocess(), PLearn::VVMatrix::processJoinSection(), and PLearn::VMatLanguage::staticPreprocess().

{
    string::size_type l = s.length();
    for(unsigned int i=0; i<l; i++)
    {
        char c = s[i];
        if(c=='#' || c=='\n' || c=='\r')
            return true;
        else if(c!=' ' && c!='\t')
            return false;
    }
    return true; // empty line
}

Here is the caller graph for this function:

template<class T >
bool PLearn::isConvertibleToObjectPtr ( const T &  ) [inline]

Return true if toObjectPtr() or toIndexedObjectPtr would succeed.

Definition at line 66 of file ObjectConversions.h.

Referenced by convertible(), PLearn::StaticOption< TVec< VecElementType > >::isAccessibleAsObject(), PLearn::Option< DeallocatorType, self >::isAccessibleAsObject(), isConvertibleToObjectPtr(), and notConvertible().

{
    return boost::is_convertible< typename boost::remove_cv<T>::type,
                                  const Object* >::value
        || boost::is_convertible< typename boost::remove_cv<T>::type*,
                                  const Object* >::value ;
}

Here is the caller graph for this function:

template<class T >
bool PLearn::isConvertibleToObjectPtr ( const PP< T > &  x) [inline]

Definition at line 75 of file ObjectConversions.h.

References isConvertibleToObjectPtr().

{
    return isConvertibleToObjectPtr((T*)0);
}

Here is the call graph for this function:

template<class T >
bool PLearn::isConvertibleToObjectPtr ( const Array< T > &  x) [inline]

Definition at line 81 of file ObjectConversions.h.

References isConvertibleToObjectPtr().

{
    return isConvertibleToObjectPtr((T*)0);
}

Here is the call graph for this function:

template<class T >
bool PLearn::isConvertibleToObjectPtr ( const TVec< T > &  x) [inline]

Definition at line 87 of file ObjectConversions.h.

References isConvertibleToObjectPtr().

{
    return isConvertibleToObjectPtr((T*)0);
}

Here is the call graph for this function:

template<class T >
bool PLearn::isConvertibleToObjectPtr ( const Array< PP< T > > &  x) [inline]

Definition at line 93 of file ObjectConversions.h.

References isConvertibleToObjectPtr().

{
    return isConvertibleToObjectPtr((T*)0);
}

Here is the call graph for this function:

template<class T >
bool PLearn::isConvertibleToObjectPtr ( const TVec< PP< T > > &  x) [inline]

Definition at line 99 of file ObjectConversions.h.

References isConvertibleToObjectPtr().

{
    return isConvertibleToObjectPtr((T*)0);
}

Here is the call graph for this function:

Var PLearn::isdifferent ( Var  v1,
Var  v2 
)

Definition at line 183 of file Var_operators.cc.

References isequal().

{ return (1.0 - isequal(v1,v2) ); }

Here is the call graph for this function:

bool PLearn::isDigit ( char  c)

Definition at line 2852 of file WordNetOntology.cc.

Referenced by isAlpha(), isAlpha(), and trimWord().

{
    return (c >= 48 && c <= 57);
}

Here is the caller graph for this function:

bool PLearn::isdir ( const PPath &  path)

Returns true if the given path is an existing directory (or a symbolic link pointing to a directory).

Definition at line 127 of file fileutils.cc.

References PLearn::PPath::absolute().

Referenced by PLearn::DiskVMatrix::build_(), PLearn::PyPLearnScript::close(), PLearn::VVMatrix::createPreproVMat(), force_mkdir(), force_rmdir(), getDataSet(), openFile(), PLearn::VMatrix::resolveFieldInfoLink(), savePMatFieldnames(), PLearn::SourceVMatrix::setMetaDataDir(), train_and_test(), and PLearn::PrecomputedVMatrix::usePrecomputed().

{
    PRFileInfo64 fi;

    if (PR_GetFileInfo64(path.absolute().c_str(), &fi) != PR_SUCCESS)
        return false;
    else
        return fi.type == PR_FILE_DIRECTORY;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::isemptyFile ( const PPath &  path)

Returns true if the given path is an existing regular file (or a symbolic link pointing to a file) and the size of the file is 0.

Definition at line 153 of file fileutils.cc.

References PLearn::PPath::absolute().

Referenced by PLearn::TextFilesVMatrix::setMetaDataDir().

{
    PRFileInfo64 fi;

    if (PR_GetFileInfo64(path.absolute().c_str(), &fi) != PR_SUCCESS)
        return false;
    else
        return (fi.type == PR_FILE_FILE) && (fi.size == 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::isequal ( Var  v1,
Var  v2 
)

First case: v1 and v2 are two vectors of length() l resulting Var is 1 if for all i=0 to l-1, v1->value[i] == v2->value[i], 0 otherwise Second case: one of v1 or v2 is a scalar variable (length() 1) and the other is a vector of length() l resulting Var is a vector of length() l, doing an element-wise comparison

Definition at line 99 of file EqualVariable.cc.

Referenced by isdifferent(), PLearn::FunctionalRandomVariable::logP(), operator!=(), and operator==().

{
    if(v2->isScalar())
        return new EqualScalarVariable(v1,v2);
    else if(v1->isScalar())
        return new EqualScalarVariable(v2,v1);
    else
        return new EqualVariable(v1,v2);
}

Here is the caller graph for this function:

bool PLearn::isfile ( const PPath &  path)

Returns true if the given path is an existing regular file (or a symbolic link pointing to a file).

Definition at line 140 of file fileutils.cc.

References PLearn::PPath::absolute().

Referenced by PLearn::AnalyzeFieldStats::analyzeVariableStats(), PLearn::AsciiVMatrix::AsciiVMatrix(), PLearn::VariableDeletionVMatrix::build_(), PLearn::ProcessDatasetVMatrix::build_(), PLearn::FileVMatrix::build_(), PLearn::DiskVMatrix::build_(), PLearn::CovariancePreservationImputationVMatrix::build_(), PLearn::AsciiVMatrix::build_(), PLearn::VVMatrix::buildFilteredVMatFromVPL(), PLearn::TestImputations::computeCovPresStats(), PLearn::TestImputations::computeMeanMedianModeStats(), PLearn::NeighborhoodConditionalMean::computeNeighborhood(), PLearn::TestImputations::computeTreeCondMeanStats(), PLearn::VVMatrix::createPreproVMat(), cross_valid(), PLearn::Experimentation::experimentSetUp(), PLearn::NeighborhoodConditionalMean::experimentWithVariousKs(), filter(), fullyRebalance2Classes(), PLearn::VVMatrix::generateVMatIndex(), getDataSet(), PLearn::VMatrix::getFieldInfos(), PLearn::AutoSDBVMatrix::getMappings(), getMultipleModelAliases(), PLearn::VVMatrix::getPrecomputedDataName(), PLearn::VMatrix::getPrecomputedStatsFromFile(), PLearn::VMatrix::getRanges(), PLearn::HyperOptimize::getResultsMat(), PLearn::VMatrix::getSavedFieldInfos(), PLearn::VMatrix::getSavedSizes(), PLearn::VMatrix::getSFIFFilename(), grep(), PLearn::SDBWithStats::hasStats(), PLearn::HelpCommand::helpAboutPLearnScript(), PLearn::HelpCommand::helpAboutPyPLearnScript(), PLearn::TestImputations::initialize(), is_command(), PLearn::Cache< KeyType, ValueType >::isOnFile(), PLearn::VVMatrix::isPrecomputedAndUpToDate(), PLearn::VMatrix::isUpToDate(), PLearn::ConditionalMeanImputationVMatrix::loadCondMeanMatrix(), PLearn::TextFilesVMatrix::loadMappings(), PLearn::VMatrix::loadStringMapping(), PLearn::Cache< KeyType, ValueType >::loadValue(), PLearn::VMatrix::lockMetaDataDir(), PLearn::Preprocessing::manageTrainTestUnknownSets(), PLearn::PPath::metaprotocolToMetapath(), old_plearn_main(), PLearn::IntVecFile::open(), PLearn::CompactFileVMatrix::openCurrentFile(), PLearn::FilteredVMatrix::openIndex(), PLearn::PyPLearnScript::openScriptFile(), readFileAndMacroProcess(), rebalanceNClasses(), PLearn::VMatrix::resolveFieldInfoLink(), PLearn::Experimentation::reviewGlobalStats(), PLearn::AnalyzeFieldStats::reviewGlobalStats(), PLearn::VMatCommand::run(), PLearn::RunCommand::run(), PLearn::SourceVMatrix::setMetaDataDir(), PLearn::MeanMedianModeImputationVMatrix::setMetaDataDir(), PLearn::GaussianizeVMatrix::setMetaDataDir(), smartLoadObject(), PLearn::Learner::stop_if_wanted(), PLearn::TestImputations::train(), PLearn::NNet::train(), train_and_test(), PLearn::PrecomputedVMatrix::usePrecomputed(), and vmatmain().

{
    PRFileInfo64 fi;

    if (PR_GetFileInfo64(path.absolute().c_str(), &fi) != PR_SUCCESS)
        return false;
    else
        return fi.type == PR_FILE_FILE;
}

Here is the call graph for this function:

template<class T >
void PLearn::isLargerThan ( const TVec< T > &  first,
const TVec< T > &  second,
TVec< T > &  dest 
)

Definition at line 2310 of file TMat_maths_impl.h.

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

{
    int n=first.length();
    if(n!=second.length() || n!=dest.length())
        PLERROR("isLargerThan(TVec<T>(%d), TVec<T>(%d), TVec<T>(%d)) args of unequal length",
                n, second.length(), dest.length());
    if (n > 0) {
        T* f=first.data();
        T* s=second.data();
        T* d=dest.data();
        for (int i=0; i<n; i++)
            d[i] = f[i] > s[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::isLargerThanOrEqualTo ( const TVec< T > &  first,
const TVec< T > &  second,
TVec< T > &  dest 
)

Definition at line 2327 of file TMat_maths_impl.h.

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

{
    int n=first.length();
    if(n!=second.length() || n!=dest.length())
        PLERROR("isLargerThan(TVec<T>(%d), TVec<T>(%d), TVec<T>(%d)) args of unequal length",
                n, second.length(), dest.length());
    if (n > 0) {
        T* f=first.data();
        T* s=second.data();
        T* d=dest.data();
        for (int i=0; i<n; i++)
            d[i] = f[i] >= s[i];
    }
}

Here is the call graph for this function:

bool PLearn::isLegalPunct ( char  c)

Definition at line 2862 of file WordNetOntology.cc.

Referenced by trimWord().

{
    return (c == '.' || c == '_');
}

Here is the caller graph for this function:

bool PLearn::isLetter ( char  c)

Definition at line 2847 of file WordNetOntology.cc.

Referenced by isAlpha(), isAlpha(), and trimWord().

{
    return (c >= 65 && c <= 90) || (c >= 97 && c <= 122);
}

Here is the caller graph for this function:

bool PLearn::isMapKeysAreInt ( map< real, int > &  m)

check that all keys of the map are int values

Definition at line 100 of file general.cc.

References fast_exact_is_equal().

Referenced by PLearn::CompactVMatrix::CompactVMatrix().

{
    map<real,int>::iterator it;
    for (it = m.begin(); it!= m.end(); ++it)
    {
        real key_rvalue = it->first;
        int key_ivalue = int(key_rvalue);
        if (!fast_exact_is_equal(key_rvalue, key_ivalue))
            return false;
    }
    return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::isMissing ( Var  x,
bool  parallel,
bool  set_parallel_missing_output,
real  parallel_missing_output 
) [inline]

Definition at line 98 of file IsMissingVariable.h.

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

Referenced by PLearn::NeuralNet::build_(), PLearn::DistRepNNet::buildSparseAffineTransform(), and PLearn::DistRepNNet::buildSparseAffineTransformWeightPenalty().

                                                                                                           { 
    Vec parallel_missing_outputs(x->size()); 
    parallel_missing_outputs.fill(parallel_missing_output); 
    return new IsMissingVariable(x, parallel,set_parallel_missing_output,parallel_missing_outputs); }

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::isMissing ( Var  x,
bool  parallel = 0,
bool  set_parallel_missing_output = 0,
Vec  parallel_missing_outputs = Vec(0) 
) [inline]

Definition at line 102 of file IsMissingVariable.h.

{ return new IsMissingVariable(x, parallel,set_parallel_missing_output,parallel_missing_outputs); }
bool PLearn::isOverlapping ( Vec &  test_pt,
Vec &  test_normal,
const SurfMesh &  mesh2,
const TVec< set< int > > &  face_cache,
GenericNN &  btl,
const real  init_dist_t,
const real  normal_t,
int closest_vertex,
Vec &  closest_pt,
real closest_dist 
)

Definition at line 821 of file geometry.cc.

References calcNormal(), closestFacePoint(), dot(), getNearestVertex(), MISSING_VALUE, PLWARNING, and pointIsInterior().

Referenced by PLearn::ICP::iterate().

{
  real dist_t = init_dist_t;

  getNearestVertex( test_pt, mesh2, btl,
                    closest_vertex, closest_pt, closest_dist );
/*
  // find closest vertex on mesh2
  Vec dists;
  Vec outputs;
//  Vec targets;
  btl->computeOutputAndCosts( test_pt, Vec(), outputs, dists );

  closest_vertex = (int) outputs[0];
  closest_dist = dists[0];
*/
  int closest_face;
  TriType closest_tri_type;

  // find closest face point on mesh2
  if( !closestFacePoint( test_pt, face_cache[closest_vertex], mesh2, dist_t,
                         closest_pt, closest_dist, closest_face,
                         closest_tri_type ) )
  {
    // should not happen
    closest_dist = dist_t;
    closest_pt = Vec( 3, MISSING_VALUE );
    PLWARNING( "no closest face point found for %i.\n", closest_vertex );
    return false;
  }

  if( !pointIsInterior( closest_tri_type, closest_face, mesh2 ) )
  {
    return false;
  }

  // check if normals agree within threshold
  // 1 compute normal for point on mesh2
  // 2 compare normals with dot product
  MFace mf = mesh2->getFace( closest_face );
  MVertex p1 = mesh2->getVertex( mf->pts[0] );
  MVertex p2 = mesh2->getVertex( mf->pts[1] );
  MVertex p3 = mesh2->getVertex( mf->pts[2] );

  Vec m2_normal = calcNormal( p1->coord, p2->coord, p3->coord,
                              p1->norm, p2->norm, p3->norm,
                              closest_pt );

  if( dot( test_normal, m2_normal ) < cos( normal_t ) )
  {
    return false;
  }

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::isParagraphBlank ( const string &  s)

returns true if s is a blank paragraph (containing only space, tab, until end of **string**)

Definition at line 286 of file stringutils.cc.

References c, and i.

{
    string::size_type l = s.length();
    bool in_comment=false;
    for(unsigned int i=0; i<l; i++)
    {
        char c = s[i];
        if(c=='#')
            in_comment=true;
        else if(c=='\n' || c=='\r')
            in_comment=false;
        else if(c!=' ' && c!='\t' && !in_comment)
            return false;
    }
    return true; // empty line
}
template<class T >
void PLearn::isSmallerThan ( const TVec< T > &  first,
const TVec< T > &  second,
TVec< T > &  dest 
)

Definition at line 2344 of file TMat_maths_impl.h.

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

{
    int n=first.length();
    if(n!=second.length() || n!=dest.length())
        PLERROR("isLargerThan(TVec<T>(%d), TVec<T>(%d), TVec<T>(%d)) args of unequal length",
                n, second.length(), dest.length());
    if (n > 0) {
        T* f=first.data();
        T* s=second.data();
        T* d=dest.data();
        for (int i=0; i<n; i++)
            d[i] = f[i] < s[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::isSmallerThanOrEqualTo ( const TVec< T > &  first,
const TVec< T > &  second,
TVec< T > &  dest 
)

Definition at line 2361 of file TMat_maths_impl.h.

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

{
    int n=first.length();
    if(n!=second.length() || n!=dest.length())
        PLERROR("isLargerThan(TVec<T>(%d), TVec<T>(%d), TVec<T>(%d)) args of unequal length",
                n, second.length(), dest.length());
    if (n > 0) {
        T* f=first.data();
        T* s=second.data();
        T* d=dest.data();
        for (int i=0; i<n; i++)
            d[i] = f[i] <= s[i];
    }
}

Here is the call graph for this function:

void PLearn::iterate ( ObjectGraphIterator  grit,
ObjectGraphIterator  grend 
)

Definition at line 226 of file ObjectGraphIteratorTest.cc.

References PLearn::Object::classname(), endl(), PLearn::ObjectGraphIterator::getCurrentOptionName(), and x.

Referenced by PLearn::RemoveDuplicateVMatrix::build_(), and PLearn::ObjectGraphIteratorTest::perform().

{
    for ( ; grit != grend ; ++grit ) {
        const Object* curobj = *grit;
        cout << "Encountered class \"" << curobj->classname() << "\""
             << " at option \"" << grit.getCurrentOptionName() << "\"" << endl;
        if (const X* x = dynamic_cast<const X*>(curobj)) {
            cout << "... and name is: " << x->name << endl;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::jacobi ( Mat &  a,
Vec &  d,
Mat &  v,
int nrot 
)

Definition at line 308 of file geometry.cc.

References a, b, c, diagonalmatrix(), g, i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), n, PLERROR, rotate(), sqrt(), and PLearn::TMat< T >::width().

Referenced by calcPlaneParams(), and weightedRotationFromMatchedPoints().

{
  int n = a.length();
  if( n != a.width() || n != v.length() || n != v.width() || n != d.length() )
  {
    PLERROR( "in jacobi( a, d, v, nrot ):\n a.length(), a.width(), v.length(), v.width() and d.length() must be equal" );
  }

  // v = identity
  v = diagonalmatrix( Vec( n, 1 ) );
  nrot = 0;

  Vec b( n );
  Vec z( n );

  for( int ip=0 ; ip<n ; ip++ )
  {
    real val = a( ip,  ip );
    b[ ip ] = val;
    d[ ip ] = val;
  }

  for( int i=0 ; i<50 ; i++ )
  {
    real sm = 0;
    real tresh;
    for( int ip=0 ; ip<n-1 ; ip++ )
    {
      for( int iq=ip+1 ; iq<n ; iq++ )
      { sm += fabs( a( ip, iq ) ); }
    }

    if( sm == 0 )
    { return 1; }

    if( i < 3 )
    { tresh = 0.2*sm/(n*n); }
    else
    { tresh = 0; }

    for( int ip=0 ; ip<n-1 ; ip++ )
    {
      for( int iq=ip+1 ; iq<n ; iq++ )
      {
        real g=100.0 * fabs( a( ip, iq ) );
        if( i>3 && ( fabs( d[ip] ) + g == fabs( d[ip] ) )
            && ( fabs( d[iq] ) + g == fabs( d[iq] ) ) )
        { a( ip, iq ) = 0; }
        else if( fabs( a( ip, iq ) ) > tresh )
        {
          real h = d[iq] - d[ip];
          real t;
          if( fabs( h ) + g == fabs( h ) )
          { t = a( ip, iq ) / h; }
          else
          {
            real theta = 0.5 * h/( a( ip, iq ) );
            t = 1.0 / ( fabs( theta ) + sqrt( 1.0 + theta*theta ) );
            if( theta < 0.0 )
            { t = -t; }
          }
          real c = 1.0 / sqrt( 1 + t*t );
          real s = t*c;
          real tau = s / ( 1.0 + c );
          h = t*a( ip, iq );
          z[ip] -= h;
          z[iq] += h;
          d[ip] -= h;
          d[iq] += h;
          a( ip, iq ) = 0.0;

          for( int j=0 ; j<=ip-1 ; j++ )
          {
            rotate( a, j, ip, j, iq, s, tau );
          }
          for( int j=ip+1 ; j<=iq-1 ; j++ )
          {
            rotate( a, ip, j, j, iq , s, tau );
          }
          for( int j=iq+1 ; j<n ; j++ )
          {
            rotate( a, ip, j, iq, j, s, tau );
          }
          for( int j=0 ; j<n ; j++ )
          {
            rotate( v, j, ip, j, iq, s, tau );
          }
          ++nrot;
        }
      }
    }
    b += z;
    d << b;
    z = 0;
  }
  PLERROR( "jacobi: too many iterations" );
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::join ( const vector< string > &  s,
const string &  separator 
)

makes a single string from a vector of strings

Definition at line 569 of file stringutils.cc.

{
    string result;
    vector<string>::const_iterator it = s.begin();
    if(it!=s.end())
    {
        for(;;)
        {
            result += *it;
            ++it;
            if(it==s.end())
                break;
            result += separator;
        }
    }
    return result;
}
string PLearn::join ( const Array< string > &  s,
const string &  separator 
) [inline]
string PLearn::join ( const TVec< string > &  s,
const string &  separator 
) [inline]

Definition at line 968 of file TMat_impl.h.

References i, and PLearn::TVec< T >::size().

{
    string result;
    for(int i=0; i<s.size(); i++)
    {
        result += s[i];
        if(i<s.size()-1)
            result += separator;
    }
    return result;
}

Here is the call graph for this function:

template<class MatT >
int PLearn::kernelPCAfromDotProducts ( MatT &  dot_products,
Mat  embedding,
int  max_n_eigen_iter = 300,
real  ncv2nev_ratio = 1.5,
Vec *  eval = 0,
Mat *  evec = 0 
)

Perform kernel PCA on a set of objects for which the dot product between each pair of objects is provided. The dot-product matrix can be sparse, for objects which are "far" from each other. An embedding for each object is returned, which attempts to respect these dot products. The dimension of the embedding is specified by the user-set dimensions of the embedding matrix (n_objects x embedding_dimension).

extract the embedding: embedding(object i, feature j) = e_vectors(j,i)*sqrt(e_values[j])

Definition at line 962 of file GenMat.h.

References PLearn::TMat< T >::column(), eigenSparseSymmMat(), FORTRAN_Integer, j, PLearn::TMat< T >::length(), m, n, PLERROR, PLWARNING, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), sqrt(), PLearn::TVec< T >::swap(), PLearn::TMat< T >::swapUpsideDown(), and PLearn::TMat< T >::width().

{
    int n=dot_products.length();
    FORTRAN_Integer m=embedding.width();
    if (embedding.length()!=n)
        PLERROR("kernelPCAfromDotProducts: expected embedding.length()==dot_products.length(), got %d!=%d",
                embedding.length(),n);
    if (dot_products.width()!=n)
        PLERROR("kernelPCAfromDotProducts: expected dot_products a square matrix, got %d x %d",
                n,dot_products.width());

    static Vec e_values;
    e_values.resize(m);
    static Mat e_vectors;
    e_vectors.resize(m,n);
    
    if (evec) *evec = e_vectors;
    if (eval) *eval = e_values;

    int err=eigenSparseSymmMat(dot_products, e_values, 
                               e_vectors, m, max_n_eigen_iter,
                               true, true, false, false, ncv2nev_ratio);
    // change the order so that the largest e-value comes first
    e_values.swap();
    e_vectors.swapUpsideDown();

    if (!(err==0 || err==1))
        return err;
    static Vec feature;
    feature.resize(n);
    for (int j=0;j<m;j++)
    {
        real eval_j = e_values[j];
        if (eval_j<0)
        {
            PLWARNING("metricMultiDimensionalScaling::the matrix of dot-products is not positive-definite!, evalue=%g",eval_j);
            eval_j = -eval_j*0.2; // HEURISTIC TRICK, keep negative e-values, but smaller
        }
        real scale = sqrt(eval_j);
        feature << e_vectors(j);
        feature *= scale;
        embedding.column(j) << feature;
    }
    return 0;
}

Here is the call graph for this function:

real PLearn::KS_test ( real  D,
real  N,
int  conv = 10 
)

Return the probability that the Kolmogorov-Smirnov statistic D takes the observed value or greater, given the null hypothesis that the distributions that are compared are really identical. N is the effective number of samples used for comparing the distributions. The argument conv gives the precision with which this probability is computed. A value above 10 does not bring much improvement. Note that the statistic D can be obtained as follows:

Comparing two empirical distributions from data sets D_1 and D_2: Let F_1(x) the empirical cumulative distribution of D_1 of size N_1, and let F_2(x) the empirical cumulative distribution of D_2 of size N_2. Then

D = max_x | F_1(x) - F_2(x) |

and the effective N is N_1 N_2 / (N_1 + N_2).

Comparing a theoretical distribution F and a data set D of size N with empirical cumulative distribution F_N:

D = max_x | F(x) - F_N(x) |

This function returns the following

P(D > observed d | same distributions) estimated by 2 sum_{k=1}^{infty} (-1)^{k-1} exp(-2k^2 a^2)

where a = sqrt(D*(sqrt(N)+0.12+0.11/sqrt(N)))

Ref: Stephens, M.A. (1970), Journal of the Royal Statistical Society B, vol. 32, pp. 115-122.

Definition at line 273 of file stats_utils.cc.

References exp(), sqrt(), and x.

Referenced by KS_test(), remote_KS_test(), remote_KS_tests(), PLearn::KolmogorovSmirnovCommand::run(), and vmatmain().

{
    int k;
    real res = 0.0;
    real sn = sqrt((double)N);
    real ks = D*(sn+0.12+0.11/sn);
    real ks2 = ks*ks;
    for (k=1;k<=conv;k++) {
        real x = ((k % 2) ? 1 : -1) * exp( -2 * ks2 * k * k );
        if (k==conv)
            res += 0.5*x;
        else 
            res += x;
    }
    return 2 * res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::KS_test ( Vec &  v1,
Vec &  v2,
int  conv,
real D,
real p_value 
)

Kolmogorov-Smirnov test.

Computes D (the max abs dfference between the 2 cdfs) and p_value P(random variable D > observed D|no difference in true prob) A reasonable value for D is 10. The call sorts v1 and v2.

Definition at line 290 of file stats_utils.cc.

References KS_test(), PLearn::TVec< T >::length(), max_cdf_diff(), and N.

{
    int n1 = v1.length();
    int n2 = v2.length();
    real N = (n1/real(n1+n2))*n2;
    D = max_cdf_diff(v1, v2);
    p_value = KS_test(D,N,conv);
}

Here is the call graph for this function:

void PLearn::KS_test ( const VMat &  m1,
const VMat &  m2,
const int  conv,
Vec &  Ds,
Vec &  p_values,
const bool  report_progress 
)

This version work with nan value.

Returns result of Kolmogorov-Smirnov test for each pair of variable between the two VMat.

Definition at line 300 of file stats_utils.cc.

References PLearn::VMat::getColumn(), KS_test(), PLearn::VMat::length(), p_value(), remove_missing_inplace(), PLearn::TVec< T >::resize(), and PLearn::VMat::width().

{
    m1->compatibleSizeError(m2);
    Ds.resize(m1->width());
    p_values.resize(m1->width());
    PP<ProgressBar> pbar;
    if (report_progress)
        pbar = new ProgressBar("Computing Kologorov Smirnow two sample test",
                               m1->width());

#pragma omp parallel default(none) shared(pbar)
    {
        Vec row1(m1->length());
        Vec row2(m2->length());
#pragma omp for
    for(int col = 0;col<m1->width();col++)
    {
        row1->resize(m1->length());
        row2->resize(m2->length());
#pragma omp critical
        m1->getColumn(col,row1);//not threadsafe!
#pragma omp critical
        m2->getColumn(col,row2);//not threadsafe!
        remove_missing_inplace(row1);
        remove_missing_inplace(row2);
        real D;
        real p_value;
        KS_test(row1,row2,conv,D,p_value);
        Ds[col]=D;
        p_values[col]=p_value;
        if (report_progress)
            pbar->update(col);
    }
    }
}

Here is the call graph for this function:

real PLearn::KS_test ( Vec &  v1,
Vec &  v2,
int  conv 
)

Returns result of Kolmogorov-Smirnov test between 2 samples The call sorts v1 and v2.

Definition at line 336 of file stats_utils.cc.

References KS_test().

{
    real D, ks_stat;
    KS_test(v1,v2,conv,D, ks_stat);
    return ks_stat;
}

Here is the call graph for this function:

template<class T >
T PLearn::kthOrderedElement ( const TVec< T > &  vec,
int  k 
) [inline]

returns the value of the kth ordered element of v k can take values 0 to vec.length()-1

Definition at line 2489 of file TMat_maths_impl.h.

References positionOfkthOrderedElement().

Referenced by median().

{ return vec[positionOfkthOrderedElement(vec,k)]; }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::L1distance ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
) [inline]

Definition at line 1133 of file TMat_maths_impl.h.

References dist().

Referenced by PLearn::DTWKernel::build_().

{ return dist(vec1, vec2, 1.0); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::L2distance ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
) [inline]

Definition at line 1129 of file TMat_maths_impl.h.

References dist().

Referenced by PLearn::DTWKernel::build_(), PLearn::EpanechnikovKernel::evaluate(), hyperplaneDistance(), PLearn::NatGradEstimator::operator()(), and printDistanceStatistics().

{ return dist(vec1, vec2, 2.0); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapack_Xgesdd_ ( char *  JOBZ,
int M,
int N,
double *  A,
int LDA,
double *  S,
double *  U,
int LDU,
double *  VT,
int LDVT,
double *  WORK,
int LWORK,
int IWORK,
int INFO 
) [inline]

Definition at line 61 of file plapack.h.

References dgesdd_().

Referenced by lapackSVD().

{ dgesdd_(JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, IWORK, INFO); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapack_Xgesdd_ ( char *  JOBZ,
int M,
int N,
float *  A,
int LDA,
float *  S,
float *  U,
int LDU,
float *  VT,
int LDVT,
float *  WORK,
int LWORK,
int IWORK,
int INFO 
) [inline]

Definition at line 64 of file plapack.h.

References sgesdd_().

{ sgesdd_(JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, IWORK, INFO); }

Here is the call graph for this function:

void PLearn::lapack_Xposvx_ ( char *  FACT,
char *  UPLO,
int N,
int NRHS,
float *  A,
int LDA,
float *  AF,
int LDAF,
char *  EQUED,
float *  S,
float *  B,
int LDB,
float *  X,
int LDX,
float *  RCOND,
float *  FERR,
float *  BERR,
float *  WORK,
int IWORK,
int INFO 
) [inline]

Definition at line 95 of file plapack.h.

References sposvx_().

{
    sposvx_(FACT, UPLO, N, NRHS, A,     LDA,  AF,   LDAF, EQUED, S,
            B,    LDB,  X, LDX,  RCOND, FERR, BERR, WORK, IWORK, INFO);
}

Here is the call graph for this function:

void PLearn::lapack_Xposvx_ ( char *  FACT,
char *  UPLO,
int N,
int NRHS,
double *  A,
int LDA,
double *  AF,
int LDAF,
char *  EQUED,
double *  S,
double *  B,
int LDB,
double *  X,
int LDX,
double *  RCOND,
double *  FERR,
double *  BERR,
double *  WORK,
int IWORK,
int INFO 
) [inline]

Definition at line 104 of file plapack.h.

References dposvx_().

{
    dposvx_(FACT, UPLO, N, NRHS, A,     LDA,  AF,   LDAF, EQUED, S,
            B,    LDB,  X, LDX,  RCOND, FERR, BERR, WORK, IWORK, INFO);
}

Here is the call graph for this function:

void PLearn::lapack_Xpotrf_ ( char *  UPLO,
int N,
float *  A,
int LDA,
int INFO 
) [inline]

Definition at line 80 of file plapack.h.

References spotrf_().

Referenced by lapackCholeskyDecompositionInPlace().

{ spotrf_(UPLO, N, A, LDA, INFO); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapack_Xpotrf_ ( char *  UPLO,
int N,
double *  A,
int LDA,
int INFO 
) [inline]

Definition at line 83 of file plapack.h.

References dpotrf_().

{ dpotrf_(UPLO, N, A, LDA, INFO); }

Here is the call graph for this function:

void PLearn::lapack_Xpotrs_ ( char *  UPLO,
int N,
int NRHS,
float *  A,
int LDA,
float *  B,
int LDB,
int INFO 
) [inline]

Definition at line 87 of file plapack.h.

References spotrs_().

Referenced by lapackCholeskySolveInPlace().

{ spotrs_(UPLO, N, NRHS, A, LDA, B, LDB, INFO); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapack_Xpotrs_ ( char *  UPLO,
int N,
int NRHS,
double *  A,
int LDA,
double *  B,
int LDB,
int INFO 
) [inline]

Definition at line 90 of file plapack.h.

References dpotrs_().

{ dpotrs_(UPLO, N, NRHS, A, LDA, B, LDB, INFO); }

Here is the call graph for this function:

void PLearn::lapack_Xsyevr_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  VL,
float *  VU,
int IL,
int IU,
float *  ABSTOL,
int M,
float *  W,
float *  Z,
int LDZ,
int ISUPPZ,
float *  WORK,
int LWORK,
int IWORK,
int LIWORK,
int INFO 
) [inline]

Definition at line 67 of file plapack.h.

References ssyevr_().

{ ssyevr_(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO);}

Here is the call graph for this function:

void PLearn::lapack_Xsyevr_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  VL,
double *  VU,
int IL,
int IU,
double *  ABSTOL,
int M,
double *  W,
double *  Z,
int LDZ,
int ISUPPZ,
double *  WORK,
int LWORK,
int IWORK,
int LIWORK,
int INFO 
) [inline]

Definition at line 70 of file plapack.h.

References dsyevr_().

{ dsyevr_(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO);}

Here is the call graph for this function:

void PLearn::lapack_Xsyevx_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  VL,
double *  VU,
int IL,
int IU,
double *  ABSTOL,
int M,
double *  W,
double *  Z,
int LDZ,
double *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
) [inline]

Definition at line 55 of file plapack.h.

References dsyevx_().

Referenced by eigen_SymmMat(), and lapackEIGEN().

{ dsyevx_(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapack_Xsyevx_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  VL,
float *  VU,
int IL,
int IU,
float *  ABSTOL,
int M,
float *  W,
float *  Z,
int LDZ,
float *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
) [inline]

Definition at line 58 of file plapack.h.

References ssyevx_().

{ ssyevx_(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO); }

Here is the call graph for this function:

void PLearn::lapack_Xsygvx_ ( int ITYPE,
char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
double *  A,
int LDA,
double *  B,
int LDB,
double *  VL,
double *  VU,
int IL,
int IU,
double *  ABSTOL,
int M,
double *  W,
double *  Z,
int LDZ,
double *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
) [inline]

Definition at line 73 of file plapack.h.

References dsygvx_().

Referenced by lapackGeneralizedEIGEN().

{ dsygvx_(ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapack_Xsygvx_ ( int ITYPE,
char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  B,
int LDB,
float *  VL,
float *  VU,
int IL,
int IU,
float *  ABSTOL,
int M,
float *  W,
float *  Z,
int LDZ,
float *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
) [inline]

Definition at line 76 of file plapack.h.

References ssygvx_().

{ ssygvx_(ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL, INFO); }

Here is the call graph for this function:

void PLearn::lapackCholeskyDecompositionInPlace ( Mat &  A,
char  uplo = 'L' 
)

Call LAPACK to perform in-place Cholesky Decomposition of a square SYMMETRIC matrix A.

Note that the matrix mod must equal its width in the current implementation. The argument uplo is a single character, which is either 'L' if the lower-triangle should be considered (and the returned cholesky is L * L') or 'U' if the upper-triangle should be considered (and the returned cholesky is U' * U). [[Implementation note: in the call to LAPACK, we swap those letters in order to reflect the row-ordering differences between PLearn and LAPACK.]]

Definition at line 422 of file plapack.cc.

References PLearn::TMat< T >::data(), lapack_Xpotrf_(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), N, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    if (A.width() == 0 || A.length() == 0)
        return;
    if (A.mod() != A.width())
        PLERROR("lapackCholeskyDecompositionInPlace: matrix mod (%d) must equal "
                "its width (%d)", A.mod(), A.width());
    if (A.width() != A.length())
        PLERROR("lapackCholeskyDecompositionInPlace: matrix width (%d) and height (%d) "
                "must be equal", A.width(), A.length());

    char lapack_uplo;
    switch (uplo) {
    case 'L':
    case 'l':
        lapack_uplo = 'U';
        break;

    case 'U':
    case 'u':
        lapack_uplo = 'L';
        break;

    default:
        PLERROR("lapackCholeskyDecompositionInPlace: unrecognized character '%c' for "
                "argument 'uplo'; valid characters are 'U' and 'L'", uplo);
    }

    real* data = A.data();
    int N = A.width();
    int INFO;

    // call LAPACK
    lapack_Xpotrf_(&lapack_uplo, &N, data, &N, &INFO);

    if (INFO == 0)
        return;                              // all successful
    else if (INFO < 0)
        PLERROR("lapackCholeskyDecompositionInPlace: implementation error; argument %d "
                "to xPOTRF had an illegal value", -INFO);
    else
        PLERROR("lapackCholeskyDecompositionInPlace: error in decomposition; "
                "leading minor of order %d is not positive definite, "
                "and the factorization could not be completed.", INFO);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::lapackCholeskySolveInPlace ( Mat &  A,
Mat &  B,
bool  B_is_column_major = false,
char  uplo = 'L' 
)

Call LAPACK to solve in-place a linear system given its previously-computed Cholesky decomposition.

The argument B contains the matrix of right-hand-sides. Since LAPACK is column-major, one can specify if 'B' is ALREADY in column-major to avoid a transpose (which would otherwise be performed automatically by this function). The argument uplo is a single character, which is either 'L' if the lower-triangle should be considered (and the returned cholesky is L * L') or 'U' if the upper-triangle should be considered (and the returned cholesky is U' * U). [[Implementation note: in the call to LAPACK, we swap those letters in order to reflect the row-ordering differences between PLearn and LAPACK.]]

On return, B contains the solution matrix. A is not modified and can be reused in further calls to lapackCholeskySolveInPlace.

Definition at line 471 of file plapack.cc.

References PLearn::TMat< T >::data(), lapack_Xpotrs_(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), N, PLASSERT, PLERROR, transpose(), and PLearn::TMat< T >::width().

Referenced by PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    if (A.width() == 0 || A.length() == 0 || B.width() == 0 || B.length() == 0)
        return;
    if (A.mod() != A.width())
        PLERROR("lapackCholeskySolveInPlace: matrix A mod (%d) must equal "
                "its width (%d)", A.mod(), A.width());
    if (B.mod() != B.width())
        PLERROR("lapackCholeskySolveInPlace: matrix B mod (%d) must equal "
                "its width (%d)", B.mod(), B.width());
    if (A.width() != A.length())
        PLERROR("lapackCholeskySolveInPlace: matrix width (%d) and height (%d) "
                "must be equal", A.width(), A.length());
    if ((! B_is_column_major && B.length() != A.length()) ||
        (  B_is_column_major && B.width()  != A.length()) )
        PLERROR("lapackCholeskySolveInPlace: matrix B length (%d) is "
                "incompatible with the dimensions of A (%d)",
                (B_is_column_major? B.width() : B.length()), A.length());

    char lapack_uplo;
    switch (uplo) {
    case 'L':
    case 'l':
        lapack_uplo = 'U';
        break;

    case 'U':
    case 'u':
        lapack_uplo = 'L';
        break;

    default:
        PLERROR("lapackCholeskySolveInPlace: unrecognized character '%c' for "
                "argument 'uplo'; valid characters are 'U' and 'L'", uplo);
    }

    // If B is not column-major, transpose it
    Mat lapack_B;
    if (! B_is_column_major)
        lapack_B = transpose(B);
    else
        lapack_B = B;

    // Prepare for call to LAPACK
    int N    = A.width();
    int NRHS = lapack_B.length();   // Don't forget it's transposed for lapack
    int LDA  = A.length();
    int LDB  = lapack_B.width();
    int INFO;
    real* A_data = A.data();
    real* B_data = lapack_B.data();

    // Call LAPACK
    lapack_Xpotrs_(&lapack_uplo, &N, &NRHS, A_data, &LDA, B_data, &LDB, &INFO);

    if (INFO < 0)
        PLERROR("lapackCholeskySolvePlace: implementation error; argument %d "
                "to xPOTRS had an illegal value", -INFO);
    PLASSERT( INFO == 0 );

    // If B was not originally column-major, transpose back result from LAPACK
    if (! B_is_column_major)
        transpose(lapack_B, B);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class num_t >
void PLearn::lapackEIGEN ( const TMat< num_t > &  A,
TVec< num_t > &  eigenvals,
TMat< num_t > &  eigenvecs,
char  RANGE = 'A',
num_t  low = 0,
num_t  high = 0,
num_t  ABSTOL = 0 
)

Computes the eigenvalues and eigenvectors of a symmetric (NxN) matrix A.

BEWARE: The content of A is destroyed by the call. NOTE: you may wish to use the simpler call eigenVecOfSymmMat

Meaning of RANGE: 'A': all eigenvalues will be found. 'V': all eigenvalues in the half-open interval (low,high] will be found. 'I': will find eigenvals with indexes int(low) to int(high) included (smallest eigenval having index 0)

ABSTOL is the tolerance (see lapack doc for call dsyevx_ )

If you do not wish to compute eigenvectors, provide a null (empty) 'eigenvecs'.

Upon return, eigenvals will contain the M eigenvalues found in increasing order (it will be resized to M). And eigenvecs (unless initially null) will be resized to an MxN matrix containing the corresponding M eigenvectors in its *rows*.

Definition at line 135 of file plapack.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), PLearn::TMat< T >::isEmpty(), PLearn::TMat< T >::isNotEmpty(), lapack_Xsyevx_(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), N, PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), and PLearn::TMat< T >::width().

Referenced by eigenVecOfSymmMat().

{

#ifdef BOUNDCHECK
    if(A.length()!=A.width())
        PLERROR("In lapackEIGEN length and width of A differ, it should be symmetric!");
#endif

    char JOBZ = eigenvecs.isEmpty() ?'N' :'V';
    char UPLO = 'U';  
    int N = A.length();
    int LDA = A.mod();

    int IL=0, IU=0;
    num_t VL=0, VU=0;

    eigenvals.resize(N);
    int M; // The number of eigenvalues returned

    switch(RANGE)
    {
    case 'A':
        if(JOBZ=='V')
            eigenvecs.resize(N, N);
        break;
    case 'I': 
        IL = int(low)+1; // +1 because fortran indexes start at 1
        IU = int(high)+1;
        if(JOBZ=='V')
            eigenvecs.resize(IU-IL+1, N);
        break;
    case 'V':
        VL = low;
        VU = high;
        if(JOBZ=='V')
            eigenvecs.resize(N, N);
        break;
    default:
        PLERROR("In lapackEIGEN: invalid RANGE character: %c",RANGE);
    }
  
    num_t* Z = 0;
    int LDZ = 1;
    if(eigenvecs.isNotEmpty())
    {
        Z = eigenvecs.data();
        LDZ = eigenvecs.mod();
    }

    // temporary work vectors
    static TVec<num_t> WORK;
    static TVec<int> IWORK;
    static TVec<int> IFAIL;

    WORK.resize(1);
    IWORK.resize(5*N);
    IFAIL.resize(N);

    int LWORK = -1;
    int INFO;


    // first call to find optimal work size
    //  cerr << '(';
    lapack_Xsyevx_( &JOBZ, &RANGE, &UPLO, &N, A.data(), &LDA,  &VL,  &VU,
                    &IL,  &IU,  &ABSTOL,  &M,  eigenvals.data(), Z, &LDZ, 
                    WORK.data(), &LWORK, IWORK.data(), IFAIL.data(), &INFO );
    // cerr << ')';

    if(INFO!=0)
        PLERROR("In lapackEIGEN, problem in first call to sgesdd_ to get optimal work size, returned INFO = %d",INFO); 
  
    // make sure we have enough space
    LWORK = (int) WORK[0]; // optimal size
    WORK.resize(LWORK);

    // second call to do the computation
    // cerr << '{';
    lapack_Xsyevx_( &JOBZ, &RANGE, &UPLO, &N, A.data(), &LDA,  &VL,  &VU,
                    &IL,  &IU,  &ABSTOL,  &M,  eigenvals.data(), Z, &LDZ, 
                    WORK.data(), &LWORK, IWORK.data(), IFAIL.data(), &INFO );
    // cerr << '}';

    if(INFO!=0)
        PLERROR("In lapackEIGEN, problem when calling sgesdd_ to perform computation, returned INFO = %d",INFO); 

    eigenvals.resize(M);
    if(JOBZ=='V')
        eigenvecs.resize(M, N);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class num_t >
void PLearn::lapackGeneralizedEIGEN ( const TMat< num_t > &  A,
const TMat< num_t > &  B,
int  ITYPE,
TVec< num_t > &  eigenvals,
TMat< num_t > &  eigenvecs,
char  RANGE = 'A',
num_t  low = 0,
num_t  high = 0,
num_t  ABSTOL = 0 
)

Computes the eigenvalues and eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x A and B are assumed to be symmetric and B is also positive definite.

BEWARE: The content of A and B is destroyed by the call. NOTE: you may wish to use the simpler call generalizedEigenVecOfSymmMat

Meaning of ITYPE Specifies the problem type to be solved: = 1: A*x = (lambda)*B*x = 2: A*B*x = (lambda)*x = 3: B*A*x = (lambda)*x

Meaning of RANGE: 'A': all eigenvalues will be found. 'V': all eigenvalues in the half-open interval (low,high] will be found. 'I': will find eigenvals with indexes int(low) to int(high) included (smallest eigenval having index 0)

ABSTOL is the tolerance (see lapack doc for call dsygvx_ )

If you do not wish to compute eigenvectors, provide a null (empty) 'eigenvecs'.

Upon return, eigenvals will contain the M eigenvalues found in increasing order (it will be resized to M). And eigenvecs (unless initially null) will be resized to an MxN matrix containing the corresponding M eigenvectors in its *rows*.

Definition at line 256 of file plapack.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), PLearn::TMat< T >::isEmpty(), PLearn::TMat< T >::isNotEmpty(), lapack_Xsygvx_(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), N, PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), and PLearn::TMat< T >::width().

Referenced by generalizedEigenVecOfSymmMat().

{

#ifdef BOUNDCHECK
    if(A.length()!=A.width())
        PLERROR("In lapackGeneralizedEIGEN length and width of A differ, it should be symmetric!");
#endif

    char JOBZ = eigenvecs.isEmpty() ?'N' :'V';
    char UPLO = 'U';  
    int N = A.length();//The order of the matrix pencil (A,B)
    int LDA = A.mod();
    int LDB = B.mod();

    int IL=0, IU=0;
    num_t VL=0, VU=0;

    eigenvals.resize(N);
    int M; // The number of eigenvalues returned

    switch(RANGE)
    {
    case 'A':
        if(JOBZ=='V')
            eigenvecs.resize(N, N);
        break;
    case 'I': 
        IL = int(low)+1; // +1 because fortran indexes start at 1
        IU = int(high)+1;
        if(JOBZ=='V')
            eigenvecs.resize(IU-IL+1, N);
        break;
    case 'V':
        VL = low;
        VU = high;
        if(JOBZ=='V')
            eigenvecs.resize(N, N);
        break;
    default:
        PLERROR("In lapackGeneralizedEIGEN: invalid RANGE character: %c",RANGE);
    }
  
    num_t* Z = 0;
    int LDZ = 1;
    if(eigenvecs.isNotEmpty())
    {
        Z = eigenvecs.data();
        LDZ = eigenvecs.mod();
    }

    // temporary work vectors
    static TVec<num_t> WORK;
    static TVec<int> IWORK;
    static TVec<int> IFAIL;

    WORK.resize(1);
    IWORK.resize(5*N);
    IFAIL.resize(N);

    int LWORK = -1;
    int INFO;


    // first call to find optimal work size
    //  cerr << '(';
    lapack_Xsygvx_( &ITYPE, &JOBZ, &RANGE, &UPLO, &N, A.data(), &LDA, B.data(), &LDB,  &VL,  &VU,
                    &IL,  &IU,  &ABSTOL,  &M,  eigenvals.data(), Z, &LDZ, 
                    WORK.data(), &LWORK, IWORK.data(), IFAIL.data(), &INFO );
    // cerr << ')';

    if(INFO!=0)
        PLERROR("In lapackGeneralizedEIGEN, problem in first call to sgesdd_ to get optimal work size, returned INFO = %d",INFO); 
  
    // make sure we have enough space
    LWORK = (int) WORK[0]; // optimal size
    WORK.resize(LWORK);

    // second call to do the computation
    // cerr << '{';
    lapack_Xsygvx_( &ITYPE, &JOBZ, &RANGE, &UPLO, &N, A.data(), &LDA, B.data(), &LDB,  &VL,  &VU,
                    &IL,  &IU,  &ABSTOL,  &M,  eigenvals.data(), Z, &LDZ, 
                    WORK.data(), &LWORK, IWORK.data(), IFAIL.data(), &INFO );
    // cerr << '}';

    if(INFO!=0)
        PLERROR("In lapackGeneralizedEIGEN, problem when calling sgesdd_ to perform computation, returned INFO = %d",INFO); 

    eigenvals.resize(M);
    if(JOBZ=='V')
        eigenvecs.resize(M, N);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::lapackSolveLinearSystem ( Mat &  At,
Mat &  Bt,
TVec< int > &  pivots 
)

Solves AX = B This is a simple wrapper over the lapack routine. It expects At and Bt (transposes of A and B) as input, as well as storage for resulting pivots vector of ints of same length as A. The call overwrites Bt, putting the transposed solution Xt in there, and At is also overwritten to contain the factors L and U from the factorization A = P*L*U; (the unit diagonal elements of L are not stored). The lapack status is returned: = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value > 0: if INFO = i, U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed.

Definition at line 303 of file plapack.cc.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), dgesv_(), PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), N, PLERROR, PLearn::TVec< T >::resize(), sgesv_(), and PLearn::TMat< T >::width().

Referenced by PLearn::TransformationLearner::MStepTransformationDiv(), PLearn::TransformationLearner::MStepTransformations(), and solveLinearSystem().

{
#ifdef BOUNDCHECK
    if(At.width() != Bt.width())
        PLERROR("In lapackSolveLinearSystem: Incompatible dimensions");
#endif

    int INFO;
#ifndef USE_BLAS_SPECIALISATIONS
    PLERROR("lapackSolveLinearSystem: can't be called unless PLearn linked with LAPACK");
#else
    int N = At.width();
    int NRHS = Bt.length();
    real* Aptr = At.data();
    int LDA = At.mod();
    if(pivots.length()!=N)
        pivots.resize(N);
    int* IPIVptr = pivots.data();
    real* Bptr = Bt.data();
    int LDB = Bt.mod();
#ifdef USEFLOAT
    sgesv_(&N, &NRHS, Aptr, &LDA, IPIVptr, Bptr, &LDB, &INFO);
#endif
#ifdef USEDOUBLE
    dgesv_(&N, &NRHS, Aptr, &LDA, IPIVptr, Bptr, &LDB, &INFO);
#endif
#endif
    return INFO;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class num_t >
void PLearn::lapackSVD ( const TMat< num_t > &  At,
TMat< num_t > &  Ut,
TVec< num_t > &  S,
TMat< num_t > &  V,
char  JOBZ = 'A',
real  safeguard = 1 
)

Performs the SVD decomposition A = U.S.Vt See SVD(...) for more details.

CAREFUL: the 'At' matrix argument is changed in the process!

This is a straight forward call to the lapack function. As fortran uses column-major matrices, and we use row-major matrices, it's really as if we had to pass the transpose of A (denoted At) and were getting back the transpose of U (Ut) and V.

If you want a version without the funny transposes, look at SVD (which simply calls this one with a different order of parameters...)

Definition at line 440 of file plapack.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), PLearn::TMat< T >::isNotEmpty(), lapack_Xgesdd_(), PLearn::TMat< T >::length(), min(), PLearn::TMat< T >::mod(), N, PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), and PLearn::TMat< T >::width().

Referenced by PLearn::ManifoldKNNDistribution::computeLocalPrincipalComponents(), PLearn::DeepNonLocalManifoldParzen::computeManifoldParzenParameters(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NonLocalManifoldParzen::log_density(), PLearn::GaussianContinuum::make_random_walk(), PLearn::GaussianContinuumDistribution::make_random_walk(), SVD(), PLearn::NonLocalManifoldParzen::train(), PLearn::ManifoldParzen::train(), PLearn::StructuralLearner::train(), PLearn::GaussianContinuum::update_reference_set_parameters(), and PLearn::GaussianContinuumDistribution::update_reference_set_parameters().

{            
    int M = At.width();
    int N = At.length();
    int LDA = At.mod();
    int min_M_N = min(M,N);
    S.resize(min_M_N);

    switch(JOBZ)
    {
    case 'A':
        Ut.resize(M,M);
        V.resize(N,N);
        break;
    case 'S':
        Ut.resize(min_M_N, M);
        V.resize(N, min_M_N);
        break;
    case 'O':
        if(M<N)
            Ut.resize(M,M); // and V is not used      
        else
            V.resize(N,N); // and Ut is not used
        break;
    case 'N':
        break;
    default:
        PLERROR("In lapackSVD, bad JOBZ argument : %c",JOBZ);
    }


    int LDU = 1;
    int LDVT = 1;
    num_t* U = 0;
    num_t* VT = 0;

    if(V.isNotEmpty())
    {
        LDVT = V.mod();
        VT = V.data();
    }
    if(Ut.isNotEmpty())
    {
        LDU = Ut.mod();
        U = Ut.data();
    }

    static TVec<num_t> WORK;
    WORK.resize(1);
    int LWORK = -1;

    static TVec<int> IWORK;
    IWORK.resize(8*min_M_N);

    int INFO;

    // first call to find optimal work size
    lapack_Xgesdd_(&JOBZ, &M, &N, At.data(), &LDA, S.data(), U, &LDU, VT, &LDVT, WORK.data(), &LWORK, IWORK.data(), &INFO);

    if(INFO!=0)
        PLERROR("In lapackSVD, problem in first call to sgesdd_ to get optimal work size, returned INFO = %d",INFO); 
  
    // make sure we have enough space
    LWORK = int(WORK[0] * safeguard + 0.5); // optimal size (safeguard may be used to make sure it doesn't crash in some rare occasions).
    WORK.resize(LWORK);
    // cerr << "Optimal WORK size: " << LWORK << endl;

    // second call to do the computation
    lapack_Xgesdd_(&JOBZ, &M, &N, At.data(), &LDA, S.data(), U, &LDU, VT, &LDVT, WORK.data(), &LWORK, IWORK.data(), &INFO );

    if(INFO!=0)
    {      
        // cerr << At << endl;
        // cerr << "In lapackSVD, failed with INFO = " << INFO << endl;
        PLERROR("In lapackSVD, problem when calling sgesdd_ to perform computation, returned INFO = %d",INFO); 
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::layerBpropUpdate ( TVec< T >  input_gradient,
TMat< T >  weights,
const TVec< T > &  input,
const TVec< T > &  output_gradient,
real  learning_rate 
)

Definition at line 7284 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::IncrementalNNet::train().

{
    int n_inputs = input_gradient.length();
    int n_outputs = output_gradient.length();
#ifdef BOUNDCHECK
    if (weights.length() != n_outputs || weights.width() != n_inputs
        || input.length() != n_inputs)
        PLERROR("layerBpropUpdate: arguments have incompatible sizes");
#endif
    input_gradient.clear();
    T* in_g = input_gradient.data();
    T* out_g = output_gradient.data();
    T* inp = input.data();
    for (int i=0;i<n_outputs;i++)
    {
        T* Wi = weights[i];
        T out_gi = out_g[i];
        for (int j=0;j<n_inputs;j++)
        {
            in_g[j] += Wi[j] * out_gi;
            Wi[j] -= learning_rate * out_gi * inp[j];
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::layerL1BpropUpdate ( TVec< T >  input_gradient,
TMat< T >  weights,
const TVec< T > &  input,
const TVec< T > &  output_gradient,
real  learning_rate,
weight_decay 
)

Definition at line 7376 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, sign(), and PLearn::TMat< T >::width().

{
    int n_inputs = input_gradient.length();
    int n_outputs = output_gradient.length();
#ifdef BOUNDCHECK
    if (weights.length() != n_outputs || weights.width() != n_inputs
        || input.length() != n_inputs)
        PLERROR("layerL1BpropUpdate: arguments have incompatible sizes");
#endif
    input_gradient.clear();
    T* in_g = input_gradient.data();
    T* out_g = output_gradient.data();
    T* inp = input.data();
    for (int i=0;i<n_outputs;i++)
    {
        T* Wi = weights[i];
        T out_gi = out_g[i];
        for (int j=0;j<n_inputs;j++)
        {
            T Wij = Wi[j];
            in_g[j] += Wij * out_gi;
            Wi[j] -= learning_rate * (out_gi * inp[j] + weight_decay * sign(Wij));
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::layerL2BpropUpdate ( TVec< T >  input_gradient,
TMat< T >  weights,
const TVec< T > &  input,
const TVec< T > &  output_gradient,
real  learning_rate,
weight_decay 
)

Definition at line 7314 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
    int n_inputs = input_gradient.length();
    int n_outputs = output_gradient.length();
#ifdef BOUNDCHECK
    if (weights.length() != n_outputs || weights.width() != n_inputs
        || input.length() != n_inputs)
        PLERROR("layerL2BpropUpdate: arguments have incompatible sizes");
#endif
    input_gradient.clear();
    T* in_g = input_gradient.data();
    T* out_g = output_gradient.data();
    T* inp = input.data();
    for (int i=0;i<n_outputs;i++)
    {
        T* Wi = weights[i];
        T out_gi = out_g[i];
        for (int j=0;j<n_inputs;j++)
        {
            T Wij = Wi[j];
            in_g[j] += Wij * out_gi;
            Wi[j] -= learning_rate * (out_gi * inp[j] + weight_decay * Wij);
        }
    }
}

Here is the call graph for this function:

string PLearn::left ( const string &  s,
size_t  width,
char  padding 
)
template<class T >
void PLearn::leftPseudoInverse ( const TMat< T > &  m,
TMat< T > &  inv 
)

Definition at line 6056 of file TMat_maths_impl.h.

References inverse(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
    if (m.length()==m.width())
        inverse(m,inv);
    if (m.length()<m.width())
        PLERROR("leftPseudoInverse: matrix length(%d) must be >= width(%d)",
                m.length(), m.width());
    PLERROR("SVD not implemented yet");
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::leftPseudoInverse ( TMat< T > &  m)

Definition at line 6046 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

Referenced by PLearn::LeftPseudoInverseVariable::fprop(), and PLearn::ProductRandomVariable::invertible().

{
    TMat<T> inv(m.width(), m.length());
    leftPseudoInverse(m,inv);
    return inv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::leftPseudoInverse ( Var  v) [inline]

Definition at line 76 of file LeftPseudoInverseVariable.h.

{
    return new LeftPseudoInverseVariable(v);
}
bool PLearn::lessPair ( pair< int, float > &  p1,
pair< int, float > &  p2 
)

Definition at line 1034 of file GraphicalBiText.cc.

{
    return p1.second < p2.second;
}
template<class T >
T PLearn::lexical_cast ( const string &  str)

Utility function to convert any string to a C++ object using the PStream deserialisation mechanism.

The objects are assumed to be in plearn_ascii format. This function is inspired by one of the same name in Boost. Call it as follows:

map<string,string> zemap = lexical_cast< map<string,string> >("{\"abc":"def", "uvw":"xyz"}");

Useful for inline vectors (if you don't mind the performance hit):

Vec myvec = lexical_cast<Vec>("[1,1,2,3,5,8,13,21]");

Definition at line 116 of file lexical_cast.h.

References in, openString(), and PLearn::PStream::plearn_ascii.

Referenced by PLearn::SummationKernel::computeGramMatrixDerivative(), PLearn::Kernel::computeGramMatrixDerivative(), and PLearn::PythonProcessedLearner::setOutputNamesFromParams().

{
    PStream in = openString(str, PStream::plearn_ascii);
    T obj;
    in >> obj;
    return obj;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::lift_output ( Var  linear_output,
Var  target 
) [inline]
StatsIt PLearn::lift_stats ( int  the_index = 0,
real  the_fraction = 0.1 
) [inline]

Definition at line 435 of file StatsIterator.h.

{ return new LiftStatsIterator(the_index, the_fraction); }
template<class T >
void PLearn::linearRegression ( TMat< T >  inputs,
TMat< T >  outputs,
weight_decay,
TMat< T >  theta_t 
)

Definition at line 6883 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), n, PLERROR, PLearn::TMat< T >::resize(), solveLinearSystemByCholesky(), and PLearn::TMat< T >::width().

Referenced by linearRegression(), PLearn::LinearRegressor::train(), and PLearn::GaussianDBNRegression::train().

{
    int l = inputs.length();
    int n_inputs = inputs.width();
    int n_outputs = outputs.width();
    if (outputs.length()!=l)
        PLERROR("linearRegression: inputs.length_=%d while outputs.length_=%d",
                l,outputs.length());
    if (theta_t.length()!=n_inputs+1 || theta_t.width()!=n_outputs)
        PLERROR("linearRegression: theta_t(%d,%d) should be (n_inputs(%d)+1)xn_outputs(%d)",
                theta_t.length(),theta_t.width(),n_inputs,n_outputs);

    int n=n_inputs+1;

    static TMat<T> XtX;
    XtX.resize(n,n);
    XtX.clear();
    static TMat<T> XtY;
    XtY.resize(n,n_outputs);
    XtY.clear();
    // compute X' X and X'Y:
    // XtX(i,j) = sum_t X[t,i]*X[t,j] (with X[t,0]=1, X[t,i+1]=inputs[t,i])
    // YtY(i,j) = sum_t X[t,i]*Y[t,j]
    //
    int xmod=inputs.mod();
    int ymod=outputs.mod();
    T *xt = inputs.data();
    T *yt = outputs.data();
    XtX(0,0) = l; // we know the answer ahead of time for element (0,0)
    for (int t=0;t<l;t++,xt+=xmod,yt+=ymod)
    {
        T* xx0 = XtX.data();
        T* xy0 = XtY.data();
        for (int j=0;j<n_outputs;j++)
            xy0[j] += yt[j];
        T *xxi = xx0+n; // start the inner matrix at (1,0)
        T *xyi = xy0+n_outputs; // start xy at (1,0)
        for (int i=0;i<n_inputs;i++,xxi+=n,xyi+=n_outputs)
        {
            T xti = xt[i];
            xxi[0]+=xti;
            T *xxip=xxi+1;
            for (int j=0;j<i;j++)
                xxip[j] += xti*xt[j];
            xxip[i]+=xti*xti;
            for (int j=0;j<n_outputs;j++)
                xyi[j] += xti * yt[j];
        }
    }
    // now do the symmetric part of XtX
    T* xx = XtX.data();
    T* xxi = xx+n;
    for (int i=1;i<n;i++,xxi+=n)
    {
        T *xx_i=xx+i;
        for (int j=0;j<i;j++,xx_i+=n)
            *xx_i = xxi[j];
    }

    // add weight_decay on the diagonal of XX' (except for the bias)
    T* xxii = &XtX(1,1);
    for (int i=0;i<n_inputs;i++,xxii+=1+n)
        *xxii += weight_decay;

    // now solve by Cholesky decomposition
    solveLinearSystemByCholesky(XtX,XtY,theta_t);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::linearRegression ( TVec< T >  inputs,
TVec< T >  outputs,
weight_decay,
TVec< T >  theta_t 
)

Definition at line 6959 of file TMat_maths_impl.h.

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

{
    int npts = inputs.length();

    if (outputs.length()!=npts)
        PLERROR("linearRegression: inputs.length_=%d while outputs.length_=%d",
                inputs.length(),outputs.length());
    if (theta_t.length()!=2)
        PLERROR("linearRegression: theta_t(%d) should be 2", theta_t.length());

    T sum_x = 0, sum_y = 0, sum_xy = 0, sum_x2 = 0, sum2_x = 0, sum2_y = 0;

    for (int i = 0; i < npts; ++i) {
        sum_x += inputs[i];
        sum_y += outputs[i];
        sum_xy += inputs[i] * outputs[i];
        sum_x2 += inputs[i] * inputs[i];
    }
    sum2_x = sum_x * sum_x;
    sum2_y = sum_y * sum_y;

    // m
    theta_t[1] = (sum_xy - (sum_x * sum_y) / npts) / (sum_x2 + weight_decay - sum2_x / npts);
    // b
    theta_t[0] = (sum_y - theta_t[1] * sum_x) / npts;
}

Here is the call graph for this function:

real PLearn::linearRegression ( VMat  inputs,
VMat  outputs,
real  weight_decay,
Mat  theta_t,
bool  use_precomputed_XtX_XtY,
Mat  XtX,
Mat  XtY,
real sum_squared_Y,
Vec &  outputwise_sum_squared_Y,
bool  return_squared_loss = false,
int  verbose_computation_every = 0,
bool  cholesky = true,
int  apply_decay_from = 1 
)

Computes the result of the linear regression into theta_t Parameters must have the following sizes: inputs(l,n) outputs(l,m) theta_t(n,m) XtX(n,n) XtY(n,m) This regression is made with no added bias. If you want a bias, add it yourself with passing inputs_w_bias = new ExtendedVMatrix(inputs,0,0,1,0,1.0) If use_precomputed_XtX_XtY is false, then they are computed. Otherwise they are used as they are (typically passed precomputed from a previous call made with a possibly different weight_decay).

The argument 'apply_decay_from' lets you skip applying the decay to the bias term if one is present. This should be '1' if regressing with a bias, or '0' if regressing with no added bias.

Returns average of squared loss.

< element-wise square

Definition at line 158 of file VMat_linalg.cc.

References PLearn::TMat< T >::clear(), dot(), externalProductAcc(), PLearn::TVec< T >::fill(), i, PLearn::TMat< T >::length(), PLearn::VMat::length(), PLERROR, product(), PLearn::TVec< T >::resize(), solveLinearSystem(), solveLinearSystemByCholesky(), PLearn::TMat< T >::width(), PLearn::VMat::width(), and x.

{
    if (outputs.length()!=inputs.length())
        PLERROR("linearRegression: inputs.length()=%d while outputs.length()=%d",inputs.length(),outputs.length());
    if (theta_t.length()!=inputs.width() || theta_t.width()!=outputs.width())
        PLERROR("linearRegression: theta_t(%d,%d) should be (%dx%d)",
                theta_t.length(),theta_t.width(),inputs.width(),outputs.width());

    int inputsize = inputs.width();
    int targetsize = outputs.width();

    if(XtX.length()!=inputsize || XtX.width()!=inputsize)
        PLERROR("In linearRegression: XtX should have dimensions %dx%d (inputs.width())x(inputs.width())",
                inputsize,inputsize);
    if(XtY.length()!=inputsize || XtY.width()!=targetsize)
        PLERROR("In linearRegression: XtY should have dimensions %dx%d (inputs.width())x(outputs.width())",
                inputsize,targetsize);

    if(!use_precomputed_XtX_XtY) // then compute them
    {
        VMat X = inputs; // new ExtendedVMatrix(inputs,0,0,1,0,1.0); // prepend a first column of ones
        VMat Y = outputs;
        outputwise_sum_squared_Y.resize(targetsize);
        outputwise_sum_squared_Y.fill(0.0);

        // *************
        // Do efficiently the following:
        // XtX << transposeProduct(X); // '<<' to copy elements (as transposeProduct returns a new matrix)
        // XtY << transposeProduct(X,Y); // same thing (remember '=' for Mat never copies elements)
        XtX.clear();
        XtY.clear();
        sum_squared_Y=0;
        Vec x(X.width());
        Vec y(Y.width());
        int l=X.length();

        // Display progress bar iff we have some verbosity
        PP<ProgressBar> pb(
            verbose_every?
            new ProgressBar("Performing Unweighted Linear Regression", l) : 0);

        for(int i=0; i<l; i++)
        {
            if (pb)
                pb->update(i);

            X->getRow(i,x);
            Y->getRow(i,y);
            externalProductAcc(XtX, x,x);
            externalProductAcc(XtY, x,y);
            sum_squared_Y += dot(y,y);
            y *= y;                              
            outputwise_sum_squared_Y += y;
        }
        // *************
    }

    // add weight_decay on the diagonal of XX' (except for the bias)
    for (int i=apply_decay_from; i<XtX.length(); i++)
        XtX(i,i) += weight_decay;

    // VMat(XtX)->savePMAT("plXtX.pmat");
    // VMat(XtY)->savePMAT("plXtY.pmat");

    if (cholesky) {
        // now solve by Cholesky decomposition
        solveLinearSystemByCholesky(XtX,XtY,theta_t);
    } else {
        theta_t = solveLinearSystem(XtX, XtY);
    }

    real squared_loss=0;
    if (return_squared_loss)
    {
        // squared loss = sum_{ij} theta_{ij} (X'W X theta')_{ij} + sum_{t,i} Y_{ti}^2 - 2 sum_{ij} theta_{ij} (X'W Y)_{ij}
        Mat M(inputsize,targetsize);
        product(M,XtX,theta_t);
        squared_loss += dot(M,theta_t); //
        squared_loss += sum_squared_Y;
        squared_loss -= 2*dot(XtY,theta_t);
    }
    return squared_loss/inputs.length();
}

Here is the call graph for this function:

Mat PLearn::linearRegression ( VMat  inputs,
VMat  outputs,
real  weight_decay,
bool  include_bias = false 
)

Version that does all the memory allocations of XtX, XtY and theta_t.

Returns theta_t

Definition at line 247 of file VMat_linalg.cc.

References linearRegression(), n, and PLearn::VMat::width().

{
    int n = inputs.width()+(include_bias?1:0);
    int n_outputs = outputs.width();
    Mat XtX(n,n);
    Mat XtY(n,n_outputs);
    Mat theta_t(n,n_outputs);
    real sy=0;
    Vec outputwise_sum_squared_Y;
    if(include_bias)
        inputs = new ExtendedVMatrix(inputs,0,0,1,0,1.0); // prepend a first column of ones
    linearRegression(inputs, outputs, weight_decay, theta_t,
                     false, XtX, XtY, sy, outputwise_sum_squared_Y);
    return theta_t;
}

Here is the call graph for this function:

template<class T >
void PLearn::linearRegressionNoBias ( TMat< T >  inputs,
TMat< T >  outputs,
weight_decay,
TMat< T >  weights 
)

Definition at line 6847 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::resize(), solveLinearSystemByCholesky(), transposeProduct(), and PLearn::TMat< T >::width().

{
    int inputsize = inputs.width();
    int outputsize = outputs.width();
    int l = inputs.length();
    if(outputs.length()!=l)
        PLERROR("In linearRegressionNoBias: inputs and outputs should have the same length");
    if(weights.length()!=inputsize || weights.width()!=outputsize)
        PLERROR("In linearRegressionNoBias: weights should be a (inputsize x outputsize) matrix (%d x %d)",inputsize,outputsize);
    static TMat<T> XtX;
    XtX.resize(inputsize,inputsize);
    transposeProduct(XtX, inputs,inputs);
    static TMat<T> XtY;
    XtY.resize(inputsize,outputsize);
    transposeProduct(XtY, inputs,outputs);
    for(int i=0; i<inputsize; i++)
        XtX(i,i) += weight_decay;
    solveLinearSystemByCholesky(XtX,XtY,weights);
}

Here is the call graph for this function:

template<class T >
void PLearn::load ( const PPath &  filepath,
T &  x 
) [inline]
Mat PLearn::loadADMat ( const string &  filename)

Native AD format.

Definition at line 1052 of file MatIO.cc.

References PLearn::TMat< T >::data(), fread_float(), fread_int(), m, and PLERROR.

{
    FILE *f = fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In loadADMat, could not open file %s for reading",filename.c_str());
    int the_length, the_width;
    int magic = 0x2345;
    int SNidx2fltmagic = 0x0D02;
    int m;
    fread_int(f,&m,1);
    if (m != magic && m != SNidx2fltmagic)
        PLERROR("In load, magic number is incorrect: %d != %d",m,magic);
    fread_int(f,&the_length,1);
    fread_int(f,&the_width,1);
    Mat mat(the_length,the_width);
    fread_float(f,mat.data(),the_length*the_width);
    fclose(f);
    return mat;
}

Here is the call graph for this function:

Vec PLearn::loadADVec ( const string &  filename)

Definition at line 1072 of file MatIO.cc.

References PLearn::TVec< T >::data(), fread_float(), fread_int(), m, and PLERROR.

{
    FILE* f = fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In Vec::loadADMat could not open file %s for reading",filename.c_str());
    int thesize;
    int magic = 0x3456;
    int m;
    fread_int(f,&m,1);
    if (m != magic)
        PLERROR("In new_Vec_from_File_FILE, magic number is incorret: %d != %d",m,magic);
    fread_int(f,&thesize,1);
    Vec vec(thesize);
    fread_float(f,vec.data(),thesize);
    fclose(f);
    return vec;
}

Here is the call graph for this function:

template<class T >
void PLearn::loadAscii ( const PPath &  filename,
TMat< T > &  mat,
TVec< string > &  fieldnames,
int inputsize,
int targetsize,
int weightsize,
TVec< map< string, real > > *  map_sr = 0 
)

WARNING: use only for float, double, and int types. Other type are not guaranteed to work.

intelligent functions that will load a file in almost all ascii formats that ever existed in this lab

Definition at line 207 of file MatIO.h.

Referenced by cross_valid(), input2dSet(), loadAscii(), loadAsciiAsVMat(), loadATT800(), loadBreastCancer(), loadBreastCancerWisconsin(), loadCallxx(), loadDiabetes(), loadLetters(), loadMat(), and loadVec().

{
    int extrasize = -1;
    loadAscii(filename, mat, fieldnames, inputsize, targetsize, weightsize, extrasize, map_sr);
}

Here is the caller graph for this function:

template<class T >
void PLearn::loadAscii ( const PPath &  filename,
TMat< T > &  mat,
TVec< string > &  fieldnames,
TVec< map< string, real > > *  map_sr = 0 
)

Definition at line 200 of file MatIO.h.

References loadAscii().

{ 
    int inputsize=-1, targetsize=-1, weightsize=-1, extrasize=-1;
    loadAscii(filename, mat, fieldnames, inputsize, targetsize, weightsize, extrasize, map_sr);
}

Here is the call graph for this function:

template<class T >
void PLearn::loadAscii ( const PPath &  filename,
TMat< T > &  mat 
)

Definition at line 529 of file MatIO.h.

References loadAscii().

{
    TVec<std::string> fn;
    loadAscii(filename,mat,fn);
}

Here is the call graph for this function:

template<class T >
void PLearn::loadAscii ( const PPath &  filename,
TVec< T > &  vec 
)

Definition at line 445 of file MatIO.h.

References PLearn::PPath::absolute(), PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), in, MISSING_VALUE, pl_strtod(), PLERROR, and PLearn::TVec< T >::resize().

{
    ifstream in(filename.absolute().c_str());
    if(!in)
        PLERROR("In loadAscii could not open file %s for reading",filename.c_str());
 
    int size = -1;
    in >> size;
    if (size<0 || size>1e10)
        PLERROR("In Vec::loadAscii the file is probably not in the right format: size=%d", size);
    vec.resize(size);
    typename TVec<T>::iterator it = vec.begin();
    typename TVec<T>::iterator itend = vec.end();

    // We are now more careful about the possibility of the stream being in a
    // bad state
    string inp_element;
    for(; it!=itend; ++it) {
        if (in) {
            in >> inp_element;
            *it = T(pl_strtod(inp_element.c_str(), 0));
        }
        if (!in) {
            in.clear();
            *it = MISSING_VALUE;
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::loadAscii ( const PPath &  filename,
TMat< T > &  mat,
TVec< string > &  fieldnames,
int inputsize,
int targetsize,
int weightsize,
int extrasize,
TVec< map< string, real > > *  map_sr 
)

Definition at line 216 of file MatIO.h.

References PLearn::PPath::absolute(), PLearn::TVec< T >::clear(), fast_exact_is_equal(), PLearn::TVec< T >::fill(), PLearn::PStream::getline(), PLearn::PStream::good(), i, in, j, PLearn::TVec< T >::length(), m, openFile(), parseSizeFromRemainingLines(), PLearn::PStream::peek(), pl_isnumber(), pl_strtod(), PLERROR, PLWARNING, PLearn::PStream::raw_ascii, removeblanks(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), PLearn::TVec< T >::size(), skipBlanksAndComments(), split(), toint(), tostring(), and ws().

{
    PStream in = openFile(filename, PStream::raw_ascii, "r");
  
    int length = -1;
    int width = -1;
    inputsize = -1;
    targetsize = -1;
    weightsize = 0;
    bool could_be_old_amat=true; // true while there is still a chance that this be an "old" amat format (length and width in first row with no starting ##)
  
    in >> ws;
    string line;
  
    while(in.peek()=='#')
    {
        in.getline(line);
        could_be_old_amat = false;

        size_t pos=line.find(":");
        if(pos!=string::npos)
        {
            string sub=line.substr(0,pos);
            if(sub=="#size") // we've found the dimension specification line
            {
                string siz=removeblanks((line.substr(pos)).substr(1));
                vector<string> dim = split(siz," ");
                if(dim.size()!=2)  PLERROR("I need exactly 2 dimensions for matrix");
                length = toint(dim[0]);
                width = toint(dim[1]);
            }
            else if(sub=="#sizes") // we've found inputsize targetsize weightsize specification
            {
                string siz=removeblanks((line.substr(pos)).substr(1));
                vector<string> dim = split(siz," ");
                if(dim.size()!=3 && dim.size()!=4)  
                    PLERROR("I need 3 or 4 numbers after #sizes: inputsize targetsize weightsize extrasize");
                inputsize = toint(dim[0]);
                targetsize = toint(dim[1]);
                weightsize = toint(dim[2]);
                if(dim.size()==4)
                    extrasize = toint(dim[3]);
                else
                    extrasize = 0;
            }
            else if(sub=="#") // we've found the fieldnames specification line
            {
                string fnl=line.substr(pos).substr(1);
                fieldnames = split(fnl," ");
                width=fieldnames.size();
            }              
        }
        in >> ws;
    }

    if(length==-1)  // still looking for size info...
        parseSizeFromRemainingLines(filename, in, could_be_old_amat, length, width);

    if(length==-1)
        PLERROR("In loadAscii: trying to load but couldn't determine file format automatically for %s",filename.absolute().c_str());

    if(width != -1 && width != fieldnames.length())
    {
        if (fieldnames.length() != 0)
            PLWARNING("In loadAscii:  Number of fieldnames (%d) and width (%d) mismatch in file %s.  "
                      "Replacing fieldnames by 'Field-0', 'Field-1', ...", 
                      fieldnames.length(), width, filename.absolute().c_str());
        fieldnames.resize(width);
        for(int i= 0; i < width; ++i)
            fieldnames[i]= string("Field-") + PLearn::tostring(i);
    }
  
    // We are now more careful about the possibility of the stream being in a
    // bad state. The sequel in.seekg(0); in.clear(); did not seem to do the job.
    in = PStream(); // Close file.
    PStream loadmat = openFile(filename, PStream::raw_ascii, "r");
  
    mat.resize(length,width);
    TVec<int> current_map(width);
    current_map.fill(1001);   // The value of the string mapping we start with.
    TVec<T> current_max(width); // The max of the numerical values in each column.
    current_max.clear();
    // Initialize the mappings to empty mappings.
    if (map_sr) 
        map_sr->resize(width);

    string inp_element;
    for(int i=0; i<length; i++)
    {
        T* mat_i = mat[i];
        skipBlanksAndComments(loadmat);
        for(int j=0; j<width; j++) 
        {
            if (loadmat.good()) 
            {
                loadmat >> inp_element;
                if (pl_isnumber(inp_element)) 
                {
                    mat_i[j] = T(pl_strtod(inp_element.c_str(), 0));
                    if (map_sr) 
                    {
                        T val = mat_i[j];
                        // We need to make sure that this number does not conflict
                        // with a string mapping.
                        if (val > current_max[j])
                            current_max[j] = val;
                        if (current_max[j] >= current_map[j])
                            current_map[j] = int(current_max[j] + 1);
                        map<string,real>& m = (*map_sr)[j];
                        for (map<string,real>::iterator it = m.begin(); it != m.end(); it++) 
                        {
                            if (fast_exact_is_equal(it->second, val)) 
                            {
                                // We're screwed, there is currently a mapping between a string
                                // and this numeric value. We have to change it.
                                // We pick either the next string mapping value, or the current
                                // max in the column (+ 1) if it is larger.
                                int cur_max_plus_one = int(real(current_max[j]) + 1);
                                if (cur_max_plus_one > current_map[j]) 
                                {
                                    it->second = cur_max_plus_one;
                                    current_map[j] = cur_max_plus_one;
                                } 
                                else
                                    it->second = current_map[j];
                                current_map[j]++;
                                // In addition, we have to modify all previous data, which sucks.
                                for (int k = 0; k < i; k++) 
                                {
                                    if (fast_exact_is_equal(mat(k, j), val))
                                        mat(k, j) = T(it->second);
                                }
                            }
                        }
                    }
                } 
                else 
                {
                    // This is a string!
                    if (map_sr) // Already encountered ?
                    {                        
                        map<string,real>& m = (*map_sr)[j];
                        map<string,real>::iterator it = m.find(inp_element);
                        if(it != m.end()) // It already exists in the map.
                        {
                            mat_i[j] = T(it->second);
                        } 
                        else           // We need to add it.
                        {                            
                            (*map_sr)[j][inp_element] = current_map[j];
                            mat_i[j] = T(current_map[j]);
                            current_map[j]++;
                        }
                    } 
                    else
                        PLERROR("In loadAscii - You need to provide 'map_sr' if you want to load an ASCII file with strings");
                }
            }
            else 
            {
                PLERROR("In loadAscii - Not enough elements in row %d: found "
                        "%d, but expected %d", i, j, width);
            }
        }
    }
}

Here is the call graph for this function:

VMat PLearn::loadAsciiAsVMat ( const PPath &  filename)

Load an ASCII file and return the corresponding VMat (this will be a MemoryVMatrix, since the entire file is loaded in memory).

Definition at line 128 of file VMat.cc.

References i, PLearn::TVec< T >::length(), loadAscii(), m, PLearn::TVec< T >::size(), and PLearn::TMat< T >::width().

Referenced by getDataSet(), and loadUCIAMat().

{
    Mat m;
    TVec<string> fn;
    TVec< map<string,real> > map_sr;  // String -> real mappings.
    int inputsize = -1;
    int targetsize = -1;
    int weightsize = -1;
    loadAscii(filename, m, fn, inputsize, targetsize, weightsize, &map_sr);
    VMat vm = new MemoryVMatrix(m);
    if(inputsize>=0)
        vm->defineSizes(inputsize,targetsize,weightsize);
    else
        vm->defineSizes(m.width(),0,0);

    vm->updateMtime(filename);
    // Set the discovered string -> real mappings.
    for (int i = 0; i < map_sr.length(); i++) {
        vm->setStringMapping(i, map_sr[i]);
    }
    for(int i=0;i<fn.size();i++)
        vm->declareField(i, fn[i]);
    return vm;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::loadAsciiSingleBinaryDescriptor ( const PPath &  filename,
TMat< T > &  mat 
)

Load an ASCII matrix whose format is: (entry_name, long_binary_dscriptor) with 'long_binary_dscriptor' being of the form '001100101011', each character being an entry of the matrix.

(entry_name is ignored). Header must be: #size: length width

Definition at line 390 of file MatIO.h.

References PLearn::PStream::getline(), i, in, j, openFile(), PLearn::PStream::peek(), pl_strtod(), PLERROR, PLearn::PStream::raw_ascii, removeblanks(), PLearn::TMat< T >::resize(), skipBlanksAndComments(), split(), toint(), and ws().

Referenced by getDataSet().

{
    PStream in = openFile(filename, PStream::raw_ascii, "r");

    int length = -1;
    int width = -1;
  
    in >> ws;
    string line;

    while(in.peek()=='#')
    {
        in.getline(line);
 
        size_t pos=line.find(":");
        if(pos!=string::npos)
        {
            string sub=line.substr(0,pos);
            if(sub=="#size") // we've found the dimension specification line
            {
                string siz=removeblanks((line.substr(pos)).substr(1));
                vector<string> dim = split(siz," ");
                if(dim.size()!=2)  PLERROR("In loadAsciiSingleBinaryDescriptor: I need exactly 2 dimensions for matrix");
                length = toint(dim[0]);
                width = toint(dim[1]);
            }
        }
        in >> ws;
    }

    if(length==-1)  // still looking for size info...
    {
        PLERROR("In loadAsciiSingleBinaryDescriptor: Be nice and specify a width and length");
    }

    // We are now more careful about the possibility of the stream being in a
    // bad state.
    mat.resize(length,width);
    string inp_element;
    for(int i=0; i<length; i++)
    {
        T* mat_i = mat[i];
        skipBlanksAndComments(in);
        in >> inp_element;  // Read the entry name.
        in >> inp_element;  // Read the binary descriptor.
        if (inp_element.length() != (unsigned int) width) {
            PLERROR("In loadAsciiSingleBinaryDescriptor, a descriptor isn't the right size");
        }
        for(int j=0; j<width; j++) {
            mat_i[j] = pl_strtod(inp_element.substr(j,1).c_str(), 0);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadAsciiWithoutSize ( const string &  filename,
const Mat &  mat 
)

Definition at line 916 of file MatIO.cc.

References i, j, PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{

    FILE *f = fopen(filename.c_str(),"r");
    if (!f)
        PLERROR("In loadAsciiWithoutSize, could not open file %s for reading.",filename.c_str());

    if (mat.length() < 1 || mat.width() < 1)
        PLERROR("In loadAsciiWithoutSize, the size of the matrix is not defined yet");

    for(int i=0; i<mat.length(); i++)
    {
        real* row_i = mat[i];
        for(int j=0; j<mat.width(); j++)
#ifdef USEDOUBLE
            fscanf(f,"%lf",&row_i[j]);
#else
        fscanf(f,"%f",&row_i[j]);
#endif
    }
}

Here is the call graph for this function:

void PLearn::loadAsciiWithoutSize ( const string &  filename,
const Vec &  vec 
)

Reads and writes an ascii file without the size header (assuming that the size(length() and width()) is set)

Definition at line 875 of file MatIO.cc.

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

Referenced by PLearn::MatlabInterface::eigs_r11(), and matlabR11eigs().

{
    FILE *f;
    f=fopen(filename.c_str(),"r");
    if (!f)
        PLERROR("In Vec::loadAsciiWithoutSize could not open file %s for reading",filename.c_str());

    if (vec.length() < 1)
        PLERROR("In Vec::loadAsciiWithoutSize, the size of the vector is not defined yet");

    real* p = vec.data();
    for (int i=0;i<vec.length();i++,p++)
    {
#ifdef USEDOUBLE
        fscanf(f,"%lf",p);
#else
        fscanf(f,"%f",p);
#endif
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::loadATT800 ( VMat &  training_set,
VMat &  test_set 
)

Definition at line 301 of file databases.cc.

References PLearn::TMat< T >::column(), i, PLearn::TMat< T >::length(), loadAscii(), normalizeDataSets(), shuffleRows(), PLearn::TMat< T >::subMatColumns(), PLearn::TMat< T >::subMatRows(), sum(), and PLearn::TMat< T >::width().

{
    Mat data;
    loadAscii("DBDIR:ATT800/att800.amat",data);

    // preprocessing the data:
    Mat durations = data.subMatColumns(0,12);
    Mat daytimes = data.subMatColumns(12,24);
    Mat classnums = data.column(36);

    Mat newdata(data.length(), data.width()+2);
    Mat new_total_durations = newdata.column(0);
    Mat new_durations = newdata.subMatColumns(1,12);
    Mat new_total_daytimes = newdata.column(13);
    Mat new_daytimes = newdata.subMatColumns(14,24);
    Mat new_classnums = newdata.column(38);

    new_durations << durations;
    new_daytimes << daytimes;
    new_classnums << classnums;
    for(int i=0; i<data.length(); i++)
    {
        new_total_durations(i,0) = sum(new_durations(i), false);
        if(new_total_durations(i,0) > 0.0)
        {
            Vec new_durations_i = new_durations(i);
            new_durations_i /= new_total_durations(i,0);
        }
        new_total_daytimes(i,0) = sum(new_daytimes(i), false);
        if(new_total_daytimes(i,0) > 0.0)
        {
            Vec new_daytimes_i = new_daytimes(i);
            new_daytimes_i /= new_total_daytimes(i,0);          
        }
    }

    shuffleRows(newdata);      
    Mat training_data = newdata.subMatRows(0,400);
    Mat test_data = newdata.subMatRows(100,185);

    // normalize the new inputs...
    normalizeDataSets(training_data,test_data);      

    training_set = VMat(training_data);
    test_set = VMat(test_data);
    return 2; // 2 classes
}

Here is the call graph for this function:

int PLearn::loadBreastCancer ( VMat &  training_set,
VMat &  validation_set,
VMat &  test_set,
int  ntrain,
int  nvalid,
bool  uniq 
)

These calls return the number of classes...

Definition at line 196 of file databases.cc.

References PLearn::TMat< T >::length(), loadAscii(), normalizeDataSets(), shuffleRows(), and PLearn::TMat< T >::subMatRows().

{
    Mat data;
    if(uniq)
        loadAscii("DBDIR:Breast/breast-cancer-wisconsin-uniq.amat",data);
    else
        loadAscii("DBDIR:Breast/breast-cancer-wisconsin.amat",data);
  
    shuffleRows(data);
  
    // split the data into training_set and test_set
    int ntest = data.length()-(ntrain+nvalid);
    Mat training_data = data.subMatRows(0,ntrain);
    Mat validation_data = data.subMatRows(ntrain, nvalid);
    Mat test_data = data.subMatRows(ntrain+nvalid,ntest);
  
    // normalize the inputs
    normalizeDataSets(training_data,validation_data,test_data);

    training_set = VMat(training_data);
    validation_set = VMat(validation_data);
    test_set = VMat(test_data);
    return 2; // 2 classes
}

Here is the call graph for this function:

VMat PLearn::loadBreastCancerWisconsin ( bool  normalize,
bool  uniq 
)

Definition at line 180 of file databases.cc.

References loadAscii(), normalizeDataSet(), shuffleRows(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

Referenced by loadClassificationDataset().

{
    Mat data;
    if(uniq)
        loadAscii("DBDIR:Breast/breast-cancer-wisconsin-uniq.amat",data);
    else
        loadAscii("DBDIR:Breast/breast-cancer-wisconsin.amat",data);
    if(normalize)
    {
        Mat datainput = data.subMatColumns(0,data.width()-1);
        normalizeDataSet(datainput);
    }
    shuffleRows(data);
    return VMat(data);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadCallxx ( int  year,
VMat &  d 
)

Definition at line 666 of file databases.cc.

References loadAscii(), and tostring().

{
    Mat data;
    PPath filename = "DBDIR:Finance/call" + tostring(year) + ".stc.data";
    loadAscii(filename, data);
    d = VMat(data);
}

Here is the call graph for this function:

void PLearn::loadClassificationDataset ( const string &  datasetname,
int inputsize,
int nclasses,
VMat &  trainset,
VMat &  testset,
bool  normalizeinputs,
VMat &  allset 
)

Definition at line 744 of file databases.cc.

References computeMeanAndStddev(), fast_exact_is_equal(), i, input2dSet(), PLearn::TVec< T >::length(), loadBreastCancerWisconsin(), loadLetters(), loadMNIST(), loadPMat(), loadUCI(), loadUSPS(), m, normalize(), PLERROR, remapLastColumn(), split(), PLearn::VMat::subMatRows(), PLearn::TVec< T >::subVec(), toint(), PLearn::VMat::width(), and PLearn::TMat< T >::width().

{
    string dbname = datasetname;
    int reduced_size = 0;
    vector<string> dataset_and_size = split(dbname,":");
    if(dataset_and_size.size()==2)
    {
        dbname = dataset_and_size[0];
        reduced_size = toint(dataset_and_size[1]);
    }

    if(dbname=="2d")
    {
        trainset = input2dSet();
        Mat mapping(2,2);
        mapping << string("-1 0 1 1");
        trainset = remapLastColumn(trainset,mapping);
        testset = trainset;
        inputsize = 2;
        nclasses = 2;
    }
    else if(dbname=="letters")
    {
        loadLetters(inputsize, nclasses, trainset, testset);
    }
    else if(dbname=="breast")
    {
        VMat dbname_vm = loadBreastCancerWisconsin();
        inputsize = dbname_vm.width()-1;
        nclasses = 2;
        split(dbname_vm,0.5,trainset,testset);
    }
    else if(dbname=="usps")
    {
        loadUSPS(trainset,testset,true);
        inputsize = trainset.width()-1;
        nclasses = 10;
    }
    else if(dbname=="mnist")
    {
        loadMNIST(trainset,testset);
        inputsize = trainset.width()-1;
        nclasses = 10;
    }
    else if(dbname=="mnist_override")
    {
        loadMNIST(trainset,testset);
        inputsize = trainset.width()-1;
        nclasses = 10;
        Mat m;
        loadPMat("mnist_override.pmat",m);
        if(m.width() != inputsize+1)
            PLERROR("mnist_overrid.pmat is espected to have a width of %d, but has %d",inputsize+1,m.width());
        trainset = VMat(m);
    }
    else if(dbname.length()==5 && dbname.substr(0,4)=="usps" && dbname[4]>='0' && dbname[4]<='9')
    {
        int classnum = dbname[4]-'0';
        loadUSPS(trainset,testset,true);
        inputsize = trainset.width()-1;
        trainset = remapLastColumn(trainset,classnum,1,0);
        testset = remapLastColumn(testset,classnum,1,0);
        nclasses = 2;
    }
    else if(dbname.length()==6 && dbname.substr(0,5)=="mnist" && dbname[5]>='0' && dbname[5]<='9')
    {
        int classnum = dbname[5]-'0';
        loadMNIST(trainset,testset);
        inputsize = trainset.width()-1;
        trainset = remapLastColumn(trainset,classnum,1.,0.);
        testset = remapLastColumn(testset,classnum,1.,0.);
        nclasses = 2;
    }
    else if (dbname.substr(0,4) == "UCI_") {
        string db_spec;
        string type;
        if (dbname.substr(0,8) == "UCI_KDD_") {
            db_spec = dbname.substr(8);
            type = "KDD";
        } else {
            db_spec = dbname.substr(4);
            type = "MLDB";
        }
    
        size_t look_for_id = db_spec.rfind("_ID=");
        string db_dir;
        string id = "";
        if (look_for_id != string::npos) {
            // There is an ID specified.
            db_dir = db_spec.substr(0, look_for_id);
            id = db_spec.substr(look_for_id + 4);
        } else {
            db_dir = db_spec;
        }
        loadUCI(trainset, testset, allset, db_dir, id, normalizeinputs,type);
        inputsize = allset->inputsize();
    
    }
    else
        PLERROR("Unknown dbname %s",dbname.c_str());

    if(reduced_size)
    {
        trainset = trainset.subMatRows(0,reduced_size);
        testset = testset.subMatRows(0,reduced_size);
    }

    if(normalizeinputs)
    {
        Vec meanvec;
        Vec stddevvec;
        computeMeanAndStddev(trainset, meanvec, stddevvec);
        meanvec = meanvec.subVec(0,inputsize);
        stddevvec = stddevvec.subVec(0,inputsize);
        for (int i = 0; i < stddevvec.length(); i++) {
            if (fast_exact_is_equal(stddevvec[i], 0)) {
                // The standard dev is 0, the row must be constant. Since we don't
                // want nans we put 1 instead.
                stddevvec[i] = 1;
            }
        }
        for (int i=0;i<inputsize;i++)
            if (fast_exact_is_equal(stddevvec[i], 0)) stddevvec[i]=1;
        trainset = normalize(trainset,meanvec,stddevvec);
        testset = normalize(testset,meanvec,stddevvec);
    }
}

Here is the call graph for this function:

string PLearn::loadClassificationDatasetHelp ( ) [inline]

This will return a VMat with a target in the last column in {0,..,nclasses-1} (for binary classification possible values are 0 and 1 (not -1)). Possible dbname are: 2d letters breast usps mnist usps0 ... usps9 nist0 ... usps9 The dbname can optionally be followed by :size in which case only the 'size' first elements of trainset and testset will be kept.

Definition at line 129 of file databases.h.

{
    return "  Preprogrammed datasets are: \n"
        "    2d \n"
        "    letters \n"
        "    breast \n"
        "    usps \n"
        "    mnist \n"
        "    usps0 ... usps9 \n"
        "    nist0 ... usps9 \n"
        "    They can optionally be followed by :size in which case only the 'size' \n"
        "    first rows will be kept. \n";
}
void PLearn::loadCorel ( Mat &  training_set,
Mat &  validation_set,
Mat &  test_set,
int  negative_class,
int  positive_class 
)

Definition at line 614 of file databases.cc.

References PLearn::TMat< T >::fill(), PLearn::TMat< T >::length(), loadCorelDatamat(), PLearn::TMat< T >::resize(), shuffleRows(), smoothCorelHisto(), PLearn::TMat< T >::subMat(), and PLearn::TMat< T >::width().

{
    // A is the negative class (will have 0 classnums)
    // B is the positive class (will have 1 classnums)

    Mat trainA, validA, testA;
    Mat trainB, validB, testB;

    loadCorelDatamat(negative_class, trainA, validA, testA);
    trainA = smoothCorelHisto(trainA);
    validA = smoothCorelHisto(validA);
    testA = smoothCorelHisto(testA);
    loadCorelDatamat(positive_class, trainB, validB, testB);
    trainB = smoothCorelHisto(trainB);
    validB = smoothCorelHisto(validB);
    testB = smoothCorelHisto(testB);
    int inputsize = trainA.width();

    training_set.resize(trainA.length()+trainB.length(), inputsize+1);  
    Mat trainingAinputs = training_set.subMat(0, 0, trainA.length(), inputsize);
    Mat trainingAclassnums = training_set.subMat(0, inputsize, trainA.length(), 1);
    Mat trainingBinputs = training_set.subMat(trainA.length(), 0, trainB.length(), inputsize);
    Mat trainingBclassnums = training_set.subMat(trainA.length(), inputsize, trainB.length(), 1);
    trainingAinputs << trainA;
    trainingAclassnums.fill(0.0);
    trainingBinputs << trainB;
    trainingBclassnums.fill(1.0);
    shuffleRows(training_set);
  
    validation_set.resize(validA.length()+validB.length(), inputsize+1);  
    Mat validAinputs = validation_set.subMat(0, 0, validA.length(), inputsize);
    Mat validAclassnums = validation_set.subMat(0, inputsize, validA.length(), 1);
    Mat validBinputs = validation_set.subMat(validA.length(), 0, validB.length(), inputsize);
    Mat validBclassnums = validation_set.subMat(validA.length(), inputsize, validB.length(), 1);
    validAinputs << validA;
    validAclassnums.fill(0.0);
    validBinputs << validB;
    validBclassnums.fill(1.0);
    shuffleRows(validation_set);

    test_set.resize(testA.length()+testB.length(), inputsize+1);  
    Mat testAinputs = test_set.subMat(0, 0, testA.length(), inputsize);
    Mat testAclassnums = test_set.subMat(0, inputsize, testA.length(), 1);
    Mat testBinputs = test_set.subMat(testA.length(), 0, testB.length(), inputsize);
    Mat testBclassnums = test_set.subMat(testA.length(), inputsize, testB.length(), 1);
    testAinputs << testA;
    testAclassnums.fill(0.0);
    testBinputs << testB;
    testBclassnums.fill(1.0);
    shuffleRows(test_set);
}

Here is the call graph for this function:

void PLearn::loadCorelDatamat ( int  classnum,
Mat &  train,
Mat &  valid,
Mat &  test 
)

Definition at line 513 of file databases.cc.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::resize(), reverse_float(), test(), tostring(), and PLearn::TMat< T >::width().

Referenced by loadCorel().

{
    int len;
    int width = 16*16*16*2;
    PPath filename;

    // Load train
    {
        filename = "DBDIR:Corel/train/size" + tostring(classnum);
        ifstream sizein(filename.c_str()); // TODO: use a PStream?
        sizein >> len;
        Mat datamat(len, width);

        filename = "DBDIR:Corel/train/histo" + tostring(classnum);
        ifstream datain(filename.c_str());
#ifdef USEFLOAT
        datain.read((char*)datamat.data(), len*width*4);
#ifdef LITTLEENDIAN
        reverse_float(datamat.data(), len*width);
#endif
#else
        PLERROR("In loadCorelDatamat USEDOUBLE case not yet implemented correctly");
#endif
        // Now copy only the useful features
        train.resize(len,width/2);
        for(int i=0; i<train.length(); i++)
            for(int j=0; j<train.width(); j++)
                train(i,j) = datamat(i,2*j);
    }

    // Load valid
    {
        filename = "DBDIR:Corel/valid/size" + tostring(classnum);
        ifstream sizein(filename.c_str());
        sizein >> len;
        Mat datamat(len, width);

        filename = "DBDIR:Corel/valid/histo" + tostring(classnum);
        ifstream datain(filename.c_str());
#ifdef USEFLOAT
        datain.read((char*)datamat.data(), len*width*4);
#ifdef BIGENDIAN
        reverse_float(datamat.data(), len*width);
#endif
#else
        PLERROR("In loadCorelDatamat USEDOUBLE case not yet implemented correctly");
#endif

        // Now copy only the useful features
        valid.resize(len,width/2);
        for(int i=0; i<valid.length(); i++)
            for(int j=0; j<valid.width(); j++)
                valid(i,j) = datamat(i,2*j);
    }

    // Load test
    {
        filename = "DBDIR:Corel/test/size" + tostring(classnum);
        ifstream sizein(filename.c_str());
        sizein >> len;
        Mat datamat(len, width);

        filename = "DBDIR:Corel/test/histo" + tostring(classnum);
        ifstream datain(filename.c_str());
#ifdef USEFLOAT
        datain.read((char*)datamat.data(), len*width*4);
#ifdef BIGENDIAN
        reverse_float(datamat.data(), len*width);
#endif
#else
        PLERROR("In loadCorelDatamat USEDOUBLE case not yet implemented correctly");
#endif

        // Now copy only the useful features
        test.resize(len,width/2);
        for(int i=0; i<test.length(); i++)
            for(int j=0; j<test.width(); j++)
                test(i,j) = datamat(i,2*j);
    }
} 

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::loadDiabetes ( bool  normalize)

Definition at line 265 of file databases.cc.

References loadAscii(), normalizeDataSet(), shuffleRows(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

{
    Mat data;
    loadAscii("DBDIR:Diabetes/diabetes.amat",data);

    if(normalize)
    {
        Mat datainput = data.subMatColumns(0,data.width()-1);
        normalizeDataSet(datainput);
    }
    shuffleRows(data);
    return VMat(data);
}

Here is the call graph for this function:

int PLearn::loadDiabetes ( VMat &  training_set,
VMat &  validation_set,
VMat &  test_set,
int  ntrain,
int  nvalid 
)

Definition at line 279 of file databases.cc.

References PLearn::TMat< T >::length(), loadAscii(), normalizeDataSets(), shuffleRows(), and PLearn::TMat< T >::subMatRows().

{
    Mat data;
    loadAscii("DBDIR:Diabetes/diabetes.amat",data);

    shuffleRows(data);

    // split the data into training_data and test_data
    int ntest = data.length()-(ntrain+nvalid);
    Mat training_data = data.subMatRows(0,ntrain);
    Mat validation_data = data.subMatRows(ntrain, nvalid);
    Mat test_data = data.subMatRows(ntrain+nvalid,ntest);

    // normalize the inputs
    normalizeDataSets(training_data,validation_data,test_data);      

    training_set = VMat(training_data);
    validation_set = VMat(validation_data);
    test_set = VMat(test_data);
    return 2; // 2 classes
}

Here is the call graph for this function:

string PLearn::loadFileAsString ( const PPath &  filepath)

Returns the whole content of the file as a string.

Definition at line 323 of file fileutils.cc.

References filesize(), in, n, openFile(), PLearn::PStream::raw_ascii, and PLearn::PStream::read().

Referenced by PLearn::TextFilesVMatrix::loadMappings(), PLearn::Molecule::readFromVRMLFile(), PLearn::VMatrix::resolveFieldInfoLink(), and PLearn::FieldConvertCommand::run().

{
    PStream in = openFile(filepath, PStream::raw_ascii, "r");
    long n = filesize(filepath);

    string result;
    in.read(result, streamsize(n));
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadGnuplot ( const string &  filename,
Mat &  mat 
)

Format readable by gnuplot.

Definition at line 654 of file MatIO.cc.

References i, in, j, PLERROR, and PLearn::TMat< T >::resize().

Referenced by loadHousing().

{
    ifstream in(filename.c_str());
    if (!in) 
        PLERROR("In loadGnuplot, couldn't open %s for reading.",filename.c_str());

    char buf[10000];
    // First pass to count the number of rows and columns
    int nrows = 0;
    int ncols = 0;
    in.getline(buf,sizeof(buf)-1);
    while(in)
    {
        int pos=0;
        while(buf[pos]==' ' || buf[pos]=='\t')
            pos++;
        if(buf[pos]!='#' && buf[pos]!='\n' && buf[pos]!='\r')
        {
            nrows++;
            if(ncols==0)
            {
                istringstream inputline(buf);
                real value;
                while(inputline)
                {
                    inputline >> value;
                    ncols++;
                }
                ncols--; // correct count
            }
        }
        in.getline(buf,sizeof(buf)-1);
    }
    in.close();
    mat.resize(nrows,ncols);
    in.open(filename.c_str());
    for(int i=0; i<nrows; i++)
    {
        char firstchar = '#';
        while(firstchar == '#' || firstchar == '\n' || firstchar=='\r')
        {
            in.getline(buf,sizeof(buf)-1);
            int pos=0;
            while(buf[pos]==' ' || buf[pos]=='\t')
                pos++;
            firstchar = buf[pos];
        }
        istringstream inputline(buf);      
        for(int j=0; j<ncols; j++)
            inputline >> mat(i,j);
    }
    in.close();
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::loadHousing ( bool  normalize)

Definition at line 233 of file databases.cc.

References loadGnuplot(), normalizeDataSet(), and PLearn::TMat< T >::subMatColumns().

{
    Mat data;
    loadGnuplot("UCI_MLDB_REP:housing/housing.data", data);
    Mat inputs = data.subMatColumns(0,13);
    Mat targets = data.subMatColumns(13,1);
    if (normalize)
    {
        // normalize the inputs
        normalizeDataSet(inputs);
        // put the targets in a nicer range by dividing by 100
        targets *= real(0.01);
    }
    return VMat(data);
}

Here is the call graph for this function:

VMat PLearn::loadIonosphere ( )

Definition at line 257 of file databases.cc.

References loadUCIMLDB(), and shuffleRows().

{
    Mat data = loadUCIMLDB("UCI_MLDB_REP:ionosphere/ionosphere.data");
    shuffleRows(data);
    // no need to normalize
    return VMat(data);
}

Here is the call graph for this function:

void PLearn::loadJPEGrgb ( const string &  jpeg_filename,
Mat &  rgbmat,
int row_size,
int  scale = 1 
)

read a file in JPEG format (read the RGB components). this will be resized to a (npixels x 3) matrix, where the (R,G,B) pixels are ordered by rows of the original image. To figure the actual image dimensions, the row size is also returned (so the number of columns is length()/row_size). An optional subsampling factor can be given (1,2,4 or 8) The R,G,B components always range from 0 to 255.

Definition at line 1531 of file MatIO.cc.

References d, PLearn::TMat< T >::data(), i, n, PLERROR, PLearn::TMat< T >::resize(), and w.

{
    string tmpfile = jpeg_filename + ".pnm";
    char command[1000];
    sprintf(command,"djpeg -pnm -scale 1/%d %s > %s",
            scale,jpeg_filename.c_str(),tmpfile.c_str());
    system(command);
    FILE* fp = fopen(tmpfile.c_str(),"r");
    if (!fp)
        PLERROR("reading %s",tmpfile.c_str());
    fscanf(fp,"%s",command);
    int w,h;
    fscanf(fp,"%d %d\n",&w,&h);
    fscanf(fp,"%*d\n");
    int n=w*h;
    rgbmat.resize(n,3);
    real *d=rgbmat.data();
    for (int i=0;i<n;i++)
        for (int k=0;k<3;k++,d++)
            *d =(real)(getc(fp));
    fclose(fp);
    sprintf(command,"rm %s",tmpfile.c_str());
    system(command);
    row_size = w;
}

Here is the call graph for this function:

VMat PLearn::loadLetters ( bool  normalize)

Definition at line 349 of file databases.cc.

References loadAscii(), normalizeDataSet(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

Referenced by loadClassificationDataset(), loadLetters(), and main().

{
    Mat letters;
    loadAscii("DBDIR:Letter/letter.amat",letters);

    if(normalize)
    {
        Mat datainput = letters.subMatColumns(0,letters.width()-1);
        normalizeDataSet(datainput);
    }

    return VMat(letters);
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::loadLetters ( const char *  class0,
const char *  class1,
bool  normalize 
)

Definition at line 364 of file databases.cc.

References i, PLearn::TMat< T >::length(), loadAscii(), n, normalizeDataSet(), strlen(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

{
    int letter_classnum[26];
    for(int l=0; l<26; l++)
        letter_classnum[l] = -1;
    for(unsigned int i=0; i<strlen(class0); i++)
        letter_classnum[class0[i]-'A'] = 0;
    for(unsigned int i=0; i<strlen(class1); i++)
        letter_classnum[class1[i]-'A'] = 1;

    Mat letters;
    loadAscii("DBDIR:Letter/letter.amat",letters);

    int nkeptsamples = 0;
    for(int i=0; i<letters.length(); i++)
        if(letter_classnum[int(letters(i,letters.width()-1))] >= 0)
            nkeptsamples++;

    Mat keptletters(nkeptsamples, letters.width());
    int n = 0;
    for(int i=0; i<letters.length(); i++)
    {
        int classnum = letter_classnum[int(letters(i,letters.width()-1))];
        if(classnum >= 0)
        {
            keptletters(n) << letters(i);
            keptletters(n,keptletters.width()-1) = classnum;
            n++;
        }
    }

    if(normalize)
    {
        Mat datainput = keptletters.subMatColumns(0,keptletters.width()-1);
        normalizeDataSet(datainput);
    }

    return VMat(keptletters);
}

Here is the call graph for this function:

int PLearn::loadLetters ( VMat &  training_set,
VMat &  validation_set,
VMat &  test_set,
char *  which_letters,
real  validation_fraction,
real  test_fraction,
bool  do_shuffle 
)

Definition at line 404 of file databases.cc.

References c, PLearn::TMat< T >::copy(), i, PLearn::TMat< T >::length(), loadAscii(), normalizeDataSets(), shuffleRows(), strlen(), PLearn::TMat< T >::subMatRows(), and PLearn::TMat< T >::width().

{
    int letter_classnum[26];
    for(int l=0; l<26; l++)
        letter_classnum[l] = -1;
    int classnum = 0;
    for(unsigned int i=0; i<strlen(which_letters); i++)
        letter_classnum[which_letters[i]-'A'] = classnum++;

    Mat letters;
    loadAscii("DBDIR:Letter/letter.amat",letters);

    Mat keptletters(letters.length(),letters.width());
    int k=0;
    for(int i=0; i<letters.length(); i++)
    {
        int c = letter_classnum[(int)letters(i,letters.width()-1)];
        if(c!=-1)
        {
            keptletters(k) << letters(i);
            keptletters(k,keptletters.width()-1) = c;
            k++;
        }
    }
    keptletters.resize(k,letters.width());

    letters = keptletters.copy();

    // free memory used by keptletters
    keptletters = Mat();
    if (do_shuffle){
        shuffleRows(letters);
    }
    int nvalid = int((real)letters.length()*validation_fraction);
    int ntest = int((real)letters.length()*test_fraction);
    int ntrain = letters.length()-(nvalid+ntest);

    Mat training_data = letters.subMatRows(0,ntrain);
    Mat validation_data = letters.subMatRows(ntrain, nvalid);
    Mat test_data = letters.subMatRows(ntrain+nvalid,ntest);

    // normalize the inputs
    normalizeDataSets(training_data,validation_data,test_data);

    training_set = VMat(training_data);
    validation_set = VMat(validation_data);
    test_set = VMat(test_data);
    return int(strlen(which_letters));
}

Here is the call graph for this function:

VMat PLearn::loadLetters ( int  n_letters,
bool  do_shuffle 
)

Definition at line 454 of file databases.cc.

References c, PLearn::TMat< T >::copy(), i, PLearn::TMat< T >::length(), loadAscii(), PLERROR, shuffleRows(), and PLearn::TMat< T >::width().

{
    if (n_letters > 26 || n_letters < 1)
        PLERROR("In loadLetters: alphabet is at most 26 letters (and at least 1 letter)!");
    int letter_classnum[26];
    for(int l=0; l<26; l++)
        letter_classnum[l] = -1;
    int classnum = 0;
    int letter = 0;
    for(int i=0; i<n_letters; i++)
        letter_classnum[letter++] = classnum++;

    Mat letters;
    loadAscii("DBDIR:Letter/letter.amat",letters);

    Mat keptletters(letters.length(),letters.width());
    int k=0;
    for(int i=0; i<letters.length(); i++)
    {
        int c = letter_classnum[(int)letters(i,letters.width()-1)];
        if(c!=-1)
        {
            keptletters(k) << letters(i);
            keptletters(k,keptletters.width()-1) = c;
            k++;
        }
    }
    keptletters.resize(k,letters.width());

    letters = keptletters.copy();

    // free memory used by keptletters
    keptletters = Mat();
    if (do_shuffle){
        shuffleRows(letters);
    }
    return VMat(letters);
}

Here is the call graph for this function:

int PLearn::loadLetters ( VMat &  training_set,
VMat &  validation_set,
VMat &  test_set,
int  n_letters,
real  validation_fraction,
real  test_fraction,
bool  do_shuffle 
)

Definition at line 493 of file databases.cc.

References PLearn::VMat::length(), loadLetters(), normalizeDataSets(), and PLearn::VMat::subMatRows().

{
    VMat letters=loadLetters(n_letters,do_shuffle);
    int nvalid = int((real)letters.length()*validation_fraction);
    int ntest = int((real)letters.length()*test_fraction);
    int ntrain = letters.length()-(nvalid+ntest);

    Mat training_data = letters.subMatRows(0,ntrain);
    Mat validation_data = letters.subMatRows(ntrain, nvalid);
    Mat test_data = letters.subMatRows(ntrain+nvalid,ntest);

    // normalize the inputs
    normalizeDataSets(training_data,validation_data,test_data);

    training_set = VMat(training_data);
    validation_set = VMat(validation_data);
    test_set = VMat(test_data);
    return n_letters; 
}

Here is the call graph for this function:

void PLearn::loadLetters ( int inputsize,
int nclasses,
VMat &  trainset,
VMat &  testset 
)

Definition at line 734 of file databases.cc.

References loadAscii(), PLearn::TMat< T >::subMatRows(), and PLearn::TMat< T >::width().

{
    Mat letters;
    loadAscii("DBDIR:Letter/letter.amat",letters);
    inputsize = letters.width()-1;
    nclasses = 26;
    trainset = VMat(letters.subMatRows(0,16000));
    testset = VMat(letters.subMatRows(16000,4000));
}

Here is the call graph for this function:

void PLearn::loadMat ( const string &  filename,
TMat< float > &  mat 
)

Tries to guess the format...

(quite dumb right now) This is currently what the old constructor with string argument did

Definition at line 88 of file MatIO.cc.

References c, extract_extension(), extract_filename(), in, loadAscii(), loadPMat(), PLERROR, rm(), and string_begins_with().

{
    string tmp_file_name = file_name;
    bool load_remote =
        string_begins_with(file_name, "https:") ||
        string_begins_with(file_name, "http:") || 
        string_begins_with(file_name, "ftp:");
    if(load_remote)
    {
        tmp_file_name = "/tmp/" + extract_filename(file_name);
        string command = "curl --silent " + file_name + " > " + tmp_file_name;
        system(command.c_str());
    }
    string ext = extract_extension(tmp_file_name);
    // See if we know the extension...
    if(ext==".amat")
        loadAscii(tmp_file_name, mat);
    else if (ext==".pmat" || ext==".lpmat" || ext==".bpmat")
        loadPMat(tmp_file_name,mat);
    else // try to guess the format from the header
    {
        ifstream in(tmp_file_name.c_str());
        if(!in)
            PLERROR("In loadMat: could not open file %s",tmp_file_name.c_str());      
        char c = in.get();
        in.close();
        if(c=='M') // it's most likely a .pmat format
            loadPMat(tmp_file_name,mat);
        else 
            loadAscii(tmp_file_name,mat);
    }
    if (load_remote)
        rm(tmp_file_name);
}

Here is the call graph for this function:

void PLearn::loadMat ( const string &  file_name,
TMat< double > &  mat 
)

Definition at line 123 of file MatIO.cc.

References c, extract_extension(), extract_filename(), in, loadAscii(), loadPMat(), PLERROR, rm(), and string_begins_with().

{
    string tmp_file_name = file_name;
    bool load_remote =
        string_begins_with(file_name, "https:") ||
        string_begins_with(file_name, "http:") || 
        string_begins_with(file_name, "ftp:");
    if(load_remote)
    {
        tmp_file_name = "/tmp/" + extract_filename(file_name);
        string command = "curl --silent " + file_name + " > " + tmp_file_name;
        system(command.c_str());
    }
    string ext = extract_extension(tmp_file_name);
    // See if we know the extension...
    if(ext==".amat")
        loadAscii(tmp_file_name, mat);
    else if (ext==".pmat" || ext==".lpmat" || ext==".bpmat")
        loadPMat(tmp_file_name,mat);
    else // try to guess the format from the header
    {
        ifstream in(tmp_file_name.c_str());
        if(!in)
            PLERROR("In loadMat: could not open file %s",tmp_file_name.c_str());      
        char c = in.get();
        in.close();
        if(c=='M') // it's most likely a .pmat format
            loadPMat(tmp_file_name,mat);
        else 
            loadAscii(tmp_file_name,mat);
    }
    if (load_remote)
        rm(tmp_file_name);
}

Here is the call graph for this function:

void PLearn::loadMNIST ( VMat &  training_set,
VMat &  test_set 
) [inline]

Definition at line 72 of file NistDB.h.

Referenced by loadClassificationDataset().

{
    training_set = new NistDB(true);
    test_set = new NistDB(false);
}

Here is the caller graph for this function:

Object * PLearn::loadObject ( const PPath &  filename)

Loads an object from the given file (no macro-preprocessing is performed)

Definition at line 856 of file Object.cc.

References PLearn::Object::build(), in, openFile(), PLearn::PStream::plearn_ascii, and readObject().

Referenced by readObject(), PLearn::Stan::run(), PLearn::ExtractOptionCommand::run(), train_and_test(), and use().

{
    PStream in = openFile(filename, PStream::plearn_ascii, "r");
    Object *o = readObject(in);
    o->build();
    return o;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::loadPimaIndians ( bool  normalize)

Definition at line 221 of file databases.cc.

References loadUCIMLDB(), normalizeDataSet(), shuffleRows(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

{
    Mat data = loadUCIMLDB("UCI_MLDB_REP:pima-indians-diabetes/pima-indians-diabetes.data");
    if(normalize)
    {
        Mat datainput = data.subMatColumns(0,data.width()-1);
        normalizeDataSet(datainput);
    }
    shuffleRows(data);
    return VMat(data);
}

Here is the call graph for this function:

void PLearn::loadPMat ( const string &  filename,
TMat< double > &  mat 
)

Definition at line 490 of file MatIO.cc.

References DATAFILE_HEADERLENGTH, fread_double(), fread_float(), i, j, PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::resize(), and PLearn::TMat< T >::width().

{
    char header[DATAFILE_HEADERLENGTH];
    char matorvec[20];
    char datatype[20];
    char endiantype[20];
    int the_length=0;
    int the_width=0;

    FILE* f = fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In loadPMat, could not open file %s for reading",filename.c_str());
    fread(header,DATAFILE_HEADERLENGTH,1,f);
    if(header[DATAFILE_HEADERLENGTH-1]!='\n')
        PLERROR("In loadPMat(%s), wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());
    sscanf(header,"%s%d%d%s%s",matorvec,&the_length,&the_width,datatype,endiantype);
    if (strcmp(matorvec,"MATRIX")!=0)
        PLERROR("In loadPMat(%s), wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());

    mat.resize(the_length, the_width);

    bool is_file_bigendian = true;
    if (strcmp(endiantype,"LITTLE_ENDIAN")==0)
        is_file_bigendian = false;
    else if (strcmp(endiantype,"BIG_ENDIAN")==0)
        is_file_bigendian = true;
    else
        PLERROR("In loadPMat, wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.");

    if (strcmp(datatype,"FLOAT")==0)
    {
        float* buffer = new float[mat.width()];
        for (int i=0; i<mat.length(); i++)
        {
            double* p = mat[i];
            fread_float(f,buffer,mat.width(),is_file_bigendian);
            for(int j=0; j<mat.width(); j++)
                p[j] = double(buffer[j]);
        }
        delete[] buffer;
    }

    else if (strcmp(datatype,"DOUBLE")==0)
    {
        for (int i=0; i<mat.length(); i++)
        {
            double* p = mat[i];
            fread_double(f,p,mat.width(),is_file_bigendian);
        }
    }

    else
        PLERROR("In loadPMat, wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.");

    fclose(f);
}

Here is the call graph for this function:

void PLearn::loadPMat ( const string &  filename,
TMat< float > &  mat 
)

Definition at line 434 of file MatIO.cc.

References DATAFILE_HEADERLENGTH, fread_double(), fread_float(), i, j, PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::resize(), and PLearn::TMat< T >::width().

Referenced by loadClassificationDataset(), and loadMat().

{
    char header[DATAFILE_HEADERLENGTH];
    char matorvec[20];
    char datatype[20];
    char endiantype[20];
    int the_length;
    int the_width;

    FILE* f = fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In loadPMat, could not open file %s for reading",filename.c_str());
    fread(header,DATAFILE_HEADERLENGTH,1,f);
    if(header[DATAFILE_HEADERLENGTH-1]!='\n')
        PLERROR("In loadPMat(%s), wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());
    sscanf(header,"%s%d%d%s%s",matorvec,&the_length,&the_width,datatype,endiantype);
    if (strcmp(matorvec,"MATRIX")!=0)
        PLERROR("In loadPMat(%s), wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());

    mat.resize(the_length, the_width);

    bool is_file_bigendian = true;
    if (strcmp(endiantype,"LITTLE_ENDIAN")==0)
        is_file_bigendian = false;
    else if (strcmp(endiantype,"BIG_ENDIAN")==0)
        is_file_bigendian = true;
    else
        PLERROR("In loadPMat, wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.");

    if (strcmp(datatype,"FLOAT")==0)
    {
        for (int i=0; i<mat.length(); i++)
        {
            float* p = mat[i];
            fread_float(f,p,mat.width(),is_file_bigendian);
        }
    }
    else if (strcmp(datatype,"DOUBLE")==0)
    {
        double* buffer = new double[mat.width()];
        for (int i=0; i<mat.length(); i++)
        {
            float* p = mat[i];
            fread_double(f,buffer,mat.width(),is_file_bigendian);
            for(int j=0; j<mat.width(); j++)
                p[j] = float(buffer[j]);
        }
        delete[] buffer;
    }

    else
        PLERROR("In loadPMat, wrong header for PLearn binary matrix format. Please use checkheader (in PLearn/Scripts) to check the file.");

    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadPVec ( const string &  filename,
TVec< float > &  vec 
)

Definition at line 252 of file MatIO.cc.

References PLearn::TVec< T >::data(), DATAFILE_HEADERLENGTH, fread_double(), fread_float(), j, PLearn::TVec< T >::length(), PLERROR, and PLearn::TVec< T >::resize().

Referenced by PLearn::TVec< PP< RegressionTreeNode > >::load(), and loadVec().

{
    char header[DATAFILE_HEADERLENGTH];
    char matorvec[20];
    char datatype[20];
    char endiantype[20];
    int the_length;

    FILE* f = fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In loadPVec, could not open file %s for reading",filename.c_str());
    fread(header,DATAFILE_HEADERLENGTH,1,f);
    if(header[DATAFILE_HEADERLENGTH-1]!='\n')
        PLERROR("In loadPVec(%s), wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());
    sscanf(header,"%s%d%s%s",matorvec,&the_length,datatype,endiantype);
    if (strcmp(matorvec,"VECTOR")!=0)
        PLERROR("In loadPVec(%s), wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());

    vec.resize(the_length);

    bool is_file_bigendian = false;
    if (strcmp(endiantype,"LITTLE_ENDIAN")==0)
        is_file_bigendian = false;
    else if (strcmp(endiantype,"BIG_ENDIAN")==0)
        is_file_bigendian = true;
    else
        PLERROR("In loadPVec, wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.");

    if (strcmp(datatype,"FLOAT")==0)
    {
        float* p = vec.data();
        fread_float(f,p,vec.length(),is_file_bigendian);
    }

    else if (strcmp(datatype,"DOUBLE")==0)
    {
        double* buffer = new double[vec.length()];
        float* p = vec.data();
        fread_double(f,buffer,vec.length(),is_file_bigendian);
        for(int j=0; j<vec.length(); j++)
            p[j] = float(buffer[j]);
        delete[] buffer;
    }

    else
        PLERROR("In loadPVec, wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.");

    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadPVec ( const string &  filename,
TVec< double > &  vec 
)

Definition at line 302 of file MatIO.cc.

References PLearn::TVec< T >::data(), DATAFILE_HEADERLENGTH, fread_double(), fread_float(), j, PLearn::TVec< T >::length(), PLERROR, and PLearn::TVec< T >::resize().

{
    char header[DATAFILE_HEADERLENGTH];
    char matorvec[20];
    char datatype[20];
    char endiantype[20];
    int the_length;

    FILE* f = fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In loadPVec, could not open file %s for reading",filename.c_str());
    fread(header,DATAFILE_HEADERLENGTH,1,f);
    if(header[DATAFILE_HEADERLENGTH-1]!='\n')
        PLERROR("In loadPVec(%s), wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());
    sscanf(header,"%s%d%s%s",matorvec,&the_length,datatype,endiantype);
    if (strcmp(matorvec,"VECTOR")!=0)
        PLERROR("In loadPVec(%s), wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.",filename.c_str());

    vec.resize(the_length);

    bool is_file_bigendian = false;
    if (strcmp(endiantype,"LITTLE_ENDIAN")==0)
        is_file_bigendian = false;
    else if (strcmp(endiantype,"BIG_ENDIAN")==0)
        is_file_bigendian = true;
    else
        PLERROR("In loadPVec, wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.");

    if (0 < the_length)
    {
        if (strcmp(datatype,"FLOAT")==0)
        {
            float* buffer = new float[vec.length()];
            double* p = vec.data();
            fread_float(f,buffer,vec.length(),is_file_bigendian);
            for(int j=0; j<vec.length(); j++)
                p[j] = double(buffer[j]);
            delete[] buffer;
        }

        else if (strcmp(datatype,"DOUBLE")==0)
        {
            double* p = vec.data();
            fread_double(f,p,vec.length(),is_file_bigendian);
        }
      
        else
            PLERROR("In loadPVec, wrong header for PLearn binary vector format. Please use checkheader (in PLearn/Scripts) to check the file.");
    }
    fclose(f);
}

Here is the call graph for this function:

Mat PLearn::loadSNMat ( const string &  filename)

SN Format.

Definition at line 958 of file MatIO.cc.

References d, fread_float(), fread_int(), i, and PLERROR.

Referenced by loadUSPS().

{
    FILE *f;
    int d, nd; int i;
    int imn;
    int length, width;

    f=fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In loadFmat, could not open file %s for reading",filename.c_str());

    fread_int(f,&imn,1);
    if (imn!= (0x1e3d4c51L))
        PLERROR("in loadFmat, File does not have the right format");

    /*  read ndim  */
    fread_int(f,&nd,1);
    if (nd<0 || nd>5)
        PLERROR("In loadFmat, Corrupted file: Bad number of dimensions");
    if (nd != 2)
        PLERROR("In loadFmat, ndim is not 2 (not a matrix!)\n");

    /*  read dim  */
    d=0;
    fread_int(f,&length,1);
    d++;
    fread_int(f,&width,1);
    d++;
    while (d++ < 3) 
        fread(&i, sizeof(int), 1, f);
    Mat mat(length,width);
    for(i=0; i<length; i++)
        fread_float(f, mat[i], width);
    fclose(f);
    return mat;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::loadSNVec ( const string &  filename)

Definition at line 1013 of file MatIO.cc.

References d, PLearn::TVec< T >::data(), fread_float(), fread_int(), i, and PLERROR.

{
    FILE *f;
    int d, nd; int i;
    int imn;
    int size;

    f=fopen(filename.c_str(),"rb");
    if (!f)
        PLERROR("In Vec::loadSNVec could not open file %s for reading",filename.c_str());

    fread_int(f,&imn,1);
    if (imn!= (0x1e3d4c51L))
        PLERROR("In Vec::loadSNVec, File does not have the right format");

    /*  read ndim  */
    fread_int(f,&nd,1);
    if (nd<0 || nd>5)
        PLERROR("In Vec::loadSNVec, Corrupted file: Bad number of dimensions");
    if (nd != 1)
        PLERROR("In Vec::loadSNVec, ndim is not 1 (not a vector!)\n");

    /*  read dim  */
    d=0;
    fread_int(f,&i,1);
    size=i;d++;
    while (d++ < 3) 
        fread(&i, sizeof(int), 1, f);

    Vec vec(size);
    fread_float(f,vec.data(),size);

    fclose(f);
    return vec;
}

Here is the call graph for this function:

VMat PLearn::loadSonar ( )

Definition at line 249 of file databases.cc.

References loadUCIMLDB(), and shuffleRows().

{
    Mat data = loadUCIMLDB("UCI_MLDB_REP:undocumented/connectionist-bench/sonar/sonar.all-data");
    shuffleRows(data);
    // no need to normalize
    return VMat(data);
}

Here is the call graph for this function:

Mat PLearn::loadSTATLOG ( const string &  filename,
char ****  to_symbols = 0,
int **  to_n_symbols = 0 
)

STATLOG machine-learning-database-format Format used for most of the STATLOG machine-learning-database. The missing value is represented with the '?' character in the source file, and with the MISSING_VALUE in the Mat. If some symbols are detected then integer codes are assigned to them (by sorting them for each symbolic column in lexicographic order). The *to_symbols table has one element per column, each of which is a table of strings. The number of strings (i.e., symbols) for each column is given in the table *to_n_symbols.

Definition at line 1345 of file MatIO.cc.

References compare_string_pointers(), convert_STATLOG_BUF_LEN, cp(), PLearn::TMat< T >::data(), i, j, MISSING_VALUE, PLERROR, strlen(), w, and PLearn::TMat< T >::width().

{
    FILE *f = fopen(filename.c_str(),"r");
    int n_rows= -1, n_cols=0, i,j;
    char ***symbols;
    int *n_symbols;
#define convert_STATLOG_BUF_LEN 10000
    char buffer[convert_STATLOG_BUF_LEN];
    char *cp=buffer;
    char *word=buffer;
    char *cp2;
    real *p;
    size_t line_len;

    if (!f) 
        PLERROR("In loadSTATLOG, could not open file %s for reading",filename.c_str());

    if((to_symbols && !to_n_symbols) || (!to_symbols && to_n_symbols))
        PLERROR("In loadUCIMLDB, to_symbols and to_nsymbols must both be provided (non-null), or both be 0");

    /*  first figure out number of columns and number of rows  */

    while (!feof(f))
    {
        fgets(buffer,convert_STATLOG_BUF_LEN,f);
        if (n_rows == -1)
        {
            /*  read number of columns  */
            while (*cp == ' ')  
                cp++;   /*  jumping over blancs at the start of a new line  */
            while ( *cp!=0 && *cp!='\n' )
            {
                while ( *cp != 0 && *cp != '\n' && *cp != ' ')
                {
                    cp++; /*  read one colomn  */
                }
                n_cols++;
                while ( *cp != 0 && *cp != '\n' && *cp == ' ')
                {
                    cp++;   /*  jumping over blancs separating columns  */  
                }              
            }
        }
        n_rows++;
    }
    fclose(f);


    /*  figure out the set of symbols used for each symbolic row, if any  */
    symbols = (char ***)calloc(n_cols,sizeof(char **));
    n_symbols = (int *)calloc(n_cols,sizeof(int));
    if (to_symbols)
    {
        *to_symbols = symbols;
        *to_n_symbols = n_symbols;
    }
    f = fopen(filename.c_str(),"r");
    for (i=0;i<n_rows;i++)
    {
        fgets(buffer,convert_STATLOG_BUF_LEN,f);
        line_len=strlen(buffer);
        cp=word=buffer;
        for (j=0;j<n_cols;j++)
        {
            /*  jumping over blancs at the start of a new line  */ 
            while (*cp == ' ')
            {
                cp++;   
                word++;
            } 
            /*  find next end of word  */
            while ((*cp!=' ' && *cp!='\n') && cp<=buffer+line_len) cp++;
            *cp=0;
            /*  is this symbolic?  */
            cp2=word;
            while (!isalpha((int)*cp2) && *cp2!='?' && cp2 < cp) cp2++;
            if (isalpha((int)*cp2) && *cp2!='?')
            { 
                /*  yes, non-misisng symbolic character was found:  */
                if (symbols[j]) { 
                    /*  we already had found symbols in this column  */
                    int w=0;
                    while (symbols[j][w] &&  /*  look for this symbol  */
                           strcmp(symbols[j][w],word)!=0 &&
                           w<n_symbols[j]) w++;
                    if (w==n_rows)
                        PLERROR("logic error in loadSTATLOG");
                    if (!symbols[j][w])
                    {
                        /*  new symbol  */
                        symbols[j][w] = (char *)calloc(strlen(word)+1,sizeof(char));
                        strcpy(symbols[j][w],word);
                        n_symbols[j]++;
                    }
                }
                else
                {
                    /*  it's the first time we find a symbol in this column  */
                    symbols[j] = (char **)calloc(n_rows,sizeof(char *));
                    symbols[j][0] = (char *)calloc(strlen(word)+1,sizeof(char));
                    strcpy(symbols[j][0], word);
                    n_symbols[j]=1;
                }
            }
            word = cp+1;
        }
    }
    fclose(f);

    /*  sort the symbols  */
    for (j=0;j<n_cols;j++)
        if (symbols[j]) /*  it has symbols  */
            qsort(symbols[j],n_symbols[j],sizeof(char *),compare_string_pointers);

    Mat mat(n_rows, n_cols);
    /*  NOW actually READ the data  */
    {
        p = mat.data();
        f = fopen(filename.c_str(),"r");
        for (i=0;i<n_rows;i++)
        {
            /*  read a row  */
            fgets(buffer,convert_STATLOG_BUF_LEN,f);
            line_len=strlen(buffer);
            cp=word=buffer;
            /*  interpret a row  */
            for (j=0;j<n_cols;j++)
            {
                /*  jumping over blancs at the start of a new line  */ 
                while (*cp == ' ')
                {
                    cp++;   
                    word++;
                } 
                /*  find end of word  */
                while ((*cp!=' ' && *cp!='\n') && cp<=buffer+line_len) cp++;
                *cp=0;
                /*  is this missing?  */
                if (*word == '?')
                    *p = MISSING_VALUE;
                else
                    /*  is this symbolic?  */
                    if (symbols[j]) {
                        /*  read symbolic data  */
                        int w=0;
                        while (symbols[j][w] && /*  look for this symbol  */
                               strcmp(symbols[j][w],word)!=0 &&
                               w<n_symbols[j]) w++;
                        if (w==n_rows || !symbols[j][w])
                            PLERROR("logic error in loadSTATLOG");
                        *p = w;
                    }
                    else
                    {
                        /*  read numeric data  */
#ifdef USEDOUBLE
                        sscanf(word,"%lf",p);
#else
                        sscanf(word,"%f",p);
#endif
                    }
                word=cp+1;
                p++;
            }
        }
        fclose(f);
    }

    if(!to_symbols)
    {
        for (i=0; i<mat.width(); i++) 
        {
            for (j=0; j<n_symbols[i]; j++)
                free(symbols[i][j]);
            free(symbols[i]);
        }
        free(symbols);
        free(n_symbols);
    }
#undef convert_STATLOG_BUF_LEN

    return mat;
}

Here is the call graph for this function:

VMat PLearn::loadToVMat ( string  file,
string  name,
int  window,
int  n_examples 
)

Definition at line 463 of file GraphicalBiText.cc.

References PLearn::ShellProgressBar::draw(), endl(), i, PLearn::VMat::length(), m, and PLearn::VMat::width().

Referenced by PLearn::GraphicalBiText::init().

{
    // open disk vmat
    VMat dvm = new DiskVMatrix(file);
    // extract a subset if wanted
    VMat sub_dvm = new SubVMatrix(dvm, 0, 0, (n_examples < 0 ? dvm->length() : n_examples) , dvm->width());
    // load into memory mat
    Mat m(sub_dvm.length(), sub_dvm.width());
    ShellProgressBar progress(0, m.length()-1, "Loading "+name, 50);
    progress.draw();
    for(int i=0; i<m.length(); i++){
        sub_dvm->getRow(i,m(i));
        progress.update(i);
    }
    progress.done();
    cout << m.length() << " lines found"<<endl;
    // transform int vmat
    VMat vm(m);
    VMat tvm = new TextSenseSequenceVMatrix(vm, 2*window);
    return tvm;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadUCI ( VMat &  trainset,
VMat &  testset,
VMat &  allset,
string  db_spec,
string  id,
bool normalize,
const string &  type 
)

Load the train, test and all datasets for a UCI database.

The 'normalize' parameter can be changed: if it is set to true in input, it may be changed to false when the method returns (this is because the data will already be normalized, and no additional normalization is needed).

Definition at line 876 of file databases.cc.

References PLearn::VMat::length(), loadUCIAMat(), loadUCISet(), macroLoadObject(), PLERROR, PLearn::TMat< T >::subMatColumns(), PLearn::TMat< T >::subMatRows(), PLearn::VMat::toMat(), vconcat(), and PLearn::VMat::width().

Referenced by loadClassificationDataset().

                                                                                                                          {
    string script_file = db_spec;
    if (id != "") {
        script_file += "_ID=" + id;
    }
    script_file += ".plearn";
    PPath db_dir;
    if (type=="MLDB") {
        db_dir = PPath("UCI_MLDB_REP:") / db_spec;
    } else if (type=="KDD") { // TODO: a PPath protocol for UCI_KDD?
        db_dir = PPath("DBDIR:UCI_KDD") / db_spec;
    } else {
        PLERROR("In loadUCI: Unknown dataset type: %s.",type.c_str());
    }
    Object* obj = PLearn::macroLoadObject(db_dir / script_file);
    PP<UCISpecification> uci_spec = static_cast<UCISpecification*>(obj);
    if (uci_spec->file_train != "") {
        if (uci_spec->format=="UCI") {
            loadUCISet(trainset, db_dir / uci_spec->file_train, uci_spec);
        } else if (uci_spec->format=="AMAT") {
            loadUCIAMat(trainset, db_dir / uci_spec->file_train, uci_spec);
        } else {
            PLERROR("In loadUCI: Format '%s' unsupported",uci_spec->format.c_str());
        }
    }
    if (uci_spec->file_test != "") {
        if (uci_spec->format=="UCI") {
            loadUCISet(testset, db_dir / uci_spec->file_test, uci_spec);
        } else if (uci_spec->format=="AMAT") {
            loadUCIAMat(testset, db_dir / uci_spec->file_test, uci_spec);
        } else {
            PLERROR("In loadUCI: Format '%s' unsupported",uci_spec->format.c_str());
        }
    }
    if (uci_spec->file_all != "") {
        if (uci_spec->format=="UCI") {
            loadUCISet(allset, db_dir / uci_spec->file_all, uci_spec);
        } else if (uci_spec->format=="AMAT") {
            loadUCIAMat(allset, db_dir / uci_spec->file_all, uci_spec);
        } else {
            PLERROR("In loadUCI: Format '%s' unsupported",uci_spec->format.c_str());
        }
    } else {
        allset = vconcat(trainset, testset);
    }
    if (normalize) {
        int is = uci_spec->inputsize;
        if (is == -1)
            is = allset->width() - 1;
        VMat tmp_vmat = new ShiftAndRescaleVMatrix(allset, is, 0, true, 0);
        Mat new_data = tmp_vmat->toMat().subMatColumns(0, is);
        allset->putMat(0, 0, new_data);
        if (trainset && testset) {
            if (allset->length() != trainset->length() + testset->length())
                PLERROR("In loadUCI - The whole dataset should have a length equal to train + test");
            trainset->putMat(0, 0, new_data.subMatRows(0, trainset->length()));
            testset->putMat(0, 0, new_data.subMatRows(trainset->length(), testset->length()));
        } else if (trainset || testset) {
            PLERROR("In loadUCI - There can't be only a train set or only a test set");
        }
        // We don't want to normalize again.
        normalize = false;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadUCIAMat ( VMat &  data,
string  file,
PP< UCISpecification >  uci_spec 
)

Load a AMAT format UCI dataset in the given VMatrix.

Definition at line 946 of file databases.cc.

References i, PLearn::VMat::length(), loadAsciiAsVMat(), PLERROR, PLearn::TVec< T >::resize(), PLearn::TVec< T >::subVec(), and PLearn::VMat::width().

Referenced by loadUCI().

{
    data = loadAsciiAsVMat(file); 
  
    if (uci_spec->target_is_first) {
        // We need to move the target to the last columns.
        int ts = uci_spec->targetsize;
        if (ts == -1) {
            PLERROR("In loadUCIAMat - We don't know how many columns to move");
        }
        if (uci_spec->weightsize > 0) {
            PLERROR("In loadUCIAMat - Damnit, I don't like weights");
        }
        Vec row;
        Vec target;

        target.resize(ts);
        for (int i = 0; i < data.length(); i++) {
            row = data(i);
            target << row.subVec(0,ts);
            row.subVec(0, data.width() - ts ) << row.subVec(ts, data.width() - ts);
            row.subVec(data.width() - ts , ts) << target;
            data->putRow(i,row);
        }

        // now, move the symbols
        TVec<map<string,real> > sym;
        int is = data.width()-ts;
        sym.resize(ts);
        for (int i=0;i<ts;i++) {
            sym[i] = data->getStringToRealMapping(i);
        }
        for(int i=0;i<is; i++) {
            data->setStringMapping(i, data->getStringToRealMapping(i+ts));
        }
        for(int i=is;i<is+ts;i++) {
            data->setStringMapping(i,sym[i-is]);
        }
    }

    data->defineSizes(uci_spec->inputsize, uci_spec->targetsize, uci_spec->weightsize);
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::loadUCIDatasetsHelp ( ) [inline]

Definition at line 143 of file databases.h.

{
    return 
        "In order to access the UCI datasets the dataset name must start with UCI_. The possible\n"
        "dataset names are:\n"
        "    UCI_annealing\n"
        "    UCI_heart-disease_ID=va\n"
        "    UCI_heart-disease_ID=cleveland\n"
        "    UCI_heart-disease_ID=hungarian\n"
        "    UCI_heart-disease_ID=switzerland\n"
        "    UCI_housing\n"
        "    UCI_image\n"
        "    UCI_ionosphere\n"
        "    UCI_iris\n"
        "    UCI_iris_ID=bezdekIris\n"
        "    UCI_isolet_ID=1+2+3+4\n"
        "    UCI_isolet_ID=5\n"
        "    UCI_monks-problems_ID=monks-1\n"
        "    UCI_monks-problems_ID=monks-2\n"
        "    UCI_monks-problems_ID=monks-3\n"
        "    UCI_mushroom\n"
        "    UCI_musk_ID=clean1\n"
        "    UCI_musk_ID=clean2\n"
        "    UCI_page-blocks\n"
        "    UCI_pima-indians-diabetes\n"
        "    UCI_solar-flare_ID=data1\n"
        "    UCI_solar-flare_ID=data2\n"
        "    UCI_statlog_ID=german\n"
        "    UCI_statlog_ID=australian\n"
        "    UCI_statlog_ID=heart\n"
        "    UCI_statlog_ID=satimage\n"
        "    UCI_statlog_ID=segment\n"
        "    UCI_statlog_ID=vehicle\n"
        "    UCI_statlog_ID=shuttle\n"
        "    UCI_thyroid-disease_ID=allbp\n"
        "    UCI_thyroid-disease_ID=allhyper\n"
        "    UCI_thyroid-disease_ID=allhypo\n"
        "    UCI_thyroid-disease_ID=allrep\n"
        "    UCI_thyroid-disease_ID=ann\n"
        "    UCI_thyroid-disease_ID=dis\n"
        "    UCI_thyroid-disease_ID=sick\n"
        "    UCI_thyroid-disease_ID=hypothyroid\n"
        "    UCI_thyroid-disease_ID=new-thyroid\n"
        "    UCI_thyroid-disease_ID=sick-euthyroid\n"
        "    UCI_thyroid-disease_ID=thyroid0387\n"
        "    UCI_abalone\n"
        "    UCI_adult\n"
        "    UCI_covtype\n"
        "    UCI_internet_ads\n"
        "    UCI_nursery\n"
        "    UCI_pendigits\n"
        "    UCI_spambase\n"
        "    UCI_yeast\n" 
        "In order to access the UCI KDD datasets the dataset name must start with UCI_KDD_. The possible\n"
        "dataset names are:\n"
        "    UCI_KDD_corel_ID=ColorMoments\n"
        "    UCI_KDD_corel_ID=ColorHistogram\n"
        "    UCI_KDD_corel_ID=CoocTexture\n"
        "    UCI_KDD_corel_ID=LayoutHistogram\n"
        "    UCI_KDD_insurance-bench\n";
}
Mat PLearn::loadUCIMLDB ( const string &  filename,
char ****  to_symbols = 0,
int **  to_n_symbols = 0,
TVec< int > *  max_in_col = 0,
TVec< string > *  header_columns = 0 
)

UCI machine-learning-database format Format used for most of the UCI machine-learning-database. The missing value is represented with the '?' character in the source file, and with the MISSING_VALUE in the Mat. If some symbols are detected then integer codes are assigned to them (by sorting them for each symbolic column in lexicographic order). The *to_symbols table has one element per column, each of which is a table of strings. The number of strings (i.e., symbols) for each column is given in the table *to_n_symbols. Additionally, if provided, the 'max_in_col' vector will contain the (rounded to lowest integer) value of the maxium in each column (this will be -1 if there is no numerical value in the column). Also, if 'header_columns' vector is provided, the first line is considered to be the header and the vector will contain the column names.

Definition at line 1098 of file MatIO.cc.

References PLearn::TVec< T >::append(), compare_string_pointers(), convert_UCIMLDB_BUF_LEN, cp(), PLearn::TMat< T >::data(), PLearn::TVec< T >::fill(), i, j, MISSING_VALUE, pl_isnumber(), PLERROR, PLearn::TVec< T >::resize(), strlen(), w, and PLearn::TMat< T >::width().

Referenced by loadIonosphere(), loadPimaIndians(), loadSonar(), and loadUCISet().

{
    FILE *f = fopen(filename.c_str(),"r");
    int n_rows= -1, n_cols=1, i,j;
    char ***symbols;
    int *n_symbols;
#define convert_UCIMLDB_BUF_LEN 10000
    char buffer[convert_UCIMLDB_BUF_LEN];
    char *cp=buffer;
    char *word=buffer;
    char *cp2;
    real *p;
    size_t line_len;

    if (!f)
        PLERROR("In loadUCIMLDB, could not open file %s for reading",filename.c_str());

    if((to_symbols && !to_n_symbols) || (!to_symbols && to_n_symbols))
        PLERROR("In loadUCIMLDB, to_symbols and to_nsymbols must both be provided (non-null), or both be 0");

    /*  first figure out number of columns and number of rows  */
    bool skip_header = false;
    if (header_columns) {
        skip_header = true;
    }
    while (!feof(f))
    {
        do {
            fgets(buffer,convert_UCIMLDB_BUF_LEN,f);
        } while (!feof(f) && (strcmp(buffer,"\n")==0 || strncmp(buffer,";;;",3)==0));
        if (skip_header) {
            skip_header = false;
        } else {
            if (n_rows == -1) {
                /*  read number of columns  */
                while ((cp=strchr(cp,',')))
                {
                    cp++;
                    n_cols++;
                }
            }
            n_rows++;
        }
    }

    fclose(f);

    /*  figure out the set of symbols used for each symbolic row, if any  */
    symbols = (char ***)calloc(n_cols,sizeof(char **));
    n_symbols = (int *)calloc(n_cols,sizeof(int));

    TVec<int>* max_in_col;
    if (the_max_in_col) {
        max_in_col = the_max_in_col;
    } else {
        max_in_col = new TVec<int>();
    }
    max_in_col->resize(n_cols);
    max_in_col->fill(-1);
    if(to_symbols)
    {
        *to_symbols = symbols;
        *to_n_symbols = n_symbols;
    }
    f = fopen(filename.c_str(),"r");

  
    /* read header columns */
    if (header_columns) {
        do {
            fgets(buffer,convert_UCIMLDB_BUF_LEN,f);
        } while (!feof(f) && (strcmp(buffer,"\n")==0 || strncmp(buffer,";;;",3)==0));

        cp=word=buffer;

        while ((cp=strchr(cp,','))) {
            *cp=0;
            header_columns->append(word);
            cp++;
            word=cp;
        }
        header_columns->append(word);
    }

    for (i=0;i<n_rows;i++)
    {
        do {
            fgets(buffer,convert_UCIMLDB_BUF_LEN,f);
        } while (!feof(f) && (strcmp(buffer,"\n")==0 || strncmp(buffer,";;;",3)==0));

  
        // ignore everything after '|'
        char *comm = strchr(buffer,'|');
        if (comm) *comm = '\n';
    
        line_len=strlen(buffer);
        cp=word=buffer;
        for (j=0;j<n_cols;j++)
        {
            /*  find next end of word  */
            while ((*cp!=',' && *cp!='\n') && cp<=buffer+line_len) cp++;
            *cp=0;
            /*  is this symbolic?  */
            cp2=word;
            string the_val = word;
      
            if (!pl_isnumber(word) && *cp2!='?') { 
                /*  yes, non-missing symbolic character was found:  */
                if (symbols[j])
                { 
                    /*  we already had found symbols in this column  */
                    int w=0;
                    while (symbols[j][w] &&  /*  look for this symbol  */
                           strcmp(symbols[j][w],word)!=0 &&
                           w<n_symbols[j]) w++;
                    if (w==n_rows)
                        PLERROR("logic error in loadUCIMLDB");
                    if (!symbols[j][w])
                    {
                        /*  new symbol  */
                        symbols[j][w] = (char *)calloc(strlen(word)+1,sizeof(char));
                        strcpy(symbols[j][w],word);
                        n_symbols[j]++;
                    }
                }
                else
                {
                    /*  it's the first time we find a symbol in this column  */
                    symbols[j] = (char **)calloc(n_rows,sizeof(char *));
                    symbols[j][0] = (char *)calloc(strlen(word)+1,sizeof(char));
                    strcpy(symbols[j][0], word);
                    n_symbols[j]=1;
                }
            } else {
                // This is a numerical character: we use it to keep track of the
                // maximum in this column.
                real real_val;
                if (the_val != "?" && pl_isnumber(the_val, &real_val)) {
                    if (int(real_val) > (*max_in_col)[j]) {
                        (*max_in_col)[j] = int(real_val);
                    }
                }
            }
            word = cp+1;
        }
    }
    fclose(f);

    /*  sort the symbols  */
    for (j=0;j<n_cols;j++)
        if (symbols[j]) /*  it has symbols  */
            qsort(symbols[j],n_symbols[j],sizeof(char *),compare_string_pointers);

    Mat mat(n_rows,n_cols);
    /*  NOW actually READ the data  */
    {
        p = mat.data();
        f = fopen(filename.c_str(),"r");

        // skip one line if header present
        if (header_columns) {
            do {
                fgets(buffer,convert_UCIMLDB_BUF_LEN,f);
            } while (!feof(f) && (strcmp(buffer,"\n")==0 || strncmp(buffer,";;;",3)==0));
        }


        for (i=0;i<n_rows;i++)
        {
            /*  read a row  */
            do {
                fgets(buffer,convert_UCIMLDB_BUF_LEN,f);
            } while (!feof(f) && (strcmp(buffer,"\n")==0 || strncmp(buffer,";;;",3)==0));

      
            // ignore everything after '|'
            char *comm = strchr(buffer,'|');
            if (comm) *comm = '\n';

            line_len=strlen(buffer);
            cp=word=buffer;
            /*  interpret a row  */
            for (j=0;j<n_cols;j++)
            {
                /*  find end of word  */
                while ((*cp!=',' && *cp!='\n') && cp<=buffer+line_len) cp++;
                *cp=0; // Make 'word' point to the current field value only.
                // Skip blanks at beginning.
                while (*word == ' ') {
                    word++;
                    if (word >= cp)
                        PLERROR("In loadUCIMLDB - Error while skipping blanks");
                }
                /*  is this missing?  */
                if (*word == '?')
                    *p = MISSING_VALUE;
                else {
                    /*  is this symbolic?  */
                    bool is_symbolic = false;
                    if (symbols[j]) {
                        /*  Try to read symbolic data  */
                        int w=0;
                        while (symbols[j][w] && /*  look for this symbol  */
                               strcmp(symbols[j][w],word)!=0 &&
                               w<n_symbols[j]) w++;
                        if (w != n_rows && symbols[j][w]) {
                            // The symbol does exist.
                            is_symbolic = true;
                            *p = w + (*max_in_col)[j] + 1;
                        }
                    }
                    if (!is_symbolic) {
                        /*  read numeric data  */
#ifdef USEDOUBLE
                        sscanf(word,"%lf",p);
#else
                        sscanf(word,"%f",p);
#endif
                    }
                }
                word=cp+1;
                p++;
            }
        }
        fclose(f);
    }

    if(!to_symbols)
    {
        for (i=0; i<mat.width(); i++) 
        {
            for (j=0; j<n_symbols[i]; j++)
                free(symbols[i][j]);
            free(symbols[i]);
        }
        free(symbols);
        free(n_symbols);
    }
    if (!the_max_in_col)
        delete max_in_col;
#undef convert_UCIMLDB_BUF_LEN

    return mat;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::loadUCISet ( VMat &  data,
PP< UCISpecification >  uci_spec 
)

Load a specific UCI dataset in the given VMatrix.

Definition at line 992 of file databases.cc.

References PLASSERT.

Referenced by PLearn::UCIDataVMatrix::build_(), and loadUCI().

                                                           {
    PLASSERT( uci_spec );
    if (!uci_spec->data_all.isEmpty())
        loadUCISet(data, uci_spec->data_all.absolute(), uci_spec);
    else {
        VMat data_train, data_test;
        loadUCISet(data_train, uci_spec->data_train.absolute(), uci_spec);
        loadUCISet(data_test,  uci_spec->data_test.absolute(),  uci_spec);
        data = new ConcatRowsVMatrix(data_train, data_test, true);
    }
}

Here is the caller graph for this function:

void PLearn::loadUCISet ( VMat &  data,
string  file,
PP< UCISpecification >  uci_spec 
)

Load a specific UCI dataset in the given VMatrix.

Definition at line 1004 of file databases.cc.

References PLearn::VMat::fieldName(), i, j, PLearn::TMat< T >::length(), loadUCIMLDB(), pl_isnumber(), PLERROR, PLearn::TVec< T >::resize(), PLearn::TVec< T >::size(), PLearn::TVec< T >::subVec(), toint(), tostring(), PLearn::VMat::width(), and PLearn::TMat< T >::width().

                                                                        {
    char *** to_symbols;
    int * to_n_symbols;
    TVec<int> max_in_col;
    TVec<string> header_columns;
    Mat the_data;
    if (uci_spec->header_exists) {
        the_data = loadUCIMLDB(file, &to_symbols, &to_n_symbols, &max_in_col,&header_columns);
    } else {
        the_data = loadUCIMLDB(file, &to_symbols, &to_n_symbols, &max_in_col);
    }
    if (uci_spec->target_is_first) {
        // We need to move the target to the last columns.
        int ts = uci_spec->targetsize;
        if (ts == -1) {
            PLERROR("In loadUCISet - We don't know how many columns to move");
        }
        if (uci_spec->weightsize > 0) {
            PLERROR("In loadUCISet - Damnit, I don't like weights");
        }
        Vec row;
        Vec target;

        target.resize(ts);
        for (int i = 0; i < the_data.length(); i++) {
            row = the_data(i);
            target << row.subVec(0,ts);
            row.subVec(0, the_data.width() - ts ) << row.subVec(ts, the_data.width() - ts);
            row.subVec(the_data.width() - ts , ts) << target;
        }
    }
    data = VMat(the_data);
    data->defineSizes(uci_spec->inputsize, uci_spec->targetsize, uci_spec->weightsize);
 
    if (uci_spec->header_exists) {
        if (uci_spec->header_fields.size()==0) {
      
            if (uci_spec->target_is_first) {
                int ts = uci_spec->targetsize;
                int is = the_data.width()-ts;
                TVec<string> tmp;
                tmp.resize(ts);
                tmp << header_columns.subVec(0,ts);
                header_columns.subVec(0,is) << header_columns.subVec(ts,is);
                header_columns.subVec(is,ts) << tmp;
            }
            data->declareFieldNames(header_columns);
        } else {
            TVec<string> field_names;
            field_names.resize(the_data.width());
            int last = 0;
            int cnt=0;
            for (int i=0; i<uci_spec->header_fields.size(); i++) {
                for (int j=last;j<uci_spec->header_fields[i].first;j++) {
                    field_names[j] = "";
                }
                for (int j=uci_spec->header_fields[i].first;j<=uci_spec->header_fields[i].second;j++) {
                    if (cnt>=header_columns.size()) {
                        PLERROR("In loadUCISet: 'header_fields' setting is incorrect");
                    }
                    field_names[j] = header_columns[cnt++];
                }
                last = uci_spec->header_fields[i].second+1;
            }  
            for (int i=last;i<field_names.size();i++) {
                field_names[i] = "";
            }
            if (uci_spec->target_is_first) {
                int ts = uci_spec->targetsize;
                int is = the_data.width()-ts;
                TVec<string> tmp;
                tmp.resize(ts);
                tmp << field_names.subVec(0,ts);
                field_names.subVec(0,is) << field_names.subVec(ts,is);
                field_names.subVec(is,ts) << tmp;
            }
            data->declareFieldNames(field_names);
        }
    }
  
    // Add symbol mappings
  
    if (uci_spec->target_is_first) {
        int ts = uci_spec->targetsize;
        int is = the_data.width()-ts;
        TVec<char**> tmp_sym(ts);
        TVec<int> tmp_len(ts); 
        for(int i=0;i<ts;i++) {
            tmp_sym[i] = to_symbols[i];
            tmp_len[i] = to_n_symbols[i];
        }
        for (int i=ts;i<is+ts;i++) {
            to_symbols[i-ts] = to_symbols[i];
            to_n_symbols[i-ts] = to_n_symbols[i];
        }
        for(int i=is;i<is+ts;i++) {
            to_symbols[i] = tmp_sym[i-is];
            to_n_symbols[i] = tmp_len[i-is];
        }
    
        tmp_len << max_in_col.subVec(0,ts);
        max_in_col.subVec(0,is) << max_in_col.subVec(ts,is);
        max_in_col.subVec(is,ts) << tmp_len;
    }
    for (int j=0;j<data->width();j++) {
        for (int k=0;k<to_n_symbols[j];k++) {
            data->addStringMapping(j,string(to_symbols[j][k]),real(max_in_col[j]+k+1));
        }
    }

    // Free up the symbols
    for (int i=0; i<data->width(); i++) 
    {
        for (int j=0; j<to_n_symbols[i]; j++)
            free(to_symbols[i][j]);
        free(to_symbols[i]);
    }
    free(to_symbols);
    free(to_n_symbols);

    // Add default 'target' name to the target(s) column(s) if there is no fieldname yet.
    int is = data->inputsize();
    int ts = data->targetsize();
    if (ts == 1) {
        string f_target = data->fieldName(is);
        if (pl_isnumber(f_target) && toint(f_target) == is)
            data->declareField(is, "target");
    } else {
        string f_target_i;
        for (int i = 0; i < ts; i++) {
            f_target_i = data->fieldName(is + i);
            if (pl_isnumber(f_target_i) && toint(f_target_i) == is + i)
                data->declareField(is + i, "target_" + tostring(i));
        }
    }
}

Here is the call graph for this function:

void PLearn::loadUSPS ( VMat &  trainset,
VMat &  testset,
bool  use_smooth 
)

Definition at line 675 of file databases.cc.

References argmax(), hconcat(), i, PLearn::TMat< T >::length(), and loadSNMat().

Referenced by loadClassificationDataset().

{
    Mat traininputs;
    Mat testinputs;
    Mat traindesired;
    Mat testdesired;

    if(use_smooth)
    {
        traininputs = loadSNMat("DBDIR:usps/train-patterns-smoo.mat");
        testinputs = loadSNMat("DBDIR:usps/test-patterns-smoo.mat");
    }
    else
    {
        traininputs = loadSNMat("DBDIR:usps/ocr16-train.mat");
        testinputs = loadSNMat("DBDIR:usps/ocr16-test.mat");
    }
    //traininputs += 1.0;
    //traininputs /= 2.0;
    //testinputs += 1.0;
    //testinputs /= 2.0;

    traindesired = loadSNMat("DBDIR:usps/train-desired.mat");
    Mat trainclasses(traininputs.length(),1);
    for(int i=0; i<traindesired.length(); i++)
        trainclasses(i,0) = argmax(traindesired(i));

    testdesired = loadSNMat("DBDIR:usps/test-desired.mat");
    Mat testclasses(testinputs.length(),1);
    for(int i=0; i<testdesired.length(); i++)
        testclasses(i,0) = argmax(testdesired(i));

    trainset = hconcat(traininputs,trainclasses);
    testset = hconcat(testinputs,testclasses);
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::loadUSPS ( bool  use_smooth)

Definition at line 711 of file databases.cc.

References argmax(), hconcat(), i, PLearn::TMat< T >::length(), and loadSNMat().

{
    Mat traininputs;
    Mat traindesired;

    if(use_smooth)
        traininputs = loadSNMat("DBDIR:usps/patterns-smoo.mat");
    else
        traininputs = loadSNMat("DBDIR:usps/ocr16.pat");
        
    traininputs += real(1.0);
    traininputs /= real(2.0);

    traindesired = loadSNMat("DBDIR:usps/desired.mat");
    Mat trainclasses(traininputs.length(),1);
    for(int i=0; i<traindesired.length(); i++)
        trainclasses(i,0) = argmax(traindesired(i));

    Mat trainset = hconcat(traininputs,trainclasses);

    return trainset;
}

Here is the call graph for this function:

void PLearn::loadVec ( const string &  file_name,
TVec< float > &  vec 
)

Definition at line 159 of file MatIO.cc.

References loadAscii(), loadPVec(), and PLERROR.

{
    const char* filename = file_name.c_str();
    const char* suffix = strrchr(filename,'.');
    if (!suffix || strcmp(suffix,".avec")==0)
        loadAscii(file_name, vec);
    else if (strcmp(suffix,".pvec")==0 || strcmp(suffix,".lpvec")==0 || strcmp(suffix,".bpvec")==0)
        loadPVec(file_name,vec);
    else
        PLERROR("In loadVec: unknown file extension");
}

Here is the call graph for this function:

void PLearn::loadVec ( const string &  file_name,
TVec< double > &  vec 
)

Definition at line 171 of file MatIO.cc.

References loadAscii(), loadPVec(), and PLERROR.

{
    const char* filename = file_name.c_str();
    const char* suffix = strrchr(filename,'.');
    if (!suffix || strcmp(suffix,".avec")==0)
        loadAscii(file_name, vec);
    else if (strcmp(suffix,".pvec")==0 || strcmp(suffix,".lpvec")==0 || strcmp(suffix,".bpvec")==0)
        loadPVec(file_name,vec);
    else
        PLERROR("In loadVec: unknown file extension");
}

Here is the call graph for this function:

VMat PLearn::local_neighbors_differences ( VMat  source,
int  n_neighbors,
bool  concat = false,
bool  append_indexes = false,
bool  append_neighbors = false 
) [inline]

Definition at line 122 of file LocalNeighborsDifferencesVMatrix.h.

References PLearn::LocalNeighborsDifferencesVMatrix::append_indexes, append_neighbors(), PLearn::LocalNeighborsDifferencesVMatrix::append_neighbors, PLearn::LocalNeighborsDifferencesVMatrix::build(), concat(), PLearn::LocalNeighborsDifferencesVMatrix::concat_neighbors, PLearn::LocalNeighborsDifferencesVMatrix::n_neighbors, and PLearn::SourceVMatrix::source.

Referenced by PLearn::NearestNeighborPredictionCost::run(), PLearn::TangentLearner::train(), PLearn::GaussianContinuumDistribution::train(), and PLearn::GaussianContinuum::train().

{
    LocalNeighborsDifferencesVMatrix* vmat = new LocalNeighborsDifferencesVMatrix();
    vmat->concat_neighbors = concat;
    vmat->source=source;
    vmat->n_neighbors=n_neighbors;
    vmat->append_indexes = append_indexes;
    vmat->append_neighbors = append_neighbors;
    vmat->build();
    return vmat;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::log ( const TVec< T > &  src) [inline]

Definition at line 1322 of file TMat_maths_impl.h.

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

{ TVec<T> dest(src.length()); compute_log(src,dest); return dest; }

Here is the call graph for this function:

RandomVar PLearn::log ( RandomVar  x)

natural logarithm function applied element-by-element

Definition at line 451 of file RandomVar.cc.

{ return new LogRandomVariable(x); }
Var PLearn::log ( Var  v) [inline]

Definition at line 72 of file LogVariable.h.

{ return new LogVariable(v); }
real PLearn::log ( real  base,
real  a 
)

Definition at line 116 of file pl_math.cc.

References pl_log.

Referenced by PLearn::ScoreLayerVariable::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::GaussianContinuum::computeCostsFromOutputs(), PLearn::GaussianContinuum::computeOutput(), PLearn::MixtureRandomVariable::ElogP(), PLearn::ExpRandomVariable::EMBprop(), PLearn::SigmoidPrimitiveKernel::evaluate(), PLearn::LogOfGaussianDensityKernel::evaluate(), PLearn::ConvexBasisKernel::evaluate(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::GraphicalBiText::init(), PLearn::ProductRandomVariable::invertible(), PLearn::ExpRandomVariable::invertible(), PLearn::GaussianContinuumDistribution::log_density(), log_force_nan_if_negative(), PLearn::MultinomialRandomVariable::logP(), PLearn::MixtureRandomVariable::logP(), PLearn::DiagonalNormalRandomVariable::logP(), neg_log_pi(), normal(), PLearn::TMatTest::perform(), PLearn::PLMathTest::perform(), PLearn::LogRandomVariable::setValueFromParentsValue(), PLearn::PowVariableVariable::symbolicBprop(), PLearn::PLogPVariable::symbolicBprop(), and PLearn::GraphicalBiText::test_WSD().

{
    return pl_log(a) / pl_log(base);
}

Here is the caller graph for this function:

real PLearn::log_beta ( real  x,
real  y 
)

returns the natural logarithm of the beta function

Definition at line 84 of file random.cc.

References log_gamma().

Referenced by incomplete_beta(), and log_beta_density().

{
    return log_gamma(x) + log_gamma(y) - log_gamma(x+y);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::log_beta_density ( real  x,
real  alpha,
real  beta 
)

Log of the beta_density.

Definition at line 265 of file distr_maths.cc.

References log_beta(), and safelog().

Referenced by beta_density(), and PLearn::BetaKernel::evaluate().

{
    return (alpha-1)*safelog(x) + (beta-1)*safelog(1-x)  - log_beta(alpha,beta);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::log_force_nan_if_negative ( real  a) [inline]

Under Cygwin with GCC, log(x) with x < 0 returns -Inf instead of NaN.

Thus one should use the 'pl_log' function instead of 'log', so that this behavior can safely be fixed.

Definition at line 113 of file pl_math.h.

References log(), and MISSING_VALUE.

    { return a < 0 ? MISSING_VALUE : std::log(a); }

Here is the call graph for this function:

real PLearn::log_fullGaussianRBF ( Vec  x,
Vec  mu,
Mat  evectors,
Vec  evalues,
real  remainder_evalue 
)

Definition at line 343 of file distr_maths.cc.

References d, dot(), i, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, pownorm(), PLearn::TVec< T >::resize(), square(), and substract().

Referenced by fullGaussianRBF().

{
    static Vec centered_x;
    int d=x.length();
    centered_x.resize(d);
    int k=evectors.length();
    real lp = 0;
    real irev = 0;
    substract(x,mu,centered_x);
    if (remainder_evalue>0)
    {
        irev = 1 / remainder_evalue;
        lp -= 0.5 * pownorm(centered_x) * irev;
        if (k>=d)
            PLERROR("log_of_normal_density: when remainder_evalue>0, there should be less e-vectors (%d) than dimensions (%d)",
                    k,d);
    }
    for (int i=0;i<k;i++)
    {
        real ev = evalues[i];
        if (ev>=remainder_evalue)
        {
            real iv = 1/ev - irev;
            lp -= 0.5 * iv * square(dot(evectors(i),centered_x));
        }
    }
    return lp;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::log_gamma ( real  x)

returns the natural logarithm of the gamma function

Definition at line 65 of file random.cc.

References j, pl_log, and x.

Referenced by bnldev(), log_beta(), and poidev().

{
    double x,y,tmp,ser;
    static double gamma_coeffs[6]={ 76.18009172947146     ,
                                    -86.50532032941677     ,
                                    24.01409824083091     ,
                                    -1.231739572450155    ,
                                    0.1208650973866179e-2,
                                    -0.5395239384953e-5   };
    int j;

    y=x=xx;
    tmp=x+5.5;
    tmp -= (x+0.5)*pl_log(tmp);
    ser=1.000000000190015;
    for (j=0;j<=5;j++) ser += gamma_coeffs[j]/++y;
    return -tmp+pl_log(2.5066282746310005*ser/x);
}

Here is the caller graph for this function:

real PLearn::log_of_normal_density ( Vec  x,
Vec  mu,
real  sigma2 
)

Definition at line 271 of file distr_maths.cc.

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

Referenced by normal_density().

{
    real lp=0;
    for (int i=0;i<x.length();i++)
        lp += gauss_log_density_var(x[i],mu[i],sigma2);
    return lp;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::log_of_normal_density ( Vec  x,
Vec  mu,
Vec  sigma2 
)

Definition at line 293 of file distr_maths.cc.

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

{
    real lp=0;
    for (int i=0;i<x.length();i++)
        lp += gauss_log_density_var(x[i],mu[i],sigma2[i]);
    return lp;
}

Here is the call graph for this function:

real PLearn::log_of_normal_density ( Vec  x,
Vec  mu,
Mat  evectors,
Vec  evalues,
real  remainder_evalue 
)

Definition at line 305 of file distr_maths.cc.

References logOfCompactGaussian().

{
    return logOfCompactGaussian(x,mu,evalues,evectors,remainder_evalue,false);
/*
    static Vec centered_x;
    int d=x.length();
    centered_x.resize(d);
    int k=evectors.length();
    real lp = -0.5 * d * Log2Pi;
    real irev = 0;
    substract(x,mu,centered_x);
    if (remainder_evalue>0)
    {
        irev = 1 / remainder_evalue;
        lp -= 0.5 * ( (d-k)*pl_log(remainder_evalue)  +  pownorm(centered_x) * irev );
        if (k>=d)
            PLERROR("log_of_normal_density: when remainder_evalue>0, there should be less e-vectors (%d) than dimensions (%d)",
                    k,d);
    }
    for (int i=0;i<k;i++)
    {
        real ev = evalues[i];
        if (ev<remainder_evalue)
            lp -= 0.5 * pl_log(ev);
        else
        {
            real iv = 1/ev - irev;
            lp -= 0.5 * ( pl_log(ev) + iv * square(dot(evectors(i),centered_x)));
        }
    }
    return lp;
*/
}

Here is the call graph for this function:

real PLearn::log_rbf ( Vec  x,
Vec  mu,
real  sigma2 
)

Definition at line 279 of file distr_maths.cc.

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

Referenced by rbf().

{
    real lp=0;
    real inv_s=1.0/sigma2;
    for (int i=0;i<x.length();i++)
    {
        real diff = x[i]-mu[i];
        lp += -0.5*diff*diff*inv_s;
    }
    return lp;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::log_sigmoid ( const TVec< T > &  src,
const TVec< T > &  dest 
)

Definition at line 1444 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), log_sigmoid(), n, PLERROR, and PLearn::TVec< T >::size().

{
#ifdef BOUNDCHECK
    if(src.length()!=dest.length())
        PLERROR("In sigmoid, src and dest vectors must have the same length");
#endif
    if (src.size() > 0 && dest.size() > 0) {
        T* ps = src.data();
        T* pd = dest.data();
        int n = src.length();
        for(int i=0; i<n; i++)
            *pd++ = log_sigmoid(*ps++);
    }
}

Here is the call graph for this function:

real PLearn::log_sigmoid ( real  x) [inline]

to avoid 0 or 1 probability, work in the log-domain

Definition at line 520 of file pl_math.h.

References softplus().

Referenced by PLearn::NatGradSMPNNet::fpropNet(), PLearn::NatGradNNet::fpropNet(), PLearn::mNNet::fpropNet(), and log_sigmoid().

{
    return -softplus(-x);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::log_softmax ( Var  v) [inline]

Definition at line 82 of file LogSoftmaxVariable.h.

{
    // Returns a variable equivalent to -log(softmax(v))
    return new LogSoftmaxVariable(v);
}
template<class T >
void PLearn::log_softmax ( const TVec< T > &  x,
TVec< T > &  y 
)
template<class T >
T PLearn::logadd ( const TVec< T > &  vec)

Definition at line 1740 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), LOG_INIT, logadd(), and sum().

{
    int l = vec.length();
    if(l==0)
        return LOG_INIT;

    T *p_x = vec.data();
    T sum = *p_x++;
    for (int i=1; i<l; i++, p_x++)
        sum = logadd(sum, *p_x);
    return sum;
}

Here is the call graph for this function:

template<class T >
T PLearn::logadd ( const TMat< T > &  mat)

Definition at line 77 of file RBMLocalMultinomialLayer.cc.

References PLearn::TMat< T >::begin(), i, PLearn::TMat< T >::isEmpty(), LOG_INIT, logadd(), PLearn::TMat< T >::size(), and sum().

{
    if (mat.isEmpty())
        return LOG_INIT;

    TMatElementIterator<real> p_mat = mat.begin();
    T sum = *p_mat++;

    for (int i=1; i<mat.size(); i++, p_mat++)
        sum = logadd(sum, *p_mat);

    return sum;
}

Here is the call graph for this function:

Var PLearn::logadd ( Var &  input1,
Var &  input2 
) [inline]

Definition at line 110 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
Var PLearn::logadd ( Var  input) [inline]

Definition at line 73 of file LogSumVariable.h.

{ return new LogSumVariable(input); }
real PLearn::logadd ( double  log_a,
double  log_b 
)

compute log(exp(log_a)+exp(log_b)) without losing too much precision (doing the computation in double precision)

Definition at line 159 of file pl_math.cc.

References exp(), fast_exact_is_equal(), LOG_2, and MINUS_LOG_THRESHOLD.

Referenced by PLearn::NnlmOutputLayer::addCandidateContribution(), PLearn::NnlmOutputLayer::compute_approx_nl_p_t_r(), PLearn::NnlmOutputLayer::compute_nl_p_rt(), PLearn::NnlmOutputLayer::compute_nl_p_t_r(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::LocalGaussianClassifier::computeCostsFromOutputs(), PLearn::RBMWoodsLayer::computeExpectation(), PLearn::RBMWoodsLayer::computeExpectations(), PLearn::RBMModule::computeNegLogPVisibleGivenPHidden(), PLearn::RankingFromKernel::computeOutput(), PLearn::ManifoldParzen::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::ClassifierFromDensity::computeOutput(), PLearn::RBMModule::computePartitionFunction(), PLearn::GaussMix::computePosteriors(), determine_density_integral_from_log_densities_on_grid(), DX_create_grid_outputs_file(), PLearn::MixtureRandomVariable::ElogP(), PLearn::RBMWoodsLayer::fprop(), PLearn::NLLNeighborhoodWeightsVariable::fprop(), PLearn::LogSumVariable::fprop(), PLearn::LogAddVariable::fprop(), PLearn::KLp0p1RBMModule::fprop(), PLearn::LogaddOnBagsModule::fpropAcc(), PLearn::RBMWoodsLayer::freeEnergyContribution(), PLearn::RBMMultinomialLayer::freeEnergyContribution(), PLearn::RBMLocalMultinomialLayer::freeEnergyContribution(), PLearn::RBMWoodsLayer::freeEnergyContributionGradient(), PLearn::RBMTruncExpLayer::generateSamples(), PLearn::NonLocalManifoldParzen::log_density(), PLearn::MixtureDistribution::log_density(), PLearn::KernelDensityEstimator::log_density(), PLearn::GaussMix::log_density(), PLearn::GaussianContinuumDistribution::log_density(), log_softmax(), logadd(), PLearn::MixtureRandomVariable::logP(), PLearn::VariablesTest::perform(), PLearn::TMatTest::perform(), PLearn::PLMathTest::perform(), PLearn::GaussMix::setPredictor(), PLearn::TransformationLearner::SUM_weights(), and PLearn::PseudolikelihoodRBM::train().

{
    if (log_a < log_b)
    { // swap them
        double tmp = log_a;
        log_a = log_b;
        log_b = tmp;
    } else if (fast_exact_is_equal(log_a, log_b)) {
        // Special case when log_a == log_b. In particular this works when both
        // log_a and log_b are (+-) INFINITY: it will return (+-) INFINITY
        // instead of NaN.
        return LOG_2 + log_a;
    }
    double negative_absolute_difference = log_b - log_a;
    if (negative_absolute_difference < MINUS_LOG_THRESHOLD)
        return real(log_a);
    return (real)(log_a + log1p(exp(negative_absolute_difference)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::logOfCompactGaussian ( const Vec &  x,
const Vec &  mu,
const Vec &  eigenvalues,
const Mat &  eigenvectors,
real  gamma,
bool  add_gamma_to_eigenval 
)

Computes and returns log( Normal(x; mu,C) ) where mu is the normal's mean and C its covariance matrix.

returns log P(x|gaussian) with a gaussian represented compactly by the first few eigenvalues and eigenvectors of its covariance matrix.

For numerical stability, you may consider adding some lambda to the diagonal of C

Normal(x; mu,C) = 1/sqrt((2PI)^d * det(C)) exp( -0.5 (x-mu)'.inv(C).(x-mu) ) = exp [ -0.5( d*log(2PI) + log(det(D)) ) -0.5 (x-mu)'.inv(C).(x-mu) ] ____________/ ________/ \/ \/ logcoef q

Let z = inv(C).(x-mu) ==> z is the solution of C.z = x-mu And then we have q = (x-mu)'.z

So computing q is simply a matter of solving this linear equation in z, and then computing q.

gamma is the "variance" used for all other directions. Eigenvalues need not be in decreasing order, but as soon as we meet a 0 eigenvalue, this and all subsequent ones are considered to be equal to gamma. In addition if add_gamma_to_eigenval is true, the used eigenvalues will be eigenvalues+gamma.

Definition at line 168 of file distr_maths.cc.

References d, PLearn::TVec< T >::data(), dot(), i, PLearn::TVec< T >::length(), M_PI, pl_log, PLearn::TVec< T >::resize(), and square().

Referenced by PLearn::GaussianDistribution::log_density(), and log_of_normal_density().

{
    // cerr << "logOfCompact: mu = " << mu << endl;

    int i;
    int d = x.length();
    static Vec x_minus_mu;
    x_minus_mu.resize(d);
    real* px = x.data();
    real* pmu = mu.data();
    real* pxmu = x_minus_mu.data();
    
    real sqnorm_xmu = 0;
    for(i=0; i<d; i++)
    {
        real val = *px++ - *pmu++;
        sqnorm_xmu += val*val;
        *pxmu++ = val;
    }
    
    double log_det = 0.;
    double inv_gamma = 0;
    if(gamma>0)
        inv_gamma = 1./gamma;
    int kk = eigenvalues.length();
    double q = inv_gamma * sqnorm_xmu;
    for(i=0; i<kk; i++)
    {
        double lambda_i = eigenvalues[i];
        if(add_gamma_to_eigenval)
            lambda_i += gamma;
        if(lambda_i<=0) // we've reached a 0 eigenvalue, stop computation here.
            break;
        log_det += pl_log(lambda_i);
        q += (1./lambda_i - inv_gamma)*square(dot(eigenvectors(i),x_minus_mu));
    }
    if(kk<d)
        log_det += pl_log(gamma)*(d-i);

    static real log_2pi = pl_log(2*M_PI);
    double logp = -0.5*( d*log_2pi + log_det + q);
    // cerr << "logOfCompactGaussian q=" << q << " log_det=" << log_det << " logp=" << logp << endl;
    // exit(0);
    return real(logp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::logOfNormal ( const Vec &  x,
const Vec &  mu,
const Mat &  C 
)

Definition at line 216 of file distr_maths.cc.

References choleskyDecomposition(), choleskySolve(), dot(), i, PLearn::TVec< T >::length(), M_PI, n, pl_log, PLearn::TVec< T >::resize(), and substract().

Referenced by PLearn::LocalGaussianClassifier::computeOutput(), and logPFittedGaussian().

{
    int n = x.length();
    static Vec x_mu;
    static Vec z;
    static Vec y;
    y.resize(n);
    z.resize(n);
    x_mu.resize(n);
    substract(x,mu,x_mu);

    static Mat L;
    // Perform Cholesky decomposition
    choleskyDecomposition(C, L);

    // get the log of the determinant: 
    // det(C) = square(product_i L_ii)
    double logdet = 0;
    for(int i=0; i<n; i++)
        logdet += pl_log(L(i,i));
    logdet += logdet;

    // Finally find z, such that C.z = x-mu
    choleskySolve(L, x_mu, z, y);

    double q = dot(x_mu, z);
    double logp = -0.5*( n*pl_log(2*M_PI) + logdet + q);
    // cerr << "logOfNormal q=" << q << " logdet=" << logdet << " logp=" << logp << endl;
    return real(logp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::logP ( ConditionalExpression  conditional_expression,
bool  clearMarksUponReturn = true,
RVInstanceArray *  parameters_to_learn = 0 
)

Construct a Var that computes logP(RandomVariable == value | RHS ) in terms of the value Var and the Vars in the RHS, where RHS is a list of the form (X1==x1 && X2==x2 && X3==x3) where Xi are RandomVar's and xi are Var's which represent the value that are given to the conditioning variables Xi. Normally the marks used to identify RVs which are deterministically determined from the RHS are cleared upon return (unless specified with the optional 2nd argument).

Definition at line 616 of file RandomVar.cc.

References PLearn::ConditionalExpression::LHS, PLearn::ConditionalExpression::RHS, PLearn::TVec< T >::size(), PLearn::RVInstance::v, and PLearn::RVInstance::V.

Referenced by ElogP(), EM(), and PLearn::DiagonalNormalRandomVariable::logP().

{
    RandomVar& LHS = conditional_expression.LHS.V;
    RVInstanceArray& RHS = conditional_expression.RHS;
    // traverse the tree of ancestors of this node
    // and mark nodes which are deterministic descendents of RHS
    // and of non-random variables
    // while setting their "value" field to this Var function of them.
    LHS->markRHSandSetKnownValues(RHS);

    Var logp = LHS->logP(conditional_expression.LHS.v,RHS,parameters_to_learn);

    if (clearMarksUponReturn)
    {
        // put the network back in its original state
        LHS->unmarkAncestors();
        for (int i=0;i<RHS.size();i++) RHS[i].V->unmark();
    }

    // make sure that all the paths which do not
    // depend on x, y, and the tunable_parameters are correctly computed
    logp->fprop_from_all_sources();
    return logp;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::logPFittedGaussian ( const Vec &  x,
const Mat &  X,
real  lambda 
)

Fits a gaussian to the points in X (computing its mean and covariance matrix, and adding lambda to the diagonal of that covariance matrix) Then calls logOfNormal to return log(p(x | the_gaussian))

Definition at line 247 of file distr_maths.cc.

References addToDiagonal(), computeMeanAndCovar(), and logOfNormal().

{
    static Mat C;
    static Vec mu;
    computeMeanAndCovar(X, mu, C);
    addToDiagonal(C, lambda);
    return logOfNormal(x, mu, C);
}

Here is the call graph for this function:

real PLearn::logsub ( real  log_a,
real  log_b 
)

compute log(exp(log_a)-exp(log_b)) without losing too much precision

Definition at line 189 of file pl_math.cc.

References exp(), fast_is_equal(), MINUS_LOG_THRESHOLD, and PLERROR.

Referenced by PLearn::NnlmOutputLayer::computeApproxDiscriminantGradient(), PLearn::NnlmOutputLayer::computeDiscriminantGradient(), and PLearn::PLMathTest::perform().

{
    if (log_a < log_b)
        PLERROR("log_sub: log_a (%f) should be greater than log_b (%f)", log_a, log_b);
 
    real negative_absolute_difference = log_b - log_a;
 
    // We specify an absolute 1e-5 threshold to have the same behavior as with
    // the old FEQUAL macro.
    if (fast_is_equal(log_a, log_b, REAL_MAX, 1e-5))
        return -REAL_MAX;
    else if (negative_absolute_difference < MINUS_LOG_THRESHOLD)
        return log_a;
    else
        return log_a + log1p(-exp(negative_absolute_difference));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::logtwo ( real  a)

Definition at line 121 of file pl_math.cc.

References LOG_2, and pl_log.

Referenced by PLearn::PLMathTest::perform().

{
    return pl_log(a) / LOG_2;
}

Here is the caller graph for this function:

bool PLearn::looksNumeric ( const char *  s)

tells wether this string looks like a numeric entity

Definition at line 107 of file TypesNumeriques.cc.

References containsChar(), and DIGITsymbols.

Referenced by PLearn::MatlabInterface::eigs_r11(), main(), matlabR11eigs(), and numericType().

{
    return containsChar(s,DIGITsymbols);
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::lowerstring ( const string &  ss)

convert a string to all lowercase

Definition at line 234 of file stringutils.cc.

Referenced by PLearn::RBMLayer::addBiasDecay(), PLearn::AffineTransformWeightPenalty::AffineTransformWeightPenalty(), PLearn::RBMLayer::applyBiasDecay(), PLearn::UnfrozenDeepBeliefNet::build_(), PLearn::SurfaceMesh::build_(), PLearn::SupervisedDBN::build_(), PLearn::StackedLearner::build_(), PLearn::RBMTrainer::build_(), PLearn::RBMParameters::build_(), PLearn::RBMConnection::build_(), PLearn::PartSupervisedDBN::build_(), PLearn::NnlmOnlineLearner::build_(), PLearn::NNet::build_(), PLearn::NeuralProbabilisticLanguageModel::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::ModulesLearner::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::LayerCostModule::build_(), PLearn::ICP::build_(), PLearn::HintonDeepBeliefNet::build_(), PLearn::HeterogenuousAffineTransformWeightPenalty::build_(), PLearn::GaussPartSupervisedDBN::build_(), PLearn::GaussianDBNRegression::build_(), PLearn::GaussianDBNClassification::build_(), PLearn::FeatureSetSequentialCRF::build_(), PLearn::FeatureSetNNet::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::ChemicalICP::build_(), PLearn::NnlmOnlineLearner::buildLayers(), PLearn::StackedModulesLearner::buildOptions(), PLearn::DistRepNNet::buildVarGraph(), PLearn::ConditionalDictionary::get_option_string(), PLearn::LemmatizeVMatrix::getLemma(), PLearn::WordNetSenseDictionary::getSensesFromWordNet(), PLearn::SimpleDB< KeyType, QueryResult >::loadSchema(), main(), PLearn::OptionBase::optionLevelFromString(), and PLearn::ConfigParsing::run().

{
    string s(ss);
    string::iterator it = s.begin(), end = s.end();

    // for some reason toupper and tolower from ctype.h seem to create
    // problems when compiling in optimized mode, so we do this
    for (; it != end; ++it)
    {
        if(*it>='A' && *it<='Z')
            *it += 'a'-'A';
    }
    return s;
}

Here is the caller graph for this function:

vector< string > PLearn::lsdir ( const PPath &  dirpath)

Returns a list of all entries in the given directory (omitting entries "." and "..") If the directory cannot be opened an error is issued. The returned entries are not full paths.

Definition at line 187 of file fileutils.cc.

References PLearn::PPath::absolute(), d, getPrErrorString(), and PLERROR.

Referenced by PLearn::Cache< KeyType, ValueType >::clear(), lsdir_fullpath(), and train_and_test().

{
    vector<string> list;

    // Since NSPR functions do not reset the current error id when nothing goes
    // wrong, we do it manually by setting it to the 'PR_MAX_ERROR' value,
    // which is a placeholder for the last available error in NSPR (thus it is
    // not a true error code by itself).
    // This will avoid a crash triggered by an earlier error.
    PR_SetError(PR_MAX_ERROR, 0);

    PRDir* d = PR_OpenDir(dirpath.absolute().c_str());
    if (!d)
        PLERROR("In lsdir: could not open directory %s",dirpath.absolute().c_str());

    PRDirEntry* dirent = PR_ReadDir(d, PR_SKIP_BOTH);
    while (dirent) {
        list.push_back(dirent->name);
        dirent = PR_ReadDir(d, PR_SKIP_BOTH);
    }

    PRErrorCode e = PR_GetError();
    // The error code 'PR_NO_MORE_FILES_ERROR' can be found due to the call to
    // 'PR_ReadDir', that sets this error when reaching the end of the
    // directory.
    if (e != PR_MAX_ERROR && e != PR_NO_MORE_FILES_ERROR)
        PLERROR("In lsdir: error while listing directory: %s.",
                getPrErrorString().c_str());

    if (PR_CloseDir(d) != PR_SUCCESS)
        PLERROR("In lsdir: error while closing directory: %s.",
                getPrErrorString().c_str());

    return list;
}

Here is the call graph for this function:

Here is the caller graph for this function:

vector< PPath > PLearn::lsdir_fullpath ( const PPath &  dirpath)

Same as lsdir, except the returned entries are full paths.

Definition at line 226 of file fileutils.cc.

References lsdir().

Referenced by force_rmdir().

{
    // TODO Somewhat a copy of addprefix, not really elegant. Do better ?
    vector<string> without_path = lsdir(dirpath);
    vector<PPath> with_path(without_path.size());
    PPath prefix = dirpath;
    vector<string>::const_iterator it = without_path.begin();
    vector<PPath>::iterator newit = with_path.begin();
    while (it != without_path.end()) {
        *newit = prefix / *it;
        ++it;
        ++newit;
    }
    return with_path;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::LU_decomposition ( TMat< T > &  A,
TVec< T > &  Trow,
int detsign,
TVec< T > *  p = 0 
)

Definition at line 6608 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), maxabs(), PLearn::TMat< T >::mod(), n, PLERROR, PLearn::TMat< T >::swapRows(), and PLearn::TMat< T >::width().

Referenced by det().

{
    int n=A.length();
    if (n!=A.width())
        PLERROR("LU_decomposition: matrix A(%d,%d) should be square", n,A.width());
    TVec<T>* pivot = (p==0)?new TVec<T>(n):p;
    T* pv = pivot->data();
    detsign = 1;
    for (int i=0;i<n;i++)
    {
        T max_abs = maxabs(A(i));
        if (max_abs==0)
            PLERROR("LU_decomposition: %d-th row has only zeros",i);
        pv[i] = 1.0 / max_abs;
    }
    int mod = A.mod();
    for (int j=0;j<n;j++)
    {
        for (int i=0;i<j;i++)
        {
            T* Ai = A[i];
            T* Akj = A.data()+j;
            T Uij = Ai[j];
            for (int k=0;k<i;k++,Akj+=mod)
                Uij -= Ai[k] * *Akj;
            Ai[j] = Uij;
        }
        T max_abs = 0;
        int maxi = 0;
        for (int i=j;i<n;i++)
        {
            T* Ai = A[i];
            T* Akj = A.data()+j;
            T Lij = Ai[j];
            for (int k=0;k<j;k++,Akj+=mod)
                Lij -= Ai[k] * *Akj;
            Ai[j] = Lij;
            T piv = fabs(Lij) * pv[i];
            if (piv >= max_abs)
            {
                maxi = i;
                max_abs = piv;
            }
        }
        if (j!=maxi)
            // swap row j and row maxi
        {
            A.swapRows(j,maxi);
            pv[maxi]=pv[j];
            detsign = -detsign;
        }
        Trow[j] = maxi;
        T& Ajj = A(j,j);
        if (Ajj==0) Ajj=1e-20; // some regularization of singular matrices
        if (j<n-1)
        {
            T denom = 1.0/Ajj;
            T* Aij = &A(j+1,j);
            for (int i=j+1;i<n;i++, Aij+=mod)
                *Aij *= denom;
        }
    }
    if (p == 0) delete pivot;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Object * PLearn::macroLoadObject ( const PPath &  filename,
map< string, string > &  vars 
)

Same as loadObject but first performs macro-processing on the file vars may be initialised with the values of some variables and upon return it will also contain newly $DEFINED variables.

Definition at line 864 of file Object.cc.

References PLearn::Object::build(), openString(), PLearn::PStream::plearn_ascii, readFileAndMacroProcess(), and readObject().

Referenced by loadUCI(), macroLoadObject(), PLearn::TxtmatCommand::run(), and PLearn::HTMLHelpCommand::run().

{
    time_t date = 0;
    string script = readFileAndMacroProcess(filename, vars, date);
    PStream sin = openString(script,PStream::plearn_ascii);
    Object* o = readObject(sin);
    o->build();
    return o;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Object * PLearn::macroLoadObject ( const PPath &  filename)

same as previous, but no need to pass a variables map

Definition at line 874 of file Object.cc.

References macroLoadObject().

{
    map<string, string> vars;
    return macroLoadObject(filename,vars);
}

Here is the call graph for this function:

template<class T >
T PLearn::mahalanobis_distance ( const TVec< T > &  input,
const TVec< T > &  meanvec,
const TMat< T > &  inversecovmat 
)

Definition at line 5612 of file TMat_maths_impl.h.

References diff(), dot(), and product().

{
    TVec<T> diff = input-meanvec;
    return dot(diff,product(inversecovmat,diff));
}

Here is the call graph for this function:

PPath PLearn::makeFileNameValid ( const PPath &  path)

Return a valid filename from a potentially invalid one.

Definition at line 570 of file fileutils.cc.

References PLearn::PPath::absolute(), PLearn::PPath::basename(), PLearn::PPath::dirname(), PLearn::PPath::extension(), i, j, m, n, PLearn::PPath::no_extension(), pathexists(), PLWARNING, and tostring().

Referenced by PLearn::VMatrix::getSFIFFilename(), PLearn::VMatrix::isSFIFDirect(), and PLearn::VMatrix::setSFIFFilename().

{
    PPath dirname       = path.dirname();
    PPath filename_full = path.basename();
    PPath filename      = filename_full.no_extension();
    string ext          = filename_full.extension(true);
    PPath ret           = path;
    if(filename.length() + ext.length() > 256)
    {
        // We make a shorter name by encoding the rest into a few numbers.
        int j = 0;
        string rest = filename.substr(256-ext.length()-12);
        do
        {
            unsigned int n = j++;
            for(size_t i = 0; i < rest.length(); ++i)
            {
                int m=0;
                switch(i%4)
                {
                case 3: m= 1; break;
                case 2: m= 256; break;
                case 1: m= 65536; break;
                case 0: m= 256*65536; break;
                }
                n+= m*(unsigned char)rest[i];
            }
            filename.resize(256-ext.length()-12);
            filename+= "-" + tostring(n);
        } while(pathexists(dirname / (filename + ext)));
        PLWARNING("makeFileNameValid: Filename '%s' changed to '%s'.", 
                  path.absolute().c_str(), (dirname / (filename + ext)).c_str());
        ret = (dirname / (filename + ext));
    }

    // Replace illegal characters.
    string illegal = "*?'\"${}[]@ ,()";
    for(size_t i=0;i<ret.size();i++)
        if (illegal.find(ret[i]) != string::npos)
            ret[i]='_';
    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::makeItSymmetric ( const TMat< T > &  mat,
max_dif 
)

Definition at line 3551 of file TMat_maths_impl.h.

References abs(), i, PLearn::TMat< T >::isSquare(), j, PLearn::TMat< T >::length(), PLERROR, PLWARNING, w, and PLearn::TMat< T >::width().

{
    if (!mat.isSquare())
        PLERROR("at void makeItSymmetric, the matrix is not even square\n");
    T dif;
    T value;
    bool warning_flag = false;
    int w=mat.width();
    for (int i=0; i<mat.length()-1 ; i++)
        for (int j=i+1; j<w; j++)
        {
            dif = std::abs(mat[i][j] - mat[j][i]);
            if (dif > max_dif)
            {
                max_dif = dif;
                warning_flag = true;
            }
            value = (mat[i][j] + mat[j][i])/2;
            mat[i][j] = value; mat[j][i] = value;
        }
    if (warning_flag)
        PLWARNING("At void makeItSymmetric, the maximum difference %f is not affordable\n", max_dif);
}

Here is the call graph for this function:

Mat PLearn::makeMat ( int  length,
int  width,
const string &  values 
) [inline]

convenience construction from string allows to write things such as Mat m = newMat(2,2, "1 2 3 4")

Definition at line 60 of file MatIO.h.

References m.

{ Mat m(length,width); m << values; return m; } 
template<class T >
void PLearn::makeRowsSumTo1 ( const TMat< T > &  mat)

Definition at line 4524 of file TMat_maths_impl.h.

References divide(), i, PLearn::TMat< T >::length(), and sum().

{
    for (int i = 0; i < mat.length(); i++)
    {
        TVec<T> row_i = mat(i);
        divide(row_i, sum(row_i), row_i);
    }
}

Here is the call graph for this function:

Vec PLearn::makeVec ( int  length,
const string &  values 
) [inline]

Definition at line 63 of file MatIO.h.

{ Vec v(length); v << values; return v; }
void PLearn::manual_seed ( int32_t  x)
Var PLearn::margin_perceptron_cost ( Var  output,
Var  target,
real  margin 
) [inline]

Definition at line 83 of file MarginPerceptronCostVariable.h.

Referenced by PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), and PLearn::NNet::getCost().

{
    return new MarginPerceptronCostVariable(output, target, margin);
}

Here is the caller graph for this function:

RandomVar PLearn::marginalize ( const RandomVar &  RV,
const RandomVar &  hiddenRV 
)

integrate the RV over the given hiddenRV and return the resulting new RandomVariable. This may be difficult to do in general...

Definition at line 653 of file RandomVar.cc.

References PLERROR.

Referenced by PLearn::MixtureRandomVariable::ElogP(), PLearn::MixtureRandomVariable::logP(), PLearn::FunctionalRandomVariable::logP(), PLearn::MultinomialRandomVariable::logP(), and PLearn::DiagonalNormalRandomVariable::logP().

{ 
    PLERROR("marginalize not implemented yet..."); 
    return RandomVar();
}

Here is the caller graph for this function:

template<class T >
T PLearn::matColumnDotVec ( const TMat< T > &  mat,
int  j,
const TVec< T >  v 
)

return dot product of j-th column with vector v

Definition at line 3461 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), and PLERROR.

{
#ifdef BOUNDCHECK
    if (v.length()!=mat.length())
        PLERROR("dotColumn(%d,v), v.length_=%d != matrix length_=%d",
                j,v.length(),mat.length());
#endif
    T s = 0;
    T* colj = mat.data()+j;
    T* v_=v.data();
    int l=mat.length();
    for (int i=0;i<l;i++, colj+=mat.mod())
        s += *colj * v_[i];
    return s;
}

Here is the call graph for this function:

int PLearn::matInvert ( Mat &  in,
Mat &  inverse 
)

This function compute the inverse of a matrix.

WARNING: the input matrix 'in' is overwritten in the process.

Definition at line 222 of file plapack.cc.

References PLearn::TMat< T >::data(), dgetrf_(), dgetri_(), endl(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), N, PLASSERT, PLERROR, sgetrf_(), sgetri_(), and PLearn::TMat< T >::width().

Referenced by PLearn::GaussMix::addToCovariance(), PLearn::GaussMix::computeLogLikelihood(), PLearn::PruningLinearRegressor::computeTRatio(), PLearn::PCA::em_algo(), PLearn::LinearInductiveTransferClassifier::train(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

{
    // If the matrix is empty, just do nothing instead of crashing.
    if (in.isEmpty()) {
        PLASSERT( inverse.isEmpty() );
        return 0;
    }

#ifndef USE_BLAS_SPECIALISATIONS
    PLERROR("eigen_SymmMat: LAPACK not available on this system!");
    return 0;
#else
    // PLWARNING("matInvert: Your input matrix will be over-written!");

    // some check
    if (in.length() != in.width())
        PLERROR("The input matrix [%dx%d] must be square!", in.length(), in.width());
    // for the moment, we do not accept sub-matrices...
    if (in.mod() != in.width())
        PLERROR("The input matrix cannot be a sub-matrix...");

    int M = in.length();
    int N = in.length();
    real* A = in.data();
    int LDA = N;
    int* IPIV = new int[N];
    int INFO;

#ifdef USEFLOAT
    sgetrf_(&M, &N, A, &LDA, IPIV, &INFO);
#endif
#ifdef USEDOUBLE
    dgetrf_(&M, &N, A, &LDA, IPIV, &INFO);
#endif

    if (INFO != 0)
    {
        cout << "In matInvert: Error doing the inversion." << endl
             << "Check the man page of <sgetrf> with error code " << INFO
             << " for more details." << endl;

        delete[] IPIV;
        return INFO;
    }

    int LWORK = N;
    real* WORK = new real[LWORK];

#ifdef USEFLOAT
    sgetri_(&N, A, &LDA, IPIV, WORK, &LWORK, &INFO);
#endif
#ifdef USEDOUBLE
    dgetri_(&N, A, &LDA, IPIV, WORK, &LWORK, &INFO);
#endif

    if (INFO != 0)
    {
        cout << "In matInvert: Error doing the inversion." << endl
             << "Check the man page of <sgetri> with error code " << INFO
             << " for more details." << endl;

        delete[] IPIV;
        delete[] WORK;
        return INFO;
    }

    delete[] IPIV;
    delete[] WORK;

    real* p_A = A;
    for (int i=0; i<N; i++) {
        real* p_inverse = inverse[i];
        for (int j=0; j<M; j++, p_inverse++, p_A++)
            *p_inverse = *p_A;
    }

    return INFO;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::matlabR11eigs ( RowMapSparseMatrix< real > &  A,
Mat  eigen_vectors,
Vec  eigen_values,
string  which_eigenvalues 
)

Definition at line 144 of file MatlabInterface.cc.

References PLearn::TmpFilenames::addFilename(), PLearn::RowMapSparseMatrix< T >::exportToMatlabReadableFormat(), extract_filename(), PLearn::Popen::in, PLearn::MatlabInterface::launchAndWaitFor(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::RowMapSparseMatrix< T >::length(), loadAsciiWithoutSize(), looksNumeric(), PLearn::MatlabInterface::matlab, PLearn::MatlabInterface::matlab_file_header, PLearn::MatlabInterface::path(), PLERROR, PLWARNING, remove_extension(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), toint(), and tostring().

{
  bool get_evectors = eigen_vectors.length()>0;
  TmpFilenames tmpfilename(1);
  //string Afile = tmpfilename.addFilename("/tmp/","A",".ijv");

  //Temporary workaround!
  string Afile = tmpfilename.addFilename("/tmp/","A");
  unlink(Afile.c_str());
  Afile += ".ijv";

  A.exportToMatlabReadableFormat(Afile);
  string Afile_noext = remove_extension(Afile);
  string evec_file = Afile_noext + "_evec.dat";
  string eval_file = Afile_noext + "_eval.dat";
  string Aname = extract_filename(Afile_noext);
  vector<string> header;
  // that's where we expect to find eigs_r11.m
  header.push_back("path(path,'"+MatlabInterface::path()+"')");
  header.push_back("load " + Afile + ";");
  // convert to matlab sparse format
  header.push_back("M = spconvert(" + Aname + ");");
  header.push_back("options.disp=0; options.isreal=1; options.issym = 1;");
  header.push_back("d = " + tostring(eigen_values.length()) + ";");
  if (!looksNumeric(which_eigenvalues.c_str()))
    which_eigenvalues = "'" + which_eigenvalues + "'";
  // call eigs_r11
  if (get_evectors)
  {
    header.push_back("[Evec, Eval] = eigs_r11(M,d,"+which_eigenvalues+",options);");
    header.push_back("Evec = Evec';");
    header.push_back("save " + evec_file + " Evec -ascii -double;");
  }
  else
    header.push_back("Eval = eigs_r11(M, d, "+which_eigenvalues+", options);");
  header.push_back("Eval = diag(Eval);");
  header.push_back("save " + eval_file + " Eval -ascii -double;");
  header.push_back("fprintf(1, 'done ');");
  header.push_back("fprintf(1, '%d ',size(Eval));");
  header.push_back("quit");
  
  MatlabInterface matlab(header,"",Afile_noext,false,false);
  bool successful = matlab.launchAndWaitFor("done");
  if (!successful)
    PLERROR("matlabR11eigs: call to matlab was not successful, executing: %s",
          matlab.matlab_file_header.c_str());
  // get actual number of e-values found
  int actual_n_eval;
  string answer;
  // matlab.matlab->in >> actual_n_eval;
  matlab.matlab->in >> answer;
  if (answer==">>")
    matlab.matlab->in >> answer;
  if (!looksNumeric(answer.c_str()))
    PLERROR("matlabR11eigs: expected nb of eigenvalues, got %s",answer.c_str());
  actual_n_eval=toint(answer);
  if (actual_n_eval<eigen_values.length())
  {
    PLWARNING("matlabR11eigs: found %d e-values out of %d required",
            actual_n_eval,eigen_values.length());
    eigen_values.resize(actual_n_eval);
    if (get_evectors)
      eigen_vectors.resize(actual_n_eval,A.length());
  }
  // get results
  loadAsciiWithoutSize(eval_file, eigen_values);
  if (get_evectors)
    loadAsciiWithoutSize(evec_file, eigen_vectors);
  unlink(Afile.c_str());
  unlink(eval_file.c_str());
  unlink(evec_file.c_str());
}

Here is the call graph for this function:

void PLearn::matlabR11eigs ( RowMapSparseMatrix< double > &  A,
Mat  eigen_vectors,
Vec  eigen_values,
string  which_eigenvalues = "LM" 
)

Compute k eigen-values / eigen-vectors of a sparse symmetric matrix using the eigs program of matlab-r11 (see PLearn/Contrib/matlab/eigs_r11.m). The 'which_eigenvalues' argument specifies which eigenvalues are desired: a number the k eigen-values closest to that number "LM" Largest Magnitude (the default) "SM" Smallest Magnitude "LR" Largest Real part "SR" Smallest Real part "BE" Both Ends. Computes k/2 eigenvalues from each end of the spectrum (one more from the high end if k is odd.) where k is the length of the eigen_values vector. If eigen_vectors.length()==0 then only the eigen_values are computed. N.B. in comparison with other methods available in PLearn or elsewhere, this function is particularly useful when dealing with symmetric sparse matrices whose smallest eigen-pairs are sought.

void PLearn::matlabSave ( const PPath &  dir,
const string &  plot_title,
const Vec &  data,
const Vec &  add_col,
const Vec &  bounds,
string  lengend = "",
bool  save_plot = true 
)

The following two are simply calling the matrix version after transforming the Vec in a one column Mat. See below.

Definition at line 708 of file MatIO.cc.

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

Referenced by PLearn::SequentialLearner::matlabSave(), and matlabSave().

{
    Vec bidon;
    Mat mat(data.length(), 1);
    mat << data;
    TVec<string> legd;
    if(legend != "")
        legd.append(legend);
    matlabSave(dir, plot_title, 
               bidon,
               mat, add_col, bounds, legd, save_plot);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::matlabSave ( const PPath &  dir,
const string &  plot_title,
const Mat &  data,
const Vec &  add_col,
const Vec &  bounds,
TVec< string >  legend,
bool  save_plot 
)

Simply calls the coming matlabSave function with an empty xValues Vec. See below.

Definition at line 736 of file MatIO.cc.

References matlabSave().

{
    Vec bid;
    matlabSave(dir, plot_title, bid, data, add_col, bounds, legend, save_plot);
}

Here is the call graph for this function:

void PLearn::matlabSave ( const PPath &  dir,
const string &  plot_title,
const Vec &  xValues,
const Vec &  yValues,
const Vec &  add_col,
const Vec &  bounds,
string  legend,
bool  save_plot 
)

Definition at line 722 of file MatIO.cc.

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

{
    Mat mat(yValues.length(), 1);
    mat << yValues;
    TVec<string> legd;
    if(legend != "")
        legd.append(legend);
    matlabSave(dir, plot_title, 
               xValues,
               mat, add_col, bounds, legd, save_plot);
}

Here is the call graph for this function:

void PLearn::matlabSave ( const PPath &  dir,
const string &  plot_title,
const Vec &  xValues,
const Mat &  yValues,
const Vec &  add_col,
const Vec &  bounds,
TVec< string >  legend,
bool  save_plot 
)

This is the *real* matlabSave function.

1) If xValues is empty, the yValues are plotted against the row indices.

2) If xValues is not empty and its length is not equal to the length of yValues, then its length must be one and the value xValues[0] will be the start index for the xValues.

Definition at line 751 of file MatIO.cc.

References PLearn::PPath::absolute(), add(), c, d, endl(), force_mkdir(), is_missing(), PLearn::TVec< T >::isNotEmpty(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), MISSING_VALUE, PLERROR, PLearn::TVec< T >::resize(), tostring(), underscore_to_space(), w, and PLearn::TMat< T >::width().

{
    force_mkdir(dir);  
    PPath directory = dir.absolute();
    force_mkdir(directory / "Images" / "");
  
    int w = yValues.width();

    ofstream out;
    PPath vec_fname = directory / plot_title + ".mmat";
    out.open(vec_fname.absolute().c_str(), ofstream::out | ofstream::trunc);

    real startX = 0.0;
    int xLen = xValues.length(); 
    if(xLen != 0)
    {
        if(xLen == yValues.length())
            startX = MISSING_VALUE;
        else if(xLen == 1)
            startX = xValues[0];
        else
            PLERROR("matlabSave:\n"
                    "1) If xValues is empty, the yValues are plotted against the row indices.\n"
                    "2) If xValues is not empty and its length is not equal to the length of yValues, \n"
                    "then its length must be one and the value xValues[0] will be the start index for the xValues.");
    }

    for(int d = 0; d < yValues.length(); d++)
    {
        if(is_missing(startX))
            out << xValues[d] << "\t";
        else
            out << (startX+d) << "\t";
    
        for(int col=0; col < w; col++)
            out << yValues(d, col) << "\t";
    
        for(int add=0; add < add_col.length(); add++)
            out << add_col[add] << "\t";
        out << endl;
    }
    out.close();
  
    PPath m_fname = directory / plot_title + ".m";
    out.open(m_fname.absolute().c_str(), ofstream::out | ofstream::trunc);
    out << "load " << vec_fname.absolute() << " -ascii"   << endl
        << plot_title << "= sortrows(" << plot_title << ")" << endl
        << "h = plot(" 
//--- X Values
        << plot_title << "(:,1), "
//--- Y Values
        << plot_title << "(:,2:" << (1+w) << "));"  << endl
        << "set(h, 'LineWidth', 1.0)" << endl
        << "set(gcf, 'Position', [0, 0, 1000, 750])" << endl
        << "hold on" << endl;
  
    if(legend.isNotEmpty())
    {
        int leg = legend.length();
        int wid = yValues.width();
        if(leg != wid)
        {
            if(legend[0] == "Numbers")
            {
                legend.resize(wid);
                for(int c=0; c < wid; c++)
                    legend[c] = tostring(c);
            }
            else
                PLERROR("TimeSeriesAnalysis::matlab_save: legend.length() = %d != %d = yValues.width()",
                        leg, wid);
        }
        out << "legend(h";
        for(int l=0; l < leg; l++)
        {
            legend[l] = underscore_to_space(legend[l]);
            out << ", '" << legend[l] << "'"; 
        }
        out << ");" << endl;
    }
  
    for(int add=0; add < add_col.length(); add++)
        out << "g = plot(" << plot_title 
            << "(:," << (2+w+add) << "));"
            << endl
            << "set(g, 'Color', [0.5 0.5 0.5])" << endl;
  
    if(bounds.isNotEmpty())
        out << "xlim([" << bounds[0] << ", " << bounds[1] << "])" << endl
            << "ylim([" << bounds[2] << ", " << bounds[3] << "])" << endl;
  
    out << "title('" << underscore_to_space(plot_title) << "')" << endl;
  
    if(save_plot)
        out << "print('-dpsc2', '" 
            << (directory / "Images" / "").absolute()
            << plot_title << ".eps')" << endl;
  
    out.close();
}

Here is the call graph for this function:

Var PLearn::matrixElements ( Var  expression,
const Var &  i,
const Var &  j,
int  ni,
int  nj,
const VarArray &  parameters 
) [inline]

Definition at line 94 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
Var PLearn::matrixIndex ( Var  mat,
Var  index 
) [inline]

Definition at line 77 of file ColumnIndexVariable.h.

References PLearn::Var::length(), PLERROR, and PLearn::Var::width().

Referenced by neg_log_pi().

{
    if(index->size()!=mat->width())
        PLERROR("matrixIndex: index->size() should be equal to mat->width() (%d!=%d x %d)",index->size(),mat->width(),mat->length());
    return new ColumnIndexVariable(mat,index);  
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::matrixInverse ( Var  v) [inline]

Definition at line 73 of file MatrixInverseVariable.h.

{
    return new MatrixInverseVariable(v);
}
template<class T >
T PLearn::matRowDotVec ( const TMat< T > &  mat,
int  i,
const TVec< T >  v 
)

return dot product of i-th row with vector v

Definition at line 3443 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), j, PLearn::TVec< T >::length(), PLERROR, PLearn::TMat< T >::rowdata(), w, and PLearn::TMat< T >::width().

Referenced by PLearn::RBMJointGenericParameters::computeLinearUnitActivations(), and GDFindSmallEigenPairs().

{
#ifdef BOUNDCHECK
    if (v.length()!=mat.width())
        PLERROR("dotRow(%d,v), v.length_=%d != matrix width_=%d",
                i,v.length(),mat.width());
#endif
    T s = 0;
    T* rowi = mat.rowdata(i);
    T* v_=v.data();
    int w=mat.width();
    for (int j=0;j<w;j++)
        s += rowi[j] * v_[j];
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::matRowsDots ( TVec< T >  v,
const TMat< T > &  A,
const TMat< T > &  B 
)

return dot products of i-th row of A with i-th row of B in vector v

Definition at line 3479 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (A.length()!=v.length())
        PLERROR("matRowDotsVec(v,A,B): v.length_=%d != A.length_=%d",
                v.length(),A.length());
    if (A.length()!=B.length())
        PLERROR("matRowDotsVec(v,A,B): A.length_=%d != B.length_=%d",
                A.length(),B.length());
    if (A.width()!=B.width())
        PLERROR("matRowDotsVec(v,A,B): A.width_=%d != B.width_=%d",
                A.width(),B.width());
#endif
    int l=A.length(), w=A.width();
    T* vi = v.data();
    for (int i=0;i<l;i++)
    {
        T s = 0;
        T* Aij = A[i];
        T* Bij = B[i];
        for (int j=0;j<w;j++)
            s += *Aij++ * *Bij++;
        *vi++ = s;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::matRowsDotsAcc ( TVec< T >  v,
const TMat< T > &  A,
const TMat< T > &  B 
)

return dot products of i-th row of A with i-th row of B in vector v

Definition at line 3507 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (A.length()!=v.length())
        PLERROR("matRowDotsVec(v,A,B): v.length_=%d != A.length_=%d",
                v.length(),A.length());
    if (A.length()!=B.length())
        PLERROR("matRowDotsVec(v,A,B): A.length_=%d != B.length_=%d",
                A.length(),B.length());
    if (A.width()!=B.width())
        PLERROR("matRowDotsVec(v,A,B): A.width_=%d != B.width_=%d",
                A.width(),B.width());
#endif
    int l=A.length(), w=A.width();
    T* vi = v.data();
    for (int i=0;i<l;i++)
    {
        T s = 0;
        T* Aij = A[i];
        T* Bij = B[i];
        for (int j=0;j<w;j++)
            s += *Aij++ * *Bij++;
        *vi++ += s;
    }
}

Here is the call graph for this function:

template<class T >
T PLearn::max ( const TVec< T > &  vec)

Returns the maximum.

Definition at line 720 of file TMat_maths_impl.h.

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

Referenced by PLearn::BasisSelectionRegressor::appendFunctionToSelection(), PLearn::BallTreeNearestNeighbors::BallKNN(), PLearn::SurfaceMesh::boundingBox(), PLearn::RBMSparse1DMatrixConnection::bpropAccUpdate(), PLearn::RBMModule::bpropAccUpdate(), PLearn::KLp0p1RBMModule::bpropAccUpdate(), PLearn::RBMSparse1DMatrixConnection::bpropUpdate(), PLearn::ScoreLayerVariable::build_(), PLearn::RegressionTreeRegisters::build_(), PLearn::ProcessingVMatrix::build_(), PLearn::MultiTargetOneHotVMatrix::build_(), PLearn::ModuleTester::build_(), PLearn::FinancePreprocVMatrix::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::CompactFileVMatrix::build_(), PLearn::AddCostToLearner::build_(), PLearn::MixtureVMatrix::buildPeriod(), calcTransformation4(), PLearn::RowIterator::char_width(), PLearn::RealMapping::checkConsistency(), columnMax(), PLearn::NeuralProbabilisticLanguageModel::compute_softmax(), PLearn::FeatureSetSequentialCRF::compute_softmax(), PLearn::FeatureSetNNet::compute_softmax(), PLearn::GaussianProcessRegressor::computeConfidenceFromOutput(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::GaussMix::computeLogLikelihood(), PLearn::CubicSpline::computeOutput(), PLearn::GaussianProcessRegressor::computeOutputCovMat(), PLearn::ICP::computeWeights(), PLearn::SDBVMFieldPosAffine::convertField(), PLearn::VVMatrix::createPreproVMat(), PLearn::SecondIterationWrapper::deGaussianize(), displayBasicStats(), displayDecisionSurface(), PLearn::PRange< T >::distance(), PLearn::DTWKernel::dtw(), PLearn::DiagonalNormalRandomVariable::EMUpdate(), PLearn::IndexedVMatrix::ensureMappingsConsistency(), PLearn::ConcatRowsVMatrix::ensureMappingsConsistency(), PLearn::ClassMarginCostFunction::evaluate(), PLearn::ClassDistanceProportionCostFunction::evaluate(), PLearn::Gnuplot::featureplot(), PLearn::MPIPStreamBuf::fill_mpibuf(), PLearn::PRandom::fill_random_uniform(), PLearn::RBMSparse1DMatrixConnection::forget(), PLearn::RBMQLParameters::forget(), PLearn::RBMMatrixConnection::forget(), PLearn::RBMLQParameters::forget(), PLearn::RBMLLParameters::forget(), PLearn::RBMGenericParameters::forget(), PLearn::RBMDiagonalMatrixConnection::forget(), PLearn::RBMConv2DLLParameters::forget(), PLearn::RBMConv2DConnection::forget(), PLearn::PseudolikelihoodRBM::forget(), PLearn::RBMModule::fprop(), PLearn::NegLogPoissonVariable::fprop(), PLearn::MaxSubsampling2DModule::fprop(), PLearn::KLp0p1RBMModule::fprop(), PLearn::ConcatRowsVMatrix::fullyCheckMappings(), PLearn::GeneralizedOneHotVMatrix::GeneralizedOneHotVMatrix(), PLearn::GaussianDistribution::generate(), PLearn::GaussMix::generateFromGaussian(), getDataSetHelp(), PLearn::VVMatrix::getDateOfVMat(), PLearn::SDBVMFieldRemapIntervals::getIntervals(), PLearn::VMatrix::getMtime(), PLearn::JoinVMatrix::getNewRow(), PLearn::GaussianizeVMatrix::getNewRow(), PLearn::CompactFileVMatrix::getNewRow(), PLearn::SDBVMOutputCoder::getNumClasses(), PLearn::SDBVMOutputCoder::handleOtherAndMissing(), PLearn::TreeDBNModule::hash(), PLearn::Gnuplot::histoplot(), InversePowerIteration(), PLearn::NeighborhoodBoxVolumeDensityEstimator::log_density(), PLearn::ManifoldKNNDistribution::log_density(), PLearn::GaussianDistribution::log_density(), log_softmax(), PLearn::RealMapping::maxMappedToValue(), maxPointMotion(), min(), minabs(), PLearn::ConjGradientOptimizer::minimizeLineSearch(), operator&(), PLearn::PRange< T >::operator&=(), operator|(), PLearn::PRange< T >::operator|=(), PLearn::AutoScaledGradientOptimizer::optimizeN(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), PLearn::LinearRegressor::outputsize(), PLearn::TMatTest::perform(), PLearn::Gnuplot::plotdensity(), PowerIteration(), PLearn::GaussMix::precomputeGaussianLogCoefficient(), qld_interface(), readAndMacroProcess(), readFileAndMacroProcess(), PLearn::SmallVector< T, SizeBits, Allocator >::resize(), PLearn::ArrayAllocatorTrivial< T, SizeBits >::resize(), PLearn::ArrayAllocator< T, SizeBits >::resize(), PLearn::TMat< T >::resizePreserve(), PLearn::BasisSelectionRegressor::retrainLearner(), PLearn::RGBImageVMatrix::RGBImageVMatrix(), ridgeRegressionByGCV(), rowMax(), PLearn::TestDependenciesCommand::run(), PLearn::PairwiseDiffsCommand::run(), PLearn::FieldConvertCommand::run(), scores_to_winners(), PLearn::ShellProgressBar::set(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), PLearn::KNNRegressor::setTrainingSet(), PLearn::KNNClassifier::setTrainingSet(), PLearn::BallTreeNearestNeighbors::smallestContainer(), softmax(), PLearn::GraphicalBiText::test_WSD(), testCholeskyRoutines(), PLearn::NormalizationLearner::train(), PLearn::MultiClassAdaBoost::train(), PLearn::LocallyMagnifiedDistribution::train(), PLearn::GaussMix::train(), PLearn::EmbeddedSequentialLearner::train(), PLearn::GaussianProcessRegressor::trainProjectedProcess(), transform_perclass_values_into_luminance(), PLearn::RBMSparse1DMatrixConnection::update(), PLearn::GaussMix::updateCholeskyFromPrevious(), PLearn::GaussMix::updateInverseVarianceFromPrevious(), PLearn::OneHotVMatrix::updateNClassesAndWidth(), PLearn::PLearner::use(), PLearn::Function::verifyGradient(), PLearn::Function::verifyHessian(), PLearn::Function::verifyrfprop(), viewVMat(), and vmatmain().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN max(const NumericVec& vec) TVec has zero length()");
#endif
    int n = vec.length();
    if (!n)
        return std::numeric_limits<T>::min();
    T* pv = vec.data();
    T maxval = *pv++;
    while(--n)
    {
        if(*pv>maxval)
            maxval = *pv;
        ++pv;
    }
    return maxval;
}

Here is the call graph for this function:

template<class T >
T PLearn::max ( const TVec< T > &  vec,
int argmax 
)

Returns the maximum and computes its index.

Definition at line 742 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), min(), n, and PLASSERT.

{
    PLASSERT(vec.length() != 0);

    int n = vec.length();
    if (n == 0)
    {
        argmax = -1;
        return std::numeric_limits<T>::min();
    }
    T* pv = vec.data();
    T maxval = *pv++;
    argmax = 0;
    for (int i=1; i<vec.length(); i++,pv++)
        if (*pv>maxval)
        {
            maxval = *pv;
            argmax = i;
        }
    return maxval;
}

Here is the call graph for this function:

template<class T >
void PLearn::max ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2131 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), MAX, n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("max: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = MAX(s1[i],s2[i]);
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::max ( const TVec< T > &  source1,
source2,
TVec< T > &  destination 
)

Definition at line 2150 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), MAX, n, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = MAX(s1[i],source2);
    }
}

Here is the call graph for this function:

template<class T >
T PLearn::max ( const TMat< T > &  mat,
int max_i,
int max_j 
)

Returns the maximum and computes its position.

Definition at line 5151 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLASSERT, PLearn::TMat< T >::size(), and PLearn::TMat< T >::width().

{
    PLASSERT(mat.size() != 0);

    T* m_i = mat.data();
    double maxval = m_i[0];
    max_i = 0;
    max_j = 0;
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
            if(m_i[j]>maxval)
            {
                maxval = m_i[j];
                max_i = i;
                max_j = j;
            }
    return maxval;
}

Here is the call graph for this function:

template<class T >
T PLearn::max ( const TMat< T > &  mat)

Returns the maximum.

Definition at line 5134 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T max(const TMat<T>& mat) mat has 0 size");
#endif
    T* m_i = mat.data();
    double maxval = m_i[0];
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
            if(m_i[j]>maxval)
                maxval = m_i[j];
    return maxval;
}

Here is the call graph for this function:

Var PLearn::max ( Var  v1,
Var  v2 
) [inline]

Definition at line 83 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
Var PLearn::max ( Var  v) [inline]

Definition at line 75 of file MaxVariable.h.

{ return new MaxVariable(v); }
real PLearn::max_cdf_diff ( Vec &  v1,
Vec &  v2 
)

Returns the max of the difference between the empirical cdf of 2 series of values.

Returns the max of the difference between the empirical cdf of 2 series of values Side-effect: the call sorts v1 and v2.

Definition at line 175 of file stats_utils.cc.

References diff(), fast_exact_is_equal(), PLearn::TVec< T >::length(), PLWARNING, and sortElements().

Referenced by KS_test().

{  
    int n1 = v1.length();
    int n2 = v2.length();
    real inv_n1 = 1./n1;
    real inv_n2 = 1./n2;
    sortElements(v1);
    sortElements(v2);
    int i1=0;
    int i2=0;
    real maxdiff = 0;

    if(n1==0 && n2==0)
    {
        PLWARNING("In max_cdf_diff(Vec, Vec) - both vector are empty!");
        return 0;
    }
    else if (n1==0 || n2==0)
        return 1;

    for(;;)
    {

        if(v1[i1]<v2[i2])
        {
            i1++;
            if(i1+1==n1)
                break;
        }
        else if(fast_exact_is_equal(v1[i1],v2[i2]))
        {
            i1++;i2++;
            if(i2==n2)
                break;
            else if(i1+1==n1)
                break;
            continue;
        }
        else
        {
            i2++;
            if(i2==n2)
                break;
        }

        if ((i1>0 && fast_exact_is_equal(v1[i1], v1[i1-1])) ||
            (i2>0 && fast_exact_is_equal(v2[i2], v2[i2-1])) ||
            (v1[i1]<v2[i2] && v1[i1+1]<v2[i2]))
            continue; // to deal with discrete-valued variables: only look at "changing-value" places

        real F1 = inv_n1*i1;
        real F2 = inv_n2*i2;
        real diff = fabs(F1-F2);
        if(diff>maxdiff)
            maxdiff = diff;

        // perr << "v1[" << i1 << "]=" << v1[i1] << "; v2[" << i2 << "]=" << v2[i2] << "; F1=" << F1 << "; F2=" << F2 << "; diff=" << diff << endl;
    } 

    return maxdiff;  
}

Here is the call graph for this function:

Here is the caller graph for this function:

StatsIt PLearn::max_stats ( ) [inline]

Definition at line 432 of file StatsIterator.h.

{ return new MaxStatsIterator(); }
template<class T >
T PLearn::maxabs ( const TVec< T > &  vec)

Returns the maximum in absolute value.

Definition at line 808 of file TMat_maths_impl.h.

References a, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), min, PLERROR, and PLearn::TVec< T >::size().

Referenced by det(), LU_decomposition(), and PLearn::StackedSVDNet::train().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T maxabs(const TVec<T>& vec) vec has zero length");
#endif
    if (vec.size() == 0)
        return std::numeric_limits<T>::min();
    T* v = vec.data();
    T maxval = fabs(v[0]);
    for(int i=1; i<vec.length(); i++)
    {
        T a=fabs(v[i]);
        if(a>maxval)
            maxval = a;
    }
    return maxval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::maxabs ( const TVec< T > &  vec,
int argmax 
)

Returns the maximum in absolute value and compute its index.

Definition at line 829 of file TMat_maths_impl.h.

References a, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), min(), n, and PLASSERT.

{
    PLASSERT(vec.length() != 0);

    int n = vec.length();
    if (n == 0)
    {
        argmax = -1;
        return std::numeric_limits<T>::min();
    }
    T* pv = vec.data();
    T maxval = fabs(*pv++);
    argmax = 0;
    for (int i=1; i<vec.length(); i++,pv++)
    {
        T a = fabs(*pv);
        if (a>maxval)
        {
            maxval = a;
            argmax = i;
        }
    }
    return maxval;
}

Here is the call graph for this function:

template<class T >
T PLearn::maxabs ( const TMat< T > &  mat)

Returns the maximum in absolute value.

Definition at line 5218 of file TMat_maths_impl.h.

References a, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T maxabs(const TMat<T>& mat) mat has 0 size");
#endif
    T* m_i = mat.data();
    double maxval = fabs(m_i[0]);
    int w=mat.width();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
        {
            T a=fabs(m_i[j]);
            if(a>maxval)
                maxval = a;
        }
    return maxval;
}

Here is the call graph for this function:

template<class T >
T PLearn::maxabs ( const TMat< T > &  mat,
int max_i,
int max_j 
)

Returns the maximum in absolute value and computes its position.

Definition at line 5239 of file TMat_maths_impl.h.

References a, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLASSERT, PLearn::TMat< T >::size(), and PLearn::TMat< T >::width().

{
    PLASSERT(mat.size() != 0);

    T* m_i = mat.data();
    double maxval = fabs(m_i[0]);
    max_i = 0;
    max_j = 0;
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
        {
            T a = fabs(m_i[j]);
            if(a>maxval)
            {
                maxval = a;
                max_i = i;
                max_j = j;
            }
        }
    return maxval;
}

Here is the call graph for this function:

real PLearn::maxPointMotion ( const Mat &  old_points,
const Mat &  new_points 
)

Definition at line 460 of file geometry.cc.

References i, PLearn::TMat< T >::length(), max(), n, PLERROR, powdistance(), and sqrt().

Referenced by PLearn::ICP::iterate(), and PLearn::ICP::iterativeReweight().

{
  real max_motion2 = 0;
  int n = old_points.length();

  if( new_points.length() != n )
  {
    PLERROR( "maxPointMotion: old_points and new_points Mat must have same length" );
  }

  for( int i=0 ; i<n ; i++)
  {
    real motion2 = powdistance( new_points( i ), old_points( i ), 2 );
    max_motion2 = max( max_motion2, motion2 );
  }

  return sqrt( max_motion2 );
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::mean ( const TMat< T > &  mat)

Definition at line 4988 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T mean(const TMat<T>& mat) mat has 0 size");
#endif
    double res = 0.0;
    T* m_i = mat.data();
    int w=mat.width();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
            res += m_i[j];
    return T(res/(mat.length()*mat.width()));
}

Here is the call graph for this function:

Var PLearn::mean ( Var  v)

This part contains the more "user-friendly interface" to the underlying classes

Var is a wrapper around Variable that handles reference-counting and freeing automatically propagationPath is a function that computes and returns the VarArray corresponding to an update propagation

Several operator overloading and function-like syntaxes allow the use of Vars with the usual intuitive expression notations.

******************************* user-friendly Var interface *

Definition at line 57 of file Var_utils.cc.

References sum().

{ return sum(v)/real(v->nelems()); }

Here is the call graph for this function:

template<class T >
T PLearn::mean ( const TVec< T > &  vec,
bool  ignore_missing = false 
)

if ignore_missing==true, then the mean is computed by ignoring the possible MISSING_VALUE in the Vec.

if ignore_missing==false, then MISSING_VALUE is returned if one element of the Vec is MISSING_VALUE.

Definition at line 479 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, is_missing(), PLearn::TVec< T >::length(), MISSING_VALUE, n, PLERROR, and PLearn::TVec< T >::size().

Referenced by PLearn::BasisSelectionRegressor::appendCandidateFunctionsOfSingleField(), PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::KNNImputationVMatrix::build_(), columnWeightedVariance(), PLearn::PseudolikelihoodRBM::compute_Z(), computeConditionalMeans(), computeLocalPrincipalComponents(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::StackedLearner::computeOutput(), computeRowMean(), doubleCentering(), PLearn::CorrelationKernel::evaluate(), PLearn::EmpiricalDistribution::expectation(), PLearn::PRandom::fill_random_normal(), PLearn::SharpeRatioStatsIterator::finish(), PLearn::StderrStatsIterator::finish(), PLearn::StddevStatsIterator::finish(), PLearn::RBMModule::fprop(), PLearn::VecStatsCollector::getMean(), PLearn::FinancePreprocVMatrix::getNewRow(), PLearn::SharpeRatioStatsIterator::init(), PLearn::StderrStatsIterator::init(), PLearn::StddevStatsIterator::init(), PLearn::SharpeRatioStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StderrStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StddevStatsIterator::makeDeepCopyFromShallowCopy(), PLearn::StatsCollector::mean_over_kurtosis(), PLearn::StatsCollector::mean_over_skewness(), PLearn::SharpeRatioStatsIterator::oldwrite(), PLearn::StderrStatsIterator::oldwrite(), PLearn::StddevStatsIterator::oldwrite(), paired_t_test(), PLearn::SequentialModelSelector::paired_t_test(), PLearn::VarUtilsTest::perform(), PLearn::TMatTest::perform(), rowMean(), PLearn::TestDependenciesCommand::run(), PLearn::RBMTrainer::run(), PLearn::SequentialModelSelector::sequenceCost(), PLearn::GaussianProcessRegressor::setInput(), PLearn::ImputationVMatrix::testResultantVMatrix(), PLearn::PseudolikelihoodRBM::train(), PLearn::GaussianProcessRegressor::train(), PLearn::GaussianProcessRegressor::trainProjectedProcess(), PLearn::SharpeRatioStatsIterator::update(), PLearn::StderrStatsIterator::update(), PLearn::StddevStatsIterator::update(), PLearn::EmpiricalDistribution::variance(), vmatmain(), and PLearn::StatsCollector::zstat().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T mean(const TVec<T>& vec) vec has zero length");
#endif
    if (vec.size() == 0)
        return MISSING_VALUE;
    double res = 0.0;
    int n = 0;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
    {
        if (!is_missing(v[i]))
        {
            res += v[i];
            n++;
        }
        else if (!ignore_missing)
            return MISSING_VALUE;
    }

    if (n == 0)
        return MISSING_VALUE;
    return T(res/double(n));
}

Here is the call graph for this function:

StatsIt PLearn::mean_stats ( ) [inline]

Definition at line 428 of file StatsIterator.h.

Referenced by PLearn::Learner::Learner().

{ return new MeanStatsIterator(); }

Here is the caller graph for this function:

Var PLearn::meanOf ( VMat  distr,
Func  f,
int  nsamples,
int  input_size 
) [inline]
Var PLearn::meanOf ( VMat  distr,
Func  f,
int  nsamples = -1,
bool  the_do_sizeprop = false 
) [inline]

meanOf

Definition at line 175 of file SumOfVariable.h.

References PLearn::VMat::length().

{ 
    if(nsamples<0) nsamples = distr.length();
    return new SumOfVariable(distr,f/nsamples,nsamples, the_do_sizeprop); 
}

Here is the call graph for this function:

Var PLearn::meanOf ( Var  output,
const VarArray &  inputs,
VMat  distr,
int  nsamples = -1,
VarArray  parameters = VarArray(),
bool  the_do_sizeprop = false 
) [inline]

deprecated old version do not use!

Definition at line 182 of file SumOfVariable.h.

References PLearn::VMat::length(), and meanOf().

{ 
    if(nsamples<0) nsamples = distr.length();
    return meanOf(distr, Func(inputs,output), nsamples, the_do_sizeprop); 
}

Here is the call graph for this function:

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

Return the median value of vector.

Definition at line 2494 of file TMat_maths_impl.h.

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

Referenced by PLearn::SurfaceMesh::computeResolution(), PLearn::RBMModule::fprop(), and PLearn::TMatTest::perform().

{
    if (vec.isEmpty())
        PLERROR("In median - Cannot compute median of an empty vector");
    return kthOrderedElement(vec, (vec.length()-1)/2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class U , class V , class W >
void PLearn::memfun_broadcast ( const Object *  o,
U(T::*)(V, W) const  func,
typename boost::call_traits< V >::param_type  arg1,
typename boost::call_traits< W >::param_type  arg2,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 369 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)(arg1,arg2);
}
template<class T , class U >
void PLearn::memfun_broadcast ( const Object *  o,
U(T::*)() const  func,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Call a specific member function across a graph of Objects.

The global function memfun_broadcast is used to call a member function on a graph of Objects, but only for those objects that are of a class that can accept the member function. Right now, forms with 0-, 1-, 2- or 3- argument forms are supported.

Both const and non-const forms are supported.

The return values of the individual functions called are ignored.

Implementation note: we use the Boost call_traits library to ensure that _references to references_ do not occur in the argument lists of memfun_broadcast, which would be outlawed by the C++ standard.

Definition at line 319 of file ObjectGraphIterator.h.

Referenced by PLearn::ObjectGraphIteratorTest::perform().

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)();
}

Here is the caller graph for this function:

template<class T , class U >
void PLearn::memfun_broadcast ( Object *  o,
U(T::*)()  func,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 331 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)();
}
template<class T , class U , class V >
void PLearn::memfun_broadcast ( const Object *  o,
U(T::*)(V) const  func,
typename boost::call_traits< V >::param_type  arg1,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 343 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)(arg1);
}
template<class T , class U , class V >
void PLearn::memfun_broadcast ( Object *  o,
U(T::*)(V)  func,
typename boost::call_traits< V >::param_type  arg1,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 356 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)(arg1);
}
template<class T , class U , class V , class W >
void PLearn::memfun_broadcast ( Object *  o,
U(T::*)(V, W)  func,
typename boost::call_traits< V >::param_type  arg1,
typename boost::call_traits< W >::param_type  arg2,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 383 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)(arg1,arg2);
}
template<class T , class U , class V , class W , class X >
void PLearn::memfun_broadcast ( const Object *  o,
U(T::*)(V, W, X) const  func,
typename boost::call_traits< V >::param_type  arg1,
typename boost::call_traits< W >::param_type  arg2,
typename boost::call_traits< X >::param_type  arg3,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 397 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)(arg1,arg2,arg3);
}
template<class T , class U , class V , class W , class X >
void PLearn::memfun_broadcast ( Object *  o,
U(T::*)(V, W, X func,
typename boost::call_traits< V >::param_type  arg1,
typename boost::call_traits< W >::param_type  arg2,
typename boost::call_traits< X >::param_type  arg3,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 412 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, false, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)(arg1,arg2,arg3);
}
template<class T , class U , class V >
void PLearn::memfun_broadcast_optname ( const Object *  o,
U(T::*)(V) const  func,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Call a specific member function across a graph of Objects with the option name as argument.

The global function memfun_broadcast_optname is used to call a member function on a graph of Objects, but only for those objects that are of a class that can accept the member function. Right now, forms with 0, 1 or 2 arguments are supported. This function, contrarily to memfun_broadcast, supplies the option name as the _first argument_ to the called member function. The option name is of a form that getOption() or setOption() would accept and is used to "locate" the object within the object graph started out by the starting Object* o.

Both const and non-const forms are supported.

The return values of the individual functions called are ignored.

Implementation note: we use the Boost call_traits library to ensure that _references to references_ do not occur in the argument lists of memfun_broadcast_optname, which would be outlawed by the C++ standard.

Definition at line 449 of file ObjectGraphIterator.h.

Referenced by PLearn::ObjectGraphIteratorTest::perform().

{
    ObjectGraphIterator grit(o, tt, true, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)(grit.getCurrentOptionName());
}

Here is the caller graph for this function:

template<class T , class U , class V >
void PLearn::memfun_broadcast_optname ( Object *  o,
U(T::*)(V)  func,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 462 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, true, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)(grit.getCurrentOptionName());
}
template<class T , class U , class V , class W >
void PLearn::memfun_broadcast_optname ( const Object *  o,
U(T::*)(V, W) const  func,
typename boost::call_traits< V >::param_type  arg1,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 475 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, true, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)(grit.getCurrentOptionName(), arg1);
}
template<class T , class U , class V , class W , class X >
void PLearn::memfun_broadcast_optname ( const Object *  o,
U(T::*)(V, W, X) const  func,
typename boost::call_traits< V >::param_type  arg1,
typename boost::call_traits< W >::param_type  arg2,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 503 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, true, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (const T* t = dynamic_cast<const T*>(*grit))
            (t->*func)(grit.getCurrentOptionName(), arg1, arg2);
}
template<class T , class U , class V , class W , class X >
void PLearn::memfun_broadcast_optname ( Object *  o,
U(T::*)(V, W, X func,
typename boost::call_traits< V >::param_type  arg1,
typename boost::call_traits< W >::param_type  arg2,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 518 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, true, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)(grit.getCurrentOptionName(), arg1, arg2);
}
template<class T , class U , class V , class W >
void PLearn::memfun_broadcast_optname ( Object *  o,
U(T::*)(V, W)  func,
typename boost::call_traits< V >::param_type  arg1,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Definition at line 489 of file ObjectGraphIterator.h.

{
    ObjectGraphIterator grit(o, tt, true, T::_classname_()), grend;
    for ( ; grit != grend ; ++grit)
        if (T* t = const_cast<T*>(dynamic_cast<const T*>(*grit)))
            (t->*func)(grit.getCurrentOptionName(), arg1);
}
void * PLearn::MemoryMap ( const char *  filename,
tFileHandle &  handle,
bool  read_only,
off_t &  filesize 
)

returns a pointer to the memory-mapped file or 0 if it fails for some reason.

Definition at line 116 of file MemoryMap.cc.

References PLERROR.

Referenced by PLearn::Storage< PP< RegressionTreeNode > >::Storage().

{
    void * addr;
    if (read_only)
    {
        handle = open(filename,O_RDONLY);
        if (handle<0)
            PLERROR("In Storage: Could not open specified memory-mapping file for reading");
        // get the size of the file in bytes
        filesize = lseek(handle,0,SEEK_END);
        addr = mmap(0, filesize, PROT_READ, MAP_SHARED, handle, 0);
    }
    else {
        handle = open(filename,O_RDWR);
        if (handle<0)
            PLERROR("In Storage: Could not open specified memory-mapping file for read-write");
        filesize = lseek(handle,0,SEEK_END); 

        addr = mmap(0, filesize, PROT_READ|PROT_WRITE, MAP_SHARED, handle, 0);
    }
    return addr;
}

Here is the caller graph for this function:

void PLearn::memoryUnmap ( void *  data,
tFileHandle  handle,
int  length 
)

Definition at line 141 of file MemoryMap.cc.

Referenced by PLearn::Storage< PP< RegressionTreeNode > >::pointTo(), and PLearn::Storage< PP< RegressionTreeNode > >::~Storage().

{
    msync((char*)data, length, MS_SYNC);
    munmap((char *)data, length);
    close(handle);
}

Here is the caller graph for this function:

void PLearn::merge ( Set  a,
Set  b,
Set  res 
) [inline]

Definition at line 86 of file Set.h.

References PLearn::Set::begin(), and PLearn::Set::end().

Referenced by PLearn::RBMMixedLayer::build_(), PLearn::RBMJointLLParameters::build_(), and PLearn::RBMJointGenericParameters::build_().

{
    set_union(a.begin(), a.end(),
              b.begin(), b.end(),
              insert_iterator<PPointableSet>(*res, res.begin()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

map<string, PPath>& PLearn::metaprotocol_to_metapath ( )

Definition at line 242 of file PPath.cc.

Referenced by PLearn::PPath::addMetaprotocolBinding(), and PLearn::PPath::metaprotocolToMetapath().

                                               {
    static map<string, PPath> metaprotocol_to_metapath;
    return metaprotocol_to_metapath;
}

Here is the caller graph for this function:

template<class MatT >
int PLearn::metricMultiDimensionalScaling ( MatT &  square_distances,
Mat  embedding,
int  max_n_eigen_iter = 300 
)

Apply the metric multi-dimensional scaling (MDS) algorithm to a possibly sparse generalized matrix (nxn) of pairwise SQUARE distances between n objects. This yields an embedding of the objects in m-dimensional space, in the nxm embedding matrix. The distances matrix should be symmetric. It will be "destroyed" upon return (it will contain pseudo dot-products between the objects). The distances that are not specified are assumed to be NOT ZERO but "large", yielding a pseudo dot-product of zero.

double-centering of the distances to get dot products

average the non-zero elements across rows and columns

now "square_distances" are actually pseudo dot-products

do a partial SVD (which is the same as an eigen-decomposition since the matrix is symmetric) to find the largest eigen-pairs

extract the embedding: embedding(object i, feature j) = e_vectors(j,i)*sqrt(e_values[j])

Definition at line 1019 of file GenMat.h.

References PLearn::TMat< T >::column(), columnSum(), doubleCentering(), eigenSparseSymmMat(), FORTRAN_Integer, j, PLearn::TMat< T >::length(), m, n, PLERROR, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), sqrt(), and PLearn::TMat< T >::width().

{
    int n=square_distances.length();
    FORTRAN_Integer m=embedding.width();
    if (embedding.length()!=n)
        PLERROR("MetricMultiDimensionalScaling: expected embedding.length()==square_distances.length(), got %d!=%d",
                embedding.length(),n);
    if (square_distances.width()!=n)
        PLERROR("MetricMultiDimensionalScaling: expected square_distances a square matrix, got %d x %d",
                n,square_distances.width());
    if (square_distances.size()!=n*n)
        PLERROR("MetricMultiDimensionalScaling: only works on a full, non-sparse matrix\n");

    static Vec avg_across_rows;
    avg_across_rows.resize(n);
    columnSum(square_distances, avg_across_rows);
    avg_across_rows *= 1.0/n;
    doubleCentering(square_distances,avg_across_rows,square_distances,-0.5);

    static Vec e_values;
    e_values.resize(m);
    static Mat e_vectors;
    e_vectors.resize(m,n);
    int err=eigenSparseSymmMat(square_distances, e_values, 
                               e_vectors, m, max_n_eigen_iter);
    if (!(err==0 || err==1))
        return err;
    for (int j=0;j<m;j++)
    {
        real eval_j = e_values[j];
        if (eval_j<0)
            PLERROR("metricMultiDimensionalScaling::the matrix of dot-products is not positive-definite!, evalue=%g",eval_j);
        real scale = sqrt(eval_j);
        Vec feature_j = e_vectors(j);
        feature_j *= scale;
        embedding.column(j) << feature_j;
    }
    return 0;
}

Here is the call graph for this function:

template<class T >
T PLearn::min ( const TVec< T > &  vec)

Returns the minimum.

Definition at line 766 of file TMat_maths_impl.h.

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

Referenced by accumInStatsCol(), PLearn::BallTreeNearestNeighbors::anchorTrain(), PLearn::BasisSelectionRegressor::appendKernelFunctions(), PLearn::TraceVariable::bprop(), PLearn::ExtractVariable::bprop(), PLearn::RBMModule::bpropAccUpdate(), PLearn::KLp0p1RBMModule::bpropAccUpdate(), PLearn::SubVMatrix::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::RandomGaussMix::build_(), PLearn::ModuleTester::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::BootstrapVMatrix::build_(), PLearn::AddCostToLearner::build_(), columnMin(), PLearn::GaussianDistribution::computeEigenDecomposition(), PLearn::GeodesicDistanceKernel::computeNearestGeodesicNeighbour(), PLearn::StackedFocusedAutoassociatorsNet::computeOutput(), PLearn::CubicSpline::computeOutput(), PLearn::ICP::computeWeights(), PLearn::GenericNearestNeighbors::constructOutputVector(), PLearn::SecondIterationWrapper::deGaussianize(), displayDecisionSurface(), PLearn::ConcatColumnsVMatrix::dot(), PLearn::DTWKernel::dtw(), PLearn::GeodesicDistanceKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), PLearn::IIDNoiseKernel::evaluate_all_i_x(), PLearn::MemoryCachedKernel::evaluateAllIXNV(), PLearn::PRandom::fill_random_uniform(), PLearn::BufferedIntVecFile::flush(), PLearn::TraceVariable::fprop(), PLearn::SVDVariable::fprop(), PLearn::NLLCostModule::fprop(), PLearn::ExtractVariable::fprop(), PLearn::RBMMultinomialLayer::fpropNLL(), PLearn::RBMLocalMultinomialLayer::fpropNLL(), GCV(), PLearn::GeneralizedOneHotVMatrix::GeneralizedOneHotVMatrix(), PLearn::RBMDistribution::generateN(), PLearn::SoftHistogramBinner::getBins(), PLearn::MovingAverageVMatrix::getNewRow(), PLearn::JoinVMatrix::getNewRow(), PLearn::GaussianizeVMatrix::getNewRow(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), PLearn::PDateTime::incMinute(), PLearn::PDateTime::info(), PLearn::GaussMix::kmeans(), lapackSVD(), max(), maxabs(), PLearn::ConjGradientOptimizer::minimizeLineSearch(), PLearn::PruningLinearRegressor::newDatasetIndices(), operator&(), PLearn::PRange< T >::operator&=(), PLearn::BasisSelectionRegressor::thread_wawr::operator()(), PLearn::PDateTime::operator==(), operator|(), PLearn::PRange< T >::operator|=(), PLearn::AutoScaledGradientOptimizer::optimizeN(), PLearn::PDateTime::PDateTime(), PLearn::TMatTest::perform(), PLearn::Gnuplot::plotdensity(), PLearn::MPIPStreamBuf::read_(), PLearn::SVDVariable::recomputeSize(), PLearn::NonDiagVariable::recomputeSize(), PLearn::DiagVariable::recomputeSize(), PLearn::SmallVector< T, SizeBits, Allocator >::resize(), PLearn::ArrayAllocatorTrivial< T, SizeBits >::resize(), PLearn::ArrayAllocator< T, SizeBits >::resize(), PLearn::Storage< PP< RegressionTreeNode > >::resizeMat(), PLearn::TMat< T >::resizePreserve(), PLearn::RGBImageVMatrix::RGBImageVMatrix(), ridgeRegressionByGCV(), rowMin(), PLearn::TestDependenciesCommand::run(), PLearn::NearestNeighborPredictionCost::run(), PLearn::FieldConvertCommand::run(), PLearn::ShellProgressBar::set(), PLearn::GeodesicDistanceKernel::setDataForKernelMatrix(), softmaxMinus(), sortColumns(), PLearn::PLearner::test(), PLearn::PDateTime::toJulianDay(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PartSupervisedDBN::train(), PLearn::ManifoldParzen2::train(), PLearn::LocallyMagnifiedDistribution::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussMix::train(), PLearn::GaussianDBNRegression::train(), PLearn::DeepBeliefNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::BaggingLearner::train(), PLearn::TreeDBNModule::updateCache(), PLearn::ConjGradientOptimizer::updateSearchDirection(), PLearn::StackedFocusedAutoassociatorsNet::updateTrainSetRepresentations(), viewVMat(), vmatmain(), weightedRidgeRegressionByGCV(), and PLearn::MPIPStreamBuf::write_().

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T min(const TVec<T>& vec) vec has zero length");
#endif
    if (vec.size() == 0)
        return std::numeric_limits<T>::max();
    T* v = vec.data();
    T minval = v[0];
    for(int i=1; i<vec.length(); i++)
        if(v[i]<minval)
            minval = v[i];
    return minval;
}

Here is the call graph for this function:

template<class T >
T PLearn::min ( const TVec< T > &  vec,
int argmin 
)

Returns the minimum and computes its index.

Definition at line 784 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), max(), n, and PLASSERT.

{
    PLASSERT(vec.length() != 0);

    int n = vec.length();
    if (n == 0)
    {
        argmin = -1;
        return std::numeric_limits<T>::max();
    }
    T* pv = vec.data();
    T minval = *pv++;
    argmin = 0;
    for (int i=1; i<vec.length(); i++,pv++)
        if (*pv<minval)
        {
            minval = *pv;
            argmin = i;
        }
    return minval;
}

Here is the call graph for this function:

template<class T >
void PLearn::min ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2166 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), MIN, n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("min: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = MIN(s1[i],s2[i]);
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::min ( const TVec< T > &  source1,
source2,
TVec< T > &  destination 
)

Definition at line 2185 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), MIN, n, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = MIN(s1[i],source2);
    }
}

Here is the call graph for this function:

template<class T >
T PLearn::min ( const TMat< T > &  mat)

Returns the minimum.

Definition at line 5096 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T min(const TMat<T>& mat) mat has 0 size");
#endif
    T* m_i = mat.data();
    double minval = m_i[0];
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
            if(m_i[j]<minval)
                minval = m_i[j];
    return minval;
}

Here is the call graph for this function:

template<class T >
T PLearn::min ( const TMat< T > &  mat,
int min_i,
int min_j 
)

Returns the minimum and computes its position.

Definition at line 5113 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLASSERT, PLearn::TMat< T >::size(), and PLearn::TMat< T >::width().

{
    PLASSERT(mat.size() != 0);

    T* m_i = mat.data();
    double minval = m_i[0];
    min_i = 0;
    min_j = 0;
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
            if(m_i[j]<minval)
            {
                minval = m_i[j];
                min_i = i;
                min_j = j;
            }
    return minval;
}

Here is the call graph for this function:

Var PLearn::min ( Var  v1,
Var  v2 
) [inline]

Definition at line 83 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
Var PLearn::min ( Var  v) [inline]

Definition at line 73 of file MinVariable.h.

{ return new MinVariable(v); }
StatsIt PLearn::min_stats ( ) [inline]

Definition at line 431 of file StatsIterator.h.

{ return new MinStatsIterator(); }
template<class T >
T PLearn::minabs ( const TVec< T > &  vec)

Returns the minimum in absolute value.

Definition at line 856 of file TMat_maths_impl.h.

References a, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLASSERT, and PLERROR.

{
#ifdef BOUNDCHECK
    if(vec.length()==0)
        PLERROR("IN T minabs(const TVec<T>& vec) vec has zero length");
#endif
    int n = vec.length();
    PLASSERT( n >= 1 );
    T* v = vec.data();
    T minval = fabs(v[0]);
    for(int i=1; i<n; i++)
    {
        T a=fabs(v[i]);
        if(a<minval)
            minval = a;
    }

    return minval;
}

Here is the call graph for this function:

template<class T >
T PLearn::minabs ( const TVec< T > &  vec,
int argmin 
)

Returns the minimum in absolute value and compute its index.

Definition at line 878 of file TMat_maths_impl.h.

References a, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), max(), n, and PLASSERT.

{
    PLASSERT(vec.length() != 0);

    int n = vec.length();
    if (n == 0)
    {
        argmin = -1;
        return std::numeric_limits<T>::max();
    }
    T* pv = vec.data();
    T minval = fabs(*pv++);
    argmin = 0;
    for (int i=1; i<n; i++,pv++)
    {
        T a = fabs(*pv);
        if (a<minval)
        {
            minval = a;
            argmin = i;
        }
    }
    return minval;
}

Here is the call graph for this function:

template<class T >
T PLearn::minabs ( const TMat< T > &  mat)

Returns the minimum in absolute value.

Definition at line 5172 of file TMat_maths_impl.h.

References a, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T minabs(const TMat<T>& mat) mat has 0 size");
#endif
    T* m_i = mat.data();
    double minval = fabs(m_i[0]);
    int w=mat.width();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
        {
            T a=fabs(m_i[j]);
            if(a<minval)
                minval = a;
        }
    return minval;
}

Here is the call graph for this function:

template<class T >
T PLearn::minabs ( const TMat< T > &  mat,
int min_i,
int min_j 
)

Returns the minimum in absolute value and computes its position.

Definition at line 5193 of file TMat_maths_impl.h.

References a, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLASSERT, PLearn::TMat< T >::size(), w, and PLearn::TMat< T >::width().

{
    PLASSERT(mat.size() != 0);

    T* m_i = mat.data();
    double minval = fabs(m_i[0]);
    min_i = 0;
    min_j = 0;
    int w=mat.width();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
        {
            T a = fabs(m_i[j]);
            if(a<minval)
            {
                minval = a;
                min_i = i;
                min_j = j;
            }
        }
    return minval;
}

Here is the call graph for this function:

Var PLearn::minus ( Var  v,
Var  w 
) [inline]

Definition at line 77 of file MinusVariable.h.

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_(), det(), and pl_strtod().

                               {
    return new MinusVariable(v, w);
}

Here is the caller graph for this function:

RandomVar PLearn::mixture ( RVArray  components,
RandomVar  log_weights 
)

A mixture of distributions, with the given components and the convex weights given by weights = softmax(log_weights). Note that the log_weights argument represents unnormalized log-probabilities (i.e normalization is automatically done inside the mixture).

Definition at line 736 of file RandomVar.cc.

Referenced by PLearn::RVArrayRandomElementRandomVariable::logP().

{
    return new MixtureRandomVariable(components,log_weights);
}

Here is the caller graph for this function:

bool PLearn::mkdir_lowlevel ( const PPath &  dirname)

Low-level cross-platform mkdir function, with the normal mkdir semantics.

Returns false if the directory could not be created (including because it already exists), and does not create intermediate directories along the way.

Contrast with the API of force_mkdir, which cannot be used in situations where race conditions matter, because of its "return true if the directory already exists" semantics.

Definition at line 243 of file fileutils.cc.

Referenced by force_mkdir().

{
    return PR_MkDir(dirname.c_str(), 0777) == PR_SUCCESS;
}

Here is the caller graph for this function:

time_t PLearn::mtime ( const PPath &  path)

Returns the time of last modification of file (or 0 if file does not exist).

Definition at line 166 of file fileutils.cc.

References PLearn::PPath::absolute(), and PR_GetFileInfo64_NoWildcards().

Referenced by PLearn::FileVMatrix::build_(), PLearn::VVMatrix::buildFilteredVMatFromVPL(), PLearn::VVMatrix::createPreproVMat(), getDateOfCode(), PLearn::VVMatrix::getDateOfVMat(), PLearn::VVMatrix::isPrecomputedAndUpToDate(), PLearn::VMatrix::isUpToDate(), PLearn::VMatrix::lockMetaDataDir(), PLearn::VMatLanguage::preprocess(), readFileAndMacroProcess(), PLearn::ReadAndWriteCommand::run(), PLearn::AutoRunCommand::run(), smartLoadObject(), PLearn::VMatLanguage::staticPreprocess(), and PLearn::VMatrix::updateMtime().

{
    PRFileInfo64 fi;

    if (PR_GetFileInfo64_NoWildcards(path.absolute().c_str(), &fi) != PR_SUCCESS)
        return 0;
    else {
        // The NSPR PRTime is number of microseconds since the epoch, while
        // time_t is the number of seconds since the (same) epoch.
        // Translate from the former to the later by dividing by 1e6, using
        // NSPR long long manipulation macros to be extra safe.
        PRInt64 time_t_compatible_value;
        PRInt64 one_million = LL_INIT(0, 1000000);
        LL_DIV(time_t_compatible_value, fi.modifyTime, one_million);
        return (time_t)time_t_compatible_value;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::multi_target_one_hot ( VMat  source_and_target,
real  cold_value,
real  hot_value 
) [inline]

Definition at line 136 of file MultiTargetOneHotVMatrix.h.

References PLearn::MultiTargetOneHotVMatrix::build(), PLearn::MultiTargetOneHotVMatrix::cold_value, PLearn::MultiTargetOneHotVMatrix::hot_value, and PLearn::MultiTargetOneHotVMatrix::source_and_target.

Referenced by PLearn::MultiTaskSeparationSplitter::getSplit().

  {
    MultiTargetOneHotVMatrix* ret = new MultiTargetOneHotVMatrix();
    ret->source_and_target = source_and_target;
    ret->cold_value = cold_value;
    ret->hot_value = hot_value;
    ret->build();
    return ret;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::multiclass_loss ( Var  network_output,
Var  targets 
) [inline]

Definition at line 81 of file MulticlassLossVariable.h.

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::NeuralNet::build_(), PLearn::DeepFeatureExtractorNNet::buildCosts(), and PLearn::NNet::getCost().

{ return new MulticlassLossVariable(network_output, targets); }

Here is the caller graph for this function:

Var PLearn::MultiMax ( Var  v,
TVec< int groupsizes,
char  computation_type 
) [inline]

Definition at line 167 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
RandomVar PLearn::multinomial ( RandomVar  log_probabilities)

A discrete probability distribution which assigns probabilities[i] = softmax(log_probabilities)[i] to each of the discrete values i=0, 1, ... N-1. Note that the argument represents unnormalized log-probabilities (i.e normalization is automatically done inside the multinomial).

Definition at line 741 of file RandomVar.cc.

{
    return new MultinomialRandomVariable(log_probabilities);
}
int PLearn::multinomial_sample ( const PP< PRandom > &  rg,
const Mat &  distribution 
)

Definition at line 91 of file RBMLocalMultinomialLayer.cc.

References PLearn::TMat< T >::begin(), i, n, PLASSERT, PLearn::TMat< T >::size(), u, w, and PLearn::TMat< T >::width().

{
    real u = rg->uniform_sample();
    TMatElementIterator<real> pi = distribution.begin();
    real s = *pi;
#ifdef BOUNDCHECK
    int w = distribution.width();
#endif
    int n = distribution.size();
    int i = 0;

    while (s<u && i<n)
    {
        PLASSERT( *pi == distribution(i / w, i % w) );
        i++;
        pi++;
        s += *pi;
    }
    if (i == n)
        i = n - 1; // Improbable, but...
    return i;
}

Here is the call graph for this function:

int PLearn::multinomial_sample ( const Vec &  distribution)

returns a random deviate from a discrete distribution given explicitely by 'distribution'

Definition at line 499 of file random.cc.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, u, and uniform_sample().

Referenced by PLearn::MultinomialSampleVariable::fprop(), PLearn::RBMLocalMultinomialLayer::generateSample(), PLearn::RBMLocalMultinomialLayer::generateSamples(), and PLearn::CompactVMatrix::perturb().

{
    real  u  = uniform_sample();
    real* pi = distribution.data();
    real  s  = *pi;
    int    n  = distribution.length();
    int    i  = 0;
    while ((i<n) && (s<u)) {
        i++;
        pi++;
        s += *pi;
    }
    if (i==n)
        i = n - 1; /*   improbable but...   */
    return i;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::multiply ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 1928 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("multiply: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = s1[i]*s2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::multiply ( const TMat< T > &  result,
const TMat< T > &  x,
scale 
)

Definition at line 4535 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::compact_begin(), PLearn::TMat< T >::compact_end(), PLearn::TMat< T >::end(), PLearn::TMat< T >::isCompact(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (result.length()!=x.length() || result.width()!=x.width())
        PLERROR("multiply incompatible dimensions: %dx%d <- %dx%d",
                result.length(),result.width(),x.length(),x.width());
#endif
    if(result.isCompact() && x.isCompact())
    {
        typename TMat<T>::compact_iterator itm = result.compact_begin();
        typename TMat<T>::compact_iterator itmend = result.compact_end();
        typename TMat<T>::compact_iterator itx = x.compact_begin();
        for(; itm!=itmend; ++itm, ++itx)
            *itm = *itx * scale;
    }
    else // use non-compact iterators
    {
        typename TMat<T>::iterator itm = result.begin();
        typename TMat<T>::iterator itmend = result.end();
        typename TMat<T>::iterator itx = x.begin();
        for(; itm!=itmend; ++itm, ++itx)
            *itm = *itx * scale;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::multiply ( TMat< T > &  result,
const TMat< T > &  x,
const TVec< T > &  y,
bool  transpose = false 
)

Definition at line 4562 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TVec< T >::begin(), PLearn::TMat< T >::compact_begin(), i, PLearn::TMat< T >::isCompact(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLASSERT_MSG, PLearn::TMat< T >::resize(), transpose(), w, and PLearn::TMat< T >::width().

{
    PLASSERT_MSG(transpose && x.width()==y.length() ||
                 !transpose && x.length()==y.length(),
                 "multiply matrix rows or columns by vector: incompatible dimensions");
    result.resize(x.length(),x.width());
    int w=x.width();
    if(result.isCompact() && x.isCompact())
    {
        typename TMat<T>::compact_iterator itm = result.compact_begin();
        typename TMat<T>::compact_iterator itx = x.compact_begin();
        typename TVec<T>::iterator ity = y.begin();
        if (transpose)
            for (int i=0;i<x.length();i++)
            {
                ity = y.begin();
                for (int j=0;j<w;j++,++itx,++itm,++ity)
                    *itm = *itx * *ity;
            }
        else
            for (int i=0;i<x.length();i++,++ity)
                for (int j=0;j<w;j++,++itx,++itm)
                    *itm = *itx * *ity;
    }
    else // use non-compact iterators
    {
        typename TMat<T>::iterator itm = result.begin();
        typename TMat<T>::iterator itx = x.begin();
        typename TVec<T>::iterator ity = y.begin();
        if (transpose)
            for (int i=0;i<x.length();i++)
            {
                ity = y.begin();
                for (int j=0;j<w;j++,++itx,++itm,++ity)
                    *itm = *itx * *ity;
            }
        else
            for (int i=0;i<x.length();i++,++ity)
                for (int j=0;j<w;j++,++itx,++itm)
                    *itm = *itx * *ity;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::multiply ( const TVec< T > &  source1,
source2,
TVec< T > &  destination 
) [inline]
template<class T >
void PLearn::multiplyAcc ( const TVec< T > &  vec,
const TVec< T > &  x,
scale 
)

vec[i] += x[i]*scale;

Definition at line 2640 of file TMat_maths_impl.h.

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

Referenced by PLearn::CombiningCostsModule::bbpropUpdate(), PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::ProjectionErrorVariable::bprop(), PLearn::NllGeneralGaussianVariable::bprop(), PLearn::LogSumVariable::bprop(), PLearn::LogAddVariable::bprop(), PLearn::FNetLayerVariable::bprop(), PLearn::AffineTransformWeightPenalty::bprop(), PLearn::VBoundDBN2::bpropAccUpdate(), PLearn::RBMModule::bpropAccUpdate(), PLearn::RBMConv2DConnection::bpropAccUpdate(), PLearn::LinearCombinationModule::bpropAccUpdate(), PLearn::Convolution2DModule::bpropAccUpdate(), PLearn::CombiningCostsModule::bpropAccUpdate(), PLearn::ShuntingNNetLayerModule::bpropUpdate(), PLearn::ScaleGradientModule::bpropUpdate(), PLearn::RBMQLParameters::bpropUpdate(), PLearn::RBMMultitaskClassificationModule::bpropUpdate(), PLearn::RBMMatrixConnectionNatGrad::bpropUpdate(), PLearn::RBMLQParameters::bpropUpdate(), PLearn::RBMLLParameters::bpropUpdate(), PLearn::RBMJointLLParameters::bpropUpdate(), PLearn::RBMConv2DLLParameters::bpropUpdate(), PLearn::RBMConv2DConnection::bpropUpdate(), PLearn::RBMClassificationModule::bpropUpdate(), PLearn::Convolution2DModule::bpropUpdate(), PLearn::CombiningCostsModule::bpropUpdate(), PLearn::BackConvolution2DModule::bpropUpdate(), chol_rotapp_tr(), PLearn::GaussMix::computeLogLikelihood(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::KNNRegressor::computeOutput(), diagonalizeSubspace(), PLearn::ReverseMatT< MatT >::diagonalOfSquare(), PLearn::DiagonalNormalRandomVariable::EMBprop(), PLearn::ProductRandomVariable::EMBprop(), PLearn::MinusRandomVariable::EMBprop(), PLearn::PlusRandomVariable::EMBprop(), evaluateKernelWeightedTargetSum(), PLearn::MixtureDistribution::expectation(), PLearn::DeepNonLocalManifoldParzen::fineTuningStep(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), PLearn::LinearCombinationModule::fprop(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden2(), PLearn::NeuralProbabilisticLanguageModel::gradient_penalty(), PLearn::FeatureSetSequentialCRF::gradient_penalty(), PLearn::FeatureSetNNet::gradient_penalty(), PLearn::NatGradSMPNNet::onlineStep(), PLearn::NatGradNNet::onlineStep(), PLearn::NatGradEstimator::operator()(), PLearn::TMatTest::perform(), PLearn::MatTPlusSumSquaredVec< MatT >::product(), PLearn::ReverseMatT< MatT >::product(), projectOnOrthogonalSubspace(), PLearn::PCA::reconstruct(), PLearn::DenoisingRecurrentNet::recurrentUpdate(), SolveLinearSymmSystemByCG(), PLearn::IncrementalNNet::train(), PLearn::AutoLinearRegressor::train(), PLearn::RBMMatrixConnectionNatGrad::update(), PLearn::RBMConv2DLLParameters::update(), PLearn::RBMConv2DConnection::update(), PLearn::RBMMatrixConnection::updateCDandGibbs(), PLearn::RBMLayer::updateCDandGibbs(), PLearn::RBMMatrixConnection::updateGibbs(), PLearn::RBMLayer::updateGibbs(), and PLearn::DenoisingRecurrentNet::updateInputReconstructionFromHidden().

{
    int n=x.length();
    if (vec.length()!=n)
        PLERROR("TVec::multiplyAcc this has length_=%d and x has length_=%d", vec.length(),n);
    T* p=vec.data();
    T* xp=x.data();
    for (int i=0;i<n;i++)
        *p++ += scale * *xp++;
}

Here is the call graph for this function:

template<class T >
void PLearn::multiplyAcc ( const TVec< T > &  vec,
const TVec< T > &  x,
const TVec< T > &  y 
)

vec[i] += x[i]*y[i];

Definition at line 2707 of file TMat_maths_impl.h.

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

{
    int n=x.length();
    if (vec.length()!=n || y.length()!=n)
        PLERROR("TVec::multiplyAcc, this+=x*y: length_=%d, x.length_=%d, y.length_=%d",
                vec.length(),n,y.length());
    T* p=vec.data();
    T* xp=x.data();
    T* yp=y.data();
    for (int i=0;i<n;i++)
        p[i] += xp[i] * yp[i];
}

Here is the call graph for this function:

template<class T >
void PLearn::multiplyAcc ( const TMat< T > &  mat,
const TMat< T > &  x,
scale 
)

Definition at line 4624 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::compact_begin(), PLearn::TMat< T >::compact_end(), PLearn::TMat< T >::end(), PLearn::TMat< T >::isCompact(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (mat.length()!=x.length() || mat.width()!=x.width())
        PLERROR("multiplyAcc incompatible dimensions: %dx%d <- %dx%d",
                mat.length(),mat.width(),x.length(),x.width());
#endif
    if(mat.isCompact() && x.isCompact())
    {
        typename TMat<T>::compact_iterator itm = mat.compact_begin();
        typename TMat<T>::compact_iterator itmend = mat.compact_end();
        typename TMat<T>::compact_iterator itx = x.compact_begin();
        for(; itm!=itmend; ++itm, ++itx)
            *itm += *itx * scale;
    }
    else // use non-compact iterators
    {
        typename TMat<T>::iterator itm = mat.begin();
        typename TMat<T>::iterator itmend = mat.end();
        typename TMat<T>::iterator itx = x.begin();
        for(; itm!=itmend; ++itm, ++itx)
            *itm += *itx * scale;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::multiplyAcc ( const TMat< T > &  mat,
const TMat< T > &  x,
const TMat< T > &  y 
)

Definition at line 4651 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::length(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=mat.length()*mat.width();
    if (mat.length()!=x.length() || mat.width()!=x.width() || y.length()!=mat.length() || y.width()!=mat.width())
        PLERROR("multiplyAcc this has size=%dx%d, x is %dx%d, y is %dx%d",
                mat.length(),mat.width(),x.length(),x.width(),y.length(),y.width());
    T* p=mat.data();
    T* xp=x.data();
    T* yp=y.data();
    for (int i=0;i<n;i++)
        p[i] += xp[i] * yp[i];
}

Here is the call graph for this function:

template<class T >
void PLearn::multiplyAdd ( const TVec< T > &  source1,
const TVec< T > &  source2,
source3,
TVec< T > &  destination 
)

Definition at line 1947 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::resize().

Referenced by PLearn::GaussianProcessRegressor::inverseCovTimesVec(), SolveLinearSymmSystemByCG(), PLearn::IncrementalNNet::train(), and PLearn::ConstantRegressor::train().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("multiply: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = s1[i]+s2[i]*source3;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::multiplyColumns ( Mat &  m,
Vec &  v 
)

Definition at line 428 of file WPLS.cc.

References i, j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::WPLS::train().

{
    int n = m.length();
    int p = m.width();
    real vi;
    if(v.length() != n)
        PLERROR("Matrix and vector lengths do not match");
    for(int i=0; i<n; i++) {
        vi = v[i];
        for(int j=0; j<p; j++)
            m(i,j) *= vi;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::multiplyScaledAdd ( const TVec< T > &  source,
a,
b,
const TVec< T > &  destination 
)

Definition at line 1967 of file TMat_maths_impl.h.

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

Referenced by PLearn::RBMLateralBinomialLayer::bpropNLL(), PLearn::RBMLateralBinomialLayer::bpropUpdate(), chol_rotapp(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::RBMLateralBinomialLayer::computeExpectation(), PLearn::DeepBeliefNet::computeOutput(), PLearn::DeepBeliefNet::fineTuningStep(), PLearn::DeepBeliefNet::greedyStep(), PLearn::PseudolikelihoodRBM::train(), PLearn::NatGradNNet::train(), PLearn::RBMLateralBinomialLayer::update(), PLearn::RBMLayer::updateCDandGibbs(), PLearn::RBMMatrixConnection::updateGibbs(), and PLearn::RBMLayer::updateGibbs().

{
    int n=source.length();
    if (n!=destination.length())
        PLERROR("multiply: source and destination (l=%d and %d) must have same length",
                n,destination.length());
    if (n > 0) {
        T* s=source.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = a*d[i] + b*s[i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::multiplyScaledAdd ( const TMat< T > &  source,
a,
b,
const TMat< T > &  destination 
)

Definition at line 1983 of file TMat_maths_impl.h.

References d, PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=source.length();
    int m=source.width();
    if (n!=destination.length() || m!=destination.width())
        PLERROR("multiply: source and destination must have same dimensions");
    if (n > 0) {
        int sm=source.mod();
        int dm=destination.mod();
        T* s=source.data();
        T* d=destination.data();
        for (int i=0;i<n;i++,s+=sm,d+=dm)
            for (int j=0;j<m;j++)
                d[j] = a*d[j] + b*s[j];
    }
}

Here is the call graph for this function:

Mat PLearn::multivariate_normal ( const Vec &  mu,
const Mat &  A,
int  N 
)

generate N vectors sampled from the normal with mean vector mu and covariance matrix A

Definition at line 538 of file plapack.cc.

References PLearn::TMat< T >::appendRow(), PLearn::TMat< T >::copy(), eigen_SymmMat(), i, PLearn::TVec< T >::length(), and N.

Referenced by PLearn::ConditionalGaussianDistribution::generate(), and multivariate_normal().

{
    Vec e_values;
    Mat e_vectors;
    Mat A_copy = A.copy(); 
    int nb_evalues_found;
    eigen_SymmMat(A_copy, e_values, e_vectors, nb_evalues_found, true, mu.length(), true);
    Mat samples(0,mu.length());
    for (int i = 0; i < N; i++)
        samples.appendRow(multivariate_normal(mu, e_values, e_vectors));
    return samples;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::multivariate_normal ( const Vec &  mu,
const Mat &  A 
)

generate a vector sampled from the normal with mean vector mu and covariance matrix A

Definition at line 551 of file plapack.cc.

References multivariate_normal(), and PLearn::TMat< T >::toVec().

{
    return multivariate_normal(mu, A, 1).toVec(); 
}

Here is the call graph for this function:

Vec PLearn::multivariate_normal ( const Vec &  mu,
const Vec &  e_values,
const Mat &  e_vectors 
)

generate 1 vector sampled from the normal with mean mu and covariance matrix A = evectors * diagonal(e_values) * evectors'

Definition at line 556 of file plapack.cc.

References gaussian_01(), i, j, PLearn::TVec< T >::length(), n, sqrt(), and x.

{
    int n = mu.length(); // the number of dimension
    Vec z(n), x(n);
    for (int i = 0; i < n; i++)
        z[i] = gaussian_01();
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
            x[i] += e_vectors[j][i] * sqrt(e_values[j]) * z[j]; 
        x[i] += mu[i];
    }
    return x;
}

Here is the call graph for this function:

void PLearn::multivariate_normal ( Vec &  x,
const Vec &  mu,
const Vec &  e_values,
const Mat &  e_vectors,
Vec &  z 
)

generate a vector x sampled from the normal with mean mu and covariance matrix A = evectors * diagonal(e_values) * evectors' (the normal(0,I) originally sampled to obtain x is stored in z).

Unlike the other variants of this function, this one does not allocate anything.

Definition at line 571 of file plapack.cc.

References PLearn::TVec< T >::clear(), gaussian_01(), i, j, PLearn::TVec< T >::length(), n, PLearn::TVec< T >::resize(), and sqrt().

{
    int n = mu.length(); // the number of dimension
    z.resize(n);
    x.resize(n);
    x.clear();
    for (int i = 0; i < n; i++)
        z[i] = gaussian_01();
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
            x[i] += e_vectors[j][i] * sqrt(e_values[j]) * z[j]; 
        x[i] += mu[i];
    }
}

Here is the call graph for this function:

PRStatus PLearn::mv ( const PPath &  source,
const PPath &  dest,
bool  fail_on_error = true 
)

Calls system mv command to move the given source file to destination.

It fail if file exist. Use mvforce to force the overwrite existing file.

Definition at line 393 of file fileutils.cc.

References PLearn::PPath::absolute(), and PLERROR.

Referenced by PLearn::SurfaceMesh::addVertex(), PLearn::DiagonalNormalRandomVariable::EMUpdate(), PLearn::SurfaceMesh::findNormals(), PLearn::VVMatrix::generateVMatIndex(), PLearn::SurfaceMesh::getVertex(), PLearn::SurfaceMesh::getVertexCoordsAndFeatures(), PLearn::ICP::iterate(), mvforce(), PLearn::VMatrix::savePMAT(), and PLearn::SurfaceMesh::writeVRMLCoordinate3_().

{
    PRStatus ret=PR_Rename(source.absolute().c_str(),destination.absolute().c_str());
    if(ret!=PR_SUCCESS && fail_on_error)
        PLERROR("In mv(%s,%s) - the move failed!",source.c_str(),destination.c_str());

    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRStatus PLearn::mvforce ( const PPath &  source,
const PPath &  destination,
bool  fail_on_error 
)

Same as mv, but will not prompt before overwriting.

Definition at line 405 of file fileutils.cc.

References mv(), and PLERROR.

Referenced by PLearn::HyperLearner::auto_save(), PLearn::TextFilesVMatrix::buildIdx(), PLearn::VVMatrix::createPreproVMat(), and save().

{
    if(PR_Access(destination.c_str(), PR_ACCESS_EXISTS)==PR_SUCCESS){
        if(PR_Delete(destination.c_str())!=PR_SUCCESS){
             if(fail_on_error)
                 PLERROR("In mvforce(%s,%s) - we failed to delete the destination!",source.c_str(),destination.c_str());
             else
                 return PR_FAILURE;
        }
    }
     return mv(source,destination);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::mypow ( real  x,
real  p 
) [inline]
int PLearn::n_choose ( int  M,
int  N 
) [inline]

Return M choose N, i.e., M! / ( N! (M-N)! )

Definition at line 555 of file pl_math.h.

References i, and N.

Referenced by PLearn::PLMathTest::perform().

{
    int k=M-N;
    float res=1;
    int i;
    for (i=1;i<=k;i++) {
        res *= (i+N)/(float)i;
    }
    return (int)(res+0.499);
}

Here is the caller graph for this function:

Var PLearn::neg_log_pi ( Var  p,
Var  index 
)

Definition at line 60 of file Var_utils.cc.

References log(), and matrixIndex().

Referenced by PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::NNet::getCost(), main(), and PLearn::VarUtilsTest::perform().

{
    if(index->isScalar())  return -log(p[index]);
    else return -log(matrixIndex(p,index));
}

Here is the call graph for this function:

Here is the caller graph for this function:

CostFunc PLearn::neg_output_costfunc ( ) [inline]

returns -output[0]. This is for density estimators whose use(x) method typically computes log(p(x))

Definition at line 70 of file NegOutputCostFunction.h.

Referenced by PLearn::Distribution::Distribution().

{ return new NegOutputCostFunction(); }

Here is the caller graph for this function:

template<class T >
void PLearn::negateElements ( const TVec< T > &  vec)
template<class T >
void PLearn::negateElements ( const TMat< T > &  m)

x'_ij = -x_ij;

Definition at line 6023 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T* m_i = m.data();
    int w=m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] = -m_i[j];
}

Here is the call graph for this function:

Var PLearn::negateElements ( Var  v) [inline]

Definition at line 84 of file NegateElementsVariable.h.

                                 {
    return new NegateElementsVariable(v);
}
Var PLearn::negative ( Var  v) [inline]

Definition at line 79 of file CutAboveThresholdVariable.h.

References cutAboveThreshold().

{ return cutAboveThreshold(v,0.0); }

Here is the call graph for this function:

real PLearn::negative ( real  a) [inline]

Definition at line 138 of file pl_math.h.

References a.

Referenced by PLearn::PLMathTest::perform().

{ if (a<0) return a; return 0; }

Here is the caller graph for this function:

Var PLearn::neglogpoissonvariable ( VarArray &  the_varray) [inline]

Definition at line 83 of file NegLogPoissonVariable.h.

Referenced by PLearn::NNet::getCost().

{
    return new NegLogPoissonVariable(the_varray);
}

Here is the caller graph for this function:

unsigned char PLearn::new_get_compr_data_type ( double  x,
double  tolerance 
)

Definition at line 742 of file pl_io.cc.

References fast_exact_is_equal(), and is_missing().

Referenced by new_write_compressed().

{
    if(is_missing(x))
        return 1;
    else if(fast_exact_is_equal(x, 1.))
        return 0;
    else if(fast_exact_is_equal(double(char(x)), x) &&
            !fast_exact_is_equal(x, -128)) // -128 codes for missing value
        return 1;
    else if(fabs(double(float(x))-x)<=tolerance)
        return 2;
    return 3;
}

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char PLearn::new_get_compr_data_type ( float  x)

Definition at line 756 of file pl_io.cc.

References fast_exact_is_equal(), and is_missing().

{
    if(is_missing(x))
        return 1;
    else if(fast_exact_is_equal(x, 1.))
        return 0;
    else if(fast_exact_is_equal(float(char(x)), x) && 
            !fast_exact_is_equal(x, -128)) // -128 codes for missing value
        return 1;
    return 2;
}

Here is the call graph for this function:

size_t PLearn::new_read_compressed ( FILE *  in,
real vec,
int  l,
bool  swap_endians = false 
)

Reads the l doubles in the new compressed formtat from in Returns the number of bytes read.

Set swap_endians to true if the data was written on a machine with a different endianness than the current one, so that the endians get swapped.

Definition at line 639 of file pl_io.cc.

References endianswap(), i, MISSING_VALUE, N, and PLERROR.

Referenced by PLearn::DiskVMatrix::getNewRow().

{
    size_t nbytes = 0; // number of bytes read
    unsigned char mode; // the mode byte
    unsigned int N = 0; // N (number of 0s or values to insert) 

    while(l)
    {
        if(l<0)
            PLERROR("Big problem in new_read_compressed: l=%d", l);
        int i = getc(in);
        if(i == EOF)
            PLERROR("Got EOF while expecting more data in the file!");
        mode = (unsigned char)(i); 
            
        ++nbytes;
        unsigned char N1 = (mode & 0x1F);
        switch(N1)
        {
        case 0:  // N is the 1 byte to follow
            N1 = (unsigned char)(getc(in));
            ++nbytes;
            N = N1;
            break;
        case 30: // N is the 2 bytes to follow
            unsigned short N2;
            fread(&N2,2,1,in);
            if(swap_endians)
                endianswap(&N2);
            nbytes += 2;
            N = N2;
            break;
        case 31: // N is the 4 bytes to follow
            fread(&N,4,1,in);
            if(swap_endians)
                endianswap(&N);
            nbytes += 4;
            break;
        default: // N is N1
            N = N1;
        }

        if(mode & (unsigned char)(0x80)) // most significant bit is on
        { // insert N zeros
            l -= N;
            while(N--)            
                *vec++ = 0;
            N = 1;
        }

        if(!l)  // vec ends with zeroes, so there's no extra single value to append. We're done!
            break;

        l -= N;
        mode = ((mode & ~0x80) >> 5); // get the 2 bits we're interested in
        switch(mode)
        {
        case 0: // type ones
        {
            while(N--)
                *vec++ = 1;
        }
        break;
        case 1: // type signed char (or missing value if -128)
        {
            signed char val;
            nbytes += N;
            while(N--)
            {
                val = (signed char)(getc(in));
                if(val==-128)
                    *vec++ = MISSING_VALUE;
                else
                    *vec++ = val;
            }
        }
        break;
        case 2: // type float
        {
            float val;
            nbytes += N<<2;
            while(N--)
            {
                fread(&val,sizeof(float),1,in);
                if(swap_endians)
                    endianswap(&val);
                *vec++ = val;
            }
        }
        break;
        case 3: // type double
        {
            nbytes += N<<3;
            fread(vec,sizeof(double),N,in);
            if(swap_endians)
                endianswap(vec,N);
            vec += N;
        }
        } 
    }
    return nbytes;
}

Here is the call graph for this function:

Here is the caller graph for this function:

size_t PLearn::new_write_compressed ( FILE *  out,
real vec,
int  l,
double  tolerance = 1e-6,
bool  swap_endians = false 
)

Writes the l doubles in new compressed format to out.

Returns the number of bytes written tolerance is the maximum allowed error tolerance to store doubles as floats. Set swap_endians to true if the data is to be written in the different byte-order from this machine's

Definition at line 843 of file pl_io.cc.

References fast_exact_is_equal(), new_get_compr_data_type(), new_write_mode_and_size(), new_write_raw_data_as(), and PLERROR.

Referenced by PLearn::DiskVMatrix::appendRow().

{
    if(swap_endians)
        PLERROR("swap_endians in new_write_compressed not yet supported (currently only supported by new_read_compresed");

    size_t nbytes = 0; // number of bytes written

    while(l)
    {
        int nzeroes = 0;
        while(l && fast_exact_is_equal(*vec, 0.))
        {
            ++nzeroes;
            ++vec;
            --l;
        }

        int nvals = 0;
        unsigned char data_type = 0;
        if(l)
        {
            real* ptr = vec;
            data_type = new_get_compr_data_type(*ptr, tolerance);
            ++nvals;
            ++ptr;
            --l;
            while(l && !fast_exact_is_equal(*ptr, 0.) && new_get_compr_data_type(*ptr, tolerance)==data_type)
            {
                ++nvals;
                ++ptr;
                --l;
            }
        }

        // Now we know nzeroes, nvals, and data_type
        // So let's encode it:

        if(nzeroes) // we have zeroes
        {
            // write the code for zeroes followed by a single value
            nbytes += new_write_mode_and_size(out, true, nzeroes, data_type);
            if(nvals) // write the following single value
            {
                nbytes += new_write_raw_data_as(out, vec, 1, data_type);
                ++vec;
                --nvals;
            }
        }

        if(nvals) // we have some remaining values
        {
            nbytes += new_write_mode_and_size(out, false, nvals, data_type);
            nbytes += new_write_raw_data_as(out, vec, nvals, data_type);
            vec += nvals;
        }

    } // end of for(;;)
    return nbytes;
}

Here is the call graph for this function:

Here is the caller graph for this function:

size_t PLearn::new_write_mode_and_size ( FILE *  out,
bool  insert_zeroes,
unsigned int  N,
unsigned char  data_type 
)

returns number of bytes written

Definition at line 769 of file pl_io.cc.

Referenced by new_write_compressed().

{
    size_t nbytes = 0; // nbytes written
    unsigned char mode = data_type<<5;
    if(insert_zeroes)
        mode |= (unsigned char)0x80;
    if(N<30)
    {
        mode |= (unsigned char)N;
        putc(mode,out);
        nbytes = 1;
    }
    else if(N<=UCHAR_MAX)
    {
        putc(mode,out);
        putc((unsigned char)N,out);
        nbytes = 2;
    }
    else if(N<=USHRT_MAX)
    {
        mode |= (unsigned char)30;
        putc(mode,out);
        unsigned short N2 = (unsigned short)N;
        fwrite(&N2,sizeof(unsigned short),1,out);
        nbytes = 3;
    }
    else // (N<=UINT_MAX)
    {
        mode |= (unsigned char)31;
        putc(mode,out);
        unsigned int N4 = (unsigned int)N;
        fwrite(&N4,sizeof(unsigned int),1,out);
        nbytes = 5;
    }
    return nbytes;
}

Here is the caller graph for this function:

size_t PLearn::new_write_raw_data_as ( FILE *  out,
real vec,
int  l,
unsigned char  data_type 
)

Definition at line 806 of file pl_io.cc.

References is_missing().

Referenced by new_write_compressed().

{
    size_t nbytes = 0; // nbytes written
    switch(data_type)
    {
    case 1:
        nbytes = l;
        while(l--)
        {
            real val = *vec++;
            if(is_missing(val))
                putc(0x80,out);
            else
                putc((unsigned char)static_cast<signed char>(val),out);
        }
        break;
    case 2:
        nbytes = l*sizeof(float);
        while(l--)
        {
            float val = static_cast<float>(*vec++);
            fwrite(&val,sizeof(float),1,out);
        }
        break;      
    case 3:
        nbytes = l*sizeof(double);
        while(l--)
        {
            double val = static_cast<double>(*vec++);
            fwrite(&val,sizeof(double),1,out);
        }
        break;
    }
    return nbytes;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PPath PLearn::newFilename ( const PPath &  directory = "/tmp/",
const string &  prefix = "",
bool  is_directory = false 
)

Returns a temporary file (or directory) name suitable for a unique (one time) use.

If provided, 'prefix' will be give the first characters of the file (or directory).

< save in current dir

Definition at line 536 of file fileutils.cc.

References PLearn::PPath::absolute(), PLERROR, remove_trailing_slash(), and rm().

Referenced by PLearn::TmpFilenames::addFilename(), PLearn::LocallyPrecomputedVMatrix::build_(), PLearn::MatlabInterface::eigs_r11(), PLearn::FilterSplitter::getSplit(), PLearn::MatlabInterface::launch(), PLearn::MatlabInterface::launchAndWaitFor(), and PLearn::FieldConvertCommand::run().

{
#if defined(_MINGW_) || (defined(WIN32) && !defined(__CYGWIN__))
    //PLERROR("This call is not yet implemented for this platform");
    char* tmpfilename = tempnam(directory.absolute().c_str(), prefix.c_str());
#else
    // TODO Could probably make a better implementation.
    const string tmpdirname = remove_trailing_slash(directory.absolute());
    const int length = int(tmpdirname.length() + 1 + prefix.length() + 6 + 1);
    char* tmpfilename = new char[length];
    if (tmpdirname=="") 
        sprintf(tmpfilename,"%sXXXXXX",prefix.c_str());
    else
        sprintf(tmpfilename,"%s/%sXXXXXX",tmpdirname.c_str(),prefix.c_str());
    int fd = mkstemp(tmpfilename);
    if (fd == -1)
        PLERROR("In newFilename - Could not create temporary file");
    // Close the file descriptor, since we are not using it.
    close(fd);
#endif
    if(!tmpfilename)
        PLERROR("In newFilename - Could not obtain temporary file name");
    if (is_directory) {
        // Defeats the purpose of creating a temporary file, but who cares?
        PLearn::rm(tmpfilename);
        PR_MkDir(tmpfilename, 0777);
    }
    return tmpfilename;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat * PLearn::newIndexedMatArray ( int  n,
Mat &  m,
int  indexcolumn 
)

Returns an array of n matrices, that are submatrices of m Such that marray[i] contains all the rows of m that had value i in their indexcolumn. The matrices of the returned array do not contain the indexcolumn Side effect: rows of m are sorted according to indexcolumn

Definition at line 91 of file Mat.cc.

References PLearn::TMat< T >::column(), fast_exact_is_equal(), PLearn::TMat< T >::length(), n, PLERROR, sortRows(), PLearn::TMat< T >::subMatColumns(), PLearn::TMat< T >::subMatRows(), and PLearn::TMat< T >::width().

{
    if(indexcolumn!=0 && indexcolumn!=m.width()-1)
        PLERROR("In newIndexedMatArray(int n, const Mat& m, int indexcolumn): indexcolumn must be either the first or the last column of the matrix");
    sortRows(m, indexcolumn);
    Mat inputs, classnums;
    if(indexcolumn==0)
    {
        inputs = m.subMatColumns(1,m.width()-1);
        classnums = m.column(0);
    }
    else // indexcolumn is last column
    {
        inputs = m.subMatColumns(0,m.width()-1);
        classnums = m.column(m.width()-1);      
    }
    if(!fast_exact_is_equal(classnums(0,0),                    0)    ||
       !fast_exact_is_equal(classnums(classnums.length()-1,0), n-1))
        PLERROR("In newIndexedMatArray(int n, const Mat& m, int indexcolumn) Values in the indexcolumn should range from 0 to n-1");

    Mat* marray = new Mat[n];
    int pos = 0;
    for(int classnum=0; classnum<n; classnum++)
    {
        int startpos = pos;
        while(pos<classnums.length() && int(classnums(pos,0))==classnum)
            pos++;
        marray[classnum] = inputs.subMatRows(startpos,pos-startpos);
    }
    return marray;
}

Here is the call graph for this function:

Mat * PLearn::newMatArray ( int  n)

Definition at line 78 of file Mat.cc.

References n.

{
    return new Mat[n];
}
Mat * PLearn::newMatArray ( int  n,
int  the_length,
int  the_width 
)

Definition at line 83 of file Mat.cc.

References i, and n.

{
    Mat* marray = new Mat[n];
    for (int i=0; i<n; i++)
        marray[i].resize(the_length,the_width);
    return marray;
}
Object* PLearn::newObject ( const string &  representation) [inline]

Creates a new object according to the given representation.

This actually calls readObject on a PStream obtained with openString, so anything understandable by readObject can be used here

Definition at line 1164 of file Object.h.

References in, openString(), PLearn::PStream::plearn_ascii, and readObject().

Referenced by PLearn::VVMatrix::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::VVMatrix::createPreproVMat(), PLearn::NNet::getCost(), getDataSet(), readObject(), PLearn::VerifyGradientCommand::run(), and PLearn::PLearner::use().

{
    PStream in = openString(representation, PStream::plearn_ascii);
    return readObject(in);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Object * PLearn::newObjectFromClassname ( const string &  classname)

Definition at line 1048 of file Object.cc.

References PLearn::TypeFactory::instance(), and PLearn::TypeFactory::newObject().

Referenced by PLearn::PythonObjectWrapper::newCPPObj().

{
    return TypeFactory::instance().newObject(classname);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PPointableSet* PLearn::newSet ( ) [inline]

Definition at line 83 of file Set.h.

{ return new PPointableSet; };
Vec * PLearn::newVecArray ( int  n)

Definition at line 65 of file Mat.cc.

References n.

{
    return new Vec[n];
}
Vec * PLearn::newVecArray ( int  n,
int  the_length 
)

Definition at line 70 of file Mat.cc.

References i, and n.

{
    Vec* varray = new Vec[n];
    for(int i=0; i<n; i++)
        varray[i].resize(the_length);
    return varray;
}
Var PLearn::nll_general_gaussian ( Var  tangent_plane_var,
Var  mu_var,
Var  sn_var,
Var  neighbors_var,
real  log_L,
bool  use_mu,
int  mu_nneighbors 
) [inline]

Definition at line 105 of file NllGeneralGaussianVariable.h.

Referenced by PLearn::NonLocalManifoldParzen::build_().

{
    return new NllGeneralGaussianVariable(tangent_plane_var & mu_var & sn_var & neighbors_var,log_L, use_mu, mu_nneighbors);
}

Here is the caller graph for this function:

Var PLearn::nll_neighborhood_weights ( Var  neighbor_nlls,
Var  neighbor_indexes,
int  n,
real  alpha 
) [inline]

Definition at line 131 of file NLLNeighborhoodWeightsVariable.h.

 { 
     return new NLLNeighborhoodWeightsVariable(neighbor_nlls, neighbor_indexes, n, alpha); 
 }
Var PLearn::nll_semispherical_gaussian ( Var  tangent_plane_var,
Var  mu_var,
Var  sm_var,
Var  sn_var,
Var  neighbors_dist_var,
Var  p_target_var,
Var  p_neighbors_var,
Var  noise,
Var  mu_noisy,
bool  use_noise = false,
real  epsilon = 1e-6,
real  min_p_x = 0,
int  mu_n_neighbors = -1 
) [inline]

Definition at line 93 of file NllSemisphericalGaussianVariable.h.

Referenced by PLearn::GaussianContinuum::build_(), and PLearn::GaussianContinuumDistribution::build_().

{
    return new NllSemisphericalGaussianVariable(tangent_plane_var & mu_var & sm_var & sn_var & neighbors_dist_var & p_target_var & p_neighbors_var & noise & mu_noisy,use_noise, epsilon, min_p_x, mu_n_neighbors);
}

Here is the caller graph for this function:

Var PLearn::no_bprop ( Var  v,
real gradient_scaling_factor 
) [inline]

copy its argument but block gradient completely or partially

Definition at line 91 of file learners_experimental/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
Var PLearn::no_bprop ( Var  v,
real  gradient_scaling_factor = 0.0 
) [inline]

copy its argument but block gradient completely or partially

Definition at line 91 of file var/NoBpropVariable.h.

Referenced by PLearn::TangentLearner::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), and PLearn::EntropyContrastLearner::build_().

{ return new NoBpropVariable(v,gradient_scaling_factor); }

Here is the caller graph for this function:

PLearn::NODEEPCOPY ( FILE *  )

Support for generic deep copying.

Deep copying is defined for objects in the following manner:

  • copy constructors should always do a shallow copy
  • a public method OBJTYPE* deepCopy(CopiesMap& copies) const should be defined to allow deepCopying
  • the deepCopy method should be virtual for classes that are designed to be subclassed Take a close look at the Object class in Object.h to see how this is done. Types that do not require deep copy. Pairs handle deepCopying by distributing it to each element
Var PLearn::nondiag ( Var  v) [inline]

Definition at line 79 of file NonDiagVariable.h.

Referenced by PLearn::DiverseComponentAnalysis::build_().

{ return new NonDiagVariable(v); }

Here is the caller graph for this function:

VarArray PLearn::nonInputParentsOfPath ( VarArray  inputs,
VarArray  outputs 
)

Isn't this useless? as we have a constructor of VarArray from Var that should be called automatically !!!???? (Pascal)

inline VarArray propagationPath(const VarArray& inputs, const Var& output) { return propagationPath(inputs, VarArray(output); }

returns the set of all the direct parents of the vars on the path from inputs to outputs. (inputs are not included, neither are the direct parents of inputs unless they are also direct parents of other Vars in the path)

Definition at line 1142 of file VarArray.cc.

References PLearn::VarArray::clearMark(), PLearn::VarArray::parents(), propagationPath(), and PLearn::VarArray::setMark().

Referenced by PLearn::UnfoldedFuncVariable::build_(), PLearn::SumOverBagsVariable::build_(), PLearn::SumOfVariable::build_(), PLearn::Function::operator()(), and propagationPathToParentsOfPath().

{
    //cout<<"start nonInputParentsOfPath(...)"<<endl;
    VarArray proppath = propagationPath(inputs, outputs);
    inputs.setMark();
    VarArray non_input_parents = proppath.parents();
    inputs.clearMark();
    //cout<<"stop nonInputParentsOfPath(...)"<<endl;
    return non_input_parents;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VarArray PLearn::nonInputSources ( const VarArray &  inputs,
const VarArray &  outputs 
)

returns all sources that influence outputs except those that influence it only through inputs

Definition at line 1181 of file VarArray.cc.

References PLearn::VarArray::setMark(), PLearn::VarArray::sources(), and PLearn::VarArray::unmarkAncestors().

Referenced by PLearn::Function::build_().

{
    VarArray result;
    outputs.unmarkAncestors();
    inputs.setMark();
    result = outputs.sources();
    outputs.unmarkAncestors();
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::nonZero ( const TVec< T > &  vec)

returns a vector composed of the values of v that are different from 0;

Definition at line 2559 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), n, and w.

{
    T *v =vec.data();
    int n=0;
    for(int i=0;i<vec.length(); i++) if (v[i]!=0) n++;
    TVec<T> w(n);
    int j=0;
    for(int i=0;i<vec.length(); i++) if (v[i]!=0) w[j++]=v[i];
    return(w);
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::nonZeroIndices ( TVec< T >  v)

Definition at line 2236 of file TMat_maths_impl.h.

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

Referenced by PLearn::TMatTest::perform().

{
    int n=v.length();
    if (!n)
        return TVec<T>();
    TVec<T> indices(n);
    int ni=0;
    T* val = v.data();
    T* indx= indices.data();
    for (int i=0;i<n;i++)
        if (val[i]!=0)
            indx[ni++]=i;
    indices.resize(ni);
    return indices;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::nonZeroIndices ( TVec< bool v)

Definition at line 2254 of file TMat_maths_impl.h.

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

{
    int n=v.length();
    if (!n)
        return TVec<T>();
    TVec<T> indices(n);
    int ni=0;
    bool* val = v.data();
    T* indx= indices.data();
    for (int i=0;i<n;i++)
        if (val[i])
            indx[ni++]=i;
    indices.resize(ni);
    return indices;
}

Here is the call graph for this function:

bool PLearn::noReferenceToFile ( const PPath &  file)

Return 'true' iff there is no reference to a file.

Definition at line 1380 of file fileutils.cc.

References nReferencesToFile().

Referenced by PLearn::LocallyPrecomputedVMatrix::~LocallyPrecomputedVMatrix(), PLearn::TemporaryDiskVMatrix::~TemporaryDiskVMatrix(), and PLearn::TemporaryFileVMatrix::~TemporaryFileVMatrix().

{
    return nReferencesToFile(file) == 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::norm ( const TVec< T > &  vec,
double  n 
)

Definition at line 1044 of file TMat_maths_impl.h.

References mypow(), pownorm(), and sqrt().

Referenced by PLearn::SurfaceMesh::averageSphereRadius(), PLearn::SubsampleVariable::bprop(), PLearn::EntropyContrastLearner::build_(), closestPointOnTriangle(), PLearn::EntropyContrast::compute_extra_grad_wrt_df_dx(), PLearn::KernelProjection::computeOutput(), PLearn::IsomapTangentLearner::computeOutput(), PLearn::NGramDistribution::density(), diagonalizeSubspace(), distance(), PLearn::NormalizedDotProductKernel::evaluate(), PLearn::CosKernel::evaluate(), PLearn::CorrelationKernel::evaluate(), findSmallestEigenPairOfSymmMat(), PLearn::ProjectionErrorVariable::fprop(), GDFindSmallEigenPairs(), PLearn::VecStatsCollector::getCorrelation(), GramSchmidtOrthogonalization(), InversePowerIteration(), PLearn::ICP::iterate(), PLearn::ChemicalICP::minimizeWeightedDistance(), norm(), normalize(), PLearn::NeuralProbabilisticLanguageModel::output_gradient_verification(), PLearn::FeatureSetSequentialCRF::output_gradient_verification(), PLearn::FeatureSetNNet::output_gradient_verification(), PLearn::VarUtilsTest::perform(), PLearn::TMatTest::perform(), PowerIteration(), PLearn::GaussianProcessRegressor::QFormInverse(), SolveLinearSymmSystemByCG(), subsample(), SymmMatNullSpaceByInversePowerIteration(), PLearn::WPLS::train(), PLearn::GaussianContinuum::train(), PLearn::EntropyContrast::train(), PLearn::Function::verifyGradient(), and PLearn::SurfaceMesh::writeVRMLCoordinate3_().

{
    if(n==T(1.0))
        return pownorm(vec, T(1.0));
    else if(n==T(2.0))
        return sqrt(pownorm(vec,T(2.0)));
    else
        return mypow(pownorm(vec,n), T(1.0)/n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1055 of file TMat_maths_impl.h.

References norm().

{ return norm(vec,T(2.0)); }

Here is the call graph for this function:

Var PLearn::norm ( Var  input,
real  n 
)

Definition at line 81 of file Var_utils.cc.

References abs(), fast_exact_is_equal(), pow(), sqrt(), square(), and sum().

{
    if(fast_exact_is_equal(n,2.0))
        return sqrt(sum(square(input)));
    else if(fast_exact_is_equal(n, 1.0))
        return sum(abs(input));
    else
        return pow(sum(pow(abs(input),n)),1.0/n);
}

Here is the call graph for this function:

RandomVar PLearn::normal ( real  mean = 0,
real  standard_dev = 1,
int  d = 1,
real  minimum_standard_deviation = 1e-6 
)

Functions to build a normal distribution.

multivariate d-dimensional diagonal normal with NON-RANDOM and CONSTANT parameters (default means = 0, default standard deviations = 1) Actual variance is variance = minimum_variance + exp(log_variance)

Definition at line 712 of file RandomVar.cc.

References log(), PLERROR, and variance().

Referenced by calcNormal(), and closestPointOnTriangle().

{
    RandomVar means(d); 
    means->value->value.fill(mean);
    RandomVar logvar(d);
    real variance = standard_dev*standard_dev-
        minimum_standard_deviation*minimum_standard_deviation;
    if (variance<=0)
        PLERROR("normal: variance should be positive");
    logvar->value->value.fill((real)log((double)variance));
    return new DiagonalNormalRandomVariable(means,logvar,
                                            minimum_standard_deviation);
}

Here is the call graph for this function:

Here is the caller graph for this function:

RandomVar PLearn::normal ( RandomVar  mean,
RandomVar  log_variance,
real  minimum_standard_deviation = 1e-6 
)

diagonal normal with general parameters given by the provided RandomVar's. Actual variance is variance = minimum_variance + exp(log_variance)

Definition at line 729 of file RandomVar.cc.

{
    return new DiagonalNormalRandomVariable(mean,log_variance,
                                            minimum_standard_deviation);
}
real PLearn::normal_cdf ( real  x) [inline]

Definition at line 72 of file pl_erf.h.

References gauss_01_cum().

{ return gauss_01_cum(x); }

Here is the call graph for this function:

real PLearn::normal_density ( Vec  x,
Vec  mu,
real  sigma2 
) [inline]

Definition at line 53 of file distr_maths.h.

References log_of_normal_density(), and safeexp().

{ return safeexp(log_of_normal_density(x,mu,sigma2)); }

Here is the call graph for this function:

real PLearn::normal_density ( Vec  x,
Vec  mu,
Mat  evectors,
Vec  evalues,
real  remainder_evalue = 0 
) [inline]

Definition at line 66 of file distr_maths.h.

References log_of_normal_density(), and safeexp().

{ return safeexp(log_of_normal_density(x,mu,evectors,evalues,remainder_evalue)); }

Here is the call graph for this function:

real PLearn::normal_density ( Vec  x,
Vec  mu,
Vec  sigma2 
) [inline]

Definition at line 59 of file distr_maths.h.

References log_of_normal_density(), and safeexp().

{ return safeexp(log_of_normal_density(x,mu,sigma2)); }

Here is the call graph for this function:

real PLearn::normal_sample ( ) [inline]

Definition at line 98 of file random.h.

References gaussian_01().

Referenced by PLearn::GaussianContinuum::make_random_walk(), PLearn::GaussianContinuumDistribution::make_random_walk(), and PLearn::CompactVMatrix::perturb().

{ return gaussian_01(); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::normalize ( const TVec< T > &  vec,
double  n = 2 
)
template<class T >
void PLearn::normalize ( TMat< T > &  m)

substract mean, and divide by stddev (these are estimated globally)

Definition at line 5736 of file TMat_maths_impl.h.

References computeMeanAndStddev(), and PLearn::TMat< T >::width().

{
    TVec<T> meanvec(m.width());
    TVec<T> stddevvec(m.width());
    computeMeanAndStddev(m,meanvec,stddevvec);
    m -= meanvec;
    m /= stddevvec;
}

Here is the call graph for this function:

template<class T >
void PLearn::normalize ( TMat< T > &  m,
double  n 
)

divide each row by its n norm

Definition at line 5771 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), m, and normalize().

{
    for(int i=0; i<m.length(); i++)
    {
        TVec<T> m_i = m(i);
        normalize(m_i,n);
    }
}

Here is the call graph for this function:

VMat PLearn::normalize ( const VMat &  d,
const Vec &  meanvec,
const Vec &  stddevvec 
)

Subtracts mean and divide by stddev. meanvec and stddevvec can be shorter than d.width() (as we probably only want to 'normalize' the 'input' part of the sample, and not the 'target' that is typically present in the last columns).

Definition at line 589 of file VMat_basic_stats.cc.

References invertElements(), PLearn::TVec< T >::length(), negateElements(), PLearn::TVec< T >::subVec(), and PLearn::VMat::width().

{
    int inputsize = meanvec.length();

    Vec shiftvec(d.width(), 0.0);
    shiftvec.subVec(0,inputsize) << meanvec;
    negateElements(shiftvec);

    Vec scalevec(d.width(), 1.0);
    scalevec.subVec(0,inputsize) << stddevvec;
    invertElements(scalevec);

    return new ShiftAndRescaleVMatrix(d, shiftvec, scalevec);
}

Here is the call graph for this function:

VMat PLearn::normalize ( const VMat &  d,
int  inputsize,
int  ntrain 
)

Here, mean and stddev are estimated on d.subMat(0,0,ntrain,inputsize).

Definition at line 607 of file VMat_basic_stats.cc.

References computeMeanAndStddev(), normalize(), and PLearn::VMat::subMat().

{
    Vec meanvec(inputsize);
    Vec stddevvec(inputsize);
    computeMeanAndStddev(d.subMat(0,0,ntrain,inputsize), meanvec, stddevvec);
    return normalize(d, meanvec, stddevvec);
}

Here is the call graph for this function:

VMat PLearn::normalize ( VMat  d,
int  inputsize 
)

Definition at line 618 of file VMat_basic_stats.cc.

References PLearn::VMat::length(), and normalize().

{
    return normalize(d, inputsize, d.length());
}

Here is the call graph for this function:

VMat PLearn::normalize ( const VMat &  d,
int  inputsize 
)

Here, mean and stddev are estimated on the whole dataset d.

template<class T >
void PLearn::normalizeColumns ( const TMat< T > &  m)

Divides each column by the sum of its elements.

Definition at line 5759 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), j, sum(), w, and PLearn::TMat< T >::width().

Referenced by PLearn::LocalizedFeaturesLayerVariable::computeSubsets().

{
    int w = m.width();
    for(int j=0; j<w; j++)
    {
        TMat<T> v = m.column(j);
        v /= sum(v);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::normalizeDataSet ( Mat &  m)

Definition at line 125 of file databases.cc.

References computeMeanAndStddev(), and PLearn::TMat< T >::width().

Referenced by loadBreastCancerWisconsin(), loadDiabetes(), loadHousing(), loadLetters(), and loadPimaIndians().

{
    Vec meanvec(m.width());
    Vec stddevvec(m.width());
    computeMeanAndStddev(m,meanvec,stddevvec);
    m -= meanvec;
    m /= stddevvec;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::normalizeDataSets ( Mat &  training_set,
Mat &  validation_set,
Mat &  test_set 
)

Definition at line 76 of file databases.cc.

References computeMeanAndStddev(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

Referenced by loadATT800(), loadBreastCancer(), loadDiabetes(), loadLetters(), and splitTrainValidTest().

{
    int inputsize = training_set.width()-1;
    Mat training_inputs = training_set.subMatColumns(0,inputsize);
    Vec meanvec(inputsize);
    Vec stddevvec(inputsize);
    computeMeanAndStddev(training_inputs, meanvec, stddevvec);
    training_inputs -= meanvec;
    training_inputs /= stddevvec;
    Mat validation_inputs = validation_set.subMatColumns(0,inputsize);
    validation_inputs -= meanvec;
    validation_inputs /= stddevvec;
    Mat test_inputs = test_set.subMatColumns(0,inputsize);
    test_inputs -= meanvec;
    test_inputs /= stddevvec;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::normalizeDataSets ( VMat &  training_set,
VMat &  validation_set,
VMat &  test_set 
)

Definition at line 93 of file databases.cc.

References computeMeanAndStddev(), PLearn::VMat::subMatColumns(), and PLearn::VMat::width().

{
    int inputsize = training_set.width()-1;
    Mat training_inputs = training_set.subMatColumns(0,inputsize);
    Vec meanvec(inputsize);
    Vec stddevvec(inputsize);
    computeMeanAndStddev(training_inputs, meanvec, stddevvec);
    training_inputs -= meanvec;
    training_inputs /= stddevvec;
    Mat validation_inputs = validation_set.subMatColumns(0,inputsize);
    validation_inputs -= meanvec;
    validation_inputs /= stddevvec;
    Mat test_inputs = test_set.subMatColumns(0,inputsize);
    test_inputs -= meanvec;
    test_inputs /= stddevvec;
}

Here is the call graph for this function:

void PLearn::normalizeDataSets ( Mat &  training_set,
Mat &  test_set 
)

normalize both training_set and test_set according to mean and stddev computed on training_set

Definition at line 111 of file databases.cc.

References computeMeanAndStddev(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

{
    int inputsize = training_set.width()-1;
    Mat training_inputs = training_set.subMatColumns(0,inputsize);
    Vec meanvec(inputsize);
    Vec stddevvec(inputsize);
    computeMeanAndStddev(training_inputs, meanvec, stddevvec);
    training_inputs -= meanvec;
    training_inputs /= stddevvec;
    Mat test_inputs = test_set.subMatColumns(0,inputsize);
    test_inputs -= meanvec;
    test_inputs /= stddevvec;
}

Here is the call graph for this function:

template<class T >
void PLearn::normalizeRows ( const TMat< T > &  m)

Divides each row by the sum of its elements.

Definition at line 5747 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), m, and sum().

{
    int l = m.length();
    for(int i=0; i<l; i++)
    {
        TVec<T> v = m(i);
        v /= sum(v);
    }
}

Here is the call graph for this function:

void PLearn::notConvertible ( )

Definition at line 14 of file object_conversions.cc.

References endl(), isConvertibleToObjectPtr(), m, and x.

Referenced by main().

{
  int x = 0;
  int* y = 0;
  Vec v;
  Mat m;
  Array<int> aint;
  TVec<int> vint;
  PPointable* p = 0;
  Storage<int> stor;
  PP<PLearn::Storage<int> > ppstor;

  cout << "*** SHOULD NOT BE CONVERTIBLE: ***" << endl;
  cout << "isConvertibleToObjectPtr(int)        : " << isConvertibleToObjectPtr(x)      << endl;
  cout << "isConvertibleToObjectPtr(int*)       : " << isConvertibleToObjectPtr(y)      << endl;
  cout << "isConvertibleToObjectPtr(Vec)        : " << isConvertibleToObjectPtr(v)      << endl;
  cout << "isConvertibleToObjectPtr(Mat)        : " << isConvertibleToObjectPtr(m)      << endl;
  cout << "isConvertibleToObjectPtr(Array<int>) : " << isConvertibleToObjectPtr(aint)   << endl;
  cout << "isConvertibleToObjectPtr(TVec<int>)  : " << isConvertibleToObjectPtr(vint)   << endl;
  cout << "isConvertibleToObjectPtr(PPointable*): " << isConvertibleToObjectPtr(p)      << endl;
  cout << "isConvertibleToObjectPtr(Storage)    : " << isConvertibleToObjectPtr(stor)   << endl;
  cout << "isConvertibleToObjectPtr(PP<Storage>): " << isConvertibleToObjectPtr(ppstor) << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::notIndexable ( )

Definition at line 74 of file object_conversions.cc.

References endl(), indexableObjectSize(), m, u, and x.

Referenced by main().

{
  int x = 0;
  int* y = 0;
  Vec v;
  Mat m;
  Array<int> aint;
  TVec<int> vint;
  PPointable* p = 0;
  Storage<int> stor;
  PP<PLearn::Storage<int> > ppstor;
  Object* u = 0;
  StatsCollector sc;
  PP<StatsCollector> ppsc = new StatsCollector;
  StatsCollector*    psc  = ppsc;
  const StatsCollector* cpsc = ppsc;

  cout << endl << "*** INDEXABLE SIZE SHOULD BE ZERO: ***" << endl;
  cout << "indexableObjectSize(int)                   : " << indexableObjectSize(x)    << endl
       << "indexableObjectSize(int*)                  : " << indexableObjectSize(y)    << endl
       << "indexableObjectSize(Vec)                   : " << indexableObjectSize(v)    << endl
       << "indexableObjectSize(Array<int>)            : " << indexableObjectSize(aint) << endl
       << "indexableObjectSize(PPointable*)           : " << indexableObjectSize(p)    << endl
       << "indexableObjectSize(Storage<int>)          : " << indexableObjectSize(stor) << endl
       << "indexableObjectSize(Object*)               : " << indexableObjectSize(u)    << endl
       << "indexableObjectSize(StatsCollector)        : " << indexableObjectSize(sc)   << endl
       << "indexableObjectSize(PP<StatsCollector>)    : " << indexableObjectSize(ppsc) << endl
       << "indexableObjectSize(StatsCollector*)       : " << indexableObjectSize(psc)  << endl
       << "indexableObjectSize(const StatsCollector*) : " << indexableObjectSize(cpsc) << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int PLearn::nReferencesToFile ( const PPath &  file)

Return the number of references to a file.

Definition at line 1388 of file fileutils.cc.

References PLearn::PPath::canonical(), count_refs_to_file, and PLearn::PPath::isEmpty().

Referenced by noReferenceToFile().

{
    if (file.isEmpty())
        return 0;
    string s = file.canonical();
    if (count_refs_to_file.find(s) != count_refs_to_file.end())
        return count_refs_to_file[s];
    else
        return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::numericType ( const char *  mot)

assigns a code to a "word"

Definition at line 244 of file TypesNumeriques.cc.

References compactRepresentation(), i, looksNumeric(), NT_NOT_NUMERIC, NT_PERCENT, NT_UNKNOWN_NUMERIC_TYPE, PLearn::tRule::pattern, and rules.

{
    if (looksNumeric(mot))
    {
        int classe=0;
        char t[128];
        bool pourcent=false;
        strcpy(t,mot);

        compactRepresentation(t); 

        // skips the # in the begining

        if (char *tt= strchr(t,'%')) 
            *tt=0, pourcent = true; // delete trailing %

        for (int i=0; (rules[i].pattern[0]) && (!classe); i++)
            if (strcmp(rules[i].pattern,t)==0) classe = rules[i].attributs;

        if (pourcent) classe += NT_PERCENT;

        return classe ?  classe : NT_UNKNOWN_NUMERIC_TYPE;
    }
    else return NT_NOT_NUMERIC;
}

Here is the call graph for this function:

template<typename T >
int PLearn::numpyType ( )

Definition at line 478 of file PythonObjectWrapper.h.

References PLERROR.

{
    PLERROR("in numpyType: no numpy equivalent to C++ type %s",
            TypeTraits<T*>::name().c_str());
    return -1; //shut up compiler
}
template<>
int PLearn::numpyType< bool > ( )

Definition at line 402 of file PythonObjectWrapper.cc.

{ return NPY_BOOL; }
template<>
int PLearn::numpyType< double > ( )

Definition at line 414 of file PythonObjectWrapper.cc.

{ return NPY_DOUBLE; }
template<>
int PLearn::numpyType< float > ( )

Definition at line 413 of file PythonObjectWrapper.cc.

{ return NPY_FLOAT; }
template<>
int PLearn::numpyType< long double > ( )

Definition at line 415 of file PythonObjectWrapper.cc.

{ return NPY_LONGDOUBLE; }
template<>
int PLearn::numpyType< signed char > ( )

Definition at line 403 of file PythonObjectWrapper.cc.

{ return NPY_BYTE; }
template<>
int PLearn::numpyType< signed int > ( )

Definition at line 407 of file PythonObjectWrapper.cc.

{ return NPY_INT; }
template<>
int PLearn::numpyType< signed long > ( )

Definition at line 409 of file PythonObjectWrapper.cc.

{ return NPY_LONG; }
template<>
int PLearn::numpyType< signed long long > ( )

Definition at line 411 of file PythonObjectWrapper.cc.

{ return NPY_LONGLONG; }
template<>
int PLearn::numpyType< signed short > ( )

Definition at line 405 of file PythonObjectWrapper.cc.

{ return NPY_SHORT; }
template<>
int PLearn::numpyType< unsigned char > ( )

Definition at line 404 of file PythonObjectWrapper.cc.

{ return NPY_UBYTE; }
template<>
int PLearn::numpyType< unsigned int > ( )

Definition at line 408 of file PythonObjectWrapper.cc.

{ return NPY_UINT; }
template<>
int PLearn::numpyType< unsigned long > ( )

Definition at line 410 of file PythonObjectWrapper.cc.

{ return NPY_ULONG; }
template<>
int PLearn::numpyType< unsigned long long > ( )

Definition at line 412 of file PythonObjectWrapper.cc.

{ return NPY_ULONGLONG; }
template<>
int PLearn::numpyType< unsigned short > ( )

Definition at line 406 of file PythonObjectWrapper.cc.

{ return NPY_USHORT; }
real PLearn::oEM ( ConditionalExpression  conditional_expression,
RVArray  parameters_to_learn,
VMat  distr,
int  n_samples,
int  max_n_iterations,
real  relative_improvement_threshold = 0.001,
bool  compute_final_train_NLL = true 
)
real PLearn::oEM ( ConditionalExpression  conditional_expression,
RVArray  parameters_to_learn,
VMat  distr,
int  n_samples,
Optimizer &  MStepOptimizer,
int  max_n_iterations,
real  relative_improvement_threshold = 0.001,
bool  compute_final_train_NLL = true 
)
int PLearn::old_plearn_main ( int  argc,
char **  argv 
)

Definition at line 502 of file old_plearn_main.cc.

References cross_valid(), endl(), exitmsg(), PLearn::PLMPI::finalize(), getDataSetHelp(), getMultipleModelAliases(), i, PLearn::PLMPI::init(), isfile(), seed(), stringvector(), toint(), train_and_test(), usage(), and use().

{
    PLMPI::init(&argc, &argv);

    seed();

    if(argc<2)
        usage();
 
    string command = argv[1]; // train, test, help, ....

    if(command=="train")
    {
        vector<string> modelaliases = getMultipleModelAliases(argv[2]);
        string trainalias = argv[3];
        vector<string> testaliases = stringvector(argc-4, argv+4);
        // check for possible wildcards at the end of model alias
        for(unsigned int i=0;i<modelaliases.size();i++)
        {
            cout<<"*** Doing job for alias : "<< modelaliases[i]<<endl;
            train_and_test(modelaliases[i], trainalias, testaliases);
        }
    }
    else if(command=="cross")
    {
        if(argc<4)
            usage();
        int kval=toint(argv[2]);
        vector<string> modelaliases = getMultipleModelAliases(argv[3]);
        string trainalias = argv[4];
        for(unsigned int i=0;i<modelaliases.size();i++)
        {
            cout<<"*** Doing job for alias : "<< modelaliases[i]<<endl;
            //PLERROR("J'ai mis en commentaire cross_valid, parce que la version chek-inee ne compile pas... (Pascal)");
            cross_valid(modelaliases[i], trainalias, kval);
        }
    }
    else if(command=="use")
    {
        vector<string> modelaliases = getMultipleModelAliases(argv[2]);
        string datasetalias = argv[3];
     
        for(unsigned int i=0;i<modelaliases.size();i++)
        {
            cout<<"*** Doing job for alias : "<< modelaliases[i]<<endl;
            use(modelaliases[i], datasetalias);
        }
    }
    else if(command=="help")
    {
        string aboutwhat = argv[2];
        if(aboutwhat=="datasets")
            cout << getDataSetHelp();
        else
            displayObjectHelp(cout, aboutwhat);
    }
    else if(command=="listmodels")
    {
        if(!isfile("model.aliases"))
            exitmsg("Problem: No model.aliases file in current directory");
        string mod;
        if(argc==2)
            mod="*";
        else 
            mod=argv[2];
        vector<string> ali = getMultipleModelAliases(mod);
        cout<<"Model aliases found in model.aliases:"<<endl;
        for(unsigned int i=0;i<ali.size();i++)
            cout<<ali[i]<<endl;
    }

    PLMPI::finalize();
    return 0;

}

Here is the call graph for this function:

void PLearn::OldDisplayVarGraph ( const VarArray &  outputs,
bool  display_values,
real  boxwidth,
const char *  the_filename,
bool  must_wait,
VarArray  display_only_these 
)

Definition at line 598 of file DisplayUtils.cc.

References PLearn::TmpFilenames::addFilename(), PLearn::VarArray::ancestors(), PLearn::TVec< T >::append(), center(), PLearn::GhostScript::centerShow(), PLearn::VarArray::clearMark(), PLearn::TVec< T >::contains(), PLearn::GhostScript::drawArrow(), PLearn::GhostScript::drawBox(), PLearn::TMat< T >::fill(), i, j, PLearn::Var::length(), PLearn::Variable::nvars, openString(), PLearn::VarArray::parents(), PLearn::PStream::raw_ascii, PLearn::VarArray::setMark(), PLearn::TVec< T >::size(), PLearn::VarArray::sources(), PLearn::VarArray::unmarkAncestors(), PLearn::GhostScript::usefont(), PLearn::Var::width(), and x.

{
  // parameters controlling appearance...
  real deltay = 100;
  real boxheight = 50;

  char filename[100];
  if(the_filename)
    strcpy(filename, the_filename);
  else
  {
    TmpFilenames tmpnam;
    strcpy(filename, tmpnam.addFilename().c_str());
  }
  
  Mat center(Variable::nvars+1,2);
  center.fill(FLT_MAX);
  
  int n_display_only_these = display_only_these.size();
  bool display_all = n_display_only_these==0;

  // find sources of outputs which are not in the outputs array:
  outputs.unmarkAncestors();
  VarArray sources = outputs.sources();
  outputs.unmarkAncestors();
  // We dont want any source Var that is in outputs to be in sources so we remove them:
  outputs.setMark();
  VarArray nonoutputsources;
  for(int i=0; i<sources.size(); i++)
    if(!sources[i]->isMarked() && (display_all || display_only_these.contains(sources[i])))
      nonoutputsources.append(sources[i]);
  sources = nonoutputsources;
  outputs.clearMark();
  
  // Find the maximum number of vars in a level...
  int maxvarsperlevel = sources.size();
  sources.setMark();
  VarArray varray = outputs;
  while(varray.size()>0)
  {
    if(varray.size()>maxvarsperlevel)
      maxvarsperlevel = varray.size();
    varray.setMark(); // so that these don't get put in subsequent parents() calls
    VarArray parents;
    for(int i=0; i<varray.size(); i++)
      parents &= varray[i]->parents();
    varray = VarArray();
    for (int i=0;i<parents.size();i++)
      if(display_all || display_only_these.contains(parents[i]))
        varray &= parents[i];
  }
  sources.setMark();

  real usewidth = (maxvarsperlevel+1)*(boxwidth+boxheight);

  // Place everything but the sources starting from outputs at the bottom

  outputs.unmarkAncestors();

  real y = boxheight;
  varray = outputs;
  
  while(varray.size()>0)
    {
      // varray.setMark(); // so that these don't get put in subsequent parents() calls
      VarArray parents;
      int nvars = varray.size();
      for(int i=0; i<nvars; i++)
        {
          Var v = varray[i];
          center(v->varnum,0) = usewidth*(i+1)/(nvars+1);
          center(v->varnum,1) = y;                
          // bool marked = v->isMarked();
          // v->clearMark();
          VarArray parents_i = v->parents();
          for (int j=0;j<parents_i.size();j++)
            if((display_all || display_only_these.contains(parents_i[j])) && !parents.contains(parents_i[j]))
              parents &= parents_i[j];
        }
      varray = parents;
      y += deltay;
    }
  // now place the sources
  int nvars = sources.size();
  for(int i=0; i<nvars; i++)
    {
      Var v = sources[i];
      center(v->varnum,0) = usewidth*(i+1)/(nvars+1);
      center(v->varnum,1) = y;                
    }

  outputs.unmarkAncestors();
  if (display_all)
  {
    VarArray ancestors = outputs.ancestors();
    outputs.unmarkAncestors();   
    varray = ancestors;
  }
  else varray = display_only_these;

  // Compute the bounding box:
  real min_x = FLT_MAX;
  real min_y = FLT_MAX;
  real max_x = -FLT_MAX;
  real max_y = -FLT_MAX;

  for(int i=0; i<varray.size(); i++)
    {
      Var v = varray[i];
      real x = center(v->varnum,0);
      real y_ = center(v->varnum,1);
      if(x<min_x)
        min_x = x;
      if(y_<min_y)
        min_y = y_;
      if(x>max_x)
        max_x = x;
      if(y_>max_y)
        max_y = y_;
    }
  min_x -= boxwidth/2;
  max_x += boxwidth/2;
  min_y -= boxheight/2;
  max_y += boxheight/2;

  // Start outputting to the file
  {
    // make it an eps file with the computed bounding box
    GhostScript gs(filename,min_x,min_y,max_x,max_y);

  // Now paint

  // gs.setlinewidth(1.0);

  for(int i=0; i<varray.size(); i++)
    {
      Var v = varray[i];
      real my_x = center(v->varnum,0);
      real my_y = center(v->varnum,1);

      // Display v
      gs.drawBox(my_x-boxwidth/2, my_y-boxheight/2, boxwidth, boxheight);
      char nameline[100];
      sprintf(nameline,"%s (%d,%d)",v->getName().c_str(), v->matValue.length(), v->matValue.width());

      string descr;
      PStream str_descr = openString(descr, PStream::raw_ascii, "w");
      str_descr << v;

      if(display_values)
        {
          gs.usefont("Times-Bold", 11.0);
          gs.centerShow(my_x, my_y+boxheight/4, descr.c_str());
          gs.usefont("Times-Roman", 10.0);
          gs.centerShow(my_x, my_y, nameline);
          gs.usefont("Courrier", 6.0);
          gs.centerShow(my_x, my_y-boxheight/5, v->value);
          gs.centerShow(my_x, my_y-boxheight/2.5, v->gradient);
        }
      else
        {
          gs.usefont("Times-Bold", 12.0);
          gs.centerShow(my_x, my_y+boxheight/4, descr.c_str());
          gs.usefont("Times-Roman", 11.0);
          gs.centerShow(my_x, my_y-boxheight/4, nameline);
        }

      // Display the arrows from the parents
      VarArray parents = v->parents();
      int nparents = parents.size();
      for(int p=0; p<nparents; p++)
        {
          Var parent = parents[p];
          if (display_all || display_only_these.contains(parent))
          {
            real parent_x = center(parent->varnum,0);
            real parent_y = center(parent->varnum,1);

            gs.drawArrow(parent_x, parent_y-boxheight/2, 
                         my_x+0.75*boxwidth*(real(p+1)/real(nparents+1)-0.5), 
                         my_y+boxheight/2);
          }
        }
    }
  outputs.unmarkAncestors();      
  }

  char command[1000];
  if (must_wait)
    sprintf(command,"gv %s",filename);
  else
    sprintf(command,"gv %s &",filename);

  system(command);

  if(the_filename==0)
    unlink(filename);
}

Here is the call graph for this function:

template<class T >
real PLearn::one_against_all_hinge_loss ( const TVec< T > &  output,
const int  target 
)

Definition at line 114 of file TMat_maths_impl.h.

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

Referenced by PLearn::IncrementalNNet::output_loss().

{
    int N = output.length();
    T total_hinge_loss = 0;
    if (N > 0) {
        T*  o = output.data();
        while(--N >= 0)
        {
            if (N==target)
                total_hinge_loss += hinge_loss(*o,1);
            else
                total_hinge_loss += hinge_loss(*o,-1);
            o++;
        }
    }
    return total_hinge_loss;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::one_against_all_hinge_loss_bprop ( const TVec< T > &  output,
const int  target,
TVec< T >  d_output 
)

Definition at line 138 of file TMat_maths_impl.h.

References d_hinge_loss(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), N, and PLearn::TVec< T >::resize().

Referenced by PLearn::IncrementalNNet::output_loss_gradient().

{
    int N = output.length();
    d_output.resize(N);
    if (N > 0) {
        T*  o = output.data();
        T*  d_o = d_output.data();
        //MNT old buggy code (opposite numbering of outputs):
        /*while(--N >= 0)
          {
          if (N==target)
          *d_o = d_hinge_loss(*o,1);
          else
          *d_o = d_hinge_loss(*o,-1);
          o++; d_o++;
          }
        */
        for( int i = 0; i < N; i++ ) {
            if ( i == target )
                *d_o = d_hinge_loss( *o, 1 );
            else
                *d_o = d_hinge_loss( *o, -1 );
            o++;
            d_o++;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::one_hot ( int  length,
int  hotpos,
coldvalue,
hotvalue 
)

Definition at line 1784 of file TMat_maths_impl.h.

References fill_one_hot().

{
    TVec<T> result(length);
    fill_one_hot(result, hotpos, coldvalue, hotvalue);
    return result;
}

Here is the call graph for this function:

Var PLearn::onehot ( int  the_length,
Var  hotindex,
real  coldvalue = 0.0,
real  hotvalue = 1.0 
) [inline]

Definition at line 86 of file OneHotVariable.h.

Referenced by PLearn::LinearInductiveTransferClassifier::build_().

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }

Here is the caller graph for this function:

VMat PLearn::onehot ( VMat  the_source,
int  nclasses,
real  cold_value = 0.0,
real  hot_value = 1.0,
int  index = -1,
bool  call_build_ = false 
) [inline]

Definition at line 107 of file OneHotVMatrix.h.

{ return new OneHotVMatrix(the_source, nclasses, cold_value, hot_value, index,
                           call_build_); }
Var PLearn::onehot_squared_loss ( Var  network_output,
Var  classnum,
real  coldval = 0.,
real  hotval = 1. 
) [inline]

Definition at line 88 of file OneHotSquaredLoss.h.

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::NeuralNet::build_(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), and PLearn::NNet::getCost().

{ 
    if (network_output->isVec())  
        return new OneHotSquaredLoss(network_output, classnum, coldval, hotval);
    else return new MatrixOneHotSquaredLoss(network_output, classnum, coldval, hotval);
}

Here is the caller graph for this function:

PStream PLearn::openFile ( const PPath &  filepath_,
PStream::mode_t  io_formatting,
const string &  openmode,
bool  err_if_dont_exist,
bool  make_dirs 
)

Given a filename, opens the file and returns a PStream that can be used to read and/or write to the file.

Parameters:
filepath_The filename to be opened. Slashes will automatically be converted to the path seperator of the underlying OS before opening the file.
io_formattingThe PStream formatting that will be used when reading/writing to the file. Common modes include PStream::raw_ascii (for a normal ascii text file) and PStream::plearn_ascii (for files in the PLearn serialization format).
openmodeThe mode (read/write/append) to open the file in. Use "r" for opening the file for reading, "w" for writing (overwrites the file if it exists), or "a" for appending to the file (creating it if it doesn't exist). The default is to open the file for reading ("r").
err_if_dont_existif true, will generate a PLERROR if the file don't exist when opened in read mode. Else, will return an empty PStream witch st->good() will return false.
make_dirsit true, will make the directory in filepath_

Definition at line 75 of file openFile.cc.

References PLearn::PPath::absolute(), PLearn::PPath::dirname(), force_mkdir(), isdir(), and PLERROR.

Referenced by PLearn::AsciiVMatrix::AsciiVMatrix(), PLearn::MultiInstanceVMatrix::build_(), PLearn::LIBSVMSparseVMatrix::build_(), PLearn::DictionaryVMatrix::build_(), PLearn::ConditionalDictionary::build_(), PLearn::AsciiVMatrix::build_(), PLearn::PyPLearnScript::close(), PLearn::VMatLanguage::compileFile(), PLearn::PLearnService::connectToServers(), countNonBlankLinesOfFile(), PLearn::VMatrix::getSavedFieldInfos(), PLearn::VMatrix::getSavedSizes(), PLearn::HTMLHelpGenerator::helpClasses(), PLearn::HTMLHelpGenerator::helpCommands(), PLearn::HelpSystem::helpEpilogueHTML(), PLearn::HTMLHelpGenerator::helpFunctions(), PLearn::HelpSystem::helpIndexHTML(), PLearn::HelpSystem::helpPrologueHTML(), load(), loadAscii(), loadAsciiSingleBinaryDescriptor(), loadFileAsString(), loadObject(), PLearn::VMatrix::loadStats(), PLearn::VMatrix::loadStringMapping(), PLearn::Cache< KeyType, ValueType >::loadValue(), PLearn::VMatrix::lockMetaDataDir(), PLearn::SequentialValidation::measureOptions(), PLearn::PPath::metaprotocolToMetapath(), parseSizeFromRemainingLines(), PLearn::VMatLanguage::preprocess(), readFileAndMacroProcess(), PLearn::ServerCommand::run(), PLearn::RunCommand::run(), PLearn::Redirect::run(), PLearn::ReadAndWriteCommand::run(), PLearn::RBMTrainer::run(), PLearn::HTMLHelpGenerator::run(), PLearn::FieldConvertCommand::run(), PLearn::ExtractOptionCommand::run(), PLearn::ConfigParsing::run(), save(), PLearn::VMatrix::saveAMAT(), PLearn::VMatrix::saveCMAT(), PLearn::VMatrix::saveFieldInfos(), PLearn::ChemicalICP::saveMatch(), PLearn::VMatrix::saveStats(), saveStringInFile(), PLearn::VMatrix::saveStringMappings(), PLearn::Cache< KeyType, ValueType >::saveValue(), PLearn::VMatrix::setSFIFFilename(), smartLoadObject(), PLearn::VMatLanguage::staticPreprocess(), PLearn::StringFieldMapping::StringFieldMapping(), PLearn::SupervisedDBN::train(), PLearn::PartSupervisedDBN::train(), PLearn::GaussPartSupervisedDBN::train(), vmatmain(), and PLearn::Molecule::writeToVRMLFile().

{
    const PPath filepath = filepath_.absolute();
    
    if(make_dirs)
        force_mkdir(filepath.dirname());

    PStream st;
    PRFileDesc* fd;
    if ((openmode == "r" || openmode == "a") && isdir(filepath))
        PLERROR("In openFile(..) - Cannot open this directory for reading or "
                "append (%s), it should be a file!", filepath.c_str());

    if (openmode == "r")
    {
        fd = PR_Open(filepath.c_str(), PR_RDONLY, 0666);
        if (!fd && err_if_dont_exist)
            PLERROR("openFile(\"%s\",\"%s\") failed.",filepath.c_str(), openmode.c_str());
        else if(!fd)
            return new PrPStreamBuf(0, 0);
        st = new PrPStreamBuf(fd, 0, true, false);
    }
    else if (openmode == "w")
    {
        fd = PR_Open(filepath.c_str(), PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE, 0666);
        if (!fd)
            PLERROR("openFile(\"%s\",\"%s\") failed.",filepath.c_str(), openmode.c_str());
        st = new PrPStreamBuf(0, fd, false, true);
    }
    else if (openmode == "a")
    {
        fd = PR_Open(filepath.c_str(), PR_WRONLY | PR_CREATE_FILE | PR_APPEND, 0666);
        if (!fd)
            PLERROR("openFile(\"%s\",\"%s\") failed.",filepath.c_str(), openmode.c_str());
        st = new PrPStreamBuf(0, fd, false, true);
    }
    else
        PLERROR("In openFile, invalid openmode=\"%s\" ",openmode.c_str());    
    
    st.setMode(io_formatting);
    return st;
}

Here is the call graph for this function:

PStream PLearn::openMPI ( int  peer_rank,
PStream::mode_t  io_formatting 
)

Definition at line 49 of file openMPI.cc.

References PLearn::PStream::setMode().

{
    PStream st = new MPIPStreamBuf(peer_rank);
    st.setMode(io_formatting);
    return st;
}

Here is the call graph for this function:

PStream PLearn::openSocket ( const string &  hostname,
int  port,
PStream::mode_t  io_formatting,
const int  timeout 
)

Opens a socket and returns an attached PStream.

Parameters:
hostnameThe name or IP address of the host to connect to.
portThe port to connect to.
io_formattingThe PStream formatting that will be used when reading/writing to the socket. Common modes include PStream::raw_ascii (for a normal ascii text file) and PStream::plearn_ascii (for files in the PLearn serialization format).
timeoutAmount of time to wait for a connection (in seconds) before giving up.

Definition at line 72 of file openSocket.cc.

References endl(), getPrErrorString(), PLERROR, and PLearn::PStream::setMode().

Referenced by PLearn::PLearnService::connectToServers(), and openUrl().

{
    PStream st;
    st.setMode(io_formatting);
  
    PRFileDesc* socket = PR_NewTCPSocket();

    if (!socket)
        PLERROR("openSocket: socket creation failed! (Maybe you ran out of file descriptors?)");

    // Look up the host name.
    PRHostEnt host;
    char buf[PR_NETDB_BUF_SIZE];
    if (PR_GetHostByName(hostname.c_str(), buf, sizeof(buf), &host) != PR_SUCCESS)
        PLERROR("openSocket(%s, %d) failed during host name lookup: %s",
                hostname.c_str(), port, getPrErrorString().c_str());

    // Iterate on every address for the host, until we can connect to one.
    int host_entry_index = 0;
    PRNetAddr address;
    while ((host_entry_index = PR_EnumerateHostEnt(host_entry_index, &host,
                                                   port, &address)) != 0)
    {
        if (PR_Connect(socket, &address, PR_SecondsToInterval(timeout))
                                                                == PR_SUCCESS)
        {
            return new PrPStreamBuf(socket, socket, true, true);
        } 
        else 
        {
#ifdef BOUNDCHECK
            string ip_adr = "Unknown IP address";
            if (PR_NetAddrToString(&address, buf, sizeof(buf)) == PR_SUCCESS)
                ip_adr = buf;
            MODULE_LOG << "Error trying to connect to host entry index "
                       << host_entry_index << " (" << ip_adr << "): "
                       << getPrErrorString() << endl;
#endif
        }
    }

    PLERROR("openSocket(%s, %d) failed while trying to connect: %s",
            hostname.c_str(), port, getPrErrorString().c_str());
    return st;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PStream PLearn::openString ( string &  s,
PStream::mode_t  io_formatting,
const string &  openmode 
)

Returns a PStream attached to the given string.

Parameters:
sThe string used as storage for stuff read from or written to the PStream.
io_formattingThe type of PStream formatting that will be used when reading/writing to the string. Common modes include PStream::raw_ascii (for a normal ascii text file) and PStream::plearn_ascii (for files in the PLearn serialization format).
openmodeThe mode (read/write/append) to open the string in. Use "r" for opening the string for reading, "w" for writing (overwrites the string), or "a" for appending to the string. The default is to open the string for reading ("r").

Definition at line 66 of file openString.cc.

References PLearn::PStream::setMode().

Referenced by PLearn::Object::asString(), PLearn::Object::asStringRemoteTransmit(), PLearn::PyPLearnScript::build_(), PLearn::ModuleTester::build_(), PLearn::VMatLanguage::compileString(), diff(), displayVarGraph(), PLearn::Plide::executePyPLearn(), PLearn::VMatLanguage::generateCode(), PLearn::StepwiseSelectionOracle::generateNewSearchset(), PLearn::Object::getOption(), PLearn::VMatLanguage::getOutputFieldNamesFromString(), PLearn::VecStatsCollector::getStat(), PLearn::StatsCollector::getStat(), PLearn::LiftStatsCollector::getStat(), PLearn::HelpSystem::helpPrologueHTML(), PLearn::Popen::launch(), lexical_cast(), PLearn::PyPLearnScript::load(), macroLoadObject(), main(), newObject(), OldDisplayVarGraph(), PLearn::PyPLearnScript::openScriptFile(), PLearn::TVec< PP< RegressionTreeNode > >::operator<<(), PLearn::TMat< pair< real, real > >::operator<<(), PLearn::TupleTest::perform(), PLearn::PLMathTest::perform(), PLearn::ObjectGraphIteratorTest::perform(), PLearn::InterfunctionXchgTest::perform(), PLearn::VMatLanguage::preprocess(), readAndMacroProcess(), PLearn::Molecule::readFromVRMLFile(), PLearn::RunCommand::run(), PLearn::PyPLearnScript::run(), PLearn::ExtractOptionCommand::run(), PLearn::Object::setOption(), smartLoadObject(), PLearn::VMatLanguage::staticPreprocess(), test_negchar(), test_read(), test_write(), test_write_unbuffered(), PLearn::LLC::train(), PLearn::LearnerCommand::train(), PLearn::MemoryStressTest::unary(), PLearn::BasicIdentityCallsTest::unary(), PLearn::OptionBase::writeIntoString(), and PLearn::LocallyPrecomputedVMatrix::~LocallyPrecomputedVMatrix().

{
    PStream st = new StringPStreamBuf(&s, openmode);
    st.setMode(io_formatting);
    return st;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PStream PLearn::openString ( const string &  s,
PStream::mode_t  io_formatting 
)

Definition at line 74 of file openString.cc.

References PLearn::PStream::setMode().

{
    PStream st = new StringPStreamBuf(&s, "r");
    st.setMode(io_formatting);
    return st;
}

Here is the call graph for this function:

PStream PLearn::openUrl ( const PPath &  url,
PStream::mode_t  io_formatting 
)

Given an url, open the url and return a PStream that can be used to read the content of the url.

Currently does not handle port numbers (as in http://foo.com:8080), the port is always assumed to be 80. Note that the PStream that is returned is not read-only: it is a direct stream from/to the host's port 80. Thus one might use it to write data on it, even though this is not the intended behavior.

Parameters:
urlThe url to be opened.
io_formattingThe PStream formatting that will be used when reading the url. Common modes include PStream::raw_ascii (for a normal ascii text file) and PStream::plearn_ascii (for files in the PLearn serialization format).

Definition at line 57 of file openUrl.cc.

References endl(), PLearn::PStream::flush(), PLearn::PStream::getline(), PLearn::PPath::hostname(), hostname(), openSocket(), PLASSERT, PLERROR, PLearn::PStream::raw_ascii, PLearn::PStream::setMode(), and PLearn::PStream::write().

{
    // Connect to host.
    string hostname = url.hostname();
    PStream sock = openSocket(hostname, 80, PStream::raw_ascii);
    // Ask for document.
    size_t path_start = url.find(hostname);
    string path_on_server = url.substr(path_start + hostname.size());
    PLASSERT( !path_on_server.empty() );
    string http_request = "GET " + path_on_server + " HTTP/1.0\n\n";
    MODULE_LOG << "HTTP request to " << hostname << ": " << http_request
               << endl;
    sock.write(http_request);
    sock.flush();
    // Get answer.
    string token;
    sock >> token;  // HTTP/x.y type of document.
    sock >> token;  // Return code.
    // The current code is very basic and not very forgiving: if the server
    // does not answer 200 (everything is ok), then an error is thrown.
    // Future improvements would include taking redirection codes into account.
    if (token != "200")
        PLERROR("In openUrl(%s) - Received return code %s instead of 200",
                url.c_str(), token.c_str());
    while (!token.empty())
        sock.getline(token); // Skip other headers.
    // Set the required IO formatting mode.
    sock.setMode(io_formatting);
    return sock;
}

Here is the call graph for this function:

template<class T , unsigned SizeBits, class Allocator >
bool PLearn::operator!= ( const SmallVector< T, SizeBits, Allocator > &  x,
const SmallVector< T, SizeBits, Allocator > &  y 
) [inline]

const SmallVector<T,SizeBits,Allocator>& y) { return !(x==y); }

Definition at line 182 of file SmallVector.h.

                                                                   { return !(x==y); }
template<class T , unsigned N, class TTrait >
bool PLearn::operator!= ( const TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
) [inline]

Other operators (should be defined in std::rel_ops, but does not work properly with gcc yet).

Definition at line 181 of file TinyVector.h.

{
    return !(x == y);
}
Var PLearn::operator!= ( Var  v1,
real  cte 
) [inline]

result[i] = 1 if v1[i]!=cte, 0 otherwise

Definition at line 81 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
Var PLearn::operator!= ( real  cte,
Var  v1 
) [inline]

result[i] = 1 if v1[i]!=cte, 0 otherwise

Definition at line 85 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
Var PLearn::operator!= ( Var  v1,
Var  v2 
)

Definition at line 180 of file Var_operators.cc.

References isequal().

{ return (1.0 - isequal(v1,v2) ); }

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator% ( const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 1661 of file TMat_maths_impl.h.

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

{
    if (v1.length() != v2.length())
        PLERROR("TVec<T> + TVec<T>: different lengths %d and %d",
                v1.length(), v2.length());
    TVec<T> v(v1.length());
    v << v1;
    v*=v2;
    return v;
}

Here is the call graph for this function:

template<class T >
Array<T> PLearn::operator& ( const Array< T > &  a,
const T &  elem 
)

Definition at line 106 of file Array_impl.h.

References a, PLearn::TVec< T >::append(), and PLearn::TVec< T >::size().

{
    Array<T> newarray(a.size(), a.size()+1);
    newarray = a;
    newarray.append(elem);
    return newarray;
}

Here is the call graph for this function:

Array<VMat> PLearn::operator& ( const VMat &  d1,
const VMat &  d2 
) [inline]

******************************** User-friendly VMat interface *

Definition at line 164 of file VMat.h.

{ return Array<VMat>(d1,d2); }
template<class T >
PRange<T> PLearn::operator& ( const PRange< T > &  r1,
const PRange< T > &  r2 
)

Intersection operator.

Definition at line 174 of file PRange.h.

References PLearn::PRange< T >::isEmpty(), PLearn::PRange< T >::lower(), max(), min(), and PLearn::PRange< T >::upper().

{
    if ( r1.isEmpty() || r2.isEmpty() )
        return PRange<T>();                      // empty range
    else
        return PRange<T>( max(r1.lower(), r2.lower()), min(r1.upper(), r2.upper()) );
}

Here is the call graph for this function:

Array<Ker> PLearn::operator& ( const Ker &  k1,
const Ker &  k2 
) [inline]

******************** inline Ker operators

Definition at line 304 of file Kernel.h.

{ return Array<Ker>(k1,k2); }
template<class T >
Array<T> PLearn::operator& ( const Array< T > &  a,
const Array< T > &  ar 
)

Definition at line 115 of file Array_impl.h.

References a, PLearn::TVec< T >::append(), and PLearn::TVec< T >::size().

{
    Array<T> newarray(a.size(), a.size()+ar.size());
    newarray = a;
    newarray.append(ar);
    return newarray;
}

Here is the call graph for this function:

template<class T >
Array< TMat<T> > PLearn::operator& ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

This will allow a convenient way of building arrays of Matrices by writing ex: m1&m2&m3.

Definition at line 218 of file Array_impl.h.

{ return Array< TMat<T> >(m1,m2); } 
template<class T >
TVec< T > PLearn::operator& ( const T &  x,
const TVec< T > &  v 
)

Definition at line 63 of file PExperiment.cc.

References PLearn::TVec< T >::size(), PLearn::TVec< T >::subVec(), and x.

{
    int l = v.size();
    TVec<T> res(1+l);
    res[0] = x;
    res.subVec(1,l) << v;
    return res;
}

Here is the call graph for this function:

StatsItArray PLearn::operator& ( const StatsIt &  statsit1,
const StatsIt &  statsit2 
) [inline]

Definition at line 425 of file StatsIterator.h.

{ return StatsItArray(statsit1,statsit2); }
template<class T >
Array<T> PLearn::operator& ( const T &  elem,
const Array< T > &  a 
)

Definition at line 90 of file Array_impl.h.

Referenced by PLearn::VarArray::operator&(), PLearn::StatsItArray::operator&(), and PLearn::RVInstanceArray::operator&&().

{ return Array<T>(elem) & a; }

Here is the caller graph for this function:

template<class T >
Array<T> PLearn::operator& ( const Array< T > &  a,
const vector< T > &  ar 
)

Definition at line 124 of file Array_impl.h.

References a, PLearn::TVec< T >::append(), and PLearn::TVec< T >::size().

{
    Array<T> newarray(a.size(), a.size() + ar.size());
    newarray = a;
    newarray.append(ar);
    return newarray;
}

Here is the call graph for this function:

template<class T >
Array< TVec<T> > PLearn::operator& ( const TVec< T > &  m1,
const TVec< T > &  m2 
) [inline]

This will allow a convenient way of building arrays of Matrices by writing ex: m1&m2&m3.

Definition at line 146 of file Array_impl.h.

{ return Array< TVec<T> >(m1,m2); } 
VarArray PLearn::operator& ( Var  v1,
Var  v2 
) [inline]

* To allow for easy building of VarArray *

Definition at line 307 of file VarArray.h.

{ return VarArray(v1,v2); }
template<class T >
Array<T>& PLearn::operator&= ( Array< T > &  a,
const vector< T > &  ar 
)

Definition at line 102 of file Array_impl.h.

References a, and PLearn::TVec< T >::append().

{ a.append(ar); return a; }

Here is the call graph for this function:

template<class T >
Array<T>& PLearn::operator&= ( Array< T > &  a,
const Array< T > &  ar 
)

Definition at line 98 of file Array_impl.h.

References a, and PLearn::TVec< T >::append().

{ a.append(ar); return a; }

Here is the call graph for this function:

template<class T >
Array<T>& PLearn::operator&= ( Array< T > &  a,
const T &  elem 
)

Definition at line 94 of file Array_impl.h.

References a, and PLearn::TVec< T >::append().

Referenced by PLearn::VarArray::operator&=(), and PLearn::StatsItArray::operator&=().

{ a.append(elem); return a; }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::operator* ( scalar,
const TVec< T > &  v 
)

Definition at line 1673 of file TMat_maths_impl.h.

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

{
    TVec<T> result(v.length());
    multiply(v,scalar,result);
    return result;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator* ( const TVec< T > &  v1,
v2 
)

Definition at line 1681 of file TMat_maths_impl.h.

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

{
    TVec<T> v(v1.length());
    multiply(v1,v2,v);
    return v;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator* ( const TMat< T > &  m,
const T &  scalar 
) [inline]

Definition at line 4606 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), multiply(), and PLearn::TMat< T >::width().

{
    TMat<T> result(m.length(),m.width());
    multiply(result, m, scalar);
    return result;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator* ( const T &  scalar,
const TMat< T > &  m 
) [inline]

Definition at line 4614 of file TMat_maths_impl.h.

{ return m * scalar;}
template<class T >
TMat<T> PLearn::operator* ( const TMat< T > &  m,
const TVec< T > &  v 
) [inline]

does an elementwise multiplication of every row by v

Definition at line 7217 of file TMat_maths_impl.h.

References PLearn::TMat< T >::copy().

{ TMat<T> res = m.copy(); res*=v; return res; }

Here is the call graph for this function:

RandomVar PLearn::operator* ( RandomVar  a,
RandomVar  b 
)

global functions

********************** GLOBAL FUNCTIONS ********************** //!<

Return a RandomVar that is the product of two RandomVar's. If a and b are matrices, this is a matrix product. If one of them is a vector it is interpreted as a column vector (nx1), but if both are vectors, this is a dot product (a is interpreted as a 1xn). The result contains a ProductRandomVariable, which can be "trained" by EM: if one of the two arguments is non-random and is considered to be a parameter, it can be learned (e.g. for implementing a linear regression).

Definition at line 408 of file RandomVar.cc.

References PLERROR.

{
    if (a->isScalar() || b->isScalar()); // scalar times something
    else if (a->isVec() && b->isVec()) // vec times vec
    {
        if (a->length()*a->width() != b->length()*b->width())
            PLERROR("In RandomVar operator*(RandomVar a, RandomVar b) cannot do a dot product between 2 vecs with different sizes");
    }
    else if (a->isRowVec()) // rowvec times mat
    {
        if (a->length() != b->width())
            PLERROR("In RandomVar operator*(RandomVar a, RandomVar b) in case rowvec times mat: a->length() != b->width()");
    }
    else if (b->isRowVec()) // mat times rowvec
    {
        if (b->length() != a->width())
            PLERROR("In RandomVar operator*(RandomVar a, RandomVar b) in case mat times rowvec: b->length() != a->width()");
    }
    else
        PLERROR("In RandomVar operator*(RandomVar a, RandomVar b) This case is not handled (but maybe it should be...)");

    return new ProductRandomVariable(a,b);
}
Var PLearn::operator* ( Var  v,
real  cte 
) [inline]

Definition at line 89 of file TimesConstantVariable.h.

{ 
    if(cte==1)
        return v;
    else
        return new TimesConstantVariable(v,cte); 
}
Var PLearn::operator* ( real  cte,
Var  v 
) [inline]

Definition at line 97 of file TimesConstantVariable.h.

{ return v*cte; }
Var PLearn::operator* ( Var  v1,
Var  v2 
)

element-wise multiplications

< v1 and v2 must have the same dimensions (it is checked by the constructor of TimesVariable)

Definition at line 143 of file Var_operators.cc.

{ 
    if(v2->isScalar())
        return new TimesScalarVariable(v1,v2);
    else if(v1->isScalar())
        return new TimesScalarVariable(v2,v1);
    else if(v2->isColumnVec())
        return new TimesColumnVariable(v1,v2);
    else if(v1->isColumnVec())
        return new TimesColumnVariable(v2,v1);
    else if(v2->isRowVec())
        return new TimesRowVariable(v1,v2);
    else if(v1->isRowVec())
        return new TimesRowVariable(v2,v1);
    else 
        return new TimesVariable(v1,v2); 
}
template<class T >
void PLearn::operator*= ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
)

Definition at line 1256 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if(vec1.size() != vec2.size())
        PLERROR("In operator*=, vec1 and vec2 vectors must have the same length");
#endif
    if (vec1.size() > 0 && vec2.size() > 0) {
        T* v1 = vec1.data();
        T* v2 = vec2.data();
        for(int i=0; i<vec1.length(); i++)
            v1[i] *= v2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::operator*= ( const TVec< T > &  vec,
factor 
)

Definition at line 1271 of file TMat_maths_impl.h.

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

{
    if (vec.size() > 0) {
        T* p = vec.data();
        int l = vec.length();
        for (int i=0;i<l;i++)
            *p++ *= factor;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::operator*= ( const TMat< T > &  m,
scalar 
)

Definition at line 5791 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T* m_i = m.data();
    int w = m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] *= scalar;
}

Here is the call graph for this function:

template<class T >
void PLearn::operator*= ( const TMat< T > &  m,
const TVec< T > &  v 
)

does an elementwise multiplication of every row by v

Definition at line 5844 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(m.width()!=v.length())
        PLERROR("IN operator*=(const TMat<T>& m, const TVec<T>& v) v must be as long as m is wide");
#endif
    T* m_i = m.data();
    T* vv = v.data();
    int w=m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] *= vv[j];
}

Here is the call graph for this function:

template<class T >
void PLearn::operator*= ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

does an elementwise multiplication

does an elementwise division of every row by v

Definition at line 5860 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator+ ( const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 1633 of file TMat_maths_impl.h.

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

{
    if (v1.length() != v2.length())
        PLERROR("TVec<T> + TVec<T>: different lengths %d and %d",
                v1.length(), v2.length());
    TVec<T> v(v1.length());
    v << v1;
    v+=v2;
    return v;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator+ ( v1,
const TVec< T > &  v2 
)

Definition at line 1645 of file TMat_maths_impl.h.

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

{
    TVec<T> v(v2.length());
    add(v2,v1,v);
    return v;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator+ ( const TVec< T > &  v1,
v2 
)

Definition at line 1653 of file TMat_maths_impl.h.

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

{
    TVec<T> v(v1.length());
    add(v1,v2,v);
    return v;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator+ ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 5956 of file TMat_maths_impl.h.

References add(), PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

{
    TMat<T> result(m1.length(), m1.width());
    add(m1,m2,result);
    return result;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator+ ( const TMat< T > &  m,
const TVec< T > &  v 
) [inline]

return m + v (added to every ROW of m)

Definition at line 7207 of file TMat_maths_impl.h.

References PLearn::TMat< T >::copy().

{ TMat<T> res = m.copy(); res+=v; return res; }

Here is the call graph for this function:

template<class T >
TMatColRowsIterator<T> PLearn::operator+ ( typename TMatColRowsIterator< T >::difference_type  n,
const TMatColRowsIterator< T > &  y 
)

Definition at line 58 of file TMatColRowsIterator_impl.h.

References n.

{
    TMatColRowsIterator<T> r(y);
    return r += n;
}
template<class T >
TMatRowsAsArraysIterator<T> PLearn::operator+ ( typename TMatRowsAsArraysIterator< T >::difference_type  n,
const TMatRowsAsArraysIterator< T > &  y 
)

Definition at line 57 of file TMatRowsAsArraysIterator_impl.h.

References n.

{
    TMatRowsAsArraysIterator<T> r(y);
    return r += n;
}
template<class T >
TMatRowsIterator<T> PLearn::operator+ ( typename TMatRowsIterator< T >::difference_type  n,
const TMatRowsIterator< T > &  y 
)

Definition at line 57 of file TMatRowsIterator_impl.h.

References n.

{
    TMatRowsIterator<T> r(y);
    return r += n;
}
RandomVar PLearn::operator+ ( RandomVar  a,
RandomVar  b 
)

Return a RandomVar that is the element-by-element sum of two RandomVar's. The result contains a PlusRandomVariable, which can be "trained" by EM: if one of the two arguments is non-random and is considered to be a parameter, it can be learned (e.g. for implementing a linear regression).

Definition at line 432 of file RandomVar.cc.

{
    return new PlusRandomVariable(a,b);
}
PDate PLearn::operator+ ( const PDate &  pdate,
int  ndays 
) [inline]

add a number of days

Definition at line 163 of file PDate.h.

References PLearn::PDate::toJulianDay().

{
    return PDate(pdate.toJulianDay()+ndays);
}

Here is the call graph for this function:

SparseMatrix PLearn::operator+ ( const SparseMatrix &  A,
const SparseMatrix &  B 
)

add two sparse matrices (of same dimensions but with values in possibly different places)

Definition at line 259 of file SparseMatrix.cc.

References PLearn::SparseMatrix::beginRow, PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), PLearn::SparseMatrix::endRow, for(), i, j, PLearn::TVec< T >::length(), PLearn::SparseMatrix::n_rows, PLERROR, PLearn::TVec< T >::resize(), PLearn::SparseMatrix::row, and PLearn::SparseMatrix::values.

{
    int n_rows = A.n_rows;
    int n_columns = A.beginRow.length();
    if (n_rows != B.n_rows)
        PLERROR("SparseMatrix(%d,%d)+SparseMatrix(%d,%d): both should have same dimensions",
                n_rows,A.beginRow.length(),B.n_rows,B.beginRow.length());
    int n_non_zero = A.row.length()+B.row.length(); // THIS IS AN UPPER BOUND ON ACTUAL n_non_zero
    SparseMatrix C(n_rows,n_columns,n_non_zero);

    int n_actual_non_zero=0;
    // the data is stored column-wise
    Vec column(n_rows);
    real* v=column.data();
    for (int j=0;j<n_columns;j++)
    {
        column.clear();
        for (int i=(int)A.beginRow[j];i<=A.endRow[j];i++)
            v[(int)A.row[i]]=A.values[i];
        for (int i=(int)B.beginRow[j];i<=B.endRow[j];i++)
            v[(int)B.row[i]]+=B.values[i];
        C.beginRow[j]=n_actual_non_zero;
        for (int i=0;i<n_rows;i++)
            if (v[i]!=0)
            {
                C.row[n_actual_non_zero]=i;
                C.values[n_actual_non_zero]=v[i];
                n_actual_non_zero++;
            }
        C.endRow[j]=n_actual_non_zero-1;

    }
    C.row.resize(n_actual_non_zero);
    C.values.resize(n_actual_non_zero);
    return C;
}

Here is the call graph for this function:

Var PLearn::operator+ ( Var  v,
real  cte 
)

Definition at line 71 of file Var_operators.cc.

{ return new PlusConstantVariable(v,cte); }
Var PLearn::operator+ ( real  cte,
Var  v 
)

Definition at line 74 of file Var_operators.cc.

{ return new PlusConstantVariable(v,cte); }
Var PLearn::operator+ ( Var  v1,
Var  v2 
)

Definition at line 80 of file Var_operators.cc.

{ 
    if(v2->isScalar())
        return new PlusScalarVariable(v1,v2);
    else if(v1->isScalar())
        return new PlusScalarVariable(v2,v1);
    else if(v2->isRowVec())
        return new PlusRowVariable(v1,v2);
    else if(v1->isRowVec())
        return new PlusRowVariable(v2,v1);
    else if(v2->isColumnVec())
        return new PlusColumnVariable(v1,v2);
    else if(v1->isColumnVec())
        return new PlusColumnVariable(v2,v1);
    else
        return new PlusVariable(v1,v2);
}
template<class T >
void PLearn::operator+= ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
) [inline]

element-wise +

Definition at line 1197 of file TMat_maths_impl.h.

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

Referenced by PLearn::PPath::operator/=().

{
#ifdef BOUNDCHECK
    if(vec1.size() != vec2.size())
        PLERROR("In operator+=, vec1 and vec2 vectors must have the same length");
#endif
    if (vec1.size() > 0 && vec2.size() > 0) {
        T* v1 = vec1.data();
        T* v2 = vec2.data();
        int l = vec1.length();
        for(int i=0; i<l; i++)
            *v1++ += *v2++;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::operator+= ( const TVec< T > &  vec,
scalar 
)

Definition at line 1213 of file TMat_maths_impl.h.

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

{
    if (vec.size() > 0) {
        T* v = vec.data();
        for(int i=0; i<vec.length(); i++)
            v[i] += scalar;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::operator+= ( const TMat< T > &  m,
scalar 
)

Definition at line 5781 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T* m_i = m.data();
    int w = m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] += scalar;
}

Here is the call graph for this function:

template<class T >
void PLearn::operator+= ( const TMat< T > &  m,
const TVec< T > &  v 
)

adds v to every row

Definition at line 5812 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(m.width()!=v.length())
        PLERROR("IN operator+=(const TMat<T>& m, const TVec<T>& v) v must be as long as m is wide");
#endif
    T* m_i = m.data();
    T* vv = v.data();
    int w=m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] += vv[j];
}

Here is the call graph for this function:

template<class T >
void PLearn::operator+= ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 5911 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.length();
    int l=m1.width();
#ifdef BOUNDCHECK
    if(m1.width()!=m2.width() || m1.length()!=m2.length())
        PLERROR("IN operator+=(const TMat<T>& m1(%d,%d), const TMat<T>& m2(%d,%d)): m1 and m2 must have same dimensions",
                m1.length(),m1.width(),m2.length(),m2.width());
#endif
    T* m1_i = m1.data();
    T* m2_i = m2.data();
    for(int i=0; i<n; i++, m1_i+=m1.mod(),m2_i+=m2.mod())
        for(int j=0; j<l; j++)
            m1_i[j] += m2_i[j];
}

Here is the call graph for this function:

void PLearn::operator+= ( Var &  v1,
const Var &  v2 
)

Definition at line 98 of file Var_operators.cc.

References PLearn::PP< T >::isNull().

{
    if (!v2.isNull())
    {
        if (v1.isNull())
            v1 = v2;
        else 
            v1 = v1 + v2;
    }
}

Here is the call graph for this function:

RemoteMethodDoc PLearn::operator, ( const BodyDoc &  body,
const ArgDoc &  arg 
) [inline]

Global operator, to start off the list of RemoteMethodDoc chaining.

Definition at line 251 of file RemoteMethodDoc.h.

{
    RemoteMethodDoc doc(body);
    return doc.operator,(arg);
}
RemoteMethodDoc PLearn::operator, ( const BodyDoc &  body,
const RetDoc &  ret 
) [inline]

Global operator, to start off the list of RemoteMethodDoc chaining.

Definition at line 258 of file RemoteMethodDoc.h.

{
    RemoteMethodDoc doc(body);
    return doc.operator,(ret);
}
RemoteMethodDoc PLearn::operator, ( const ArgDoc &  arg,
const BodyDoc &  body 
) [inline]

Global operator, to start off the list of RemoteMethodDoc chaining.

Definition at line 265 of file RemoteMethodDoc.h.

{
    RemoteMethodDoc doc(body);
    return doc.operator,(arg);
}
RemoteMethodDoc PLearn::operator, ( const ArgDoc &  arg,
const RetDoc &  ret 
) [inline]

Global operator, to start off the list of RemoteMethodDoc chaining.

Definition at line 272 of file RemoteMethodDoc.h.

{
    RemoteMethodDoc doc(ret);
    return doc.operator,(arg);
}
RemoteMethodDoc PLearn::operator, ( const RetDoc &  ret,
const BodyDoc &  body 
) [inline]

Global operator, to start off the list of RemoteMethodDoc chaining.

Definition at line 279 of file RemoteMethodDoc.h.

{
    RemoteMethodDoc doc(body);
    return doc.operator,(ret);
}
RemoteMethodDoc PLearn::operator, ( const RetDoc &  ret,
const ArgDoc &  arg 
) [inline]

Global operator, to start off the list of RemoteMethodDoc chaining.

Definition at line 286 of file RemoteMethodDoc.h.

{
    RemoteMethodDoc doc(arg);
    return doc.operator,(ret);
}
template<class T >
TVec<T> PLearn::operator- ( const TVec< T > &  vec)

Definition at line 1223 of file TMat_maths_impl.h.

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

{
    if (vec.size() > 0) {
        TVec<T> opposite(vec.length());
        T *v=vec.data();
        T *o=opposite.data();
        for (int i=0;i<vec.length();i++)
            o[i] = - v[i];
        return opposite;
    }
    return TVec<T>();
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator- ( const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 1604 of file TMat_maths_impl.h.

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

{
    if (v1.length() != v2.length())
        PLERROR("TVec<T> - TVec<T>: different lengths %d and %d",
                v1.length(), v2.length());
    TVec<T> v(v1.length());
    v << v1;
    v-=v2;
    return v;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator- ( v1,
const TVec< T > &  v2 
)

Definition at line 1616 of file TMat_maths_impl.h.

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

{
    TVec<T> v(v2.length());
    v = -v2;
    v += v1;
    return v;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator- ( const TVec< T > &  v1,
v2 
)

Definition at line 1625 of file TMat_maths_impl.h.

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

{
    TVec<T> v(v1.length());
    substract(v1,v2,v);
    return v;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator- ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 5948 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), substract(), and PLearn::TMat< T >::width().

{
    TMat<T> result(m1.length(), m1.width());
    substract(m1,m2,result);
    return result;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator- ( const TMat< T > &  m)

return a negated copy of m

Definition at line 6009 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    TMat<T> opposite(m.length(),m.width());
    T *m_i=m.data();
    T *o_i=opposite.data();
    int w=m.width();
    for (int i=0;i<m.length();i++,m_i+=m.mod(),o_i+=opposite.mod())
        for (int j=0;j<w;j++)
            o_i[j] = - m_i[j];
    return opposite;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator- ( const TMat< T > &  m,
const TVec< T > &  v 
) [inline]

return m - v (subtracted from every ROW of m)

Definition at line 7212 of file TMat_maths_impl.h.

References PLearn::TMat< T >::copy().

{ TMat<T> res = m.copy(); res-=v; return res; }

Here is the call graph for this function:

Ker PLearn::operator- ( const Ker &  k) [inline]

Definition at line 76 of file NegKernel.h.

{ return new NegKernel(k); }
RandomVar PLearn::operator- ( RandomVar  a,
RandomVar  b 
)

Return a MatRandomVar that is the element-by-element difference of two RandomVar's.

The result contains a MinusRandomVariable.

Definition at line 437 of file RandomVar.cc.

{
    return new MinusRandomVariable(a,b);
}
Var PLearn::operator- ( Var  v) [inline]

Definition at line 88 of file NegateElementsVariable.h.

{ return new NegateElementsVariable(v); }
int PLearn::operator- ( const PDate &  to_date,
const PDate &  from_date 
) [inline]

substract two dates, the result being counted in days.

Definition at line 157 of file PDate.h.

References PLearn::PDate::toJulianDay().

{
    return to_date.toJulianDay() - from_date.toJulianDay();
}

Here is the call graph for this function:

PDate PLearn::operator- ( const PDate &  pdate,
int  ndays 
) [inline]

subtract a number of days add a number of days

Definition at line 170 of file PDate.h.

References PLearn::PDate::toJulianDay().

{
    return PDate(pdate.toJulianDay()-ndays);
}

Here is the call graph for this function:

double PLearn::operator- ( const PDateTime &  to_date,
const PDateTime &  from_date 
) [inline]

subtract two dates, the result being counted in days (+ fractions)

Definition at line 164 of file PDateTime.h.

References PLearn::PDateTime::toJulianDay().

{
    return to_date.toJulianDay() - from_date.toJulianDay();
}

Here is the call graph for this function:

Var PLearn::operator- ( Var  v,
real  cte 
)

Definition at line 77 of file Var_operators.cc.

{ return new PlusConstantVariable(v,-cte); }
Var PLearn::operator- ( Var  v1,
Var  v2 
)

Definition at line 109 of file Var_operators.cc.

{ 
    if(v2->isScalar())
        return new MinusScalarVariable(v1,v2);
    else if(v1->isScalar())
        return new PlusScalarVariable(new NegateElementsVariable(v2), v1);
    else if(v2->isRowVec())
        return new MinusRowVariable(v1,v2);
    else if(v1->isRowVec())
        return new NegateElementsVariable(new MinusRowVariable(v2,v1));
    else if(v2->isColumnVec())
        return new MinusColumnVariable(v1,v2);
    else if(v1->isColumnVec())
        return new PlusColumnVariable(new NegateElementsVariable(v2), v1);
    else
        return new MinusVariable(v1,v2);
}
Var PLearn::operator- ( real  cte,
Var  v 
)

Definition at line 138 of file Var_operators.cc.

{ return new PlusConstantVariable(new NegateElementsVariable(v),cte); }
VarArray PLearn::operator- ( const VarArray &  a,
const VarArray &  b 
)

returns all variables of a that are not in b

Definition at line 1164 of file VarArray.cc.

References PLearn::TVec< T >::append(), i, j, and PLearn::TVec< T >::size().

{
    VarArray result;
    int i,j;
    for(i=0; i<a.size(); i++)
    {
        Var v = a[i];
        for(j=0; j<b.size(); j++)
            if(b[j]==v)
                break;
        if(j>=b.size()) // v not found in b
            result.append(v);
    }
    return result;
}

Here is the call graph for this function:

template<class T >
void PLearn::operator-= ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
)

Definition at line 1237 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if(vec1.size() != vec2.size())
        PLERROR("In operator-=, vec1 and vec2 vectors must have the same length");
#endif
    if (vec1.size() > 0 && vec2.size() > 0) {
        T* v1 = vec1.data();
        T* v2 = vec2.data();
        for(int i=0; i<vec1.length(); i++)
            v1[i] -= v2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::operator-= ( const TVec< T > &  vec,
scalar 
)

Definition at line 1252 of file TMat_maths_impl.h.

{ vec += -scalar; }
template<class T >
void PLearn::operator-= ( const TMat< T > &  m,
scalar 
) [inline]

Definition at line 5801 of file TMat_maths_impl.h.

{ m += (-scalar); }
template<class T >
void PLearn::operator-= ( const TMat< T > &  m,
const TVec< T > &  v 
)

subtracts v from every row

Definition at line 5828 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(m.width()!=v.length())
        PLERROR("IN operator-=(const TMat<T>& m, const TVec<T>& v) v must be as long as m is wide");
#endif
    T* m_i = m.data();
    T* vv = v.data();
    int w=m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] -= vv[j];
}

Here is the call graph for this function:

template<class T >
void PLearn::operator-= ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 5928 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isNotEmpty(), j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.length();
    int l=m1.width();
#ifdef BOUNDCHECK
    if(m1.width()!=m2.width() || m1.length()!=m2.length())
        PLERROR("IN operator+=(const TMat<T>& m1(%d,%d), const TMat<T>& m2(%d,%d)): m1 and m2 must have same dimensions",
                m1.length(),m1.width(),m2.length(),m2.width());
#endif
    if(m1.isNotEmpty()) // calc only if some data
    {
        T* m1_i = m1.data();
        T* m2_i = m2.data();
        for(int i=0; i<n; i++, m1_i+=m1.mod(),m2_i+=m2.mod())
            for(int j=0; j<l; j++)
                m1_i[j] -= m2_i[j];
    }
}

Here is the call graph for this function:

void PLearn::operator-= ( Var &  v1,
const Var &  v2 
)

Definition at line 127 of file Var_operators.cc.

References PLearn::PP< T >::isNull().

{
    if (!v2.isNull())
    {
        if (v1.isNull())
            v1 = -v2;
        else
            v1 = v1 - v2;
    }
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator/ ( const TVec< T > &  v1,
const TVec< T > &  v2 
)

Definition at line 1689 of file TMat_maths_impl.h.

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

Referenced by PLearn::PPath::operator/().

{
    if (v1.length() != v2.length())
        PLERROR("TVec<T> + TVec<T>: different lengths %d and %d",
                v1.length(), v2.length());
    TVec<T> v(v1.length());
    v << v1;
    v/=v2;
    return v;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T1 , class T2 >
TVec<T1> PLearn::operator/ ( const TVec< T1 > &  v1,
T2  scalar 
)

Definition at line 1716 of file TMat_maths_impl.h.

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

{
    TVec<T1> v(v1.length());
    multiply(v1,T1(1.0)/(T1)scalar,v);
    return v;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::operator/ ( v1,
const TVec< T > &  v2 
)

Definition at line 1701 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, and PLearn::TVec< T >::size().

{
    int n=v2.length();
    TVec<T> v(n);
    if (v2.size() > 0) {
        T* s2=v2.data();
        T* d=v.data();
        for (int i=0;i<n;i++)
            d[i] = v1/s2[i];
    }
    return v;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator/ ( const TMat< T > &  m,
const T &  scalar 
) [inline]

Definition at line 4619 of file TMat_maths_impl.h.

{ return m * (T(1)/scalar); }
template<class T >
TMat<T> PLearn::operator/ ( const TMat< T > &  m,
const TVec< T > &  v 
) [inline]

elementwise division of every row by v

Definition at line 7222 of file TMat_maths_impl.h.

References PLearn::TMat< T >::copy().

{ TMat<T> res = m.copy(); res/=v; return res; }

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::operator/ ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

elementwise division of every row by v

Definition at line 7227 of file TMat_maths_impl.h.

References PLearn::TMat< T >::copy().

{ TMat<T> res = m1.copy(); res/=m2; return res; }

Here is the call graph for this function:

RandomVar PLearn::operator/ ( RandomVar  a,
RandomVar  b 
)

Return a MatRandomVar that is the element-by-element ratio of two RandomVar's.

The result contains a RandomVariable.

Definition at line 442 of file RandomVar.cc.

{
    return new ElementWiseDivisionRandomVariable(a,b);
}
Func PLearn::operator/ ( Func  f,
real  value 
)

Definition at line 86 of file Func.cc.

References fast_exact_is_equal(), and i.

{ 
    if(fast_exact_is_equal(value, 1.0))
        return f;
    else
    {
        int nouts = f->outputs.size();
        VarArray outs(nouts);
        for(int i=0; i<nouts; i++)
            outs[i] = f->outputs[i]/value;
        return Func(f->inputs, outs);
    }
}

Here is the call graph for this function:

Var PLearn::operator/ ( Var  v,
real  cte 
) [inline]

Definition at line 100 of file TimesConstantVariable.h.

{ return v*(1.0/cte); }
Var PLearn::operator/ ( real  cte,
Var  v 
)

Definition at line 161 of file Var_operators.cc.

References fast_exact_is_equal(), and invertElements().

{
    if(fast_exact_is_equal(cte, 1.0))
        return invertElements(v);
    else
        return cte*invertElements(v);
}

Here is the call graph for this function:

Var PLearn::operator/ ( Var  v1,
Var  v2 
)

Definition at line 169 of file Var_operators.cc.

References invertElements(), PLearn::Var::length(), and PLearn::Var::width().

{
    if(v1->length()==v2->length() && v1->width()==v2->width())
        return new DivVariable(v1,v2);
    else
        return v1*invertElements(v2);
}

Here is the call graph for this function:

template<class T >
void PLearn::operator/= ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
)

Definition at line 1282 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if(vec1.size() != vec2.size())
        PLERROR("In operator/=, vec1 and vec2 vectors must have the same length");
#endif
    if (vec1.size() > 0 && vec2.size() > 0) {
        T* v1 = vec1.data();
        T* v2 = vec2.data();
        int l=vec1.length();
        for(int i=0; i<l; i++)
            v1[i] /= v2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::operator/= ( const TVec< T > &  vec,
scalar 
) [inline]

Definition at line 1298 of file TMat_maths_impl.h.

{ vec *= T(1.0)/scalar; }
template<class T >
void PLearn::operator/= ( const TVec< T > &  vec,
int  scalar 
) [inline]

Definition at line 1302 of file TMat_maths_impl.h.

{ vec /= T(scalar); }
template<class T >
void PLearn::operator/= ( const TMat< T > &  m,
scalar 
) [inline]

Definition at line 5804 of file TMat_maths_impl.h.

{ m *= (T(1)/scalar); }
template<class T >
void PLearn::operator/= ( const TMat< T > &  m,
int  scalar 
) [inline]

Definition at line 5807 of file TMat_maths_impl.h.

{ m *= (T(1)/scalar); }
template<class T >
void PLearn::operator/= ( const TMat< T > &  m,
const TVec< T > &  v 
)

Definition at line 5878 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(m.width()!=v.length())
        PLERROR("IN operator/=(const TMat<T>& m, const TVec<T>& v) v must be as long as m is wide");
#endif
    T* m_i = m.data();
    T* vv = v.data();
    int w=m.width();
    for(int i=0; i<m.length(); i++, m_i+=m.mod())
        for(int j=0; j<w; j++)
            m_i[j] /= vv[j];
}

Here is the call graph for this function:

template<class T >
void PLearn::operator/= ( const TMat< T > &  m1,
const TMat< T > &  m2 
)

does an elementwise division

Definition at line 5894 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.length();
    int l=m1.width();
#ifdef BOUNDCHECK
    if(l!=m2.width() || n!=m2.length())
        PLERROR("IN operator/=(const TMat<T>& m1(%d,%d), const TMat<T>& m2(%d,%d)) sizes differ",
                m1.length(),m1.width(),m2.length(),m2.width());
#endif
    T* m1_i = m1.data();
    T* m2_i = m2.data();
    for(int i=0; i<n; i++, m1_i+=m1.mod(),m2_i+=m2.mod())
        for(int j=0; j<l; j++)
            m1_i[j] /= m2_i[j];
}

Here is the call graph for this function:

bool PLearn::operator< ( RealMapping::single_mapping_t  a,
RealMapping::single_mapping_t  b 
)

Definition at line 152 of file RealMapping.cc.

{
    return a.first<b.first;
}
template<class T >
bool PLearn::operator< ( const TVec< T > &  left,
const TVec< T > &  right 
)

Definition at line 296 of file TVec_impl.h.

References left(), PLERROR, and right().

{
    if (left.size() != right.size())
        PLERROR("Left and right vectors must have the same size in operator<");
    int size = left.size();
    const T* ldata = left.data();
    const T* rdata = right.data();
    for ( ; size ; ++ldata, ++rdata, --size) {
        if (*ldata < *rdata)
            return true;
        if (*ldata > *rdata)
            return false;
        // Continue loop if both are equal
    }
    return false;                              // both vectors are equal at
    // this point; cannot be <
}

Here is the call graph for this function:

template<class T , unsigned SizeBits>
bool PLearn::operator< ( const SmallVector< T, SizeBits > &  ,
const SmallVector< T, SizeBits > &   
)

Lexicographical Ordering.

const SmallVector<T,SizeBits,Allocator>&);

template<class T , unsigned SizeBits, class Allocator >
bool PLearn::operator< ( const SmallVector< T, SizeBits, Allocator > &  x,
const SmallVector< T, SizeBits, Allocator > &  y 
)

Definition at line 491 of file SmallVector.h.

References x.

{
    return std::lexicographical_compare(x.begin(), x.end(),
                                        y.begin(), y.end());
}
bool PLearn::operator< ( const ReconstructionCandidate &  o1,
const ReconstructionCandidate &  o2 
) [inline]

Definition at line 134 of file TransformationLearner.h.

References PLearn::ReconstructionCandidate::weight.

{
    //  Will be used in storage process, in a priority queue.
    //  With the following  definitions, priority measure increases when weight
    //  field decreases.
    //  That is, we want to keep ReconstructionCandidate objects with lower 
    //  weights on top of the priority queue 
    return o2.weight<o1.weight;
}
Var PLearn::operator< ( Var  v1,
Var  v2 
) [inline]

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Definition at line 78 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
bool PLearn::operator< ( const Correspondence &  p,
const Correspondence &  q 
)

Definition at line 140 of file Correspondence.cc.

References PLearn::Correspondence::mid, PLearn::Correspondence::model_id, and PLearn::Correspondence::sid.

{
  if( p.model_id < q.model_id ) return true;
  if( p.model_id > q.model_id ) return false;
  if( p.sid < q.sid ) return true;
  if( p.sid > q.sid ) return false;
  if( p.mid < q.mid ) return true;
  if( p.mid > q.mid ) return false;

  return false;
}
template<class T , unsigned N, class TTrait >
bool PLearn::operator< ( const TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
)

Lexicographical Ordering.

Definition at line 520 of file TinyVector.h.

{
    return std::lexicographical_compare(x.begin(), x.end(),
                                        y.begin(), y.end());
}
ostream & PLearn::operator<< ( ostream &  o,
const Row::iterator &  field 
)

outputs a single field flushed right in a cell of apropriate width (as given by field.char_width())

Definition at line 856 of file SimpleDB.cc.

References PLearn::RowIterator::asCharacter(), PLearn::RowIterator::asDate(), PLearn::RowIterator::asDouble(), PLearn::RowIterator::asFloat(), PLearn::RowIterator::asInt(), PLearn::RowIterator::asShort(), PLearn::RowIterator::asSignedChar(), PLearn::RowIterator::asString(), center(), PLearn::RowIterator::char_width(), PLearn::RowIterator::isMissing(), left(), PLERROR, right(), and x.

{
    o.setf(ios::right, ios::adjustfield);
    o.fill(' ');
    o.width(field.char_width());

    // cout << "[" << field.char_width() << "]" << endl;

    if (field.isMissing())
        o << " ";
    else if (const char* x = field.asString())
        o << x;
    else if (const unsigned char* x = field.asCharacter()) 
    {
        if (isprint(*x))
        {
            // couldn't get the formatting using ostream.width() to work so I'm
            // using this...
            o.width(0);
            o << center(string(1,*x),field.char_width()); 
        }
        else 
        {
            o.setf(ios::left, ios::adjustfield);
            o.width(0);
            o << "0x";
            o.width(field.char_width()-2);
            o << hex << int(*x) << dec;
            o.setf(ios::right, ios::adjustfield);
        }
    }
    else if (const signed char* x = field.asSignedChar())
        o << int(*x);
    else if (const short* x = field.asShort())
        o << *x;
    else if (const int* x = field.asInt())
        o << *x;
    else if (const float* x = field.asFloat()) 
    {
        o.setf(ios::fmtflags(0), ios::floatfield);
        o.precision(6);
        o << *x;
    }
    else if (const double* x = field.asDouble()) 
    {
        o.setf(ios::fmtflags(0), ios::floatfield);
        o.precision(6);
        o << *x;
    }
    else if (const PDate* x = field.asDate()) 
    {
        o.width(0);
        o << center(x->info(),field.char_width());
    }
    else
        PLERROR("Unknown field type");

    return o;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const ConcatSetsSplitter &  o 
) [inline]

Definition at line 123 of file ConcatSetsSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConstantVMatrix &  o 
) [inline]

Definition at line 114 of file ConstantVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CrossReferenceVMatrix &  o 
) [inline]

Definition at line 95 of file CrossReferenceVMatrix.h.

ostream & PLearn::operator<< ( ostream &  o,
const Row &  rowc 
)

outputs all fields in a row, separated by " | "

Definition at line 916 of file SimpleDB.cc.

References PLearn::Row::begin(), PLearn::Row::end(), and endl().

{
    Row& row = const_cast<Row&>(rowc);
    Row::const_iterator it = row.begin(), end = row.end();
    
    while(it!=end)
    {
        o << it << " | ";
        ++it;
    }
    o << endl;
    return o;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const CumVMatrix &  o 
) [inline]

Definition at line 112 of file CumVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RPPath &  o 
) [inline]

Definition at line 105 of file RPPath.h.

PStream& PLearn::operator<< ( PStream &  out,
const DatedJoinVMatrix &  o 
) [inline]

Definition at line 135 of file DatedJoinVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DatedVMatrix &  o 
) [inline]

Definition at line 112 of file DatedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DBSplitter &  o 
) [inline]

Definition at line 126 of file DBSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const BatchVMatrix &  o 
) [inline]

Definition at line 86 of file BatchVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const PLLogTest &  o 
) [inline]

Definition at line 130 of file PLLogTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const LearnerProcessedVMatrix &  o 
) [inline]

Definition at line 114 of file LearnerProcessedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RemoveRowsVMatrix &  o 
) [inline]

Definition at line 108 of file RemoveRowsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const YMDDatedVMatrix &  o 
) [inline]

Definition at line 141 of file YMDDatedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const UCISpecification &  o 
) [inline]

Definition at line 127 of file UCISpecification.h.

PStream& PLearn::operator<< ( PStream &  out,
const DichotomizeVMatrix &  o 
) [inline]

Definition at line 125 of file DichotomizeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DictionaryVMatrix &  o 
) [inline]

Definition at line 186 of file DictionaryVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DiskVMatrix &  o 
) [inline]

Definition at line 124 of file DiskVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DisregardRowsVMatrix &  o 
) [inline]

Definition at line 145 of file DisregardRowsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const EncodedVMatrix &  o 
) [inline]

Definition at line 87 of file EncodedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const PPathTest &  o 
) [inline]

Definition at line 126 of file PPathTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const NetflixVMatrix &  o 
) [inline]

Definition at line 238 of file NetflixVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExplicitSplitter &  o 
) [inline]

Definition at line 114 of file ExplicitSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConditionalDictionary &  o 
) [inline]

Definition at line 137 of file ConditionalDictionary.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExtendedVMatrix &  o 
) [inline]

Definition at line 116 of file ExtendedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExtractNNetParamsVMatrix &  o 
) [inline]

Definition at line 122 of file ExtractNNetParamsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FileVMatrix &  o 
) [inline]

Definition at line 134 of file FileVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FilteredVMatrix &  o 
) [inline]

Definition at line 136 of file FilteredVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FilterSplitter &  o 
) [inline]

Definition at line 126 of file FilterSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const FinancePreprocVMatrix &  o 
) [inline]

Definition at line 170 of file FinancePreprocVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ForwardVMatrix &  o 
) [inline]

Definition at line 186 of file ForwardVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FractionSplitter &  o 
) [inline]

Definition at line 125 of file FractionSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const PStreamBufTest &  o 
) [inline]

Definition at line 130 of file PStreamBufTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianizeVMatrix &  o 
) [inline]

Definition at line 150 of file GaussianizeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const GeneralizedOneHotVMatrix &  o 
) [inline]

Definition at line 110 of file GeneralizedOneHotVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const Dictionary &  o 
) [inline]

Definition at line 190 of file Dictionary.h.

PStream& PLearn::operator<< ( PStream &  out,
const GetInputVMatrix &  o 
) [inline]

Definition at line 115 of file GetInputVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const GramVMatrix &  o 
) [inline]

Definition at line 116 of file GramVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ImputationVMatrix &  o 
) [inline]

Definition at line 84 of file ImputationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const IndexedVMatrix &  o 
) [inline]

Definition at line 108 of file IndexedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const TupleTest &  o 
) [inline]

Definition at line 126 of file TupleTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const InfiniteMNISTVMatrix &  o 
) [inline]

Definition at line 168 of file InfiniteMNISTVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const InterleaveVMatrix &  o 
) [inline]

Definition at line 119 of file InterleaveVMatrix.h.

template<class T , unsigned N, class TTrait >
ostream& PLearn::operator<< ( ostream &  os,
const TinyVector< T, N, TTrait > &  tiny_vec 
)

Definition at line 62 of file TinyVectorIO.h.

References i, and n.

{
    typedef typename TTrait::IOType IOType;
    os << '[';
    for (int i=0, n=int(tiny_vec.size()); i<n ; ++i) {
        os << IOType(tiny_vec[i]);
        if (i < n-1)
            os << ',';
    }
    return os << ']';
}
template<class T , unsigned N, class TTrait >
PStream& PLearn::operator<< ( PStream &  os,
const TinyVector< T, N, TTrait > &  tiny_vec 
)

Definition at line 75 of file TinyVectorIO.h.

References i, and n.

{
    typedef typename TTrait::IOType IOType;
    os << '[';
    for (int i=0, n=int(tiny_vec.size()); i<n ; ++i) {
        os << IOType(tiny_vec[i]);
        if (i < n-1)
            os << ',';
    }
    return os << ']';
}
PStream& PLearn::operator<< ( PStream &  out,
const JoinVMatrix &  o 
) [inline]

Definition at line 112 of file JoinVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FileDictionary &  o 
) [inline]

Definition at line 118 of file FileDictionary.h.

PStream& PLearn::operator<< ( PStream &  out,
const JulianizeVMatrix &  o 
) [inline]

Definition at line 157 of file JulianizeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const KernelVMatrix &  o 
) [inline]

Definition at line 93 of file KernelVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const TargetEncodingLearner &  o 
) [inline]

Definition at line 196 of file TargetEncodingLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const KFoldSplitter &  o 
) [inline]

Definition at line 117 of file KFoldSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const KNNImputationVMatrix &  o 
) [inline]

Definition at line 135 of file KNNImputationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const KNNVMatrix &  o 
) [inline]

Definition at line 151 of file KNNVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const LemmatizeVMatrix &  o 
) [inline]

Definition at line 134 of file LemmatizeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const LIBSVMSparseVMatrix &  o 
) [inline]

Definition at line 137 of file LIBSVMSparseVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const LocallyPrecomputedVMatrix &  o 
) [inline]

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const VecDictionary &  o 
) [inline]

Definition at line 122 of file VecDictionary.h.

PStream& PLearn::operator<< ( PStream &  out,
const LocalNeighborsDifferencesVMatrix &  o 
) [inline]

Definition at line 120 of file LocalNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const MeanImputationVMatrix &  o 
) [inline]

Definition at line 113 of file MeanImputationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const AdditiveNormalizationKernel &  o 
) [inline]

Definition at line 163 of file AdditiveNormalizationKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const MeanMedianModeImputationVMatrix &  o 
) [inline]

Definition at line 127 of file MeanMedianModeImputationVMatrix.h.

ostream& PLearn::operator<< ( ostream &  out,
Range  r 
) [inline]

Definition at line 77 of file Range.h.

References PLearn::Range::length, and PLearn::Range::start.

{ 
    out << "[" << r.start << "," << r.start+r.length-1 << "]"; 
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const MemoryVMatrix &  o 
) [inline]

Definition at line 117 of file MemoryVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MemoryVMatrixNoSave &  o 
) [inline]

Definition at line 119 of file MemoryVMatrixNoSave.h.

PStream& PLearn::operator<< ( PStream &  out,
const ARDBaseKernel &  o 
) [inline]

Definition at line 120 of file ARDBaseKernel.h.

PStream & PLearn::operator<< ( PStream &  out,
const RealRange &  x 
)

Definition at line 68 of file RealMapping.cc.

References PLearn::RealRange::high, PLearn::RealRange::leftbracket, PLearn::RealRange::low, PLearn::PStream::outmode, PLearn::PStream::pretty_ascii, PLearn::PStream::put(), PLearn::PStream::raw_ascii, and PLearn::RealRange::rightbracket.

{ 
    out.put(x.leftbracket);
    out << x.low;
    switch(out.outmode) {
    case PStream::raw_ascii:
    case PStream::pretty_ascii:
        out << ' ';
        break;
    default:
        // Nothing to add.
        break;
    }
    out << x.high;
    out.put(x.rightbracket);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const MissingIndicatorVMatrix &  o 
) [inline]

Definition at line 101 of file MissingIndicatorVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MissingInstructionVMatrix &  o 
) [inline]

Definition at line 133 of file MissingInstructionVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MixtureVMatrix &  o 
) [inline]

Definition at line 130 of file MixtureVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MixUnlabeledNeighbourVMatrix &  o 
) [inline]

Definition at line 140 of file MixUnlabeledNeighbourVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const BetaKernel &  o 
) [inline]

Definition at line 145 of file BetaKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const MovingAverageVMatrix &  o 
) [inline]

Definition at line 116 of file MovingAverageVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MultiInstanceVMatrix &  o 
) [inline]

Definition at line 109 of file MultiInstanceVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MultiTargetOneHotVMatrix &  o 
) [inline]

Definition at line 134 of file MultiTargetOneHotVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ClassDistanceProportionCostFunction &  o 
) [inline]

Definition at line 76 of file ClassDistanceProportionCostFunction.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const MultiTaskSeparationSplitter &  o 
) [inline]

Definition at line 139 of file MultiTaskSeparationSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const MultiToUniInstanceSelectRandomVMatrix &  o 
) [inline]

Definition at line 96 of file MultiToUniInstanceSelectRandomVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const NoSplitSplitter &  o 
) [inline]

Definition at line 124 of file NoSplitSplitter.h.

ostream& PLearn::operator<< ( ostream &  out,
const RealRange &  range 
) [inline]

Definition at line 117 of file RealMapping.h.

References PLearn::RealRange::print().

{ range.print(out); return out; } 

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const OneHotVMatrix &  o 
) [inline]

Definition at line 113 of file OneHotVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const OneVsAllVMatrix &  o 
) [inline]

Definition at line 115 of file OneVsAllVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const PairsVMatrix &  o 
) [inline]

Definition at line 92 of file PairsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const PLearnerOutputVMatrix &  o 
) [inline]

Definition at line 148 of file PLearnerOutputVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassErrorCostFunction &  o 
) [inline]

Definition at line 99 of file ClassErrorCostFunction.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const PrecomputedVMatrix &  o 
) [inline]

Definition at line 112 of file PrecomputedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ProcessDatasetVMatrix &  o 
) [inline]

Definition at line 112 of file ProcessDatasetVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ProcessingVMatrix &  o 
) [inline]

Definition at line 127 of file ProcessingVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassMarginCostFunction &  o 
) [inline]

Definition at line 93 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
PStream& PLearn::operator<< ( PStream &  out,
const ProcessSymbolicSequenceVMatrix &  o 
) [inline]

Definition at line 314 of file ProcessSymbolicSequenceVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const PutSubVMatrix &  o 
) [inline]

Definition at line 121 of file PutSubVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MoleculeTemplate &  o 
) [inline]

Definition at line 139 of file MoleculeTemplate.h.

PStream& PLearn::operator<< ( PStream &  out,
const WordNetSenseDictionary &  o 
) [inline]

Definition at line 209 of file WordNetSenseDictionary.h.

PStream& PLearn::operator<< ( PStream &  out,
const PythonTableVMatrix &  o 
) [inline]

Definition at line 91 of file PythonTableVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RandomNeighborsDifferencesVMatrix &  o 
) [inline]

Definition at line 117 of file RandomNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const RealMapping &  o 
) [inline]

Definition at line 265 of file RealMapping.h.

PStream& PLearn::operator<< ( PStream &  out,
const RandomSamplesFromVMatrix &  o 
) [inline]

Definition at line 134 of file RandomSamplesFromVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RandomSamplesVMatrix &  o 
) [inline]

Definition at line 155 of file RandomSamplesVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CompactVMatrixGaussianKernel &  o 
) [inline]

Definition at line 83 of file CompactVMatrixGaussianKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RangeVMatrix &  o 
) [inline]

Definition at line 84 of file RangeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RankedVMatrix &  o 
) [inline]

Definition at line 128 of file RankedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CompactVMatrixPolynomialKernel &  o 
) [inline]

Definition at line 82 of file CompactVMatrixPolynomialKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RealFunctionsProcessedVMatrix &  o 
) [inline]

Definition at line 113 of file RealFunctionsProcessedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegularGridVMatrix &  o 
) [inline]

Definition at line 109 of file RegularGridVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ReIndexedTargetVMatrix &  o 
) [inline]

Definition at line 109 of file ReIndexedTargetVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RemapLastColumnVMatrix &  o 
) [inline]

Definition at line 124 of file RemapLastColumnVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RemoveDuplicateVMatrix &  o 
) [inline]

Definition at line 110 of file RemoveDuplicateVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConvexBasisKernel &  o 
) [inline]

Definition at line 77 of file ConvexBasisKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const ReorderByMissingVMatrix &  o 
) [inline]

Definition at line 107 of file ReorderByMissingVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RepeatSplitter &  o 
) [inline]

Definition at line 131 of file RepeatSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const RepeatVMatrix &  o 
) [inline]

Definition at line 115 of file RepeatVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ReplicateSamplesVMatrix &  o 
) [inline]

Definition at line 119 of file ReplicateSamplesVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CorrelationKernel &  o 
) [inline]

Definition at line 162 of file CorrelationKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RowBufferedVMatrix &  o 
) [inline]

Definition at line 95 of file RowBufferedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RowsSubVMatrix &  o 
) [inline]

Definition at line 102 of file RowsSubVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeLeave &  o 
) [inline]

Definition at line 118 of file RegressionTreeLeave.h.

PStream& PLearn::operator<< ( PStream &  out,
const SelectColumnsVMatrix &  o 
) [inline]

Definition at line 149 of file SelectColumnsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const SelectRowsFileIndexVMatrix &  o 
) [inline]

Definition at line 95 of file SelectRowsFileIndexVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CosKernel &  o 
) [inline]

Definition at line 72 of file CosKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const SelectRowsMultiInstanceVMatrix &  o 
) [inline]

Definition at line 136 of file SelectRowsMultiInstanceVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const SelectRowsVMatrix &  o 
) [inline]

Definition at line 140 of file SelectRowsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const SelectSetsSplitter &  o 
) [inline]

Definition at line 127 of file SelectSetsSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const SeparateInputVMatrix &  o 
) [inline]

Definition at line 123 of file SeparateInputVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DifferenceKernel &  o 
) [inline]

Definition at line 67 of file DifferenceKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const SequentialSplitter &  o 
) [inline]

Definition at line 111 of file SequentialSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const ShiftAndRescaleVMatrix &  o 
) [inline]

Definition at line 133 of file ShiftAndRescaleVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ShuffleColumnsVMatrix &  o 
) [inline]

Definition at line 110 of file ShuffleColumnsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const KernelPCA &  o 
) [inline]

Definition at line 124 of file KernelPCA.h.

PStream& PLearn::operator<< ( PStream &  out,
const SortRowsVMatrix &  o 
) [inline]

Definition at line 95 of file SortRowsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const SourceVMatrix &  o 
) [inline]

Definition at line 157 of file SourceVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DistanceKernel &  o 
) [inline]

Definition at line 90 of file DistanceKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const SourceVMatrixSplitter &  o 
) [inline]

Definition at line 132 of file SourceVMatrixSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const SparseVMatrix &  o 
) [inline]

Definition at line 119 of file SparseVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FeatureSetSequentialCRF &  o 
) [inline]

Definition at line 434 of file FeatureSetSequentialCRF.h.

PStream& PLearn::operator<< ( PStream &  out,
const Splitter &  o 
) [inline]

Definition at line 109 of file Splitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const SplitWiseValidationVMatrix &  o 
) [inline]

Definition at line 118 of file SplitWiseValidationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CachedFeatureSet &  o 
) [inline]

Definition at line 139 of file CachedFeatureSet.h.

PStream& PLearn::operator<< ( PStream &  out,
const DivisiveNormalizationKernel &  o 
) [inline]

Definition at line 154 of file DivisiveNormalizationKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const StackedSplitter &  o 
) [inline]

Definition at line 132 of file StackedSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const StochasticBinarizeVMatrix &  o 
) [inline]

Definition at line 118 of file StochasticBinarizeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const StrTableVMatrix &  o 
) [inline]

Definition at line 60 of file StrTableVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const SubInputVMatrix &  o 
) [inline]

Definition at line 109 of file SubInputVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DotProductKernel &  o 
) [inline]

Definition at line 69 of file DotProductKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const SubVMatrix &  o 
) [inline]

Definition at line 126 of file SubVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const TemporalHorizonVMatrix &  o 
) [inline]

Definition at line 104 of file TemporalHorizonVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const TemporaryDiskVMatrix &  o 
) [inline]

Definition at line 127 of file TemporaryDiskVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const TemporaryFileVMatrix &  o 
) [inline]

Definition at line 128 of file TemporaryFileVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const DTWKernel &  o 
) [inline]

Definition at line 154 of file DTWKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const AutoVMatrixTest &  o 
) [inline]

Definition at line 133 of file AutoVMatrixTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConcatDisjointFeatureSet &  o 
) [inline]

Definition at line 132 of file ConcatDisjointFeatureSet.h.

PStream& PLearn::operator<< ( PStream &  out,
const FileVMatrixTest &  o 
) [inline]

Definition at line 130 of file FileVMatrixTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const IndexedVMatrixTest &  o 
) [inline]

Definition at line 108 of file IndexedVMatrixTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const EpanechnikovKernel &  o 
) [inline]

Definition at line 113 of file EpanechnikovKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RowBufferedVMatrixTest &  o 
) [inline]

Definition at line 126 of file RowBufferedVMatrixTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const OneHotVariable &  o 
) [inline]

Definition at line 84 of file OneHotVariable.h.

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }
PStream& PLearn::operator<< ( PStream &  out,
const TestInTrainSplitter &  o 
) [inline]

Definition at line 153 of file TestInTrainSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const TextStreamVMatrix &  o 
) [inline]

Definition at line 120 of file TextStreamVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ToBagSplitter &  o 
) [inline]

Definition at line 136 of file ToBagSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const TrainTestSplitter &  o 
) [inline]

Definition at line 127 of file TrainTestSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const TrainValidTestSplitter &  o 
) [inline]

Definition at line 141 of file TrainValidTestSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const PartsDistanceKernel &  o 
) [inline]

Definition at line 82 of file PartsDistanceKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const TransposeVMatrix &  o 
) [inline]

Definition at line 119 of file TransposeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const FeatureSet &  o 
) [inline]

Definition at line 132 of file FeatureSet.h.

PStream& PLearn::operator<< ( PStream &  out,
const UCIDataVMatrix &  o 
) [inline]

Definition at line 109 of file UCIDataVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianDensityKernel &  o 
) [inline]

Definition at line 78 of file GaussianDensityKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const UniformizeVMatrix &  o 
) [inline]

Definition at line 132 of file UniformizeVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const TruncatedRealFunction &  o 
) [inline]

Definition at line 125 of file TruncatedRealFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const UniformVMatrix &  o 
) [inline]

Definition at line 80 of file UniformVMatrix.h.

void PLearn::operator<< ( const Vec &  v,
real  f 
) [inline]

Same as fill(f) (will only work with Vec, because of a potential conflict with T == string if we wanted to make it generic).

Definition at line 910 of file TVec_decl.h.

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

{ v.fill(f); }

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const UpsideDownVMatrix &  o 
) [inline]

Definition at line 100 of file UpsideDownVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ValueSelectRowsVMatrix &  o 
) [inline]

Definition at line 115 of file ValueSelectRowsVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const KernelRidgeRegressor &  o 
) [inline]

Definition at line 170 of file KernelRidgeRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianKernel &  o 
) [inline]

Definition at line 121 of file GaussianKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const VariableDeletionVMatrix &  o 
) [inline]

Definition at line 96 of file VariableDeletionVMatrix.h.

template<class T >
void PLearn::operator<< ( const TVec< T > &  m1,
const TVec< T > &  m2 
) [inline]

copy TVec << TVec

Definition at line 105 of file TVec_impl.h.

References std::copy(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(v1,v2) the 2 TVecs must have the same number of elements (%d != %d)", m1.size(), m2.size());
#endif
    if (m1.isNotEmpty())
        copy(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

template<class T , class U >
void PLearn::operator<< ( const TVec< T > &  m1,
const TVec< U > &  m2 
)

copy TVec << TVec (different types)

Definition at line 117 of file TVec_impl.h.

References copy_cast(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements (%d != %d)", m1.size(), m2.size());
#endif
    if (m1.isNotEmpty())
        copy_cast(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const VecExtendedVMatrix &  o 
) [inline]

Definition at line 106 of file VecExtendedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ViewSplitterVMatrix &  o 
) [inline]

Definition at line 121 of file ViewSplitterVMatrix.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const TVec< T > &  v 
) [inline]

Read and Write from C++ stream: write saves length and read resizes accordingly (the raw modes don't write any size information)

Definition at line 147 of file TVec_impl.h.

{ 
    v.write(out); 
    return out;
}
template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const Array< T > &  a 
) [inline]

Definition at line 78 of file Array_impl.h.

References a, and writeSequence().

{ writeSequence(out, a); return out; }

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const HashMapFeatureSet &  o 
) [inline]

Definition at line 143 of file HashMapFeatureSet.h.

void PLearn::operator<< ( const Mat &  dest,
const VMatrix &  src 
) [inline]

Definition at line 141 of file VMat.h.

References PLearn::VMatrix::getMat(), PLearn::VMatrix::length(), PLearn::TMat< T >::length(), PLERROR, PLearn::VMatrix::width(), and PLearn::TMat< T >::width().

{
    if(dest.length()!=src.length() || dest.width()!=src.width())
        PLERROR("In operator<<(const Mat& dest, const VMatrix& src), incompatible dimensions");
    src.getMat(0,0,dest);
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const GeneralizedDistanceRBFKernel &  o 
) [inline]

Definition at line 76 of file GeneralizedDistanceRBFKernel.h.

void PLearn::operator<< ( const Mat &  dest,
const VMat &  src 
) [inline]

Definition at line 151 of file VMat.h.

{ dest << *(VMatrix*)src; }
template<class T >
ostream& PLearn::operator<< ( ostream &  out,
const TVec< T > &  v 
) [inline]

Definition at line 209 of file TVec_impl.h.

{ 
    v.print(out);
    return out;
}
ostream& PLearn::operator<< ( ostream &  out,
const Vec &  v 
) [inline]

Definition at line 56 of file Mat.h.

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

{ 
    v.print(out);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const MatrixElementsVariable &  o 
) [inline]

Definition at line 92 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
PStream& PLearn::operator<< ( PStream &  out,
const VecStatsCollector &  o 
) [inline]

Definition at line 338 of file VecStatsCollector.h.

PStream& PLearn::operator<< ( PStream &  out,
const GeodesicDistanceKernel &  o 
) [inline]

Definition at line 176 of file GeodesicDistanceKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const Calendar &  o 
) [inline]

Definition at line 312 of file Calendar.h.

PStream& PLearn::operator<< ( PStream &  out,
const IdentityFeatureSet &  o 
) [inline]

Definition at line 101 of file IdentityFeatureSet.h.

PStream& PLearn::operator<< ( PStream &  out,
const IIDNoiseKernel &  o 
) [inline]

Definition at line 146 of file IIDNoiseKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const HTMLHelpGenerator &  o 
) [inline]

Definition at line 116 of file HTMLHelpGenerator.h.

PStream& PLearn::operator<< ( PStream &  out,
const VMatLanguage &  o 
) [inline]

Definition at line 163 of file VMatLanguage.h.

: public RowBufferedVMatrix
PStream& PLearn::operator<< ( PStream &  out,
const PreprocessingVMatrix &  o 
) [inline]

Definition at line 198 of file VMatLanguage.h.

:1125)
PStream& PLearn::operator<< ( PStream &  out,
const NearestNeighborPredictionCost &  o 
) [inline]

Definition at line 125 of file NearestNeighborPredictionCost.h.

PStream& PLearn::operator<< ( PStream &  out,
const VMatrix &  o 
) [inline]

Definition at line 901 of file VMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const VMatrixFromDistribution &  o 
) [inline]

Definition at line 125 of file VMatrixFromDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const ObjectGenerator &  o 
) [inline]

Definition at line 96 of file ObjectGenerator.h.

PStream & PLearn::operator<< ( PStream &  out,
const VMField &  x 
)

Definition at line 75 of file VMField.cc.

References PLearn::VMField::fieldtype, and PLearn::VMField::name.

{
    out << x.name << x.fieldtype;
    return out;
}
void PLearn::operator<< ( const VVec &  vv,
const Vec &  v 
) [inline]

Definition at line 142 of file VVec.h.

References PLearn::VVec::copyFrom().

{ vv.copyFrom(v); }

Here is the call graph for this function:

void PLearn::operator<< ( const Vec &  v,
const VVec &  vv 
) [inline]

Definition at line 145 of file VVec.h.

References PLearn::VVec::toVec().

{ vv.toVec(v); }

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const PythonFeatureSet &  o 
) [inline]

Definition at line 109 of file PythonFeatureSet.h.

PStream& PLearn::operator<< ( PStream &  out,
const SetOption &  o 
) [inline]

Definition at line 113 of file SetOption.h.

PStream& PLearn::operator<< ( PStream &  out,
const VVMatrix &  o 
) [inline]

Definition at line 137 of file VVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const AnalyzeDond2DiscreteVariables &  o 
) [inline]

Definition at line 123 of file AnalyzeDond2DiscreteVariables.h.

PStream& PLearn::operator<< ( PStream &  out,
const AnalyzeFieldStats &  o 
) [inline]

Definition at line 178 of file AnalyzeFieldStats.h.

PStream& PLearn::operator<< ( PStream &  out,
const Kernel &  o 
) [inline]

Definition at line 270 of file Kernel.h.

: public PP<Kernel>
PStream& PLearn::operator<< ( PStream &  out,
const CheckDond2FileSequence &  o 
) [inline]

Definition at line 111 of file CheckDond2FileSequence.h.

PStream& PLearn::operator<< ( PStream &  out,
const PTest &  o 
) [inline]

Definition at line 127 of file PTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const ComputeDond2Target &  o 
) [inline]

Definition at line 154 of file ComputeDond2Target.h.

PStream& PLearn::operator<< ( PStream &  out,
const ComputePurenneError &  o 
) [inline]

Definition at line 79 of file ComputePurenneError.h.

PStream& PLearn::operator<< ( PStream &  out,
const PTimer &  o 
) [inline]

Definition at line 142 of file PTimer.h.

PStream& PLearn::operator<< ( PStream &  out,
const Ker &  o 
) [inline]

Definition at line 287 of file Kernel.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ConditionalMeanImputationVMatrix &  o 
) [inline]

Definition at line 109 of file ConditionalMeanImputationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CovariancePreservationImputationVMatrix &  o 
) [inline]

Definition at line 124 of file CovariancePreservationImputationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const Redirect &  o 
) [inline]

Definition at line 119 of file Redirect.h.

PStream& PLearn::operator<< ( PStream &  out,
const DichotomizeDond2DiscreteVariables &  o 
) [inline]

Definition at line 124 of file DichotomizeDond2DiscreteVariables.h.

PStream& PLearn::operator<< ( PStream &  out,
const WordNetFeatureSet &  o 
) [inline]

Definition at line 113 of file WordNetFeatureSet.h.

PStream& PLearn::operator<< ( PStream &  out,
const Experimentation &  o 
) [inline]

Definition at line 203 of file Experimentation.h.

PStream& PLearn::operator<< ( PStream &  out,
const KroneckerBaseKernel &  o 
) [inline]

Definition at line 139 of file KroneckerBaseKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RunObject &  o 
) [inline]

Definition at line 122 of file RunObject.h.

PStream& PLearn::operator<< ( PStream &  out,
const FixDond2BinaryVariables &  o 
) [inline]

Definition at line 137 of file FixDond2BinaryVariables.h.

PStream& PLearn::operator<< ( PStream &  out,
const MergeDond2Files &  o 
) [inline]

Definition at line 188 of file MergeDond2Files.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeighborhoodConditionalMean &  o 
) [inline]

Definition at line 233 of file NeighborhoodConditionalMean.h.

PStream& PLearn::operator<< ( PStream &  out,
const ShellScript &  o 
) [inline]

Definition at line 117 of file ShellScript.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeighborhoodImputationVMatrix &  o 
) [inline]

Definition at line 119 of file NeighborhoodImputationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const LaplacianKernel &  o 
) [inline]

Definition at line 76 of file LaplacianKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const HeapTest &  o 
) [inline]

Definition at line 129 of file HeapTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const Preprocessing &  o 
) [inline]

Definition at line 144 of file Preprocessing.h.

PStream& PLearn::operator<< ( PStream &  out,
const SecondIterationTester &  o 
) [inline]

Definition at line 100 of file SecondIterationTester.h.

PStream& PLearn::operator<< ( PStream &  out,
const SecondIterationWrapper &  o 
) [inline]

Definition at line 118 of file SecondIterationWrapper.h.

PStream& PLearn::operator<< ( PStream &  out,
const StabilisationLearner &  o 
) [inline]

Definition at line 145 of file StabilisationLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const LiftBinaryCostFunction &  o 
) [inline]

Definition at line 85 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
PStream& PLearn::operator<< ( PStream &  out,
const TestImputations &  o 
) [inline]

Definition at line 197 of file TestImputations.h.

PStream& PLearn::operator<< ( PStream &  out,
const WeightedDistance &  o 
) [inline]

Definition at line 83 of file WeightedDistance.h.

PStream& PLearn::operator<< ( PStream &  out,
const AutoScaledGradientOptimizer &  o 
) [inline]

Definition at line 124 of file AutoScaledGradientOptimizer.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryStump &  o 
) [inline]

Definition at line 159 of file BinaryStump.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const Storage< T > &  seq 
)

Definition at line 464 of file Storage.h.

References writeSequence().

{
    writeSequence(out, seq);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const OnlineGramNaturalGradientOptimizer &  o 
) [inline]

Definition at line 156 of file OnlineGramNaturalGradientOptimizer.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassifierFromConditionalPDistribution &  o 
) [inline]

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const LinearARDKernel &  o 
) [inline]

Definition at line 148 of file LinearARDKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassifierFromDensity &  o 
) [inline]

Definition at line 146 of file ClassifierFromDensity.h.

PStream& PLearn::operator<< ( PStream &  out,
const GradientOptimizer &  o 
) [inline]

Definition at line 126 of file GradientOptimizer.h.

PStream& PLearn::operator<< ( PStream &  out,
const KFoldLogisticClassifier &  o 
) [inline]

Definition at line 177 of file KFoldLogisticClassifier.h.

PStream& PLearn::operator<< ( PStream &  out,
const PerformanceEvaluator &  o 
) [inline]

Definition at line 122 of file PerformanceEvaluator.h.

PStream& PLearn::operator<< ( PStream &  out,
const LocalGaussianClassifier &  o 
) [inline]

Definition at line 214 of file LocalGaussianClassifier.h.

PStream& PLearn::operator<< ( PStream &  out,
const Optimizer &  o 
) [inline]

Definition at line 181 of file Optimizer.h.

PStream& PLearn::operator<< ( PStream &  out,
const FeatureSetNaiveBayesClassifier &  o 
) [inline]

Definition at line 165 of file FeatureSetNaiveBayesClassifier.h.

PStream& PLearn::operator<< ( PStream &  out,
const LLEKernel &  o 
) [inline]

Definition at line 160 of file LLEKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const KNNClassifier &  o 
) [inline]

Definition at line 217 of file KNNClassifier.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConjRosenbrock &  o 
) [inline]

Definition at line 97 of file ConjRosenbrock.h.

PStream& PLearn::operator<< ( PStream &  out,
const MultiInstanceNNet &  o 
) [inline]

Definition at line 172 of file MultiInstanceNNet.h.

ostream& PLearn::operator<< ( ostream &  out,
const StringTable &  st 
)

Definition at line 42 of file StringTable.cc.

References PLearn::StringTable::data, PLearn::StringTable::fieldnames, i, j, left(), PLearn::TVec< T >::length(), PLearn::StringTable::length(), and PLearn::StringTable::width().

{
    // find out width of each columns
    TVec<size_t> colsiz(st.width(),(size_t)0);
    for(int j=0;j<st.length();j++)
    {
        TVec<string> row=st.data(j);      
        for(int i=0;i<st.width();i++)
            if((size_t)row[i].length() > colsiz[i])
                colsiz[i]=(size_t)row[i].length();
    }
    for(int i=0;i<st.width();i++)
        if(st.fieldnames[i].length() > colsiz[i])
            colsiz[i]=(size_t)st.fieldnames[i].length();

    out<<"#: "; 
    for(int i=0;i<st.width();i++)
        out<<left(st.fieldnames[i],colsiz[i]+3);    
    out<<"\n";

    for(int j=0;j<st.length();j++)
    {
        TVec<string> row=st.data(j);      
        out<<"   ";
        for(int i=0;i<st.width();i++)
            out<<left(row[i],colsiz[i])<<";";
        out<<"\n";
    }

    return out;

}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const SVMClassificationTorch &  o 
) [inline]

Definition at line 161 of file SVMClassificationTorch.h.

PStream& PLearn::operator<< ( PStream &  out,
const PythonCodeSnippet &  o 
) [inline]

Definition at line 366 of file PythonCodeSnippet.h.

PStream& PLearn::operator<< ( PStream &  out,
const ToBagClassifier &  o 
) [inline]

Definition at line 159 of file ToBagClassifier.h.

PStream& PLearn::operator<< ( PStream &  out,
const LogOfGaussianDensityKernel &  o 
) [inline]

Definition at line 81 of file LogOfGaussianDensityKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConditionalDensityNet &  o 
) [inline]

Definition at line 320 of file ConditionalDensityNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConditionalDistribution &  o 
) [inline]

Definition at line 88 of file ConditionalDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConditionalGaussianDistribution &  o 
) [inline]

Definition at line 105 of file ConditionalGaussianDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const Distribution &  o 
) [inline]

Definition at line 147 of file Distribution.h.

:654)
PStream& PLearn::operator<< ( PStream &  out,
const ManifoldParzenKernel &  o 
) [inline]

Definition at line 87 of file ManifoldParzenKernel.h.

template<class T >
ostream& PLearn::operator<< ( ostream &  out,
const Array< T > &  a 
)

Definition at line 82 of file Array_impl.h.

References a.

{ a.print(out); return out; }
PStream& PLearn::operator<< ( PStream &  out,
const EmpiricalDistribution &  o 
) [inline]

Definition at line 101 of file EmpiricalDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianContinuumDistribution &  o 
) [inline]

Definition at line 279 of file GaussianContinuumDistribution.h.

PStream & PLearn::operator<< ( PStream &  out,
const GaussianProcessRegressor &  o 
) [inline]
PStream& PLearn::operator<< ( PStream &  out,
const Matern1ARDKernel &  o 
) [inline]

Definition at line 141 of file Matern1ARDKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const LocallyMagnifiedDistribution &  o 
) [inline]

Definition at line 161 of file LocallyMagnifiedDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeighborhoodBoxVolumeDensityEstimator &  o 
) [inline]

Definition at line 147 of file NeighborhoodBoxVolumeDensityEstimator.h.

PStream & PLearn::operator<< ( PStream &  out,
const PythonObjectWrapper &  v 
)

Definition at line 1015 of file PythonObjectWrapper.cc.

References PLearn::PythonObjectWrapper::getPyObject(), and PLERROR.

{
    out << v.getPyObject();
    return out;

    PLERROR("operator<<(PStream&, const PythonObjectWrapper&) : "
            "not supported (yet).");
/*
    PyObject* env= PyDict_New();
    if(0 != PyDict_SetItemString(env, "__builtins__", PyEval_GetBuiltins()))
        PLERROR("in operator<<(PStream&, const PythonObjectWrapper& v) : "
                "cannot insert builtins in env.");
    if(0 != PyDict_SetItemString(env, "the_obj", v.m_object))
        PLERROR("in operator<<(PStream&, const PythonObjectWrapper& v) : "
                "cannot insert the_obj in env.");
    PyObject* res= PyRun_String("\nfrom cPickle import *\nresult= dumps(the_obj)\n", 
                                Py_file_input, env, env);
    if(!res)
    {
        Py_DECREF(env);
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in operator<<(PStream&, const PythonObjectWrapper& v) : "
                "cannot pickle python object.");
    }
    Py_DECREF(res);
    string pickle= 
        PythonObjectWrapper(env).as<std::map<string, PythonObjectWrapper> >()["result"];
        Py_DECREF(env);
    string toout= string("PythonObjectWrapper(ownership=") + tostring(v.m_ownership) + ", object=\"" + pickle + "\")";
    out << toout;
*/
    return out; // shut up compiler
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const Object &  o 
) [inline]

Definition at line 1180 of file Object.h.

References PLearn::Object::newwrite().

{
    o.newwrite(out);
    return out;
}

Here is the call graph for this function:

PStream & PLearn::operator<< ( PStream &  out,
const PyObject *  v 
)

Definition at line 1056 of file PythonObjectWrapper.cc.

References PLearn::PythonObjectWrapper::as(), and PLERROR.

{
    PyObject* pystr= PyObject_Str(const_cast<PyObject*>(v));
    if(!pystr)
    {
        if (PyErr_Occurred()) PyErr_Print();
        PLERROR("in PythonTableVMatrix::build_ : "
                "access to underlying table's 'weightsize' failed.");
    }
    out << PythonObjectWrapper(pystr).as<string>();
    Py_DECREF(pystr);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const ReconstructionCandidate &  x 
) [inline]

Definition at line 152 of file TransformationLearner.h.

References PLearn::ReconstructionCandidate::neighborIdx, PLearn::ReconstructionCandidate::targetIdx, PLearn::ReconstructionCandidate::transformIdx, and PLearn::ReconstructionCandidate::weight.

{
    out << tuple<int, int, int, real>(x.targetIdx, x.neighborIdx, x.transformIdx, x.weight);
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const TransformationLearner &  o 
) [inline]

Definition at line 917 of file TransformationLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const MemoryCachedKernel &  o 
) [inline]

Definition at line 199 of file MemoryCachedKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianDistribution &  o 
) [inline]

Definition at line 112 of file GaussianDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussMix &  o 
) [inline]

Definition at line 536 of file GaussMix.h.

PStream& PLearn::operator<< ( PStream &  out,
const HistogramDistribution &  o 
) [inline]

Definition at line 179 of file HistogramDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const KernelDensityEstimator &  o 
) [inline]

Definition at line 177 of file KernelDensityEstimator.h.

PStream& PLearn::operator<< ( PStream &  out,
const PythonProcessedVMatrix &  o 
) [inline]

Definition at line 195 of file PythonProcessedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const MulticlassErrorCostFunction &  o 
) [inline]

Definition at line 72 of file MulticlassErrorCostFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const ManifoldParzen2 &  o 
) [inline]

Definition at line 139 of file ManifoldParzen2.h.

PStream& PLearn::operator<< ( PStream &  out,
const BasicIdentityCallsTest &  o 
) [inline]

Definition at line 144 of file BasicIdentityCallsTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const MixtureDistribution &  o 
) [inline]

Definition at line 217 of file MixtureDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const NGramDistribution &  o 
) [inline]

Definition at line 182 of file NGramDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const InjectionTest &  o 
) [inline]

Definition at line 133 of file InjectionTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const InferenceRBM &  o 
) [inline]

Definition at line 184 of file InferenceRBM.h.

PStream& PLearn::operator<< ( PStream &  out,
const NGramTree &  o 
) [inline]

Definition at line 145 of file NGramTree.h.

PStream& PLearn::operator<< ( PStream &  out,
const NegKernel &  o 
) [inline]

Definition at line 74 of file NegKernel.h.

{ return new NegKernel(k); }
PStream& PLearn::operator<< ( PStream &  out,
const NonLocalManifoldParzen &  o 
) [inline]

Definition at line 288 of file NonLocalManifoldParzen.h.

PStream& PLearn::operator<< ( PStream &  out,
const InstanceSnippetTest &  o 
) [inline]

Definition at line 197 of file InstanceSnippetTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const ParzenWindow &  o 
) [inline]

Definition at line 113 of file ParzenWindow.h.

PStream& PLearn::operator<< ( PStream &  out,
const PDistribution &  o 
) [inline]

Definition at line 349 of file PDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const InterfunctionXchgTest &  o 
) [inline]

Definition at line 134 of file InterfunctionXchgTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const NegLogProbCostFunction &  o 
) [inline]

Definition at line 95 of file NegLogProbCostFunction.h.

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs,outstart,outend); }
PStream& PLearn::operator<< ( PStream &  out,
const RandomGaussMix &  o 
) [inline]

Definition at line 107 of file RandomGaussMix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMDistribution &  o 
) [inline]

Definition at line 186 of file RBMDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const MemoryStressTest &  o 
) [inline]

Definition at line 139 of file MemoryStressTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const SpiralDistribution &  o 
) [inline]

Definition at line 145 of file SpiralDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const SymbolNode &  o 
) [inline]

Definition at line 144 of file SymbolNode.h.

PStream& PLearn::operator<< ( PStream &  out,
const UnconditionalDistribution &  o 
) [inline]

Definition at line 133 of file UnconditionalDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const NegOutputCostFunction &  o 
) [inline]

Definition at line 67 of file NegOutputCostFunction.h.

{ return new NegOutputCostFunction(); }
PStream& PLearn::operator<< ( PStream &  out,
const UniformDistribution &  o 
) [inline]

Definition at line 144 of file UniformDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const AddCostToLearner &  o 
) [inline]

Definition at line 228 of file AddCostToLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const AddLayersNNet &  o 
) [inline]

Definition at line 147 of file AddLayersNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeuralNetworkARDKernel &  o 
) [inline]

Definition at line 144 of file NeuralNetworkARDKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const ChainedLearners &  o 
) [inline]

Definition at line 186 of file ChainedLearners.h.

PStream& PLearn::operator<< ( PStream &  out,
const DeepNNet &  o 
) [inline]

Definition at line 213 of file DeepNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const Learner &  o 
) [inline]

Definition at line 568 of file Learner.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const NonLocalManifoldParzenKernel &  o 
) [inline]

Definition at line 83 of file NonLocalManifoldParzenKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeuralNet &  o 
) [inline]

Definition at line 158 of file NeuralNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const DistRepNNet &  o 
) [inline]

Definition at line 353 of file DistRepNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const EmbeddedLearner &  o 
) [inline]

Definition at line 200 of file EmbeddedLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const CorrelationProfiler &  o 
) [inline]

Definition at line 123 of file CorrelationProfiler.h.

PStream& PLearn::operator<< ( PStream &  out,
const AbsVariable &  o 
) [inline]

Definition at line 71 of file AbsVariable.h.

{ return new AbsVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const LocallyWeightedDistribution &  o 
) [inline]

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
PStream& PLearn::operator<< ( PStream &  out,
const DeepReconstructorNet &  o 
) [inline]

Definition at line 274 of file DeepReconstructorNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const NormalizedDotProductKernel &  o 
) [inline]

Definition at line 73 of file NormalizedDotProductKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const AffineTransformVariable &  o 
) [inline]

Definition at line 89 of file AffineTransformVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const mNNet &  o 
) [inline]

Definition at line 220 of file mNNet.h.

PStream & PLearn::operator<< ( PStream &  out,
const NatGradEstimator &  o 
) [inline]

Definition at line 192 of file NatGradItEstimator.h.

PStream& PLearn::operator<< ( PStream &  out,
const NatGradNNet &  o 
) [inline]

Definition at line 314 of file NatGradNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const AffineTransformWeightPenalty &  o 
) [inline]

Definition at line 111 of file AffineTransformWeightPenalty.h.

{ return new AffineTransformWeightPenalty(transformation, weight_decay, bias_decay, penalty_type); } 
PStream& PLearn::operator<< ( PStream &  out,
const PLearnerDiagonalKernel &  o 
) [inline]

Definition at line 127 of file PLearnerDiagonalKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const NatGradSMPNNet &  o 
) [inline]

Definition at line 364 of file NatGradSMPNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const PvGradNNet &  o 
) [inline]

Definition at line 171 of file PvGradNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const ArgmaxVariable &  o 
) [inline]

Definition at line 74 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const FeatureSetNNet &  o 
) [inline]

Definition at line 441 of file FeatureSetNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const GradientCorrector &  o 
) [inline]

Definition at line 132 of file GradientCorrector.h.

PStream& PLearn::operator<< ( PStream &  out,
const ArgminVariable &  o 
) [inline]

Definition at line 74 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const HorizonStatefulLearner &  o 
) [inline]

Definition at line 106 of file HorizonStatefulLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const PolynomialKernel &  o 
) [inline]

Definition at line 103 of file PolynomialKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const IdentityPLearner &  o 
) [inline]

Definition at line 93 of file IdentityPLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const IncrementalNNet &  o 
) [inline]

Definition at line 254 of file IncrementalNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeighborhoodSmoothnessNNet &  o 
) [inline]

Definition at line 173 of file NeighborhoodSmoothnessNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const BiasWeightAffineTransformVariable &  o 
) [inline]

Definition at line 98 of file BiasWeightAffineTransformVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const SupervisedDBN &  o 
) [inline]

Definition at line 383 of file SupervisedDBN.h.

PStream& PLearn::operator<< ( PStream &  out,
const NNet &  o 
) [inline]

Definition at line 291 of file NNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryClassificationLossVariable &  o 
) [inline]

Definition at line 84 of file BinaryClassificationLossVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const PLearner &  o 
) [inline]

Definition at line 727 of file PLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const PowDistanceKernel &  o 
) [inline]

Definition at line 78 of file PowDistanceKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const PythonProcessedLearner &  o 
) [inline]

Definition at line 208 of file PythonProcessedLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryVariable &  o 
) [inline]

Definition at line 101 of file BinaryVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const SelectInputSubsetLearner &  o 
) [inline]

Definition at line 149 of file SelectInputSubsetLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const StackedLearner &  o 
) [inline]

Definition at line 221 of file StackedLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const PrecomputedKernel &  o 
) [inline]

Definition at line 99 of file PrecomputedKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const MultiMaxVariable &  o 
) [inline]

Definition at line 162 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
PStream& PLearn::operator<< ( PStream &  out,
const StatefulLearner &  o 
) [inline]

Definition at line 153 of file StatefulLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const CCCostVariable &  o 
) [inline]

Definition at line 97 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
PStream& PLearn::operator<< ( PStream &  out,
const TestingLearner &  o 
) [inline]

Definition at line 177 of file TestingLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassificationLossVariable &  o 
) [inline]

Definition at line 77 of file ClassificationLossVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const IsomapTangentLearner &  o 
) [inline]

Definition at line 181 of file IsomapTangentLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const TorchLearner &  o 
) [inline]

Definition at line 180 of file TorchLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const PricingTransactionPairProfitFunction &  o 
) [inline]

Definition at line 95 of file PricingTransactionPairProfitFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const TransformOutputLearner &  o 
) [inline]

Definition at line 134 of file TransformOutputLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const VPLCombinedLearner &  o 
) [inline]

Definition at line 183 of file VPLCombinedLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const ColumnIndexVariable &  o 
) [inline]

Definition at line 75 of file ColumnIndexVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const VPLPreprocessedLearner &  o 
) [inline]

Definition at line 197 of file VPLPreprocessedLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const VPLPreprocessedLearner2 &  o 
) [inline]

Definition at line 215 of file VPLPreprocessedLearner2.h.

PStream& PLearn::operator<< ( PStream &  out,
const VPLProcessor &  o 
) [inline]

Definition at line 177 of file VPLProcessor.h.

PStream& PLearn::operator<< ( PStream &  out,
const QuadraticUtilityCostFunction &  o 
) [inline]

Definition at line 83 of file QuadraticUtilityCostFunction.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ConcatColumnsVariable &  o 
) [inline]

Definition at line 79 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
PStream& PLearn::operator<< ( PStream &  out,
const CartesianProductOracle &  o 
) [inline]

Definition at line 111 of file CartesianProductOracle.h.

PStream& PLearn::operator<< ( PStream &  out,
const EarlyStoppingOracle &  o 
) [inline]

Definition at line 140 of file EarlyStoppingOracle.h.

PStream& PLearn::operator<< ( PStream &  out,
const LogSoftSoftMaxVariable &  o 
) [inline]

Definition at line 132 of file LogSoftSoftMaxVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExplicitListOracle &  o 
) [inline]

Definition at line 118 of file ExplicitListOracle.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConcatOfVariable &  o 
) [inline]

Definition at line 85 of file ConcatOfVariable.h.

{ return new ConcatOfVariable(distr,f); }
PStream& PLearn::operator<< ( PStream &  out,
const RationalQuadraticARDKernel &  o 
) [inline]

Definition at line 172 of file RationalQuadraticARDKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const HyperCommand &  o 
) [inline]

Definition at line 132 of file HyperCommand.h.

PStream& PLearn::operator<< ( PStream &  out,
const HyperLearner &  o 
) [inline]

Definition at line 123 of file HyperLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConcatRowsVariable &  o 
) [inline]

Definition at line 77 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
PStream& PLearn::operator<< ( PStream &  out,
const HyperOptimize &  o 
) [inline]

Definition at line 194 of file HyperOptimize.h.

PStream& PLearn::operator<< ( PStream &  out,
const HyperRetrain &  o 
) [inline]

Definition at line 116 of file HyperRetrain.h.

PStream& PLearn::operator<< ( PStream &  out,
const HyperSetOption &  o 
) [inline]

Definition at line 115 of file HyperSetOption.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConfRatedAdaboostCostVariable &  o 
) [inline]

Definition at line 74 of file ConfRatedAdaboostCostVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ConvolveVariable &  o 
) [inline]

Definition at line 72 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
PStream& PLearn::operator<< ( PStream &  out,
const OptimizeOptionOracle &  o 
) [inline]

Definition at line 128 of file OptimizeOptionOracle.h.

PStream& PLearn::operator<< ( PStream &  out,
const OptionsOracle &  o 
) [inline]

Definition at line 132 of file OptionsOracle.h.

PStream& PLearn::operator<< ( PStream &  out,
const ReconstructionWeightsKernel &  o 
) [inline]

Definition at line 213 of file ReconstructionWeightsKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const OracleObjectGenerator &  o 
) [inline]

Definition at line 102 of file OracleObjectGenerator.h.

PStream& PLearn::operator<< ( PStream &  out,
const StepwiseSelectionOracle &  o 
) [inline]

Definition at line 145 of file StepwiseSelectionOracle.h.

PStream& PLearn::operator<< ( PStream &  out,
const CrossEntropyVariable &  o 
) [inline]

Definition at line 74 of file CrossEntropyVariable.h.

{ return new CrossEntropyVariable(network_output, targets); }
PStream& PLearn::operator<< ( PStream &  out,
const ScaledGaussianKernel &  o 
) [inline]

Definition at line 80 of file ScaledGaussianKernel.h.

ostream& PLearn::operator<< ( ostream &  out,
ProbabilitySparseMatrix &  pyx 
) [inline]

Definition at line 545 of file ProbabilitySparseMatrix.h.

References endl(), NUMWIDTH, PLearn::ProbabilitySparseMatrix::nx(), PLearn::ProbabilitySparseMatrix::ny(), PLearn::ProbabilitySparseMatrix::raise_error, and x.

{
    bool re = pyx.raise_error;
    pyx.raise_error = false;
    for (int y = 0; y < pyx.ny(); y++)
    {
        for (int x = 0; x < pyx.nx(); x++)
        {
            out << setw(NUMWIDTH) << pyx(y, x);
        }
        out << endl;
    }
    pyx.raise_error = re;
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const CutAboveThresholdVariable &  o 
) [inline]

Definition at line 74 of file CutAboveThresholdVariable.h.

{ return new CutAboveThresholdVariable(v,threshold); }
PStream& PLearn::operator<< ( PStream &  out,
const PPointableSet &  pp_set 
) [inline]

Definition at line 16 of file Set.h.

{ out << static_cast<const set<int> &>(pp_set); return out; }
PStream& PLearn::operator<< ( PStream &  out,
const CutBelowThresholdVariable &  o 
) [inline]

Definition at line 74 of file CutBelowThresholdVariable.h.

{ return new CutBelowThresholdVariable(v,threshold); }
PStream& PLearn::operator<< ( PStream &  out,
const ScaledGeneralizedDistanceRBFKernel &  o 
) [inline]

Definition at line 79 of file ScaledGeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const AdaBoost &  o 
) [inline]

Definition at line 226 of file AdaBoost.h.

PStream& PLearn::operator<< ( PStream &  out,
const BaggingLearner &  o 
) [inline]

Definition at line 154 of file BaggingLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const CompareLearner &  o 
) [inline]

Definition at line 171 of file CompareLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const DiverseComponentAnalysis &  o 
) [inline]

Definition at line 240 of file DiverseComponentAnalysis.h.

PStream& PLearn::operator<< ( PStream &  out,
const DeterminantVariable &  o 
) [inline]

Definition at line 76 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
PStream& PLearn::operator<< ( PStream &  out,
const MultiClassAdaBoost &  o 
) [inline]

Definition at line 220 of file MultiClassAdaBoost.h.

PStream& PLearn::operator<< ( PStream &  out,
const ScaledLaplacianKernel &  o 
) [inline]

Definition at line 73 of file ScaledLaplacianKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const Experiment &  o 
) [inline]

Definition at line 108 of file Experiment.h.

PStream& PLearn::operator<< ( PStream &  out,
const DiagonalizedFactorsProductVariable &  o 
) [inline]

Definition at line 85 of file DiagonalizedFactorsProductVariable.h.

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }
PStream& PLearn::operator<< ( PStream &  out,
const GenerateDecisionPlot &  o 
) [inline]

Definition at line 115 of file GenerateDecisionPlot.h.

PStream& PLearn::operator<< ( PStream &  out,
const DilogarithmVariable &  o 
) [inline]

Definition at line 73 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const SelectedOutputCostFunction &  o 
) [inline]

Definition at line 82 of file SelectedOutputCostFunction.h.

PStream & PLearn::operator<< ( PStream &  out,
const PTester &  o 
) [inline]

Definition at line 133 of file PExperiment.h.

PStream& PLearn::operator<< ( PStream &  out,
const Grapher &  o 
) [inline]

Definition at line 127 of file Grapher.h.

PStream& PLearn::operator<< ( PStream &  out,
const DivVariable &  o 
) [inline]

Definition at line 79 of file DivVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const DotProductVariable &  o 
) [inline]

Definition at line 79 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
PStream& PLearn::operator<< ( PStream &  out,
const PrecomputedProcessedLearner &  o 
) [inline]

Definition at line 141 of file PrecomputedProcessedLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const SigmoidalKernel &  o 
) [inline]

Definition at line 73 of file SigmoidalKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const VariableSelectionWithDirectedGradientDescent &  o 
) [inline]
PStream& PLearn::operator<< ( PStream &  out,
const BallTreeNearestNeighbors &  o 
) [inline]

Definition at line 210 of file BallTreeNearestNeighbors.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryBallTree &  o 
) [inline]

Definition at line 130 of file BinaryBallTree.h.

PStream& PLearn::operator<< ( PStream &  out,
const DuplicateColumnVariable &  o 
) [inline]

Definition at line 79 of file DuplicateColumnVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const ExhaustiveNearestNeighbors &  o 
) [inline]

Definition at line 197 of file ExhaustiveNearestNeighbors.h.

PStream& PLearn::operator<< ( PStream &  out,
const SigmoidPrimitiveKernel &  o 
) [inline]

Definition at line 76 of file SigmoidPrimitiveKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const DuplicateRowVariable &  o 
) [inline]

Definition at line 78 of file DuplicateRowVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const GenericNearestNeighbors &  o 
) [inline]

Definition at line 179 of file GenericNearestNeighbors.h.

PStream& PLearn::operator<< ( PStream &  out,
const ArgmaxModule &  o 
) [inline]

Definition at line 263 of file ArgmaxModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const DuplicateScalarVariable &  o 
) [inline]

Definition at line 79 of file DuplicateScalarVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const BackConvolution2DModule &  o 
) [inline]

Definition at line 248 of file BackConvolution2DModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SourceKernel &  o 
) [inline]

Definition at line 129 of file SourceKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinarizeModule &  o 
) [inline]

Definition at line 289 of file BinarizeModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ElementAtPositionVariable &  o 
) [inline]

Definition at line 84 of file ElementAtPositionVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassErrorCostModule &  o 
) [inline]

Definition at line 150 of file ClassErrorCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const CombiningCostsModule &  o 
) [inline]

Definition at line 175 of file CombiningCostsModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const EqualConstantVariable &  o 
) [inline]

Definition at line 78 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
PStream& PLearn::operator<< ( PStream &  out,
const Convolution2DModule &  o 
) [inline]

Definition at line 257 of file Convolution2DModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SquaredErrorCostFunction &  o 
) [inline]

Definition at line 86 of file SquaredErrorCostFunction.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const CostModule &  o 
) [inline]

Definition at line 198 of file CostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const EqualScalarVariable &  o 
) [inline]

Definition at line 74 of file EqualScalarVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const CrossEntropyCostModule &  o 
) [inline]

Definition at line 123 of file CrossEntropyCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const DeepBeliefNet &  o 
) [inline]

Definition at line 528 of file DeepBeliefNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const EqualVariable &  o 
) [inline]

Definition at line 76 of file EqualVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianDBNClassification &  o 
) [inline]

Definition at line 299 of file GaussianDBNClassification.h.

PStream& PLearn::operator<< ( PStream &  out,
const SquaredExponentialARDKernel &  o 
) [inline]

Definition at line 153 of file SquaredExponentialARDKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianDBNRegression &  o 
) [inline]

Definition at line 286 of file GaussianDBNRegression.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussPartSupervisedDBN &  o 
) [inline]

Definition at line 380 of file GaussPartSupervisedDBN.h.

PStream& PLearn::operator<< ( PStream &  out,
const ErfVariable &  o 
) [inline]

Definition at line 69 of file ErfVariable.h.

{ return new ErfVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const HintonDeepBeliefNet &  o 
) [inline]

Definition at line 342 of file HintonDeepBeliefNet.h.

ostream & PLearn::operator<< ( ostream &  out,
const vector< string > &  vs 
)

formatted printing of vector<string> prints strings separated by a ", "

Definition at line 697 of file stringutils.cc.

{
    vector<string>::const_iterator it = vs.begin();
    if(it!=vs.end())
    {
        out << *it;
        ++it;
    }
    while(it!=vs.end())
    {
        out << ", " << *it;
        ++it;
    }
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const NLLErrModule &  o 
) [inline]

Definition at line 140 of file NLLErrModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const AdditiveGaussianNoiseVariable &  o 
) [inline]

Definition at line 140 of file AdditiveGaussianNoiseVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const SummationKernel &  o 
) [inline]

Definition at line 145 of file SummationKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const PartSupervisedDBN &  o 
) [inline]

Definition at line 375 of file PartSupervisedDBN.h.

PStream & PLearn::operator<< ( PStream &  out,
const RBMBinomialLayer &  o 
) [inline]

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const BernoulliSampleVariable &  o 
) [inline]

Definition at line 137 of file BernoulliSampleVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMConv2DLLParameters &  o 
) [inline]

Definition at line 236 of file RBMConv2DLLParameters.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConstrainedSourceVariable &  o 
) [inline]

Definition at line 124 of file ConstrainedSourceVariable.h.

PStream & PLearn::operator<< ( PStream &  out,
const RBMGaussianLayer &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const ThresholdedKernel &  o 
) [inline]

Definition at line 178 of file ThresholdedKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMGenericParameters &  o 
) [inline]

Definition at line 214 of file RBMGenericParameters.h.

PStream & PLearn::operator<< ( PStream &  out,
const Molecule &  o 
) [inline]

Definition at line 67 of file Molecule.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMJointGenericParameters &  o 
) [inline]

Definition at line 197 of file RBMJointGenericParameters.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConstrainVariable &  o 
) [inline]

Definition at line 81 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const RBMJointLLParameters &  o 
) [inline]

Definition at line 184 of file RBMJointLLParameters.h.

PStream & PLearn::operator<< ( PStream &  out,
const RBMLayer &  o 
) [inline]

Definition at line 166 of file DEPRECATED/RBMLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const Cov2CorrVariable &  o 
) [inline]

Definition at line 82 of file Cov2CorrVariable.h.

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }
PStream& PLearn::operator<< ( PStream &  out,
const RBMLLParameters &  o 
) [inline]

Definition at line 208 of file RBMLLParameters.h.

PStream& PLearn::operator<< ( PStream &  out,
const VMatKernel &  o 
) [inline]

Definition at line 149 of file VMatKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMLQParameters &  o 
) [inline]

Definition at line 195 of file RBMLQParameters.h.

PStream & PLearn::operator<< ( PStream &  out,
const RBMMixedLayer &  o 
) [inline]

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const DiagVariable &  o 
) [inline]

Definition at line 77 of file DiagVariable.h.

{ return new DiagVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const WeightedCostFunction &  o 
) [inline]

Definition at line 80 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
PStream & PLearn::operator<< ( PStream &  out,
const RBMMultinomialLayer &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const DoubleProductVariable &  o 
) [inline]

Definition at line 138 of file DoubleProductVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMParameters &  o 
) [inline]

Definition at line 196 of file RBMParameters.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMQLParameters &  o 
) [inline]

Definition at line 195 of file RBMQLParameters.h.

PStream& PLearn::operator<< ( PStream &  out,
const LinearCombinationOfScalarVariables &  o 
) [inline]

Definition at line 157 of file LinearCombinationOfScalarVariables.h.

PStream & PLearn::operator<< ( PStream &  out,
const RBMTruncExpLayer &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const SquaredErrModule &  o 
) [inline]

Definition at line 133 of file SquaredErrModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const WeightedQuadraticPolynomialKernel &  o 
) [inline]

Definition at line 93 of file WeightedQuadraticPolynomialKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const StackedModulesLearner &  o 
) [inline]

Definition at line 214 of file StackedModulesLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const StackedModulesModule &  o 
) [inline]

Definition at line 199 of file StackedModulesModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const UndirectedSoftmaxModule &  o 
) [inline]

Definition at line 147 of file UndirectedSoftmaxModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const MultiSampleVariable &  o 
) [inline]

Definition at line 142 of file MultiSampleVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const UnfrozenDeepBeliefNet &  o 
) [inline]

Definition at line 125 of file UnfrozenDeepBeliefNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const KLp0p1RBMModule &  o 
) [inline]

Definition at line 338 of file KLp0p1RBMModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const NonDiagVariable &  o 
) [inline]

Definition at line 77 of file NonDiagVariable.h.

{ return new NonDiagVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const SemiSupervisedDBN &  o 
) [inline]

Definition at line 170 of file SemiSupervisedDBN.h.

template<class Key , class Value >
ostream& PLearn::operator<< ( ostream &  out,
const map< Key, Value > &  m 
)

Definition at line 64 of file pl_io.h.

References flush(), m, and PLASSERT.

{
    out << "{" << flush;
    typename map<Key,Value>::const_iterator it  = m.begin();

    if ( m.size() > 0 )
    {
        for ( unsigned int elem = 0; elem < m.size()-1; elem++, it++ ) 
            out << it->first << " : " << it->second << ", " << flush;

        PLASSERT( it != m.end() );
        out << it->first << " : " << it->second << flush;
    }
  
    out << "}" << flush;
    return out;
}

Here is the call graph for this function:

template<class U , class V >
ostream& PLearn::operator<< ( ostream &  out,
const pair< U, V > &  p 
)

Formatted printing of a pair<U,V> as U:V.

Definition at line 321 of file stringutils.h.

{
    return out << p.first << ':' << p.second;
}
PStream& PLearn::operator<< ( PStream &  out,
const SubsamplingDBN &  o 
) [inline]

Definition at line 439 of file SubsamplingDBN.h.

PStream& PLearn::operator<< ( PStream &  out,
const TreeDBNModule &  o 
) [inline]

Definition at line 372 of file TreeDBNModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ProbabilityPairsInverseVariable &  o 
) [inline]

Definition at line 140 of file ProbabilityPairsInverseVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const ForwardModule &  o 
) [inline]

Definition at line 178 of file ForwardModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const Binner &  o 
) [inline]

Definition at line 123 of file Binner.h.

PStream& PLearn::operator<< ( PStream &  out,
const GradNNetLayerModule &  o 
) [inline]

Definition at line 185 of file GradNNetLayerModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ProbabilityPairsVariable &  o 
) [inline]

Definition at line 143 of file ProbabilityPairsVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const IdentityModule &  o 
) [inline]

Definition at line 190 of file IdentityModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const RandomForcedValuesVariable &  o 
) [inline]

Definition at line 141 of file RandomForcedValuesVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const LayerCostModule &  o 
) [inline]

Definition at line 245 of file LayerCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SaltPepperNoiseVariable &  o 
) [inline]

Definition at line 143 of file SaltPepperNoiseVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const LinearCombinationModule &  o 
) [inline]

Definition at line 279 of file LinearCombinationModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const MinVariable &  o 
) [inline]

Definition at line 68 of file MinVariable.h.

{ return new MinVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const LinearFilterModule &  o 
) [inline]

Definition at line 188 of file LinearFilterModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const LogaddOnBagsModule &  o 
) [inline]

Definition at line 108 of file LogaddOnBagsModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixModule &  o 
) [inline]

Definition at line 224 of file MatrixModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SoftSoftMaxVariable &  o 
) [inline]

Definition at line 133 of file SoftSoftMaxVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const MaxSubsampling2DModule &  o 
) [inline]

Definition at line 203 of file MaxSubsampling2DModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const MulticlassLossVariable &  o 
) [inline]

Definition at line 79 of file MulticlassLossVariable.h.

{ return new MulticlassLossVariable(network_output, targets); }
PStream& PLearn::operator<< ( PStream &  out,
const ModuleLearner &  o 
) [inline]

Definition at line 210 of file ModuleLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const SumEntropyOfBernoullis &  o 
) [inline]

Definition at line 139 of file SumEntropyOfBernoullis.h.

PStream& PLearn::operator<< ( PStream &  out,
const ModulesLearner &  o 
) [inline]

Definition at line 184 of file ModulesLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConditionalCDFSmoother &  o 
) [inline]

Definition at line 127 of file ConditionalCDFSmoother.h.

PStream& PLearn::operator<< ( PStream &  out,
const ModuleStackModule &  o 
) [inline]

Definition at line 182 of file ModuleStackModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SumEntropyOfCategoricals &  o 
) [inline]

Definition at line 139 of file SumEntropyOfCategoricals.h.

PStream& PLearn::operator<< ( PStream &  out,
const ModuleTester &  o 
) [inline]

Definition at line 132 of file ModuleTester.h.

PStream& PLearn::operator<< ( PStream &  out,
const NetworkConnection &  o 
) [inline]

Definition at line 143 of file NetworkConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const SumVarianceOfLinearTransformedBernoullis &  o 
) [inline]

Definition at line 144 of file SumVarianceOfLinearTransformedBernoullis.h.

PStream& PLearn::operator<< ( PStream &  out,
const NetworkModule &  o 
) [inline]

Definition at line 185 of file NetworkModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConditionalStatsCollector &  o 
) [inline]

Definition at line 172 of file ConditionalStatsCollector.h.

PStream& PLearn::operator<< ( PStream &  out,
const NLLCostModule &  o 
) [inline]

Definition at line 145 of file NLLCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SumVarianceOfLinearTransformedCategoricals &  o 
) [inline]
PStream& PLearn::operator<< ( PStream &  out,
const NullModule &  o 
) [inline]

Definition at line 207 of file NullModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const OnBagsModule &  o 
) [inline]

Definition at line 155 of file OnBagsModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const X o 
) [inline]

Definition at line 172 of file ObjectGraphIteratorTest.cc.

: public X
PStream& PLearn::operator<< ( PStream &  out,
const TimesConstantScalarVariable2 &  o 
) [inline]

Definition at line 74 of file TimesConstantScalarVariable2.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const OnlineLearningModule &  o 
) [inline]

Definition at line 333 of file OnlineLearningModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConstantRealFunction &  o 
) [inline]

Definition at line 121 of file ConstantRealFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const ProcessInputCostModule &  o 
) [inline]

Definition at line 190 of file ProcessInputCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMClassificationModule &  o 
) [inline]

Definition at line 190 of file RBMClassificationModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const TraceVariable &  o 
) [inline]

Definition at line 77 of file TraceVariable.h.

{ return new TraceVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const RBMConnection &  o 
) [inline]

Definition at line 291 of file RBMConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const WPLS &  o 
) [inline]

Definition at line 185 of file WPLS.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMConv2DConnection &  o 
) [inline]

Definition at line 242 of file RBMConv2DConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const TransposedDoubleProductVariable &  o 
) [inline]

Definition at line 140 of file TransposedDoubleProductVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMDiagonalMatrixConnection &  o 
) [inline]

Definition at line 220 of file RBMDiagonalMatrixConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMLateralBinomialLayer &  o 
) [inline]

Definition at line 302 of file RBMLateralBinomialLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExpVariable &  o 
) [inline]

Definition at line 71 of file ExpVariable.h.

{ return new ExpVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const RBMLocalMultinomialLayer &  o 
) [inline]

Definition at line 181 of file RBMLocalMultinomialLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExtendedVariable &  o 
) [inline]

Definition at line 97 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
PStream& PLearn::operator<< ( PStream &  out,
const RBMMatrixConnection &  o 
) [inline]

Definition at line 296 of file RBMMatrixConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMMatrixConnectionNatGrad &  o 
) [inline]

Definition at line 121 of file RBMMatrixConnectionNatGrad.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMMatrixTransposeConnection &  o 
) [inline]

Definition at line 216 of file RBMMatrixTransposeConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExtractVariable &  o 
) [inline]

Definition at line 86 of file ExtractVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const RBMMixedConnection &  o 
) [inline]

Definition at line 243 of file RBMMixedConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMModule &  o 
) [inline]

Definition at line 388 of file RBMModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const StatsIterator &  o 
) [inline]

Definition at line 108 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const FNetLayerVariable &  o 
) [inline]

Definition at line 119 of file FNetLayerVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMMultitaskClassificationModule &  o 
) [inline]

Definition at line 201 of file RBMMultitaskClassificationModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMRateLayer &  o 
) [inline]

Definition at line 158 of file RBMRateLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const Function &  o 
) [inline]

Definition at line 208 of file Func.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMSparse1DMatrixConnection &  o 
) [inline]

Definition at line 146 of file RBMSparse1DMatrixConnection.h.

PStream& PLearn::operator<< ( PStream &  out,
const Y &  o 
) [inline]

Definition at line 192 of file ObjectGraphIteratorTest.cc.

: public Object
PStream& PLearn::operator<< ( PStream &  out,
const MeanStatsIterator &  o 
) [inline]

Definition at line 134 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const RBMTrainer &  o 
) [inline]

Definition at line 174 of file RBMTrainer.h.

PStream& PLearn::operator<< ( PStream &  out,
const Func &  o 
) [inline]

Definition at line 209 of file Func.h.

PStream& PLearn::operator<< ( PStream &  out,
const RBMWoodsLayer &  o 
) [inline]

Definition at line 211 of file RBMWoodsLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const GaussianProcessNLLVariable &  o 
) [inline]

Definition at line 230 of file GaussianProcessNLLVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const ScaleGradientModule &  o 
) [inline]

Definition at line 123 of file ScaleGradientModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ShuntingNNetLayerModule &  o 
) [inline]

Definition at line 172 of file ShuntingNNetLayerModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const GradientAdaboostCostVariable &  o 
) [inline]

Definition at line 80 of file GradientAdaboostCostVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const SoftmaxModule &  o 
) [inline]

Definition at line 132 of file SoftmaxModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const ExpMeanStatsIterator &  o 
) [inline]

Definition at line 161 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const SoftmaxNLLCostModule &  o 
) [inline]

Definition at line 147 of file SoftmaxNLLCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const SplitModule &  o 
) [inline]

Definition at line 184 of file SplitModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const HardSlopeVariable &  o 
) [inline]

Definition at line 73 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
PStream& PLearn::operator<< ( PStream &  out,
const SquaredErrorCostModule &  o 
) [inline]

Definition at line 132 of file SquaredErrorCostModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const StddevStatsIterator &  o 
) [inline]

Definition at line 190 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const StackedAutoassociatorsNet &  o 
) [inline]

Definition at line 595 of file StackedAutoassociatorsNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const HeterogenuousAffineTransformVariable &  o 
) [inline]

Definition at line 113 of file HeterogenuousAffineTransformVariable.h.

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }
PStream& PLearn::operator<< ( PStream &  out,
const Subsampling2DModule &  o 
) [inline]

Definition at line 229 of file Subsampling2DModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const Supersampling2DModule &  o 
) [inline]

Definition at line 229 of file Supersampling2DModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const TanhModule &  o 
) [inline]

Definition at line 137 of file TanhModule.h.

PStream& PLearn::operator<< ( PStream &  out,
const HeterogenuousAffineTransformWeightPenalty &  o 
) [inline]

Definition at line 119 of file HeterogenuousAffineTransformWeightPenalty.h.

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }
PStream& PLearn::operator<< ( PStream &  out,
const StderrStatsIterator &  o 
) [inline]

Definition at line 219 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const NegateElementsVariable &  o 
) [inline]

Definition at line 82 of file NegateElementsVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const VBoundDBN2 &  o 
) [inline]

Definition at line 297 of file VBoundDBN2.h.

PStream& PLearn::operator<< ( PStream &  out,
const Z &  o 
) [inline]

Definition at line 219 of file ObjectGraphIteratorTest.cc.

{
PStream& PLearn::operator<< ( PStream &  out,
const IdentityVariable &  o 
) [inline]

Definition at line 61 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const AutoLinearRegressor &  o 
) [inline]

Definition at line 185 of file AutoLinearRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const BaseRegressorConfidence &  o 
) [inline]

Definition at line 113 of file BaseRegressorConfidence.h.

PStream& PLearn::operator<< ( PStream &  out,
const IfThenElseVariable &  o 
) [inline]

Definition at line 84 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
PStream& PLearn::operator<< ( PStream &  out,
const BaseRegressorWrapper &  o 
) [inline]

Definition at line 116 of file BaseRegressorWrapper.h.

PStream& PLearn::operator<< ( PStream &  out,
const SharpeRatioStatsIterator &  o 
) [inline]

Definition at line 254 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const BasisSelectionRegressor &  o 
) [inline]

Definition at line 248 of file BasisSelectionRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConstantRegressor &  o 
) [inline]

Definition at line 163 of file ConstantRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const IndexAtPositionVariable &  o 
) [inline]

Definition at line 79 of file IndexAtPositionVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const CubicSpline &  o 
) [inline]

Definition at line 152 of file CubicSpline.h.

PStream& PLearn::operator<< ( PStream &  out,
const InsertZerosVariable &  o 
) [inline]

Definition at line 72 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
PStream& PLearn::operator<< ( PStream &  out,
const MinStatsIterator &  o 
) [inline]

Definition at line 277 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const LinearRegressor &  o 
) [inline]

Definition at line 210 of file LinearRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const InterValuesVariable &  o 
) [inline]

Definition at line 76 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
PStream& PLearn::operator<< ( PStream &  out,
const LocalMedBoost &  o 
) [inline]

Definition at line 162 of file LocalMedBoost.h.

PStream& PLearn::operator<< ( PStream &  out,
const MaxStatsIterator &  o 
) [inline]

Definition at line 300 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const PLS &  o 
) [inline]

Definition at line 192 of file PLS.h.

PStream& PLearn::operator<< ( PStream &  out,
const InvertElementsVariable &  o 
) [inline]

Definition at line 70 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const PruningLinearRegressor &  o 
) [inline]

Definition at line 136 of file PruningLinearRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const RankLearner &  o 
) [inline]

Definition at line 178 of file RankLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegressionTree &  o 
) [inline]

Definition at line 133 of file RegressionTree.h.

PStream& PLearn::operator<< ( PStream &  out,
const MeshVertex &  o 
) [inline]

Definition at line 129 of file MeshVertex.h.

PStream& PLearn::operator<< ( PStream &  out,
const IsAboveThresholdVariable &  o 
) [inline]

Definition at line 78 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }
PStream& PLearn::operator<< ( PStream &  out,
const LiftStatsIterator &  o 
) [inline]

Definition at line 338 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeMulticlassLeave &  o 
) [inline]

Definition at line 97 of file RegressionTreeMulticlassLeave.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeMulticlassLeaveFast &  o 
) [inline]

Definition at line 95 of file RegressionTreeMulticlassLeaveFast.h.

PStream& PLearn::operator<< ( PStream &  out,
const IsLargerVariable &  o 
) [inline]

Definition at line 75 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
PStream& PLearn::operator<< ( PStream &  out,
const ObjectGraphIteratorTest &  o 
) [inline]

Definition at line 130 of file ObjectGraphIteratorTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeMulticlassLeaveProb &  o 
) [inline]

Definition at line 96 of file RegressionTreeMulticlassLeaveProb.h.

PStream& PLearn::operator<< ( PStream &  out,
const QuantilesStatsIterator &  o 
) [inline]

Definition at line 372 of file StatsIterator.h.

: public Array<StatsIt>
PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeNode &  o 
) [inline]

Definition at line 147 of file RegressionTreeNode.h.

PStream& PLearn::operator<< ( PStream &  out,
const IsMissingVariable &  o 
) [inline]

Definition at line 96 of file IsMissingVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeQueue &  o 
) [inline]

Definition at line 94 of file RegressionTreeQueue.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegressionTreeRegisters &  o 
) [inline]

Definition at line 196 of file RegressionTreeRegisters.h.

PStream& PLearn::operator<< ( PStream &  out,
const RegressorFromDistribution &  o 
) [inline]

Definition at line 174 of file RegressorFromDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const StatsItArray &  o 
) [inline]

Definition at line 417 of file StatsIterator.h.

{ out << static_cast<const Array<StatsIt> &>(o); return out; }
PStream& PLearn::operator<< ( PStream &  out,
const IsSmallerVariable &  o 
) [inline]

Definition at line 74 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
PStream& PLearn::operator<< ( PStream &  out,
const LeftPseudoInverseVariable &  o 
) [inline]

Definition at line 74 of file LeftPseudoInverseVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const EmbeddedSequentialLearner &  o 
) [inline]

Definition at line 113 of file EmbeddedSequentialLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const MovingAverage &  o 
) [inline]

Definition at line 93 of file MovingAverage.h.

PStream& PLearn::operator<< ( PStream &  out,
const SequentialLearner &  o 
) [inline]

Definition at line 174 of file SequentialLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const LiftOutputVariable &  o 
) [inline]

Definition at line 69 of file LiftOutputVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const SequentialModelSelector &  o 
) [inline]

Definition at line 187 of file SequentialModelSelector.h.

PStream& PLearn::operator<< ( PStream &  out,
const SequentialValidation &  o 
) [inline]

Definition at line 265 of file SequentialValidation.h.

PStream& PLearn::operator<< ( PStream &  out,
const TestMethod &  o 
) [inline]

Definition at line 89 of file TestMethod.h.

PStream& PLearn::operator<< ( PStream &  out,
const LocalizedFeaturesLayerVariable &  o 
) [inline]

Definition at line 115 of file LocalizedFeaturesLayerVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const Train &  o 
) [inline]

Definition at line 122 of file Train.h.

PStream& PLearn::operator<< ( PStream &  out,
const LogAddVariable &  o 
) [inline]

Definition at line 108 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
PStream& PLearn::operator<< ( PStream &  out,
const EntropyContrast &  o 
) [inline]

Definition at line 281 of file EntropyContrast.h.

PStream& PLearn::operator<< ( PStream &  out,
const EntropyContrastLearner &  o 
) [inline]

Definition at line 218 of file EntropyContrastLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const LogSoftmaxVariable &  o 
) [inline]

Definition at line 80 of file LogSoftmaxVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const GaussianContinuum &  o 
) [inline]

Definition at line 281 of file GaussianContinuum.h.

PStream& PLearn::operator<< ( PStream &  out,
const LogVariable &  o 
) [inline]

Definition at line 70 of file LogVariable.h.

{ return new LogVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const GaussMixLocalProjections &  o 
) [inline]

Definition at line 165 of file GaussMixLocalProjections.h.

PStream& PLearn::operator<< ( PStream &  out,
const Isomap &  o 
) [inline]

Definition at line 135 of file Isomap.h.

PStream& PLearn::operator<< ( PStream &  out,
const Min2Variable &  o 
) [inline]

Definition at line 78 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
PStream& PLearn::operator<< ( PStream &  out,
const MarginPerceptronCostVariable &  o 
) [inline]

Definition at line 81 of file MarginPerceptronCostVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const PLCheckTest &  o 
) [inline]

Definition at line 126 of file PLCheckTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const KernelProjection &  o 
) [inline]

Definition at line 189 of file KernelProjection.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const DoubleAccessSparseMatrix< T > &  m 
) [inline]

Definition at line 181 of file DoubleAccessSparseMatrix.h.

References m.

{ 
    m.write(out); 
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const KMeansClustering &  o 
) [inline]

Definition at line 132 of file KMeansClustering.h.

PStream& PLearn::operator<< ( PStream &  out,
const KPCATangentLearner &  o 
) [inline]

Definition at line 179 of file KPCATangentLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixAffineTransformVariable &  o 
) [inline]

Definition at line 76 of file MatrixAffineTransformVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const MinusTransposedColumnVariable &  o 
) [inline]

Definition at line 74 of file MinusTransposedColumnVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const LLC &  o 
) [inline]

Definition at line 163 of file LLC.h.

PStream& PLearn::operator<< ( PStream &  out,
const LLE &  o 
) [inline]

Definition at line 127 of file LLE.h.

PStream& PLearn::operator<< ( PStream &  out,
const NormalizationLearner &  o 
) [inline]

Definition at line 187 of file NormalizationLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const PCA &  o 
) [inline]

Definition at line 234 of file PCA.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixInverseVariable &  o 
) [inline]

Definition at line 71 of file MatrixInverseVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const SpectralClustering &  o 
) [inline]

Definition at line 123 of file SpectralClustering.h.

PStream& PLearn::operator<< ( PStream &  out,
const TangentLearner &  o 
) [inline]

Definition at line 206 of file TangentLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const ParentableObject &  o 
) [inline]

Definition at line 160 of file ParentableObject.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixOneHotSquaredLoss &  o 
) [inline]

Definition at line 78 of file MatrixOneHotSquaredLoss.h.

PStream& PLearn::operator<< ( PStream &  out,
const UniformizeLearner &  o 
) [inline]

Definition at line 187 of file UniformizeLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixSoftmaxLossVariable &  o 
) [inline]

Definition at line 77 of file MatrixSoftmaxLossVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryKernelDiscrimination &  o 
) [inline]

Definition at line 146 of file BinaryKernelDiscrimination.h.

PStream& PLearn::operator<< ( PStream &  out,
const Correspondence &  o 
) [inline]

Definition at line 117 of file Correspondence.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixSoftmaxVariable &  o 
) [inline]

Definition at line 71 of file MatrixSoftmaxVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const DeepFeatureExtractorNNet &  o 
) [inline]

Definition at line 340 of file DeepFeatureExtractorNNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const DeepNonLocalManifoldParzen &  o 
) [inline]

Definition at line 353 of file DeepNonLocalManifoldParzen.h.

PStream& PLearn::operator<< ( PStream &  out,
const PLStringutilsTest &  o 
) [inline]

Definition at line 126 of file PLStringutilsTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixSumOfVariable &  o 
) [inline]

Definition at line 94 of file MatrixSumOfVariable.h.

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }
PStream& PLearn::operator<< ( PStream &  out,
const DenoisingRecurrentNet &  o 
) [inline]

Definition at line 524 of file DenoisingRecurrentNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const MoleculeTemplateLearner &  o 
) [inline]

Definition at line 236 of file MoleculeTemplateLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const TestLearner &  o 
) [inline]

Definition at line 176 of file TestLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatRowVariable &  o 
) [inline]

Definition at line 82 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
PStream& PLearn::operator<< ( PStream &  out,
const DiscriminativeDeepBeliefNet &  o 
) [inline]

Definition at line 315 of file DiscriminativeDeepBeliefNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const DiscriminativeRBM &  o 
) [inline]

Definition at line 311 of file DiscriminativeRBM.h.

PStream& PLearn::operator<< ( PStream &  out,
const DynamicallyLinkedRBMsModel &  o 
) [inline]

Definition at line 291 of file DynamicallyLinkedRBMsModel.h.

PStream& PLearn::operator<< ( PStream &  out,
const Max2Variable &  o 
) [inline]

Definition at line 78 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
PStream& PLearn::operator<< ( PStream &  out,
const MaxVariable &  o 
) [inline]

Definition at line 70 of file MaxVariable.h.

{ return new MaxVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const LiftStatsCollector &  o 
) [inline]

Definition at line 170 of file LiftStatsCollector.h.

PStream& PLearn::operator<< ( PStream &  out,
const BootstrapVMatrix &  o 
) [inline]

Definition at line 102 of file BootstrapVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ICP &  o 
) [inline]

Definition at line 205 of file ICP.h.

PStream& PLearn::operator<< ( PStream &  out,
const MiniBatchClassificationLossVariable &  o 
) [inline]

Definition at line 75 of file MiniBatchClassificationLossVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const LinearInductiveTransferClassifier &  o 
) [inline]

Definition at line 283 of file LinearInductiveTransferClassifier.h.

PStream& PLearn::operator<< ( PStream &  out,
const ManifoldKNNDistribution &  o 
) [inline]

Definition at line 198 of file ManifoldKNNDistribution.h.

PStream& PLearn::operator<< ( PStream &  out,
const MinusColumnVariable &  o 
) [inline]

Definition at line 75 of file MinusColumnVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const LimitedGaussianSmoother &  o 
) [inline]

Definition at line 128 of file LimitedGaussianSmoother.h.

PStream& PLearn::operator<< ( PStream &  out,
const ManifoldParzen &  o 
) [inline]

Definition at line 186 of file ManifoldParzen.h.

ostream& PLearn::operator<< ( ostream &  out,
Set  s 
) [inline]

Definition at line 107 of file Set.h.

References PLearn::Set::begin(), and PLearn::Set::end().

{
    for(SetIterator it = s.begin(); it != s.end(); ++it)
    {
        out << *it << " ";
    }
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const MeshEdge &  o 
) [inline]

Definition at line 120 of file MeshEdge.h.

PStream& PLearn::operator<< ( PStream &  out,
const MinusRowVariable &  o 
) [inline]

Definition at line 75 of file MinusRowVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const MeshFace &  o 
) [inline]

Definition at line 142 of file MeshFace.h.

PStream& PLearn::operator<< ( PStream &  out,
const MeshGraph &  o 
) [inline]

Definition at line 129 of file MeshGraph.h.

PStream& PLearn::operator<< ( PStream &  out,
const ManualBinner &  o 
) [inline]

Definition at line 116 of file ManualBinner.h.

PStream& PLearn::operator<< ( PStream &  out,
const MeshMatch &  o 
) [inline]

Definition at line 131 of file MeshMatch.h.

PStream& PLearn::operator<< ( PStream &  out,
const MinusVariable &  o 
) [inline]

Definition at line 75 of file MinusVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const PPTest &  o 
) [inline]

Definition at line 130 of file PPTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const NxProfileLearner &  o 
) [inline]

Definition at line 207 of file NxProfileLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const BestAveragingPLearner &  o 
) [inline]

Definition at line 228 of file BestAveragingPLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const NeuralProbabilisticLanguageModel &  o 
) [inline]

Definition at line 465 of file NeuralProbabilisticLanguageModel.h.

PStream& PLearn::operator<< ( PStream &  out,
const NLLNeighborhoodWeightsVariable &  o 
) [inline]

Definition at line 129 of file NLLNeighborhoodWeightsVariable.h.

{ 
template<class ParentT >
PStream& PLearn::operator<< ( PStream &  out,
const TypedParentableObject< ParentT > &  o 
) [inline]

Definition at line 213 of file ParentableObject.h.

PStream& PLearn::operator<< ( PStream &  out,
const NnlmOutputLayer &  o 
) [inline]

Definition at line 334 of file NnlmOutputLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const NnlmWordRepresentationLayer &  o 
) [inline]

Definition at line 194 of file NnlmWordRepresentationLayer.h.

PStream& PLearn::operator<< ( PStream &  out,
const ObservationWindow &  o 
) [inline]

Definition at line 143 of file ObservationWindow.h.

PStream& PLearn::operator<< ( PStream &  out,
const PseudolikelihoodRBM &  o 
) [inline]

Definition at line 437 of file PseudolikelihoodRBM.h.

PStream& PLearn::operator<< ( PStream &  out,
const RankingFromKernel &  o 
) [inline]

Definition at line 179 of file RankingFromKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const NegCrossEntropySigmoidVariable &  o 
) [inline]

Definition at line 87 of file NegCrossEntropySigmoidVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const StackedFocusedAutoassociatorsNet &  o 
) [inline]

Definition at line 365 of file StackedFocusedAutoassociatorsNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const StackedSVDNet &  o 
) [inline]

Definition at line 270 of file StackedSVDNet.h.

PStream& PLearn::operator<< ( PStream &  out,
const NegLogPoissonVariable &  o 
) [inline]

Definition at line 81 of file NegLogPoissonVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const StructuralLearner &  o 
) [inline]

Definition at line 244 of file StructuralLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const SurfaceMesh &  o 
) [inline]

Definition at line 227 of file SurfaceMesh.h.

PStream& PLearn::operator<< ( PStream &  out,
const NllGeneralGaussianVariable &  o 
) [inline]

Definition at line 103 of file NllGeneralGaussianVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ChemicalICP &  o 
) [inline]

Definition at line 288 of file ChemicalICP.h.

PStream& PLearn::operator<< ( PStream &  out,
const NllSemisphericalGaussianVariable &  o 
) [inline]

Definition at line 91 of file NllSemisphericalGaussianVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const RunICPVariable &  o 
) [inline]

Definition at line 181 of file RunICPVariable.h.

PStream & PLearn::operator<< ( PStream &  out,
const NoBpropVariable &  o 
) [inline]

Definition at line 88 of file var/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
PStream& PLearn::operator<< ( PStream &  out,
const ScoreLayerVariable &  o 
) [inline]

Definition at line 202 of file ScoreLayerVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const ObjectOptionVariable &  o 
) [inline]

Definition at line 171 of file ObjectOptionVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const SurfaceTemplateLearner &  o 
) [inline]

Definition at line 148 of file SurfaceTemplateLearner.h.

PStream& PLearn::operator<< ( PStream &  out,
const Template &  o 
) [inline]

Definition at line 61 of file Template.h.

PStream& PLearn::operator<< ( PStream &  out,
const MatrixAffineTransformFeedbackVariable &  o 
) [inline]

Definition at line 75 of file MatrixAffineTransformFeedbackVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const TopDownAsymetricDeepNetwork &  o 
) [inline]

Definition at line 282 of file TopDownAsymetricDeepNetwork.h.

PStream& PLearn::operator<< ( PStream &  out,
const OneHotSquaredLoss &  o 
) [inline]

Definition at line 86 of file OneHotSquaredLoss.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const WeightedLogGaussian &  o 
) [inline]

Definition at line 90 of file WeightedLogGaussian.h.

PStream& PLearn::operator<< ( PStream &  out,
const VMat &  o 
) [inline]

Definition at line 139 of file VMat.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const OutputVariable &  o 
) [inline]

Definition at line 78 of file OutputVariable.h.

{
template<class T , unsigned N, class TTrait >
void PLearn::operator<< ( TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
) [inline]

To emulate PLearn TVecs, operator<< implements a copy.

Definition at line 210 of file TinyVector.h.

References x.

{
    x = y;
}
PStream& PLearn::operator<< ( PStream &  out,
const PDistributionVariable &  o 
) [inline]

Definition at line 83 of file PDistributionVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const TransparentParentable &  o 
) [inline]

Definition at line 316 of file ParentableObject.h.

PStream& PLearn::operator<< ( PStream &  out,
const PLogPVariable &  o 
) [inline]

Definition at line 71 of file PLogPVariable.h.

{ return new PLogPVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const PlusColumnVariable &  o 
) [inline]

Definition at line 78 of file PlusColumnVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const PlusConstantVariable &  o 
) [inline]

Definition at line 94 of file PlusConstantVariable.h.

template<class T1 >
PStream& PLearn::operator<< ( PStream &  out,
const tuple< T1 > &  t 
)

Definition at line 175 of file tuple.h.

References PLearn::PStream::switchToPLearnOutMode().

{
    PStream::mode_t oldmode = out.switchToPLearnOutMode();
    out.put('(');
    out << get<0>(t);
    out.put(')');
    out.setOutMode(oldmode);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const PlusManyVariable &  o 
) [inline]

Definition at line 112 of file PlusManyVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const PlusRowVariable &  o 
) [inline]

Definition at line 78 of file PlusRowVariable.h.

template<class T1 , class T2 >
PStream& PLearn::operator<< ( PStream &  out,
const tuple< T1, T2 > &  t 
)

Definition at line 186 of file tuple.h.

References PLearn::PStream::switchToPLearnOutMode().

{
    PStream::mode_t oldmode = out.switchToPLearnOutMode();
    out.put('(');
    out << get<0>(t); out.write(", ");
    out << get<1>(t);
    out.put(')');
    out.setOutMode(oldmode);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const PlusScalarVariable &  o 
) [inline]

Definition at line 77 of file PlusScalarVariable.h.

template<class T1 , class T2 , class T3 >
PStream& PLearn::operator<< ( PStream &  out,
const tuple< T1, T2, T3 > &  t 
)

Definition at line 198 of file tuple.h.

References PLearn::PStream::switchToPLearnOutMode().

{
    PStream::mode_t oldmode = out.switchToPLearnOutMode();
    out.put('(');
    out << get<0>(t); out.write(", ");
    out << get<1>(t); out.write(", ");
    out << get<2>(t);
    out.put(')');
    out.setOutMode(oldmode);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const PlusVariable &  o 
) [inline]

Definition at line 78 of file PlusVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const PotentialsVariable &  o 
) [inline]

Definition at line 95 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
PStream & PLearn::operator<< ( PStream &  out,
const PDate &  date 
)

Serialization to PStream.

Definition at line 280 of file PDate.cc.

References date_to_double(), PLearn::PDate::day, PLearn::PDate::month, PLearn::PStream::outmode, PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLearn::PStream::pretty_ascii, PLearn::PStream::put(), PLearn::PStream::raw_ascii, PLearn::PStream::raw_binary, PLearn::PStream::write(), and PLearn::PDate::year.

{
    char tmpbuf[50];

    switch(out.outmode)
    {
    case PStream::plearn_binary:
    case PStream::raw_binary:
        out.put((char)0xFE);
        out << date_to_double(date);
        break;
    case PStream::plearn_ascii:        
        sprintf(tmpbuf,"%04d/%02d/%02d ",date.year,date.month,date.day);
        out.write(tmpbuf);
        break;

    case PStream::raw_ascii:
    case PStream::pretty_ascii:
        // same as plearn_ascii but with no ending space
        sprintf(tmpbuf,"%04d/%02d/%02d",date.year,date.month,date.day);
        out.write(tmpbuf);
        break;
    }

    return out;
}

Here is the call graph for this function:

template<class T1 , class T2 , class T3 , class T4 >
PStream& PLearn::operator<< ( PStream &  out,
const tuple< T1, T2, T3, T4 > &  t 
)

Definition at line 211 of file tuple.h.

References PLearn::PStream::switchToPLearnOutMode().

{
    PStream::mode_t oldmode = out.switchToPLearnOutMode();
    out.put('(');
    out << get<0>(t); out.write(", ");
    out << get<1>(t); out.write(", ");
    out << get<2>(t); out.write(", ");
    out << get<3>(t);
    out.put(')');
    out.setOutMode(oldmode);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const PowVariable &  o 
) [inline]

Definition at line 75 of file PowVariable.h.

{ return new PowVariable(v,power); }
template<class T1 , class T2 , class T3 , class T4 , class T5 >
PStream& PLearn::operator<< ( PStream &  out,
const tuple< T1, T2, T3, T4, T5 > &  t 
)

Definition at line 225 of file tuple.h.

References PLearn::PStream::switchToPLearnOutMode().

{
    PStream::mode_t oldmode = out.switchToPLearnOutMode();
    out.put('(');
    out << get<0>(t); out.write(", ");
    out << get<1>(t); out.write(", ");
    out << get<2>(t); out.write(", ");
    out << get<3>(t); out.write(", ");
    out << get<4>(t);
    out.put(')');
    out.setOutMode(oldmode);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const PowVariableVariable &  o 
) [inline]

Definition at line 88 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
PStream& PLearn::operator<< ( PStream &  out,
const tuple< T1, T2, T3, T4, T5, T6 > &  t 
)

Definition at line 240 of file tuple.h.

References PLearn::PStream::switchToPLearnOutMode().

{
    PStream::mode_t oldmode = out.switchToPLearnOutMode();
    out.put('(');
    out << get<0>(t); out.write(", ");
    out << get<1>(t); out.write(", ");
    out << get<2>(t); out.write(", ");
    out << get<3>(t); out.write(", ");
    out << get<4>(t); out.write(", ");
    out << get<5>(t);
    out.put(')');
    out.setOutMode(oldmode);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const ProductTransposeVariable &  o 
) [inline]

Definition at line 77 of file ProductTransposeVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ProductVariable &  o 
) [inline]

Definition at line 77 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
PStream& PLearn::operator<< ( PStream &  out,
const ProjectionErrorVariable &  o 
) [inline]

Definition at line 96 of file ProjectionErrorVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ReIndexedTargetVariable &  o 
) [inline]

Definition at line 103 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }
PStream& PLearn::operator<< ( PStream &  out,
const ReshapeVariable &  o 
) [inline]

Definition at line 81 of file ReshapeVariable.h.

{ return new ReshapeVariable(v,newlength,newwidth); }
PStream& PLearn::operator<< ( PStream &  out,
const RightPseudoInverseVariable &  o 
) [inline]

Definition at line 74 of file RightPseudoInverseVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const RowAtPositionVariable &  o 
) [inline]

Definition at line 87 of file RowAtPositionVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const RowOfVariable &  o 
) [inline]

Definition at line 84 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
PStream& PLearn::operator<< ( PStream &  out,
const RowSumSquareVariable &  o 
) [inline]

Definition at line 75 of file RowSumSquareVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const MaxSubsamplingTest &  o 
) [inline]

Definition at line 136 of file MaxSubsamplingTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const RowSumVariable &  o 
) [inline]

Definition at line 71 of file RowSumVariable.h.

{ 
PStream & PLearn::operator<< ( PStream &  p,
PL_Log::Heading  heading 
)

Actually draw the heading.

Definition at line 333 of file pl_log.cc.

References endl(), and PLearn::PL_Log::Heading::h.

{
    // The loggerCount is likely to change in test even if nothing more is
    // printed... PyTest dislikes. 
    //   string msg = "#####  " + tostring(PL_Log::instance().loggerCount())
    //     + (heading.h.size() > 0? (": "+heading.h) : string("")) + "  ";
    string msg = "#####  " + (heading.h.size() > 0? (heading.h + "  ") : string(""));
    string::size_type rest_length = msg.size() > 70 ? 5 : 75 - msg.size();
    string rest(rest_length,'#');
    return p << endl << (msg + rest) << endl;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const SemiSupervisedProbClassCostVariable &  o 
) [inline]

Definition at line 127 of file SemiSupervisedProbClassCostVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const SigmoidVariable &  o 
) [inline]

Definition at line 71 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const SignVariable &  o 
) [inline]

Definition at line 70 of file SignVariable.h.

{ return new SignVariable(input); }
PStream& PLearn::operator<< ( PStream &  out,
const SoftmaxLossVariable &  o 
) [inline]

Definition at line 77 of file SoftmaxLossVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const SoftmaxVariable &  o 
) [inline]

Definition at line 72 of file SoftmaxVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const SoftplusVariable &  o 
) [inline]

Definition at line 77 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const PRandom &  o 
) [inline]

Definition at line 307 of file PRandom.h.

PStream& PLearn::operator<< ( PStream &  out,
const SoftSlopeIntegralVariable &  o 
) [inline]

Definition at line 78 of file SoftSlopeIntegralVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const SoftSlopeVariable &  o 
) [inline]

Definition at line 79 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const ProbSparseMatrix &  p 
) [inline]

Definition at line 79 of file ProbSparseMatrix.h.

References PLearn::DoubleAccessSparseMatrix< T >::write().

{ 
    p.write(out); 
    return out;
}

Here is the call graph for this function:

ostream& PLearn::operator<< ( ostream &  os,
const PDate &  date 
) [inline]

Definition at line 176 of file PDate.h.

References PLearn::PDate::info().

{
    os << date.info();
    return os;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const SourceVariable &  o 
) [inline]

Definition at line 118 of file SourceVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const SparseIncrementalAffineTransformVariable &  o 
) [inline]

Definition at line 109 of file SparseIncrementalAffineTransformVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const SquareRootVariable &  o 
) [inline]

Definition at line 71 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
PStream& PLearn::operator<< ( PStream &  out,
const SquareVariable &  o 
) [inline]

Definition at line 80 of file SquareVariable.h.

{ return new SquareVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const SubMatTransposeVariable &  o 
) [inline]

Definition at line 88 of file SubMatTransposeVariable.h.

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }
PStream & PLearn::operator<< ( PStream &  out,
const PPath &  path 
)

Serialization and output of a PPath.

Definition at line 150 of file PPath.cc.

References PLearn::PPath::canonical(), PLearn::PStream::outmode, PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLERROR, PLearn::PStream::pretty_ascii, and PLearn::PStream::raw_ascii.

{
    switch (out.outmode) {
    case PStream::raw_ascii:
    case PStream::pretty_ascii:
    {
        out << path.c_str();
        break;
    }
    case PStream::plearn_ascii:
    case PStream::plearn_binary:
    {
        out << path.canonical();
        break;
    }
    default:
        PLERROR("This PStream mode is not supported for PPath");
    }
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const SubMatVariable &  o 
) [inline]

Definition at line 104 of file SubMatVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const SubsampleVariable &  o 
) [inline]

Definition at line 79 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
PStream& PLearn::operator<< ( PStream &  out,
const SumAbsVariable &  o 
) [inline]

Definition at line 71 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const SumOfVariable &  o 
) [inline]

Definition at line 158 of file SumOfVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const SumOverBagsVariable &  o 
) [inline]

Definition at line 121 of file SumOverBagsVariable.h.

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }
PStream& PLearn::operator<< ( PStream &  out,
const RealFunction &  o 
) [inline]

Definition at line 129 of file RealFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const SumSquareVariable &  o 
) [inline]

Definition at line 71 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const RealFunctionFromKernel &  o 
) [inline]

Definition at line 120 of file RealFunctionFromKernel.h.

PStream& PLearn::operator<< ( PStream &  out,
const SumVariable &  o 
) [inline]

Definition at line 77 of file SumVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const SVDVariable &  o 
) [inline]

Definition at line 76 of file SVDVariable.h.

{
template<class T >
PStream& PLearn::operator<< ( PStream &  out,
T const *const &  x 
) [inline]

Definition at line 817 of file PStream.h.

References PLearn::PStream::copies_map_out, PLearn::PStream::put(), PLearn::PStream::write(), and x.

{
    if(x)
    {
        map<void *, unsigned int>::iterator it =
            out.copies_map_out.find(const_cast<T*&>(x));
        if (it == out.copies_map_out.end())
        {
            int id = (int)out.copies_map_out.size()+1;
            out.put('*');
            out << id;
            out.write("->");
            out.copies_map_out[const_cast<T*&>(x)] = id;
            out << *x;
        }
        else
        {
            out.put('*');
            out << it->second;
            out.put(' ');
        }
    }
    else
        out.write("*0 ");
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const RealFunctionOfInputFeature &  o 
) [inline]

Definition at line 121 of file RealFunctionOfInputFeature.h.

PStream& PLearn::operator<< ( PStream &  out,
const TanhVariable &  o 
) [inline]

Definition at line 73 of file TanhVariable.h.

{ return new TanhVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const VariablesTest &  o 
) [inline]

Definition at line 122 of file VariablesTest.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const PP< T > &  o 
) [inline]

Definition at line 865 of file PStream.h.

{
    T *ptr = static_cast<T *>(o);
    out << const_cast<const T * &>(ptr);
    return out;
}
template<class T >
PStream& PLearn::operator<< ( PStream &  out,
T *&  ptr 
) [inline]

Definition at line 873 of file PStream.h.

{
    out << const_cast<T const * const &>(ptr);
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const RealFunctionProduct &  o 
) [inline]

Definition at line 116 of file RealFunctionProduct.h.

template<class A , class B >
PStream& PLearn::operator<< ( PStream &  out,
const pair< A, B > &  x 
) [inline]

Definition at line 884 of file PStream.h.

References PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLERROR, PLearn::PStream::pretty_ascii, PLearn::PStream::raw_ascii, and x.

{
    // new format (same as for tuple)
    out.put('(');
    out << x.first;
    out.write(", ");
    out << x.second;
    out.put(')');

#if 0
    // old deprecated format
    switch(out.outmode)
    {
    case PStream::raw_ascii:
    case PStream::pretty_ascii:
    case PStream::plearn_ascii:
        out << x.first;
        out.write(": ");
        out << x.second;
        out.put(' ');
        break;
    case PStream::plearn_binary:
        out.put((char)0x16);
        out << x.first << x.second;
        break;
    default:
        PLERROR("PStream mode not supported");
    }
#endif

    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const VarUtilsTest &  o 
) [inline]

Definition at line 130 of file VarUtilsTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const ThresholdBpropVariable &  o 
) [inline]

Definition at line 88 of file ThresholdBpropVariable.h.

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }
PStream& PLearn::operator<< ( PStream &  out,
const RealRangeIndicatorFunction &  o 
) [inline]

Definition at line 117 of file RealRangeIndicatorFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const TimesColumnVariable &  o 
) [inline]

Definition at line 80 of file TimesColumnVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const CopiesMap &   
) [inline]

Definition at line 1020 of file PStream.h.

References PLERROR.

{
    PLERROR("PLearn::CopiesMap cannot be [un]serialized.");
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const TimesConstantVariable &  o 
) [inline]

Definition at line 87 of file TimesConstantVariable.h.

{ 
PStream& PLearn::operator<< ( PStream &  out,
const RealValueIndicatorFunction &  o 
) [inline]

Definition at line 116 of file RealValueIndicatorFunction.h.

template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator<< ( PStream &  out,
const map< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1027 of file PStream.h.

References writeMap().

{
    writeMap(out, m);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const TimesRowVariable &  o 
) [inline]

Definition at line 80 of file TimesRowVariable.h.

template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator<< ( PStream &  out,
const multimap< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1042 of file PStream.h.

References writeMap().

{
    writeMap(out, m);
    return out;
}

Here is the call graph for this function:

ostream& PLearn::operator<< ( ostream &  os,
const PDateTime &  date 
) [inline]

Definition at line 169 of file PDateTime.h.

References PLearn::PDateTime::info().

{
    os << date.info();
    return os;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const TimesScalarVariable &  o 
) [inline]

Definition at line 81 of file TimesScalarVariable.h.

{
template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator<< ( PStream &  out,
const hash_map< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1059 of file PStream.h.

References writeMap().

{
    writeMap(out, m);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const TimesVariable &  o 
) [inline]

Definition at line 75 of file TimesVariable.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const ScaledConditionalCDFSmoother &  o 
) [inline]

Definition at line 129 of file ScaledConditionalCDFSmoother.h.

PStream& PLearn::operator<< ( PStream &  out,
const TransposeProductVariable &  o 
) [inline]

Definition at line 77 of file TransposeProductVariable.h.

{
template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator<< ( PStream &  out,
const hash_multimap< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1075 of file PStream.h.

References writeMap().

{
    writeMap(out, m);
    return out;
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const TransposeVariable &  o 
) [inline]

Definition at line 36 of file TransposeVariable.h.

{ return new TransposeVariable(v); }
PStream& PLearn::operator<< ( PStream &  out,
const ShiftAndRescaleFeatureRealFunction &  o 
) [inline]

Definition at line 119 of file ShiftAndRescaleFeatureRealFunction.h.

PStream& PLearn::operator<< ( PStream &  out,
const UnaryHardSlopeVariable &  o 
) [inline]

Definition at line 81 of file UnaryHardSlopeVariable.h.

{ return new UnaryHardSlopeVariable(v,l,r); }
PStream& PLearn::operator<< ( PStream &  out,
const UnaryVariable &  o 
) [inline]

Definition at line 112 of file UnaryVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const Smoother &  o 
) [inline]

Definition at line 124 of file Smoother.h.

PStream& PLearn::operator<< ( PStream &  out,
const UnequalConstantVariable &  o 
) [inline]

Definition at line 78 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
PStream& PLearn::operator<< ( PStream &  out,
const SoftHistogramBinner &  o 
) [inline]

Definition at line 133 of file SoftHistogramBinner.h.

PStream& PLearn::operator<< ( PStream &  out,
const UnfoldedFuncVariable &  o 
) [inline]

Definition at line 93 of file UnfoldedFuncVariable.h.

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }
PStream& PLearn::operator<< ( PStream &  out,
const UnfoldedSumOfVariable &  o 
) [inline]

Definition at line 89 of file UnfoldedSumOfVariable.h.

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }
PStream& PLearn::operator<< ( PStream &  out,
const NnlmOnlineLearner &  o 
) [inline]

Definition at line 280 of file NnlmOnlineLearner.h.

ostream& PLearn::operator<< ( ostream &  out,
const Var &  v 
) [inline]

Definition at line 56 of file Var.h.

References endl(), and PLearn::Var::width().

{
    string name=v->getName();
    if (name != "")
        cout<<name<<endl;
    if (v->width()==1)
        out << v->value;
    else
        out << v->matValue;
    return out;
}

Here is the call graph for this function:

void PLearn::operator<< ( VarArray &  ar,
const Array< Vec > &  values 
)

Definition at line 1191 of file VarArray.cc.

References n, PLERROR, and PLearn::TVec< T >::size().

{
    int n = ar.size();
    if(values.size()!=n)
        PLERROR("In operator<<(VarArray&, const Array<Vec>&) sizes of arrays differ (VarArray:%d Array<Vec>:%d)",ar.size(),values.size());
    for(int k=0; k<n; k++)
    {
        Vec& ar_v = ar[k]->value;
        Vec& v = values[k];
        if(ar_v.size() != v.size())
            PLERROR("In operator<<(VarArray&, const Array<Vec>&) sizes of var array and vector differ.  "
                    "(VarArray length:%d, in Array<Vec>, Vec length:%d)",ar_v.size(),v.size());
        ar_v << v;
    }
}

Here is the call graph for this function:

void PLearn::operator<< ( VarArray &  ar,
const Vec &  datavec 
) [inline]

Definition at line 251 of file VarArray.h.

References PLearn::VarArray::copyFrom().

{ ar.copyFrom(datavec); }

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const StatsCollectorCounts &  c 
) [inline]
PStream& PLearn::operator<< ( PStream &  out,
const VarArray &  o 
) [inline]

Definition at line 315 of file VarArray.h.

{ out << static_cast<const Array<Var> &>(o); return out; }
PStream& PLearn::operator<< ( PStream &  out,
const VarArrayElementVariable &  o 
) [inline]

Definition at line 77 of file VarArrayElementVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const StatsCollector &  o 
) [inline]

Definition at line 400 of file StatsCollector.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const VarColumnsVariable &  o 
) [inline]

Definition at line 74 of file VarColumnsVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const VarElementVariable &  o 
) [inline]

Definition at line 82 of file VarElementVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const PentaTest &  o 
) [inline]

Definition at line 130 of file PentaTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const Variable &  o 
) [inline]

Definition at line 485 of file Variable.h.

PStream& PLearn::operator<< ( PStream &  out,
const Var &  o 
) [inline]

Definition at line 486 of file Variable.h.

PStream& PLearn::operator<< ( PStream &  out,
const VarRowsVariable &  o 
) [inline]

Definition at line 79 of file VarRowsVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const PLMathTest &  o 
) [inline]

Definition at line 128 of file PLMathTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const VarRowVariable &  o 
) [inline]

Definition at line 78 of file VarRowVariable.h.

PStream& PLearn::operator<< ( PStream &  out,
const VecElementVariable &  o 
) [inline]

Definition at line 80 of file VecElementVariable.h.

{ return new VecElementVariable(v,index); }
PStream& PLearn::operator<< ( PStream &  out,
const TMatTest &  o 
) [inline]

Definition at line 139 of file TMatTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const WeightedSumSquareVariable &  o 
) [inline]

Definition at line 78 of file WeightedSumSquareVariable.h.

{ return new WeightedSumSquareVariable(v,w); }
PStream& PLearn::operator<< ( PStream &  out,
const AddBagInformationVMatrix &  o 
) [inline]

Definition at line 126 of file AddBagInformationVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const RemoveObservationTest &  o 
) [inline]

Definition at line 111 of file RemoveObservationTest.h.

PStream& PLearn::operator<< ( PStream &  out,
const AddMissingVMatrix &  o 
) [inline]

Definition at line 131 of file AddMissingVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const PLearnDiff &  o 
) [inline]

Definition at line 140 of file PLearnDiff.h.

PStream& PLearn::operator<< ( PStream &  out,
const AppendNeighborsVMatrix &  o 
) [inline]

Definition at line 130 of file AppendNeighborsVMatrix.h.

{
PStream& PLearn::operator<< ( PStream &  out,
const AsciiVMatrix &  o 
) [inline]

Definition at line 115 of file AsciiVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const AutoVMatrix &  o 
) [inline]

Definition at line 103 of file AutoVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const AutoVMatrixSaveSource &  o 
) [inline]

Definition at line 90 of file AutoVMatrixSaveSource.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryNumbersVMatrix &  o 
) [inline]

Definition at line 146 of file BinaryNumbersVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const BinaryOpVMatrix &  o 
) [inline]

Definition at line 121 of file BinaryOpVMatrix.h.

template<class T >
void PLearn::operator<< ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

copy TMat << TMat

Definition at line 753 of file TMat_impl.h.

References std::copy(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements\n"
                "m1: (%d, %d) && m2: (%d, %d)", m1.length(), m1.width(), m2.length(), m2.width());
#endif
    if (m1.isNotEmpty())
        copy(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

template<class T , class U >
void PLearn::operator<< ( const TMat< T > &  m1,
const TMat< U > &  m2 
)

copy TMat << TMat (different types)

Definition at line 766 of file TMat_impl.h.

References copy_cast(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements");
#endif
    if (m1.isNotEmpty())
        copy_cast(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

template<class T >
void PLearn::operator<< ( const TMat< T > &  m1,
const TVec< T > &  m2 
) [inline]

copy TMat << Tvec

Definition at line 778 of file TMat_impl.h.

References std::copy(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements;\t m1.size()= %d;\t m2.size= %d", m1.size(), m2.size());
#endif
    if (m1.isNotEmpty())
        copy(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

template<class T , class U >
void PLearn::operator<< ( const TMat< T > &  m1,
const TVec< U > &  m2 
) [inline]

copy TMat << Tvec (different types)

Definition at line 790 of file TMat_impl.h.

References copy_cast(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements");
#endif
    if (m1.isNotEmpty())
        copy_cast(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const BinSplitter &  o 
) [inline]

Definition at line 131 of file BinSplitter.h.

template<class T >
void PLearn::operator<< ( const TVec< T > &  m1,
const TMat< T > &  m2 
) [inline]

copy TVec << TMat

Definition at line 802 of file TMat_impl.h.

References std::copy(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements");
#endif
    if (m1.isNotEmpty())
        copy(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

template<class T , class U >
void PLearn::operator<< ( const TVec< T > &  m1,
const TMat< U > &  m2 
) [inline]

copy TVec << TMat (different types)

Definition at line 814 of file TMat_impl.h.

References copy_cast(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(m1.size()!=m2.size())
        PLERROR("In operator<<(m1,m2) the 2 matrices must have the same number of elements");
#endif
    if (m1.isNotEmpty())
        copy_cast(m2.begin(), m2.end(), m1.begin());
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const BootstrapSplitter &  o 
) [inline]

Definition at line 136 of file BootstrapSplitter.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const vector< T > &  v 
) [inline]

Definition at line 1506 of file PStream.h.

References writeSequence().

{ writeSequence(out, v); return out; }

Here is the call graph for this function:

template<class T >
ostream& PLearn::operator<< ( ostream &  out,
const TMat< T > &  m 
) [inline]

printing a TMat

Definition at line 843 of file TMat_impl.h.

References m.

{ 
    m.print(out);
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const KNNRegressor &  o 
) [inline]

Definition at line 195 of file KNNRegressor.h.

PStream& PLearn::operator<< ( PStream &  out,
const ByteMemoryVMatrix &  o 
) [inline]

Definition at line 80 of file ByteMemoryVMatrix.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const TMat< T > &  m 
) [inline]

Read and Write from C++ stream: write saves length() and width(), and read resizes accordingly.

Read and Write from C++ stream: write saves length and read resizes accordingly (the raw modes don't write any size information)

Definition at line 955 of file TMat_impl.h.

References m.

{ 
    m.write(out); 
    return out;
}
PStream& PLearn::operator<< ( PStream &  out,
const CenteredVMatrix &  o 
) [inline]

Definition at line 120 of file CenteredVMatrix.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const set< T > &  v 
) [inline]

Definition at line 1554 of file PStream.h.

References writeSet().

{ writeSet(out, v); return out; }

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const ClassSeparationSplitter &  o 
) [inline]

Definition at line 143 of file ClassSeparationSplitter.h.

PStream& PLearn::operator<< ( PStream &  out,
const ClassSubsetVMatrix &  o 
) [inline]

Definition at line 132 of file ClassSubsetVMatrix.h.

template<class T >
PStream& PLearn::operator<< ( PStream &  out,
const priority_queue< T > &  v 
) [inline]

Definition at line 1604 of file PStream.h.

References writePriorityQueue().

{ writePriorityQueue(out, v); return out; }

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const CompactFileVMatrix &  o 
) [inline]

Definition at line 181 of file CompactFileVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const CompactVMatrix &  o 
) [inline]

Definition at line 203 of file CompactVMatrix.h.

ostream & PLearn::operator<< ( ostream &  os,
const FieldValue &  ft 
)

Definition at line 551 of file SimpleDB.cc.

References PLearn::FieldValue::toString().

{
    // quite frankly too simple for now
    return os << ft.toString();
}

Here is the call graph for this function:

PStream& PLearn::operator<< ( PStream &  out,
const CompressedVMatrix &  o 
) [inline]

Definition at line 122 of file CompressedVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConcatColumnsVMatrix &  o 
) [inline]

Definition at line 113 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
PStream& PLearn::operator<< ( PStream &  out,
const PyPLearnScript &  o 
) [inline]

Definition at line 183 of file PyPLearnScript.h.

{ time_t d=0; return smartLoadObject(filepath, args, d); }
PStream& PLearn::operator<< ( PStream &  out,
const ConcatRowsSubVMatrix &  o 
) [inline]

Definition at line 116 of file ConcatRowsSubVMatrix.h.

PStream& PLearn::operator<< ( PStream &  out,
const ConcatRowsVMatrix &  o 
) [inline]

Definition at line 151 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
template<class T >
bool PLearn::operator<= ( const TVec< T > &  left,
const TVec< T > &  right 
)

A simple family of relational operators for TVec.

Definition at line 275 of file TVec_impl.h.

References left(), PLERROR, and right().

{
    if (left.size() != right.size())
        PLERROR("Left and right vectors must have the same size in operator<=");
    return std::inner_product(left.begin(), left.end(), right.begin(),
                              true, std::logical_and<bool>(),
                              std::less_equal<T>());
}

Here is the call graph for this function:

Var PLearn::operator<= ( Var  v,
real  threshold 
) [inline]

Definition at line 86 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v, threshold, 0, 1); }
Var PLearn::operator<= ( Var  v1,
Var  v2 
) [inline]

Definition at line 80 of file IsLargerVariable.h.

{ return new IsLargerVariable(v2, v1); }
template<class T , unsigned N, class TTrait >
bool PLearn::operator<= ( const TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
) [inline]

Definition at line 195 of file TinyVector.h.

References x.

{
    return !(y < x);
}
template<class T >
bool PLearn::operator== ( const T *  ptr,
const PP< T > &  b 
) [inline]

Definition at line 203 of file PP.h.

References PLearn::PP< T >::ptr.

Referenced by PLearn::TMatRowsIterator< T >::operator!=(), PLearn::TMatRowsAsArraysIterator< T >::operator!=(), PLearn::PPath::operator!=(), and PLearn::PStream::operator==().

{ return ptr==b.ptr; }

Here is the caller graph for this function:

template<class T , unsigned SizeBits, class Allocator >
bool PLearn::operator== ( const SmallVector< T, SizeBits, Allocator > &  a,
const SmallVector< T, SizeBits, Allocator > &  b 
)

Equality operator.

Definition at line 476 of file SmallVector.h.

References PLearn::SmallVector< T, SizeBits, Allocator >::begin(), and PLearn::SmallVector< T, SizeBits, Allocator >::end().

{
    bool equal = true;
    typename SmallVector<T,SizeBits,Allocator>::const_iterator
        xit=x.begin(), xend=x.end(), yit=y.begin(), yend=y.end();
    if (xend-xit != yend-yit)
        return false;
    for ( ; equal && xit != xend && yit != yend ; ++xit, ++yit)
        equal = (*xit == *yit);
    return equal;
}

Here is the call graph for this function:

bool PLearn::operator== ( const ReconstructionCandidate &  o1,
const ReconstructionCandidate &  o2 
) [inline]

Definition at line 144 of file TransformationLearner.h.

References PLearn::ReconstructionCandidate::weight.

{
    return o1.weight==o2.weight;
}
Var PLearn::operator== ( Var  v1,
real  cte 
) [inline]

result[i] = 1 if v1[i]==cte, 0 otherwise

Definition at line 81 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
Var PLearn::operator== ( real  cte,
Var  v1 
) [inline]

result[i] = 1 if v1[i]==cte, 0 otherwise

Definition at line 85 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
template<class T , unsigned N, class TTrait >
bool PLearn::operator== ( const TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
)

Equality operator.

Definition at line 506 of file TinyVector.h.

References PLearn::TinyVector< T, N, TTrait >::begin(), and PLearn::TinyVector< T, N, TTrait >::end().

{
    bool equal = true;
    typename TinyVector<T,N,TTrait>::const_iterator
        xit=x.begin(), xend=x.end(), yit=y.begin(), yend=y.end();
    if (xend-xit != yend-yit)
        return false;
    for ( ; equal && xit != xend && yit != yend ; ++xit, ++yit)
        equal = (*xit == *yit);
    return equal;
}

Here is the call graph for this function:

Var PLearn::operator== ( Var  v1,
Var  v2 
)

Definition at line 177 of file Var_operators.cc.

References isequal().

{ return isequal(v1,v2); }

Here is the call graph for this function:

Var PLearn::operator> ( Var  v1,
Var  v2 
) [inline]

Definition at line 77 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
template<class T >
bool PLearn::operator> ( const TVec< T > &  left,
const TVec< T > &  right 
)

Definition at line 316 of file TVec_impl.h.

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

{
    if (left.size() != right.size())
        PLERROR("Left and right vectors must have the same size in operator>");
    int size = left.size();
    const T* ldata = left.data();
    const T* rdata = right.data();
    for ( ; size ; ++ldata, ++rdata, --size) {
        if (*ldata < *rdata)
            return false;
        if (*ldata > *rdata)
            return true;
        // Continue loop if both are equal
    }
    return false;                              // both vectors are equal at
    // this point; cannot be >
}

Here is the call graph for this function:

template<class T , unsigned N, class TTrait >
bool PLearn::operator> ( const TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
) [inline]

Definition at line 188 of file TinyVector.h.

References x.

{
    return y < x;
}
template<class T >
bool PLearn::operator>= ( const TVec< T > &  left,
const TVec< T > &  right 
)

Definition at line 285 of file TVec_impl.h.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), PLERROR, and PLearn::TVec< T >::size().

{
    if (left.size() != right.size())
        PLERROR("Left and right vectors must have the same size in operator>=");
    return std::inner_product(left.begin(), left.end(), right.begin(),
                              true, std::logical_and<bool>(),
                              std::greater_equal<T>());
}

Here is the call graph for this function:

template<class T , unsigned N, class TTrait >
bool PLearn::operator>= ( const TinyVector< T, N, TTrait > &  x,
const TinyVector< T, N, TTrait > &  y 
) [inline]

Definition at line 202 of file TinyVector.h.

{
    return !(x < y);
}
Var PLearn::operator>= ( Var  v,
real  threshold 
) [inline]

Definition at line 83 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v, threshold, 1, 0); }
Var PLearn::operator>= ( Var  v1,
Var  v2 
) [inline]

Definition at line 81 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v2, v1); }
PStream& PLearn::operator>> ( PStream &  in,
PP< TimesVariable > &  o 
) [inline]

Definition at line 75 of file TimesVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ConcatSetsSplitter &  o 
) [inline]

Definition at line 123 of file ConcatSetsSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatSetsSplitter *&  o 
) [inline]

Definition at line 123 of file ConcatSetsSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
IndexAtPositionVariable &  o 
) [inline]

Definition at line 79 of file IndexAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatSetsSplitter > &  o 
) [inline]

Definition at line 123 of file ConcatSetsSplitter.h.

template<class T , class U >
void PLearn::operator>> ( const TVec< T > &  m1,
const TVec< U > &  m2 
) [inline]

copy TVec >> TVec

Definition at line 129 of file TVec_impl.h.

{ m2 << m1; }
PStream& PLearn::operator>> ( PStream &  in,
PP< GradientAdaboostCostVariable > &  o 
) [inline]

Definition at line 80 of file GradientAdaboostCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ConstantVMatrix *&  o 
) [inline]

Definition at line 114 of file ConstantVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstantVMatrix &  o 
) [inline]

Definition at line 114 of file ConstantVMatrix.h.

template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator>> ( PStream &  in,
map< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1035 of file PStream.h.

References in, and readMap().

{
    readMap(in, m);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< ConstantVMatrix > &  o 
) [inline]

Definition at line 114 of file ConstantVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesRowVariable *&  o 
) [inline]

Definition at line 80 of file TimesRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
InsertZerosVariable &  o 
) [inline]

Definition at line 72 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
PStream& PLearn::operator>> ( PStream &  in,
MatrixInverseVariable *&  o 
) [inline]

Definition at line 71 of file MatrixInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
CrossReferenceVMatrix &  o 
) [inline]

Definition at line 95 of file CrossReferenceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CachedFeatureSet *&  o 
) [inline]

Definition at line 139 of file CachedFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
AnalyzeDond2DiscreteVariables &  o 
) [inline]

Definition at line 123 of file AnalyzeDond2DiscreteVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
HeterogenuousAffineTransformVariable &  o 
) [inline]

Definition at line 113 of file HeterogenuousAffineTransformVariable.h.

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }
PStream& PLearn::operator>> ( PStream &  in,
PP< CrossReferenceVMatrix > &  o 
) [inline]

Definition at line 95 of file CrossReferenceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TimesConstantVariable > &  o 
) [inline]

Definition at line 87 of file TimesConstantVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
RealValueIndicatorFunction *&  o 
) [inline]

Definition at line 116 of file RealValueIndicatorFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesConstantVariable *&  o 
) [inline]

Definition at line 87 of file TimesConstantVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< CheckDond2FileSequence > &  o 
) [inline]

Definition at line 111 of file CheckDond2FileSequence.h.

PStream& PLearn::operator>> ( PStream &  in,
CumVMatrix &  o 
) [inline]

Definition at line 112 of file CumVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CumVMatrix *&  o 
) [inline]

Definition at line 112 of file CumVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TimesColumnVariable > &  o 
) [inline]

Definition at line 80 of file TimesColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodConditionalMean *&  o 
) [inline]

Definition at line 233 of file NeighborhoodConditionalMean.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AnalyzeFieldStats > &  o 
) [inline]

Definition at line 178 of file AnalyzeFieldStats.h.

PStream& PLearn::operator>> ( PStream &  in,
DatedJoinVMatrix &  o 
) [inline]

Definition at line 135 of file DatedJoinVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DatedJoinVMatrix *&  o 
) [inline]

Definition at line 135 of file DatedJoinVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CheckDond2FileSequence &  o 
) [inline]

Definition at line 111 of file CheckDond2FileSequence.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ThresholdBpropVariable > &  o 
) [inline]

Definition at line 88 of file ThresholdBpropVariable.h.

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }
PStream& PLearn::operator>> ( PStream &  in,
RPPath *&  o 
) [inline]

Definition at line 105 of file RPPath.h.

PStream& PLearn::operator>> ( PStream &  in,
ThresholdBpropVariable *&  o 
) [inline]

Definition at line 88 of file ThresholdBpropVariable.h.

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }
PStream& PLearn::operator>> ( PStream &  in,
BasisSelectionRegressor &  o 
) [inline]

Definition at line 248 of file BasisSelectionRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
DatedVMatrix &  o 
) [inline]

Definition at line 112 of file DatedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DatedVMatrix *&  o 
) [inline]

Definition at line 112 of file DatedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LiftStatsCollector > &  o 
) [inline]

Definition at line 170 of file LiftStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DatedVMatrix > &  o 
) [inline]

Definition at line 112 of file DatedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RPPath > &  o 
) [inline]

Definition at line 105 of file RPPath.h.

PStream & PLearn::operator>> ( PStream &  in,
NoBpropVariable *&  o 
) [inline]

Definition at line 88 of file var/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
PStream& PLearn::operator>> ( PStream &  in,
PP< DBSplitter > &  o 
) [inline]

Definition at line 126 of file DBSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
StddevStatsIterator *&  o 
) [inline]

Definition at line 190 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
BatchVMatrix &  o 
) [inline]

Definition at line 86 of file BatchVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BatchVMatrix *&  o 
) [inline]

Definition at line 86 of file BatchVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SplitModule > &  o 
) [inline]

Definition at line 184 of file SplitModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Z > &  o 
) [inline]

Definition at line 219 of file ObjectGraphIteratorTest.cc.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< NeuralProbabilisticLanguageModel > &  o 
) [inline]

Definition at line 465 of file NeuralProbabilisticLanguageModel.h.

PStream& PLearn::operator>> ( PStream &  in,
LearnerProcessedVMatrix &  o 
) [inline]

Definition at line 114 of file LearnerProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LearnerProcessedVMatrix *&  o 
) [inline]

Definition at line 114 of file LearnerProcessedVMatrix.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
PP< T > &  o 
) [inline]

Definition at line 852 of file PStream.h.

References in, and PLearn::PP< T >::isNull().

{
    T *ptr;
    if (o.isNull())
        ptr = 0;
    else
        ptr = o;
    in >> ptr;
    o = ptr;
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< TanhVariable > &  o 
) [inline]

Definition at line 73 of file TanhVariable.h.

{ return new TanhVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< LearnerProcessedVMatrix > &  o 
) [inline]

Definition at line 114 of file LearnerProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TanhVariable *&  o 
) [inline]

Definition at line 73 of file TanhVariable.h.

{ return new TanhVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
TanhVariable &  o 
) [inline]

Definition at line 73 of file TanhVariable.h.

{ return new TanhVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PLLogTest *&  o 
) [inline]

Definition at line 130 of file PLLogTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HardSlopeVariable > &  o 
) [inline]

Definition at line 73 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
PStream& PLearn::operator>> ( PStream &  in,
RealFunctionOfInputFeature &  o 
) [inline]

Definition at line 121 of file RealFunctionOfInputFeature.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SVDVariable > &  o 
) [inline]

Definition at line 76 of file SVDVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SVDVariable *&  o 
) [inline]

Definition at line 76 of file SVDVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< PLLogTest > &  o 
) [inline]

Definition at line 130 of file PLLogTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SVDVariable &  o 
) [inline]

Definition at line 76 of file SVDVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SquaredErrorCostModule &  o 
) [inline]

Definition at line 132 of file SquaredErrorCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NeuralNetworkARDKernel > &  o 
) [inline]

Definition at line 144 of file NeuralNetworkARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
UCISpecification &  o 
) [inline]

Definition at line 127 of file UCISpecification.h.

PStream& PLearn::operator>> ( PStream &  in,
SquaredErrorCostModule *&  o 
) [inline]

Definition at line 132 of file SquaredErrorCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DiscriminativeDeepBeliefNet > &  o 
) [inline]

Definition at line 315 of file DiscriminativeDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
SumVariable *&  o 
) [inline]

Definition at line 77 of file SumVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
UCISpecification *&  o 
) [inline]

Definition at line 127 of file UCISpecification.h.

PStream& PLearn::operator>> ( PStream &  in,
YMDDatedVMatrix &  o 
) [inline]

Definition at line 141 of file YMDDatedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
YMDDatedVMatrix *&  o 
) [inline]

Definition at line 141 of file YMDDatedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumSquareVariable > &  o 
) [inline]

Definition at line 71 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< VMatLanguage > &  o 
) [inline]

Definition at line 163 of file VMatLanguage.h.

: public RowBufferedVMatrix
PStream& PLearn::operator>> ( PStream &  in,
PP< RealFunction > &  o 
) [inline]

Definition at line 129 of file RealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
SplitModule *&  o 
) [inline]

Definition at line 184 of file SplitModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VecExtendedVMatrix > &  o 
) [inline]

Definition at line 106 of file VecExtendedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DichotomizeVMatrix &  o 
) [inline]

Definition at line 125 of file DichotomizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CachedFeatureSet > &  o 
) [inline]

Definition at line 139 of file CachedFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
NnlmOnlineLearner &  o 
) [inline]

Definition at line 280 of file NnlmOnlineLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DichotomizeVMatrix > &  o 
) [inline]

Definition at line 125 of file DichotomizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TestMethod &  o 
) [inline]

Definition at line 89 of file TestMethod.h.

PStream& PLearn::operator>> ( PStream &  in,
SumOverBagsVariable *&  o 
) [inline]

Definition at line 121 of file SumOverBagsVariable.h.

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }
PStream& PLearn::operator>> ( PStream &  in,
SumOverBagsVariable &  o 
) [inline]

Definition at line 121 of file SumOverBagsVariable.h.

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }
PStream& PLearn::operator>> ( PStream &  in,
EntropyContrast &  o 
) [inline]

Definition at line 281 of file EntropyContrast.h.

PStream& PLearn::operator>> ( PStream &  in,
DictionaryVMatrix &  o 
) [inline]

Definition at line 186 of file DictionaryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DictionaryVMatrix > &  o 
) [inline]

Definition at line 186 of file DictionaryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DistanceKernel &  o 
) [inline]

Definition at line 90 of file DistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UCISpecification > &  o 
) [inline]

Definition at line 127 of file UCISpecification.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMTrainer &  o 
) [inline]

Definition at line 174 of file RBMTrainer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumOfVariable > &  o 
) [inline]

Definition at line 158 of file SumOfVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
DiskVMatrix &  o 
) [inline]

Definition at line 124 of file DiskVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SumOfVariable *&  o 
) [inline]

Definition at line 158 of file SumOfVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< DiskVMatrix > &  o 
) [inline]

Definition at line 124 of file DiskVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SpectralClustering > &  o 
) [inline]

Definition at line 123 of file SpectralClustering.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SourceVMatrix > &  o 
) [inline]

Definition at line 157 of file SourceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftmaxNLLCostModule > &  o 
) [inline]

Definition at line 147 of file SoftmaxNLLCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TangentLearner > &  o 
) [inline]

Definition at line 206 of file TangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
HorizonStatefulLearner &  o 
) [inline]

Definition at line 106 of file HorizonStatefulLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SumAbsVariable *&  o 
) [inline]

Definition at line 71 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SplitModule &  o 
) [inline]

Definition at line 184 of file SplitModule.h.

PStream& PLearn::operator>> ( PStream &  in,
Min2Variable *&  o 
) [inline]

Definition at line 78 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
EncodedVMatrix &  o 
) [inline]

Definition at line 87 of file EncodedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceVMatrix &  o 
) [inline]

Definition at line 157 of file SourceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< EncodedVMatrix > &  o 
) [inline]

Definition at line 87 of file EncodedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixInverseVariable > &  o 
) [inline]

Definition at line 71 of file MatrixInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SubsampleVariable *&  o 
) [inline]

Definition at line 79 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
PStream& PLearn::operator>> ( PStream &  in,
PPathTest &  o 
) [inline]

Definition at line 126 of file PPathTest.h.

PStream& PLearn::operator>> ( PStream &  in,
NetflixVMatrix &  o 
) [inline]

Definition at line 238 of file NetflixVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NetflixVMatrix *&  o 
) [inline]

Definition at line 238 of file NetflixVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
StatsItArray &  o 
) [inline]

Definition at line 414 of file StatsIterator.h.

References in.

{ in >> static_cast<Array<StatsIt> &>(o); return in; }
PStream& PLearn::operator>> ( PStream &  in,
PP< NetflixVMatrix > &  o 
) [inline]

Definition at line 238 of file NetflixVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MaxVariable > &  o 
) [inline]

Definition at line 70 of file MaxVariable.h.

{ return new MaxVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ConditionalDictionary &  o 
) [inline]

Definition at line 137 of file ConditionalDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
ExplicitSplitter &  o 
) [inline]

Definition at line 114 of file ExplicitSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftmaxNLLCostModule *&  o 
) [inline]

Definition at line 147 of file SoftmaxNLLCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PPathTest *&  o 
) [inline]

Definition at line 126 of file PPathTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ToBagClassifier *&  o 
) [inline]

Definition at line 159 of file ToBagClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtendedVMatrix &  o 
) [inline]

Definition at line 116 of file ExtendedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtendedVMatrix *&  o 
) [inline]

Definition at line 116 of file ExtendedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftmaxModule > &  o 
) [inline]

Definition at line 132 of file SoftmaxModule.h.

PStream & PLearn::operator>> ( PStream &  in,
Molecule &  o 
) [inline]

Definition at line 67 of file Molecule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PPathTest > &  o 
) [inline]

Definition at line 126 of file PPathTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtractNNetParamsVMatrix &  o 
) [inline]

Definition at line 122 of file ExtractNNetParamsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SquareVariable > &  o 
) [inline]

Definition at line 80 of file SquareVariable.h.

{ return new SquareVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
HistogramDistribution *&  o 
) [inline]

Definition at line 179 of file HistogramDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeQueue &  o 
) [inline]

Definition at line 94 of file RegressionTreeQueue.h.

PStream& PLearn::operator>> ( PStream &  in,
SquareVariable *&  o 
) [inline]

Definition at line 80 of file SquareVariable.h.

{ return new SquareVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ConditionalDictionary *&  o 
) [inline]

Definition at line 137 of file ConditionalDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExtractNNetParamsVMatrix > &  o 
) [inline]

Definition at line 122 of file ExtractNNetParamsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SortRowsVMatrix *&  o 
) [inline]

Definition at line 95 of file SortRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FileVMatrix &  o 
) [inline]

Definition at line 134 of file FileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FileVMatrix *&  o 
) [inline]

Definition at line 134 of file FileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TestMethod *&  o 
) [inline]

Definition at line 89 of file TestMethod.h.

PStream& PLearn::operator>> ( PStream &  in,
ShuffleColumnsVMatrix &  o 
) [inline]

Definition at line 110 of file ShuffleColumnsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftmaxModule *&  o 
) [inline]

Definition at line 132 of file SoftmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PCA > &  o 
) [inline]

Definition at line 234 of file PCA.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FileVMatrix > &  o 
) [inline]

Definition at line 134 of file FileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalDictionary > &  o 
) [inline]

Definition at line 137 of file ConditionalDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeMulticlassLeaveProb > &  o 
) [inline]

Definition at line 96 of file RegressionTreeMulticlassLeaveProb.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IndexedVMatrixTest > &  o 
) [inline]

Definition at line 108 of file IndexedVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
TextStreamVMatrix *&  o 
) [inline]

Definition at line 120 of file TextStreamVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FilteredVMatrix > &  o 
) [inline]

Definition at line 136 of file FilteredVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SubInputVMatrix > &  o 
) [inline]

Definition at line 109 of file SubInputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SubVMatrix &  o 
) [inline]

Definition at line 126 of file SubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FilterSplitter &  o 
) [inline]

Definition at line 126 of file FilterSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SourceVariable > &  o 
) [inline]

Definition at line 118 of file SourceVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
IndexedVMatrixTest *&  o 
) [inline]

Definition at line 108 of file IndexedVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FilterSplitter > &  o 
) [inline]

Definition at line 126 of file FilterSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
FinancePreprocVMatrix &  o 
) [inline]

Definition at line 170 of file FinancePreprocVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FinancePreprocVMatrix *&  o 
) [inline]

Definition at line 170 of file FinancePreprocVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GradientAdaboostCostVariable *&  o 
) [inline]

Definition at line 80 of file GradientAdaboostCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< FinancePreprocVMatrix > &  o 
) [inline]

Definition at line 170 of file FinancePreprocVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TemporalHorizonVMatrix &  o 
) [inline]

Definition at line 104 of file TemporalHorizonVMatrix.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
ProbSparseMatrix &  p 
) [inline]

Definition at line 86 of file ProbSparseMatrix.h.

References in, and PLearn::DoubleAccessSparseMatrix< T >::read().

{ 
    p.read(in); 
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ForwardVMatrix &  o 
) [inline]

Definition at line 186 of file ForwardVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ForwardVMatrix *&  o 
) [inline]

Definition at line 186 of file ForwardVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BiasWeightAffineTransformVariable *&  o 
) [inline]

Definition at line 98 of file BiasWeightAffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< ForwardVMatrix > &  o 
) [inline]

Definition at line 186 of file ForwardVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Dictionary &  o 
) [inline]

Definition at line 190 of file Dictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
FractionSplitter *&  o 
) [inline]

Definition at line 125 of file FractionSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PStreamBufTest &  o 
) [inline]

Definition at line 130 of file PStreamBufTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftSlopeIntegralVariable > &  o 
) [inline]

Definition at line 78 of file SoftSlopeIntegralVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PRandom *&  o 
) [inline]

Definition at line 307 of file PRandom.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftmaxModule &  o 
) [inline]

Definition at line 132 of file SoftmaxModule.h.

void PLearn::operator>> ( const VMat &  src,
const Mat &  dest 
) [inline]

Definition at line 154 of file VMat.h.

{ dest << src; }
PStream& PLearn::operator>> ( PStream &  in,
PStreamBufTest *&  o 
) [inline]

Definition at line 130 of file PStreamBufTest.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianizeVMatrix &  o 
) [inline]

Definition at line 150 of file GaussianizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaleGradientModule *&  o 
) [inline]

Definition at line 123 of file ScaleGradientModule.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianizeVMatrix *&  o 
) [inline]

Definition at line 150 of file GaussianizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AutoLinearRegressor > &  o 
) [inline]

Definition at line 185 of file AutoLinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftplusVariable *&  o 
) [inline]

Definition at line 77 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
Dictionary *&  o 
) [inline]

Definition at line 190 of file Dictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianizeVMatrix > &  o 
) [inline]

Definition at line 150 of file GaussianizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GeneralizedOneHotVMatrix &  o 
) [inline]

Definition at line 110 of file GeneralizedOneHotVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ShiftAndRescaleVMatrix > &  o 
) [inline]

Definition at line 133 of file ShiftAndRescaleVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GradientAdaboostCostVariable &  o 
) [inline]

Definition at line 80 of file GradientAdaboostCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< PStreamBufTest > &  o 
) [inline]

Definition at line 130 of file PStreamBufTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftmaxVariable *&  o 
) [inline]

Definition at line 72 of file SoftmaxVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SoftmaxVariable &  o 
) [inline]

Definition at line 72 of file SoftmaxVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ScoreLayerVariable > &  o 
) [inline]

Definition at line 202 of file ScoreLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DifferenceKernel > &  o 
) [inline]

Definition at line 67 of file DifferenceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
GetInputVMatrix &  o 
) [inline]

Definition at line 115 of file GetInputVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
GetInputVMatrix *&  o 
) [inline]

Definition at line 115 of file GetInputVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ScaleGradientModule > &  o 
) [inline]

Definition at line 123 of file ScaleGradientModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GetInputVMatrix > &  o 
) [inline]

Definition at line 115 of file GetInputVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< Dictionary > &  o 
) [inline]

Definition at line 190 of file Dictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
IsMissingVariable *&  o 
) [inline]

Definition at line 96 of file IsMissingVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
GramVMatrix &  o 
) [inline]

Definition at line 116 of file GramVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GramVMatrix *&  o 
) [inline]

Definition at line 116 of file GramVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SignVariable > &  o 
) [inline]

Definition at line 70 of file SignVariable.h.

{ return new SignVariable(input); }
PStream& PLearn::operator>> ( PStream &  in,
AutoLinearRegressor &  o 
) [inline]

Definition at line 185 of file AutoLinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
AffineTransformVariable &  o 
) [inline]

Definition at line 89 of file AffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< ObjectOptionVariable > &  o 
) [inline]

Definition at line 171 of file ObjectOptionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
TupleTest &  o 
) [inline]

Definition at line 126 of file TupleTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianProcessNLLVariable > &  o 
) [inline]

Definition at line 230 of file GaussianProcessNLLVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NearestNeighborPredictionCost *&  o 
) [inline]

Definition at line 125 of file NearestNeighborPredictionCost.h.

PStream& PLearn::operator>> ( PStream &  in,
TupleTest *&  o 
) [inline]

Definition at line 126 of file TupleTest.h.

PStream& PLearn::operator>> ( PStream &  in,
HashMapFeatureSet &  o 
) [inline]

Definition at line 143 of file HashMapFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
DifferenceKernel *&  o 
) [inline]

Definition at line 67 of file DifferenceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NullModule > &  o 
) [inline]

Definition at line 207 of file NullModule.h.

PStream& PLearn::operator>> ( PStream &  in,
DiverseComponentAnalysis &  o 
) [inline]

Definition at line 240 of file DiverseComponentAnalysis.h.

PStream& PLearn::operator>> ( PStream &  in,
IndexedVMatrix *&  o 
) [inline]

Definition at line 108 of file IndexedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
IndexedVMatrix &  o 
) [inline]

Definition at line 108 of file IndexedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TupleTest > &  o 
) [inline]

Definition at line 126 of file TupleTest.h.

PStream& PLearn::operator>> ( PStream &  in,
InfiniteMNISTVMatrix &  o 
) [inline]

Definition at line 168 of file InfiniteMNISTVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SequentialSplitter > &  o 
) [inline]

Definition at line 111 of file SequentialSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaleGradientModule &  o 
) [inline]

Definition at line 123 of file ScaleGradientModule.h.

PStream& PLearn::operator>> ( PStream &  in,
FileDictionary &  o 
) [inline]

Definition at line 118 of file FileDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CubicSpline > &  o 
) [inline]

Definition at line 152 of file CubicSpline.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMWoodsLayer > &  o 
) [inline]

Definition at line 211 of file RBMWoodsLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RowSumVariable > &  o 
) [inline]

Definition at line 71 of file RowSumVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
InterleaveVMatrix &  o 
) [inline]

Definition at line 119 of file InterleaveVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMTrainer *&  o 
) [inline]

Definition at line 174 of file RBMTrainer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NeighborhoodConditionalMean > &  o 
) [inline]

Definition at line 233 of file NeighborhoodConditionalMean.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianProcessNLLVariable *&  o 
) [inline]

Definition at line 230 of file GaussianProcessNLLVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
JoinVMatrix &  o 
) [inline]

Definition at line 112 of file JoinVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
JoinVMatrix *&  o 
) [inline]

Definition at line 112 of file JoinVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< JoinVMatrix > &  o 
) [inline]

Definition at line 112 of file JoinVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SeparateInputVMatrix > &  o 
) [inline]

Definition at line 123 of file SeparateInputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RowSumSquareVariable *&  o 
) [inline]

Definition at line 75 of file RowSumSquareVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
JulianizeVMatrix &  o 
) [inline]

Definition at line 157 of file JulianizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
JulianizeVMatrix *&  o 
) [inline]

Definition at line 157 of file JulianizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Kernel *&  o 
) [inline]

Definition at line 270 of file Kernel.h.

: public PP<Kernel>
PStream & PLearn::operator>> ( PStream &  in,
NoBpropVariable &  o 
) [inline]

Definition at line 88 of file var/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
PStream& PLearn::operator>> ( PStream &  in,
CheckDond2FileSequence *&  o 
) [inline]

Definition at line 111 of file CheckDond2FileSequence.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FeatureSetNaiveBayesClassifier > &  o 
) [inline]

Definition at line 165 of file FeatureSetNaiveBayesClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
RowOfVariable *&  o 
) [inline]

Definition at line 84 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
PStream& PLearn::operator>> ( PStream &  in,
PP< StackedSVDNet > &  o 
) [inline]

Definition at line 270 of file StackedSVDNet.h.

PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodSmoothnessNNet &  o 
) [inline]

Definition at line 173 of file NeighborhoodSmoothnessNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
SeparateInputVMatrix *&  o 
) [inline]

Definition at line 123 of file SeparateInputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
IsMissingVariable &  o 
) [inline]

Definition at line 96 of file IsMissingVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< KernelVMatrix > &  o 
) [inline]

Definition at line 93 of file KernelVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VVMatrix > &  o 
) [inline]

Definition at line 137 of file VVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
KFoldSplitter &  o 
) [inline]

Definition at line 117 of file KFoldSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMTrainer > &  o 
) [inline]

Definition at line 174 of file RBMTrainer.h.

PStream& PLearn::operator>> ( PStream &  in,
InstanceSnippetTest *&  o 
) [inline]

Definition at line 197 of file InstanceSnippetTest.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMWoodsLayer *&  o 
) [inline]

Definition at line 211 of file RBMWoodsLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RightPseudoInverseVariable > &  o 
) [inline]

Definition at line 74 of file RightPseudoInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< FileDictionary > &  o 
) [inline]

Definition at line 118 of file FileDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNImputationVMatrix &  o 
) [inline]

Definition at line 135 of file KNNImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussMix *&  o 
) [inline]

Definition at line 536 of file GaussMix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KNNImputationVMatrix > &  o 
) [inline]

Definition at line 135 of file KNNImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianProcessNLLVariable &  o 
) [inline]

Definition at line 230 of file GaussianProcessNLLVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PTest *&  o 
) [inline]

Definition at line 127 of file PTest.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNVMatrix &  o 
) [inline]

Definition at line 151 of file KNNVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ReshapeVariable *&  o 
) [inline]

Definition at line 81 of file ReshapeVariable.h.

{ return new ReshapeVariable(v,newlength,newwidth); }
PStream& PLearn::operator>> ( PStream &  in,
KNNVMatrix *&  o 
) [inline]

Definition at line 151 of file KNNVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KNNVMatrix > &  o 
) [inline]

Definition at line 151 of file KNNVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Y > &  o 
) [inline]

Definition at line 192 of file ObjectGraphIteratorTest.cc.

: public Object
PStream& PLearn::operator>> ( PStream &  in,
TargetEncodingLearner *&  o 
) [inline]

Definition at line 196 of file TargetEncodingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TargetEncodingLearner &  o 
) [inline]

Definition at line 196 of file TargetEncodingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SelectSetsSplitter > &  o 
) [inline]

Definition at line 127 of file SelectSetsSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityPLearner &  o 
) [inline]

Definition at line 93 of file IdentityPLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ReIndexedTargetVariable *&  o 
) [inline]

Definition at line 103 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }
PStream& PLearn::operator>> ( PStream &  in,
VecDictionary &  o 
) [inline]

Definition at line 122 of file VecDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
DifferenceKernel &  o 
) [inline]

Definition at line 67 of file DifferenceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
TestLearner *&  o 
) [inline]

Definition at line 176 of file TestLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
Matern1ARDKernel &  o 
) [inline]

Definition at line 141 of file Matern1ARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
HeterogenuousAffineTransformVariable *&  o 
) [inline]

Definition at line 113 of file HeterogenuousAffineTransformVariable.h.

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ProjectionErrorVariable > &  o 
) [inline]

Definition at line 96 of file ProjectionErrorVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
LocallyPrecomputedVMatrix &  o 
) [inline]

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LocallyPrecomputedVMatrix *&  o 
) [inline]

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IdentityFeatureSet > &  o 
) [inline]

Definition at line 101 of file IdentityFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
Subsampling2DModule *&  o 
) [inline]

Definition at line 229 of file Subsampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LocallyPrecomputedVMatrix > &  o 
) [inline]

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ProductVariable > &  o 
) [inline]

Definition at line 77 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
AdditiveNormalizationKernel &  o 
) [inline]

Definition at line 163 of file AdditiveNormalizationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ProductVariable *&  o 
) [inline]

Definition at line 77 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
LocalNeighborsDifferencesVMatrix &  o 
) [inline]

Definition at line 120 of file LocalNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
LocalNeighborsDifferencesVMatrix *&  o 
) [inline]

Definition at line 120 of file LocalNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
Learner &  o 
) [inline]

Definition at line 568 of file Learner.h.

{
PStream& PLearn::operator>> ( PStream &  in,
Subsampling2DModule &  o 
) [inline]

Definition at line 229 of file Subsampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MeanImputationVMatrix *&  o 
) [inline]

Definition at line 113 of file MeanImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ProductTransposeVariable > &  o 
) [inline]

Definition at line 77 of file ProductTransposeVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
MeanImputationVMatrix &  o 
) [inline]

Definition at line 113 of file MeanImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeanImputationVMatrix > &  o 
) [inline]

Definition at line 113 of file MeanImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PolynomialKernel *&  o 
) [inline]

Definition at line 103 of file PolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Function > &  o 
) [inline]

Definition at line 208 of file Func.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AdditiveNormalizationKernel > &  o 
) [inline]

Definition at line 163 of file AdditiveNormalizationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PowVariableVariable > &  o 
) [inline]

Definition at line 88 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
PStream& PLearn::operator>> ( PStream &  in,
SelectRowsVMatrix *&  o 
) [inline]

Definition at line 140 of file SelectRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PowVariableVariable *&  o 
) [inline]

Definition at line 88 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
PStream& PLearn::operator>> ( PStream &  in,
PP< VecDictionary > &  o 
) [inline]

Definition at line 122 of file VecDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeanMedianModeImputationVMatrix > &  o 
) [inline]

Definition at line 127 of file MeanMedianModeImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMSparse1DMatrixConnection > &  o 
) [inline]

Definition at line 146 of file RBMSparse1DMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
MemoryVMatrix *&  o 
) [inline]

Definition at line 117 of file MemoryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MemoryVMatrix &  o 
) [inline]

Definition at line 117 of file MemoryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CosKernel > &  o 
) [inline]

Definition at line 72 of file CosKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ARDBaseKernel &  o 
) [inline]

Definition at line 120 of file ARDBaseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
MemoryVMatrixNoSave &  o 
) [inline]

Definition at line 119 of file MemoryVMatrixNoSave.h.

PStream& PLearn::operator>> ( PStream &  in,
PowVariable *&  o 
) [inline]

Definition at line 75 of file PowVariable.h.

{ return new PowVariable(v,power); }
PStream& PLearn::operator>> ( PStream &  in,
MemoryVMatrixNoSave *&  o 
) [inline]

Definition at line 119 of file MemoryVMatrixNoSave.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HeterogenuousAffineTransformVariable > &  o 
) [inline]

Definition at line 113 of file HeterogenuousAffineTransformVariable.h.

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }
PStream& PLearn::operator>> ( PStream &  in,
ARDBaseKernel *&  o 
) [inline]

Definition at line 120 of file ARDBaseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HeterogenuousAffineTransformWeightPenalty > &  o 
) [inline]

Definition at line 119 of file HeterogenuousAffineTransformWeightPenalty.h.

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SelectRowsMultiInstanceVMatrix > &  o 
) [inline]

Definition at line 136 of file SelectRowsMultiInstanceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixSoftmaxLossVariable *&  o 
) [inline]

Definition at line 77 of file MatrixSoftmaxLossVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PotentialsVariable *&  o 
) [inline]

Definition at line 95 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
PStream& PLearn::operator>> ( PStream &  in,
MeanStatsIterator &  o 
) [inline]

Definition at line 134 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
RBMSparse1DMatrixConnection *&  o 
) [inline]

Definition at line 146 of file RBMSparse1DMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
QuantilesStatsIterator *&  o 
) [inline]

Definition at line 372 of file StatsIterator.h.

: public Array<StatsIt>
PStream& PLearn::operator>> ( PStream &  in,
GaussianContinuum *&  o 
) [inline]

Definition at line 281 of file GaussianContinuum.h.

PStream& PLearn::operator>> ( PStream &  in,
Isomap &  o 
) [inline]

Definition at line 135 of file Isomap.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMSparse1DMatrixConnection &  o 
) [inline]

Definition at line 146 of file RBMSparse1DMatrixConnection.h.

PStream & PLearn::operator>> ( PStream &  in,
RealRange &  x 
)

Definition at line 89 of file RealMapping.cc.

References PLearn::RealRange::checkbrackets(), PLearn::PStream::get(), PLearn::RealRange::high, in, PLearn::RealRange::leftbracket, PLearn::RealRange::low, PLearn::RealRange::rightbracket, PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{ 
    in.skipBlanksAndCommentsAndSeparators();
    x.leftbracket = in.get();
    in.skipBlanksAndComments();
    in >> x.low;
    in.skipBlanksAndComments();
    in >> x.high;
    in.skipBlanksAndComments();
    x.rightbracket = in.get();
    x.checkbrackets();
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< MissingInstructionVMatrix > &  o 
) [inline]

Definition at line 133 of file MissingInstructionVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Subsampling2DModule > &  o 
) [inline]

Definition at line 229 of file Subsampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MixtureVMatrix &  o 
) [inline]

Definition at line 130 of file MixtureVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MixtureVMatrix *&  o 
) [inline]

Definition at line 130 of file MixtureVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TanhModule &  o 
) [inline]

Definition at line 137 of file TanhModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MixUnlabeledNeighbourVMatrix &  o 
) [inline]

Definition at line 140 of file MixUnlabeledNeighbourVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MixUnlabeledNeighbourVMatrix *&  o 
) [inline]

Definition at line 140 of file MixUnlabeledNeighbourVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FixDond2BinaryVariables *&  o 
) [inline]

Definition at line 137 of file FixDond2BinaryVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PlusRowVariable > &  o 
) [inline]

Definition at line 78 of file PlusRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
BasicIdentityCallsTest *&  o 
) [inline]

Definition at line 144 of file BasicIdentityCallsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SelectColumnsVMatrix > &  o 
) [inline]

Definition at line 149 of file SelectColumnsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiInstanceNNet *&  o 
) [inline]

Definition at line 172 of file MultiInstanceNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
MovingAverageVMatrix &  o 
) [inline]

Definition at line 116 of file MovingAverageVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MovingAverageVMatrix *&  o 
) [inline]

Definition at line 116 of file MovingAverageVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MovingAverageVMatrix > &  o 
) [inline]

Definition at line 116 of file MovingAverageVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BetaKernel *&  o 
) [inline]

Definition at line 145 of file BetaKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusManyVariable *&  o 
) [inline]

Definition at line 112 of file PlusManyVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiInstanceVMatrix &  o 
) [inline]

Definition at line 109 of file MultiInstanceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepNonLocalManifoldParzen &  o 
) [inline]

Definition at line 353 of file DeepNonLocalManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
Learner *&  o 
) [inline]

Definition at line 568 of file Learner.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< MultiInstanceVMatrix > &  o 
) [inline]

Definition at line 109 of file MultiInstanceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiTargetOneHotVMatrix &  o 
) [inline]

Definition at line 134 of file MultiTargetOneHotVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
MultiTargetOneHotVMatrix *&  o 
) [inline]

Definition at line 134 of file MultiTargetOneHotVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< BetaKernel > &  o 
) [inline]

Definition at line 145 of file BetaKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
CosKernel &  o 
) [inline]

Definition at line 72 of file CosKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectRowsFileIndexVMatrix &  o 
) [inline]

Definition at line 95 of file SelectRowsFileIndexVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NeuralNet *&  o 
) [inline]

Definition at line 158 of file NeuralNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMMultitaskClassificationModule > &  o 
) [inline]

Definition at line 201 of file RBMMultitaskClassificationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiTaskSeparationSplitter &  o 
) [inline]

Definition at line 139 of file MultiTaskSeparationSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
DistRepNNet &  o 
) [inline]

Definition at line 353 of file DistRepNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiTaskSeparationSplitter *&  o 
) [inline]

Definition at line 139 of file MultiTaskSeparationSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FNetLayerVariable > &  o 
) [inline]

Definition at line 119 of file FNetLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NonLocalManifoldParzenKernel > &  o 
) [inline]

Definition at line 83 of file NonLocalManifoldParzenKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
InvertElementsVariable *&  o 
) [inline]

Definition at line 70 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PLogPVariable > &  o 
) [inline]

Definition at line 71 of file PLogPVariable.h.

{ return new PLogPVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
MultiToUniInstanceSelectRandomVMatrix &  o 
) [inline]

Definition at line 96 of file MultiToUniInstanceSelectRandomVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMModule *&  o 
) [inline]

Definition at line 388 of file RBMModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StatsIterator > &  o 
) [inline]

Definition at line 108 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
ClassDistanceProportionCostFunction *&  o 
) [inline]

Definition at line 76 of file ClassDistanceProportionCostFunction.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
NoSplitSplitter &  o 
) [inline]

Definition at line 124 of file NoSplitSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PDistributionVariable > &  o 
) [inline]

Definition at line 83 of file PDistributionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectColumnsVMatrix &  o 
) [inline]

Definition at line 149 of file SelectColumnsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMultitaskClassificationModule &  o 
) [inline]

Definition at line 201 of file RBMMultitaskClassificationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
NoSplitSplitter *&  o 
) [inline]

Definition at line 124 of file NoSplitSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassDistanceProportionCostFunction > &  o 
) [inline]

Definition at line 76 of file ClassDistanceProportionCostFunction.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< NoSplitSplitter > &  o 
) [inline]

Definition at line 124 of file NoSplitSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
OneHotVMatrix &  o 
) [inline]

Definition at line 113 of file OneHotVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
OneHotVMatrix *&  o 
) [inline]

Definition at line 113 of file OneHotVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OneHotVMatrix > &  o 
) [inline]

Definition at line 113 of file OneHotVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMultitaskClassificationModule *&  o 
) [inline]

Definition at line 201 of file RBMMultitaskClassificationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
OneVsAllVMatrix *&  o 
) [inline]

Definition at line 115 of file OneVsAllVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
OneVsAllVMatrix &  o 
) [inline]

Definition at line 115 of file OneVsAllVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FNetLayerVariable &  o 
) [inline]

Definition at line 119 of file FNetLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassErrorCostFunction &  o 
) [inline]

Definition at line 99 of file ClassErrorCostFunction.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PairsVMatrix &  o 
) [inline]

Definition at line 92 of file PairsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PairsVMatrix *&  o 
) [inline]

Definition at line 92 of file PairsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassErrorCostFunction *&  o 
) [inline]

Definition at line 99 of file ClassErrorCostFunction.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
OneHotVariable &  o 
) [inline]

Definition at line 84 of file OneHotVariable.h.

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PairsVMatrix > &  o 
) [inline]

Definition at line 92 of file PairsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FNetLayerVariable *&  o 
) [inline]

Definition at line 119 of file FNetLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PLearnerOutputVMatrix &  o 
) [inline]

Definition at line 148 of file PLearnerOutputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PLearnerOutputVMatrix *&  o 
) [inline]

Definition at line 148 of file PLearnerOutputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
WordNetSenseDictionary *&  o 
) [inline]

Definition at line 209 of file WordNetSenseDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
WordNetSenseDictionary &  o 
) [inline]

Definition at line 209 of file WordNetSenseDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassErrorCostFunction > &  o 
) [inline]

Definition at line 99 of file ClassErrorCostFunction.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
RowBufferedVMatrixTest &  o 
) [inline]

Definition at line 126 of file RowBufferedVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PrecomputedVMatrix > &  o 
) [inline]

Definition at line 112 of file PrecomputedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DenoisingRecurrentNet > &  o 
) [inline]

Definition at line 524 of file DenoisingRecurrentNet.h.

PStream& PLearn::operator>> ( PStream &  in,
TransparentParentable &  o 
) [inline]

Definition at line 316 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
Template &  o 
) [inline]

Definition at line 61 of file Template.h.

PStream& PLearn::operator>> ( PStream &  in,
VecExtendedVMatrix &  o 
) [inline]

Definition at line 106 of file VecExtendedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RealMapping &  o 
) [inline]

Definition at line 265 of file RealMapping.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessDatasetVMatrix &  o 
) [inline]

Definition at line 112 of file ProcessDatasetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessDatasetVMatrix *&  o 
) [inline]

Definition at line 112 of file ProcessDatasetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodSmoothnessNNet *&  o 
) [inline]

Definition at line 173 of file NeighborhoodSmoothnessNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HTMLHelpGenerator > &  o 
) [inline]

Definition at line 116 of file HTMLHelpGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
ConvolveVariable *&  o 
) [inline]

Definition at line 72 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
PStream& PLearn::operator>> ( PStream &  in,
PP< RandomGaussMix > &  o 
) [inline]

Definition at line 107 of file RandomGaussMix.h.

PStream& PLearn::operator>> ( PStream &  in,
RunICPVariable &  o 
) [inline]

Definition at line 181 of file RunICPVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WordNetSenseDictionary > &  o 
) [inline]

Definition at line 209 of file WordNetSenseDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessingVMatrix &  o 
) [inline]

Definition at line 127 of file ProcessingVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NllSemisphericalGaussianVariable > &  o 
) [inline]

Definition at line 91 of file NllSemisphericalGaussianVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
NllSemisphericalGaussianVariable *&  o 
) [inline]

Definition at line 91 of file NllSemisphericalGaussianVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
AnalyzeFieldStats *&  o 
) [inline]

Definition at line 178 of file AnalyzeFieldStats.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassMarginCostFunction &  o 
) [inline]

Definition at line 93 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
PStream& PLearn::operator>> ( PStream &  in,
IfThenElseVariable *&  o 
) [inline]

Definition at line 84 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
PStream& PLearn::operator>> ( PStream &  in,
RowBufferedVMatrix &  o 
) [inline]

Definition at line 95 of file RowBufferedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PLearner &  o 
) [inline]

Definition at line 727 of file PLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NllGeneralGaussianVariable > &  o 
) [inline]

Definition at line 103 of file NllGeneralGaussianVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ProcessSymbolicSequenceVMatrix &  o 
) [inline]

Definition at line 314 of file ProcessSymbolicSequenceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessSymbolicSequenceVMatrix *&  o 
) [inline]

Definition at line 314 of file ProcessSymbolicSequenceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
StatsIterator &  o 
) [inline]

Definition at line 108 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
OneHotVariable *&  o 
) [inline]

Definition at line 84 of file OneHotVariable.h.

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }
PStream& PLearn::operator>> ( PStream &  in,
Y *&  o 
) [inline]

Definition at line 192 of file ObjectGraphIteratorTest.cc.

: public Object
PStream& PLearn::operator>> ( PStream &  in,
PP< NegLogPoissonVariable > &  o 
) [inline]

Definition at line 81 of file NegLogPoissonVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ClassMarginCostFunction *&  o 
) [inline]

Definition at line 93 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
PStream& PLearn::operator>> ( PStream &  in,
RowBufferedVMatrix *&  o 
) [inline]

Definition at line 95 of file RowBufferedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RowBufferedVMatrix > &  o 
) [inline]

Definition at line 95 of file RowBufferedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMMixedConnection > &  o 
) [inline]

Definition at line 243 of file RBMMixedConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
MoleculeTemplateLearner &  o 
) [inline]

Definition at line 236 of file MoleculeTemplateLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CorrelationKernel > &  o 
) [inline]

Definition at line 162 of file CorrelationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassMarginCostFunction > &  o 
) [inline]

Definition at line 93 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
PStream& PLearn::operator>> ( PStream &  in,
RBMMixedConnection *&  o 
) [inline]

Definition at line 243 of file RBMMixedConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedFocusedAutoassociatorsNet &  o 
) [inline]

Definition at line 365 of file StackedFocusedAutoassociatorsNet.h.

PStream& PLearn::operator>> ( PStream &  in,
NegCrossEntropySigmoidVariable *&  o 
) [inline]

Definition at line 87 of file NegCrossEntropySigmoidVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ObservationWindow > &  o 
) [inline]

Definition at line 143 of file ObservationWindow.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NatGradNNet > &  o 
) [inline]

Definition at line 314 of file NatGradNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FeatureSetSequentialCRF > &  o 
) [inline]

Definition at line 434 of file FeatureSetSequentialCRF.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixSumOfVariable > &  o 
) [inline]

Definition at line 94 of file MatrixSumOfVariable.h.

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }
PStream& PLearn::operator>> ( PStream &  in,
CrossEntropyVariable *&  o 
) [inline]

Definition at line 74 of file CrossEntropyVariable.h.

{ return new CrossEntropyVariable(network_output, targets); }
PStream& PLearn::operator>> ( PStream &  in,
RandomNeighborsDifferencesVMatrix &  o 
) [inline]

Definition at line 117 of file RandomNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RandomNeighborsDifferencesVMatrix *&  o 
) [inline]

Definition at line 117 of file RandomNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
NegateElementsVariable &  o 
) [inline]

Definition at line 82 of file NegateElementsVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RBMMixedConnection &  o 
) [inline]

Definition at line 243 of file RBMMixedConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RandomNeighborsDifferencesVMatrix > &  o 
) [inline]

Definition at line 117 of file RandomNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
BestAveragingPLearner *&  o 
) [inline]

Definition at line 228 of file BestAveragingPLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
CompactVMatrixGaussianKernel &  o 
) [inline]

Definition at line 83 of file CompactVMatrixGaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomSamplesFromVMatrix &  o 
) [inline]

Definition at line 134 of file RandomSamplesFromVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomSamplesFromVMatrix *&  o 
) [inline]

Definition at line 134 of file RandomSamplesFromVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
OneHotSquaredLoss &  o 
) [inline]

Definition at line 86 of file OneHotSquaredLoss.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
MulticlassLossVariable &  o 
) [inline]

Definition at line 79 of file MulticlassLossVariable.h.

{ return new MulticlassLossVariable(network_output, targets); }
PStream& PLearn::operator>> ( PStream &  in,
CompactVMatrixGaussianKernel *&  o 
) [inline]

Definition at line 83 of file CompactVMatrixGaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomSamplesVMatrix &  o 
) [inline]

Definition at line 155 of file RandomSamplesVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomSamplesVMatrix *&  o 
) [inline]

Definition at line 155 of file RandomSamplesVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MinVariable > &  o 
) [inline]

Definition at line 68 of file MinVariable.h.

{ return new MinVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
RealMapping *&  o 
) [inline]

Definition at line 265 of file RealMapping.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PPTest > &  o 
) [inline]

Definition at line 130 of file PPTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RandomSamplesVMatrix > &  o 
) [inline]

Definition at line 155 of file RandomSamplesVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CompactVMatrixGaussianKernel > &  o 
) [inline]

Definition at line 83 of file CompactVMatrixGaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
RangeVMatrix &  o 
) [inline]

Definition at line 84 of file RangeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMatrixTransposeConnection &  o 
) [inline]

Definition at line 216 of file RBMMatrixTransposeConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMatrixTransposeConnection *&  o 
) [inline]

Definition at line 216 of file RBMMatrixTransposeConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RangeVMatrix > &  o 
) [inline]

Definition at line 84 of file RangeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RankedVMatrix &  o 
) [inline]

Definition at line 128 of file RankedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RankedVMatrix *&  o 
) [inline]

Definition at line 128 of file RankedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtractVariable *&  o 
) [inline]

Definition at line 86 of file ExtractVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ReorderByMissingVMatrix > &  o 
) [inline]

Definition at line 107 of file ReorderByMissingVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MinusTransposedColumnVariable > &  o 
) [inline]

Definition at line 74 of file MinusTransposedColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SymbolNode > &  o 
) [inline]

Definition at line 144 of file SymbolNode.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RepeatVMatrix > &  o 
) [inline]

Definition at line 115 of file RepeatVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
MinusTransposedColumnVariable &  o 
) [inline]

Definition at line 74 of file MinusTransposedColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ManualBinner *&  o 
) [inline]

Definition at line 116 of file ManualBinner.h.

PStream& PLearn::operator>> ( PStream &  in,
PPTest *&  o 
) [inline]

Definition at line 130 of file PPTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PreprocessingVMatrix &  o 
) [inline]

Definition at line 198 of file VMatLanguage.h.

:1125)
PStream& PLearn::operator>> ( PStream &  in,
PP< BootstrapVMatrix > &  o 
) [inline]

Definition at line 102 of file BootstrapVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CompactVMatrixPolynomialKernel *&  o 
) [inline]

Definition at line 82 of file CompactVMatrixPolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
MinusRowVariable &  o 
) [inline]

Definition at line 75 of file MinusRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionsProcessedVMatrix &  o 
) [inline]

Definition at line 113 of file RealFunctionsProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionsProcessedVMatrix *&  o 
) [inline]

Definition at line 113 of file RealFunctionsProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
AnalyzeDond2DiscreteVariables *&  o 
) [inline]

Definition at line 123 of file AnalyzeDond2DiscreteVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RealFunctionsProcessedVMatrix > &  o 
) [inline]

Definition at line 113 of file RealFunctionsProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformizeLearner *&  o 
) [inline]

Definition at line 187 of file UniformizeLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
MinusColumnVariable &  o 
) [inline]

Definition at line 75 of file MinusColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RegularGridVMatrix &  o 
) [inline]

Definition at line 109 of file RegularGridVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LimitedGaussianSmoother &  o 
) [inline]

Definition at line 128 of file LimitedGaussianSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
RegularGridVMatrix *&  o 
) [inline]

Definition at line 109 of file RegularGridVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelPCA *&  o 
) [inline]

Definition at line 124 of file KernelPCA.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CompactVMatrixPolynomialKernel > &  o 
) [inline]

Definition at line 82 of file CompactVMatrixPolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtendedVariable *&  o 
) [inline]

Definition at line 97 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeMulticlassLeaveFast &  o 
) [inline]

Definition at line 95 of file RegressionTreeMulticlassLeaveFast.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RealMapping > &  o 
) [inline]

Definition at line 265 of file RealMapping.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ReIndexedTargetVMatrix > &  o 
) [inline]

Definition at line 109 of file ReIndexedTargetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Min2Variable > &  o 
) [inline]

Definition at line 78 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
RunICPVariable *&  o 
) [inline]

Definition at line 181 of file RunICPVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RemapLastColumnVMatrix &  o 
) [inline]

Definition at line 124 of file RemapLastColumnVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMatrixConnectionNatGrad *&  o 
) [inline]

Definition at line 121 of file RBMMatrixConnectionNatGrad.h.

PStream& PLearn::operator>> ( PStream &  in,
ConvexBasisKernel &  o 
) [inline]

Definition at line 77 of file ConvexBasisKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RemapLastColumnVMatrix > &  o 
) [inline]

Definition at line 124 of file RemapLastColumnVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RunICPVariable > &  o 
) [inline]

Definition at line 181 of file RunICPVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RemoveDuplicateVMatrix &  o 
) [inline]

Definition at line 110 of file RemoveDuplicateVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MaxVariable *&  o 
) [inline]

Definition at line 70 of file MaxVariable.h.

{ return new MaxVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
AdaBoost &  o 
) [inline]

Definition at line 226 of file AdaBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
RemoveDuplicateVMatrix *&  o 
) [inline]

Definition at line 110 of file RemoveDuplicateVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ConvexBasisKernel *&  o 
) [inline]

Definition at line 77 of file ConvexBasisKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RepeatSplitter > &  o 
) [inline]

Definition at line 131 of file RepeatSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
Y &  o 
) [inline]

Definition at line 192 of file ObjectGraphIteratorTest.cc.

: public Object
PStream& PLearn::operator>> ( PStream &  in,
AdaBoost *&  o 
) [inline]

Definition at line 226 of file AdaBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
BaseRegressorConfidence *&  o 
) [inline]

Definition at line 113 of file BaseRegressorConfidence.h.

PStream& PLearn::operator>> ( PStream &  in,
ReorderByMissingVMatrix &  o 
) [inline]

Definition at line 107 of file ReorderByMissingVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ReorderByMissingVMatrix *&  o 
) [inline]

Definition at line 107 of file ReorderByMissingVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeshFace > &  o 
) [inline]

Definition at line 142 of file MeshFace.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConvexBasisKernel > &  o 
) [inline]

Definition at line 77 of file ConvexBasisKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TargetEncodingLearner > &  o 
) [inline]

Definition at line 196 of file TargetEncodingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExtendedVariable > &  o 
) [inline]

Definition at line 97 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
PStream& PLearn::operator>> ( PStream &  in,
MatRowVariable *&  o 
) [inline]

Definition at line 82 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
PStream& PLearn::operator>> ( PStream &  in,
RepeatSplitter *&  o 
) [inline]

Definition at line 131 of file RepeatSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
RepeatSplitter &  o 
) [inline]

Definition at line 131 of file RepeatSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
RepeatVMatrix &  o 
) [inline]

Definition at line 115 of file RepeatVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RepeatVMatrix *&  o 
) [inline]

Definition at line 115 of file RepeatVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RBMLocalMultinomialLayer *&  o 
) [inline]

Definition at line 181 of file RBMLocalMultinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ParentableObject > &  o 
) [inline]

Definition at line 160 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
CorrelationKernel &  o 
) [inline]

Definition at line 162 of file CorrelationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
CorrelationKernel *&  o 
) [inline]

Definition at line 162 of file CorrelationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ReplicateSamplesVMatrix &  o 
) [inline]

Definition at line 119 of file ReplicateSamplesVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ReplicateSamplesVMatrix *&  o 
) [inline]

Definition at line 119 of file ReplicateSamplesVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ReplicateSamplesVMatrix > &  o 
) [inline]

Definition at line 119 of file ReplicateSamplesVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryKernelDiscrimination > &  o 
) [inline]

Definition at line 146 of file BinaryKernelDiscrimination.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMatrixConnection *&  o 
) [inline]

Definition at line 296 of file RBMMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixSoftmaxLossVariable > &  o 
) [inline]

Definition at line 77 of file MatrixSoftmaxLossVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
TransposeProductVariable &  o 
) [inline]

Definition at line 77 of file TransposeProductVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< DeterminantVariable > &  o 
) [inline]

Definition at line 76 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
PStream& PLearn::operator>> ( PStream &  in,
MatrixSoftmaxVariable &  o 
) [inline]

Definition at line 71 of file MatrixSoftmaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RemoveDuplicateVMatrix > &  o 
) [inline]

Definition at line 110 of file RemoveDuplicateVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RowsSubVMatrix &  o 
) [inline]

Definition at line 102 of file RowsSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DichotomizeDond2DiscreteVariables *&  o 
) [inline]

Definition at line 124 of file DichotomizeDond2DiscreteVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
RowsSubVMatrix *&  o 
) [inline]

Definition at line 102 of file RowsSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LLE *&  o 
) [inline]

Definition at line 127 of file LLE.h.

PStream& PLearn::operator>> ( PStream &  in,
DenoisingRecurrentNet *&  o 
) [inline]

Definition at line 524 of file DenoisingRecurrentNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixOneHotSquaredLoss > &  o 
) [inline]

Definition at line 78 of file MatrixOneHotSquaredLoss.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RowsSubVMatrix > &  o 
) [inline]

Definition at line 102 of file RowsSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MatRowVariable &  o 
) [inline]

Definition at line 82 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
PStream& PLearn::operator>> ( PStream &  in,
DiscriminativeDeepBeliefNet &  o 
) [inline]

Definition at line 315 of file DiscriminativeDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectColumnsVMatrix *&  o 
) [inline]

Definition at line 149 of file SelectColumnsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UniformizeLearner > &  o 
) [inline]

Definition at line 187 of file UniformizeLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SplitWiseValidationVMatrix &  o 
) [inline]

Definition at line 118 of file SplitWiseValidationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CosKernel *&  o 
) [inline]

Definition at line 72 of file CosKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectRowsFileIndexVMatrix *&  o 
) [inline]

Definition at line 95 of file SelectRowsFileIndexVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BaseRegressorConfidence > &  o 
) [inline]

Definition at line 113 of file BaseRegressorConfidence.h.

PStream& PLearn::operator>> ( PStream &  in,
RankingFromKernel &  o 
) [inline]

Definition at line 179 of file RankingFromKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SelectRowsFileIndexVMatrix > &  o 
) [inline]

Definition at line 95 of file SelectRowsFileIndexVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PCA &  o 
) [inline]

Definition at line 234 of file PCA.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectRowsMultiInstanceVMatrix &  o 
) [inline]

Definition at line 136 of file SelectRowsMultiInstanceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LLC > &  o 
) [inline]

Definition at line 163 of file LLC.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectRowsMultiInstanceVMatrix *&  o 
) [inline]

Definition at line 136 of file SelectRowsMultiInstanceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DiagonalizedFactorsProductVariable > &  o 
) [inline]

Definition at line 85 of file DiagonalizedFactorsProductVariable.h.

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }
PStream& PLearn::operator>> ( PStream &  in,
PP< Experiment > &  o 
) [inline]

Definition at line 108 of file Experiment.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryKernelDiscrimination *&  o 
) [inline]

Definition at line 146 of file BinaryKernelDiscrimination.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectRowsVMatrix &  o 
) [inline]

Definition at line 140 of file SelectRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CovariancePreservationImputationVMatrix *&  o 
) [inline]

Definition at line 124 of file CovariancePreservationImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SelectRowsVMatrix > &  o 
) [inline]

Definition at line 140 of file SelectRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectSetsSplitter &  o 
) [inline]

Definition at line 127 of file SelectSetsSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
RemapLastColumnVMatrix *&  o 
) [inline]

Definition at line 124 of file RemapLastColumnVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
KPCATangentLearner &  o 
) [inline]

Definition at line 179 of file KPCATangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ExpVariable *&  o 
) [inline]

Definition at line 71 of file ExpVariable.h.

{ return new ExpVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PseudolikelihoodRBM *&  o 
) [inline]

Definition at line 437 of file PseudolikelihoodRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectSetsSplitter *&  o 
) [inline]

Definition at line 127 of file SelectSetsSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExpVariable > &  o 
) [inline]

Definition at line 71 of file ExpVariable.h.

{ return new ExpVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SubVMatrix *&  o 
) [inline]

Definition at line 126 of file SubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SeparateInputVMatrix &  o 
) [inline]

Definition at line 123 of file SeparateInputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FileVMatrixTest > &  o 
) [inline]

Definition at line 130 of file FileVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
GradientCorrector &  o 
) [inline]

Definition at line 132 of file GradientCorrector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Template > &  o 
) [inline]

Definition at line 61 of file Template.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LogVariable > &  o 
) [inline]

Definition at line 70 of file LogVariable.h.

{ return new LogVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SequentialSplitter &  o 
) [inline]

Definition at line 111 of file SequentialSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
MarginPerceptronCostVariable *&  o 
) [inline]

Definition at line 81 of file MarginPerceptronCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SequentialSplitter *&  o 
) [inline]

Definition at line 111 of file SequentialSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OnlineGramNaturalGradientOptimizer > &  o 
) [inline]

Definition at line 156 of file OnlineGramNaturalGradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DivisiveNormalizationKernel > &  o 
) [inline]

Definition at line 154 of file DivisiveNormalizationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectedOutputCostFunction *&  o 
) [inline]

Definition at line 82 of file SelectedOutputCostFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
ShiftAndRescaleVMatrix &  o 
) [inline]

Definition at line 133 of file ShiftAndRescaleVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RankingFromKernel > &  o 
) [inline]

Definition at line 179 of file RankingFromKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ShiftAndRescaleVMatrix *&  o 
) [inline]

Definition at line 133 of file ShiftAndRescaleVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DotProductKernel > &  o 
) [inline]

Definition at line 69 of file DotProductKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianContinuum &  o 
) [inline]

Definition at line 281 of file GaussianContinuum.h.

PStream& PLearn::operator>> ( PStream &  in,
LogAddVariable *&  o 
) [inline]

Definition at line 108 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
PStream& PLearn::operator>> ( PStream &  in,
RBMConv2DConnection &  o 
) [inline]

Definition at line 242 of file RBMConv2DConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
ShuffleColumnsVMatrix *&  o 
) [inline]

Definition at line 110 of file ShuffleColumnsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ShuffleColumnsVMatrix > &  o 
) [inline]

Definition at line 110 of file ShuffleColumnsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TopDownAsymetricDeepNetwork *&  o 
) [inline]

Definition at line 282 of file TopDownAsymetricDeepNetwork.h.

PStream& PLearn::operator>> ( PStream &  in,
SortRowsVMatrix &  o 
) [inline]

Definition at line 95 of file SortRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMLateralBinomialLayer > &  o 
) [inline]

Definition at line 302 of file RBMLateralBinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IsLargerVariable > &  o 
) [inline]

Definition at line 75 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SortRowsVMatrix > &  o 
) [inline]

Definition at line 95 of file SortRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LocallyMagnifiedDistribution *&  o 
) [inline]

Definition at line 161 of file LocallyMagnifiedDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LogAddVariable > &  o 
) [inline]

Definition at line 108 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SequentialValidation > &  o 
) [inline]

Definition at line 265 of file SequentialValidation.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceVMatrix *&  o 
) [inline]

Definition at line 157 of file SourceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMLateralBinomialLayer *&  o 
) [inline]

Definition at line 302 of file RBMLateralBinomialLayer.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< PTester > &  o 
) [inline]

Definition at line 133 of file PExperiment.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceVMatrixSplitter &  o 
) [inline]

Definition at line 132 of file SourceVMatrixSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDistribution *&  o 
) [inline]

Definition at line 112 of file GaussianDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceVMatrixSplitter *&  o 
) [inline]

Definition at line 132 of file SourceVMatrixSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
DistanceKernel *&  o 
) [inline]

Definition at line 90 of file DistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
LocalizedFeaturesLayerVariable &  o 
) [inline]

Definition at line 115 of file LocalizedFeaturesLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SourceVMatrixSplitter > &  o 
) [inline]

Definition at line 132 of file SourceVMatrixSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
SparseVMatrix &  o 
) [inline]

Definition at line 119 of file SparseVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LiftOutputVariable > &  o 
) [inline]

Definition at line 69 of file LiftOutputVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< SequentialModelSelector > &  o 
) [inline]

Definition at line 187 of file SequentialModelSelector.h.

PStream& PLearn::operator>> ( PStream &  in,
SparseVMatrix *&  o 
) [inline]

Definition at line 119 of file SparseVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DistanceKernel > &  o 
) [inline]

Definition at line 90 of file DistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
DivVariable *&  o 
) [inline]

Definition at line 79 of file DivVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMLateralBinomialLayer &  o 
) [inline]

Definition at line 302 of file RBMLateralBinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
CachedFeatureSet &  o 
) [inline]

Definition at line 139 of file CachedFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
Splitter &  o 
) [inline]

Definition at line 109 of file Splitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ObjectGraphIteratorTest > &  o 
) [inline]

Definition at line 130 of file ObjectGraphIteratorTest.h.

PStream& PLearn::operator>> ( PStream &  in,
Splitter *&  o 
) [inline]

Definition at line 109 of file Splitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Splitter > &  o 
) [inline]

Definition at line 109 of file Splitter.h.

PStream& PLearn::operator>> ( PStream &  in,
DivisiveNormalizationKernel &  o 
) [inline]

Definition at line 154 of file DivisiveNormalizationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
EmbeddedSequentialLearner &  o 
) [inline]

Definition at line 113 of file EmbeddedSequentialLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
Min2Variable &  o 
) [inline]

Definition at line 78 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
ReIndexedTargetVMatrix *&  o 
) [inline]

Definition at line 109 of file ReIndexedTargetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SigmoidalKernel &  o 
) [inline]

Definition at line 73 of file SigmoidalKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeshMatch > &  o 
) [inline]

Definition at line 131 of file MeshMatch.h.

PStream& PLearn::operator>> ( PStream &  in,
SplitWiseValidationVMatrix *&  o 
) [inline]

Definition at line 118 of file SplitWiseValidationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DivisiveNormalizationKernel *&  o 
) [inline]

Definition at line 154 of file DivisiveNormalizationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstantRegressor *&  o 
) [inline]

Definition at line 163 of file ConstantRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedSplitter &  o 
) [inline]

Definition at line 132 of file StackedSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KFoldLogisticClassifier > &  o 
) [inline]

Definition at line 177 of file KFoldLogisticClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
ReIndexedTargetVMatrix &  o 
) [inline]

Definition at line 109 of file ReIndexedTargetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMDiagonalMatrixConnection *&  o 
) [inline]

Definition at line 220 of file RBMDiagonalMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StackedSplitter > &  o 
) [inline]

Definition at line 132 of file StackedSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
StochasticBinarizeVMatrix &  o 
) [inline]

Definition at line 118 of file StochasticBinarizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMDiagonalMatrixConnection &  o 
) [inline]

Definition at line 220 of file RBMDiagonalMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
StochasticBinarizeVMatrix *&  o 
) [inline]

Definition at line 118 of file StochasticBinarizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StochasticBinarizeVMatrix > &  o 
) [inline]

Definition at line 118 of file StochasticBinarizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMConv2DConnection *&  o 
) [inline]

Definition at line 242 of file RBMConv2DConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMConv2DConnection > &  o 
) [inline]

Definition at line 242 of file RBMConv2DConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
StrTableVMatrix &  o 
) [inline]

Definition at line 60 of file StrTableVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
StrTableVMatrix *&  o 
) [inline]

Definition at line 60 of file StrTableVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConstantRegressor > &  o 
) [inline]

Definition at line 163 of file ConstantRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
DotProductKernel &  o 
) [inline]

Definition at line 69 of file DotProductKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SubInputVMatrix &  o 
) [inline]

Definition at line 109 of file SubInputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CompactVMatrixPolynomialKernel &  o 
) [inline]

Definition at line 82 of file CompactVMatrixPolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
TransposedDoubleProductVariable *&  o 
) [inline]

Definition at line 140 of file TransposedDoubleProductVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeMulticlassLeaveProb *&  o 
) [inline]

Definition at line 96 of file RegressionTreeMulticlassLeaveProb.h.

PStream& PLearn::operator>> ( PStream &  in,
ScoreLayerVariable *&  o 
) [inline]

Definition at line 202 of file ScoreLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegularGridVMatrix > &  o 
) [inline]

Definition at line 109 of file RegularGridVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Template *&  o 
) [inline]

Definition at line 61 of file Template.h.

PStream& PLearn::operator>> ( PStream &  in,
KFoldLogisticClassifier &  o 
) [inline]

Definition at line 177 of file KFoldLogisticClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KernelPCA > &  o 
) [inline]

Definition at line 124 of file KernelPCA.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SubVMatrix > &  o 
) [inline]

Definition at line 126 of file SubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NeighborhoodSmoothnessNNet > &  o 
) [inline]

Definition at line 173 of file NeighborhoodSmoothnessNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiInstanceNNet &  o 
) [inline]

Definition at line 172 of file MultiInstanceNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
TemporalHorizonVMatrix *&  o 
) [inline]

Definition at line 104 of file TemporalHorizonVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TemporalHorizonVMatrix > &  o 
) [inline]

Definition at line 104 of file TemporalHorizonVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CovariancePreservationImputationVMatrix > &  o 
) [inline]

Definition at line 124 of file CovariancePreservationImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TemporaryDiskVMatrix &  o 
) [inline]

Definition at line 127 of file TemporaryDiskVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TemporaryDiskVMatrix *&  o 
) [inline]

Definition at line 127 of file TemporaryDiskVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PLS &  o 
) [inline]

Definition at line 192 of file PLS.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KernelRidgeRegressor > &  o 
) [inline]

Definition at line 170 of file KernelRidgeRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
LocalMedBoost *&  o 
) [inline]

Definition at line 162 of file LocalMedBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TemporaryDiskVMatrix > &  o 
) [inline]

Definition at line 127 of file TemporaryDiskVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatDisjointFeatureSet &  o 
) [inline]

Definition at line 132 of file ConcatDisjointFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
KFoldLogisticClassifier *&  o 
) [inline]

Definition at line 177 of file KFoldLogisticClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatRowVariable > &  o 
) [inline]

Definition at line 82 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
PStream& PLearn::operator>> ( PStream &  in,
RBMConnection *&  o 
) [inline]

Definition at line 291 of file RBMConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryBallTree > &  o 
) [inline]

Definition at line 130 of file BinaryBallTree.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMConnection > &  o 
) [inline]

Definition at line 291 of file RBMConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryBallTree *&  o 
) [inline]

Definition at line 130 of file BinaryBallTree.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatDisjointFeatureSet *&  o 
) [inline]

Definition at line 132 of file ConcatDisjointFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
InsertZerosVariable *&  o 
) [inline]

Definition at line 72 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
PStream& PLearn::operator>> ( PStream &  in,
MinStatsIterator *&  o 
) [inline]

Definition at line 277 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
DiscriminativeDeepBeliefNet *&  o 
) [inline]

Definition at line 315 of file DiscriminativeDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoVMatrixTest &  o 
) [inline]

Definition at line 133 of file AutoVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoVMatrixTest *&  o 
) [inline]

Definition at line 133 of file AutoVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DTWKernel > &  o 
) [inline]

Definition at line 154 of file DTWKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
IndexAtPositionVariable *&  o 
) [inline]

Definition at line 79 of file IndexAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
FileVMatrixTest &  o 
) [inline]

Definition at line 130 of file FileVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RankedVMatrix > &  o 
) [inline]

Definition at line 128 of file RankedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SharpeRatioStatsIterator > &  o 
) [inline]

Definition at line 254 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
Redirect *&  o 
) [inline]

Definition at line 119 of file Redirect.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatDisjointFeatureSet > &  o 
) [inline]

Definition at line 132 of file ConcatDisjointFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
SharpeRatioStatsIterator *&  o 
) [inline]

Definition at line 254 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
ChemicalICP *&  o 
) [inline]

Definition at line 288 of file ChemicalICP.h.

PStream& PLearn::operator>> ( PStream &  in,
SharpeRatioStatsIterator &  o 
) [inline]

Definition at line 254 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
EpanechnikovKernel &  o 
) [inline]

Definition at line 113 of file EpanechnikovKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
GradientOptimizer &  o 
) [inline]

Definition at line 126 of file GradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RankLearner > &  o 
) [inline]

Definition at line 178 of file RankLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
EpanechnikovKernel *&  o 
) [inline]

Definition at line 113 of file EpanechnikovKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMClassificationModule &  o 
) [inline]

Definition at line 190 of file RBMClassificationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StderrStatsIterator > &  o 
) [inline]

Definition at line 219 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< TraceVariable > &  o 
) [inline]

Definition at line 77 of file TraceVariable.h.

{ return new TraceVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
RBMConnection &  o 
) [inline]

Definition at line 291 of file RBMConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
HistogramDistribution &  o 
) [inline]

Definition at line 179 of file HistogramDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
StderrStatsIterator *&  o 
) [inline]

Definition at line 219 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< MinusVariable > &  o 
) [inline]

Definition at line 75 of file MinusVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< EpanechnikovKernel > &  o 
) [inline]

Definition at line 113 of file EpanechnikovKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TestInTrainSplitter > &  o 
) [inline]

Definition at line 153 of file TestInTrainSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
CubicSpline *&  o 
) [inline]

Definition at line 152 of file CubicSpline.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ArgminVariable > &  o 
) [inline]

Definition at line 74 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeLeave *&  o 
) [inline]

Definition at line 118 of file RegressionTreeLeave.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMClassificationModule > &  o 
) [inline]

Definition at line 190 of file RBMClassificationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
DotProductVariable *&  o 
) [inline]

Definition at line 79 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
PartsDistanceKernel &  o 
) [inline]

Definition at line 82 of file PartsDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TextStreamVMatrix > &  o 
) [inline]

Definition at line 120 of file TextStreamVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< X > &  o 
) [inline]

Definition at line 172 of file ObjectGraphIteratorTest.cc.

: public X
PStream& PLearn::operator>> ( PStream &  in,
StackedAutoassociatorsNet &  o 
) [inline]

Definition at line 595 of file StackedAutoassociatorsNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SquaredErrorCostModule > &  o 
) [inline]

Definition at line 132 of file SquaredErrorCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceKernel *&  o 
) [inline]

Definition at line 129 of file SourceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
StddevStatsIterator &  o 
) [inline]

Definition at line 190 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
ToBagSplitter &  o 
) [inline]

Definition at line 136 of file ToBagSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMClassificationModule *&  o 
) [inline]

Definition at line 190 of file RBMClassificationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
HardSlopeVariable *&  o 
) [inline]

Definition at line 73 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ProcessInputCostModule > &  o 
) [inline]

Definition at line 190 of file ProcessInputCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MoleculeTemplate *&  o 
) [inline]

Definition at line 139 of file MoleculeTemplate.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ToBagSplitter > &  o 
) [inline]

Definition at line 136 of file ToBagSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
FeatureSet &  o 
) [inline]

Definition at line 132 of file FeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
TrainTestSplitter *&  o 
) [inline]

Definition at line 127 of file TrainTestSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ExpMeanStatsIterator *&  o 
) [inline]

Definition at line 161 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< ShuntingNNetLayerModule > &  o 
) [inline]

Definition at line 172 of file ShuntingNNetLayerModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PartsDistanceKernel *&  o 
) [inline]

Definition at line 82 of file PartsDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelProjection *&  o 
) [inline]

Definition at line 189 of file KernelProjection.h.

PStream& PLearn::operator>> ( PStream &  in,
TraceVariable &  o 
) [inline]

Definition at line 77 of file TraceVariable.h.

{ return new TraceVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
TrainValidTestSplitter &  o 
) [inline]

Definition at line 141 of file TrainValidTestSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PartsDistanceKernel > &  o 
) [inline]

Definition at line 82 of file PartsDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
FeatureSet *&  o 
) [inline]

Definition at line 132 of file FeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeanStatsIterator > &  o 
) [inline]

Definition at line 134 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
TransposeVMatrix &  o 
) [inline]

Definition at line 119 of file TransposeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AutoVMatrixTest > &  o 
) [inline]

Definition at line 133 of file AutoVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
TransposeVMatrix *&  o 
) [inline]

Definition at line 119 of file TransposeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MeanStatsIterator *&  o 
) [inline]

Definition at line 134 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
FileVMatrixTest *&  o 
) [inline]

Definition at line 130 of file FileVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
RangeVMatrix *&  o 
) [inline]

Definition at line 84 of file RangeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDensityKernel &  o 
) [inline]

Definition at line 78 of file GaussianDensityKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< EntropyContrast > &  o 
) [inline]

Definition at line 281 of file EntropyContrast.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMRateLayer > &  o 
) [inline]

Definition at line 158 of file RBMRateLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
UCIDataVMatrix *&  o 
) [inline]

Definition at line 109 of file UCIDataVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UCIDataVMatrix > &  o 
) [inline]

Definition at line 109 of file UCIDataVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDensityKernel *&  o 
) [inline]

Definition at line 78 of file GaussianDensityKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformizeVMatrix &  o 
) [inline]

Definition at line 132 of file UniformizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FeatureSet > &  o 
) [inline]

Definition at line 132 of file FeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessInputCostModule *&  o 
) [inline]

Definition at line 190 of file ProcessInputCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
StatsIterator *&  o 
) [inline]

Definition at line 108 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
RBMModule &  o 
) [inline]

Definition at line 388 of file RBMModule.h.

PStream& PLearn::operator>> ( PStream &  in,
OnBagsModule *&  o 
) [inline]

Definition at line 155 of file OnBagsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianDensityKernel > &  o 
) [inline]

Definition at line 78 of file GaussianDensityKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExtractVariable > &  o 
) [inline]

Definition at line 86 of file ExtractVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< RBMMatrixTransposeConnection > &  o 
) [inline]

Definition at line 216 of file RBMMatrixTransposeConnection.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
Array< T > &  a 
) [inline]

Definition at line 74 of file Array_impl.h.

References in, and readSequence().

{ readSequence(in, a); return in; }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
OnlineLearningModule *&  o 
) [inline]

Definition at line 333 of file OnlineLearningModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMMatrixConnectionNatGrad > &  o 
) [inline]

Definition at line 121 of file RBMMatrixConnectionNatGrad.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CombiningCostsModule > &  o 
) [inline]

Definition at line 175 of file CombiningCostsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
DTWKernel &  o 
) [inline]

Definition at line 154 of file DTWKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixSumOfVariable *&  o 
) [inline]

Definition at line 94 of file MatrixSumOfVariable.h.

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }
PStream& PLearn::operator>> ( PStream &  in,
KernelRidgeRegressor &  o 
) [inline]

Definition at line 170 of file KernelRidgeRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMatrixConnection &  o 
) [inline]

Definition at line 296 of file RBMMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
IsomapTangentLearner &  o 
) [inline]

Definition at line 181 of file IsomapTangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TimesConstantScalarVariable2 > &  o 
) [inline]

Definition at line 74 of file TimesConstantScalarVariable2.h.

{
PStream& PLearn::operator>> ( PStream &  in,
GaussianKernel &  o 
) [inline]

Definition at line 121 of file GaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UpsideDownVMatrix > &  o 
) [inline]

Definition at line 100 of file UpsideDownVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ValueSelectRowsVMatrix &  o 
) [inline]

Definition at line 115 of file ValueSelectRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OnlineLearningModule > &  o 
) [inline]

Definition at line 333 of file OnlineLearningModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Supersampling2DModule > &  o 
) [inline]

Definition at line 229 of file Supersampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelRidgeRegressor *&  o 
) [inline]

Definition at line 170 of file KernelRidgeRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
ExpVariable &  o 
) [inline]

Definition at line 71 of file ExpVariable.h.

{ return new ExpVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
VariableDeletionVMatrix &  o 
) [inline]

Definition at line 96 of file VariableDeletionVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RandomSamplesFromVMatrix > &  o 
) [inline]

Definition at line 134 of file RandomSamplesFromVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
OnlineLearningModule &  o 
) [inline]

Definition at line 333 of file OnlineLearningModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VariableDeletionVMatrix > &  o 
) [inline]

Definition at line 96 of file VariableDeletionVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianKernel > &  o 
) [inline]

Definition at line 121 of file GaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesConstantScalarVariable2 *&  o 
) [inline]

Definition at line 74 of file TimesConstantScalarVariable2.h.

{
PStream& PLearn::operator>> ( PStream &  in,
HashMapFeatureSet *&  o 
) [inline]

Definition at line 143 of file HashMapFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
NxProfileLearner *&  o 
) [inline]

Definition at line 207 of file NxProfileLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ViewSplitterVMatrix &  o 
) [inline]

Definition at line 121 of file ViewSplitterVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CostModule > &  o 
) [inline]

Definition at line 198 of file CostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
TransposeVariable &  o 
) [inline]

Definition at line 36 of file TransposeVariable.h.

{ return new TransposeVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PythonTableVMatrix > &  o 
) [inline]

Definition at line 91 of file PythonTableVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixAffineTransformVariable *&  o 
) [inline]

Definition at line 76 of file MatrixAffineTransformVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ViewSplitterVMatrix *&  o 
) [inline]

Definition at line 121 of file ViewSplitterVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ViewSplitterVMatrix > &  o 
) [inline]

Definition at line 121 of file ViewSplitterVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
IsomapTangentLearner *&  o 
) [inline]

Definition at line 181 of file IsomapTangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SurfaceMesh > &  o 
) [inline]

Definition at line 227 of file SurfaceMesh.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstantRealFunction &  o 
) [inline]

Definition at line 121 of file ConstantRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
LLC &  o 
) [inline]

Definition at line 163 of file LLC.h.

PStream& PLearn::operator>> ( PStream &  in,
PutSubVMatrix &  o 
) [inline]

Definition at line 121 of file PutSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonTableVMatrix &  o 
) [inline]

Definition at line 91 of file PythonTableVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
KPCATangentLearner *&  o 
) [inline]

Definition at line 179 of file KPCATangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonTableVMatrix *&  o 
) [inline]

Definition at line 91 of file PythonTableVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassifierFromDensity &  o 
) [inline]

Definition at line 146 of file ClassifierFromDensity.h.

PStream& PLearn::operator>> ( PStream &  in,
ValueSelectRowsVMatrix *&  o 
) [inline]

Definition at line 115 of file ValueSelectRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
X *&  o 
) [inline]

Definition at line 172 of file ObjectGraphIteratorTest.cc.

: public X
PStream& PLearn::operator>> ( PStream &  in,
PP< MoleculeTemplate > &  o 
) [inline]

Definition at line 139 of file MoleculeTemplate.h.

PStream& PLearn::operator>> ( PStream &  in,
ToBagSplitter *&  o 
) [inline]

Definition at line 136 of file ToBagSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearFilterModule *&  o 
) [inline]

Definition at line 188 of file LinearFilterModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalStatsCollector &  o 
) [inline]

Definition at line 172 of file ConditionalStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixSumOfVariable &  o 
) [inline]

Definition at line 94 of file MatrixSumOfVariable.h.

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }
PStream& PLearn::operator>> ( PStream &  in,
SumVarianceOfLinearTransformedBernoullis &  o 
) [inline]

Definition at line 144 of file SumVarianceOfLinearTransformedBernoullis.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BaseRegressorWrapper > &  o 
) [inline]

Definition at line 116 of file BaseRegressorWrapper.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ModuleTester > &  o 
) [inline]

Definition at line 132 of file ModuleTester.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepBeliefNet *&  o 
) [inline]

Definition at line 528 of file DeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
GeodesicDistanceKernel &  o 
) [inline]

Definition at line 176 of file GeodesicDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixElementsVariable *&  o 
) [inline]

Definition at line 92 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
PStream& PLearn::operator>> ( PStream &  in,
PutSubVMatrix *&  o 
) [inline]

Definition at line 121 of file PutSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstantRealFunction *&  o 
) [inline]

Definition at line 121 of file ConstantRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VecStatsCollector > &  o 
) [inline]

Definition at line 338 of file VecStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KernelProjection > &  o 
) [inline]

Definition at line 189 of file KernelProjection.h.

PStream& PLearn::operator>> ( PStream &  in,
SumEntropyOfBernoullis *&  o 
) [inline]

Definition at line 139 of file SumEntropyOfBernoullis.h.

PStream& PLearn::operator>> ( PStream &  in,
NullModule &  o 
) [inline]

Definition at line 207 of file NullModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ParentableObject *&  o 
) [inline]

Definition at line 160 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityFeatureSet &  o 
) [inline]

Definition at line 101 of file IdentityFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DiscriminativeRBM > &  o 
) [inline]

Definition at line 311 of file DiscriminativeRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
TangentLearner *&  o 
) [inline]

Definition at line 206 of file TangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SquaredExponentialARDKernel *&  o 
) [inline]

Definition at line 153 of file SquaredExponentialARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumVarianceOfLinearTransformedCategoricals > &  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
PP< GeodesicDistanceKernel > &  o 
) [inline]

Definition at line 176 of file GeodesicDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
NullModule *&  o 
) [inline]

Definition at line 207 of file NullModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Calendar > &  o 
) [inline]

Definition at line 312 of file Calendar.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityFeatureSet *&  o 
) [inline]

Definition at line 101 of file IdentityFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
LogaddOnBagsModule &  o 
) [inline]

Definition at line 108 of file LogaddOnBagsModule.h.

PStream & PLearn::operator>> ( PStream &  in,
PythonObjectWrapper &  v 
)

Definition at line 963 of file PythonObjectWrapper.cc.

References in, and PLERROR.

{
    PLERROR("operator>>(PStream&, PythonObjectWrapper&) : "
            "not supported (yet).");
/*
    string s;
    in >> s;
    string sub= "PythonObjectWrapper(ownership=";
    if(s.substr(0,sub.length()) != sub)
        PLERROR("in operator>>(PStream& in, PythonObjectWrapper& v) : "
                "expected '%s' but got '%s'.",
                sub.c_str(), s.c_str());
    s= s.substr(sub.length());
    v.m_ownership= static_cast<PythonObjectWrapper::OwnershipMode>(s[0]-'0');
    s= s.substr(1);
    sub= ", object=";
    if(s.substr(0,sub.length()) != sub)
        PLERROR("in operator>>(PStream& in, PythonObjectWrapper& v) : "
                "expected '%s' but got '%s'.",
                sub.c_str(), s.c_str());
    s= s.substr(sub.length());
    PStream sin= openString(s, PStream::plearn_ascii, "r");
    string pickle;
    sin >> pickle;

    PyObject* pypickle= PyString_FromString(pickle.c_str());
    PyObject* env= PyDict_New();
    if(0 != PyDict_SetItemString(env, "__builtins__", PyEval_GetBuiltins()))
        PLERROR("in operator>>(PStream&, PythonObjectWrapper& v) : "
                "cannot insert builtins in env.");
    if(0 != PyDict_SetItemString(env, "the_pickle", pypickle))
        PLERROR("in operator>>(PStream&, PythonObjectWrapper& v) : "
                "cannot insert the_pickle in env.");
    Py_DECREF(pypickle);
    PyObject* res= PyRun_String("\nfrom cPickle import *\nresult= loads(the_pickle)\n", 
                                Py_file_input, env, env);
    if(!res)
    {
        Py_DECREF(env);
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in operator<<(PStream&, const PythonObjectWrapper& v) : "
                "cannot unpickle python object '%s'.",pickle.c_str());
    }
    Py_DECREF(res);
    v.m_object= 
        PythonObjectWrapper(env).as<std::map<string, PyObject*> >()["result"];
    Py_INCREF(v.m_object);
    Py_DECREF(env);
*/
    return in;
}
PStream& PLearn::operator>> ( PStream &  in,
KernelDensityEstimator &  o 
) [inline]

Definition at line 177 of file KernelDensityEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
EmbeddedLearner &  o 
) [inline]

Definition at line 200 of file EmbeddedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UniformDistribution > &  o 
) [inline]

Definition at line 144 of file UniformDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PutSubVMatrix > &  o 
) [inline]

Definition at line 121 of file PutSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
IIDNoiseKernel *&  o 
) [inline]

Definition at line 146 of file IIDNoiseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
HTMLHelpGenerator &  o 
) [inline]

Definition at line 116 of file HTMLHelpGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
EmbeddedSequentialLearner *&  o 
) [inline]

Definition at line 113 of file EmbeddedSequentialLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMLocalMultinomialLayer > &  o 
) [inline]

Definition at line 181 of file RBMLocalMultinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DynamicallyLinkedRBMsModel > &  o 
) [inline]

Definition at line 291 of file DynamicallyLinkedRBMsModel.h.

PStream& PLearn::operator>> ( PStream &  in,
ErfVariable &  o 
) [inline]

Definition at line 69 of file ErfVariable.h.

{ return new ErfVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
RandomForcedValuesVariable *&  o 
) [inline]

Definition at line 141 of file RandomForcedValuesVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomForcedValuesVariable &  o 
) [inline]

Definition at line 141 of file RandomForcedValuesVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
HTMLHelpGenerator *&  o 
) [inline]

Definition at line 116 of file HTMLHelpGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
KMeansClustering &  o 
) [inline]

Definition at line 132 of file KMeansClustering.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalStatsCollector *&  o 
) [inline]

Definition at line 172 of file ConditionalStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeLeave > &  o 
) [inline]

Definition at line 118 of file RegressionTreeLeave.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatLanguage &  o 
) [inline]

Definition at line 163 of file VMatLanguage.h.

: public RowBufferedVMatrix
PStream& PLearn::operator>> ( PStream &  in,
SetOption &  o 
) [inline]

Definition at line 113 of file SetOption.h.

PStream& PLearn::operator>> ( PStream &  in,
LocalizedFeaturesLayerVariable *&  o 
) [inline]

Definition at line 115 of file LocalizedFeaturesLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IIDNoiseKernel > &  o 
) [inline]

Definition at line 146 of file IIDNoiseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
NearestNeighborPredictionCost &  o 
) [inline]

Definition at line 125 of file NearestNeighborPredictionCost.h.

PStream& PLearn::operator>> ( PStream &  in,
PreprocessingVMatrix *&  o 
) [inline]

Definition at line 198 of file VMatLanguage.h.

:1125)
PStream& PLearn::operator>> ( PStream &  in,
ProbabilityPairsInverseVariable *&  o 
) [inline]

Definition at line 140 of file ProbabilityPairsInverseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ProbabilityPairsInverseVariable &  o 
) [inline]

Definition at line 140 of file ProbabilityPairsInverseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SumVarianceOfLinearTransformedCategoricals &  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
UpsideDownVMatrix *&  o 
) [inline]

Definition at line 100 of file UpsideDownVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianDistribution > &  o 
) [inline]

Definition at line 112 of file GaussianDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
StructuralLearner *&  o 
) [inline]

Definition at line 244 of file StructuralLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NearestNeighborPredictionCost > &  o 
) [inline]

Definition at line 125 of file NearestNeighborPredictionCost.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatrix *&  o 
) [inline]

Definition at line 901 of file VMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ProcessSymbolicSequenceVMatrix > &  o 
) [inline]

Definition at line 314 of file ProcessSymbolicSequenceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NLLCostModule *&  o 
) [inline]

Definition at line 145 of file NLLCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonFeatureSet &  o 
) [inline]

Definition at line 109 of file PythonFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
ObjectGenerator &  o 
) [inline]

Definition at line 96 of file ObjectGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiSampleVariable *&  o 
) [inline]

Definition at line 142 of file MultiSampleVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
Train *&  o 
) [inline]

Definition at line 122 of file Train.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatrixFromDistribution *&  o 
) [inline]

Definition at line 125 of file VMatrixFromDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VMatrixFromDistribution > &  o 
) [inline]

Definition at line 125 of file VMatrixFromDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NLLErrModule > &  o 
) [inline]

Definition at line 140 of file NLLErrModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ObjectGenerator > &  o 
) [inline]

Definition at line 96 of file ObjectGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MultiMaxVariable > &  o 
) [inline]

Definition at line 162 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
PStream & PLearn::operator>> ( PStream &  in,
VMField::FieldType &  x 
)

Definition at line 62 of file VMField.cc.

References in, and PLERROR.

{
    PLERROR("operator>> for VMField::FieldType not implemented (yet).");
    return in; // shut up compiler
}
PStream& PLearn::operator>> ( PStream &  in,
PP< WeightedQuadraticPolynomialKernel > &  o 
) [inline]

Definition at line 93 of file WeightedQuadraticPolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonFeatureSet *&  o 
) [inline]

Definition at line 109 of file PythonFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
LogVariable *&  o 
) [inline]

Definition at line 70 of file LogVariable.h.

{ return new LogVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ProcessingVMatrix > &  o 
) [inline]

Definition at line 127 of file ProcessingVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
VVMatrix &  o 
) [inline]

Definition at line 137 of file VVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
VVMatrix *&  o 
) [inline]

Definition at line 137 of file VVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedQuadraticPolynomialKernel *&  o 
) [inline]

Definition at line 93 of file WeightedQuadraticPolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
EmbeddedLearner *&  o 
) [inline]

Definition at line 200 of file EmbeddedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeMulticlassLeaveFast > &  o 
) [inline]

Definition at line 95 of file RegressionTreeMulticlassLeaveFast.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Isomap > &  o 
) [inline]

Definition at line 135 of file Isomap.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessingVMatrix *&  o 
) [inline]

Definition at line 127 of file ProcessingVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CorrelationProfiler &  o 
) [inline]

Definition at line 123 of file CorrelationProfiler.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMBinomialLayer &  o 
) [inline]

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
Kernel &  o 
) [inline]

Definition at line 270 of file Kernel.h.

: public PP<Kernel>
PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeMulticlassLeaveFast *&  o 
) [inline]

Definition at line 95 of file RegressionTreeMulticlassLeaveFast.h.

PStream& PLearn::operator>> ( PStream &  in,
AnalyzeFieldStats &  o 
) [inline]

Definition at line 178 of file AnalyzeFieldStats.h.

PStream & PLearn::operator>> ( PStream &  in,
VMField &  x 
)

Definition at line 68 of file VMField.cc.

References PLearn::VMField::fieldtype, in, PLearn::VMField::name, and ws().

{
    int y;
    in >> ws >> x.name >> ws >> y;
    x.fieldtype= static_cast<VMField::FieldType>(y);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
NetworkConnection *&  o 
) [inline]

Definition at line 143 of file NetworkConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
LogVariable &  o 
) [inline]

Definition at line 70 of file LogVariable.h.

{ return new LogVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
NetworkModule *&  o 
) [inline]

Definition at line 185 of file NetworkModule.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMMultinomialLayer &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SetOption > &  o 
) [inline]

Definition at line 113 of file SetOption.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< RBMMixedLayer > &  o 
) [inline]

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PTest &  o 
) [inline]

Definition at line 127 of file PTest.h.

PStream& PLearn::operator>> ( PStream &  in,
DiagVariable *&  o 
) [inline]

Definition at line 77 of file DiagVariable.h.

{ return new DiagVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SumVarianceOfLinearTransformedBernoullis > &  o 
) [inline]

Definition at line 144 of file SumVarianceOfLinearTransformedBernoullis.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NetworkConnection > &  o 
) [inline]

Definition at line 143 of file NetworkConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ProcessDatasetVMatrix > &  o 
) [inline]

Definition at line 112 of file ProcessDatasetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SumVarianceOfLinearTransformedBernoullis *&  o 
) [inline]

Definition at line 144 of file SumVarianceOfLinearTransformedBernoullis.h.

PStream& PLearn::operator>> ( PStream &  in,
StderrStatsIterator &  o 
) [inline]

Definition at line 219 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
ComputeDond2Target &  o 
) [inline]

Definition at line 154 of file ComputeDond2Target.h.

PStream& PLearn::operator>> ( PStream &  in,
NetworkModule &  o 
) [inline]

Definition at line 185 of file NetworkModule.h.

PStream& PLearn::operator>> ( PStream &  in,
Ker &  o 
) [inline]

Definition at line 287 of file Kernel.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ComputeDond2Target > &  o 
) [inline]

Definition at line 154 of file ComputeDond2Target.h.

PStream& PLearn::operator>> ( PStream &  in,
PTimer &  o 
) [inline]

Definition at line 142 of file PTimer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MultiToUniInstanceSelectRandomVMatrix > &  o 
) [inline]

Definition at line 96 of file MultiToUniInstanceSelectRandomVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConstrainVariable > &  o 
) [inline]

Definition at line 81 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ConstrainedSourceVariable *&  o 
) [inline]

Definition at line 124 of file ConstrainedSourceVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstrainVariable *&  o 
) [inline]

Definition at line 81 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ComputePurenneError *&  o 
) [inline]

Definition at line 79 of file ComputePurenneError.h.

PStream& PLearn::operator>> ( PStream &  in,
PTimer *&  o 
) [inline]

Definition at line 142 of file PTimer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IfThenElseVariable > &  o 
) [inline]

Definition at line 84 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeMulticlassLeave *&  o 
) [inline]

Definition at line 97 of file RegressionTreeMulticlassLeave.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalMeanImputationVMatrix &  o 
) [inline]

Definition at line 109 of file ConditionalMeanImputationVMatrix.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< RBMGaussianLayer > &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
WordNetFeatureSet *&  o 
) [inline]

Definition at line 113 of file WordNetFeatureSet.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMGaussianLayer &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMConv2DLLParameters > &  o 
) [inline]

Definition at line 236 of file RBMConv2DLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMGenericParameters &  o 
) [inline]

Definition at line 214 of file RBMGenericParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalMeanImputationVMatrix > &  o 
) [inline]

Definition at line 109 of file ConditionalMeanImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CovariancePreservationImputationVMatrix &  o 
) [inline]

Definition at line 124 of file CovariancePreservationImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Redirect &  o 
) [inline]

Definition at line 119 of file Redirect.h.

PStream& PLearn::operator>> ( PStream &  in,
BernoulliSampleVariable &  o 
) [inline]

Definition at line 137 of file BernoulliSampleVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PLearnerOutputVMatrix > &  o 
) [inline]

Definition at line 148 of file PLearnerOutputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PrecomputedVMatrix *&  o 
) [inline]

Definition at line 112 of file PrecomputedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ModuleTester *&  o 
) [inline]

Definition at line 132 of file ModuleTester.h.

PStream& PLearn::operator>> ( PStream &  in,
SummationKernel *&  o 
) [inline]

Definition at line 145 of file SummationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
AdditiveGaussianNoiseVariable *&  o 
) [inline]

Definition at line 140 of file AdditiveGaussianNoiseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
KroneckerBaseKernel &  o 
) [inline]

Definition at line 139 of file KroneckerBaseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Redirect > &  o 
) [inline]

Definition at line 119 of file Redirect.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMJointGenericParameters &  o 
) [inline]

Definition at line 197 of file RBMJointGenericParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalCDFSmoother > &  o 
) [inline]

Definition at line 127 of file ConditionalCDFSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMGenericParameters *&  o 
) [inline]

Definition at line 214 of file RBMGenericParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
ModuleTester &  o 
) [inline]

Definition at line 132 of file ModuleTester.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumEntropyOfCategoricals > &  o 
) [inline]

Definition at line 139 of file SumEntropyOfCategoricals.h.

PStream& PLearn::operator>> ( PStream &  in,
RunObject &  o 
) [inline]

Definition at line 122 of file RunObject.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WordNetFeatureSet > &  o 
) [inline]

Definition at line 113 of file WordNetFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
PrecomputedVMatrix &  o 
) [inline]

Definition at line 112 of file PrecomputedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMJointLLParameters *&  o 
) [inline]

Definition at line 184 of file RBMJointLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
SquaredExponentialARDKernel &  o 
) [inline]

Definition at line 153 of file SquaredExponentialARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
EqualVariable *&  o 
) [inline]

Definition at line 76 of file EqualVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RunObject > &  o 
) [inline]

Definition at line 122 of file RunObject.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DeepBeliefNet > &  o 
) [inline]

Definition at line 528 of file DeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepBeliefNet &  o 
) [inline]

Definition at line 528 of file DeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ModuleStackModule > &  o 
) [inline]

Definition at line 182 of file ModuleStackModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FixDond2BinaryVariables > &  o 
) [inline]

Definition at line 137 of file FixDond2BinaryVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixAffineTransformFeedbackVariable *&  o 
) [inline]

Definition at line 75 of file MatrixAffineTransformFeedbackVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ShellScript &  o 
) [inline]

Definition at line 117 of file ShellScript.h.

PStream& PLearn::operator>> ( PStream &  in,
EqualScalarVariable &  o 
) [inline]

Definition at line 74 of file EqualScalarVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MergeDond2Files &  o 
) [inline]

Definition at line 188 of file MergeDond2Files.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TrainTestSplitter > &  o 
) [inline]

Definition at line 127 of file TrainTestSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ShellScript *&  o 
) [inline]

Definition at line 117 of file ShellScript.h.

PStream& PLearn::operator>> ( PStream &  in,
LaplacianKernel &  o 
) [inline]

Definition at line 76 of file LaplacianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ShellScript > &  o 
) [inline]

Definition at line 117 of file ShellScript.h.

PStream& PLearn::operator>> ( PStream &  in,
SquaredErrorCostFunction &  o 
) [inline]

Definition at line 86 of file SquaredErrorCostFunction.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SumEntropyOfCategoricals &  o 
) [inline]

Definition at line 139 of file SumEntropyOfCategoricals.h.

PStream& PLearn::operator>> ( PStream &  in,
EqualConstantVariable &  o 
) [inline]

Definition at line 78 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
PStream& PLearn::operator>> ( PStream &  in,
ModuleStackModule *&  o 
) [inline]

Definition at line 182 of file ModuleStackModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< EntropyContrastLearner > &  o 
) [inline]

Definition at line 218 of file EntropyContrastLearner.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< RBMLayer > &  o 
) [inline]

Definition at line 166 of file DEPRECATED/RBMLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
ModulesLearner *&  o 
) [inline]

Definition at line 184 of file ModulesLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodImputationVMatrix &  o 
) [inline]

Definition at line 119 of file NeighborhoodImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MovingAverage *&  o 
) [inline]

Definition at line 93 of file MovingAverage.h.

PStream& PLearn::operator>> ( PStream &  in,
LaplacianKernel *&  o 
) [inline]

Definition at line 76 of file LaplacianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
Train &  o 
) [inline]

Definition at line 122 of file Train.h.

PStream& PLearn::operator>> ( PStream &  in,
ModulesLearner &  o 
) [inline]

Definition at line 184 of file ModulesLearner.h.

PStream & PLearn::operator>> ( PStream &  in,
Molecule *&  o 
) [inline]

Definition at line 67 of file Molecule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumEntropyOfBernoullis > &  o 
) [inline]

Definition at line 139 of file SumEntropyOfBernoullis.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalCDFSmoother *&  o 
) [inline]

Definition at line 127 of file ConditionalCDFSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HeapTest > &  o 
) [inline]

Definition at line 129 of file HeapTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VMatKernel > &  o 
) [inline]

Definition at line 149 of file VMatKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ArgmaxModule &  o 
) [inline]

Definition at line 263 of file ArgmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMLLParameters > &  o 
) [inline]

Definition at line 208 of file RBMLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
Convolution2DModule *&  o 
) [inline]

Definition at line 257 of file Convolution2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SigmoidPrimitiveKernel > &  o 
) [inline]

Definition at line 76 of file SigmoidPrimitiveKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LaplacianKernel > &  o 
) [inline]

Definition at line 76 of file LaplacianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SecondIterationTester > &  o 
) [inline]

Definition at line 100 of file SecondIterationTester.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OneVsAllVMatrix > &  o 
) [inline]

Definition at line 115 of file OneVsAllVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Cov2CorrVariable > &  o 
) [inline]

Definition at line 82 of file Cov2CorrVariable.h.

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }
PStream& PLearn::operator>> ( PStream &  in,
PP< AutoScaledGradientOptimizer > &  o 
) [inline]

Definition at line 124 of file AutoScaledGradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
SecondIterationWrapper &  o 
) [inline]

Definition at line 118 of file SecondIterationWrapper.h.

PStream& PLearn::operator>> ( PStream &  in,
SecondIterationWrapper *&  o 
) [inline]

Definition at line 118 of file SecondIterationWrapper.h.

PStream& PLearn::operator>> ( PStream &  in,
DuplicateColumnVariable &  o 
) [inline]

Definition at line 79 of file DuplicateColumnVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
BallTreeNearestNeighbors *&  o 
) [inline]

Definition at line 210 of file BallTreeNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftBinaryCostFunction &  o 
) [inline]

Definition at line 85 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SecondIterationWrapper > &  o 
) [inline]

Definition at line 118 of file SecondIterationWrapper.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SigmoidalKernel > &  o 
) [inline]

Definition at line 73 of file SigmoidalKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DeepNonLocalManifoldParzen > &  o 
) [inline]

Definition at line 353 of file DeepNonLocalManifoldParzen.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMMixedLayer &  o 
) [inline]

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformDistribution &  o 
) [inline]

Definition at line 144 of file UniformDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
Correspondence *&  o 
) [inline]

Definition at line 117 of file Correspondence.h.

PStream& PLearn::operator>> ( PStream &  in,
SigmoidalKernel *&  o 
) [inline]

Definition at line 73 of file SigmoidalKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DivVariable > &  o 
) [inline]

Definition at line 79 of file DivVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftBinaryCostFunction *&  o 
) [inline]

Definition at line 85 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
PStream& PLearn::operator>> ( PStream &  in,
StabilisationLearner *&  o 
) [inline]

Definition at line 145 of file StabilisationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Grapher > &  o 
) [inline]

Definition at line 127 of file Grapher.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StabilisationLearner > &  o 
) [inline]

Definition at line 145 of file StabilisationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
KroneckerBaseKernel *&  o 
) [inline]

Definition at line 139 of file KroneckerBaseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LiftBinaryCostFunction > &  o 
) [inline]

Definition at line 85 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
PStream& PLearn::operator>> ( PStream &  in,
TestImputations &  o 
) [inline]

Definition at line 197 of file TestImputations.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TestImputations > &  o 
) [inline]

Definition at line 197 of file TestImputations.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixModule > &  o 
) [inline]

Definition at line 224 of file MatrixModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalDistribution &  o 
) [inline]

Definition at line 88 of file ConditionalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TestMethod > &  o 
) [inline]

Definition at line 89 of file TestMethod.h.

PStream& PLearn::operator>> ( PStream &  in,
DilogarithmVariable &  o 
) [inline]

Definition at line 73 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SelectedOutputCostFunction &  o 
) [inline]

Definition at line 82 of file SelectedOutputCostFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
HorizonStatefulLearner *&  o 
) [inline]

Definition at line 106 of file HorizonStatefulLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoScaledGradientOptimizer &  o 
) [inline]

Definition at line 124 of file AutoScaledGradientOptimizer.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMMultinomialLayer *&  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
ModuleLearner *&  o 
) [inline]

Definition at line 210 of file ModuleLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ScaledLaplacianKernel > &  o 
) [inline]

Definition at line 73 of file ScaledLaplacianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ModuleLearner > &  o 
) [inline]

Definition at line 210 of file ModuleLearner.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< RBMMultinomialLayer > &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
DoubleProductVariable *&  o 
) [inline]

Definition at line 138 of file DoubleProductVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryStump &  o 
) [inline]

Definition at line 159 of file BinaryStump.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryStump *&  o 
) [inline]

Definition at line 159 of file BinaryStump.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeMulticlassLeave &  o 
) [inline]

Definition at line 97 of file RegressionTreeMulticlassLeave.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearARDKernel &  o 
) [inline]

Definition at line 148 of file LinearARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
Supersampling2DModule &  o 
) [inline]

Definition at line 229 of file Supersampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
OnlineGramNaturalGradientOptimizer &  o 
) [inline]

Definition at line 156 of file OnlineGramNaturalGradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
BaggingLearner &  o 
) [inline]

Definition at line 154 of file BaggingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AdaBoost > &  o 
) [inline]

Definition at line 226 of file AdaBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PerformanceEvaluator > &  o 
) [inline]

Definition at line 122 of file PerformanceEvaluator.h.

PStream& PLearn::operator>> ( PStream &  in,
OnlineGramNaturalGradientOptimizer *&  o 
) [inline]

Definition at line 156 of file OnlineGramNaturalGradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearARDKernel *&  o 
) [inline]

Definition at line 148 of file LinearARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftSoftMaxVariable &  o 
) [inline]

Definition at line 133 of file SoftSoftMaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DiagVariable > &  o 
) [inline]

Definition at line 77 of file DiagVariable.h.

{ return new DiagVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SoftSoftMaxVariable > &  o 
) [inline]

Definition at line 133 of file SoftSoftMaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaledGeneralizedDistanceRBFKernel &  o 
) [inline]

Definition at line 79 of file ScaledGeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MaxSubsampling2DModule > &  o 
) [inline]

Definition at line 203 of file MaxSubsampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LinearARDKernel > &  o 
) [inline]

Definition at line 148 of file LinearARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassifierFromDensity > &  o 
) [inline]

Definition at line 146 of file ClassifierFromDensity.h.

PStream& PLearn::operator>> ( PStream &  in,
PerformanceEvaluator &  o 
) [inline]

Definition at line 122 of file PerformanceEvaluator.h.

PStream& PLearn::operator>> ( PStream &  in,
GradientOptimizer *&  o 
) [inline]

Definition at line 126 of file GradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
CutAboveThresholdVariable &  o 
) [inline]

Definition at line 74 of file CutAboveThresholdVariable.h.

{ return new CutAboveThresholdVariable(v,threshold); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ScaledGaussianKernel > &  o 
) [inline]

Definition at line 80 of file ScaledGaussianKernel.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
Storage< T > &  seq 
)

Definition at line 471 of file Storage.h.

References in, and readSequence().

{
    readSequence(in, seq);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< GradientOptimizer > &  o 
) [inline]

Definition at line 126 of file GradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CrossEntropyVariable > &  o 
) [inline]

Definition at line 74 of file CrossEntropyVariable.h.

{ return new CrossEntropyVariable(network_output, targets); }
PStream& PLearn::operator>> ( PStream &  in,
MaxSubsampling2DModule *&  o 
) [inline]

Definition at line 203 of file MaxSubsampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftSoftMaxVariable *&  o 
) [inline]

Definition at line 133 of file SoftSoftMaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
LocalGaussianClassifier &  o 
) [inline]

Definition at line 214 of file LocalGaussianClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearCombinationOfScalarVariables *&  o 
) [inline]

Definition at line 157 of file LinearCombinationOfScalarVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMQLParameters > &  o 
) [inline]

Definition at line 195 of file RBMQLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConvolveVariable > &  o 
) [inline]

Definition at line 72 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
PStream& PLearn::operator>> ( PStream &  in,
MaxSubsampling2DModule &  o 
) [inline]

Definition at line 203 of file MaxSubsampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ReconstructionWeightsKernel > &  o 
) [inline]

Definition at line 213 of file ReconstructionWeightsKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
LLEKernel &  o 
) [inline]

Definition at line 160 of file LLEKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PerformanceEvaluator *&  o 
) [inline]

Definition at line 122 of file PerformanceEvaluator.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaledConditionalCDFSmoother *&  o 
) [inline]

Definition at line 129 of file ScaledConditionalCDFSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LinearCombinationOfScalarVariables > &  o 
) [inline]

Definition at line 157 of file LinearCombinationOfScalarVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransposeProductVariable > &  o 
) [inline]

Definition at line 77 of file TransposeProductVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< MultiTaskSeparationSplitter > &  o 
) [inline]

Definition at line 139 of file MultiTaskSeparationSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UniformizeVMatrix > &  o 
) [inline]

Definition at line 132 of file UniformizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HyperRetrain > &  o 
) [inline]

Definition at line 116 of file HyperRetrain.h.

PStream& PLearn::operator>> ( PStream &  in,
ConfRatedAdaboostCostVariable &  o 
) [inline]

Definition at line 74 of file ConfRatedAdaboostCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
FeatureSetNaiveBayesClassifier &  o 
) [inline]

Definition at line 165 of file FeatureSetNaiveBayesClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
FeatureSetNaiveBayesClassifier *&  o 
) [inline]

Definition at line 165 of file FeatureSetNaiveBayesClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTree > &  o 
) [inline]

Definition at line 133 of file RegressionTree.h.

PStream& PLearn::operator>> ( PStream &  in,
Isomap *&  o 
) [inline]

Definition at line 135 of file Isomap.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MarginPerceptronCostVariable > &  o 
) [inline]

Definition at line 81 of file MarginPerceptronCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
HyperLearner *&  o 
) [inline]

Definition at line 123 of file HyperLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNClassifier &  o 
) [inline]

Definition at line 217 of file KNNClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedSplitter *&  o 
) [inline]

Definition at line 132 of file StackedSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DeepNNet > &  o 
) [inline]

Definition at line 213 of file DeepNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LLEKernel > &  o 
) [inline]

Definition at line 160 of file LLEKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IsAboveThresholdVariable > &  o 
) [inline]

Definition at line 78 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SquaredErrModule > &  o 
) [inline]

Definition at line 133 of file SquaredErrModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ExplicitListOracle &  o 
) [inline]

Definition at line 118 of file ExplicitListOracle.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< NoBpropVariable > &  o 
) [inline]

Definition at line 88 of file var/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
PStream& PLearn::operator>> ( PStream &  in,
PP< QuadraticUtilityCostFunction > &  o 
) [inline]

Definition at line 83 of file QuadraticUtilityCostFunction.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ConjRosenbrock *&  o 
) [inline]

Definition at line 97 of file ConjRosenbrock.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassDistanceProportionCostFunction &  o 
) [inline]

Definition at line 76 of file ClassDistanceProportionCostFunction.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< LogaddOnBagsModule > &  o 
) [inline]

Definition at line 108 of file LogaddOnBagsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatColumnsVariable > &  o 
) [inline]

Definition at line 79 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
PStream& PLearn::operator>> ( PStream &  in,
ConstantRegressor &  o 
) [inline]

Definition at line 163 of file ConstantRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConjRosenbrock > &  o 
) [inline]

Definition at line 97 of file ConjRosenbrock.h.

PStream& PLearn::operator>> ( PStream &  in,
LogOfGaussianDensityKernel &  o 
) [inline]

Definition at line 81 of file LogOfGaussianDensityKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VPLPreprocessedLearner2 > &  o 
) [inline]

Definition at line 215 of file VPLPreprocessedLearner2.h.

PStream& PLearn::operator>> ( PStream &  in,
VPLPreprocessedLearner2 *&  o 
) [inline]

Definition at line 215 of file VPLPreprocessedLearner2.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SVMClassificationTorch > &  o 
) [inline]

Definition at line 161 of file SVMClassificationTorch.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonCodeSnippet &  o 
) [inline]

Definition at line 366 of file PythonCodeSnippet.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiToUniInstanceSelectRandomVMatrix *&  o 
) [inline]

Definition at line 96 of file MultiToUniInstanceSelectRandomVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonCodeSnippet *&  o 
) [inline]

Definition at line 366 of file PythonCodeSnippet.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedModulesModule *&  o 
) [inline]

Definition at line 199 of file StackedModulesModule.h.

PStream& PLearn::operator>> ( PStream &  in,
LogOfGaussianDensityKernel *&  o 
) [inline]

Definition at line 81 of file LogOfGaussianDensityKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
VPLCombinedLearner &  o 
) [inline]

Definition at line 183 of file VPLCombinedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransformOutputLearner > &  o 
) [inline]

Definition at line 134 of file TransformOutputLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiMaxVariable *&  o 
) [inline]

Definition at line 162 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PythonCodeSnippet > &  o 
) [inline]

Definition at line 366 of file PythonCodeSnippet.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalDensityNet &  o 
) [inline]

Definition at line 320 of file ConditionalDensityNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PricingTransactionPairProfitFunction &  o 
) [inline]

Definition at line 95 of file PricingTransactionPairProfitFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
TorchLearner &  o 
) [inline]

Definition at line 180 of file TorchLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MultiTargetOneHotVMatrix > &  o 
) [inline]

Definition at line 134 of file MultiTargetOneHotVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ClassifierFromConditionalPDistribution > &  o 
) [inline]

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TestLearner > &  o 
) [inline]

Definition at line 176 of file TestLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalDensityNet *&  o 
) [inline]

Definition at line 320 of file ConditionalDensityNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalDensityNet > &  o 
) [inline]

Definition at line 320 of file ConditionalDensityNet.h.

PStream& PLearn::operator>> ( PStream &  in,
CCCostVariable *&  o 
) [inline]

Definition at line 97 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
PStream& PLearn::operator>> ( PStream &  in,
LinearCombinationModule *&  o 
) [inline]

Definition at line 279 of file LinearCombinationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MixtureDistribution *&  o 
) [inline]

Definition at line 217 of file MixtureDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LogOfGaussianDensityKernel > &  o 
) [inline]

Definition at line 81 of file LogOfGaussianDensityKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SelectInputSubsetLearner > &  o 
) [inline]

Definition at line 149 of file SelectInputSubsetLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalDistribution *&  o 
) [inline]

Definition at line 88 of file ConditionalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
ChemicalICP &  o 
) [inline]

Definition at line 288 of file ChemicalICP.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalDistribution > &  o 
) [inline]

Definition at line 88 of file ConditionalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonProcessedLearner *&  o 
) [inline]

Definition at line 208 of file PythonProcessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IsomapTangentLearner > &  o 
) [inline]

Definition at line 181 of file IsomapTangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalGaussianDistribution &  o 
) [inline]

Definition at line 105 of file ConditionalGaussianDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalGaussianDistribution *&  o 
) [inline]

Definition at line 105 of file ConditionalGaussianDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryClassificationLossVariable *&  o 
) [inline]

Definition at line 84 of file BinaryClassificationLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
LogaddOnBagsModule *&  o 
) [inline]

Definition at line 108 of file LogaddOnBagsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
LogSoftmaxVariable *&  o 
) [inline]

Definition at line 80 of file LogSoftmaxVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
Distribution &  o 
) [inline]

Definition at line 147 of file Distribution.h.

:654)
PStream& PLearn::operator>> ( PStream &  in,
UnfrozenDeepBeliefNet &  o 
) [inline]

Definition at line 125 of file UnfrozenDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
Calendar &  o 
) [inline]

Definition at line 312 of file Calendar.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BiasWeightAffineTransformVariable > &  o 
) [inline]

Definition at line 98 of file BiasWeightAffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
Distribution *&  o 
) [inline]

Definition at line 147 of file Distribution.h.

:654)
PStream& PLearn::operator>> ( PStream &  in,
IncrementalNNet *&  o 
) [inline]

Definition at line 254 of file IncrementalNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Distribution > &  o 
) [inline]

Definition at line 147 of file Distribution.h.

:654)
PStream& PLearn::operator>> ( PStream &  in,
PP< IdentityPLearner > &  o 
) [inline]

Definition at line 93 of file IdentityPLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LinearFilterModule > &  o 
) [inline]

Definition at line 188 of file LinearFilterModule.h.

PStream& PLearn::operator>> ( PStream &  in,
SupervisedDBN *&  o 
) [inline]

Definition at line 383 of file SupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HorizonStatefulLearner > &  o 
) [inline]

Definition at line 106 of file HorizonStatefulLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeLeave &  o 
) [inline]

Definition at line 118 of file RegressionTreeLeave.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DiverseComponentAnalysis > &  o 
) [inline]

Definition at line 240 of file DiverseComponentAnalysis.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GradientCorrector > &  o 
) [inline]

Definition at line 132 of file GradientCorrector.h.

PStream& PLearn::operator>> ( PStream &  in,
ArgminVariable &  o 
) [inline]

Definition at line 74 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
EmpiricalDistribution &  o 
) [inline]

Definition at line 101 of file EmpiricalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
EntropyContrastLearner *&  o 
) [inline]

Definition at line 218 of file EntropyContrastLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
FeatureSetNNet *&  o 
) [inline]

Definition at line 441 of file FeatureSetNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MemoryVMatrix > &  o 
) [inline]

Definition at line 117 of file MemoryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianContinuumDistribution &  o 
) [inline]

Definition at line 279 of file GaussianContinuumDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
TruncatedRealFunction &  o 
) [inline]

Definition at line 125 of file TruncatedRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
ArgmaxVariable &  o 
) [inline]

Definition at line 74 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PLearnerDiagonalKernel *&  o 
) [inline]

Definition at line 127 of file PLearnerDiagonalKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformizeVMatrix *&  o 
) [inline]

Definition at line 132 of file UniformizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianContinuumDistribution > &  o 
) [inline]

Definition at line 279 of file GaussianContinuumDistribution.h.

PStream & PLearn::operator>> ( PStream &  in,
GaussianProcessRegressor &  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
PP< NonDiagVariable > &  o 
) [inline]

Definition at line 77 of file NonDiagVariable.h.

{ return new NonDiagVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
AffineTransformWeightPenalty *&  o 
) [inline]

Definition at line 111 of file AffineTransformWeightPenalty.h.

{ return new AffineTransformWeightPenalty(transformation, weight_decay, bias_decay, penalty_type); } 
PStream& PLearn::operator>> ( PStream &  in,
AffineTransformWeightPenalty &  o 
) [inline]

Definition at line 111 of file AffineTransformWeightPenalty.h.

{ return new AffineTransformWeightPenalty(transformation, weight_decay, bias_decay, penalty_type); } 
PStream & PLearn::operator>> ( PStream &  in,
NatGradEstimator *&  o 
) [inline]

Definition at line 192 of file NatGradItEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NormalizedDotProductKernel > &  o 
) [inline]

Definition at line 73 of file NormalizedDotProductKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
UCIDataVMatrix &  o 
) [inline]

Definition at line 109 of file UCIDataVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TruncatedRealFunction *&  o 
) [inline]

Definition at line 125 of file TruncatedRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
Matern1ARDKernel *&  o 
) [inline]

Definition at line 141 of file Matern1ARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformVMatrix &  o 
) [inline]

Definition at line 80 of file UniformVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LocallyWeightedDistribution > &  o 
) [inline]

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
PStream& PLearn::operator>> ( PStream &  in,
PP< NormalizationLearner > &  o 
) [inline]

Definition at line 187 of file NormalizationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SubsamplingDBN *&  o 
) [inline]

Definition at line 439 of file SubsamplingDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformVMatrix *&  o 
) [inline]

Definition at line 80 of file UniformVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Matern1ARDKernel > &  o 
) [inline]

Definition at line 141 of file Matern1ARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LinearCombinationModule > &  o 
) [inline]

Definition at line 279 of file LinearCombinationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DoubleProductVariable > &  o 
) [inline]

Definition at line 138 of file DoubleProductVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
FeatureSetSequentialCRF *&  o 
) [inline]

Definition at line 434 of file FeatureSetSequentialCRF.h.

PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodBoxVolumeDensityEstimator &  o 
) [inline]

Definition at line 147 of file NeighborhoodBoxVolumeDensityEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
DynamicallyLinkedRBMsModel &  o 
) [inline]

Definition at line 291 of file DynamicallyLinkedRBMsModel.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiInstanceVMatrix *&  o 
) [inline]

Definition at line 109 of file MultiInstanceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
AbsVariable *&  o 
) [inline]

Definition at line 71 of file AbsVariable.h.

{ return new AbsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
MemoryCachedKernel &  o 
) [inline]

Definition at line 199 of file MemoryCachedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
TransformationLearner &  o 
) [inline]

Definition at line 917 of file TransformationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
NatGradSMPNNet *&  o 
) [inline]

Definition at line 364 of file NatGradSMPNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
MemoryCachedKernel *&  o 
) [inline]

Definition at line 199 of file MemoryCachedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
NonLocalManifoldParzenKernel &  o 
) [inline]

Definition at line 83 of file NonLocalManifoldParzenKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
DistRepNNet *&  o 
) [inline]

Definition at line 353 of file DistRepNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMParameters *&  o 
) [inline]

Definition at line 196 of file RBMParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepNNet &  o 
) [inline]

Definition at line 213 of file DeepNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
Binner &  o 
) [inline]

Definition at line 123 of file Binner.h.

PStream& PLearn::operator>> ( PStream &  in,
LayerCostModule *&  o 
) [inline]

Definition at line 245 of file LayerCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformDistribution *&  o 
) [inline]

Definition at line 144 of file UniformDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDistribution &  o 
) [inline]

Definition at line 112 of file GaussianDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Experimentation > &  o 
) [inline]

Definition at line 203 of file Experimentation.h.

PStream& PLearn::operator>> ( PStream &  in,
BestAveragingPLearner &  o 
) [inline]

Definition at line 228 of file BestAveragingPLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ForwardModule *&  o 
) [inline]

Definition at line 178 of file ForwardModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MemoryCachedKernel > &  o 
) [inline]

Definition at line 199 of file MemoryCachedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearCombinationModule &  o 
) [inline]

Definition at line 279 of file LinearCombinationModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LayerCostModule > &  o 
) [inline]

Definition at line 245 of file LayerCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelPCA &  o 
) [inline]

Definition at line 124 of file KernelPCA.h.

PStream& PLearn::operator>> ( PStream &  in,
CorrelationProfiler *&  o 
) [inline]

Definition at line 123 of file CorrelationProfiler.h.

PStream& PLearn::operator>> ( PStream &  in,
SpectralClustering &  o 
) [inline]

Definition at line 123 of file SpectralClustering.h.

PStream& PLearn::operator>> ( PStream &  in,
ProbabilityPairsVariable &  o 
) [inline]

Definition at line 143 of file ProbabilityPairsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
TreeDBNModule &  o 
) [inline]

Definition at line 372 of file TreeDBNModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NegOutputCostFunction > &  o 
) [inline]

Definition at line 67 of file NegOutputCostFunction.h.

{ return new NegOutputCostFunction(); }
PStream& PLearn::operator>> ( PStream &  in,
GaussMix &  o 
) [inline]

Definition at line 536 of file GaussMix.h.

PStream& PLearn::operator>> ( PStream &  in,
LayerCostModule &  o 
) [inline]

Definition at line 245 of file LayerCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
GradNNetLayerModule &  o 
) [inline]

Definition at line 185 of file GradNNetLayerModule.h.

PStream& PLearn::operator>> ( PStream &  in,
NegOutputCostFunction *&  o 
) [inline]

Definition at line 67 of file NegOutputCostFunction.h.

{ return new NegOutputCostFunction(); }
PStream& PLearn::operator>> ( PStream &  in,
TransparentParentable *&  o 
) [inline]

Definition at line 316 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftOutputVariable &  o 
) [inline]

Definition at line 69 of file LiftOutputVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
LiftOutputVariable *&  o 
) [inline]

Definition at line 69 of file LiftOutputVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< InjectionTest > &  o 
) [inline]

Definition at line 133 of file InjectionTest.h.

PStream& PLearn::operator>> ( PStream &  in,
MulticlassErrorCostFunction &  o 
) [inline]

Definition at line 72 of file MulticlassErrorCostFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HistogramDistribution > &  o 
) [inline]

Definition at line 179 of file HistogramDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GradNNetLayerModule > &  o 
) [inline]

Definition at line 185 of file GradNNetLayerModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MulticlassErrorCostFunction *&  o 
) [inline]

Definition at line 72 of file MulticlassErrorCostFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMDistribution &  o 
) [inline]

Definition at line 186 of file RBMDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
MemoryStressTest &  o 
) [inline]

Definition at line 139 of file MemoryStressTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonProcessedVMatrix &  o 
) [inline]

Definition at line 195 of file PythonProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< InterfunctionXchgTest > &  o 
) [inline]

Definition at line 134 of file InterfunctionXchgTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SequentialValidation &  o 
) [inline]

Definition at line 265 of file SequentialValidation.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonProcessedVMatrix *&  o 
) [inline]

Definition at line 195 of file PythonProcessedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NegLogProbCostFunction &  o 
) [inline]

Definition at line 95 of file NegLogProbCostFunction.h.

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs,outstart,outend); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ARDBaseKernel > &  o 
) [inline]

Definition at line 120 of file ARDBaseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ParzenWindow > &  o 
) [inline]

Definition at line 113 of file ParzenWindow.h.

PStream& PLearn::operator>> ( PStream &  in,
BetaKernel &  o 
) [inline]

Definition at line 145 of file BetaKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ParzenWindow &  o 
) [inline]

Definition at line 113 of file ParzenWindow.h.

PStream& PLearn::operator>> ( PStream &  in,
TextStreamVMatrix &  o 
) [inline]

Definition at line 120 of file TextStreamVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GradNNetLayerModule *&  o 
) [inline]

Definition at line 185 of file GradNNetLayerModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DeepFeatureExtractorNNet > &  o 
) [inline]

Definition at line 340 of file DeepFeatureExtractorNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PythonProcessedVMatrix > &  o 
) [inline]

Definition at line 195 of file PythonProcessedVMatrix.h.

void PLearn::operator>> ( const VMatrix &  src,
const Mat &  dest 
) [inline]

Definition at line 148 of file VMat.h.

{ dest << src; }
PStream& PLearn::operator>> ( PStream &  in,
InjectionTest *&  o 
) [inline]

Definition at line 133 of file InjectionTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MulticlassErrorCostFunction > &  o 
) [inline]

Definition at line 72 of file MulticlassErrorCostFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
NegKernel *&  o 
) [inline]

Definition at line 74 of file NegKernel.h.

{ return new NegKernel(k); }
PStream& PLearn::operator>> ( PStream &  in,
NGramDistribution *&  o 
) [inline]

Definition at line 182 of file NGramDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldParzen2 &  o 
) [inline]

Definition at line 139 of file ManifoldParzen2.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MixUnlabeledNeighbourVMatrix > &  o 
) [inline]

Definition at line 140 of file MixUnlabeledNeighbourVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BasicIdentityCallsTest &  o 
) [inline]

Definition at line 144 of file BasicIdentityCallsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldParzen2 *&  o 
) [inline]

Definition at line 139 of file ManifoldParzen2.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTree &  o 
) [inline]

Definition at line 133 of file RegressionTree.h.

PStream& PLearn::operator>> ( PStream &  in,
MixtureDistribution &  o 
) [inline]

Definition at line 217 of file MixtureDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MixtureVMatrix > &  o 
) [inline]

Definition at line 130 of file MixtureVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
InferenceRBM &  o 
) [inline]

Definition at line 184 of file InferenceRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RandomForcedValuesVariable > &  o 
) [inline]

Definition at line 141 of file RandomForcedValuesVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NegKernel &  o 
) [inline]

Definition at line 74 of file NegKernel.h.

{ return new NegKernel(k); }
PStream& PLearn::operator>> ( PStream &  in,
NGramDistribution &  o 
) [inline]

Definition at line 182 of file NGramDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
InferenceRBM *&  o 
) [inline]

Definition at line 184 of file InferenceRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< InferenceRBM > &  o 
) [inline]

Definition at line 184 of file InferenceRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransposeVMatrix > &  o 
) [inline]

Definition at line 119 of file TransposeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LocallyMagnifiedDistribution > &  o 
) [inline]

Definition at line 161 of file LocallyMagnifiedDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
NonLocalManifoldParzen &  o 
) [inline]

Definition at line 288 of file NonLocalManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
InstanceSnippetTest &  o 
) [inline]

Definition at line 197 of file InstanceSnippetTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NonLocalManifoldParzen > &  o 
) [inline]

Definition at line 288 of file NonLocalManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Binner > &  o 
) [inline]

Definition at line 123 of file Binner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IdentityModule > &  o 
) [inline]

Definition at line 190 of file IdentityModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PDistribution &  o 
) [inline]

Definition at line 349 of file PDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
MissingInstructionVMatrix &  o 
) [inline]

Definition at line 133 of file MissingInstructionVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityModule *&  o 
) [inline]

Definition at line 190 of file IdentityModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PDistribution > &  o 
) [inline]

Definition at line 349 of file PDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
MiniBatchClassificationLossVariable *&  o 
) [inline]

Definition at line 75 of file MiniBatchClassificationLossVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MissingInstructionVMatrix *&  o 
) [inline]

Definition at line 133 of file MissingInstructionVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ProbabilityPairsVariable > &  o 
) [inline]

Definition at line 143 of file ProbabilityPairsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MemoryStressTest *&  o 
) [inline]

Definition at line 139 of file MemoryStressTest.h.

PStream & PLearn::operator>> ( PStream &  in,
GaussianProcessRegressor *&  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
SpiralDistribution &  o 
) [inline]

Definition at line 145 of file SpiralDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
SpiralDistribution *&  o 
) [inline]

Definition at line 145 of file SpiralDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
NGramTree &  o 
) [inline]

Definition at line 145 of file NGramTree.h.

PStream& PLearn::operator>> ( PStream &  in,
SequentialModelSelector *&  o 
) [inline]

Definition at line 187 of file SequentialModelSelector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RowBufferedVMatrixTest > &  o 
) [inline]

Definition at line 126 of file RowBufferedVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SymbolNode &  o 
) [inline]

Definition at line 144 of file SymbolNode.h.

PStream& PLearn::operator>> ( PStream &  in,
UnconditionalDistribution &  o 
) [inline]

Definition at line 133 of file UnconditionalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
MissingIndicatorVMatrix &  o 
) [inline]

Definition at line 101 of file MissingIndicatorVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UnconditionalDistribution > &  o 
) [inline]

Definition at line 133 of file UnconditionalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CorrelationProfiler > &  o 
) [inline]

Definition at line 123 of file CorrelationProfiler.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MissingIndicatorVMatrix > &  o 
) [inline]

Definition at line 101 of file MissingIndicatorVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MissingIndicatorVMatrix *&  o 
) [inline]

Definition at line 101 of file MissingIndicatorVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepReconstructorNet *&  o 
) [inline]

Definition at line 274 of file DeepReconstructorNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalGaussianDistribution > &  o 
) [inline]

Definition at line 105 of file ConditionalGaussianDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LLE > &  o 
) [inline]

Definition at line 127 of file LLE.h.

PStream& PLearn::operator>> ( PStream &  in,
AddLayersNNet &  o 
) [inline]

Definition at line 147 of file AddLayersNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
AddLayersNNet *&  o 
) [inline]

Definition at line 147 of file AddLayersNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
NeuralNetworkARDKernel &  o 
) [inline]

Definition at line 144 of file NeuralNetworkARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OnBagsModule > &  o 
) [inline]

Definition at line 155 of file OnBagsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VMatrix > &  o 
) [inline]

Definition at line 901 of file VMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ForwardModule &  o 
) [inline]

Definition at line 178 of file ForwardModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MemoryVMatrixNoSave > &  o 
) [inline]

Definition at line 119 of file MemoryVMatrixNoSave.h.

PStream& PLearn::operator>> ( PStream &  in,
HeapTest *&  o 
) [inline]

Definition at line 129 of file HeapTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ChainedLearners > &  o 
) [inline]

Definition at line 186 of file ChainedLearners.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GeneralizedDistanceRBFKernel > &  o 
) [inline]

Definition at line 76 of file GeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepNNet *&  o 
) [inline]

Definition at line 213 of file DeepNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TreeDBNModule > &  o 
) [inline]

Definition at line 372 of file TreeDBNModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Learner > &  o 
) [inline]

Definition at line 568 of file Learner.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SecondIterationTester *&  o 
) [inline]

Definition at line 100 of file SecondIterationTester.h.

PStream& PLearn::operator>> ( PStream &  in,
NeuralNet &  o 
) [inline]

Definition at line 158 of file NeuralNet.h.

PStream& PLearn::operator>> ( PStream &  in,
SupervisedDBN &  o 
) [inline]

Definition at line 383 of file SupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
MoleculeTemplate &  o 
) [inline]

Definition at line 139 of file MoleculeTemplate.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NeuralNet > &  o 
) [inline]

Definition at line 158 of file NeuralNet.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftStatsIterator &  o 
) [inline]

Definition at line 338 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PLCheckTest *&  o 
) [inline]

Definition at line 126 of file PLCheckTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DistRepNNet > &  o 
) [inline]

Definition at line 353 of file DistRepNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
AbsVariable &  o 
) [inline]

Definition at line 71 of file AbsVariable.h.

{ return new AbsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
NormalizedDotProductKernel &  o 
) [inline]

Definition at line 73 of file NormalizedDotProductKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< EmbeddedLearner > &  o 
) [inline]

Definition at line 200 of file EmbeddedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AbsVariable > &  o 
) [inline]

Definition at line 71 of file AbsVariable.h.

{ return new AbsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SubsamplingDBN > &  o 
) [inline]

Definition at line 439 of file SubsamplingDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepReconstructorNet &  o 
) [inline]

Definition at line 274 of file DeepReconstructorNet.h.

PStream& PLearn::operator>> ( PStream &  in,
NormalizedDotProductKernel *&  o 
) [inline]

Definition at line 73 of file NormalizedDotProductKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DeepReconstructorNet > &  o 
) [inline]

Definition at line 274 of file DeepReconstructorNet.h.

PStream& PLearn::operator>> ( PStream &  in,
NonDiagVariable &  o 
) [inline]

Definition at line 77 of file NonDiagVariable.h.

{ return new NonDiagVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
mNNet *&  o 
) [inline]

Definition at line 220 of file mNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< mNNet > &  o 
) [inline]

Definition at line 220 of file mNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
ToBagClassifier &  o 
) [inline]

Definition at line 159 of file ToBagClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
MeanMedianModeImputationVMatrix &  o 
) [inline]

Definition at line 127 of file MeanMedianModeImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SemiSupervisedDBN > &  o 
) [inline]

Definition at line 170 of file SemiSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
MeanMedianModeImputationVMatrix *&  o 
) [inline]

Definition at line 127 of file MeanMedianModeImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NatGradSMPNNet &  o 
) [inline]

Definition at line 364 of file NatGradSMPNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
SemiSupervisedDBN &  o 
) [inline]

Definition at line 170 of file SemiSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
SemiSupervisedDBN *&  o 
) [inline]

Definition at line 170 of file SemiSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
PvGradNNet *&  o 
) [inline]

Definition at line 171 of file PvGradNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KLp0p1RBMModule > &  o 
) [inline]

Definition at line 338 of file KLp0p1RBMModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ArgmaxVariable > &  o 
) [inline]

Definition at line 74 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
LIBSVMSparseVMatrix &  o 
) [inline]

Definition at line 137 of file LIBSVMSparseVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LocalNeighborsDifferencesVMatrix > &  o 
) [inline]

Definition at line 120 of file LocalNeighborsDifferencesVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< FeatureSetNNet > &  o 
) [inline]

Definition at line 441 of file FeatureSetNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PolynomialKernel &  o 
) [inline]

Definition at line 103 of file PolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UnfrozenDeepBeliefNet > &  o 
) [inline]

Definition at line 125 of file UnfrozenDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
AdditiveNormalizationKernel *&  o 
) [inline]

Definition at line 163 of file AdditiveNormalizationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ArgminVariable *&  o 
) [inline]

Definition at line 74 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ComputeDond2Target *&  o 
) [inline]

Definition at line 154 of file ComputeDond2Target.h.

PStream& PLearn::operator>> ( PStream &  in,
VecDictionary *&  o 
) [inline]

Definition at line 122 of file VecDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MoleculeTemplateLearner > &  o 
) [inline]

Definition at line 236 of file MoleculeTemplateLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityPLearner *&  o 
) [inline]

Definition at line 93 of file IdentityPLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
BiasWeightAffineTransformVariable &  o 
) [inline]

Definition at line 98 of file BiasWeightAffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< TopDownAsymetricDeepNetwork > &  o 
) [inline]

Definition at line 282 of file TopDownAsymetricDeepNetwork.h.

PStream& PLearn::operator>> ( PStream &  in,
PowDistanceKernel &  o 
) [inline]

Definition at line 78 of file PowDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
UnfrozenDeepBeliefNet *&  o 
) [inline]

Definition at line 125 of file UnfrozenDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
LIBSVMSparseVMatrix *&  o 
) [inline]

Definition at line 137 of file LIBSVMSparseVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NNet &  o 
) [inline]

Definition at line 291 of file NNet.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryClassificationLossVariable &  o 
) [inline]

Definition at line 84 of file BinaryClassificationLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PowDistanceKernel *&  o 
) [inline]

Definition at line 78 of file PowDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UndirectedSoftmaxModule > &  o 
) [inline]

Definition at line 147 of file UndirectedSoftmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
UndirectedSoftmaxModule *&  o 
) [inline]

Definition at line 147 of file UndirectedSoftmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PowDistanceKernel > &  o 
) [inline]

Definition at line 78 of file PowDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryVariable &  o 
) [inline]

Definition at line 101 of file BinaryVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PythonProcessedLearner > &  o 
) [inline]

Definition at line 208 of file PythonProcessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryVariable *&  o 
) [inline]

Definition at line 101 of file BinaryVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PrecomputedKernel &  o 
) [inline]

Definition at line 99 of file PrecomputedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LIBSVMSparseVMatrix > &  o 
) [inline]

Definition at line 137 of file LIBSVMSparseVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PrecomputedKernel *&  o 
) [inline]

Definition at line 99 of file PrecomputedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SupervisedDBN > &  o 
) [inline]

Definition at line 383 of file SupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KFoldSplitter > &  o 
) [inline]

Definition at line 117 of file KFoldSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
LemmatizeVMatrix *&  o 
) [inline]

Definition at line 134 of file LemmatizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PTest > &  o 
) [inline]

Definition at line 127 of file PTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PrecomputedKernel > &  o 
) [inline]

Definition at line 99 of file PrecomputedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
StatefulLearner *&  o 
) [inline]

Definition at line 153 of file StatefulLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StatefulLearner > &  o 
) [inline]

Definition at line 153 of file StatefulLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TestingLearner &  o 
) [inline]

Definition at line 177 of file TestingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassificationLossVariable &  o 
) [inline]

Definition at line 77 of file ClassificationLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< TestingLearner > &  o 
) [inline]

Definition at line 177 of file TestingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LemmatizeVMatrix > &  o 
) [inline]

Definition at line 134 of file LemmatizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LemmatizeVMatrix &  o 
) [inline]

Definition at line 134 of file LemmatizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ManifoldParzen2 > &  o 
) [inline]

Definition at line 139 of file ManifoldParzen2.h.

PStream& PLearn::operator>> ( PStream &  in,
TransformOutputLearner &  o 
) [inline]

Definition at line 134 of file TransformOutputLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StackedModulesModule > &  o 
) [inline]

Definition at line 199 of file StackedModulesModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMParameters > &  o 
) [inline]

Definition at line 196 of file RBMParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PricingTransactionPairProfitFunction > &  o 
) [inline]

Definition at line 95 of file PricingTransactionPairProfitFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedModulesModule &  o 
) [inline]

Definition at line 199 of file StackedModulesModule.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedModulesLearner *&  o 
) [inline]

Definition at line 214 of file StackedModulesLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PLStringutilsTest *&  o 
) [inline]

Definition at line 126 of file PLStringutilsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
QuadraticUtilityCostFunction &  o 
) [inline]

Definition at line 83 of file QuadraticUtilityCostFunction.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SquaredErrModule &  o 
) [inline]

Definition at line 133 of file SquaredErrModule.h.

PStream& PLearn::operator>> ( PStream &  in,
VPLProcessor &  o 
) [inline]

Definition at line 177 of file VPLProcessor.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatColumnsVariable &  o 
) [inline]

Definition at line 79 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PTimer > &  o 
) [inline]

Definition at line 142 of file PTimer.h.

PStream& PLearn::operator>> ( PStream &  in,
SquaredErrModule *&  o 
) [inline]

Definition at line 133 of file SquaredErrModule.h.

PStream& PLearn::operator>> ( PStream &  in,
LogSoftSoftMaxVariable *&  o 
) [inline]

Definition at line 132 of file LogSoftSoftMaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
EarlyStoppingOracle &  o 
) [inline]

Definition at line 140 of file EarlyStoppingOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatOfVariable *&  o 
) [inline]

Definition at line 85 of file ConcatOfVariable.h.

{ return new ConcatOfVariable(distr,f); }
PStream& PLearn::operator>> ( PStream &  in,
PP< EarlyStoppingOracle > &  o 
) [inline]

Definition at line 140 of file EarlyStoppingOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNImputationVMatrix *&  o 
) [inline]

Definition at line 135 of file KNNImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperCommand &  o 
) [inline]

Definition at line 132 of file HyperCommand.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Correspondence > &  o 
) [inline]

Definition at line 117 of file Correspondence.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepFeatureExtractorNNet *&  o 
) [inline]

Definition at line 340 of file DeepFeatureExtractorNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatRowsVariable &  o 
) [inline]

Definition at line 77 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
PStream& PLearn::operator>> ( PStream &  in,
HyperLearner &  o 
) [inline]

Definition at line 123 of file HyperLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
KFoldSplitter *&  o 
) [inline]

Definition at line 117 of file KFoldSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
RationalQuadraticARDKernel &  o 
) [inline]

Definition at line 172 of file RationalQuadraticARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatRowsVariable > &  o 
) [inline]

Definition at line 77 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
PStream& PLearn::operator>> ( PStream &  in,
WeightedQuadraticPolynomialKernel &  o 
) [inline]

Definition at line 93 of file WeightedQuadraticPolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HyperOptimize > &  o 
) [inline]

Definition at line 194 of file HyperOptimize.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperRetrain &  o 
) [inline]

Definition at line 116 of file HyperRetrain.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMTruncExpLayer *&  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperSetOption &  o 
) [inline]

Definition at line 115 of file HyperSetOption.h.

PStream& PLearn::operator>> ( PStream &  in,
ReconstructionWeightsKernel &  o 
) [inline]

Definition at line 213 of file ReconstructionWeightsKernel.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< RBMTruncExpLayer > &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
FileDictionary *&  o 
) [inline]

Definition at line 118 of file FileDictionary.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelVMatrix *&  o 
) [inline]

Definition at line 93 of file KernelVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ConvolveVariable &  o 
) [inline]

Definition at line 72 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
PStream& PLearn::operator>> ( PStream &  in,
PP< OptimizeOptionOracle > &  o 
) [inline]

Definition at line 128 of file OptimizeOptionOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
OptionsOracle &  o 
) [inline]

Definition at line 132 of file OptionsOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMQLParameters *&  o 
) [inline]

Definition at line 195 of file RBMQLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OptionsOracle > &  o 
) [inline]

Definition at line 132 of file OptionsOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelVMatrix &  o 
) [inline]

Definition at line 93 of file KernelVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< JulianizeVMatrix > &  o 
) [inline]

Definition at line 157 of file JulianizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
StepwiseSelectionOracle &  o 
) [inline]

Definition at line 145 of file StepwiseSelectionOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
CrossEntropyVariable &  o 
) [inline]

Definition at line 74 of file CrossEntropyVariable.h.

{ return new CrossEntropyVariable(network_output, targets); }
PStream& PLearn::operator>> ( PStream &  in,
ScaledGaussianKernel &  o 
) [inline]

Definition at line 80 of file ScaledGaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NeighborhoodBoxVolumeDensityEstimator > &  o 
) [inline]

Definition at line 147 of file NeighborhoodBoxVolumeDensityEstimator.h.

template<class T , unsigned N, class TTrait >
PStream& PLearn::operator>> ( PStream &  is,
TinyVector< T, N, TTrait > &  tiny_vec 
)

Definition at line 89 of file TinyVectorIO.h.

References PLearn::TinyVector< T, N, TTrait >::begin(), std::copy(), and PLearn::TinyVector< T, N, TTrait >::resize().

{
    typedef typename TTrait::IOType IOType;
    TVec<IOType> v;
    is >> v;
    tiny_vec.resize(v.size());
    copy(v.begin(), v.end(), tiny_vec.begin());
    return is;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
InfiniteMNISTVMatrix *&  o 
) [inline]

Definition at line 168 of file InfiniteMNISTVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TrainTestSplitter &  o 
) [inline]

Definition at line 127 of file TrainTestSplitter.h.

void PLearn::operator>> ( const VVec &  vv,
const Vec &  v 
) [inline]

Definition at line 139 of file VVec.h.

References PLearn::VVec::toVec().

{ vv.toVec(v); }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< Preprocessing > &  o 
) [inline]

Definition at line 144 of file Preprocessing.h.

PStream& PLearn::operator>> ( PStream &  in,
SecondIterationTester &  o 
) [inline]

Definition at line 100 of file SecondIterationTester.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldParzenKernel &  o 
) [inline]

Definition at line 87 of file ManifoldParzenKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryStump > &  o 
) [inline]

Definition at line 159 of file BinaryStump.h.

PStream& PLearn::operator>> ( PStream &  in,
NonLocalManifoldParzen *&  o 
) [inline]

Definition at line 288 of file NonLocalManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaledGeneralizedDistanceRBFKernel *&  o 
) [inline]

Definition at line 79 of file ScaledGeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TanhModule > &  o 
) [inline]

Definition at line 137 of file TanhModule.h.

PStream& PLearn::operator>> ( PStream &  in,
CutBelowThresholdVariable *&  o 
) [inline]

Definition at line 74 of file CutBelowThresholdVariable.h.

{ return new CutBelowThresholdVariable(v,threshold); }
PStream& PLearn::operator>> ( PStream &  in,
PP< CutBelowThresholdVariable > &  o 
) [inline]

Definition at line 74 of file CutBelowThresholdVariable.h.

{ return new CutBelowThresholdVariable(v,threshold); }
PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianContinuum > &  o 
) [inline]

Definition at line 281 of file GaussianContinuum.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMParameters &  o 
) [inline]

Definition at line 196 of file RBMParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
DeterminantVariable &  o 
) [inline]

Definition at line 76 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
PStream& PLearn::operator>> ( PStream &  in,
CompareLearner &  o 
) [inline]

Definition at line 171 of file CompareLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaledLaplacianKernel &  o 
) [inline]

Definition at line 73 of file ScaledLaplacianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatrixFromDistribution &  o 
) [inline]

Definition at line 125 of file VMatrixFromDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaledLaplacianKernel *&  o 
) [inline]

Definition at line 73 of file ScaledLaplacianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
InterleaveVMatrix *&  o 
) [inline]

Definition at line 119 of file InterleaveVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< InterleaveVMatrix > &  o 
) [inline]

Definition at line 119 of file InterleaveVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DiagonalizedFactorsProductVariable &  o 
) [inline]

Definition at line 85 of file DiagonalizedFactorsProductVariable.h.

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }
PStream& PLearn::operator>> ( PStream &  in,
PP< InfiniteMNISTVMatrix > &  o 
) [inline]

Definition at line 168 of file InfiniteMNISTVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PvGradNNet &  o 
) [inline]

Definition at line 171 of file PvGradNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMLLParameters &  o 
) [inline]

Definition at line 208 of file RBMLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
SpectralClustering *&  o 
) [inline]

Definition at line 123 of file SpectralClustering.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeNode *&  o 
) [inline]

Definition at line 147 of file RegressionTreeNode.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedCostFunction *&  o 
) [inline]

Definition at line 80 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
PStream& PLearn::operator>> ( PStream &  in,
GenerateDecisionPlot *&  o 
) [inline]

Definition at line 115 of file GenerateDecisionPlot.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GramVMatrix > &  o 
) [inline]

Definition at line 116 of file GramVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassifierFromConditionalPDistribution &  o 
) [inline]

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DilogarithmVariable > &  o 
) [inline]

Definition at line 73 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< RBMLQParameters > &  o 
) [inline]

Definition at line 195 of file RBMLQParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OneHotSquaredLoss > &  o 
) [inline]

Definition at line 86 of file OneHotSquaredLoss.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
DivVariable &  o 
) [inline]

Definition at line 79 of file DivVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
Grapher &  o 
) [inline]

Definition at line 127 of file Grapher.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatrix &  o 
) [inline]

Definition at line 901 of file VMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PvGradNNet > &  o 
) [inline]

Definition at line 171 of file PvGradNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
ArgmaxVariable *&  o 
) [inline]

Definition at line 74 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
RBMLLParameters *&  o 
) [inline]

Definition at line 208 of file RBMLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PolynomialKernel > &  o 
) [inline]

Definition at line 103 of file PolynomialKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IndexedVMatrix > &  o 
) [inline]

Definition at line 108 of file IndexedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PrecomputedProcessedLearner &  o 
) [inline]

Definition at line 141 of file PrecomputedProcessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DotProductVariable > &  o 
) [inline]

Definition at line 79 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
ClassifierFromConditionalPDistribution *&  o 
) [inline]

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BernoulliSampleVariable > &  o 
) [inline]

Definition at line 137 of file BernoulliSampleVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VariableSelectionWithDirectedGradientDescent > &  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
BallTreeNearestNeighbors &  o 
) [inline]

Definition at line 210 of file BallTreeNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
SigmoidPrimitiveKernel &  o 
) [inline]

Definition at line 76 of file SigmoidPrimitiveKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DuplicateColumnVariable > &  o 
) [inline]

Definition at line 79 of file DuplicateColumnVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
SigmoidPrimitiveKernel *&  o 
) [inline]

Definition at line 76 of file SigmoidPrimitiveKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ExhaustiveNearestNeighbors &  o 
) [inline]

Definition at line 197 of file ExhaustiveNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
ExhaustiveNearestNeighbors *&  o 
) [inline]

Definition at line 197 of file ExhaustiveNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
DuplicateRowVariable &  o 
) [inline]

Definition at line 78 of file DuplicateRowVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< ImputationVMatrix > &  o 
) [inline]

Definition at line 84 of file ImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ImputationVMatrix &  o 
) [inline]

Definition at line 84 of file ImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NatGradSMPNNet > &  o 
) [inline]

Definition at line 364 of file NatGradSMPNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
ImputationVMatrix *&  o 
) [inline]

Definition at line 84 of file ImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NormalizationLearner &  o 
) [inline]

Definition at line 187 of file NormalizationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SequentialLearner > &  o 
) [inline]

Definition at line 174 of file SequentialLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
DuplicateScalarVariable &  o 
) [inline]

Definition at line 79 of file DuplicateScalarVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
DuplicateScalarVariable *&  o 
) [inline]

Definition at line 79 of file DuplicateScalarVariable.h.

{ 
PStream & PLearn::operator>> ( PStream &  in,
PP< GaussianProcessRegressor > &  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
SourceKernel &  o 
) [inline]

Definition at line 129 of file SourceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMJointGenericParameters > &  o 
) [inline]

Definition at line 197 of file RBMJointGenericParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
BinarizeModule &  o 
) [inline]

Definition at line 289 of file BinarizeModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SourceKernel > &  o 
) [inline]

Definition at line 129 of file SourceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassErrorCostModule &  o 
) [inline]

Definition at line 150 of file ClassErrorCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassErrorCostModule *&  o 
) [inline]

Definition at line 150 of file ClassErrorCostModule.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMLayer *&  o 
) [inline]

Definition at line 166 of file DEPRECATED/RBMLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SurfaceTemplateLearner > &  o 
) [inline]

Definition at line 148 of file SurfaceTemplateLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
CombiningCostsModule &  o 
) [inline]

Definition at line 175 of file CombiningCostsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
Cov2CorrVariable &  o 
) [inline]

Definition at line 82 of file Cov2CorrVariable.h.

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }
PStream& PLearn::operator>> ( PStream &  in,
PP< TruncatedRealFunction > &  o 
) [inline]

Definition at line 125 of file TruncatedRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
SequentialLearner &  o 
) [inline]

Definition at line 174 of file SequentialLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Convolution2DModule > &  o 
) [inline]

Definition at line 257 of file Convolution2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
SequentialLearner *&  o 
) [inline]

Definition at line 174 of file SequentialLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AddLayersNNet > &  o 
) [inline]

Definition at line 147 of file AddLayersNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SquaredErrorCostFunction > &  o 
) [inline]

Definition at line 86 of file SquaredErrorCostFunction.h.

{
PStream& PLearn::operator>> ( PStream &  in,
EqualScalarVariable *&  o 
) [inline]

Definition at line 74 of file EqualScalarVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
GeneralizedOneHotVMatrix *&  o 
) [inline]

Definition at line 110 of file GeneralizedOneHotVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CrossEntropyCostModule > &  o 
) [inline]

Definition at line 123 of file CrossEntropyCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< EqualScalarVariable > &  o 
) [inline]

Definition at line 74 of file EqualScalarVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AffineTransformVariable > &  o 
) [inline]

Definition at line 89 of file AffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
RBMJointLLParameters &  o 
) [inline]

Definition at line 184 of file RBMJointLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
EqualVariable &  o 
) [inline]

Definition at line 76 of file EqualVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GeneralizedOneHotVMatrix > &  o 
) [inline]

Definition at line 110 of file GeneralizedOneHotVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDBNRegression &  o 
) [inline]

Definition at line 286 of file GaussianDBNRegression.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LeftPseudoInverseVariable > &  o 
) [inline]

Definition at line 74 of file LeftPseudoInverseVariable.h.

{
PStream & PLearn::operator>> ( PStream &  in,
PP< Molecule > &  o 
) [inline]

Definition at line 67 of file Molecule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SquaredExponentialARDKernel > &  o 
) [inline]

Definition at line 153 of file SquaredExponentialARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ErfVariable *&  o 
) [inline]

Definition at line 69 of file ErfVariable.h.

{ return new ErfVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ConditionalMeanImputationVMatrix *&  o 
) [inline]

Definition at line 109 of file ConditionalMeanImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussPartSupervisedDBN > &  o 
) [inline]

Definition at line 380 of file GaussPartSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
HintonDeepBeliefNet &  o 
) [inline]

Definition at line 342 of file HintonDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< FractionSplitter > &  o 
) [inline]

Definition at line 125 of file FractionSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
SummationKernel &  o 
) [inline]

Definition at line 145 of file SummationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
AdditiveGaussianNoiseVariable &  o 
) [inline]

Definition at line 140 of file AdditiveGaussianNoiseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ShuntingNNetLayerModule *&  o 
) [inline]

Definition at line 172 of file ShuntingNNetLayerModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AdditiveGaussianNoiseVariable > &  o 
) [inline]

Definition at line 140 of file AdditiveGaussianNoiseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMGenericParameters > &  o 
) [inline]

Definition at line 214 of file RBMGenericParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SummationKernel > &  o 
) [inline]

Definition at line 145 of file SummationKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MovingAverage > &  o 
) [inline]

Definition at line 93 of file MovingAverage.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< RBMBinomialLayer > &  o 
) [inline]

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
ThresholdedKernel *&  o 
) [inline]

Definition at line 178 of file ThresholdedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMConv2DLLParameters &  o 
) [inline]

Definition at line 236 of file RBMConv2DLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
FractionSplitter &  o 
) [inline]

Definition at line 125 of file FractionSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstrainedSourceVariable &  o 
) [inline]

Definition at line 124 of file ConstrainedSourceVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ThresholdedKernel &  o 
) [inline]

Definition at line 178 of file ThresholdedKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConstrainedSourceVariable > &  o 
) [inline]

Definition at line 124 of file ConstrainedSourceVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ThresholdedKernel > &  o 
) [inline]

Definition at line 178 of file ThresholdedKernel.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMGaussianLayer *&  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
ConstrainVariable &  o 
) [inline]

Definition at line 81 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
VecExtendedVMatrix *&  o 
) [inline]

Definition at line 106 of file VecExtendedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LeftPseudoInverseVariable *&  o 
) [inline]

Definition at line 74 of file LeftPseudoInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< RBMJointLLParameters > &  o 
) [inline]

Definition at line 184 of file RBMJointLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatKernel &  o 
) [inline]

Definition at line 149 of file VMatKernel.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMLayer &  o 
) [inline]

Definition at line 166 of file DEPRECATED/RBMLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatKernel *&  o 
) [inline]

Definition at line 149 of file VMatKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMConv2DLLParameters *&  o 
) [inline]

Definition at line 236 of file RBMConv2DLLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
Cov2CorrVariable *&  o 
) [inline]

Definition at line 82 of file Cov2CorrVariable.h.

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }
PStream& PLearn::operator>> ( PStream &  in,
SurfaceMesh *&  o 
) [inline]

Definition at line 227 of file SurfaceMesh.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMLQParameters &  o 
) [inline]

Definition at line 195 of file RBMLQParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
DiscriminativeRBM *&  o 
) [inline]

Definition at line 311 of file DiscriminativeRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
DiagVariable &  o 
) [inline]

Definition at line 77 of file DiagVariable.h.

{ return new DiagVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
BernoulliSampleVariable *&  o 
) [inline]

Definition at line 137 of file BernoulliSampleVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedCostFunction &  o 
) [inline]

Definition at line 80 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
PStream& PLearn::operator>> ( PStream &  in,
NegLogPoissonVariable *&  o 
) [inline]

Definition at line 81 of file NegLogPoissonVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
FilteredVMatrix &  o 
) [inline]

Definition at line 136 of file FilteredVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
FilterSplitter *&  o 
) [inline]

Definition at line 126 of file FilterSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PartSupervisedDBN &  o 
) [inline]

Definition at line 375 of file PartSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
DoubleProductVariable &  o 
) [inline]

Definition at line 138 of file DoubleProductVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WeightedCostFunction > &  o 
) [inline]

Definition at line 80 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
PStream & PLearn::operator>> ( PStream &  in,
RBMBinomialLayer *&  o 
) [inline]

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMQLParameters &  o 
) [inline]

Definition at line 195 of file RBMQLParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearCombinationOfScalarVariables &  o 
) [inline]

Definition at line 157 of file LinearCombinationOfScalarVariables.h.

PStream & PLearn::operator>> ( PStream &  in,
RBMTruncExpLayer &  o 
) [inline]

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PartSupervisedDBN *&  o 
) [inline]

Definition at line 375 of file PartSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PartSupervisedDBN > &  o 
) [inline]

Definition at line 375 of file PartSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
FilteredVMatrix *&  o 
) [inline]

Definition at line 136 of file FilteredVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LogSoftSoftMaxVariable &  o 
) [inline]

Definition at line 132 of file LogSoftSoftMaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LogSoftSoftMaxVariable > &  o 
) [inline]

Definition at line 132 of file LogSoftSoftMaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NormalizationLearner *&  o 
) [inline]

Definition at line 187 of file NormalizationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussPartSupervisedDBN &  o 
) [inline]

Definition at line 380 of file GaussPartSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StackedModulesLearner > &  o 
) [inline]

Definition at line 214 of file StackedModulesLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WeightedLogGaussian > &  o 
) [inline]

Definition at line 90 of file WeightedLogGaussian.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiMaxVariable &  o 
) [inline]

Definition at line 162 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
PStream& PLearn::operator>> ( PStream &  in,
PP< NNet > &  o 
) [inline]

Definition at line 291 of file NNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HintonDeepBeliefNet > &  o 
) [inline]

Definition at line 342 of file HintonDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
NLLErrModule *&  o 
) [inline]

Definition at line 140 of file NLLErrModule.h.

PStream& PLearn::operator>> ( PStream &  in,
Convolution2DModule &  o 
) [inline]

Definition at line 257 of file Convolution2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
UndirectedSoftmaxModule &  o 
) [inline]

Definition at line 147 of file UndirectedSoftmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiSampleVariable &  o 
) [inline]

Definition at line 142 of file MultiSampleVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NLLErrModule &  o 
) [inline]

Definition at line 140 of file NLLErrModule.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftmaxNLLCostModule &  o 
) [inline]

Definition at line 147 of file SoftmaxNLLCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
KLp0p1RBMModule &  o 
) [inline]

Definition at line 338 of file KLp0p1RBMModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixInverseVariable &  o 
) [inline]

Definition at line 71 of file MatrixInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RBMJointGenericParameters *&  o 
) [inline]

Definition at line 197 of file RBMJointGenericParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
NonDiagVariable *&  o 
) [inline]

Definition at line 77 of file NonDiagVariable.h.

{ return new NonDiagVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
MulticlassLossVariable *&  o 
) [inline]

Definition at line 79 of file MulticlassLossVariable.h.

{ return new MulticlassLossVariable(network_output, targets); }
PStream& PLearn::operator>> ( PStream &  in,
SubsamplingDBN &  o 
) [inline]

Definition at line 439 of file SubsamplingDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussPartSupervisedDBN *&  o 
) [inline]

Definition at line 380 of file GaussPartSupervisedDBN.h.

PStream& PLearn::operator>> ( PStream &  in,
HintonDeepBeliefNet *&  o 
) [inline]

Definition at line 342 of file HintonDeepBeliefNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExtendedVMatrix > &  o 
) [inline]

Definition at line 116 of file ExtendedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtractNNetParamsVMatrix *&  o 
) [inline]

Definition at line 122 of file ExtractNNetParamsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedLogGaussian &  o 
) [inline]

Definition at line 90 of file WeightedLogGaussian.h.

PStream& PLearn::operator>> ( PStream &  in,
Binner *&  o 
) [inline]

Definition at line 123 of file Binner.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedLogGaussian *&  o 
) [inline]

Definition at line 90 of file WeightedLogGaussian.h.

PStream& PLearn::operator>> ( PStream &  in,
ProbabilityPairsVariable *&  o 
) [inline]

Definition at line 143 of file ProbabilityPairsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ErfVariable > &  o 
) [inline]

Definition at line 69 of file ErfVariable.h.

{ return new ErfVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ExplicitSplitter *&  o 
) [inline]

Definition at line 114 of file ExplicitSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
BaseRegressorWrapper &  o 
) [inline]

Definition at line 116 of file BaseRegressorWrapper.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianDBNRegression > &  o 
) [inline]

Definition at line 286 of file GaussianDBNRegression.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityModule &  o 
) [inline]

Definition at line 190 of file IdentityModule.h.

PStream& PLearn::operator>> ( PStream &  in,
DynamicallyLinkedRBMsModel *&  o 
) [inline]

Definition at line 291 of file DynamicallyLinkedRBMsModel.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
DoubleAccessSparseMatrix< T > &  m 
) [inline]

Definition at line 188 of file DoubleAccessSparseMatrix.h.

References in, and PLearn::DoubleAccessSparseMatrix< T >::read().

{ 
    m.read(in); 
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ObjectGenerator *&  o 
) [inline]

Definition at line 96 of file ObjectGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< EqualVariable > &  o 
) [inline]

Definition at line 76 of file EqualVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ICP > &  o 
) [inline]

Definition at line 205 of file ICP.h.

PStream& PLearn::operator>> ( PStream &  in,
SaltPepperNoiseVariable &  o 
) [inline]

Definition at line 143 of file SaltPepperNoiseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SaltPepperNoiseVariable *&  o 
) [inline]

Definition at line 143 of file SaltPepperNoiseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SaltPepperNoiseVariable > &  o 
) [inline]

Definition at line 143 of file SaltPepperNoiseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExplicitSplitter > &  o 
) [inline]

Definition at line 114 of file ExplicitSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearFilterModule &  o 
) [inline]

Definition at line 188 of file LinearFilterModule.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDBNRegression *&  o 
) [inline]

Definition at line 286 of file GaussianDBNRegression.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Max2Variable > &  o 
) [inline]

Definition at line 78 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< EqualConstantVariable > &  o 
) [inline]

Definition at line 78 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
PStream& PLearn::operator>> ( PStream &  in,
MatrixModule &  o 
) [inline]

Definition at line 224 of file MatrixModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixModule *&  o 
) [inline]

Definition at line 224 of file MatrixModule.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDBNClassification *&  o 
) [inline]

Definition at line 299 of file GaussianDBNClassification.h.

PStream& PLearn::operator>> ( PStream &  in,
ICP *&  o 
) [inline]

Definition at line 205 of file ICP.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussianDBNClassification > &  o 
) [inline]

Definition at line 299 of file GaussianDBNClassification.h.

PStream& PLearn::operator>> ( PStream &  in,
ModuleLearner &  o 
) [inline]

Definition at line 210 of file ModuleLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SumEntropyOfBernoullis &  o 
) [inline]

Definition at line 139 of file SumEntropyOfBernoullis.h.

PStream& PLearn::operator>> ( PStream &  in,
ConditionalCDFSmoother &  o 
) [inline]

Definition at line 127 of file ConditionalCDFSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianDBNClassification &  o 
) [inline]

Definition at line 299 of file GaussianDBNClassification.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ModulesLearner > &  o 
) [inline]

Definition at line 184 of file ModulesLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ModuleStackModule &  o 
) [inline]

Definition at line 182 of file ModuleStackModule.h.

PStream& PLearn::operator>> ( PStream &  in,
DictionaryVMatrix *&  o 
) [inline]

Definition at line 186 of file DictionaryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DisregardRowsVMatrix &  o 
) [inline]

Definition at line 145 of file DisregardRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SquaredErrorCostFunction *&  o 
) [inline]

Definition at line 86 of file SquaredErrorCostFunction.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< NxProfileLearner > &  o 
) [inline]

Definition at line 207 of file NxProfileLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SumEntropyOfCategoricals *&  o 
) [inline]

Definition at line 139 of file SumEntropyOfCategoricals.h.

PStream& PLearn::operator>> ( PStream &  in,
CrossEntropyCostModule &  o 
) [inline]

Definition at line 123 of file CrossEntropyCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
EncodedVMatrix *&  o 
) [inline]

Definition at line 87 of file EncodedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NetworkConnection &  o 
) [inline]

Definition at line 143 of file NetworkConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
X o 
) [inline]

Definition at line 172 of file ObjectGraphIteratorTest.cc.

: public X
PStream& PLearn::operator>> ( PStream &  in,
DisregardRowsVMatrix *&  o 
) [inline]

Definition at line 145 of file DisregardRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CrossEntropyCostModule *&  o 
) [inline]

Definition at line 123 of file CrossEntropyCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StructuralLearner > &  o 
) [inline]

Definition at line 244 of file StructuralLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
NLLCostModule &  o 
) [inline]

Definition at line 145 of file NLLCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NLLCostModule > &  o 
) [inline]

Definition at line 145 of file NLLCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConditionalStatsCollector > &  o 
) [inline]

Definition at line 172 of file ConditionalStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DisregardRowsVMatrix > &  o 
) [inline]

Definition at line 145 of file DisregardRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DiskVMatrix *&  o 
) [inline]

Definition at line 124 of file DiskVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
OnBagsModule &  o 
) [inline]

Definition at line 155 of file OnBagsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesConstantScalarVariable2 &  o 
) [inline]

Definition at line 74 of file TimesConstantScalarVariable2.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SetOption *&  o 
) [inline]

Definition at line 113 of file SetOption.h.

PStream& PLearn::operator>> ( PStream &  in,
UniformizeLearner &  o 
) [inline]

Definition at line 187 of file UniformizeLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ProcessInputCostModule &  o 
) [inline]

Definition at line 190 of file ProcessInputCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
NxProfileLearner &  o 
) [inline]

Definition at line 207 of file NxProfileLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConstantRealFunction > &  o 
) [inline]

Definition at line 121 of file ConstantRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
TraceVariable *&  o 
) [inline]

Definition at line 77 of file TraceVariable.h.

{ return new TraceVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
CostModule &  o 
) [inline]

Definition at line 198 of file CostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
CostModule *&  o 
) [inline]

Definition at line 198 of file CostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
MinVariable *&  o 
) [inline]

Definition at line 68 of file MinVariable.h.

{ return new MinVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
TransposedDoubleProductVariable &  o 
) [inline]

Definition at line 140 of file TransposedDoubleProductVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesVariable *&  o 
) [inline]

Definition at line 75 of file TimesVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< RemoveRowsVMatrix > &  o 
) [inline]

Definition at line 108 of file RemoveRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LLC *&  o 
) [inline]

Definition at line 163 of file LLC.h.

PStream& PLearn::operator>> ( PStream &  in,
VMatLanguage *&  o 
) [inline]

Definition at line 163 of file VMatLanguage.h.

: public RowBufferedVMatrix
PStream& PLearn::operator>> ( PStream &  in,
MinusVariable &  o 
) [inline]

Definition at line 75 of file MinusVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
NonLocalManifoldParzenKernel *&  o 
) [inline]

Definition at line 83 of file NonLocalManifoldParzenKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransposedDoubleProductVariable > &  o 
) [inline]

Definition at line 140 of file TransposedDoubleProductVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WPLS > &  o 
) [inline]

Definition at line 185 of file WPLS.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ChemicalICP > &  o 
) [inline]

Definition at line 288 of file ChemicalICP.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMDiagonalMatrixConnection > &  o 
) [inline]

Definition at line 220 of file RBMDiagonalMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
CubicSpline &  o 
) [inline]

Definition at line 152 of file CubicSpline.h.

PStream& PLearn::operator>> ( PStream &  in,
DichotomizeVMatrix *&  o 
) [inline]

Definition at line 125 of file DichotomizeVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DiverseComponentAnalysis *&  o 
) [inline]

Definition at line 240 of file DiverseComponentAnalysis.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMLocalMultinomialLayer &  o 
) [inline]

Definition at line 181 of file RBMLocalMultinomialLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussMixLocalProjections > &  o 
) [inline]

Definition at line 165 of file GaussMixLocalProjections.h.

PStream& PLearn::operator>> ( PStream &  in,
ExtendedVariable &  o 
) [inline]

Definition at line 97 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SparseVMatrix > &  o 
) [inline]

Definition at line 119 of file SparseVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PLCheckTest &  o 
) [inline]

Definition at line 126 of file PLCheckTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMMatrixConnection > &  o 
) [inline]

Definition at line 296 of file RBMMatrixConnection.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMMatrixConnectionNatGrad &  o 
) [inline]

Definition at line 121 of file RBMMatrixConnectionNatGrad.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassErrorCostModule > &  o 
) [inline]

Definition at line 150 of file ClassErrorCostModule.h.

PStream& PLearn::operator>> ( PStream &  in,
EqualConstantVariable *&  o 
) [inline]

Definition at line 78 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
PStream& PLearn::operator>> ( PStream &  in,
ExtractVariable &  o 
) [inline]

Definition at line 86 of file ExtractVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
NatGradNNet *&  o 
) [inline]

Definition at line 314 of file NatGradNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< YMDDatedVMatrix > &  o 
) [inline]

Definition at line 141 of file YMDDatedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ElementAtPositionVariable > &  o 
) [inline]

Definition at line 84 of file ElementAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NLLNeighborhoodWeightsVariable > &  o 
) [inline]

Definition at line 129 of file NLLNeighborhoodWeightsVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< PLearnerDiagonalKernel > &  o 
) [inline]

Definition at line 127 of file PLearnerDiagonalKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMModule > &  o 
) [inline]

Definition at line 388 of file RBMModule.h.

PStream& PLearn::operator>> ( PStream &  in,
CombiningCostsModule *&  o 
) [inline]

Definition at line 175 of file CombiningCostsModule.h.

PStream& PLearn::operator>> ( PStream &  in,
RemoveRowsVMatrix *&  o 
) [inline]

Definition at line 108 of file RemoveRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BinarizeModule *&  o 
) [inline]

Definition at line 289 of file BinarizeModule.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMRateLayer &  o 
) [inline]

Definition at line 158 of file RBMRateLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMRateLayer *&  o 
) [inline]

Definition at line 158 of file RBMRateLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
Function &  o 
) [inline]

Definition at line 208 of file Func.h.

PStream& PLearn::operator>> ( PStream &  in,
Function *&  o 
) [inline]

Definition at line 208 of file Func.h.

PStream& PLearn::operator>> ( PStream &  in,
ElementAtPositionVariable *&  o 
) [inline]

Definition at line 84 of file ElementAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RemoveRowsVMatrix &  o 
) [inline]

Definition at line 108 of file RemoveRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Func &  o 
) [inline]

Definition at line 209 of file Func.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMWoodsLayer &  o 
) [inline]

Definition at line 211 of file RBMWoodsLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinarizeModule > &  o 
) [inline]

Definition at line 289 of file BinarizeModule.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedFocusedAutoassociatorsNet *&  o 
) [inline]

Definition at line 365 of file StackedFocusedAutoassociatorsNet.h.

PStream& PLearn::operator>> ( PStream &  in,
ElementAtPositionVariable &  o 
) [inline]

Definition at line 84 of file ElementAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
BackConvolution2DModule &  o 
) [inline]

Definition at line 248 of file BackConvolution2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ShuntingNNetLayerModule &  o 
) [inline]

Definition at line 172 of file ShuntingNNetLayerModule.h.

PStream& PLearn::operator>> ( PStream &  in,
ExpMeanStatsIterator &  o 
) [inline]

Definition at line 161 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< ProbabilityPairsInverseVariable > &  o 
) [inline]

Definition at line 140 of file ProbabilityPairsInverseVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
KLp0p1RBMModule *&  o 
) [inline]

Definition at line 338 of file KLp0p1RBMModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExpMeanStatsIterator > &  o 
) [inline]

Definition at line 161 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< BatchVMatrix > &  o 
) [inline]

Definition at line 86 of file BatchVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NeuralProbabilisticLanguageModel &  o 
) [inline]

Definition at line 465 of file NeuralProbabilisticLanguageModel.h.

PStream& PLearn::operator>> ( PStream &  in,
HardSlopeVariable &  o 
) [inline]

Definition at line 73 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
PStream& PLearn::operator>> ( PStream &  in,
PP< DuplicateScalarVariable > &  o 
) [inline]

Definition at line 79 of file DuplicateScalarVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PLLogTest &  o 
) [inline]

Definition at line 130 of file PLLogTest.h.

PStream& PLearn::operator>> ( PStream &  in,
BackConvolution2DModule *&  o 
) [inline]

Definition at line 248 of file BackConvolution2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BackConvolution2DModule > &  o 
) [inline]

Definition at line 248 of file BackConvolution2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CumVMatrix > &  o 
) [inline]

Definition at line 112 of file CumVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Object &  o 
) [inline]

Definition at line 1174 of file Object.h.

References in, and PLearn::Object::newread().

{
    o.newread(in);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
Z &  o 
) [inline]

Definition at line 219 of file ObjectGraphIteratorTest.cc.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< StackedAutoassociatorsNet > &  o 
) [inline]

Definition at line 595 of file StackedAutoassociatorsNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< GaussMix > &  o 
) [inline]

Definition at line 536 of file GaussMix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StddevStatsIterator > &  o 
) [inline]

Definition at line 190 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< ArgmaxModule > &  o 
) [inline]

Definition at line 263 of file ArgmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
PLS *&  o 
) [inline]

Definition at line 192 of file PLS.h.

PStream& PLearn::operator>> ( PStream &  in,
HeterogenuousAffineTransformWeightPenalty &  o 
) [inline]

Definition at line 119 of file HeterogenuousAffineTransformWeightPenalty.h.

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }
PStream& PLearn::operator>> ( PStream &  in,
DBSplitter *&  o 
) [inline]

Definition at line 126 of file DBSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
HeterogenuousAffineTransformWeightPenalty *&  o 
) [inline]

Definition at line 119 of file HeterogenuousAffineTransformWeightPenalty.h.

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }
PStream& PLearn::operator>> ( PStream &  in,
Z *&  o 
) [inline]

Definition at line 219 of file ObjectGraphIteratorTest.cc.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< PrecomputedProcessedLearner > &  o 
) [inline]

Definition at line 141 of file PrecomputedProcessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
DBSplitter &  o 
) [inline]

Definition at line 126 of file DBSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ArgmaxModule *&  o 
) [inline]

Definition at line 263 of file ArgmaxModule.h.

PStream& PLearn::operator>> ( PStream &  in,
IdentityVariable &  o 
) [inline]

Definition at line 61 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
GenericNearestNeighbors &  o 
) [inline]

Definition at line 179 of file GenericNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IdentityVariable > &  o 
) [inline]

Definition at line 61 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< GenericNearestNeighbors > &  o 
) [inline]

Definition at line 179 of file GenericNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
GenericNearestNeighbors *&  o 
) [inline]

Definition at line 179 of file GenericNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
BaseRegressorConfidence &  o 
) [inline]

Definition at line 113 of file BaseRegressorConfidence.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DuplicateRowVariable > &  o 
) [inline]

Definition at line 78 of file DuplicateRowVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< KernelDensityEstimator > &  o 
) [inline]

Definition at line 177 of file KernelDensityEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
BaseRegressorWrapper *&  o 
) [inline]

Definition at line 116 of file BaseRegressorWrapper.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DatedJoinVMatrix > &  o 
) [inline]

Definition at line 135 of file DatedJoinVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DuplicateRowVariable *&  o 
) [inline]

Definition at line 78 of file DuplicateRowVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
StackedSVDNet *&  o 
) [inline]

Definition at line 270 of file StackedSVDNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ExhaustiveNearestNeighbors > &  o 
) [inline]

Definition at line 197 of file ExhaustiveNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
RPPath &  o 
) [inline]

Definition at line 105 of file RPPath.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< InsertZerosVariable > &  o 
) [inline]

Definition at line 72 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
PStream& PLearn::operator>> ( PStream &  in,
MinStatsIterator &  o 
) [inline]

Definition at line 277 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< MeshVertex > &  o 
) [inline]

Definition at line 129 of file MeshVertex.h.

PStream& PLearn::operator>> ( PStream &  in,
MeshVertex &  o 
) [inline]

Definition at line 129 of file MeshVertex.h.

PStream & PLearn::operator>> ( PStream &  in,
PyObject *  v 
)

Definition at line 1050 of file PythonObjectWrapper.cc.

References in, and PLERROR.

{
    PLERROR("operator>>(PStream& in, PyObject* v) not supported yet");
    return in;
}
PStream& PLearn::operator>> ( PStream &  in,
RBMLQParameters *&  o 
) [inline]

Definition at line 195 of file RBMLQParameters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MinStatsIterator > &  o 
) [inline]

Definition at line 277 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
PP< StackedFocusedAutoassociatorsNet > &  o 
) [inline]

Definition at line 365 of file StackedFocusedAutoassociatorsNet.h.

PStream& PLearn::operator>> ( PStream &  in,
InterValuesVariable &  o 
) [inline]

Definition at line 76 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
PStream& PLearn::operator>> ( PStream &  in,
BinaryBallTree &  o 
) [inline]

Definition at line 130 of file BinaryBallTree.h.

PStream& PLearn::operator>> ( PStream &  in,
DuplicateColumnVariable *&  o 
) [inline]

Definition at line 79 of file DuplicateColumnVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< InterValuesVariable > &  o 
) [inline]

Definition at line 76 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
PStream& PLearn::operator>> ( PStream &  in,
PP< BallTreeNearestNeighbors > &  o 
) [inline]

Definition at line 210 of file BallTreeNearestNeighbors.h.

PStream& PLearn::operator>> ( PStream &  in,
InvertElementsVariable &  o 
) [inline]

Definition at line 70 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
MeshVertex *&  o 
) [inline]

Definition at line 129 of file MeshVertex.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MaxStatsIterator > &  o 
) [inline]

Definition at line 300 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
CrossReferenceVMatrix *&  o 
) [inline]

Definition at line 95 of file CrossReferenceVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PruningLinearRegressor > &  o 
) [inline]

Definition at line 136 of file PruningLinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
IsAboveThresholdVariable &  o 
) [inline]

Definition at line 78 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }
PStream& PLearn::operator>> ( PStream &  in,
IsAboveThresholdVariable *&  o 
) [inline]

Definition at line 78 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }
PStream& PLearn::operator>> ( PStream &  in,
ObjectGraphIteratorTest &  o 
) [inline]

Definition at line 130 of file ObjectGraphIteratorTest.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftStatsIterator *&  o 
) [inline]

Definition at line 338 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
VariableSelectionWithDirectedGradientDescent *&  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
VariableSelectionWithDirectedGradientDescent &  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
PP< LiftStatsIterator > &  o 
) [inline]

Definition at line 338 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
WeightedSumSquareVariable &  o 
) [inline]

Definition at line 78 of file WeightedSumSquareVariable.h.

{ return new WeightedSumSquareVariable(v,w); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatRowsSubVMatrix > &  o 
) [inline]

Definition at line 116 of file ConcatRowsSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
IsLargerVariable &  o 
) [inline]

Definition at line 75 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeMulticlassLeave > &  o 
) [inline]

Definition at line 97 of file RegressionTreeMulticlassLeave.h.

PStream& PLearn::operator>> ( PStream &  in,
IsLargerVariable *&  o 
) [inline]

Definition at line 75 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
PStream& PLearn::operator>> ( PStream &  in,
WPLS &  o 
) [inline]

Definition at line 185 of file WPLS.h.

PStream& PLearn::operator>> ( PStream &  in,
RankLearner *&  o 
) [inline]

Definition at line 178 of file RankLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
QuantilesStatsIterator &  o 
) [inline]

Definition at line 372 of file StatsIterator.h.

: public Array<StatsIt>
PStream& PLearn::operator>> ( PStream &  in,
PrecomputedProcessedLearner *&  o 
) [inline]

Definition at line 141 of file PrecomputedProcessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeNode &  o 
) [inline]

Definition at line 147 of file RegressionTreeNode.h.

PStream& PLearn::operator>> ( PStream &  in,
ObjectGraphIteratorTest *&  o 
) [inline]

Definition at line 130 of file ObjectGraphIteratorTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeNode > &  o 
) [inline]

Definition at line 147 of file RegressionTreeNode.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< QuantilesStatsIterator > &  o 
) [inline]

Definition at line 372 of file StatsIterator.h.

: public Array<StatsIt>
PStream& PLearn::operator>> ( PStream &  in,
DotProductVariable &  o 
) [inline]

Definition at line 79 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PLStringutilsTest > &  o 
) [inline]

Definition at line 126 of file PLStringutilsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressorFromDistribution &  o 
) [inline]

Definition at line 174 of file RegressorFromDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
IsSmallerVariable &  o 
) [inline]

Definition at line 74 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
PStream& PLearn::operator>> ( PStream &  in,
VariableDeletionVMatrix *&  o 
) [inline]

Definition at line 96 of file VariableDeletionVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SumVarianceOfLinearTransformedCategoricals *&  o 
) [inline]
PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatRowsVMatrix > &  o 
) [inline]

Definition at line 151 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
PStream& PLearn::operator>> ( PStream &  in,
ComputePurenneError &  o 
) [inline]

Definition at line 79 of file ComputePurenneError.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ComputePurenneError > &  o 
) [inline]

Definition at line 79 of file ComputePurenneError.h.

PStream& PLearn::operator>> ( PStream &  in,
Experimentation &  o 
) [inline]

Definition at line 203 of file Experimentation.h.

PStream& PLearn::operator>> ( PStream &  in,
LeftPseudoInverseVariable &  o 
) [inline]

Definition at line 74 of file LeftPseudoInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< EmbeddedSequentialLearner > &  o 
) [inline]

Definition at line 113 of file EmbeddedSequentialLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
MovingAverage &  o 
) [inline]

Definition at line 93 of file MovingAverage.h.

PStream& PLearn::operator>> ( PStream &  in,
Grapher *&  o 
) [inline]

Definition at line 127 of file Grapher.h.

PStream& PLearn::operator>> ( PStream &  in,
LocallyWeightedDistribution *&  o 
) [inline]

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
PStream& PLearn::operator>> ( PStream &  in,
ConcatRowsSubVMatrix *&  o 
) [inline]

Definition at line 116 of file ConcatRowsSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KroneckerBaseKernel > &  o 
) [inline]

Definition at line 139 of file KroneckerBaseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ScaledGeneralizedDistanceRBFKernel > &  o 
) [inline]

Definition at line 79 of file ScaledGeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SequentialModelSelector &  o 
) [inline]

Definition at line 187 of file SequentialModelSelector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ManualBinner > &  o 
) [inline]

Definition at line 116 of file ManualBinner.h.

PStream & PLearn::operator>> ( PStream &  in,
PTester &  o 
) [inline]

Definition at line 133 of file PExperiment.h.

PStream& PLearn::operator>> ( PStream &  in,
WPLS *&  o 
) [inline]

Definition at line 185 of file WPLS.h.

PStream& PLearn::operator>> ( PStream &  in,
RunObject *&  o 
) [inline]

Definition at line 122 of file RunObject.h.

PStream& PLearn::operator>> ( PStream &  in,
FixDond2BinaryVariables &  o 
) [inline]

Definition at line 137 of file FixDond2BinaryVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
RankingFromKernel *&  o 
) [inline]

Definition at line 179 of file RankingFromKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LocalizedFeaturesLayerVariable > &  o 
) [inline]

Definition at line 115 of file LocalizedFeaturesLayerVariable.h.

PStream & PLearn::operator>> ( PStream &  in,
PTester *&  o 
) [inline]

Definition at line 133 of file PExperiment.h.

PStream& PLearn::operator>> ( PStream &  in,
LogAddVariable &  o 
) [inline]

Definition at line 108 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SelectedOutputCostFunction > &  o 
) [inline]

Definition at line 82 of file SelectedOutputCostFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Train > &  o 
) [inline]

Definition at line 122 of file Train.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatColumnsVMatrix > &  o 
) [inline]

Definition at line 113 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodConditionalMean &  o 
) [inline]

Definition at line 233 of file NeighborhoodConditionalMean.h.

PStream& PLearn::operator>> ( PStream &  in,
GenerateDecisionPlot &  o 
) [inline]

Definition at line 115 of file GenerateDecisionPlot.h.

PStream& PLearn::operator>> ( PStream &  in,
LogSoftmaxVariable &  o 
) [inline]

Definition at line 80 of file LogSoftmaxVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< LogSoftmaxVariable > &  o 
) [inline]

Definition at line 80 of file LogSoftmaxVariable.h.

{
PStream & PLearn::operator>> ( PStream &  in,
RBMMixedLayer *&  o 
) [inline]

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassifierFromDensity *&  o 
) [inline]

Definition at line 146 of file ClassifierFromDensity.h.

PStream& PLearn::operator>> ( PStream &  in,
MeshMatch *&  o 
) [inline]

Definition at line 131 of file MeshMatch.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MergeDond2Files > &  o 
) [inline]

Definition at line 188 of file MergeDond2Files.h.

PStream& PLearn::operator>> ( PStream &  in,
DilogarithmVariable *&  o 
) [inline]

Definition at line 73 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< NegCrossEntropySigmoidVariable > &  o 
) [inline]

Definition at line 87 of file NegCrossEntropySigmoidVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< GenerateDecisionPlot > &  o 
) [inline]

Definition at line 115 of file GenerateDecisionPlot.h.

PStream& PLearn::operator>> ( PStream &  in,
CompactFileVMatrix &  o 
) [inline]

Definition at line 181 of file CompactFileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AnalyzeDond2DiscreteVariables > &  o 
) [inline]

Definition at line 123 of file AnalyzeDond2DiscreteVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
ParentableObject &  o 
) [inline]

Definition at line 160 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
MaxSubsamplingTest &  o 
) [inline]

Definition at line 136 of file MaxSubsamplingTest.h.

PStream& PLearn::operator>> ( PStream &  in,
NLLNeighborhoodWeightsVariable *&  o 
) [inline]

Definition at line 129 of file NLLNeighborhoodWeightsVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
MarginPerceptronCostVariable &  o 
) [inline]

Definition at line 81 of file MarginPerceptronCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
IIDNoiseKernel &  o 
) [inline]

Definition at line 146 of file IIDNoiseKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressorFromDistribution > &  o 
) [inline]

Definition at line 174 of file RegressorFromDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
CompressedVMatrix *&  o 
) [inline]

Definition at line 122 of file CompressedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PLCheckTest > &  o 
) [inline]

Definition at line 126 of file PLCheckTest.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixAffineTransformFeedbackVariable &  o 
) [inline]

Definition at line 75 of file MatrixAffineTransformFeedbackVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeshGraph > &  o 
) [inline]

Definition at line 129 of file MeshGraph.h.

PStream& PLearn::operator>> ( PStream &  in,
TangentLearner &  o 
) [inline]

Definition at line 206 of file TangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixAffineTransformFeedbackVariable > &  o 
) [inline]

Definition at line 75 of file MatrixAffineTransformFeedbackVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixAffineTransformVariable &  o 
) [inline]

Definition at line 76 of file MatrixAffineTransformVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
CompactFileVMatrix *&  o 
) [inline]

Definition at line 181 of file CompactFileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KPCATangentLearner > &  o 
) [inline]

Definition at line 179 of file KPCATangentLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixAffineTransformVariable > &  o 
) [inline]

Definition at line 76 of file MatrixAffineTransformVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixElementsVariable &  o 
) [inline]

Definition at line 92 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
PStream& PLearn::operator>> ( PStream &  in,
LLE &  o 
) [inline]

Definition at line 127 of file LLE.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PyPLearnScript > &  o 
) [inline]

Definition at line 183 of file PyPLearnScript.h.

{ time_t d=0; return smartLoadObject(filepath, args, d); }
PStream& PLearn::operator>> ( PStream &  in,
PyPLearnScript &  o 
) [inline]

Definition at line 183 of file PyPLearnScript.h.

{ time_t d=0; return smartLoadObject(filepath, args, d); }
PStream & PLearn::operator>> ( PStream &  in,
NatGradEstimator &  o 
) [inline]

Definition at line 192 of file NatGradItEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixElementsVariable > &  o 
) [inline]

Definition at line 92 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
PStream& PLearn::operator>> ( PStream &  in,
AutoScaledGradientOptimizer *&  o 
) [inline]

Definition at line 124 of file AutoScaledGradientOptimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatRowsSubVMatrix &  o 
) [inline]

Definition at line 116 of file ConcatRowsSubVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Experiment *&  o 
) [inline]

Definition at line 108 of file Experiment.h.

PStream& PLearn::operator>> ( PStream &  in,
DiagonalizedFactorsProductVariable *&  o 
) [inline]

Definition at line 85 of file DiagonalizedFactorsProductVariable.h.

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }
PStream& PLearn::operator>> ( PStream &  in,
ConcatColumnsVMatrix &  o 
) [inline]

Definition at line 113 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
PStream& PLearn::operator>> ( PStream &  in,
ConcatColumnsVMatrix *&  o 
) [inline]

Definition at line 113 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< CompactFileVMatrix > &  o 
) [inline]

Definition at line 181 of file CompactFileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CompressedVMatrix > &  o 
) [inline]

Definition at line 122 of file CompressedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CompressedVMatrix &  o 
) [inline]

Definition at line 122 of file CompressedVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Experiment &  o 
) [inline]

Definition at line 108 of file Experiment.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MultiClassAdaBoost > &  o 
) [inline]

Definition at line 220 of file MultiClassAdaBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MultiSampleVariable > &  o 
) [inline]

Definition at line 142 of file MultiSampleVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MinusTransposedColumnVariable *&  o 
) [inline]

Definition at line 74 of file MinusTransposedColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransformationLearner > &  o 
) [inline]

Definition at line 917 of file TransformationLearner.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
priority_queue< T > &  v 
) [inline]

Definition at line 1600 of file PStream.h.

References in, and readPriorityQueue().

{ readPriorityQueue(in, v); return in; }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PLearner *&  o 
) [inline]

Definition at line 727 of file PLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassSubsetVMatrix > &  o 
) [inline]

Definition at line 132 of file ClassSubsetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassSubsetVMatrix *&  o 
) [inline]

Definition at line 132 of file ClassSubsetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixOneHotSquaredLoss &  o 
) [inline]

Definition at line 78 of file MatrixOneHotSquaredLoss.h.

PStream& PLearn::operator>> ( PStream &  in,
IfThenElseVariable &  o 
) [inline]

Definition at line 84 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
PStream& PLearn::operator>> ( PStream &  in,
ClassSeparationSplitter &  o 
) [inline]

Definition at line 143 of file ClassSeparationSplitter.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
TMat< T > &  m 
)

Definition at line 962 of file TMat_impl.h.

References in, and PLearn::TMat< T >::read().

{
    m.read(in);
    return in;
}

Here is the call graph for this function:

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
set< T > &  v 
) [inline]

Definition at line 1550 of file PStream.h.

References in, and readSet().

{ readSet(in, v); return in; }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
MatrixOneHotSquaredLoss *&  o 
) [inline]

Definition at line 78 of file MatrixOneHotSquaredLoss.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiClassAdaBoost &  o 
) [inline]

Definition at line 220 of file MultiClassAdaBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryVariable > &  o 
) [inline]

Definition at line 101 of file BinaryVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MultiClassAdaBoost *&  o 
) [inline]

Definition at line 220 of file MultiClassAdaBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
DeterminantVariable *&  o 
) [inline]

Definition at line 76 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
PStream& PLearn::operator>> ( PStream &  in,
PP< UnfoldedFuncVariable > &  o 
) [inline]

Definition at line 93 of file UnfoldedFuncVariable.h.

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }
template<class T , class U >
void PLearn::operator>> ( const TMat< T > &  m1,
const TVec< U > &  m2 
) [inline]

copy TMat >> Tvec

Definition at line 836 of file TMat_impl.h.

{ m2 << m1; }
PStream& PLearn::operator>> ( PStream &  in,
StackedLearner *&  o 
) [inline]

Definition at line 221 of file StackedLearner.h.

template<class T , class U >
void PLearn::operator>> ( const TMat< T > &  m1,
const TMat< U > &  m2 
) [inline]

copy TMat >> TMat

Definition at line 826 of file TMat_impl.h.

{ m2 << m1; }
PStream& PLearn::operator>> ( PStream &  in,
PLStringutilsTest &  o 
) [inline]

Definition at line 126 of file PLStringutilsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixSoftmaxLossVariable &  o 
) [inline]

Definition at line 77 of file MatrixSoftmaxLossVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryKernelDiscrimination &  o 
) [inline]

Definition at line 146 of file BinaryKernelDiscrimination.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CompareLearner > &  o 
) [inline]

Definition at line 171 of file CompareLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
Correspondence &  o 
) [inline]

Definition at line 117 of file Correspondence.h.

PStream& PLearn::operator>> ( PStream &  in,
VBoundDBN2 &  o 
) [inline]

Definition at line 297 of file VBoundDBN2.h.

PStream& PLearn::operator>> ( PStream &  in,
CompareLearner *&  o 
) [inline]

Definition at line 171 of file CompareLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CenteredVMatrix > &  o 
) [inline]

Definition at line 120 of file CenteredVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearRegressor &  o 
) [inline]

Definition at line 210 of file LinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryNumbersVMatrix *&  o 
) [inline]

Definition at line 146 of file BinaryNumbersVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassSeparationSplitter *&  o 
) [inline]

Definition at line 143 of file ClassSeparationSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
MatrixSoftmaxVariable *&  o 
) [inline]

Definition at line 71 of file MatrixSoftmaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoVMatrixSaveSource &  o 
) [inline]

Definition at line 90 of file AutoVMatrixSaveSource.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NnlmOutputLayer > &  o 
) [inline]

Definition at line 334 of file NnlmOutputLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AutoVMatrix > &  o 
) [inline]

Definition at line 103 of file AutoVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BasisSelectionRegressor *&  o 
) [inline]

Definition at line 248 of file BasisSelectionRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MatrixSoftmaxVariable > &  o 
) [inline]

Definition at line 71 of file MatrixSoftmaxVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AsciiVMatrix > &  o 
) [inline]

Definition at line 115 of file AsciiVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepNonLocalManifoldParzen *&  o 
) [inline]

Definition at line 353 of file DeepNonLocalManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
DenoisingRecurrentNet &  o 
) [inline]

Definition at line 524 of file DenoisingRecurrentNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MaxSubsamplingTest > &  o 
) [inline]

Definition at line 136 of file MaxSubsamplingTest.h.

PStream& PLearn::operator>> ( PStream &  in,
TanhModule *&  o 
) [inline]

Definition at line 137 of file TanhModule.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNRegressor &  o 
) [inline]

Definition at line 195 of file KNNRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RemoveObservationTest > &  o 
) [inline]

Definition at line 111 of file RemoveObservationTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AddMissingVMatrix > &  o 
) [inline]

Definition at line 131 of file AddMissingVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
MeshGraph &  o 
) [inline]

Definition at line 129 of file MeshGraph.h.

PStream& PLearn::operator>> ( PStream &  in,
MeshGraph *&  o 
) [inline]

Definition at line 129 of file MeshGraph.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BaggingLearner > &  o 
) [inline]

Definition at line 154 of file BaggingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
AddBagInformationVMatrix *&  o 
) [inline]

Definition at line 126 of file AddBagInformationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
TestLearner &  o 
) [inline]

Definition at line 176 of file TestLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearInductiveTransferClassifier *&  o 
) [inline]

Definition at line 283 of file LinearInductiveTransferClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
BaggingLearner *&  o 
) [inline]

Definition at line 154 of file BaggingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TMatTest *&  o 
) [inline]

Definition at line 139 of file TMatTest.h.

PStream& PLearn::operator>> ( PStream &  in,
TMatTest &  o 
) [inline]

Definition at line 139 of file TMatTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ObservationWindow *&  o 
) [inline]

Definition at line 143 of file ObservationWindow.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PseudolikelihoodRBM > &  o 
) [inline]

Definition at line 437 of file PseudolikelihoodRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldKNNDistribution *&  o 
) [inline]

Definition at line 198 of file ManifoldKNNDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VarRowVariable > &  o 
) [inline]

Definition at line 78 of file VarRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
TestInTrainSplitter *&  o 
) [inline]

Definition at line 153 of file TestInTrainSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Kernel > &  o 
) [inline]

Definition at line 270 of file Kernel.h.

: public PP<Kernel>
PStream& PLearn::operator>> ( PStream &  in,
KernelProjection &  o 
) [inline]

Definition at line 189 of file KernelProjection.h.

PStream& PLearn::operator>> ( PStream &  in,
VarRowsVariable *&  o 
) [inline]

Definition at line 79 of file VarRowsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperCommand *&  o 
) [inline]

Definition at line 132 of file HyperCommand.h.

PStream& PLearn::operator>> ( PStream &  in,
DiscriminativeRBM &  o 
) [inline]

Definition at line 311 of file DiscriminativeRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Variable > &  o 
) [inline]

Definition at line 485 of file Variable.h.

PStream& PLearn::operator>> ( PStream &  in,
EntropyContrastLearner &  o 
) [inline]

Definition at line 218 of file EntropyContrastLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PentaTest *&  o 
) [inline]

Definition at line 130 of file PentaTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UniformVMatrix > &  o 
) [inline]

Definition at line 80 of file UniformVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
VarElementVariable *&  o 
) [inline]

Definition at line 82 of file VarElementVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
VarElementVariable &  o 
) [inline]

Definition at line 82 of file VarElementVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
Max2Variable &  o 
) [inline]

Definition at line 78 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
Max2Variable *&  o 
) [inline]

Definition at line 78 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
PP< MiniBatchClassificationLossVariable > &  o 
) [inline]

Definition at line 75 of file MiniBatchClassificationLossVariable.h.

template<class T >
istream& PLearn::operator>> ( istream &  in,
const TVec< T > &  v 
) [inline]

Definition at line 216 of file TVec_impl.h.

References in, and PLearn::TVec< T >::input().

{ 
    v.input(in);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
FeatureSetSequentialCRF &  o 
) [inline]

Definition at line 434 of file FeatureSetSequentialCRF.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperSetOption *&  o 
) [inline]

Definition at line 115 of file HyperSetOption.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedDistance *&  o 
) [inline]

Definition at line 83 of file WeightedDistance.h.

PStream& PLearn::operator>> ( PStream &  in,
MaxVariable &  o 
) [inline]

Definition at line 70 of file MaxVariable.h.

{ return new MaxVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< EmpiricalDistribution > &  o 
) [inline]

Definition at line 101 of file EmpiricalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IncrementalNNet > &  o 
) [inline]

Definition at line 254 of file IncrementalNNet.h.

void PLearn::operator>> ( VarArray &  ar,
const Array< Vec > &  values 
)

Definition at line 1207 of file VarArray.cc.

References n, PLERROR, and PLearn::TVec< T >::size().

{
    int n = ar.size();
    if(values.size()!=n)
        PLERROR("In operator<<(VarArray&, const Array<Vec>&) sizes of arrays differ (VarArray:%d Array<Vec>:%d)",ar.size(),values.size());
    for(int k=0; k<n; k++)
    {
        Vec& ar_v = ar[k]->value;
        Vec& v = values[k];
        if(ar_v.size() != v.size())
            PLERROR("In operator<<(VarArray&, const Array<Vec>&) sizes of var array and vector differ.  "
                    "(VarArray length:%d, in Array<Vec>, Vec length:%d)",ar_v.size(),v.size());
        ar_v >> v;
    }
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
MeshEdge &  o 
) [inline]

Definition at line 120 of file MeshEdge.h.

PStream& PLearn::operator>> ( PStream &  in,
WordNetFeatureSet &  o 
) [inline]

Definition at line 113 of file WordNetFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftStatsCollector *&  o 
) [inline]

Definition at line 170 of file LiftStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
MeshEdge *&  o 
) [inline]

Definition at line 120 of file MeshEdge.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CCCostVariable > &  o 
) [inline]

Definition at line 97 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
PStream& PLearn::operator>> ( PStream &  in,
TreeDBNModule *&  o 
) [inline]

Definition at line 372 of file TreeDBNModule.h.

PStream& PLearn::operator>> ( PStream &  in,
LiftStatsCollector &  o 
) [inline]

Definition at line 170 of file LiftStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
SequentialValidation *&  o 
) [inline]

Definition at line 265 of file SequentialValidation.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ByteMemoryVMatrix > &  o 
) [inline]

Definition at line 80 of file ByteMemoryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
MiniBatchClassificationLossVariable &  o 
) [inline]

Definition at line 75 of file MiniBatchClassificationLossVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ICP &  o 
) [inline]

Definition at line 205 of file ICP.h.

PStream& PLearn::operator>> ( PStream &  in,
LocalMedBoost &  o 
) [inline]

Definition at line 162 of file LocalMedBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NGramDistribution > &  o 
) [inline]

Definition at line 182 of file NGramDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
GradientCorrector *&  o 
) [inline]

Definition at line 132 of file GradientCorrector.h.

PStream& PLearn::operator>> ( PStream &  in,
CutBelowThresholdVariable &  o 
) [inline]

Definition at line 74 of file CutBelowThresholdVariable.h.

{ return new CutBelowThresholdVariable(v,threshold); }
PStream& PLearn::operator>> ( PStream &  in,
LinearInductiveTransferClassifier &  o 
) [inline]

Definition at line 283 of file LinearInductiveTransferClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
LimitedGaussianSmoother *&  o 
) [inline]

Definition at line 128 of file LimitedGaussianSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NnlmOnlineLearner > &  o 
) [inline]

Definition at line 280 of file NnlmOnlineLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
BootstrapSplitter &  o 
) [inline]

Definition at line 136 of file BootstrapSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
MeshFace &  o 
) [inline]

Definition at line 142 of file MeshFace.h.

PStream& PLearn::operator>> ( PStream &  in,
SurfaceTemplateLearner *&  o 
) [inline]

Definition at line 148 of file SurfaceTemplateLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PLearnerDiagonalKernel &  o 
) [inline]

Definition at line 127 of file PLearnerDiagonalKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
NegOutputCostFunction &  o 
) [inline]

Definition at line 67 of file NegOutputCostFunction.h.

{ return new NegOutputCostFunction(); }
PStream& PLearn::operator>> ( PStream &  in,
SVMClassificationTorch &  o 
) [inline]

Definition at line 161 of file SVMClassificationTorch.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UnequalConstantVariable > &  o 
) [inline]

Definition at line 78 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
PStream& PLearn::operator>> ( PStream &  in,
IdentityVariable *&  o 
) [inline]

Definition at line 61 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
UnequalConstantVariable &  o 
) [inline]

Definition at line 78 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
PStream& PLearn::operator>> ( PStream &  in,
VecStatsCollector *&  o 
) [inline]

Definition at line 338 of file VecStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MinusColumnVariable > &  o 
) [inline]

Definition at line 75 of file MinusColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SpiralDistribution > &  o 
) [inline]

Definition at line 145 of file SpiralDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
BootstrapVMatrix &  o 
) [inline]

Definition at line 102 of file BootstrapVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ColumnIndexVariable *&  o 
) [inline]

Definition at line 75 of file ColumnIndexVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
UnaryHardSlopeVariable &  o 
) [inline]

Definition at line 81 of file UnaryHardSlopeVariable.h.

{ return new UnaryHardSlopeVariable(v,l,r); }
template<class ParentT >
PStream& PLearn::operator>> ( PStream &  in,
TypedParentableObject< ParentT > &  o 
) [inline]

Definition at line 213 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransposeVariable > &  o 
) [inline]

Definition at line 36 of file TransposeVariable.h.

{ return new TransposeVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ShiftAndRescaleFeatureRealFunction &  o 
) [inline]

Definition at line 119 of file ShiftAndRescaleFeatureRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
BootstrapVMatrix *&  o 
) [inline]

Definition at line 102 of file BootstrapVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
VPLCombinedLearner *&  o 
) [inline]

Definition at line 183 of file VPLCombinedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
BootstrapSplitter *&  o 
) [inline]

Definition at line 136 of file BootstrapSplitter.h.

template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator>> ( PStream &  in,
hash_map< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1067 of file PStream.h.

References in, and readMap().

{
    readMap(in, m);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
MaxStatsIterator *&  o 
) [inline]

Definition at line 300 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
ScaledConditionalCDFSmoother &  o 
) [inline]

Definition at line 129 of file ScaledConditionalCDFSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesVariable &  o 
) [inline]

Definition at line 75 of file TimesVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
CutAboveThresholdVariable *&  o 
) [inline]

Definition at line 74 of file CutAboveThresholdVariable.h.

{ return new CutAboveThresholdVariable(v,threshold); }
template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator>> ( PStream &  in,
multimap< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1050 of file PStream.h.

References in, and readMap().

{
    readMap(in, m);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ColumnIndexVariable &  o 
) [inline]

Definition at line 75 of file ColumnIndexVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< MinusRowVariable > &  o 
) [inline]

Definition at line 75 of file MinusRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TimesRowVariable > &  o 
) [inline]

Definition at line 80 of file TimesRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VPLPreprocessedLearner > &  o 
) [inline]

Definition at line 197 of file VPLPreprocessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesRowVariable &  o 
) [inline]

Definition at line 80 of file TimesRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RealValueIndicatorFunction > &  o 
) [inline]

Definition at line 116 of file RealValueIndicatorFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
CopiesMap &   
) [inline]

Definition at line 1015 of file PStream.h.

References in, and PLERROR.

{
    PLERROR("PLearn::CopiesMap cannot be serialized.");
    return in;
}
PStream& PLearn::operator>> ( PStream &  in,
VPLPreprocessedLearner2 &  o 
) [inline]

Definition at line 215 of file VPLPreprocessedLearner2.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesConstantVariable &  o 
) [inline]

Definition at line 87 of file TimesConstantVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< CutAboveThresholdVariable > &  o 
) [inline]

Definition at line 74 of file CutAboveThresholdVariable.h.

{ return new CutAboveThresholdVariable(v,threshold); }
PStream& PLearn::operator>> ( PStream &  in,
PP< RealRangeIndicatorFunction > &  o 
) [inline]

Definition at line 117 of file RealRangeIndicatorFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesColumnVariable *&  o 
) [inline]

Definition at line 80 of file TimesColumnVariable.h.

template<class T , class U >
void PLearn::operator>> ( const TVec< T > &  m1,
const TMat< U > &  m2 
) [inline]

copy TVec >> TMat

Definition at line 831 of file TMat_impl.h.

{ m2 << m1; }
PStream& PLearn::operator>> ( PStream &  in,
RealRangeIndicatorFunction *&  o 
) [inline]

Definition at line 117 of file RealRangeIndicatorFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
RealRangeIndicatorFunction &  o 
) [inline]

Definition at line 117 of file RealRangeIndicatorFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
PPointableSet &  pp_set 
) [inline]

Definition at line 19 of file Set.h.

References in.

{ in >> static_cast<set<int> &>(pp_set); return in; }
PStream& PLearn::operator>> ( PStream &  in,
PP< RealFunctionProduct > &  o 
) [inline]

Definition at line 116 of file RealFunctionProduct.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BootstrapSplitter > &  o 
) [inline]

Definition at line 136 of file BootstrapSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
VarUtilsTest &  o 
) [inline]

Definition at line 130 of file VarUtilsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionProduct *&  o 
) [inline]

Definition at line 116 of file RealFunctionProduct.h.

PStream& PLearn::operator>> ( PStream &  in,
VariablesTest *&  o 
) [inline]

Definition at line 122 of file VariablesTest.h.

PStream& PLearn::operator>> ( PStream &  in,
VecStatsCollector &  o 
) [inline]

Definition at line 338 of file VecStatsCollector.h.

PStream& PLearn::operator>> ( PStream &  in,
VPLProcessor *&  o 
) [inline]

Definition at line 177 of file VPLProcessor.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RealFunctionOfInputFeature > &  o 
) [inline]

Definition at line 121 of file RealFunctionOfInputFeature.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
const T *&  x 
) [inline]

Definition at line 845 of file PStream.h.

References in, and PLERROR.

{
    PLERROR("operator>>(PStream&, const T*&) should never be used! (object pointed is const)");
    return in;
}
template<class ParentT >
PStream& PLearn::operator>> ( PStream &  in,
TypedParentableObject< ParentT > *&  o 
) [inline]

Definition at line 213 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NetworkModule > &  o 
) [inline]

Definition at line 185 of file NetworkModule.h.

PStream& PLearn::operator>> ( PStream &  in,
QuadraticUtilityCostFunction *&  o 
) [inline]

Definition at line 83 of file QuadraticUtilityCostFunction.h.

{
template<class T >
PStream& PLearn::operator>> ( PStream &  in,
T *&  x 
) [inline]

Definition at line 757 of file PStream.h.

References PLearn::PStream::copies_map_in, PLearn::PStream::get(), in, PLearn::PStream::peek(), PLERROR, PLearn::PStream::skipBlanksAndCommentsAndSeparators(), and x.

{

    in.skipBlanksAndCommentsAndSeparators();
    if (in.peek() == '*')
    {
        in.get(); // Eat '*'
        unsigned int id;
        in >> id;
        // don't skip blanks before we need to read something else
        // (read might block).
        //in.skipBlanksAndCommentsAndSeparators();
        if (id==0)
            x = 0;
        else
        {
            in.skipBlanksAndCommentsAndSeparators();
            if (in.peek() == '-')
            {
                in.get(); // Eat '-'
                char cc = in.get();
                if(cc != '>') // Eat '>'
                    PLERROR("In PStream::operator>>(T*&)  Wrong format.  Expecting \"*%d->\" but got \"*%d-%c\".", id, id, cc);
                // don't skip blanks before we need to read something else
                // (read might block).
                //in.skipBlanksAndCommentsAndSeparators();
                if(!x)
                    x = new T();
                in.skipBlanksAndCommentsAndSeparators();
                in >> *x;
                // don't skip blanks before we need to read something else
                // (read might block).
                //in.skipBlanksAndCommentsAndSeparators();
                in.copies_map_in[id]= x;
            }
            else
            {
                // Find it in map and return ptr;
                map<unsigned int, void *>::iterator it =
                    in.copies_map_in.find(id);
                if (it == in.copies_map_in.end())
                    PLERROR("In PStream::operator>>(T*&) object (ptr) to be read with id='%d' "
                            "has not been previously defined", id);
                x = static_cast<T *>(it->second);
            }
        }
    }
    else
    {
        in >> *x;
        // don't skip blanks before we need to read something else
        // (read might block).
        //in.skipBlanksAndCommentsAndSeparators();
    }

    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< RealFunctionFromKernel > &  o 
) [inline]

Definition at line 120 of file RealFunctionFromKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumVariable > &  o 
) [inline]

Definition at line 77 of file SumVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
SumVariable &  o 
) [inline]

Definition at line 77 of file SumVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< PythonFeatureSet > &  o 
) [inline]

Definition at line 109 of file PythonFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionFromKernel &  o 
) [inline]

Definition at line 120 of file RealFunctionFromKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SumSquareVariable *&  o 
) [inline]

Definition at line 71 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SumSquareVariable &  o 
) [inline]

Definition at line 71 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodBoxVolumeDensityEstimator *&  o 
) [inline]

Definition at line 147 of file NeighborhoodBoxVolumeDensityEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumOverBagsVariable > &  o 
) [inline]

Definition at line 121 of file SumOverBagsVariable.h.

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }
PStream& PLearn::operator>> ( PStream &  in,
RealFunction &  o 
) [inline]

Definition at line 129 of file RealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
IncrementalNNet &  o 
) [inline]

Definition at line 254 of file IncrementalNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
CartesianProductOracle &  o 
) [inline]

Definition at line 111 of file CartesianProductOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
MinusVariable *&  o 
) [inline]

Definition at line 75 of file MinusVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< IsMissingVariable > &  o 
) [inline]

Definition at line 96 of file IsMissingVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
SumOfVariable &  o 
) [inline]

Definition at line 158 of file SumOfVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
NeuralProbabilisticLanguageModel *&  o 
) [inline]

Definition at line 465 of file NeuralProbabilisticLanguageModel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SumAbsVariable > &  o 
) [inline]

Definition at line 71 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ParzenWindow *&  o 
) [inline]

Definition at line 113 of file ParzenWindow.h.

PStream& PLearn::operator>> ( PStream &  in,
AddCostToLearner &  o 
) [inline]

Definition at line 228 of file AddCostToLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
BinSplitter *&  o 
) [inline]

Definition at line 131 of file BinSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MemoryStressTest > &  o 
) [inline]

Definition at line 139 of file MemoryStressTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SubsampleVariable &  o 
) [inline]

Definition at line 79 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
PStream& PLearn::operator>> ( PStream &  in,
MinVariable &  o 
) [inline]

Definition at line 68 of file MinVariable.h.

{ return new MinVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SubMatVariable > &  o 
) [inline]

Definition at line 104 of file SubMatVariable.h.

{
PStream & PLearn::operator>> ( PStream &  in,
PPath &  path 
)

Definition at line 171 of file PPath.cc.

References in, PLearn::PStream::inmode, PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLERROR, PLearn::PStream::pretty_ascii, and PLearn::PStream::raw_ascii.

{
    string spath;
    in >> spath;
    switch (in.inmode) {
    case PStream::raw_ascii:
    case PStream::pretty_ascii:
    case PStream::plearn_ascii:
    case PStream::plearn_binary:
    {
        path = PPath(spath);
        break;
    }
    default:
        PLERROR("In operator>> - This PStream mode is not supported for PPath");
    }
    return in;
}
PStream& PLearn::operator>> ( PStream &  in,
SubMatVariable &  o 
) [inline]

Definition at line 104 of file SubMatVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< PreprocessingVMatrix > &  o 
) [inline]

Definition at line 198 of file VMatLanguage.h.

:1125)
PStream& PLearn::operator>> ( PStream &  in,
PP< SubMatTransposeVariable > &  o 
) [inline]

Definition at line 88 of file SubMatTransposeVariable.h.

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }
PStream& PLearn::operator>> ( PStream &  in,
PP< BinSplitter > &  o 
) [inline]

Definition at line 131 of file BinSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
NLLNeighborhoodWeightsVariable &  o 
) [inline]

Definition at line 129 of file NLLNeighborhoodWeightsVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeRegisters &  o 
) [inline]

Definition at line 196 of file RegressionTreeRegisters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AddCostToLearner > &  o 
) [inline]

Definition at line 228 of file AddCostToLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedSumSquareVariable *&  o 
) [inline]

Definition at line 78 of file WeightedSumSquareVariable.h.

{ return new WeightedSumSquareVariable(v,w); }
PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeQueue *&  o 
) [inline]

Definition at line 94 of file RegressionTreeQueue.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SquareRootVariable > &  o 
) [inline]

Definition at line 71 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
PStream& PLearn::operator>> ( PStream &  in,
PP< KMeansClustering > &  o 
) [inline]

Definition at line 132 of file KMeansClustering.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MulticlassLossVariable > &  o 
) [inline]

Definition at line 79 of file MulticlassLossVariable.h.

{ return new MulticlassLossVariable(network_output, targets); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SparseIncrementalAffineTransformVariable > &  o 
) [inline]

Definition at line 109 of file SparseIncrementalAffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
SparseIncrementalAffineTransformVariable *&  o 
) [inline]

Definition at line 109 of file SparseIncrementalAffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
SparseIncrementalAffineTransformVariable &  o 
) [inline]

Definition at line 109 of file SparseIncrementalAffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
GeneralizedDistanceRBFKernel *&  o 
) [inline]

Definition at line 76 of file GeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatOfVariable &  o 
) [inline]

Definition at line 85 of file ConcatOfVariable.h.

{ return new ConcatOfVariable(distr,f); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PLS > &  o 
) [inline]

Definition at line 192 of file PLS.h.

PStream& PLearn::operator>> ( PStream &  in,
NnlmOutputLayer &  o 
) [inline]

Definition at line 334 of file NnlmOutputLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
ScaledGaussianKernel *&  o 
) [inline]

Definition at line 80 of file ScaledGaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftSlopeVariable > &  o 
) [inline]

Definition at line 79 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
PStream& PLearn::operator>> ( PStream &  in,
ObservationWindow &  o 
) [inline]

Definition at line 143 of file ObservationWindow.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NegateElementsVariable > &  o 
) [inline]

Definition at line 82 of file NegateElementsVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
StepwiseSelectionOracle *&  o 
) [inline]

Definition at line 145 of file StepwiseSelectionOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
PRandom &  o 
) [inline]

Definition at line 307 of file PRandom.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryOpVMatrix > &  o 
) [inline]

Definition at line 121 of file BinaryOpVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PseudolikelihoodRBM &  o 
) [inline]

Definition at line 437 of file PseudolikelihoodRBM.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StepwiseSelectionOracle > &  o 
) [inline]

Definition at line 145 of file StepwiseSelectionOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConcatOfVariable > &  o 
) [inline]

Definition at line 85 of file ConcatOfVariable.h.

{ return new ConcatOfVariable(distr,f); }
PStream& PLearn::operator>> ( PStream &  in,
SoftplusVariable &  o 
) [inline]

Definition at line 77 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
ManualBinner &  o 
) [inline]

Definition at line 116 of file ManualBinner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftmaxVariable > &  o 
) [inline]

Definition at line 72 of file SoftmaxVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ExplicitListOracle > &  o 
) [inline]

Definition at line 118 of file ExplicitListOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryNumbersVMatrix > &  o 
) [inline]

Definition at line 146 of file BinaryNumbersVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftmaxLossVariable > &  o 
) [inline]

Definition at line 77 of file SoftmaxLossVariable.h.

{ 
template<class ParentT >
PStream& PLearn::operator>> ( PStream &  in,
PP< TypedParentableObject< ParentT > > &  o 
) [inline]

Definition at line 213 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftmaxLossVariable &  o 
) [inline]

Definition at line 77 of file SoftmaxLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
GaussMixLocalProjections *&  o 
) [inline]

Definition at line 165 of file GaussMixLocalProjections.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NegKernel > &  o 
) [inline]

Definition at line 74 of file NegKernel.h.

{ return new NegKernel(k); }
PStream& PLearn::operator>> ( PStream &  in,
PP< OracleObjectGenerator > &  o 
) [inline]

Definition at line 102 of file OracleObjectGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
NegLogPoissonVariable &  o 
) [inline]

Definition at line 81 of file NegLogPoissonVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< SigmoidVariable > &  o 
) [inline]

Definition at line 71 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
StackedSVDNet &  o 
) [inline]

Definition at line 270 of file StackedSVDNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ConfRatedAdaboostCostVariable > &  o 
) [inline]

Definition at line 74 of file ConfRatedAdaboostCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< NGramTree > &  o 
) [inline]

Definition at line 145 of file NGramTree.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SemiSupervisedProbClassCostVariable > &  o 
) [inline]

Definition at line 127 of file SemiSupervisedProbClassCostVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SemiSupervisedProbClassCostVariable *&  o 
) [inline]

Definition at line 127 of file SemiSupervisedProbClassCostVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
OracleObjectGenerator &  o 
) [inline]

Definition at line 102 of file OracleObjectGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedAutoassociatorsNet *&  o 
) [inline]

Definition at line 595 of file StackedAutoassociatorsNet.h.

PStream& PLearn::operator>> ( PStream &  in,
RowSumVariable *&  o 
) [inline]

Definition at line 71 of file RowSumVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
StructuralLearner &  o 
) [inline]

Definition at line 244 of file StructuralLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
OracleObjectGenerator *&  o 
) [inline]

Definition at line 102 of file OracleObjectGenerator.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RowSumSquareVariable > &  o 
) [inline]

Definition at line 75 of file RowSumSquareVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
RowSumSquareVariable &  o 
) [inline]

Definition at line 75 of file RowSumSquareVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
SurfaceMesh &  o 
) [inline]

Definition at line 227 of file SurfaceMesh.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RowOfVariable > &  o 
) [inline]

Definition at line 84 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
PStream& PLearn::operator>> ( PStream &  in,
Optimizer *&  o 
) [inline]

Definition at line 181 of file Optimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
NllGeneralGaussianVariable *&  o 
) [inline]

Definition at line 103 of file NllGeneralGaussianVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< RowAtPositionVariable > &  o 
) [inline]

Definition at line 87 of file RowAtPositionVariable.h.

template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
PStream& PLearn::operator>> ( PStream &  in,
tuple< T1, T2, T3, T4, T5, T6 > &  t 
)

Definition at line 315 of file tuple.h.

References in, PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{
    in.skipBlanksAndComments(); in.readExpected('('); 
    in.skipBlanksAndComments(); in >> get<0>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<1>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<2>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<3>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<4>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<5>(t); 
    in.skipBlanksAndComments(); in.readExpected(')');
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
RowAtPositionVariable &  o 
) [inline]

Definition at line 87 of file RowAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NllGeneralGaussianVariable &  o 
) [inline]

Definition at line 103 of file NllGeneralGaussianVariable.h.

{
template<class T1 , class T2 , class T3 , class T4 , class T5 >
PStream& PLearn::operator>> ( PStream &  in,
tuple< T1, T2, T3, T4, T5 > &  t 
)

Definition at line 302 of file tuple.h.

References in, PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{
    in.skipBlanksAndComments(); in.readExpected('('); 
    in.skipBlanksAndComments(); in >> get<0>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<1>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<2>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<3>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<4>(t); 
    in.skipBlanksAndComments(); in.readExpected(')');
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
RightPseudoInverseVariable *&  o 
) [inline]

Definition at line 74 of file RightPseudoInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
AsciiVMatrix *&  o 
) [inline]

Definition at line 115 of file AsciiVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ReshapeVariable > &  o 
) [inline]

Definition at line 81 of file ReshapeVariable.h.

{ return new ReshapeVariable(v,newlength,newwidth); }
template<class T1 , class T2 , class T3 , class T4 >
PStream& PLearn::operator>> ( PStream &  in,
tuple< T1, T2, T3, T4 > &  t 
)

Definition at line 290 of file tuple.h.

References in, PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{
    in.skipBlanksAndComments(); in.readExpected('('); 
    in.skipBlanksAndComments(); in >> get<0>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<1>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<2>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<3>(t); 
    in.skipBlanksAndComments(); in.readExpected(')');
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< HashMapFeatureSet > &  o 
) [inline]

Definition at line 143 of file HashMapFeatureSet.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RBMDistribution > &  o 
) [inline]

Definition at line 186 of file RBMDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ReIndexedTargetVariable > &  o 
) [inline]

Definition at line 103 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }
template<class T1 , class T2 , class T3 >
PStream& PLearn::operator>> ( PStream &  in,
tuple< T1, T2, T3 > &  t 
)

Definition at line 279 of file tuple.h.

References in, PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{
    in.skipBlanksAndComments(); in.readExpected('('); 
    in.skipBlanksAndComments(); in >> get<0>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<1>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<2>(t); 
    in.skipBlanksAndComments(); in.readExpected(')');
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ReIndexedTargetVariable &  o 
) [inline]

Definition at line 103 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }
PStream& PLearn::operator>> ( PStream &  in,
MoleculeTemplateLearner *&  o 
) [inline]

Definition at line 236 of file MoleculeTemplateLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussMixLocalProjections &  o 
) [inline]

Definition at line 165 of file GaussMixLocalProjections.h.

PStream& PLearn::operator>> ( PStream &  in,
RankLearner &  o 
) [inline]

Definition at line 178 of file RankLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
NllSemisphericalGaussianVariable &  o 
) [inline]

Definition at line 91 of file NllSemisphericalGaussianVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
HyperOptimize &  o 
) [inline]

Definition at line 194 of file HyperOptimize.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BestAveragingPLearner > &  o 
) [inline]

Definition at line 228 of file BestAveragingPLearner.h.

template<class T >
PStream& PLearn::operator>> ( PStream &  in,
TVec< T > &  v 
)

Definition at line 154 of file TVec_impl.h.

References in, and PLearn::TVec< T >::read().

{
    v.read(in);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
NegLogProbCostFunction *&  o 
) [inline]

Definition at line 95 of file NegLogProbCostFunction.h.

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs,outstart,outend); }
PStream& PLearn::operator>> ( PStream &  in,
ProductTransposeVariable &  o 
) [inline]

Definition at line 77 of file ProductTransposeVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< AffineTransformWeightPenalty > &  o 
) [inline]

Definition at line 111 of file AffineTransformWeightPenalty.h.

{ return new AffineTransformWeightPenalty(transformation, weight_decay, bias_decay, penalty_type); } 
PStream & PLearn::operator>> ( PStream &  in,
PDate &  date 
)

De-serialization from PStream.

Definition at line 307 of file PDate.cc.

References c, PLearn::PDate::day, double_to_date(), in, PLearn::PDate::month, PLearn::PStream::peek(), PLERROR, PLearn::PStream::readAsciiNum(), PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PDate::year.

{
    in.skipBlanksAndComments();
    int c = in.peek();
    if(c==0xFE) // binary PDate
    {
        double yyyymmdd;
        in >> yyyymmdd;
        date = double_to_date(yyyymmdd);
    }
    else if(isdigit(c))
    {
        in.readAsciiNum(date.year);
        in.readExpected('/');
        in.readAsciiNum(date.month);
        in.readExpected('/');
        in.readAsciiNum(date.day);
    }
    else
        PLERROR("Not a valid serialized PDate");
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ConcatRowsVariable *&  o 
) [inline]

Definition at line 77 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
PStream& PLearn::operator>> ( PStream &  in,
PP< HyperLearner > &  o 
) [inline]

Definition at line 123 of file HyperLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoVMatrixSaveSource *&  o 
) [inline]

Definition at line 90 of file AutoVMatrixSaveSource.h.

PStream& PLearn::operator>> ( PStream &  in,
RBMDistribution *&  o 
) [inline]

Definition at line 186 of file RBMDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
OptionsOracle *&  o 
) [inline]

Definition at line 132 of file OptionsOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
LocallyWeightedDistribution &  o 
) [inline]

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
PStream& PLearn::operator>> ( PStream &  in,
GeodesicDistanceKernel *&  o 
) [inline]

Definition at line 176 of file GeodesicDistanceKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
SVMClassificationTorch *&  o 
) [inline]

Definition at line 161 of file SVMClassificationTorch.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AutoVMatrixSaveSource > &  o 
) [inline]

Definition at line 90 of file AutoVMatrixSaveSource.h.

PStream& PLearn::operator>> ( PStream &  in,
PotentialsVariable &  o 
) [inline]

Definition at line 95 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
PStream& PLearn::operator>> ( PStream &  in,
ScoreLayerVariable &  o 
) [inline]

Definition at line 202 of file ScoreLayerVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PlusVariable > &  o 
) [inline]

Definition at line 78 of file PlusVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
InterfunctionXchgTest *&  o 
) [inline]

Definition at line 134 of file InterfunctionXchgTest.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperRetrain *&  o 
) [inline]

Definition at line 116 of file HyperRetrain.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PlusScalarVariable > &  o 
) [inline]

Definition at line 77 of file PlusScalarVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusScalarVariable *&  o 
) [inline]

Definition at line 77 of file PlusScalarVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ObjectOptionVariable &  o 
) [inline]

Definition at line 171 of file ObjectOptionVariable.h.

PStream & PLearn::operator>> ( PStream &  in,
PP< NatGradEstimator > &  o 
) [inline]

Definition at line 192 of file NatGradItEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusRowVariable *&  o 
) [inline]

Definition at line 78 of file PlusRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
OptimizeOptionOracle *&  o 
) [inline]

Definition at line 128 of file OptimizeOptionOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
KMeansClustering *&  o 
) [inline]

Definition at line 132 of file KMeansClustering.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusManyVariable &  o 
) [inline]

Definition at line 112 of file PlusManyVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HyperSetOption > &  o 
) [inline]

Definition at line 115 of file HyperSetOption.h.

PStream& PLearn::operator>> ( PStream &  in,
ReconstructionWeightsKernel *&  o 
) [inline]

Definition at line 213 of file ReconstructionWeightsKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
TopDownAsymetricDeepNetwork &  o 
) [inline]

Definition at line 282 of file TopDownAsymetricDeepNetwork.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoVMatrix *&  o 
) [inline]

Definition at line 103 of file AutoVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomGaussMix &  o 
) [inline]

Definition at line 107 of file RandomGaussMix.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusColumnVariable *&  o 
) [inline]

Definition at line 78 of file PlusColumnVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
OneHotSquaredLoss *&  o 
) [inline]

Definition at line 86 of file OneHotSquaredLoss.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
ConfRatedAdaboostCostVariable *&  o 
) [inline]

Definition at line 74 of file ConfRatedAdaboostCostVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
UnconditionalDistribution *&  o 
) [inline]

Definition at line 133 of file UnconditionalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
VMat &  o 
) [inline]

Definition at line 139 of file VMat.h.

{
PStream& PLearn::operator>> ( PStream &  in,
OptimizeOptionOracle &  o 
) [inline]

Definition at line 128 of file OptimizeOptionOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RationalQuadraticARDKernel > &  o 
) [inline]

Definition at line 172 of file RationalQuadraticARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PDistributionVariable *&  o 
) [inline]

Definition at line 83 of file PDistributionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RandomGaussMix *&  o 
) [inline]

Definition at line 107 of file RandomGaussMix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OutputVariable > &  o 
) [inline]

Definition at line 78 of file OutputVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< AppendNeighborsVMatrix > &  o 
) [inline]

Definition at line 130 of file AppendNeighborsVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
GeneralizedDistanceRBFKernel &  o 
) [inline]

Definition at line 76 of file GeneralizedDistanceRBFKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
NeuralNetworkARDKernel *&  o 
) [inline]

Definition at line 144 of file NeuralNetworkARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< OneHotVariable > &  o 
) [inline]

Definition at line 84 of file OneHotVariable.h.

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }
PStream& PLearn::operator>> ( PStream &  in,
PP< InvertElementsVariable > &  o 
) [inline]

Definition at line 70 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< LocalGaussianClassifier > &  o 
) [inline]

Definition at line 214 of file LocalGaussianClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
OutputVariable &  o 
) [inline]

Definition at line 78 of file OutputVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
OutputVariable *&  o 
) [inline]

Definition at line 78 of file OutputVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
Optimizer &  o 
) [inline]

Definition at line 181 of file Optimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IsSmallerVariable > &  o 
) [inline]

Definition at line 74 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
PStream& PLearn::operator>> ( PStream &  in,
PDistributionVariable &  o 
) [inline]

Definition at line 83 of file PDistributionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PLogPVariable &  o 
) [inline]

Definition at line 71 of file PLogPVariable.h.

{ return new PLogPVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PLogPVariable *&  o 
) [inline]

Definition at line 71 of file PLogPVariable.h.

{ return new PLogPVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SymbolNode *&  o 
) [inline]

Definition at line 144 of file SymbolNode.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NegLogProbCostFunction > &  o 
) [inline]

Definition at line 95 of file NegLogProbCostFunction.h.

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs,outstart,outend); }
PStream& PLearn::operator>> ( PStream &  in,
PlusColumnVariable &  o 
) [inline]

Definition at line 78 of file PlusColumnVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< PlusColumnVariable > &  o 
) [inline]

Definition at line 78 of file PlusColumnVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
GaussianContinuumDistribution *&  o 
) [inline]

Definition at line 279 of file GaussianContinuumDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusConstantVariable *&  o 
) [inline]

Definition at line 94 of file PlusConstantVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusConstantVariable &  o 
) [inline]

Definition at line 94 of file PlusConstantVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PlusConstantVariable > &  o 
) [inline]

Definition at line 94 of file PlusConstantVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
LocallyMagnifiedDistribution &  o 
) [inline]

Definition at line 161 of file LocallyMagnifiedDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PlusManyVariable > &  o 
) [inline]

Definition at line 112 of file PlusManyVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TransparentParentable > &  o 
) [inline]

Definition at line 316 of file ParentableObject.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusRowVariable &  o 
) [inline]

Definition at line 78 of file PlusRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
AppendNeighborsVMatrix &  o 
) [inline]

Definition at line 130 of file AppendNeighborsVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ChainedLearners *&  o 
) [inline]

Definition at line 186 of file ChainedLearners.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusScalarVariable &  o 
) [inline]

Definition at line 77 of file PlusScalarVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
KernelDensityEstimator *&  o 
) [inline]

Definition at line 177 of file KernelDensityEstimator.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusVariable &  o 
) [inline]

Definition at line 78 of file PlusVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PlusVariable *&  o 
) [inline]

Definition at line 78 of file PlusVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
ChainedLearners &  o 
) [inline]

Definition at line 186 of file ChainedLearners.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WeightedSumSquareVariable > &  o 
) [inline]

Definition at line 78 of file WeightedSumSquareVariable.h.

{ return new WeightedSumSquareVariable(v,w); }
PStream& PLearn::operator>> ( PStream &  in,
AddMissingVMatrix *&  o 
) [inline]

Definition at line 131 of file AddMissingVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
Experimentation *&  o 
) [inline]

Definition at line 203 of file Experimentation.h.

PStream& PLearn::operator>> ( PStream &  in,
HyperOptimize *&  o 
) [inline]

Definition at line 194 of file HyperOptimize.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PotentialsVariable > &  o 
) [inline]

Definition at line 95 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
PStream& PLearn::operator>> ( PStream &  in,
PowVariable &  o 
) [inline]

Definition at line 75 of file PowVariable.h.

{ return new PowVariable(v,power); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PowVariable > &  o 
) [inline]

Definition at line 75 of file PowVariable.h.

{ return new PowVariable(v,power); }
PStream& PLearn::operator>> ( PStream &  in,
PowVariableVariable &  o 
) [inline]

Definition at line 88 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
PStream& PLearn::operator>> ( PStream &  in,
PP< NnlmWordRepresentationLayer > &  o 
) [inline]

Definition at line 194 of file NnlmWordRepresentationLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< AddBagInformationVMatrix > &  o 
) [inline]

Definition at line 126 of file AddBagInformationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MixtureDistribution > &  o 
) [inline]

Definition at line 217 of file MixtureDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
ProductTransposeVariable *&  o 
) [inline]

Definition at line 77 of file ProductTransposeVariable.h.

{
template<class T1 >
PStream& PLearn::operator>> ( PStream &  in,
tuple< T1 > &  t 
)

Definition at line 260 of file tuple.h.

References in, PLearn::PStream::readExpected(), and PLearn::PStream::skipBlanksAndComments().

{    
    in.skipBlanksAndComments(); in.readExpected('('); 
    in.skipBlanksAndComments(); in >> get<0>(t); 
    in.skipBlanksAndComments(); in.readExpected(')');
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ProductVariable &  o 
) [inline]

Definition at line 77 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
PStream& PLearn::operator>> ( PStream &  in,
EmpiricalDistribution *&  o 
) [inline]

Definition at line 101 of file EmpiricalDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TMatTest > &  o 
) [inline]

Definition at line 139 of file TMatTest.h.

template<class T1 , class T2 >
PStream& PLearn::operator>> ( PStream &  in,
tuple< T1, T2 > &  t 
)

Definition at line 269 of file tuple.h.

References in, PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{
    in.skipBlanksAndComments(); in.readExpected('('); 
    in.skipBlanksAndComments(); in >> get<0>(t); 
    in.skipBlanksAndCommentsAndSeparators(); in >> get<1>(t); 
    in.skipBlanksAndComments(); in.readExpected(')');
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ProjectionErrorVariable &  o 
) [inline]

Definition at line 96 of file ProjectionErrorVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
ProjectionErrorVariable *&  o 
) [inline]

Definition at line 96 of file ProjectionErrorVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ToBagClassifier > &  o 
) [inline]

Definition at line 159 of file ToBagClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< DichotomizeDond2DiscreteVariables > &  o 
) [inline]

Definition at line 124 of file DichotomizeDond2DiscreteVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< HyperCommand > &  o 
) [inline]

Definition at line 132 of file HyperCommand.h.

PStream& PLearn::operator>> ( PStream &  in,
PruningLinearRegressor &  o 
) [inline]

Definition at line 136 of file PruningLinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldParzenKernel *&  o 
) [inline]

Definition at line 87 of file ManifoldParzenKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ManifoldParzenKernel > &  o 
) [inline]

Definition at line 87 of file ManifoldParzenKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ReshapeVariable &  o 
) [inline]

Definition at line 81 of file ReshapeVariable.h.

{ return new ReshapeVariable(v,newlength,newwidth); }
PStream& PLearn::operator>> ( PStream &  in,
PruningLinearRegressor *&  o 
) [inline]

Definition at line 136 of file PruningLinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
FeatureSetNNet &  o 
) [inline]

Definition at line 441 of file FeatureSetNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
RightPseudoInverseVariable &  o 
) [inline]

Definition at line 74 of file RightPseudoInverseVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RationalQuadraticARDKernel *&  o 
) [inline]

Definition at line 172 of file RationalQuadraticARDKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
TransposeVariable *&  o 
) [inline]

Definition at line 36 of file TransposeVariable.h.

{ return new TransposeVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< PLMathTest > &  o 
) [inline]

Definition at line 128 of file PLMathTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VecElementVariable > &  o 
) [inline]

Definition at line 80 of file VecElementVariable.h.

{ return new VecElementVariable(v,index); }
PStream& PLearn::operator>> ( PStream &  in,
TemporaryFileVMatrix &  o 
) [inline]

Definition at line 128 of file TemporaryFileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Calendar *&  o 
) [inline]

Definition at line 312 of file Calendar.h.

void PLearn::operator>> ( const Vec &  v,
const VVec &  vv 
) [inline]

Definition at line 148 of file VVec.h.

References PLearn::VVec::copyFrom().

{ vv.copyFrom(v); }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
InterfunctionXchgTest &  o 
) [inline]

Definition at line 134 of file InterfunctionXchgTest.h.

PStream& PLearn::operator>> ( PStream &  in,
RowAtPositionVariable *&  o 
) [inline]

Definition at line 87 of file RowAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RowOfVariable &  o 
) [inline]

Definition at line 84 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
PStream& PLearn::operator>> ( PStream &  in,
RowBufferedVMatrixTest *&  o 
) [inline]

Definition at line 126 of file RowBufferedVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BasisSelectionRegressor > &  o 
) [inline]

Definition at line 248 of file BasisSelectionRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
NnlmOnlineLearner *&  o 
) [inline]

Definition at line 280 of file NnlmOnlineLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
RowSumVariable &  o 
) [inline]

Definition at line 71 of file RowSumVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
LLEKernel *&  o 
) [inline]

Definition at line 160 of file LLEKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNClassifier *&  o 
) [inline]

Definition at line 217 of file KNNClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
MaxSubsamplingTest *&  o 
) [inline]

Definition at line 136 of file MaxSubsamplingTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SemiSupervisedProbClassCostVariable &  o 
) [inline]

Definition at line 127 of file SemiSupervisedProbClassCostVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SplitWiseValidationVMatrix > &  o 
) [inline]

Definition at line 118 of file SplitWiseValidationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Optimizer > &  o 
) [inline]

Definition at line 181 of file Optimizer.h.

PStream& PLearn::operator>> ( PStream &  in,
SigmoidVariable &  o 
) [inline]

Definition at line 71 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< KNNClassifier > &  o 
) [inline]

Definition at line 217 of file KNNClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
SigmoidVariable *&  o 
) [inline]

Definition at line 71 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< MultiInstanceNNet > &  o 
) [inline]

Definition at line 172 of file MultiInstanceNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
SignVariable &  o 
) [inline]

Definition at line 70 of file SignVariable.h.

{ return new SignVariable(input); }
PStream& PLearn::operator>> ( PStream &  in,
SignVariable *&  o 
) [inline]

Definition at line 70 of file SignVariable.h.

{ return new SignVariable(input); }
PStream& PLearn::operator>> ( PStream &  in,
ConjRosenbrock &  o 
) [inline]

Definition at line 97 of file ConjRosenbrock.h.

PStream& PLearn::operator>> ( PStream &  in,
VecElementVariable &  o 
) [inline]

Definition at line 80 of file VecElementVariable.h.

{ return new VecElementVariable(v,index); }
PStream& PLearn::operator>> ( PStream &  in,
SoftmaxLossVariable *&  o 
) [inline]

Definition at line 77 of file SoftmaxLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
ExplicitListOracle *&  o 
) [inline]

Definition at line 118 of file ExplicitListOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
PDistribution *&  o 
) [inline]

Definition at line 349 of file PDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
CartesianProductOracle *&  o 
) [inline]

Definition at line 111 of file CartesianProductOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoLinearRegressor *&  o 
) [inline]

Definition at line 185 of file AutoLinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PLearnDiff &  o 
) [inline]

Definition at line 140 of file PLearnDiff.h.

PStream& PLearn::operator>> ( PStream &  in,
PLMathTest &  o 
) [inline]

Definition at line 128 of file PLMathTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeRegisters > &  o 
) [inline]

Definition at line 196 of file RegressionTreeRegisters.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SoftplusVariable > &  o 
) [inline]

Definition at line 77 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
SoftSlopeIntegralVariable &  o 
) [inline]

Definition at line 78 of file SoftSlopeIntegralVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
SoftSlopeIntegralVariable *&  o 
) [inline]

Definition at line 78 of file SoftSlopeIntegralVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< PRandom > &  o 
) [inline]

Definition at line 307 of file PRandom.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftSlopeVariable &  o 
) [inline]

Definition at line 79 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
PStream& PLearn::operator>> ( PStream &  in,
SoftSlopeVariable *&  o 
) [inline]

Definition at line 79 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
PStream& PLearn::operator>> ( PStream &  in,
LocalGaussianClassifier *&  o 
) [inline]

Definition at line 214 of file LocalGaussianClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceVariable &  o 
) [inline]

Definition at line 118 of file SourceVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SourceVariable *&  o 
) [inline]

Definition at line 118 of file SourceVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
VarRowVariable &  o 
) [inline]

Definition at line 78 of file VarRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PCA *&  o 
) [inline]

Definition at line 234 of file PCA.h.

PStream& PLearn::operator>> ( PStream &  in,
ReconstructionCandidate &  x 
) [inline]

Definition at line 158 of file TransformationLearner.h.

References in, PLearn::ReconstructionCandidate::neighborIdx, PLearn::ReconstructionCandidate::targetIdx, PLearn::ReconstructionCandidate::transformIdx, and PLearn::ReconstructionCandidate::weight.

{
    tuple<int, int, int, real> t;
    in >> t;
    tie(x.targetIdx, x.neighborIdx, x.transformIdx, x.weight) = t;
    return in;
}
PStream& PLearn::operator>> ( PStream &  in,
PP< VarRowsVariable > &  o 
) [inline]

Definition at line 79 of file VarRowsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SquareRootVariable &  o 
) [inline]

Definition at line 71 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
PStream& PLearn::operator>> ( PStream &  in,
SquareRootVariable *&  o 
) [inline]

Definition at line 71 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
PStream& PLearn::operator>> ( PStream &  in,
StackedModulesLearner &  o 
) [inline]

Definition at line 214 of file StackedModulesLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ForwardModule > &  o 
) [inline]

Definition at line 178 of file ForwardModule.h.

PStream& PLearn::operator>> ( PStream &  in,
SquareVariable &  o 
) [inline]

Definition at line 80 of file SquareVariable.h.

{ return new SquareVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
EarlyStoppingOracle *&  o 
) [inline]

Definition at line 140 of file EarlyStoppingOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeRegisters *&  o 
) [inline]

Definition at line 196 of file RegressionTreeRegisters.h.

PStream& PLearn::operator>> ( PStream &  in,
SubMatTransposeVariable &  o 
) [inline]

Definition at line 88 of file SubMatTransposeVariable.h.

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }
PStream& PLearn::operator>> ( PStream &  in,
SubMatTransposeVariable *&  o 
) [inline]

Definition at line 88 of file SubMatTransposeVariable.h.

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }
PStream& PLearn::operator>> ( PStream &  in,
NeighborhoodImputationVMatrix *&  o 
) [inline]

Definition at line 119 of file NeighborhoodImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CartesianProductOracle > &  o 
) [inline]

Definition at line 111 of file CartesianProductOracle.h.

PStream& PLearn::operator>> ( PStream &  in,
SubMatVariable *&  o 
) [inline]

Definition at line 104 of file SubMatVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
NatGradNNet &  o 
) [inline]

Definition at line 314 of file NatGradNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
VarColumnsVariable *&  o 
) [inline]

Definition at line 74 of file VarColumnsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
SubInputVMatrix *&  o 
) [inline]

Definition at line 109 of file SubInputVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
AddCostToLearner *&  o 
) [inline]

Definition at line 228 of file AddCostToLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< SubsampleVariable > &  o 
) [inline]

Definition at line 79 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
PStream& PLearn::operator>> ( PStream &  in,
PP< RegressionTreeQueue > &  o 
) [inline]

Definition at line 94 of file RegressionTreeQueue.h.

PStream& PLearn::operator>> ( PStream &  in,
SumAbsVariable &  o 
) [inline]

Definition at line 71 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
PStream& PLearn::operator>> ( PStream &  in,
PP< ValueSelectRowsVMatrix > &  o 
) [inline]

Definition at line 115 of file ValueSelectRowsVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NegCrossEntropySigmoidVariable &  o 
) [inline]

Definition at line 87 of file NegCrossEntropySigmoidVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< InstanceSnippetTest > &  o 
) [inline]

Definition at line 197 of file InstanceSnippetTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassificationLossVariable *&  o 
) [inline]

Definition at line 77 of file ClassificationLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< BasicIdentityCallsTest > &  o 
) [inline]

Definition at line 144 of file BasicIdentityCallsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
SurfaceTemplateLearner &  o 
) [inline]

Definition at line 148 of file SurfaceTemplateLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
InjectionTest &  o 
) [inline]

Definition at line 133 of file InjectionTest.h.

PStream& PLearn::operator>> ( PStream &  in,
DichotomizeDond2DiscreteVariables &  o 
) [inline]

Definition at line 124 of file DichotomizeDond2DiscreteVariables.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunction *&  o 
) [inline]

Definition at line 129 of file RealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PentaTest > &  o 
) [inline]

Definition at line 130 of file PentaTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VarColumnsVariable > &  o 
) [inline]

Definition at line 74 of file VarColumnsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PentaTest &  o 
) [inline]

Definition at line 130 of file PentaTest.h.

PStream& PLearn::operator>> ( PStream &  in,
GaussianKernel *&  o 
) [inline]

Definition at line 121 of file GaussianKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
MeshMatch &  o 
) [inline]

Definition at line 131 of file MeshMatch.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionFromKernel *&  o 
) [inline]

Definition at line 120 of file RealFunctionFromKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatColumnsVariable *&  o 
) [inline]

Definition at line 79 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
PStream& PLearn::operator>> ( PStream &  in,
PP< VPLProcessor > &  o 
) [inline]

Definition at line 177 of file VPLProcessor.h.

PStream& PLearn::operator>> ( PStream &  in,
Variable &  o 
) [inline]

Definition at line 485 of file Variable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StatsCollector > &  o 
) [inline]

Definition at line 400 of file StatsCollector.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< VarElementVariable > &  o 
) [inline]

Definition at line 82 of file VarElementVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionOfInputFeature *&  o 
) [inline]

Definition at line 121 of file RealFunctionOfInputFeature.h.

PStream& PLearn::operator>> ( PStream &  in,
TransformationLearner *&  o 
) [inline]

Definition at line 917 of file TransformationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
VariablesTest &  o 
) [inline]

Definition at line 122 of file VariablesTest.h.

PStream& PLearn::operator>> ( PStream &  in,
RealFunctionProduct &  o 
) [inline]

Definition at line 116 of file RealFunctionProduct.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VariablesTest > &  o 
) [inline]

Definition at line 122 of file VariablesTest.h.

PStream& PLearn::operator>> ( PStream &  in,
DotProductKernel *&  o 
) [inline]

Definition at line 69 of file DotProductKernel.h.

template<typename S , typename T >
PStream& PLearn::operator>> ( PStream &  in,
pair< S, T > &  x 
) [inline]

Definition at line 918 of file PStream.h.

References c, endl(), PLearn::PStream::get(), in, PLearn::PStream::peek(), perr, PLERROR, PLearn::PStream::readExpected(), PLearn::PStream::skipBlanksAndComments(), and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

{
    in.skipBlanksAndCommentsAndSeparators();
    int c = in.peek();
    if(c==0x16) // binary pair
    {
        in.get(); // eat the header byte
        in >> x.first >> x.second;
    }
    else if(c=='(') // it's the parenthesized (first, second) format
    {
        in.get();
        in.skipBlanksAndComments();
        in >> x.first;
        in.skipBlanksAndCommentsAndSeparators();
        in >> x.second;
        in.skipBlanksAndComments();
        in.readExpected(')');
    }
    else // suppose it's ascii, separated by :
    {
        in >> x.first;
        in.skipBlanksAndComments();
        if(in.get()!=':'){
            //we can't use NORMAL_LOG as can't include pl_log.h
            // can't include pl_log.h as it include PStream.h 
            // and PStream.h would include pl_log.h(recursive include)
            //idem for tostring.h
            perr<<"For the following error, the first half of the pair is '"<<x.first<<"'"<<endl;
            PLERROR("In operator>>(PStream& in, pair<S, T> &x) expected ':' to separate the 2 halves of the pair");
        }
        in.skipBlanksAndComments();
        in >> x.second;
    }
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
VarUtilsTest *&  o 
) [inline]

Definition at line 130 of file VarUtilsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LocalMedBoost > &  o 
) [inline]

Definition at line 162 of file LocalMedBoost.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VarUtilsTest > &  o 
) [inline]

Definition at line 130 of file VarUtilsTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ThresholdBpropVariable &  o 
) [inline]

Definition at line 88 of file ThresholdBpropVariable.h.

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }
PStream& PLearn::operator>> ( PStream &  in,
VarColumnsVariable &  o 
) [inline]

Definition at line 74 of file VarColumnsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
MaxStatsIterator &  o 
) [inline]

Definition at line 300 of file StatsIterator.h.

: public StatsIterator
PStream& PLearn::operator>> ( PStream &  in,
TimesColumnVariable &  o 
) [inline]

Definition at line 80 of file TimesColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VarArrayElementVariable > &  o 
) [inline]

Definition at line 77 of file VarArrayElementVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ColumnIndexVariable > &  o 
) [inline]

Definition at line 75 of file ColumnIndexVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
RealValueIndicatorFunction &  o 
) [inline]

Definition at line 116 of file RealValueIndicatorFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
StatsCollector *&  o 
) [inline]

Definition at line 400 of file StatsCollector.h.

{
PStream& PLearn::operator>> ( PStream &  in,
VarArrayElementVariable *&  o 
) [inline]

Definition at line 77 of file VarArrayElementVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
UpsideDownVMatrix &  o 
) [inline]

Definition at line 100 of file UpsideDownVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
StatsCollector &  o 
) [inline]

Definition at line 400 of file StatsCollector.h.

{
PStream& PLearn::operator>> ( PStream &  in,
EntropyContrast *&  o 
) [inline]

Definition at line 281 of file EntropyContrast.h.

PStream& PLearn::operator>> ( PStream &  in,
VPLPreprocessedLearner *&  o 
) [inline]

Definition at line 197 of file VPLPreprocessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TimesScalarVariable &  o 
) [inline]

Definition at line 81 of file TimesScalarVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
TimesScalarVariable *&  o 
) [inline]

Definition at line 81 of file TimesScalarVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< TimesScalarVariable > &  o 
) [inline]

Definition at line 81 of file TimesScalarVariable.h.

{
void PLearn::operator>> ( VarArray &  ar,
const Vec &  datavec 
) [inline]

Definition at line 254 of file VarArray.h.

References PLearn::VarArray::copyTo().

{ ar.copyTo(datavec); }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
VarArray &  o 
) [inline]

Definition at line 312 of file VarArray.h.

References in.

{ in >> static_cast<Array<Var> &>(o); return in; }
PStream& PLearn::operator>> ( PStream &  in,
InterValuesVariable *&  o 
) [inline]

Definition at line 76 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
PStream& PLearn::operator>> ( PStream &  in,
VPLPreprocessedLearner &  o 
) [inline]

Definition at line 197 of file VPLPreprocessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TransposeProductVariable *&  o 
) [inline]

Definition at line 77 of file TransposeProductVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
PP< ScaledConditionalCDFSmoother > &  o 
) [inline]

Definition at line 129 of file ScaledConditionalCDFSmoother.h.

template<class Key , class Value , class Compare , class Alloc >
PStream& PLearn::operator>> ( PStream &  in,
hash_multimap< Key, Value, Compare, Alloc > &  m 
) [inline]

Definition at line 1083 of file PStream.h.

References in, and readMap().

{
    readMap(in, m);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< VPLCombinedLearner > &  o 
) [inline]

Definition at line 183 of file VPLCombinedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
ShiftAndRescaleFeatureRealFunction *&  o 
) [inline]

Definition at line 119 of file ShiftAndRescaleFeatureRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ShiftAndRescaleFeatureRealFunction > &  o 
) [inline]

Definition at line 119 of file ShiftAndRescaleFeatureRealFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
UnaryHardSlopeVariable *&  o 
) [inline]

Definition at line 81 of file UnaryHardSlopeVariable.h.

{ return new UnaryHardSlopeVariable(v,l,r); }
PStream& PLearn::operator>> ( PStream &  in,
TransformOutputLearner *&  o 
) [inline]

Definition at line 134 of file TransformOutputLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
IsSmallerVariable *&  o 
) [inline]

Definition at line 74 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
PStream& PLearn::operator>> ( PStream &  in,
Smoother &  o 
) [inline]

Definition at line 124 of file Smoother.h.

PStream& PLearn::operator>> ( PStream &  in,
UnaryVariable &  o 
) [inline]

Definition at line 112 of file UnaryVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
Supersampling2DModule *&  o 
) [inline]

Definition at line 229 of file Supersampling2DModule.h.

PStream& PLearn::operator>> ( PStream &  in,
UnaryVariable *&  o 
) [inline]

Definition at line 112 of file UnaryVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressionTreeMulticlassLeaveProb &  o 
) [inline]

Definition at line 96 of file RegressionTreeMulticlassLeaveProb.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< Smoother > &  o 
) [inline]

Definition at line 124 of file Smoother.h.

PStream& PLearn::operator>> ( PStream &  in,
WeightedDistance &  o 
) [inline]

Definition at line 83 of file WeightedDistance.h.

PStream& PLearn::operator>> ( PStream &  in,
TrainValidTestSplitter *&  o 
) [inline]

Definition at line 141 of file TrainValidTestSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftHistogramBinner *&  o 
) [inline]

Definition at line 133 of file SoftHistogramBinner.h.

PStream& PLearn::operator>> ( PStream &  in,
UnfoldedFuncVariable &  o 
) [inline]

Definition at line 93 of file UnfoldedFuncVariable.h.

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }
PStream& PLearn::operator>> ( PStream &  in,
PricingTransactionPairProfitFunction *&  o 
) [inline]

Definition at line 95 of file PricingTransactionPairProfitFunction.h.

PStream& PLearn::operator>> ( PStream &  in,
UnfoldedSumOfVariable &  o 
) [inline]

Definition at line 89 of file UnfoldedSumOfVariable.h.

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }
PStream& PLearn::operator>> ( PStream &  in,
UnfoldedSumOfVariable *&  o 
) [inline]

Definition at line 89 of file UnfoldedSumOfVariable.h.

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }
PStream& PLearn::operator>> ( PStream &  in,
MeshFace *&  o 
) [inline]

Definition at line 142 of file MeshFace.h.

PStream& PLearn::operator>> ( PStream &  in,
DTWKernel *&  o 
) [inline]

Definition at line 154 of file DTWKernel.h.

PStream& PLearn::operator>> ( PStream &  in,
IndexedVMatrixTest &  o 
) [inline]

Definition at line 108 of file IndexedVMatrixTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< MeshEdge > &  o 
) [inline]

Definition at line 120 of file MeshEdge.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TrainValidTestSplitter > &  o 
) [inline]

Definition at line 141 of file TrainValidTestSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TemporaryFileVMatrix > &  o 
) [inline]

Definition at line 128 of file TemporaryFileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StrTableVMatrix > &  o 
) [inline]

Definition at line 60 of file StrTableVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NNet *&  o 
) [inline]

Definition at line 291 of file NNet.h.

PStream& PLearn::operator>> ( PStream &  in,
MinusRowVariable *&  o 
) [inline]

Definition at line 75 of file MinusRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
TestImputations *&  o 
) [inline]

Definition at line 197 of file TestImputations.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PLearner > &  o 
) [inline]

Definition at line 727 of file PLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< BinaryClassificationLossVariable > &  o 
) [inline]

Definition at line 84 of file BinaryClassificationLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
TemporaryFileVMatrix *&  o 
) [inline]

Definition at line 128 of file TemporaryFileVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ManifoldParzen > &  o 
) [inline]

Definition at line 186 of file ManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
MergeDond2Files *&  o 
) [inline]

Definition at line 188 of file MergeDond2Files.h.

PStream& PLearn::operator>> ( PStream &  in,
MinusColumnVariable *&  o 
) [inline]

Definition at line 75 of file MinusColumnVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
StatsCollectorCounts &  c 
) [inline]

this class holds simple statistics about a field

Definition at line 93 of file StatsCollector.h.

References PLearn::StatsCollectorCounts::id, in, PLearn::StatsCollectorCounts::n, PLearn::StatsCollectorCounts::nbelow, PLearn::StatsCollectorCounts::sum, and PLearn::StatsCollectorCounts::sumsquare.

{ in >> c.n >> c.nbelow >> c.sum >> c.sumsquare >> c.id; return in; }
PStream& PLearn::operator>> ( PStream &  in,
ManifoldParzen *&  o 
) [inline]

Definition at line 186 of file ManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< NeighborhoodImputationVMatrix > &  o 
) [inline]

Definition at line 119 of file NeighborhoodImputationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< VBoundDBN2 > &  o 
) [inline]

Definition at line 297 of file VBoundDBN2.h.

PStream& PLearn::operator>> ( PStream &  in,
VarArrayElementVariable &  o 
) [inline]

Definition at line 77 of file VarArrayElementVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< IndexAtPositionVariable > &  o 
) [inline]

Definition at line 79 of file IndexAtPositionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NnlmWordRepresentationLayer &  o 
) [inline]

Definition at line 194 of file NnlmWordRepresentationLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
TorchLearner *&  o 
) [inline]

Definition at line 180 of file TorchLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
LinearRegressor *&  o 
) [inline]

Definition at line 210 of file LinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ManifoldKNNDistribution > &  o 
) [inline]

Definition at line 198 of file ManifoldKNNDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldParzen &  o 
) [inline]

Definition at line 186 of file ManifoldParzen.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< TorchLearner > &  o 
) [inline]

Definition at line 180 of file TorchLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PPTest &  o 
) [inline]

Definition at line 130 of file PPTest.h.

PStream& PLearn::operator>> ( PStream &  in,
Variable *&  o 
) [inline]

Definition at line 485 of file Variable.h.

PStream& PLearn::operator>> ( PStream &  in,
Var &  o 
) [inline]

Definition at line 486 of file Variable.h.

PStream& PLearn::operator>> ( PStream &  in,
ManifoldKNNDistribution &  o 
) [inline]

Definition at line 198 of file ManifoldKNNDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
VarRowsVariable &  o 
) [inline]

Definition at line 79 of file VarRowsVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LinearRegressor > &  o 
) [inline]

Definition at line 210 of file LinearRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PLMathTest *&  o 
) [inline]

Definition at line 128 of file PLMathTest.h.

PStream& PLearn::operator>> ( PStream &  in,
VarRowVariable *&  o 
) [inline]

Definition at line 78 of file VarRowVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
NnlmWordRepresentationLayer *&  o 
) [inline]

Definition at line 194 of file NnlmWordRepresentationLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
StabilisationLearner &  o 
) [inline]

Definition at line 145 of file StabilisationLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LinearInductiveTransferClassifier > &  o 
) [inline]

Definition at line 283 of file LinearInductiveTransferClassifier.h.

PStream& PLearn::operator>> ( PStream &  in,
VecElementVariable *&  o 
) [inline]

Definition at line 80 of file VecElementVariable.h.

{ return new VecElementVariable(v,index); }
PStream& PLearn::operator>> ( PStream &  in,
TestingLearner *&  o 
) [inline]

Definition at line 177 of file TestingLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
TestInTrainSplitter &  o 
) [inline]

Definition at line 153 of file TestInTrainSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
DeepFeatureExtractorNNet &  o 
) [inline]

Definition at line 340 of file DeepFeatureExtractorNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
AddBagInformationVMatrix &  o 
) [inline]

Definition at line 126 of file AddBagInformationVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
Preprocessing *&  o 
) [inline]

Definition at line 144 of file Preprocessing.h.

PStream& PLearn::operator>> ( PStream &  in,
RegressorFromDistribution *&  o 
) [inline]

Definition at line 174 of file RegressorFromDistribution.h.

PStream& PLearn::operator>> ( PStream &  in,
RemoveObservationTest &  o 
) [inline]

Definition at line 111 of file RemoveObservationTest.h.

PStream& PLearn::operator>> ( PStream &  in,
ObjectOptionVariable *&  o 
) [inline]

Definition at line 171 of file ObjectOptionVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
RemoveObservationTest *&  o 
) [inline]

Definition at line 111 of file RemoveObservationTest.h.

PStream& PLearn::operator>> ( PStream &  in,
AddMissingVMatrix &  o 
) [inline]

Definition at line 131 of file AddMissingVMatrix.h.

{
PStream & PLearn::operator>> ( PStream &  in,
Object *&  x 
)

This takes precedence over the template definitions for a template type T in PStream.h.

Definition at line 944 of file Object.cc.

References PLearn::PStream::copies_map_in, PLearn::PStream::get(), in, PLearn::PStream::peek(), PLERROR, readObject(), PLearn::PStream::skipBlanksAndCommentsAndSeparators(), and x.

{
    in.skipBlanksAndCommentsAndSeparators();
    if (in.peek() == '*')
    {
        in.get(); // Eat '*'
        unsigned int id;
        in >> id;
        //don't skip blanks before we need to read something else (read might block).
        //in.skipBlanksAndCommentsAndSeparators();
        if (id==0)
            x = 0;
        else
        {
            in.skipBlanksAndCommentsAndSeparators(); 
            if (in.peek() == '-') 
            {
                in.get(); // Eat '-'
                char cc = in.get();
                if(cc != '>') // Eat '>'
                    PLERROR("In PStream::operator>>(Object*&)  Wrong format. "
                            "Expecting \"*%d->\" but got \"*%d-%c\".", id, id, cc);
                in.skipBlanksAndCommentsAndSeparators();
                if(x)
                    in >> *x;
                else // x is null
                    x = readObject(in, id);
                //don't skip blanks before we need to read something else (read might block).
                // in.skipBlanksAndCommentsAndSeparators();
                in.copies_map_in[id]= x;
            } 
            else 
            {
                // Find it in map and return ptr;
                map<unsigned int, void *>::iterator it = in.copies_map_in.find(id);
                if (it == in.copies_map_in.end())
                    PLERROR("In PStream::operator>>(Object*&) object (ptr) to be read with id='%d' "
                            "has not been previously defined", id);
                x= static_cast<Object *>(it->second);
            }
        }
    }
    else
    {
        x = readObject(in);
        //don't skip blanks before we need to read something else (read might block).
        // in.skipBlanksAndCommentsAndSeparators();
    }

    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
RegressionTree *&  o 
) [inline]

Definition at line 133 of file RegressionTree.h.

PStream& PLearn::operator>> ( PStream &  in,
AppendNeighborsVMatrix *&  o 
) [inline]

Definition at line 130 of file AppendNeighborsVMatrix.h.

{
PStream& PLearn::operator>> ( PStream &  in,
NnlmOutputLayer *&  o 
) [inline]

Definition at line 334 of file NnlmOutputLayer.h.

PStream& PLearn::operator>> ( PStream &  in,
PLearnDiff *&  o 
) [inline]

Definition at line 140 of file PLearnDiff.h.

PStream& PLearn::operator>> ( PStream &  in,
AsciiVMatrix &  o 
) [inline]

Definition at line 115 of file AsciiVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
StatefulLearner &  o 
) [inline]

Definition at line 153 of file StatefulLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< WeightedDistance > &  o 
) [inline]

Definition at line 83 of file WeightedDistance.h.

PStream& PLearn::operator>> ( PStream &  in,
AutoVMatrix &  o 
) [inline]

Definition at line 103 of file AutoVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
NegateElementsVariable *&  o 
) [inline]

Definition at line 82 of file NegateElementsVariable.h.

{
PStream& PLearn::operator>> ( PStream &  in,
CCCostVariable &  o 
) [inline]

Definition at line 97 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
PStream& PLearn::operator>> ( PStream &  in,
VBoundDBN2 *&  o 
) [inline]

Definition at line 297 of file VBoundDBN2.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< PLearnDiff > &  o 
) [inline]

Definition at line 140 of file PLearnDiff.h.

PStream& PLearn::operator>> ( PStream &  in,
KNNRegressor *&  o 
) [inline]

Definition at line 195 of file KNNRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryNumbersVMatrix &  o 
) [inline]

Definition at line 146 of file BinaryNumbersVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryOpVMatrix &  o 
) [inline]

Definition at line 121 of file BinaryOpVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
BinaryOpVMatrix *&  o 
) [inline]

Definition at line 121 of file BinaryOpVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UnfoldedSumOfVariable > &  o 
) [inline]

Definition at line 89 of file UnfoldedSumOfVariable.h.

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }
PStream& PLearn::operator>> ( PStream &  in,
PP< SoftHistogramBinner > &  o 
) [inline]

Definition at line 133 of file SoftHistogramBinner.h.

PStream& PLearn::operator>> ( PStream &  in,
BinSplitter &  o 
) [inline]

Definition at line 131 of file BinSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
StackedLearner &  o 
) [inline]

Definition at line 221 of file StackedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< StackedLearner > &  o 
) [inline]

Definition at line 221 of file StackedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
UnfoldedFuncVariable *&  o 
) [inline]

Definition at line 93 of file UnfoldedFuncVariable.h.

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }
template<class T >
PStream& PLearn::operator>> ( PStream &  in,
vector< T > &  v 
) [inline]

Definition at line 1502 of file PStream.h.

References in, and readSequence().

{ readSequence(in, v); return in; }

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassificationLossVariable > &  o 
) [inline]

Definition at line 77 of file ClassificationLossVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
PP< UnaryHardSlopeVariable > &  o 
) [inline]

Definition at line 81 of file UnaryHardSlopeVariable.h.

{ return new UnaryHardSlopeVariable(v,l,r); }
template<class T >
istream& PLearn::operator>> ( istream &  in,
const TMat< T > &  m 
) [inline]

inputing a TMat

Definition at line 852 of file TMat_impl.h.

References in, and PLearn::TMat< T >::input().

{ 
    m.input(in);
    return in;
}

Here is the call graph for this function:

PStream& PLearn::operator>> ( PStream &  in,
ByteMemoryVMatrix &  o 
) [inline]

Definition at line 80 of file ByteMemoryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
ByteMemoryVMatrix *&  o 
) [inline]

Definition at line 80 of file ByteMemoryVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
AffineTransformVariable *&  o 
) [inline]

Definition at line 89 of file AffineTransformVariable.h.

{ 
PStream& PLearn::operator>> ( PStream &  in,
CenteredVMatrix &  o 
) [inline]

Definition at line 120 of file CenteredVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CenteredVMatrix *&  o 
) [inline]

Definition at line 120 of file CenteredVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SoftHistogramBinner &  o 
) [inline]

Definition at line 133 of file SoftHistogramBinner.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< LimitedGaussianSmoother > &  o 
) [inline]

Definition at line 128 of file LimitedGaussianSmoother.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< KNNRegressor > &  o 
) [inline]

Definition at line 195 of file KNNRegressor.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< ClassSeparationSplitter > &  o 
) [inline]

Definition at line 143 of file ClassSeparationSplitter.h.

PStream& PLearn::operator>> ( PStream &  in,
ClassSubsetVMatrix &  o 
) [inline]

Definition at line 132 of file ClassSubsetVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectInputSubsetLearner &  o 
) [inline]

Definition at line 149 of file SelectInputSubsetLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
SelectInputSubsetLearner *&  o 
) [inline]

Definition at line 149 of file SelectInputSubsetLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
UnequalConstantVariable *&  o 
) [inline]

Definition at line 78 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
PStream& PLearn::operator>> ( PStream &  in,
CompactVMatrix *&  o 
) [inline]

Definition at line 203 of file CompactVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
CompactVMatrix &  o 
) [inline]

Definition at line 203 of file CompactVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< CompactVMatrix > &  o 
) [inline]

Definition at line 203 of file CompactVMatrix.h.

PStream& PLearn::operator>> ( PStream &  in,
PythonProcessedLearner &  o 
) [inline]

Definition at line 208 of file PythonProcessedLearner.h.

PStream& PLearn::operator>> ( PStream &  in,
Smoother *&  o 
) [inline]

Definition at line 124 of file Smoother.h.

PStream& PLearn::operator>> ( PStream &  in,
HeapTest &  o 
) [inline]

Definition at line 129 of file HeapTest.h.

PStream& PLearn::operator>> ( PStream &  in,
PP< UnaryVariable > &  o 
) [inline]

Definition at line 112 of file UnaryVariable.h.

PStream& PLearn::operator>> ( PStream &  in,
mNNet &  o 
) [inline]

Definition at line 220 of file mNNet.h.

PStream& PLearn::operator>> ( PStream &  in,
PyPLearnScript *&  o 
) [inline]

Definition at line 183 of file PyPLearnScript.h.

{ time_t d=0; return smartLoadObject(filepath, args, d); }
PStream& PLearn::operator>> ( PStream &  in,
Preprocessing &  o 
) [inline]

Definition at line 144 of file Preprocessing.h.

PStream& PLearn::operator>> ( PStream &  in,
ConcatRowsVMatrix &  o 
) [inline]

Definition at line 151 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
PStream& PLearn::operator>> ( PStream &  in,
ConcatRowsVMatrix *&  o 
) [inline]

Definition at line 151 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
PStream& PLearn::operator>> ( PStream &  in,
NGramTree *&  o 
) [inline]

Definition at line 145 of file NGramTree.h.

Mat PLearn::operator^ ( const Mat &  m1,
const Mat &  m2 
)

"cross" product of two sets. Matrices m1 and m2 are regarded as two sets of vectors (their rows) m1^m2 returns the set of all possible concatenations of a vector from m1 and a vector from m2 ex: Mat(2,1,"1 2 3 4") ^ Mat(2,2,"10 20 30 40") ==> 1 2 10 20 1 2 30 40 3 4 10 20 3 4 30 40

Definition at line 124 of file Mat.cc.

References i, PLearn::TMat< T >::length(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

{
    Mat result(m1.length()*m2.length(), m1.width()+m2.width());
    Mat lefthalf = result.subMatColumns(0,m1.width());
    Mat righthalf = result.subMatColumns(m1.width(),m2.width());
    int i=0;
    for(int i1=0; i1<m1.length(); i1++)
        for(int i2=0; i2<m2.length(); i2++)
        {
            lefthalf(i) << m1(i1);
            righthalf(i) << m2(i2);
            i++;
        }
    return result;
}

Here is the call graph for this function:

template<class T >
PRange<T> PLearn::operator| ( const PRange< T > &  r1,
const PRange< T > &  r2 
)

Union operator.

Definition at line 162 of file PRange.h.

References PLearn::PRange< T >::isEmpty(), PLearn::PRange< T >::lower(), max(), min(), and PLearn::PRange< T >::upper().

{
    if (r1.isEmpty())
        return r2;
    else if (r2.isEmpty())
        return r1;
    else
        return PRange<T>( min(r1.lower(), r2.lower()), max(r1.upper(), r2.upper()) );
}

Here is the call graph for this function:

template<class T >
T PLearn::output_margin ( const TVec< T > &  class_scores,
int  correct_class 
)

Definition at line 1754 of file TMat_maths_impl.h.

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

{
    T maxother = -FLT_MAX;
    for(int i=0; i<class_scores.length(); i++)
    {
        if(i!=correct_class && class_scores[i]>maxother)
            maxother = class_scores[i];
    }
    return class_scores[correct_class]-maxother;
}

Here is the call graph for this function:

CostFunc PLearn::output_minus_target ( int  singleoutputindex) [inline]

Definition at line 63 of file DifferenceKernel.cc.

{
    if(singleoutputindex>=0)
        return new SelectedOutputCostFunction(new DifferenceKernel(),singleoutputindex); 
    else
        return new DifferenceKernel(); 
}
Var PLearn::output_var ( Var  v,
char *  filename 
) [inline]

Definition at line 80 of file OutputVariable.h.

Referenced by PLearn::EntropyContrastLearner::build_().

{
    return new OutputVariable(v,filename); }

Here is the caller graph for this function:

static void PLearn::output_version ( ) [static]

Definition at line 111 of file plearn_main.cc.

References perr, and version_string().

Referenced by global_options().

{
    perr << version_string();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::P ( ConditionalExpression  conditional_expression,
bool  clearMarksUponReturn = true 
)

Construct a Var that computes P(LHS == observation | RHS == values ) in terms of the Var observation and the Vars in the RHS, where RHS is a RVArray such as (X1==x1 && X2==x2 && X3==x3) where Xi are RandomVar's and xi are Var's which represent the value that are given to the conditioning variables Xi. Normally the marks used to identify RVs which are deterministically determined from the RHS are cleared upon return (unless specified with the optional 2nd argument).

Definition at line 593 of file RandomVar.cc.

References PLearn::ConditionalExpression::LHS, PLearn::ConditionalExpression::RHS, PLearn::RVInstance::v, and PLearn::RVInstance::V.

Referenced by PLearn::SumVarianceOfLinearTransformedCategoricals::bprop(), PLearn::SumVarianceOfLinearTransformedBernoullis::bprop(), PLearn::SumEntropyOfCategoricals::bprop(), PLearn::SumEntropyOfBernoullis::bprop(), PLearn::SumVarianceOfLinearTransformedCategoricals::fprop(), PLearn::SumVarianceOfLinearTransformedBernoullis::fprop(), PLearn::SumEntropyOfCategoricals::fprop(), PLearn::SumEntropyOfBernoullis::fprop(), PLearn::PLS::train(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

{
    RandomVar& LHS = conditional_expression.LHS.V;
    RVInstanceArray& RHS = conditional_expression.RHS;
    // traverse the tree of ancestors of this node
    // and mark nodes which are deterministic descendents of RHS
    // and of non-random variables
    // while setting their "value" field to this Var function of them.
    LHS->markRHSandSetKnownValues(RHS);

    Var p = LHS->P(conditional_expression.LHS.v,RHS);

    if (clearMarksUponReturn)
        // put the network back in its original state
        LHS->unmarkAncestors();

    // make sure that all the paths which do not
    // depend on x, y, and the tunable_parameters are correctly computed
    p->fprop_from_all_sources();
    return p;
}

Here is the caller graph for this function:

real PLearn::p_value ( real  mu,
real  vn 
)

Definition at line 240 of file pl_erf.cc.

References gauss_01_cum(), is_missing(), MISSING_VALUE, and sqrt().

Referenced by KS_test(), vmatmain(), and PLearn::StatsCollector::zpr1t().

{
    if (is_missing(mu) || is_missing(vn))
        return MISSING_VALUE;
    return 1 - gauss_01_cum(fabs(mu/sqrt(vn)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::paired_t_test ( Vec  u,
Vec  v 
)

Given two paired sets u and v of n measured values, the paired t-test determines whether they differ from each other in a significant way under the assumptions that the paired differences are independent and identically normally distributed.

Definition at line 357 of file stats_utils.cc.

References PLearn::TVec< T >::length(), mean(), MISSING_VALUE, n, PLWARNING, sqrt(), and sumsquare().

{
    int n = u.length();
    if( v.length() != n )
    {
        PLWARNING("paired_t_test:  "
                  "Can't make a paired t-test on to unequally lengthed vectors (%d != %d).",
                  n, v.length());
        return MISSING_VALUE;
    }

    real ubar = mean(u);
    real vbar = mean(v);
    Vec u2 = u - ubar;
    Vec v2 = v - vbar;

    return (ubar - vbar) * sqrt( n*(n-1) / sumsquare(u2-v2));
}

Here is the call graph for this function:

void PLearn::parseBaseAndParameters ( const string &  s,
string &  base,
map< string, string > &  params,
map< string, string > *  added = 0,
map< string, string > *  backup = 0,
const string &  delimiter = "::" 
)

From a string s = "base_string::arg1=val1::arg2=val2::arg3=val3", fill 'base' with 'base_string', and add to 'params' mappings argX -> valX.

Note that 'params' is not cleared. One can use another delimiting string through the 'delimiter' argument. If the optional 'added' map is given, it will be cleared, then filled with the added parameters (useful is one wants to keep track of the parameters that have been added to 'params'). If the optional 'backup' map is given, it will be cleared, then filled with those parameters in 'params' which have been erased by the parameters given in the string 's'.

Definition at line 737 of file stringutils.cc.

References i, PLERROR, split_from_string(), and split_on_first().

Referenced by getDataSet(), readFileAndMacroProcess(), PLearn::RunCommand::run(), and smartLoadObject().

{
    vector<string> splits = split_from_string(s, delimiter);
    base = splits[0];
    string name, value;
    map<string, string>::const_iterator it;
    if (backup)
        backup->clear();
    if (added)
        added->clear();
    for (vector<string>::size_type i = 1; i < splits.size(); i++) {
        const string& str = splits[i];
        if (str.find('=') == string::npos)
            PLERROR("In parseBaseAndParameters - Could not find the '=' character when parsing "
                    "parameter '%s'", str.c_str());
        split_on_first(str, "=", name, value);
        if (name.empty())
            PLERROR("In parseBaseAndParameters - Read an empty parameter name in string '%s'"
                    , s.c_str());
        if (backup && (it = params.find(name)) != params.end())
            (*backup)[name] = it->second;
        params[name] = value;
        if (added)
            (*added)[name] = value;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::parseSizeFromRemainingLines ( const PPath &  filename,
PStream &  in,
bool could_be_old_amat,
int length,
int width 
)

Definition at line 1557 of file MatIO.cc.

References a, b, countNonBlankLinesOfFile(), getNextNonBlankLine(), openFile(), PLearn::PStream::raw_ascii, and split().

Referenced by loadAscii().

{
    string line;
    getNextNonBlankLine(in,line);
    if(line=="") // There are no value lines
    {
        width=length=0;
        could_be_old_amat=false; 
        return; 
    }

    int nfields1 = int(split(line).size()); 
    getNextNonBlankLine(in,line);
    if(line=="") // There is only one line
    {
        length               = 1;
        width                = nfields1;
        could_be_old_amat    = false; 
        return; 
    }

    // The number of lines that seems to contain values  
    int guesslength = countNonBlankLinesOfFile(filename);  

    int nfields2 = int(split(line).size());                // The width of the second line.
    if(nfields1==nfields2) // looks like a plain ascii file
    {
        length = guesslength;
        width  = nfields1;
        return;
    }

    if(!could_be_old_amat || nfields1!=2) 
        return;  // could not be an old .amat with first 2 numbers being length width

    // OK we now suppose that we may have an old-format vmatrix
    // PLERROR("In parseSizeFromRemainingLines - This part of the code is not PStream compatible yet");
    
    // Get to the beginning of the file
    PStream rein = openFile(filename, PStream::raw_ascii, "r");

    // Reread the first line as two real numbers
    real a = -1.0, b = -1.0;
    rein >> a >> b;

    if(guesslength == int(a)+1                   // +1 since the size line was counted in guesslength but should not
       && real(int(a))==a && real(int(b))==b     //  Sizes must be integers and
       && a>0 && b>0                             //   positive
       && int(b)==nfields2 )                     // The first row of values has the expected width
    {
        // We assume we have an old style .amat
        length = int(a);
        width = int(b);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::partialSortRows ( const TMat< T > &  mat,
int  k,
int  sortk = 1,
int  col = 0 
)

Uses partial_sort.

Sorts only the first k smallests rows and put it in the k first rows. The other rows are in an arbitrary order. If sortk is 0, the k smallest rows are put in the k first rows but in an arbitrary order. This implementation should be very efficient, but it does two memory allocation: a first one of mat.length()*(sizeof(real)+sizeof(int)) and a second one of mat.length()*sizeof(int).

Definition at line 130 of file TMat_sort.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::swapRows().

Referenced by PLearn::Kernel::computeKNNeighbourMatrixFromDistanceMatrix(), PLearn::Kernel::computeNearestNeighbors(), PLearn::ThresholdedKernel::evaluate(), PLearn::ThresholdedKernel::evaluate_i_x_again(), PLearn::ThresholdedKernel::evaluate_x_i_again(), PLearn::NonLocalManifoldParzen::knn(), PLearn::GaussianContinuumDistribution::knn(), PLearn::GaussianContinuum::knn(), and PLearn::ThresholdedKernel::setDataForKernelMatrix().

{
    if (k > mat.length())
        PLERROR("In partialSortRows - The number of rows to sort (%d) must "
                "be less than the length of the matrix (%d)",
                k, mat.length());
    vector< pair<T,int> > order(mat.length());
    typename vector< pair<T,int> >::iterator it = order.begin();
    T* ptr = mat.data()+col;
    for(int i=0; i<mat.length(); ++i, ptr+=mat.mod(), ++it)
    {
        it->first = *ptr;
        it->second = i;
    }

    typename vector< pair<T,int> >::iterator middle = order.begin();
    for(int i=0; i<k; ++i, ++middle);

    partial_sort(order.begin(),middle,order.end());
    
    // Build the new destination position array
    // (destpos is the inverse map of order.second)
    vector<int> destpos(mat.length());  
    for(int i=0; i<mat.length(); ++i)
        destpos[order[i].second] = i;

    // Put elements wich are in the rows k to mat.length()-1 at their place if
    // their destpos is in the range 0 to k-1. If not, we leave them there.
    for(int startpos = mat.length()-1; startpos>=k; startpos--)
    {
        int dest = destpos[startpos];
        if(dest!=-1)
        {
            while(dest<k)
            {
                mat.swapRows(startpos,dest);
                int newdest = destpos[dest];
                destpos[dest] = -1;
                dest = newdest;
            }
            destpos[startpos] = -1;
        }
    }

    if(sortk) {
        // Put the k firsts rows in the right order
        for(int startpos = 0; startpos<k; startpos++)
        {
            int dest = destpos[startpos];      
            if(dest!=-1)
            {
                while(dest!=startpos)
                {
                    mat.swapRows(startpos,dest);
                    int newdest = destpos[dest];
                    destpos[dest] = -1;
                    dest = newdest;
                }
                destpos[startpos] = -1;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::pathexists ( const PPath &  path)

Returns true if the given path points to an existing regular file or directory.

Definition at line 114 of file fileutils.cc.

References PLearn::PPath::absolute().

Referenced by PLearn::PTester::build_(), PLearn::HTMLHelpGenerator::build_(), PLearn::VVMatrix::createPreproVMat(), PLearn::VVMatrix::extractSourceMatrix(), PLearn::VVMatrix::getPrecomputedDataName(), PLearn::HelpSystem::helpIndexHTML(), input2dSet(), PLearn::VVMatrix::isPrecomputedAndUpToDate(), PLearn::VMatrix::loadStringMapping(), PLearn::VMatrix::lockMetaDataDir(), makeFileNameValid(), PLearn::VMat::precompute(), rm(), PLearn::SequentialValidation::run(), PLearn::PTest::run(), and PLearn::Experiment::run().

{
    PRFileInfo64 fi;

    if (PR_GetFileInfo64(path.absolute().c_str(), &fi) != PR_SUCCESS)
        return false;
    else
        return fi.type == PR_FILE_FILE || fi.type == PR_FILE_DIRECTORY;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::peekAfterSkipBlanks ( PStream &  in) [inline]

Peeks the first char after removal of blanks.

Definition at line 164 of file fileutils.h.

References c, PLearn::PStream::get(), and PLearn::PStream::unget().

Referenced by PLearn::VMatLanguage::generateCode(), and PLearn::RealMapping::read().

                                            {
    int c;
    do {
        c = in.get();
    } while (c != EOF && isspace(c));
    in.unget();
    return c;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::peekAfterSkipBlanksAndComments ( PStream &  in) [inline]

Peeks the first char after removal of blanks and comments.

Definition at line 174 of file fileutils.h.

References PLearn::PStream::peek(), and skipBlanksAndComments().

Referenced by readAndMacroProcess().

{ skipBlanksAndComments(in); return in.peek(); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::PentadiagonalSolveInPlace ( const TVec< T > &  y,
const TVec< T > &  a,
const TVec< T > &  b,
const TVec< T > &  c 
)

Solver for a summetric Pentadiagonal system.

Code ported from Matlab by NC. The RHS is given by Y. The solution is computed IN-PLACE and overwrites the original Y, A, B, and C vectors. The B and C vectors must have the same length as A and Y, but the last element (for B) and last two elements (for C) don't matter.

Original Matlab code documented as follows:

Author: Kurt Annen annen@web-reg.de Date: 15/05/2004 Internet: www.web-reg.de

Solves the problem Ax=b when A is pentadiagonal and strongly nonsingular. This is much faster than $ x=A\y $ for large matrices.

Reference: Späth, Helmuth "Numerik: Eine Einführung für Mathematiker und Informatiker" S. 110 . Vieweg-Verlag Braunschweig/Wiesbaden (1994)

a = main diagonal b = 2. diagonal c = 3. diagonal

Definition at line 77 of file BandedSolvers.h.

References i, m, n, PLERROR, and PLearn::TVec< T >::size().

Referenced by PLearn::PentaTest::perform().

{
    int n = a.size();
    int m = y.size();
    int o = b.size();
    int p = c.size();

    // Limitation of this routine for now
    if (m < 2)
        PLERROR("PentadiagonalSolve: vectors must have length at least two");
  
    if (n != m || n != o || n != p)
        PLERROR("PentadiagonalSolve: vector dimensions don't agree; they must "
                "all have the same length.");

    c[m-1] = 0;
    c[m-2] = 0;
    b[m-1] = 0;

    T h1=0;
    T h2=0;
    T h3=0;
    T h4=0;
    T h5=0;
    T hh1=0;
    T hh2=0;
    T hh3=0;
    T hh5=0;
    T z=0;
    T hb=0;
    T hc=0;

    for (int i=0 ; i<m ; ++i) {
        z=a[i]-h4*h1-hh5*hh2;
        hb=b[i];
        hh1=h1;
        h1=(hb-h4*h2)/z;
        b[i]=h1;
        hc=c[i];
        hh2=h2;
        h2=hc/z;
        c[i]=h2;
        a[i]=(y[i]-hh3*hh5-h3*h4)/z;
        hh3=h3;
        h3=a[i];
        h4=hb-h5*hh1;
        hh5=h5;
        h5=hc;
    }

    h2=0;
    h1=a[m-1];
    y[m-1]=h1;

    for (int i=m-1 ; i>=0 ; --i) {
        y[i]=a[i]-b[i]*h1-c[i]*h2;
        h2=h1;
        h1=y[i];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::pgetline ( istream &  in)

returns the next line read from the stream, after removing any trailing '\r' and/or '\n'

Definition at line 264 of file stringutils.cc.

References removenewline().

Referenced by extractWordSet(), PLearn::ShellProgressBar::getAsciiFileLineCount(), getProcessDataMemory(), interactiveDisplayCDF(), PLearn::WordNetOntology::loadPredominentSyntacticClasses(), PLearn::GraphicalBiText::loadSensemap(), main(), and PLearn::Grapher::plot_1D_regression().

{
    string line;
    getline(in,line);
    return removenewline(line);
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::pgetline ( PStream &  in)

returns the next line read from the stream, after removing any trailing '\r' and/or '\n'

Definition at line 168 of file PStream.cc.

References PLearn::PStream::getline().

{
    string line;
    in.getline(line);
    // remove any trailing \n and \r
    string::size_type pos = line.length();
    while(pos>=1 && (line[pos - 1]=='\r' || line[pos - 1]=='\n'))
        pos--;
    return line.substr(0,pos);
}

Here is the call graph for this function:

void void void void void PLearn::pl_assert_fail ( const char *  expr,
const char *  file,
unsigned  line,
const char *  function,
const string &  message 
)

Definition at line 223 of file plerror.cc.

References get_error_message(), and PLERROR.

{
    // Note that in this function, just like in 'pl_check_fail' below, it is
    // important that the PLERROR statement fits on a single line. This is
    // because otherwise some tests may fail on some compilers, as the line
    // number of a multi-line statement may be ambiguous.
    string msg = get_error_message("Assertion",
            expr, function, file, line, message);
    PLERROR(msg.c_str());
}

Here is the call graph for this function:

void PLearn::pl_check_fail ( const char *  expr,
const char *  file,
unsigned  line,
const char *  function,
const string &  message 
)

Definition at line 235 of file plerror.cc.

References get_error_message(), and PLERROR.

{
    string msg = get_error_message("Check",
            expr, function, file, line, message);
    PLERROR(msg.c_str());
}

Here is the call graph for this function:

real PLearn::pl_dgammlndz ( real  z)

d(pl_gammln(z))/dz derivate of pl_gammln(z) = digamma function = d(log(gamma(z))/dz

Definition at line 75 of file pl_erf.cc.

References i, pl_gammln_cof, and pl_log.

{
    real tmp0= pl_gammln_cof[0],
        tmp1= 0.0;
    for(int i= 1; i<7; ++i)
    {
        tmp0+= pl_gammln_cof[i]/(z+i);
        tmp1-= pl_gammln_cof[i]/((z+i)*(z+i));
    }
    return (0.5+z)/(5.5+z)-1 + z*(-tmp0/(z*z) + tmp1/z)/tmp0 + pl_log(5.5+z);
}
real PLearn::pl_erf ( real  x)

The error function.

Definition at line 155 of file pl_erf.cc.

References erf(), and pl_gammq().

Referenced by PLearn::PLearner::computeOutputCovMat(), PLearn::ErfVariable::fprop(), gauss_01_cum(), and PLearn::VMatLanguage::run().

                    {
#ifdef __GNUC__
    //8.5 time faster in my test then plearn version.
    return erf(x);
#else
    //it is pl_gcf that take too much time...optimise?
    return (x<0?-1:1)*(1-pl_gammq(0.5,x*x));
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::pl_gammln ( real  z)

function gamma returns log(Gamma(z)), where $ Gamma(z) = \int_0^infty t^{z-1}*e^{-t} dt $

Definition at line 61 of file pl_erf.cc.

References i, Log2Pi, pl_gammln_cof, and pl_log.

Referenced by PLearn::NegLogPoissonVariable::fprop(), PLearn::ManifoldKNNDistribution::log_density(), pl_gcf(), and pl_gser().

{
    double gz,tmp;
    static double gamma = 5.0;
    gz = (z+0.5)*pl_log(z+gamma+0.5);
    gz -= z+gamma+0.5;
    gz += 0.5*Log2Pi;
    tmp = pl_gammln_cof[0];
    for(int i=1;i<7;i++) tmp += pl_gammln_cof[i]/(z+i);
    gz += pl_log(tmp/z);
    return(gz);
}

Here is the caller graph for this function:

real PLearn::pl_gammq ( real  a,
real  x 
)

returns the incomplete gamma function Q(a,x) = 1 - P(a,x) it either uses the series or the continued fraction formula

Definition at line 145 of file pl_erf.cc.

References pl_gcf(), pl_gser(), and PLERROR.

Referenced by pl_erf().

                              {
    if (x<0 || a<0)
        PLERROR("Error in function gammax. Bad arguments.");
    if (x<a+1) 
        return 1-pl_gser(a,x);
    return pl_gcf(a,x);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::pl_gcf ( real  a,
real  x 
)

returns the continued fraction representation of the incomplete gamma function

Definition at line 111 of file pl_erf.cc.

References a, b, c, d, EPS, exp(), FPMIN, i, is_missing(), ITMAX, pl_gammln(), pl_log, PLASSERT, and PLWARNING.

Referenced by pl_gammq().

{
    PLASSERT( !is_missing(a) && !is_missing(x) );
  
    int i;
    real an,b,c,d,del,h;

    real gln=pl_gammln(a);
    b=x+1.0-a;
    c=1.0/FPMIN;
    d=1.0/b;
    h=d;
    for (i=1;i<=ITMAX;i++) {
        an = -i*(i-a);
        b += 2.0;
        d=an*d+b;
        if (fabs(d) < FPMIN) d=FPMIN;
        c=b+an/c;
        if (fabs(c) < FPMIN) c=FPMIN;
        d=1.0/d;
        del=d*c;
        h *= del;
        if (fabs(del-1.0) < EPS) break;
    }
    if (i > ITMAX) {
        PLWARNING("\"a\" is too large, ITMAX too small in "
                  "calling pl_gcf(%f,%f)", a,x);
    }
    return exp(-x+a*pl_log(x)-(gln))*h;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::pl_gser ( real  a,
real  x 
)

returns the series value of the incomplete gamma function

Definition at line 90 of file pl_erf.cc.

References a, exp(), fast_exact_is_equal(), g, i, ITMAX, pl_gammln(), pl_log, PLERROR, and sum().

Referenced by pl_gammq().

                             {
    real EPSILON = 1e-7;
    real g = pl_gammln(a);  
    real sum,term;
    if (x<0 || a<0)
        PLERROR("Error in function pl_gser. Bad argument.");
    else if (fast_exact_is_equal(x, 0)) 
        return 0;

    sum = term = 1/a;  
    for(int i=1;i<ITMAX;i++) {
        term *= x/(a+i);
        sum += term;
        if (term < sum*EPSILON) break;
    }
    return exp(-x+a*pl_log(x)-g)*sum;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::pl_islong ( const string &  s)

Definition at line 189 of file lexical_cast.cc.

Referenced by PLearn::VMatrix::getFieldIndex(), PLearn::SelectColumnsVMatrix::getIndicesFromFields(), and PLearn::HyperOptimize::optimize().

{
    // c_str() might yield very short-lived temporaries, don't assume those
    // pointers live beyond the syntactic expression.
    const char *nptr;
    char *endptr;
    strtol((nptr=s.c_str()), &endptr, 10);
    return endptr && (endptr - nptr == int(s.size()));
}

Here is the caller graph for this function:

bool PLearn::pl_isnumber ( const string &  s,
double *  dbl = NULL 
)

This function handles numbers with exponents (such as 10.2E09) as well as Nans.

String can have trailing whitespaces on both sides. Returns false for an empty string.

Definition at line 157 of file lexical_cast.cc.

References d, MISSING_VALUE, pl_strtod(), and removeblanks().

Referenced by PLearn::LIBSVMSparseVMatrix::build_(), PLearn::BallTreeNearestNeighbors::FindBallKNN(), PLearn::VMatLanguage::generateCode(), PLearn::VecStatsCollector::getFieldNum(), PLearn::WordNetSenseDictionary::getId(), getList(), PLearn::VMatrix::hasFieldInfos(), loadAscii(), PLearn::TextFilesVMatrix::loadMappings(), loadUCIMLDB(), loadUCISet(), PLearn::PDate::PDate(), PLearn::VMatLanguage::preprocess(), readAndMacroProcess(), PLearn::LearnerCommand::run(), PLearn::DiffCommand::run(), PLearn::VMatrix::setMetaInfoFrom(), PLearn::VMatLanguage::staticPreprocess(), PLearn::StrTableVMatrix::StrTableVMatrix(), PLearn::TextFilesVMatrix::transformStringToValue(), PLearn::TxtmatCommand::view(), viewVMat(), and vmatmain().

{
    double d;
    string s=removeblanks(str);
    char* l;
    d = pl_strtod(s.c_str(),&l);
    if(s.empty())
        d = MISSING_VALUE;
    if(dbl)
        *dbl=d;
    if(s.empty())
        return false;
    else
        return ((unsigned char)(l-s.c_str())==s.length());
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::pl_isnumber ( const string &  str,
float *  dbl 
)

Definition at line 173 of file lexical_cast.cc.

References d, MISSING_VALUE, pl_strtof(), and removeblanks().

                                                {
    float d;
    string s=removeblanks(str);
    char* l;
    d = pl_strtof(s.c_str(),&l);
    if(s.empty())
        d = MISSING_VALUE;
    if(dbl)
        *dbl=d;
    if(s.empty())
        return false;
    else
        return ((unsigned char)(l-s.c_str())==s.length());
}

Here is the call graph for this function:

string PLearn::pl_repository_compile_date ( )

Return the date when pl_repository_revision.cc was compiled.

Definition at line 66 of file pl_repository_revision.cc.

Referenced by version_string().

{
    return string(__DATE__);
}

Here is the caller graph for this function:

string PLearn::pl_repository_compile_time ( )

Return the time when pl_repository_revision.cc was compiled.

Definition at line 74 of file pl_repository_revision.cc.

Referenced by version_string().

{
    return string(__TIME__);
}

Here is the caller graph for this function:

string PLearn::pl_repository_revision ( )

Return a string giving the version-control repository revision(s) with which this PLearn executable has been compiled.

Definition at line 57 of file pl_repository_revision.cc.

References MACRO_TO_STRING.

Referenced by PLearn::PLearnServer::callFunction(), PLearn::PyPLearnScript::close(), and version_string().

{
    // PL_REPOSITORY_REVISION is a command-line define from pymake.
    return MACRO_TO_STRING(PL_REPOSITORY_REVISION);
}

Here is the caller graph for this function:

double PLearn::pl_strtod ( const char *  nptr,
char **  endptr 
)

Conversion from string to double or float.

Under Windows, these functions mimic the behavior of the Linux stdlib corresponding functions (that correctly handle NaN and Infinity, contrary to their Windows counterpart). Under other operating systems, the stdlib functions are called directly.

Definition at line 58 of file lexical_cast.cc.

References c, i, minus(), MISSING_VALUE, and PLASSERT.

Referenced by PLearn::MultiInstanceVMatrix::build_(), loadAscii(), loadAsciiSingleBinaryDescriptor(), pl_isnumber(), pl_strtof(), and todouble().

{
#ifdef WIN32
    int i = 0;
    char c;
    while (isspace(c = nptr[i++])) {}
    const char* end_parsing;
    bool success = false;
    bool minus = false;
    bool infinity = false;
    bool missing = false;
    if (c != 0) {
        if (c == '+')
            c = nptr[i++];
        else if (c == '-') {
            c = nptr[i++];
            minus = true;
        }
        if (c == 'i' || c == 'I') {
            // Try to read an 'inf'.
            c = nptr[i++];
            if (c == 'n' || c == 'N') {
                c = nptr[i++];
                if (c == 'f' || c == 'F') {
                    success = true;
                    infinity = true;
                    end_parsing = nptr + i;
                }
            }
        } else if (c == 'n' || c == 'N') {
            // Try to read a 'nan'.
            c = nptr[i++];
            if (c == 'a' || c == 'A') {
                c = nptr[i++];
                if (c == 'n' || c == 'N') {
                    success = true;
                    missing = true;
                    end_parsing = nptr + i;
                }
            }
        } else {
            // Try to read a 'normal' number. In such a case the standard
            // 'strtod' function should work properly.
            return strtod(nptr, endptr);
        }
    }
    if (success) {
        // Ensure there are no weird trailing characters.
        while (isspace(c = nptr[i++])) {}
        if (c != 0)
            success = false;
    }
    if (!success) {
        // Could not perform the conversion.
        if (endptr)
            *endptr = (char*) nptr;
        return 0;
    }
    if (endptr)
        *endptr = (char*) end_parsing;
    if (missing)
        return MISSING_VALUE;
    if (infinity)
        return minus ? - INFINITY : INFINITY;
    PLASSERT( false );
    return 0;
#else
    // Under other operating systems, there shoud be no problems with NaN and
    // Infinity.
    return strtod(nptr, endptr);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

float PLearn::pl_strtof ( const char *  nptr,
char **  endptr 
)

Definition at line 134 of file lexical_cast.cc.

References d, is_missing(), pl_strtod(), and PLWARNING.

Referenced by pl_isnumber().

{
#ifdef WARN_STRTOF_ROUND
    //We do it this way to detect if we have enought precision to store it in a float.
    //Their is no error generated if the string is "84672690528" event if 84672692224f is returned.
    float f;
    double d = pl_strtod(nptr, endptr);
    f = float(d);
    if(d!=f && !is_missing(f))
        PLWARNING("In pl_strtof() - float does not have enough precision to"
                  " store %s. It is stored as %f. Float has 24 binary digits"
                  " of precision (6 decimal digits of precision)", nptr, f);
    return f;
#elif defined(WIN32)
    return float(pl_strtod(nptr, endptr));
#else
    return strtof(nptr, endptr);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::pl_swap ( T &  a,
T &  b 
) [inline]

Swap two variables.

It is named 'pl_swap' to avoid a conflict with the STL 'swap' function.

Definition at line 237 of file general.h.

References a, and b.

Referenced by PLearn::BallTreeNearestNeighbors::BallKNN(), remove_missing_inplace(), and PLearn::TMat< pair< real, real > >::transpose().

{ 
    T tmp; 
    tmp = a;
    a = b;
    b = tmp;
}

Here is the caller graph for this function:

int PLearn::plearn_main ( int  argc,
char **  argv,
int  major_version,
int  minor_version,
int  fixlevel 
)

Definition at line 332 of file plearn_main.cc.

References catch_interrupt_signal(), endl(), PLearn::PLMPI::finalize(), findpos(), global_options(), PLearn::PLMPI::init(), PLearn::PLearnError::message(), perr, PLearn::Profiler::pl_profile_deactivate(), PLearn::Profiler::pl_profile_end(), PLearn::Profiler::pl_profile_report(), PLearn::Profiler::pl_profile_reportwall(), PLearn::Profiler::pl_profile_start(), plearn_terminate_handler(), prgname(), PLearn::PLearnCommandRegistry::run(), seed(), setVersion(), and stringvector().

Referenced by main().

{
    setVersion(major_version, minor_version, fixlevel);

    // Establish the terminate handler that's called in situations of
    // double-fault.
    set_terminate(plearn_terminate_handler);

    //catch interrup signal and throw an PLERROR                         
    catch_interrupt_signal();                                            
                                                                         
    vector<string> command_line;
    vector<string> command_line_orig;
    
    int EXIT_CODE = 0;
    try {

#if USING_MPI
        PLMPI::init(&argc, &argv);
#endif

        seed();

        // set program name
        prgname(argv[0]);

        command_line = stringvector(argc-1, argv+1);
        command_line_orig = command_line;
        string command = global_options(command_line);

        if ( command == "" )
        {
            perr << "Type '" << prgname() << " help' for help" << endl;
            return 0;
        }

        Profiler::pl_profile_start("Prog");

        PLearnCommandRegistry::run(command, command_line);
#if USING_MPI
        PLMPI::finalize();
#endif

    } // end of try
    catch(const PLearnError& e)
    {
        perr << "FATAL ERROR: " << e.message() << endl;
        EXIT_CODE = 1;
    }
    catch (std::exception& e)
    {
        perr << "FATAL ERROR thrown by STL : " << e.what() << endl;
        EXIT_CODE = 2;
    }
    catch (...) 
    {
        perr << "FATAL ERROR: uncaught unknown exception "
             << "(ex: out-of-memory when allocating a matrix)" << endl;
        EXIT_CODE = 2;
    }

    if(findpos( command_line_orig, "--profile" )!=-1){
        Profiler::pl_profile_end("Prog");
        Profiler::pl_profile_deactivate();
        Profiler::pl_profile_report(perr);
        Profiler::pl_profile_reportwall(perr);
    }else if(findpos( command_line_orig, "--profile-wall" )!=-1){
        Profiler::pl_profile_end("Prog");
        Profiler::pl_profile_deactivate();
        Profiler::pl_profile_reportwall(perr);
    }
    return EXIT_CODE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::plearn_terminate_handler ( )

Definition at line 324 of file plearn_main.cc.

References endl(), and perr.

Referenced by plearn_main().

{
    perr << "PLEARN UNUSUAL TERMINATION: plearn_terminate_handler called, probably due \n"
         << "to second exception thrown while unwinding stack following a first \n"
         << "exception. ABORTING!" << endl;
    abort();
}

Here is the call graph for this function:

Here is the caller graph for this function:

PL_Log::Heading PLearn::plhead ( string  s) [inline]

Manipulator that displays a nice heading.

Definition at line 350 of file pl_log.h.

Referenced by canonical(), PLearn::PPath::canonical(), PLearn::PLLogTest::perform(), plsep(), and UNIT_TEST().

{
    return PL_Log::Heading(s);
}

Here is the caller graph for this function:

Var PLearn::plogp ( Var  v) [inline]

Definition at line 73 of file PLogPVariable.h.

Referenced by entropy().

{ return new PLogPVariable(v); }

Here is the caller graph for this function:

void PLearn::plotVMats ( char *  defs[],
int  ndefs 
)

Definition at line 561 of file vmatmain.cc.

References endl(), PLearn::PStream::get(), getDataSet(), i, PLearn::TVec< T >::length(), PLERROR, pout, PLearn::TVec< T >::resize(), saveGnuplot(), split(), PLearn::TVec< T >::subVec(), toint(), and tostring().

Referenced by vmatmain().

{
    /* defs[] is of format:
       { "<dataset0>", "<col0>[:<row0>:<nrows0>]", ..., "<datasetN>", "<colN>[:<rowN>:<nrowsN>]" }
    */
    int nseries= ndefs/2;
    TmpFilenames tmpfnames(nseries, "/tmp/", "_vmat_plot_");
    Array<VMat> vmats(nseries);
    Array<Vec> series(nseries);
    string gp_command= "plot ";
    for(int i= 0; i < nseries; ++i)
    {
        vmats[i]= getDataSet(string(defs[2*i]));

        vector<string> spec= PLearn::split(defs[2*i+1], ":");
      
        series[i].resize(vmats[i].length());
        vmats[i]->getColumn(toint(spec[0]),series[i]);

        if(spec.size() == 3)
        {
            int row= toint(spec[1]), nrows= toint(spec[2]);
            if(row+nrows > series[i].length())
                nrows= series[i].length()-row;
            series[i]= series[i].subVec(row, nrows);
        }
        else if(spec.size() != 1)
            PLERROR("in plotVMats: invalid spec for vmat %s: '%s'; sould be '<col>[:<row>:<nrows>]'.",
                    defs[2*i], defs[2*i+1]);

        saveGnuplot(tmpfnames[i].c_str(), series[i]);
        chmod(tmpfnames[i].c_str(),0777);      
        gp_command+= " '" + tmpfnames[i] + "' title '" + defs[2*i] + ' ' + defs[2*i+1] + "' " + tostring(i+1)  +", ";
    }
    gp_command.resize(gp_command.length()-2);

    Gnuplot gp;
    gp << gp_command << endl;
  
    pout << "Press any key to close GNUplot window and exit." << endl;
    cin.get();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLPythonConversionError ( const char *  function_name,
PyObject *  pyobj,
bool  print_traceback 
)
PStream & PLearn::plsep ( PStream &  )

If the "PL_LOG_MODULE_NAME" variable is defined before pl_log.h is included, then *_MODULE_LOG are defined to provide module-specified logging for that module.

From an implementation standpoint, we define a static string variable that holds the module name, and that variable is used.

The equivalent of MAND_, IMP_, NORMAL_, DBG_, AND EXTREME_ are defined for module logs as well, although NORMAL_MODULE_LOG is simply abbreviated MODULE_LOG.

NOTE: to avoid conflicts and strange behavior, you should only use this define within a .cc file (outside of templates). For templates, you have to rely on NAMED_LOG for now. Manipulator that displays a separator with the Logger count

Definition at line 327 of file pl_log.cc.

References plhead().

Referenced by PLearn::PLLogTest::perform().

{
    return p << plhead("");
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::plusColumn ( Var  v1,
Var  v2 
) [inline]

Definition at line 80 of file PlusColumnVariable.h.

{ 
    return new PlusColumnVariable(v1,v2); 
}
real PLearn::poidev ( real  xm)
Returns:
returns a deviate distributed as a poisson distribution of mean (lambda) 'xm'\ from the 'numerical recipes'.

Definition at line 389 of file random.cc.

References exp(), fast_exact_is_equal(), g, log_gamma(), Pi, pl_log, sqrt(), and uniform_sample().

{
    static real sq,alxm,g,oldm=(-1.0);
    real em,t,y;

    if (xm < 12.0) {
        if (!fast_exact_is_equal(xm, oldm)) {
            oldm=xm;
            g=exp(-xm);
        }
        em = -1;
        t=1.0;
        do {
            ++em;
            t *= uniform_sample();
        } while (t > g);
    } else {
        if (!fast_exact_is_equal(xm, oldm)) {
            oldm=xm;
            sq=sqrt(2.0*xm);
            alxm=pl_log(xm);
            g=xm*alxm-log_gamma(xm+1.0);
        }
        do {
            do {
                y=tan(Pi*uniform_sample());
                em=sq*y+xm;
            } while (em < 0.0);
            em=floor(em);
            t=0.9*(1.0+y*y)*exp(em*alxm-log_gamma(em+1.0)-g);
        } while (uniform_sample() > t);
    }
    return em;
}

Here is the call graph for this function:

bool PLearn::pointIsInterior ( const TriType  tri_type,
const int  m2face,
const SurfMesh &  mesh2 
)

Definition at line 888 of file geometry.cc.

References EDGE1, EDGE2, EDGE3, VERTEX1, VERTEX2, and VERTEX3.

Referenced by isOverlapping().

{
  // depending on tri_type, check whether the mesh points are boundary points
  MFace mf = mesh2->getFace( m2face );
  int bf1 = mesh2->getVertex( mf->pts[0] )->bf;
  int bf2 = mesh2->getVertex( mf->pts[1] )->bf;
  int bf3 = mesh2->getVertex( mf->pts[2] )->bf;

  switch( tri_type )
  {
    case VERTEX1:
      if( bf1 ) return false;
      break;
    case VERTEX2:
      if( bf2 ) return false;
      break;
    case VERTEX3:
      if( bf3 ) return false;
      break;
    case EDGE1:
      if( bf1 && bf2 ) return false;
      break;
    case EDGE2:
      if( bf2 && bf3 ) return false;
      break;
    case EDGE3:
      if( bf3 && bf1 ) return false;
      break;
    default:
      break;
  }
  return true;
}

Here is the caller graph for this function:

template<class T >
int PLearn::positionOfClosestElement ( const TVec< T > &  vec,
const T &  value,
bool  is_sorted_vec = false 
)

returns the position of the element in the vector that is closest to value If is_sorted_vec is true the procedure assumes the vector's elements are sorted in ascending order and uses a dichotomy search.

Definition at line 2589 of file TMat_maths_impl.h.

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

{
    T* v = vec.data();
    if (is_sorted_vec) // dichotomy search
    {
        int pos = binary_search(vec, value);
        if (pos == -1) return 0;
        else if (pos == vec.length()-1) return pos;
        T dist1 = fabs(v[pos]-value);
        T dist2 = fabs(v[pos+1]-value);
        if (dist1 <= dist2) return pos;
        else return pos+1;
    }
    else // linear search
    {
        int pos_of_closest = 0;
        T dist_to_closest = fabs(v[0]-value);
        for(int i=1; i<vec.length(); i++)
        {
            T dist = fabs(v[i]-value);
            if(dist<dist_to_closest)
            {
                pos_of_closest = i;
                dist_to_closest = dist;
            }
        }
        return pos_of_closest;
    }
}

Here is the call graph for this function:

template<class T >
int PLearn::positionOfkthOrderedElement ( const TVec< T > &  vec,
int  k 
)

Definition at line 2448 of file TMat_maths_impl.h.

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

Referenced by kthOrderedElement().

{
#ifdef BOUNDCHECK
    if(k<0 || k>=vec.length())
        PLERROR("In positionOfkthOrderedElement, k out of bounds");
#endif

    T* v = vec.data();

    T minval = -FLT_MAX;
    int pos = -1;
    int l=0;

    while(l<=k)
    {
        int nelements_equal_to_newminval = 0;
        T newminval = FLT_MAX;
        for(int i=0; i<vec.length(); i++)
        {
            if(v[i]>minval)
            {
                if(v[i]<newminval)
                {
                    newminval = v[i];
                    nelements_equal_to_newminval = 1;
                    pos = i;
                }
                else if(v[i]==newminval)
                    nelements_equal_to_newminval++;
            }
        }
        l += nelements_equal_to_newminval;
        minval = newminval;
    }

    return pos;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::positive ( Var  v) [inline]

Definition at line 79 of file CutBelowThresholdVariable.h.

References cutBelowThreshold().

{ return cutBelowThreshold(v,0.0); }

Here is the call graph for this function:

real PLearn::positive ( real  a) [inline]

Definition at line 137 of file pl_math.h.

References a.

Referenced by PLearn::ConditionalDensityNet::build_(), and PLearn::PLMathTest::perform().

{ if (a>0) return a; return 0; }

Here is the caller graph for this function:

real PLearn::positive_dilogarithm ( real  x)

Definition at line 228 of file pl_math.cc.

References fast_exact_is_equal(), Pi, pl_log, and small_dilogarithm().

Referenced by dilogarithm().

{
    if (x<0.5)
        return small_dilogarithm(x);
    else if (x<1.0)
        return Pi*Pi/6.0 - small_dilogarithm(1.0-x) - pl_log(x)*pl_log(1-x);
    else if (fast_exact_is_equal(x, 1.0))
        return Pi*Pi/6.0;
    else if (x<=1.01)
    {
        real delta=x-1.0;
        real log_delta=pl_log(delta);
        return Pi*Pi/6.0 + delta*(1-log_delta+delta*
                                  ((2*log_delta-1)/4 + delta*
                                   ((1-3*log_delta)/9 + delta*
                                    ((4*log_delta-1)/16 + delta*
                                     ((1-5*log_delta)/25 + delta*
                                      ((6*log_delta-1)/36 + delta*
                                       ((1-7*log_delta)/49 + delta*
                                        (8*log_delta-1)/64)))))));
    }
    else if (x<=2.0)
    {
        real logx = pl_log(x);
        return Pi*Pi/6.0 + small_dilogarithm(1.0-1.0/x) - logx*(0.5*logx+pl_log(1-1/x));
    } else 
    {
        real logx = pl_log(x);
        return Pi*Pi/3.0 - small_dilogarithm(1.0/x) - 0.5*logx*logx;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::positiveValues ( const TVec< T > &  vec)

returns a vector composed of the values of v that are greater than 0;

Definition at line 2573 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TVec< T >::length(), n, and w.

{
    T *v =vec.data();
    int n=0;
    for(int i=0;i<vec.length(); i++) if (v[i]>0) n++;
    TVec<T> w(n);
    int j=0;
    for(int i=0;i<vec.length(); i++) if (v[i]>0) w[j++]=v[i];
    return(w);
}

Here is the call graph for this function:

Var PLearn::potentials ( Var  the_input,
Var  the_comp_input,
Var  the_dp_target,
Var  the_target_dist_rep,
Var  the_output,
VarArray  the_proppath_params,
VMat  the_distr 
) [inline]

Definition at line 97 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
Var PLearn::pow ( Var  v,
Var  power 
) [inline]

Definition at line 90 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
Var PLearn::pow ( Var  v,
real  power 
) [inline]

Definition at line 77 of file PowVariable.h.

Referenced by PLearn::RegressionTreeLeave::addRow(), PLearn::VMatrixFromDistribution::build_(), PLearn::RegressionTree::build_(), PLearn::BaseRegressorConfidence::build_(), PLearn::AsciiVMatrix::build_(), PLearn::VMatrix::compareStats(), PLearn::EntropyContrast::compute_diversity_cost(), PLearn::SecondIterationWrapper::computeCostsFromOutputs(), PLearn::ComputePurenneError::computeCostsFromOutputs(), PLearn::BaseRegressorWrapper::computeCostsFromOutputs(), PLearn::BaseRegressorConfidence::computeCostsFromOutputs(), PLearn::MultiClassAdaBoost::computeCostsFromOutputs_(), PLearn::RegressionTree::computeCostsFromOutputsAndNodes(), PLearn::TestImputations::computeCovPresStats(), PLearn::NnlmOutputLayer::computeEmpiricalLearningRateParameters(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::TestImputations::computeMeanMedianModeStats(), PLearn::TestImputations::computeNeighborhoodStats(), PLearn::BaseRegressorConfidence::computeOutput(), PLearn::MultiClassAdaBoost::computeOutputAndCosts(), PLearn::SecondIterationWrapper::computeSalesStatistics(), PLearn::LocalizedFeaturesLayerVariable::computeSubsets(), PLearn::TestImputations::computeTreeCondMeanStats(), PLearn::RationalQuadraticARDKernel::derivIspAlpha(), PLearn::RationalQuadraticARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::PvGradNNet::discountGrad(), PLearn::WeightedDistance::evaluate(), PLearn::ScaledGeneralizedDistanceRBFKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::GeneralizedDistanceRBFKernel::evaluate(), PLearn::BinaryKernelDiscrimination::evaluate(), PLearn::BetaKernel::evaluate(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), findSmallestEigenPairOfSymmMat(), PLearn::SemiSupervisedProbClassCostVariable::fprop(), PLearn::PowVariableVariable::fprop(), PLearn::TransformationLearner::gamma_sample(), PLearn::SpiralDistribution::generate(), PLearn::TransformationLearner::generatePredictedFrom(), PLearn::RBMLocalMultinomialLayer::getConfigurationCount(), PLearn::RegressionTreeMulticlassLeaveProb::getOutputAndError(), PLearn::RegressionTreeMulticlassLeaveFast::getOutputAndError(), PLearn::RegressionTreeMulticlassLeave::getOutputAndError(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), PLearn::RegressionTreeMulticlassLeaveProb::initStats(), PLearn::RegressionTreeMulticlassLeaveFast::initStats(), PLearn::RegressionTreeMulticlassLeave::initStats(), PLearn::RegressionTreeLeave::initStats(), PLearn::TransformationLearner::log_density(), mypow(), PLearn::PvGradNNet::neuronDiscountGrad(), norm(), PLearn::NatGradSMPNNet::onlineStep(), PLearn::NatGradNNet::onlineStep(), PLearn::NatGradEstimator::operator()(), PLearn::RemoveObservationTest::perform(), pownorm(), PLearn::RegressionTreeLeave::removeRow(), rosenbrock(), PLearn::VMatLanguage::run(), PLearn::FieldConvertCommand::run(), PLearn::KNNRegressor::setTrainingSet(), PLearn::KNNClassifier::setTrainingSet(), sqrt(), PLearn::PowVariable::symbolicBprop(), SymmMatNullSpaceByInversePowerIteration(), PLearn::DeepNNet::train(), PLearn::TransformationLearner::treeDataSet(), and vmatmain().

{ return new PowVariable(v,power); }
template<class T >
T PLearn::powdistance ( const TVec< T > &  vec1,
const TVec< T > &  vec2 
) [inline]

Definition at line 1114 of file TMat_maths_impl.h.

References powdistance().

{ return powdistance(vec1, vec2, 2.0); }

Here is the call graph for this function:

template<class T >
T PLearn::powdistance ( const TVec< T > &  vec1,
const TVec< T > &  vec2,
double  n,
bool  ignore_missing = false 
)

Compute ||vec1 - vec2||_n^n.

If 'ignore_missing' is set to true, only components where both 'vec1' and 'vec2' have non missing values will be taken into account. Otherwise, having missing values will result in a 'nan' value being returned.

Definition at line 1066 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), diff(), fast_exact_is_equal(), i, is_missing(), PLearn::TVec< T >::length(), mypow(), and PLERROR.

Referenced by PLearn::BallTreeNearestNeighbors::BallKNN(), PLearn::DTWKernel::build_(), closestPointOnTriangle(), PLearn::WPLS::computeCostsFromOutputs(), PLearn::RegressorFromDistribution::computeCostsFromOutputs(), PLearn::PCA::computeCostsFromOutputs(), PLearn::LinearRegressor::computeCostsFromOutputs(), PLearn::KNNRegressor::computeCostsFromOutputs(), PLearn::KernelRidgeRegressor::computeCostsFromOutputs(), PLearn::DeepNNet::computeCostsFromOutputs(), PLearn::ConstantRegressor::computeCostsFromOutputs(), PLearn::BestAveragingPLearner::computeCostsFromOutputs(), PLearn::BallTreeNearestNeighbors::computeCostsFromOutputs(), PLearn::AutoLinearRegressor::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::LocalGaussianClassifier::computeLogWeight(), computeNearestNeighbors(), PLearn::KMeansClustering::computeOutput(), PLearn::BaseRegressorConfidence::computeOutput(), PLearn::TransformationLearner::computeReconstructionWeight(), PLearn::LocalizedFeaturesLayerVariable::computeSubsets(), PLearn::ChemicalICP::computeWeightedDistance(), PLearn::ICP::computeWeights(), PLearn::BallTreeNearestNeighbors::contain(), PLearn::BallTreeNearestNeighbors::createAnchors(), dist(), PLearn::ICP::dynamicDistanceThreshold(), PLearn::DiagonalNormalRandomVariable::EMBprop(), PLearn::PowDistanceKernel::evaluate(), PLearn::LogOfGaussianDensityKernel::evaluate(), PLearn::GaussianDensityKernel::evaluate(), PLearn::DistanceKernel::evaluate(), PLearn::CompactVMatrixGaussianKernel::evaluate(), PLearn::VMatrix::find(), PLearn::BallTreeNearestNeighbors::FindBallKNN(), PLearn::TransformationLearner::findNearestNeighbors(), PLearn::StackedFocusedAutoassociatorsNet::fineTuningStep(), PLearn::SquaredErrorCostModule::fprop(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::BallTreeNearestNeighbors::intersect(), PLearn::GaussMix::kmeans(), PLearn::ChemicalICP::matchNearestNeighbors(), maxPointMotion(), PLearn::IncrementalNNet::output_loss(), PLearn::VarUtilsTest::perform(), powdistance(), PLearn::TransformationLearner::reconstructionEuclideanDistance(), PLearn::KMeansClustering::train(), PLearn::ConstantRegressor::train(), and PLearn::BaseRegressorConfidence::train().

{
#ifdef BOUNDCHECK
    if(vec1.length() != vec2.length())
        PLERROR("In weighted_powdistance: vec1, vec2 should have the same length (%d!=%d)",
                vec1.length(), vec2.length());
#endif
    int length = vec1.length();
    if (length == 0)
        return 0.0;
    T result = 0;
    T diff = 0;
    T* v1 = vec1.data();
    T* v2 = vec2.data();
    if(fast_exact_is_equal(n, 1.0)) // L1 distance
    {
        for(int i=0; i<length; i++, v1++, v2++)
            if (!ignore_missing || (!is_missing(*v1) && !is_missing(*v2))) {
                diff = *v1 - *v2;
                if(diff >= 0)
                    result += diff;
                else
                    result -= diff;
            }
    }
    else if(fast_exact_is_equal(n, 2.0))
    {
        for(int i=0; i<length; i++, v1++, v2++)
            if (!ignore_missing || (!is_missing(*v1) && !is_missing(*v2))) {
                diff = *v1 - *v2;
                result += diff*diff;
            }
    }
    else
    {
        for(int i=0; i<length; i++, v1++, v2++)
            if (!ignore_missing || (!is_missing(*v1) && !is_missing(*v2))) {
                diff = *v1 - *v2;
                if(diff<0)
                    diff = -diff;
                result += mypow(diff,n);
            }
    }
    return result;
}

Here is the call graph for this function:

Var PLearn::powdistance ( Var  input1,
Var  input2,
real  n 
)

Definition at line 106 of file Var_utils.cc.

References pownorm().

{ return pownorm(input1-input2, n); }

Here is the call graph for this function:

template<class MatT >
real PLearn::PowerIteration ( MatT  A,
Vec  x0,
int n_iterations,
real  RayleighQuotientTolerance,
Mat  final_vectors,
int final_offset,
bool  verbose = false 
)

Perform a power iteration to find the largest eigen-pairs of a generic (square) matrix A (i.e. quasi-eigenvectors whose eigenvalues are the largest in magnitude). The algorithm essentially iterates x_t = A x_{t-1} where x0 is provided in argument. The user specifies the maximum number of iterations in n_iterations (and upon return this variable contains the actual number of iterations taken). The iterations also stop if the Rayleigh quotient does not improve by more than the fraction RayleighQuotientTolerance. The last N set of x_t's that were visited will be in the rows of final_vectors (where N is specified by the length of this matrix, and N must be at least 3 for temporary storage). Since the algorithm uses final_vectors as a shift register for the x_t's the final x_T will be at row final_offset. Returns the estimated eigenvalue of x_T, i.e. |A x_T|. Note also that the final_vectors all have norm 1 but are not generally orthogonal.

check Rayleigh quotient (note that norm(current)=1)

normalize

stop

iterate

Definition at line 492 of file GenMat.h.

References dot(), endl(), PLearn::TMat< T >::length(), max(), N, norm(), PLERROR, PLWARNING, and product().

{
    int N=final_vectors.length();
    if (N<3) PLERROR("PowerIteration: final_vectors.length_ = %d should be >= 3",N);
    Vec previous=final_vectors(0);
    Vec current=final_vectors(1);
    Vec next=final_vectors(2);
    previous << x0; 
    real max_x = max(previous);
    if (max_x<0) previous*=-1;
    product(A, previous,current);
    real current_norm=norm(current), next_norm, current_Rq, previous_Rq=0;
    max_x = max(current);
    if (max_x<0) current*=-1;
    current/=current_norm;
    int it=1;
    for (;it<=n_iterations;it++)
    {
        product(A, current,next);
        current_Rq = dot(current,next);
        next_norm = norm(next);
        next/=next_norm;
        max_x = max(next);
        if (max_x<0) next*=-1;
        if (verbose)
        {
            cout << "at iteration " << it << ", R(A,x) = " << current_Rq << ", |Ax|/|x| = " 
                 << next_norm << endl;
        }
        if (current_Rq < previous_Rq)
            PLWARNING("PowerIteration: something strange, x'Ax/x'x is decreasing %g->%g",
                      previous_Rq, current_Rq);
        if (it>=N && current_Rq / previous_Rq - 1 < RayleighQuotientTolerance)
        {
            n_iterations = it;
            final_offset = it%N;
            if (verbose)
                cout << "power iteration finishes with |Ax|/|x| = " << next_norm << endl;
            return next_norm;
        }
        previous_Rq = current_Rq;
        current_norm = next_norm;
        previous = current;
        current = next;
        next = final_vectors((it+2)%N);
    }
    final_offset = it%N;
    if (verbose)
        cout << "power iteration finishes FAILING with |Ax|/|x| = " << next_norm << endl;
    return next_norm;
}

Here is the call graph for this function:

template<class MatT >
real PLearn::PowerIteration ( MatT &  A,
Vec  x0,
int n_iterations,
real  RayleighQuotientTolerance,
Mat  final_vectors,
int final_offset 
)

do it with templates

Perform the "power iteration" algorithm to find the maximum eigen-pair of a generic matrix A, until convergence of the "eigenvalue" as estimated by the Rayleigh quotient x'Ax/(x'x). x_t = A x_{t-1} / norm(A x_{t-1}) The Rayleigh quotient tolerance is the required fraction of increase of x_t'Ax_t. The algorithm would also stop if the given number of iterations is reached. Upon return the actual number of iterations is set in n_iterations. The function returns the final value of |Ax|/|x| (which is an estimator of the largest eigenvalue (associated to x, if x is an eigenvector), and copies N last x_t's in the rows of final_vectors matrix (of length N). N should be at least 3. The row of the final vector is given in final_offset (it is the one which should have the largest Rayleigh quotient).

check Rayleigh quotient (note that norm(current)=1)

normalize

<< next_norm << endl;

stop

iterate

Definition at line 414 of file GenMat.h.

References dot(), PLearn::TMat< T >::length(), N, norm(), PLERROR, PLWARNING, and product().

Referenced by GDFindSmallEigenPairs(), and SymmMatNullSpaceByInversePowerIteration().

{
    int N=final_vectors.length();
    if (N<3) PLERROR("PowerIteration: final_vectors.length_ = %d should be >= 3",N);
    Vec previous=final_vectors(0);
    Vec current=final_vectors(1);
    Vec next=final_vectors(2);
    previous << x0; 
    product(A, previous,current);
    real current_norm=norm(current), next_norm, current_Rq, previous_Rq=0;
    current/=current_norm;
    for (int it=1;it<=n_iterations;it++)
    {
        product(A, current,next);
        current_Rq = dot(current,next);
        next_norm = norm(next);
        next/=next_norm;
        //cout << "at iteration " << it << ", R(A,x) = " << current_Rq << ", |Ax|/|x| = " 
        if (current_Rq < previous_Rq)
            PLWARNING("PowerIteration: something strange, x'Ax/x'x is decreasing %g->%g",
                      previous_Rq, current_Rq);
        if (it>=N && current_Rq / previous_Rq - 1 < RayleighQuotientTolerance)
        {
            n_iterations = it;
            final_offset = it%N;
            return next_norm;
        }
        previous_Rq = current_Rq;
        current_norm = next_norm;
        previous = current;
        current = next;
        next = final_vectors((it+2)%N);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::pownorm ( const TVec< T > &  vec,
double  n 
)

Definition at line 1005 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), mypow(), n, and PLearn::TVec< T >::size().

Referenced by PLearn::GaussianKernel::addDataForKernelMatrix(), PLearn::NllSemisphericalGaussianVariable::bprop(), PLearn::NllGeneralGaussianVariable::bprop(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), choleskyAppendDimension(), choleskyInsertBasis(), PLearn::EntropyContrast::compute_extra_grad_wrt_df_dx(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::GaussMix::computeLogLikelihood(), PLearn::ManifoldParzen::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), diagonalOfSquare(), PLearn::RowBufferedVMatrix::dot(), PLearn::DiagonalNormalRandomVariable::EMBprop(), PLearn::GaussianKernel::evaluate_i_j(), PLearn::GaussianKernel::evaluate_i_x(), PLearn::GaussianKernel::evaluate_x_i(), PLearn::NatGradSMPNNet::fbpropLoss(), PLearn::NatGradNNet::fbpropLoss(), PLearn::mNNet::fbpropLoss(), PLearn::DeepNonLocalManifoldParzen::fineTuningStep(), PLearn::DiverseComponentAnalysis::forget(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), GCV(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::NonLocalManifoldParzen::log_density(), PLearn::ManifoldKNNDistribution::log_density(), PLearn::GaussianContinuumDistribution::log_density(), log_fullGaussianRBF(), PLearn::ConjGradientOptimizer::minimizeLineSearch(), norm(), PLearn::NatGradEstimator::operator()(), PLearn::ConjGradientOptimizer::optimizeN(), PLearn::VarUtilsTest::perform(), PLearn::ConjGradientOptimizer::polakRibiere(), powdistance(), pownorm(), ridgeRegressionByGCV(), PLearn::EntropyContrast::train(), PLearn::DeepNNet::train(), PLearn::ConjGradientOptimizer::updateSearchDirection(), and weightedRidgeRegressionByGCV().

{
    double result = 0.0;
    if (vec.size() == 0)
        return result;
    T* v = vec.data();
    if(n==1.0)
    {
        for(int i=0; i<vec.length(); i++)
        {
            T val = v[i];
            if(val>=0)
                result += val;
            else
                result -= val;
        }
    }
    else if(n==2.0)
    {
        for(int i=0; i<vec.length(); i++)
        {
            T val = v[i];
            result += val*val;
        }
    }
    else if(n==0)
    { result = vec.length(); }
    else
    {
        for(int i=0; i<vec.length(); i++)
            result += mypow(fabs(v[i]),n);
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1041 of file TMat_maths_impl.h.

References pownorm().

{ return pownorm(vec,T(2.0)); }

Here is the call graph for this function:

Var PLearn::pownorm ( Var  input,
real  n 
)

Definition at line 71 of file Var_utils.cc.

References abs(), fast_exact_is_equal(), pow(), square(), and sum().

{
    if(fast_exact_is_equal(n, 2.0))
        return sum(square(input));
    else if(fast_exact_is_equal(n, 1.0))
        return sum(abs(input));
    else
        return sum(pow(abs(input),n));
}

Here is the call graph for this function:

static PRStatus PLearn::PR_GetFileInfo64_NoWildcards ( const char *  fn,
PRFileInfo64 *  info 
) [static]

Workaround for the fact that on Windows the PR_GetFileInfo function does a wildcard expansion of the filename before returning the file stats, which slows down (for example) lookups of the modification times for a number of files by a big factor on Windows.

Use this function instead of PR_GetFileInfo{,64} in fileutils.cc for functions that deal with files only. (This function doesn't work portably with directories.)

Definition at line 88 of file fileutils.cc.

Referenced by filesize64(), and mtime().

{
    PRFileDesc* f = PR_Open(fn, PR_RDONLY, 0);
    if (!f)
        return PR_FAILURE;

    PRStatus status = PR_GetOpenFileInfo64(f, info);
    PR_Close(f);
    return status;
}

Here is the caller graph for this function:

void PLearn::PR_Read_double ( PRFileDesc *  f,
double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 88 of file pl_NSPR_io.cc.

References endianswap().

Referenced by PLearn::FileVMatrix::getNewRow(), and PR_Read_double().

{
    PR_Read(f,ptr,sizeof(double)*n);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        endianswap(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        endianswap(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

double PLearn::PR_Read_double ( PRFileDesc *  f,
bool  is_file_bigendian = true 
) [inline]

Definition at line 80 of file pl_NSPR_io.h.

References PR_Read_double().

{ double res; PR_Read_double(f,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::PR_Read_double ( PRFileDesc *  f,
float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 101 of file pl_NSPR_io.cc.

References i, n, and PR_Read_double().

{
    double* dptr = new double[n];
    PR_Read_double(f,dptr,n,is_file_bigendian);
    for(int i=0; i<n; i++)
        ptr[i] = float(dptr[i]);
    delete[] dptr;
}

Here is the call graph for this function:

void PLearn::PR_Read_float ( PRFileDesc *  f,
float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 66 of file pl_NSPR_io.cc.

References endianswap().

Referenced by PLearn::FileVMatrix::getNewRow(), and PR_Read_float().

{
    PR_Read(f,ptr,sizeof(float)*n);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        endianswap(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        endianswap(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PR_Read_float ( PRFileDesc *  f,
double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 79 of file pl_NSPR_io.cc.

References i, n, and PR_Read_float().

{
    float* fptr = new float[n];
    PR_Read_float(f,fptr,n,is_file_bigendian);
    for(int i=0; i<n; i++)
        ptr[i] = double(fptr[i]);
    delete[] fptr;
}

Here is the call graph for this function:

float PLearn::PR_Read_float ( PRFileDesc *  f,
bool  is_file_bigendian = true 
) [inline]

Definition at line 78 of file pl_NSPR_io.h.

References PR_Read_float().

{ float res; PR_Read_float(f,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::PR_Read_int ( PRFileDesc *  f,
int ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 53 of file pl_NSPR_io.cc.

References endianswap().

Referenced by PR_Read_int().

{
    PR_Read(f,ptr,sizeof(int)*n);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        endianswap(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        endianswap(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::PR_Read_int ( PRFileDesc *  f,
bool  is_file_bigendian = true 
) [inline]

The following calls read a single value from the file, assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness used on the current architecture.

Definition at line 76 of file pl_NSPR_io.h.

References PR_Read_int().

{ int res; PR_Read_int(f,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::PR_Read_short ( PRFileDesc *  f,
unsigned short *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 110 of file pl_NSPR_io.cc.

References endianswap().

{
    PR_Read(f,ptr,sizeof(unsigned short)*n);
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        endianswap(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        endianswap(ptr,n);
#endif
}

Here is the call graph for this function:

void PLearn::PR_Write_double ( PRFileDesc *  f,
const float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 207 of file pl_NSPR_io.cc.

References i, n, and PR_Write_double().

{
    double* dptr = new double[n];
    for(int i=0; i<n; i++)
        dptr[i] = double(ptr[i]);
    PR_Write_double(f,dptr,n,is_file_bigendian);
    delete[] dptr;
}

Here is the call graph for this function:

void PLearn::PR_Write_double ( PRFileDesc *  f,
const double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 183 of file pl_NSPR_io.cc.

References endianswap().

Referenced by PLearn::FileVMatrix::appendRow(), PR_Write_double(), PLearn::FileVMatrix::put(), and PLearn::FileVMatrix::putSubRow().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        endianswap(const_cast<double*>(ptr),n);
        PR_Write(f,ptr,sizeof(double)*n);
        endianswap(const_cast<double*>(ptr),n);
    }
    else
        PR_Write(f,ptr,sizeof(double)*n);
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        PR_Write(f,ptr,sizeof(double)*n);
    else
    {
        endianswap(const_cast<double*>(ptr),n);
        PR_Write(f,ptr,sizeof(double)*n);
        endianswap(const_cast<double*>(ptr),n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PR_Write_double ( PRFileDesc *  f,
double  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 89 of file pl_NSPR_io.h.

References PR_Write_double().

{ PR_Write_double(f, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::PR_Write_float ( PRFileDesc *  f,
float  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 87 of file pl_NSPR_io.h.

References PR_Write_float().

{ PR_Write_float(f, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::PR_Write_float ( PRFileDesc *  f,
const double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 174 of file pl_NSPR_io.cc.

References i, n, and PR_Write_float().

{
    float* fptr = new float[n];
    for(int i=0; i<n; i++)
        fptr[i] = float(ptr[i]);
    PR_Write_float(f,fptr,n,is_file_bigendian);
    delete[] fptr;
}

Here is the call graph for this function:

void PLearn::PR_Write_float ( PRFileDesc *  f,
const float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 150 of file pl_NSPR_io.cc.

References endianswap().

Referenced by PLearn::FileVMatrix::appendRow(), PR_Write_float(), PLearn::FileVMatrix::put(), and PLearn::FileVMatrix::putSubRow().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        endianswap(const_cast<float*>(ptr),n);
        PR_Write(f,ptr,sizeof(float)*n);
        endianswap(const_cast<float*>(ptr),n);
    }
    else
        PR_Write(f,ptr,sizeof(float)*n);
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        PR_Write(f,ptr,sizeof(float)*n);
    else
    {
        endianswap(const_cast<float*>(ptr),n);
        PR_Write(f,ptr,sizeof(float)*n);
        endianswap(const_cast<float*>(ptr),n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PR_Write_int ( PRFileDesc *  f,
int  value,
bool  is_file_bigendian = true 
) [inline]

The following calls write a single value to the file in the specified representation, regardeless of the endianness on the current architecture.

Definition at line 85 of file pl_NSPR_io.h.

References PR_Write_int().

{ PR_Write_int(f, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::PR_Write_int ( PRFileDesc *  f,
const int ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 126 of file pl_NSPR_io.cc.

References endianswap().

Referenced by PR_Write_int().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        endianswap(const_cast<int*>(ptr),n);
        PR_Write(f,ptr,sizeof(int)*n);
        endianswap(const_cast<int*>(ptr),n);
    }
    else
        PR_Write(f,ptr,sizeof(int)*n);
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        PR_Write(f,ptr,sizeof(int)*n);
    else
    {
        endianswap(const_cast<int*>(ptr),n);
        PR_Write(f,ptr,sizeof(int)*n);
        endianswap(const_cast<int*>(ptr),n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::pretty_print_number ( char *  buffer,
real  number 
)

print a number without unnecessary trailing zero's, into buffer

Definition at line 82 of file general.cc.

Referenced by saveAsciiWithoutSize().

{
    char* t;
    char* s;
    double dnum = double(number);
    sprintf(buffer,"%.15g",dnum);
    for (s=buffer; *s!='\0'; s++)
        if (*s == '.') break;
    if (*s == '.')
    {
        for (t = s + 1; isdigit(*t); t++)
            if (*t != '0')
                s = t + 1;
        for (;*t != '\0';) *s++ = *t++;
        *s = '\0';
    }   
}

Here is the caller graph for this function:

void PLearn::prettyprint_test_results ( ostream &  out,
const Learner &  learner,
const Vec &  results 
) [inline]

Definition at line 572 of file Learner.h.

References endl(), i, PLearn::TVec< T >::size(), and PLearn::Learner::testResultsNames().

{
    Array<string> names = learner.testResultsNames();
    for (int i=0; i<names.size(); i++)
        out << names[i] << ": " << results[i] << endl;
}

Here is the call graph for this function:

string PLearn::prgname ( const string &  setname)

Definition at line 130 of file general.cc.

Referenced by PLearn::HelpCommand::helpCommands(), PLearn::HelpCommand::helpOverview(), PLearn::HelpCommand::helpScripts(), PLearn::PyPLearnScript::openScriptFile(), plearn_main(), and version_string().

{
    static string prgname_ = "plearn";
    if(setname!="")
        prgname_ = setname;
    return prgname_;
}

Here is the caller graph for this function:

void PLearn::print ( ostream &  out,
const map< int, real > &  vec 
) [inline]

Definition at line 600 of file ProbabilitySparseMatrix.h.

References endl(), and NUMWIDTH.

{
    for (map<int, real>::const_iterator it = vec.begin(); it != vec.end(); ++it)
    {
        out << setw(NUMWIDTH) << it->second;
    }
    out << endl;
}

Here is the call graph for this function:

void PLearn::print ( ostream &  out,
const map< int, real > &  vec,
Set  V 
) [inline]

Definition at line 609 of file ProbabilitySparseMatrix.h.

References PLearn::Set::begin(), PLearn::Set::end(), endl(), and NUMWIDTH.

{
    for (SetIterator vit = V.begin(); vit != V.end(); ++vit)
    {
        int v = *vit;
        map<int, real>::const_iterator vec_it = vec.find(v);
        if (vec_it != vec.end())
            out << setw(NUMWIDTH) << vec_it->second;
        else
            out << setw(NUMWIDTH) << 0;
    }
    out << endl;
}

Here is the call graph for this function:

void PLearn::print ( ostream &  out,
const map< int, real > &  vec,
int  size 
) [inline]

Definition at line 587 of file ProbabilitySparseMatrix.h.

References endl(), i, and NUMWIDTH.

{
    for (int i = 0; i < size; i++)
    {
        map<int, real>::const_iterator vec_it = vec.find(i);
        if (vec_it != vec.end())
            out << setw(NUMWIDTH) << vec_it->second;
        else
            out << setw(NUMWIDTH) << 0;
    }
    out << endl;
}

Here is the call graph for this function:

void PLearn::print ( ostream &  out,
ProbabilitySparseMatrix &  pyx,
Set  Y,
Set  X 
) [inline]

Definition at line 561 of file ProbabilitySparseMatrix.h.

References PLearn::Set::begin(), PLearn::Set::end(), endl(), NUMWIDTH, and x.

Referenced by PLearn::Test_PP::accessPointedObject(), PLearn::TVec< PP< RegressionTreeNode > >::debugPrint(), PLearn::TMat< pair< real, real > >::debugPrint(), main(), PLearn::ChildB::print(), PLearn::ChildA::print(), PLearn::TVec< PP< RegressionTreeNode > >::println(), and PLearn::RealMapping::write().

{
    for (SetIterator yit = Y.begin(); yit != Y.end(); ++yit)
    {
        int y = *yit;
        for (SetIterator xit = X.begin(); xit != X.end(); ++xit)
        {
            int x = *xit;
            out << setw(NUMWIDTH) << pyx(y, x);
        }
        out << endl;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::print ( ostream &  out,
RowMapSparseMatrix< real > &  m 
) [inline]

Definition at line 575 of file ProbabilitySparseMatrix.h.

References endl(), i, j, PLearn::RowMapSparseMatrix< T >::length(), m, NUMWIDTH, and PLearn::RowMapSparseMatrix< T >::width().

{
    for (int i = 0; i < m.length(); i++)
    {
        for (int j = 0; j < m.width(); j++)
        {
            out << setw(NUMWIDTH) << m(i, j);
        }
        out << endl;
    }
}

Here is the call graph for this function:

int PLearn::print_diff ( ostream &  out,
VMat  m1,
VMat  m2,
double  tolerance,
int  verbose 
)

Prints where m1 and m2 differ by more than tolerance returns the number of such differences, or -1 if the sizes differ.

Definition at line 279 of file vmatmain.cc.

References endl(), i, is_equal(), j, PLearn::VMat::length(), pout, w, and PLearn::VMat::width().

Referenced by vmatmain().

{
    int ndiff = 0;
    if(m1.length()!=m2.length() || m1.width()!=m2.width())
    {
        out << "Size of the two matrices differ: " 
            << m1.length() << " x " << m1.width() << "  vs.  "
            << m2.length() << " x " << m2.width() << endl;
        return -1;
    }
    if(m1->getFieldInfos()!=m2->getFieldInfos()){
        Array<VMField> a1=m1->getFieldInfos();
        Array<VMField> a2=m2->getFieldInfos();
        if(verbose)
            pout << "Field infos differ:";
        //compare fieldnames
        for(int i=0;i<m1.width();i++){
            if(a1[i].name!=a2[i].name){
                ++ndiff;
                if(verbose)
                    pout << " " << a1[i].name << "!=" << a2[i].name;
            }
        }
        //compare fieldtype
        for(int i=0;i<m1.width();i++){
            if(a1[i].fieldtype!=a2[i].fieldtype){
                ++ndiff;
                if(verbose)
                    pout << " " << a1[i].fieldtype << "!=" << a2[i].fieldtype;
            }
        }
        if(verbose)
            pout <<endl;
        
    }
    int l = m1.length();
    int w = m1.width();
    Vec v1(w);
    Vec v2(w);
    for(int i=0; i<l; i++)
    {
        m1->getRow(i,v1);
        m2->getRow(i,v2);
        for(int j=0; j<w; j++)
        {
            if (!is_equal(v1[j], v2[j], 1.0, real(tolerance), real(tolerance)))
            {
                if (verbose)
                    out << "Elements at " << i << ',' << j << " differ by "
                        << v1[j] - v2[j] << endl;
                ++ndiff;
            } else if (m1->getValString(j, v1[j]) != m2->getValString(j, v2[j])) {
                if (verbose)
                    out << "Elements at " << i << ',' << j << " differ: "
                        << "'" << m1->getValString(j, v1[j]) << "' != "
                        << "'" << m2->getValString(j, v2[j]) << "'" << endl;
                ++ndiff;
            }
        }
    }
    if (!verbose) out << ndiff <<endl;
    return ndiff;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::printDistanceStatistics ( VMat  vm,
int  inputsize 
)

Definition at line 463 of file vmatmain.cc.

References d, endl(), i, L2distance(), PLearn::VMat::length(), pout, PLearn::TVec< T >::subVec(), PLearn::StatsCollector::update(), w, and PLearn::VMat::width().

Referenced by vmatmain().

{
    int l = vm.length();
    int w = vm.width();
    Vec x1(w);
    Vec x2(w);
    StatsCollector collector(2);  
    ProgressBar pb(cerr, "Computing distance statistics", l-1);
    for(int i=0; i<l-1; i++)
    {
        vm->getRow(i,x1);
        vm->getRow(i+1,x2);
        real d = L2distance(x1.subVec(0,inputsize),x2.subVec(0,inputsize));
        collector.update(d);
        pb(i);
    }

    pout << "Euclidean distance statistics: " << endl;
    pout << collector << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::printFieldName ( ostream &  o,
const Row::iterator &  field 
)

outputs the given field name in a cell of apropriate size

Definition at line 834 of file SimpleDB.cc.

References PLearn::RowIterator::char_width(), PLearn::RowIterator::name(), and right().

Referenced by printFieldNames().

{
    o.setf(ios::right, ios::adjustfield);
    o.fill(' ');
    o.width(field.char_width());
    o << field.name().c_str();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::printFieldNames ( ostream &  o,
const Row &  rowc 
)

outputs all field names, separated by " | "

Definition at line 842 of file SimpleDB.cc.

References PLearn::Row::begin(), PLearn::Row::end(), endl(), and printFieldName().

{
    Row& row = const_cast<Row&>(rowc);
    Row::const_iterator it = row.begin(), end = row.end();
    
    while(it!=end)
    {
        printFieldName(o,it);
        o << " | ";
        ++it;
    }
    o << endl;
}

Here is the call graph for this function:

void PLearn::printInfo ( VarArray  inputs,
const Var &  output,
bool  show_gradients 
)

Definition at line 1225 of file VarArray.cc.

References PLearn::VarArray::fbprop(), PLearn::VarArray::fprop(), PLearn::VarArray::printInfo(), and PLearn::VarArray::setMark().

{
    inputs.setMark();
    output->markPath();
    VarArray proppath;
    output->buildPath(proppath);
    if (show_gradients)
    {
        // Warning: we should probably clear the gradients along the proppath before doing this
        proppath.fbprop();
    }
    else
        proppath.fprop();
    proppath.printInfo(show_gradients);
}

Here is the call graph for this function:

void PLearn::printInfo ( VarArray &  a)

Definition at line 1223 of file VarArray.cc.

References PLearn::VarArray::printInfo().

Referenced by PLearn::VarArray::printInfo().

{ a.printInfo(); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::printWrappedObjects ( )

debug

for debug purposes

Definition at line 1072 of file PythonObjectWrapper.cc.

References endl(), PLearn::PythonObjectWrapper::m_wrapped_objects, perr, and the_PLearn_python_module.

{
    //checkWrappedObjects(">>>>>>>>>> in printwrappedobjs -> checkWrappedObjects"); // debug only

    DBG_MODULE_LOG << "the_PLearn_python_module= " << (void*)the_PLearn_python_module << endl;

    perr << "wrapped_objects= " << endl;
    for(PythonObjectWrapper::wrapped_objects_t::iterator it= 
            PythonObjectWrapper::m_wrapped_objects.begin();
        it != PythonObjectWrapper::m_wrapped_objects.end(); ++it)
        perr << '\t' << it->first->classname() << ' ' << (void*)it->first 
             << ' ' << it->first->usage() << " : " 
             << (void*)it->second << ' ' << it->second->ob_refcnt << endl;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::product ( const TMat< T > &  m,
const TVec< T > &  v 
) [inline]

products

return m x v

Definition at line 7182 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), and product().

{ TVec<T> res(m.length()); product(res, m,v); return res; }

Here is the call graph for this function:

template<class T >
void PLearn::product ( RowMapSparseMatrix< T > &  M,
const Vec &  x,
Vec &  y 
)

Definition at line 873 of file RowMapSparseMatrix.h.

References PLearn::RowMapSparseMatrix< T >::product().

Referenced by PLearn::TransformationLearner::applyTransformationOn(), autoThreshLP(), PLearn::NllGeneralGaussianVariable::bprop(), PLearn::RBMMatrixConnection::bpropAccUpdate(), PLearn::RBMMultitaskClassificationModule::bpropUpdate(), PLearn::RBMMatrixTransposeConnection::bpropUpdate(), PLearn::RBMMatrixConnectionNatGrad::bpropUpdate(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::TangentLearner::build_(), PLearn::RegularGridVMatrix::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::NNet::buildOutputFromInput(), PLearn::DistRepNNet::buildOutputFromInput(), PLearn::EntropyContrast::compute_df_dx(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::GaussianProcessRegressor::computeConfidenceFromOutput(), PLearn::RBMLateralBinomialLayer::computeExpectation(), PLearn::KroneckerBaseKernel::computeGramMatrix(), PLearn::RBMGenericParameters::computeLinearUnitActivations(), PLearn::GaussMix::computeLogLikelihood(), PLearn::LLC::computeOutput(), PLearn::KernelRidgeRegressor::computeOutput(), PLearn::IncrementalNNet::computeOutput(), PLearn::GaussMixLocalProjections::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::DiverseComponentAnalysis::computeOutput(), PLearn::AutoLinearRegressor::computeOutput(), PLearn::GaussianProcessRegressor::computeOutputAux(), PLearn::GaussianProcessRegressor::computeOutputCovMat(), PLearn::RBMMatrixTransposeConnection::computeProduct(), PLearn::RBMMatrixConnection::computeProduct(), PLearn::RBMSparse1DMatrixConnection::computeProducts(), PLearn::RBMMatrixTransposeConnection::computeProducts(), PLearn::RBMMatrixConnection::computeProducts(), PLearn::RBMGenericParameters::computeQuadraticUnitActivations(), PLearn::LinearRegressor::computeResidualsVariance(), PLearn::RBMQLParameters::computeUnitActivations(), PLearn::RBMLQParameters::computeUnitActivations(), PLearn::RBMLLParameters::computeUnitActivations(), diagonalizeSubspace(), eigenSparseNonSymmMat(), eigenSparseSymmMat(), PLearn::PCA::em_algo(), PLearn::RBMLateralBinomialLayer::energy(), findSmallestEigenPairOfSymmMat(), PLearn::DeepNonLocalManifoldParzen::fineTuningStep(), PLearn::RBMMultitaskClassificationModule::fprop(), PLearn::RBMModule::fprop(), PLearn::RBMMatrixConnection::fprop(), PLearn::RBMLateralBinomialLayer::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::ProductVariable::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), GDFindSmallEigenPairs(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), InversePowerIteration(), PLearn::ProductRandomVariable::invertible(), PLearn::ICP::iterate(), PLearn::ICP::iterativeReweight(), linearRegression(), PLearn::ManifoldKNNDistribution::log_density(), PLearn::GaussianContinuumDistribution::log_density(), mahalanobis_distance(), PLearn::ChemicalICP::minimizeWeightedDistance(), PLearn::WPLS::NIPALSEigenvector(), PLearn::PLS::NIPALSEigenvector(), PLearn::NatGradEstimator::operator()(), PLearn::TMatTest::perform(), PowerIteration(), product(), PLearn::MatTPlusSumSquaredVec< MatT >::product(), PLearn::ReverseMatT< MatT >::product(), PLearn::SquaredSymmMatT< MatT >::product(), PLearn::ProductVariable::rfprop(), PLearn::ICP::run(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), SolveLinearSymmSystemByCG(), PLearn::TransposeProductVariable::symbolicBprop(), PLearn::ProductTransposeVariable::symbolicBprop(), SymmMatNullSpaceByInversePowerIteration(), PLearn::PseudolikelihoodRBM::test(), testCholeskyRoutines(), PLearn::WPLS::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PLS::train(), PLearn::LLC::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::GaussMix::updateInverseVarianceFromPrevious(), weightedLinearRegression(), and weightedTransformationFromMatchedPoints().

{ M.product(x,y); }

Here is the call graph for this function:

template<class T >
void PLearn::product ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] = sum_k m1[i,k] * m2[k,j]

Definition at line 3602 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.length();
    int m=m1.width();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.length() || l!=mat.width())
        PLERROR("product(TMat, TMat, TMat), incompatible arguments:\n"
                "%dx%d <- %dx%d times %dx%d",
                mat.length(), mat.width(), n, m, m2.length(), l);
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat.clear();
        return;
    }

    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2kj = m2.data()+j;
            for (int k=0;k<m;k++,m2kj+=m2.mod())
                s += m1i[k] * (*m2kj);
            mi[j] = s;
        }
    }
}

Here is the call graph for this function:

Mat PLearn::product ( Mat  m1,
VMat  m2 
)

computes M1.M2

Definition at line 134 of file VMat_linalg.cc.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::column(), i, PLearn::TMat< T >::length(), PLearn::VMat::length(), PLERROR, productAcc(), rowmatrix(), PLearn::VMat::width(), and PLearn::TMat< T >::width().

{
    if(m1.width()!=m2.length())
        PLERROR("in Mat product(VMat m1, VMat m2) arguments have incompatible dimensions");

    Mat result(m1.length(),m2.width());
    result.clear();

    Vec v2(m2.width());
    Mat v2rowmat = rowmatrix(v2);

    for(int i=0; i<m1.width(); i++)
    {
        m2->getRow(i,v2);
        productAcc(result, m1.column(i), v2rowmat);
    }
    return result;
}

Here is the call graph for this function:

template<class T >
T PLearn::product ( const TVec< T > &  vec)

Definition at line 447 of file TMat_maths_impl.h.

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

{
    T res(static_cast<T>(1.0));
    if (vec.size() == 0)
        return res;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
        res *= v[i];
    return res;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::product ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

return m1 x m2

Definition at line 7192 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), product(), and PLearn::TMat< T >::width().

{ TMat<T> res(m1.length(),m2.width()); product(res, m1,m2); return res; }

Here is the call graph for this function:

template<class T >
T PLearn::product ( const TMat< T > &  mat)

Definition at line 4960 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    double res = 1.0;
    T* m_i = mat.data();
    int w=mat.width();

    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
            res *= m_i[j];
    return T(res);
}

Here is the call graph for this function:

template<class T >
void PLearn::product ( const TVec< T > &  result,
const TMat< T > &  m,
const TVec< T > &  v 
)

result[i] = sum_j m[i,j] * v[j]

Definition at line 2806 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::isEmpty(), j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

{
    int l = m.length();
    int w = m.width();
#ifdef BOUNDCHECK
    if (l!=result.length() || w!=v.length())
        PLERROR("product(TVec, TMat, TVec), incompatible arguments:\n"
                "%d <- %dx%d times %d",
                result.length(), l, w, v.length());
#endif

    if (m.isEmpty() || v.isEmpty() || result.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-vector multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!result.isEmpty())
            result.clear();
        return;
    }

    T *rp = result.data();
    T *vp = v.data();
    for (int i=0;i<l;i++)
    {
        const T* mi = m[i];
        T s = 0;
        for (int j=0;j<w;j++)
            s += mi[j] * vp[j];
        rp[i] = s;
    }
}

Here is the call graph for this function:

Var PLearn::product ( Var  v1,
Var  v2 
) [inline]

general matrix product

Definition at line 80 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
template<class T >
void PLearn::product2Acc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 3740 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ProductTransposeVariable::bbprop().

{
#ifdef BOUNDCHECK
    if (m1.width()!=m2.length() || mat.length()!=m1.length() || mat.width()!=m2.width())
        PLERROR("product2Acc(Mat,Mat), incompatible arguments %dx%d= %dx%d times %dx%d",
                mat.length(),mat.width(),m1.length(),m1.width(), m2.length(),m2.width());
#endif
    int n=m1.length();
    int m=m1.width();
    int l=m2.width();
    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            T* m2kj = m2.data()+j;
            for (int k=0;k<m;k++,m2kj+=m2.mod())
                s += m1i[k] * (*m2kj) * (*m2kj);
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::product2Transpose ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 4020 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (m1.width()!=m2.width() || mat.length()!=m1.length() || mat.width()!=m2.length())
        PLERROR("product2Transpose(Mat,Mat), incompatible arguments %dx%d= %dx%d times %dx%d'",
                mat.length(),mat.width(),m1.length(),m1.width(), m2.length(),m2.width());
#endif
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
            {
                T m2jk=m2j[k];
                s += m1i[k] * m2jk*m2jk;
            }
            mi[j] = s;
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::product2TransposeAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 4130 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ProductVariable::bbprop().

{
#ifdef BOUNDCHECK
    if (m1.width()!=m2.width() || mat.length()!=m1.length() || mat.width()!=m2.length())
        PLERROR("product2TransposeAcc(Mat,Mat), incompatible arguments %dx%d= %dx%d times %dx%d'",
                mat.length(),mat.width(),m1.length(),m1.width(), m2.length(),m2.width());
#endif
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
            {
                T m2jk=m2j[k];
                s += m1i[k] * m2jk*m2jk;
            }
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::productAcc ( const TVec< T > &  result,
const TMat< T > &  m,
const TVec< T > &  v 
)

result[i] += sum_j m[i,j] * v[j]

Definition at line 2841 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::isEmpty(), j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by PLearn::TransposeProductVariable::bprop(), PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::ProductTransposeVariable::bprop(), PLearn::MatrixAffineTransformVariable::bprop(), PLearn::BiasWeightAffineTransformVariable::bprop(), PLearn::AffineTransformVariable::bprop(), PLearn::RBMMatrixTransposeConnection::bpropUpdate(), PLearn::RBMMatrixConnectionNatGrad::bpropUpdate(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::GradNNetLayerModule::bpropUpdate(), PLearn::RBMMatrixTransposeConnection::computeProduct(), PLearn::RBMMatrixConnection::computeProduct(), PLearn::RBMSparse1DMatrixConnection::computeProducts(), PLearn::RBMMatrixTransposeConnection::computeProducts(), PLearn::RBMMatrixConnection::computeProducts(), PLearn::RBMJointLLParameters::computeUnitActivations(), PLearn::PCA::em_orth_algo(), PLearn::ProjectionErrorVariable::fprop(), PLearn::BiasWeightAffineTransformVariable::fprop(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden2(), PLearn::DenoisingRecurrentNet::fpropHiddenSymmetricDynamicMatrix(), PLearn::ChemicalICP::minimizeWeightedDistance(), PLearn::TMatTest::perform(), product(), PLearn::ProductVariable::rfprop(), PLearn::PseudolikelihoodRBM::train(), PLearn::LinearInductiveTransferClassifier::train(), transformationFromWeightedMatchedPoints(), and PLearn::DenoisingRecurrentNet::updateInputReconstructionFromHidden().

{
    int l = m.length();
    int w = m.width();
#ifdef BOUNDCHECK
    if (l!=result.length() || w!=v.length())
        PLERROR("productAcc(TVec, TMat, TVec), incompatible arguments:\n"
                "%d <- %dx%d times %d",
                result.length(), l, w, v.length());
#endif

    if (m.isEmpty() || v.isEmpty() || result.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-vector multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        return;
    }

    T* rp = result.data();
    T* mp = m.data();
    T* vdata = v.data();
    int deltam = m.mod()-m.width();
    for (int i=0;i<l;i++)
    {
        T *vp = vdata;
        T s = *rp;
        for (int j=0;j<w;j++)
            s += *mp++ * *vp++;
        *rp++ = s;
        mp += deltam;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::productAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] += sum_k m1[i,k] * m2[k,j]

Definition at line 3641 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.length();
    int m=m1.width();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.length() || l!=mat.width())
        PLERROR("productAcc(TMat, TMat, TMat), incompatible arguments:\n"
                "%dx%d <- %dx%d times %dx%d",
                mat.length(), mat.width(), n, m, m2.length(), l);
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        return;
    }

    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            T* m2kj = m2.data()+j;
            for (int k=0;k<m;k++,m2kj+=m2.mod())
                s += m1i[k] * (*m2kj);
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::productScaleAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2,
alpha,
beta 
)

mat[i,j] = alpha * sum_k m1[i,k] * m2[k,j] + beta * mat[i,j]

Definition at line 3700 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.length();
    int m=m1.width();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.length() || l!=mat.width())
        PLERROR("productScaleAcc(TMat, TMat, TMat), incompatible arguments:\n"
                "%dx%d <- %dx%d times %dx%d",
                mat.length(), mat.width(), n, m, m2.length(), l);
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat *= beta;
        return;
    }

    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            T* m2kj = m2.data()+j;
            for (int k=0;k<m;k++,m2kj+=m2.mod())
                s += m1i[k] * (*m2kj);
            mi[j] = alpha * s + beta * mi[j];
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::productScaleAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
bool  transpose_m1,
const TMat< T > &  m2,
bool  transpose_m2,
alpha,
beta 
)

mat[i,j] = alpha sum_k m1[i,k] * m2[k,j] + beta mat[i,j]

Definition at line 3680 of file TMat_maths_impl.h.

References productScaleAcc(), productTransposeScaleAcc(), transposeProductScaleAcc(), and transposeTransposeProductScaleAcc().

{
    // Boundary checking is done in called functions
    if (transpose_m1)
        if (transpose_m2) // transpose_m1 && transpose_m2
           transposeTransposeProductScaleAcc(mat, m1, m2, alpha, beta);
        else // transpose_m1 && !transpose_m2
            transposeProductScaleAcc(mat, m1, m2, alpha, beta);
    else
        if (transpose_m2) // !transpose_m1 && transpose_m2
            productTransposeScaleAcc(mat, m1, m2, alpha, beta);
        else // !transpose_m1 && !transpose_m2
            productScaleAcc(mat, m1, m2, alpha, beta);
}

Here is the call graph for this function:

template<class T >
void PLearn::productScaleAcc ( const TVec< T > &  result,
const TMat< T > &  m,
bool  transpose_m,
const TVec< T > &  v,
alpha,
beta 
)
template<class T >
void PLearn::productScaleAcc ( const TVec< T > &  result,
const TMat< T > &  m,
const TVec< T > &  v,
alpha,
beta 
)

result[i] = alpha * sum_j m[i,j] * v[j] + beta * v[i]

Definition at line 2889 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::isEmpty(), j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
    int l = m.length();
    int w = m.width();
#ifdef BOUNDCHECK
    if (l!=result.length() || w!=v.length())
        PLERROR("productScaleAcc(TVec, TMat, TVec), incompatible arguments:\n"
                "%d <- %dx%d times %d",
                result.length(), l, w, v.length());
#endif

    if (m.isEmpty() || v.isEmpty() || result.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-vector multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!result.isEmpty())
            result *= beta;
        return;
    }

    T* rp = result.data();
    T* mp = m.data();
    T* vdata = v.data();
    int deltam = m.mod()-m.width();
    for (int i=0;i<l;i++)
    {
        T *vp = vdata;
        T s = 0;
        for (int j=0;j<w;j++)
            s += *mp++ * *vp++;
        *rp = alpha * s + beta * (*rp);
        ++rp;
        mp += deltam;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::productTranspose ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] = sum_k m1[i,k] * m2[j,k]

Definition at line 3951 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by applyGeomTransformation(), PLearn::RBMMatrixConnection::bpropAccUpdate(), PLearn::RBMMatrixTransposeConnection::bpropUpdate(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::RBMLateralBinomialLayer::computeExpectations(), PLearn::GaussianProcessRegressor::computeOutputCovMat(), PLearn::RBMMatrixTransposeConnection::computeProducts(), PLearn::RBMMatrixConnection::computeProducts(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::ProductRandomVariable::EMBprop(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::RunICPVariable::fprop(), PLearn::RBMLateralBinomialLayer::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::ProductTransposeVariable::fprop(), PLearn::GradNNetLayerModule::fprop(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), PLearn::NatGradEstimator::operator()(), productTranspose(), PLearn::ProductTransposeVariable::rfprop(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), PLearn::TransposeProductVariable::symbolicBprop(), PLearn::ProductVariable::symbolicBprop(), PLearn::WPLS::train(), PLearn::PLS::train(), transformPoints(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

{
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.width() || l!=mat.width())
        PLERROR("productTranspose(TMat, TMat, TMat), incompatible arguments:\n"
                "%dx%d <- %dx%d times %dx%d'",
                mat.length(), mat.width(), n, m, l, m2.width());
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat.clear();
        return;
    }

    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
                s += m1i[k] * m2j[k];
            mi[j] = s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::productTranspose ( VMat  m1,
VMat  m2 
)

computes M1.M2'

Definition at line 109 of file VMat_linalg.cc.

References dot(), i, j, PLearn::VMat::length(), PLERROR, w, and PLearn::VMat::width().

{
    if(m1.width()!=m2.width())
        PLERROR("in Mat productTranspose(VMat m1, VMat m2) arguments have incompatible dimensions");

    int m1l = (m1.length());
    int m2l = (m2.length());
    int w = (m1.width());
    Mat result(m1l,m2l);

    Vec v1(w);
    Vec v2(w);

    for(int i=0; i<m1l; i++)
    {
        m1->getRow(i,v1);
        for(int j=0; j<m2l; j++)
        {
            m2->getRow(j,v2);
            result(i,j) = dot(v1,v2);
        }
    }
    return result;
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::productTranspose ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

return m1 x m2'

Definition at line 7202 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), and productTranspose().

{ TMat<T> res(m1.length(),m2.length()); productTranspose(res, m1,m2); return res; }

Here is the call graph for this function:

Var PLearn::productTranspose ( Var &  m1,
Var &  m2 
) [inline]

Definition at line 79 of file ProductTransposeVariable.h.

{
    return new ProductTransposeVariable(m1, m2);
}
template<class T >
void PLearn::productTransposeAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] += sum_k m1[i,k] * m2[j,k]

Definition at line 4050 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::TransposeProductVariable::bprop(), PLearn::ProductVariable::bprop(), PLearn::MatrixAffineTransformVariable::bprop(), PLearn::RBMMatrixTransposeConnection::bpropUpdate(), PLearn::RBMMatrixTransposeConnection::computeProducts(), PLearn::RBMMatrixConnection::computeProducts(), PLearn::MatrixAffineTransformFeedbackVariable::fprop(), PLearn::ProductTransposeVariable::rfprop(), and PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.width() || l!=mat.width())
        PLERROR("productTransposeAcc(TMat, TMat, TMat), incompatible arguments"
                ":\n"
                "%dx%d <- %dx%d times %dx%d'",
                mat.length(), mat.width(), n, m, l, m2.width());
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        return;
    }

    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
                s += m1i[k] * m2j[k];
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::productTransposeScaleAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2,
alpha,
beta 
)

mat[i,j] = alpha * sum_k m1[i,k] * m2[j,k] + beta * mat[i,j]

Definition at line 4089 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::GaussianProcessRegressor::computeOutputCovMat(), and productScaleAcc().

{
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.width() || l!=mat.width())
        PLERROR("productTransposeScaleAcc(TMat, TMat, TMat), incompatible"
                " arguments:\n"
                "%dx%d <- %dx%d times %dx%d'",
                mat.length(), mat.width(), n, m, l, m2.width());
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat *= beta;
        return;
    }

    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
                s += m1i[k] * m2j[k];
            mi[j] = alpha * s + beta * mi[j];
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::projection_error ( Var  f,
Var  t,
real  norm_penalization = 0,
int  n = -1,
bool  normalize_by_neighbor_distance = true,
bool  use_subspace_distance = false,
real  epsilon = 0,
real  regularization = 0,
bool  ordered_vectors = true 
) [inline]

Definition at line 98 of file ProjectionErrorVariable.h.

References n.

Referenced by PLearn::TangentLearner::build_(), and PLearn::NearestNeighborPredictionCost::run().

{
    return new ProjectionErrorVariable(f, t, n, normalize_by_neighbor_distance,
                                       use_subspace_distance, norm_penalization, epsilon, 
                                       regularization, ordered_vectors);
}

Here is the caller graph for this function:

template<class T >
void PLearn::projectOnOrthogonalSubspace ( const TVec< T > &  vec,
const TMat< T > &  orthonormal_subspace 
)

project the Vec x on the linear subspace ORTHOGONAL to the subspace defined by the rows of the orthonormal_subspace matrix, which are ASSUMED to be ORTHORNORMAL. The method is based on substracting for each row v of the matrix the quantity v * x . v.

Definition at line 2627 of file TMat_maths_impl.h.

References dot(), i, PLearn::TMat< T >::length(), and multiplyAcc().

Referenced by GramSchmidtOrthogonalization(), and projectOnOrthogonalSubspace().

{
    for (int i=0;i<orthonormal_subspace.length();i++)
    {
        TVec<T> vi = orthonormal_subspace(i);
        T dp = dot(vec,vi);
        multiplyAcc(vec, vi,-dp);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::projectOnOrthogonalSubspace ( const TMat< T > &  mat,
TMat< T >  orthonormal_subspace 
)

Definition at line 4828 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), and projectOnOrthogonalSubspace().

{
    for (int i=0;i<mat.length();i++)
    {
        TVec<T> row_i = mat(i);
        projectOnOrthogonalSubspace(row_i, orthonormal_subspace);
    }
}

Here is the call graph for this function:

VarArray PLearn::propagationPath ( const VarArray &  outputs)

returns the propagationpath going from all sources that influence the outputs to the outputs passing by parameters_to_optimize.

The sources themselves are not included in the path. returns the propagationpath going from all sources that influence the outputs to the outputs. The sources themselves are not included in the path.

Definition at line 1114 of file VarArray.cc.

References propagationPath(), PLearn::TVec< T >::size(), PLearn::VarArray::sources(), and PLearn::VarArray::unmarkAncestors().

{
    if(outputs.size()==0)
        return VarArray(0,0);
    VarArray all_sources = outputs.sources();
    outputs.unmarkAncestors();
    return propagationPath(all_sources,outputs);
}

Here is the call graph for this function:

VarArray PLearn::propagationPath ( const VarArray &  inputs,
const VarArray &  outputs 
)

The function that computes a propagation path.

* The function that computes a propagation path *

returns the array of all the variables on which fprop is to be called sequentially to do a full fprop (for bprop it is the reverse order). NOTE THAT THE INPUTS ARE NOT IN THE RETURNED PATH ! so that a clearGradient() call on the array won't erase their gradients but fprop and bprop will still take into account their values.

Definition at line 1078 of file VarArray.cc.

References PLearn::VarArray::buildPath(), PLearn::VarArray::clearMark(), PLearn::VarArray::markPath(), PLearn::VarArray::setMark(), and PLearn::TVec< T >::size().

Referenced by PLearn::ArgminOfVariable::ArgminOfVariable(), PLearn::UnfoldedSumOfVariable::build_(), PLearn::UnfoldedFuncVariable::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::PotentialsVariable::build_(), PLearn::MatrixElementsVariable::build_(), PLearn::Function::build_(), PLearn::DeepReconstructorNet::build_(), PLearn::AddCostToLearner::build_(), PLearn::DeepReconstructorNet::computeReconstructions(), PLearn::DeepReconstructorNet::computeRepresentations(), PLearn::Function::differentiate(), EM(), PLearn::Variable::fprop_from_all_sources(), PLearn::DeepReconstructorNet::fpropOneLayer(), nonInputParentsOfPath(), PLearn::VarUtilsTest::perform(), propagationPath(), propagationPathToParentsOfPath(), PLearn::DeepReconstructorNet::reconstructOneLayer(), and PLearn::Optimizer::setToOptimize().

{
    if(outputs.size()==0)
        return VarArray(0,0);

    VarArray proppath; 
    inputs.setMark(); // sets the mark for all inputs
    outputs.markPath(); // sets the mark along all paths going from inputs to outputs
    inputs.clearMark(); // since we don't want the inputs in the update path
    outputs.buildPath(proppath); // appends to proppath every marked item that leads to one of the outputs
    // and clears the marks at the same time.
    return proppath;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VarArray PLearn::propagationPathToParentsOfPath ( const VarArray &  inputs,
const VarArray &  outputs 
)

from all sources to all direct non-inputs parents of the path inputs-->outputs

Definition at line 1124 of file VarArray.cc.

References nonInputParentsOfPath(), propagationPath(), and PLearn::TVec< T >::size().

Referenced by PLearn::Function::build_(), and PLearn::Optimizer::setToOptimize().

{
    VarArray parents = nonInputParentsOfPath(inputs, outputs);
    // WARNING: with this way of proceeding, any SourceVariable that 
    // is a direct parent is currently included in parents, and will
    // thus be included in the propagation path computed below.
    // Calling fprop on a SourceVariable should not harm, but we usually
    // avoided this in previous code (because it is useless). Now the
    // question of SampleSourceVariables remains to be solved... (see TODO.txt)
    // For now we keep it like this. But maybe later we should find a way
    // to exclude the unnecessary source variables (and include the maybe necessary
    // SampleSourceVariables) in the returned path... [Pascal]
    if(parents.size()==0)
        return VarArray(0,0);
    return propagationPath(parents);
}

Here is the call graph for this function:

Here is the caller graph for this function:

PyObject * PLearn::pythonGlobalFuncTramp ( PyObject *  self,
PyObject *  args 
)

Definition at line 50 of file PythonExtension.cc.

References PLearn::RemoteTrampoline::call(), endl(), PLearn::PythonObjectWrapper::gc_collect1(), PLearn::PythonObjectWrapper::getPyObject(), i, PLearn::PLearnError::message(), PLearn::TVec< T >::push_back(), and the_PLearn_python_exception.

Referenced by injectPLearnGlobalFunctions().

{
    DBG_MODULE_LOG << "pythonGlobalFuncTramp(" << PythonObjectWrapper(self)
                   << ", " << PythonObjectWrapper(args) << ')' << endl;
    RemoteTrampoline* t= 
        static_cast<RemoteTrampoline*>(PyCObject_AsVoidPtr(self));
    int nas= PyTuple_GET_SIZE(args);
    TVec<PythonObjectWrapper> as;
    for(int i= 0; i < nas; ++i)
        as.push_back(PythonObjectWrapper(PyTuple_GET_ITEM(args, i)));

    PythonObjectWrapper::gc_collect1();

    try
    {
        PythonObjectWrapper returned_value= t->call(0, as);
        PyObject* to_return= returned_value.getPyObject();
        Py_XINCREF(to_return);
        return to_return;
    }
    catch(const PLearnError& e) 
    {
        PyErr_SetString(the_PLearn_python_exception, e.message().c_str());
        return 0;
    }
    catch(const std::exception& e) 
    {
        PyErr_SetString(PyExc_Exception, e.what());
        return 0;
    }
    catch(...) 
    {
        PyErr_SetString(PyExc_Exception,
                        "Caught unknown C++ exception");
        return 0;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::qld_interface ( Mat  A,
Vec  B,
int  ME,
Mat  C,
Vec  D,
Vec  XL,
Vec  XU,
int iout,
int ifail,
int iprint,
Vec &  X,
Vec &  U,
Vec  WAR,
TVec< int IWAR 
)

Low-Level PLearn Interface for QLD.

Parameters:
Alinear constraints data matrix
Blinear constraints constants
MEnumber of equality constraints
Cobjective function matrix (SPD)
Dobjective function constants
XLlower bounds for the variables
XUupper bounds for the variables
ioutdesired output unit number (e.g. 1)
ifailtermination reason
iprintoutput control (0=no output)
Xoptional solution on return
Ulagrange multipliers on return
WARreal working array; resized automatically
IWARint working array; resized automatically

Definition at line 52 of file qld_interface.cc.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), eps, ifail, iout, iprint, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), max(), N, PLASSERT, ql0001_(), PLearn::TVec< T >::resize(), transpose(), and PLearn::TMat< T >::width().

{
    int M = A.length();
    int N = A.width();

    PLASSERT( M >= 1 && N >= 1 );
    PLASSERT( M == B.length() );
    PLASSERT( N == C.width()  &&  N == C.length() );
    PLASSERT( N == D.length() );
    PLASSERT( N == XL.length() && N == XU.length() );
  
    int MMAX  = max(M,1);
    int NMAX  = N;
    int MNN   = M + N + N;
    int LWAR  = 3 * NMAX * NMAX/2 + 10*NMAX + 2*(MMAX+1);
    int LIWAR = N;

    // In this first version, transpose matrix A
    Mat Atrans = transpose(A);
    X.resize(N);
    U.resize(MNN);
    WAR.resize(LWAR);
    IWAR.resize(LIWAR);
    IWAR[0] = 0;                   // QLD performs Cholesky itself
    double eps = DBL_EPSILON;

    ql0001_(&M,          &ME,       &MMAX,
            &N,          &NMAX,     &MNN,
            C.data(),    D.data(),  Atrans.data(),
            B.data(),    XL.data(), XU.data(),
            X.data(),    U.data(),
            &iout,       &ifail,    &iprint,
            WAR.data(),  &LWAR,
            IWAR.data(), &LIWAR,
            &eps);
}

Here is the call graph for this function:

void PLearn::qsort_vec ( TVec< pair< int, real > >  v,
TVec< pair< int, int > >  buffer 
)

Definition at line 53 of file BinaryStump.cc.

References PLearn::TVec< T >::first(), i, PLearn::TVec< T >::length(), PLERROR, and PLearn::TVec< T >::subVec().

Referenced by PLearn::BinaryStump::train().

{
    TVec< pair<int,real> > temp(v.length());
    temp << v;
    real pivot = temp[0].second;
    int first = 0;
    int last = v.length()-1;
    for(int i=1; i<v.length(); i++)
        if(temp[i].second >= pivot)
            v[last--]=temp[i];
        else
            v[first++]=temp[i];
  
    if(first != last)
        PLERROR("OUPS!!");
  
    v[first] = temp[0];

    int it = 0;
    pair<int,int> inf_sup;
    if(first != 0)
    {
        inf_sup.first = 0;
        inf_sup.second = first;
        buffer[it] = inf_sup;
        it++;
    }
    if(last!=temp.length()-1)
    {
        inf_sup.first = last+1;
        inf_sup.second = v.length()-1-last;
        buffer[it] = inf_sup;
        it++;
    }

    while(it > 0)
    {
        it--;
        temp.resize(buffer[it].second);
        temp << v.subVec(buffer[it].first,buffer[it].second);
        pivot = temp[0].second;
        first = buffer[it].first;
        last = buffer[it].first+buffer[it].second-1;
        for(int i=1; i<buffer[it].second; i++)
            if(temp[i].second >= pivot)
                v[last--]=temp[i];
            else
                v[first++]=temp[i];
    
        if(first != last)
            PLERROR("OUPS!!");
    
        v[first] = temp[0];
    
        int this_it = it;

        if(first != buffer[this_it].first)
        { 
            inf_sup.first =  buffer[this_it].first;
            inf_sup.second = first-buffer[this_it].first;
            buffer[it] = inf_sup;
            it++;
        }
        if(last!=  buffer[this_it].first+temp.length()-1)
        {
            inf_sup.first =  last+1;
            inf_sup.second = buffer[this_it].first+temp.length()-1-last;
            buffer[it] = inf_sup;
            it++;
        }
    }

}

Here is the call graph for this function:

Here is the caller graph for this function:

CostFunc PLearn::quadratic_risk ( real  risk_aversion,
CostFunc  profit_function 
) [inline]

Definition at line 85 of file QuadraticUtilityCostFunction.h.

{
    return new QuadraticUtilityCostFunction(risk_aversion, profit_function);
}
StatsIt PLearn::quantiles_stats ( Vec  quantiles,
int  n_data = 1000 
) [inline]

Definition at line 433 of file StatsIterator.h.

{ return new QuantilesStatsIterator(quantiles,n_data); }
string PLearn::quote_string ( const string &  s)

Quote the provided string 's'.

Definition at line 199 of file stringutils.cc.

Referenced by PLearn::Popen::launch().

{
    string quoted(s);
        
    // Escape the existing quotes
    string::size_type pos = quoted.find("\"");
    while ( pos != quoted.npos )
    {
        quoted.insert(pos, "\\");
        pos = quoted.find("\"", pos+2); // +2 since the inserted char...
    }

    // Quote the string
    quoted.insert(0, "\"");
    quoted.insert(quoted.size(), "\"");
    return quoted;
}

Here is the caller graph for this function:

void PLearn::ramassePoubelles ( )

Definition at line 1087 of file PythonObjectWrapper.cc.

References endl(), PLearn::PythonObjectWrapper::m_wrapped_objects, and removeFromWrappedObjectsSet().

{
    DBG_MODULE_LOG << "entering ramassePoubelles" << endl;
    size_t sz= 0;
    while(sz != PythonObjectWrapper::m_wrapped_objects.size())
    {
        sz= PythonObjectWrapper::m_wrapped_objects.size();
        PythonObjectWrapper::wrapped_objects_t::iterator it= 
            PythonObjectWrapper::m_wrapped_objects.begin();
        while(it != PythonObjectWrapper::m_wrapped_objects.end())
        {
            PythonObjectWrapper::wrapped_objects_t::iterator jt= it;
            ++it;
            if(jt->second->ob_refcnt == 1 && jt->first->usage() == 1)
            {
                DBG_MODULE_LOG << "In ramassePoubelles, removing object" << PythonObjectWrapper(jt->second) << endl;
                removeFromWrappedObjectsSet(jt->second);
            }
        }
    }
    DBG_MODULE_LOG << "exiting ramassePoubelles" << endl;
}

Here is the call graph for this function:

VMat PLearn::random_neighbors_differences ( VMat  source,
int  n_neighbors,
bool  append_current_point_indexe = false,
bool  append_random_neighbors_indexes = false 
) [inline]

Definition at line 119 of file RandomNeighborsDifferencesVMatrix.h.

References PLearn::RandomNeighborsDifferencesVMatrix::append_current_point_indexe, PLearn::RandomNeighborsDifferencesVMatrix::append_random_neighbors_indexes, PLearn::RandomNeighborsDifferencesVMatrix::build(), PLearn::RandomNeighborsDifferencesVMatrix::n_neighbors, and PLearn::SourceVMatrix::source.

{
    RandomNeighborsDifferencesVMatrix* vmat = new RandomNeighborsDifferencesVMatrix();
    vmat->source=source;
    vmat->n_neighbors=n_neighbors;
    vmat->append_current_point_indexe = append_current_point_indexe;
    vmat->append_random_neighbors_indexes = append_random_neighbors_indexes;
    vmat->build();
    return vmat;
}

Here is the call graph for this function:

void PLearn::random_subset_indices ( const TVec< int > &  dest,
int  n 
)

Fill dest with dest.length() unique indices of entries in (0,1,...n-1), chosen uniformly i.e.

sample multinomially but without replacement, so that each entry in (0...n-1) can occur 0 or once. This method is not very efficient as it performs memory allocation of size n.

Definition at line 995 of file random.cc.

References PLearn::TVec< T >::length(), n, PLERROR, shuffleElements(), and PLearn::TVec< T >::subVec().

Referenced by PLearn::DeepNNet::initializeParams().

{
    if (dest.length()>n)
        PLERROR("random_subset_indices: 1st argument should have length (%d) <= value of 2nd argument (%d)",
                dest.length(),n);
    TVec<int> v(0, n-1, 1);
    shuffleElements(v);
    dest << v.subVec(0,dest.length());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::randomRotation ( real  max_angle)

Definition at line 736 of file geometry.cc.

References a, b, c, d, Pi, sqrt(), uniform_sample(), and w.

Referenced by randomTransformation().

{
  Mat rot( 3, 3 );

  real x1 = uniform_sample();
  real x2 = uniform_sample();
  real x3 = uniform_sample();

  /* scale x3 by max_angle */
  x3 *= (max_angle/180.0);

  real z = x1;
  real t = 2*Pi*x2;
  real r = sqrt( 1 - z*z );
  real w = Pi*x3;

  /* create quaternion */
  real a = cos(w);
  real b = sin(w) * cos(t) * r;
  real c = sin(w) * sin(t) * r;
  real d = sin(w) * z;

  /* create rotation matrix */
  rot(0,0) = 1-2*(c*c+d*d);
  rot(0,1) = 2*(b*c+a*d);
  rot(0,2) = 2*(b*d-a*c);
  rot(1,0) = 2*(b*c-a*d);
  rot(1,1) = 1-2*(b*b+d*d);
  rot(1,2) = 2*(c*d+a*b);
  rot(2,0) = 2*(b*d+a*c);
  rot(2,1) = 2*(c*d-a*b);
  rot(2,2) = 1-2*(b*b+c*c);

  return rot;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::randomShuffleRows ( SDB &  sdb)

Performs a random permutation of all the rows of the SDB (same algorithm as Mat::shuffle)

Definition at line 954 of file SimpleDB.cc.

References endl(), PLearn::SimpleDB< KeyType, QueryResult >::getInRow(), PLearn::SimpleDB< KeyType, QueryResult >::getSchema(), i, j, PLearn::SimpleDB< KeyType, QueryResult >::length(), PLearn::SimpleDB< KeyType, QueryResult >::setRow(), and uniform_sample().

{
    Row rowi(&sdb.getSchema());
    Row rowj(&sdb.getSchema());
    int length = int(sdb.length());
    for(int i=0; i<sdb.length(); i++)
    {
        if(i%1000==0)
            cerr << i << endl;
        int j = i+int(uniform_sample()*(length-i));
        sdb.getInRow(i,rowi);
        sdb.getInRow(j,rowj);
        sdb.setRow(rowi,j);
        sdb.setRow(rowj,i);
    }
}

Here is the call graph for this function:

Vec PLearn::randomSplit ( VMat  d,
real  test_fraction,
VMat &  train,
VMat &  test 
)

Splits the dataset d into a train and a test subset randomly picking which samples should be in each subset. (test_fraction has the same meaning a sabove). Return the permuted indices (the last ntest of which are the test indices and the remainder are the train indices).

Definition at line 155 of file Splitter.cc.

References PLearn::VMat::length(), PLearn::VMat::rows(), and shuffleElements().

{
    int ntest = int( test_fraction>=1.0 ?test_fraction :test_fraction*d.length() );
    int ntrain = d.length()-ntest;
    Vec indices(0, d.length()-1, 1); // Range-vector
    shuffleElements(indices);
    train = d.rows(indices.subVec(0,ntrain));
    test = d.rows(indices.subVec(ntrain,ntest));
    return indices;
}

Here is the call graph for this function:

void PLearn::randomSplit ( VMat  d,
real  validation_fraction,
real  test_fraction,
VMat &  train,
VMat &  valid,
VMat &  test 
)

Splits the dataset d into 3 subsets (similar to above)

Definition at line 182 of file Splitter.cc.

References split().

{
    split(d,validation_fraction,test_fraction,train,valid,test,true);
}

Here is the call graph for this function:

void PLearn::randomTransformation ( real  max_angle,
real  max_dist,
Mat &  rot,
Vec &  trans 
)

Definition at line 715 of file geometry.cc.

References bounded_uniform(), and randomRotation().

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

{
  rot = randomRotation( max_angle );

  trans[0] = bounded_uniform( -max_dist, max_dist );
  trans[1] = bounded_uniform( -max_dist, max_dist );
  trans[2] = bounded_uniform( -max_dist, max_dist );
}

Here is the call graph for this function:

Here is the caller graph for this function:

const string & PLearn::raw_wordseparators ( )

Same as wordseparators, but even less restricted, used in PStream::raw_ascii mode.

Definition at line 52 of file PStream_util.cc.

Referenced by PLearn::PStream::operator>>().

{
    static string raw_wordseps = " \t\n\r";
    return raw_wordseps;
}   

Here is the caller graph for this function:

real PLearn::rbf ( Vec  x,
Vec  mu,
real  sigma2 
) [inline]

Definition at line 55 of file distr_maths.h.

References log_rbf(), and safeexp().

{ return safeexp(log_rbf(x,mu,sigma2)); }

Here is the call graph for this function:

void PLearn::read ( PStream &  in,
RealRange &  range 
) [inline]
template<class T >
void PLearn::read ( const string &  stringval,
T &  x 
) [inline]

Definition at line 1491 of file PStream.h.

References in, and x.

{
    istringstream in_(stringval);
    PStream in(&in_);
    in >> x;
}
template<class T >
void PLearn::read ( istream &  in_,
T &  o 
) [inline]

Definition at line 1484 of file PStream.h.

References in.

{
    PStream in(&in_);
    in >> o;
}
void PLearn::read_bool ( istream &  in,
bool ptr,
int  n,
bool  is_file_bigendian 
)
void PLearn::read_compr_mode_and_size ( istream &  in,
unsigned char &  mode,
int size 
) [inline]

Definition at line 104 of file pl_io.cc.

References binread().

Referenced by binread_compressed().

{
    unsigned char sizenum_byte;
    binread(in, sizenum_byte);
    if(sizenum_byte==0x00) // sizenum is an unsigned short
    {
        unsigned short sizenum;
        binread(in, sizenum);
        mode = (unsigned char)(sizenum>>14);
        size = int(sizenum & (unsigned short)0x3FFF);
    }
    else if(sizenum_byte==0xC0) // sizenum is an unsigned int
    {
        unsigned int sizenum;
        binread(in, sizenum);
        mode = (unsigned char)(sizenum>>30);
        size = int(sizenum & (unsigned int)0x3FFFFFFF);
    }
    else // sizenum is the byte we just read
    {
        mode = sizenum_byte>>6;
        size = int(sizenum_byte & (unsigned char)0x3F);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::read_compr_mode_and_size ( FILE *  in,
unsigned char &  mode,
int size 
) [inline]

Definition at line 315 of file pl_io.cc.

References binread().

{
    unsigned char sizenum_byte;
    binread(in, sizenum_byte);
    if(sizenum_byte==0x00) // sizenum is an unsigned short
    {
        unsigned short sizenum;
        binread(in, sizenum);
        mode = (unsigned char)(sizenum>>14);
        size = int(sizenum & (unsigned short)0x3FFF);
    }
    else if(sizenum_byte==0xC0) // sizenum is an unsigned int
    {
        unsigned int sizenum;
        binread(in, sizenum);
        mode = (unsigned char)(sizenum>>30);
        size = int(sizenum & (unsigned int)0x3FFFFFFF);
    }
    else // sizenum is the byte we just read
    {
        mode = sizenum_byte>>6;
        size = int(sizenum_byte & (unsigned char)0x3F);
    }
}

Here is the call graph for this function:

void PLearn::read_compr_mode_and_size_ptr ( char *&  in,
unsigned char &  mode,
int size 
) [inline]

DEPRECATED DO NOT USE! compressed vec to and from memory.

Definition at line 475 of file pl_io.cc.

References i.

Referenced by uncompress_vec().

{
    union {unsigned short s;char cs[2];} unis;
    union {unsigned int i;char ci[4];} unii;

    unsigned char sizenum_byte;
    sizenum_byte = (*in++);
    if(sizenum_byte==0x00) // sizenum is an unsigned short
    {
        unis.cs[0] = (*in++);
        unis.cs[1] = (*in++);
        mode = (unsigned char)(unis.s>>14);
        size = int(unis.s & (unsigned short)0x3FFF);
    }
    else if(sizenum_byte==0xC0) // sizenum is an unsigned int
    {
        unii.ci[0] = (*in++);
        unii.ci[1] = (*in++);
        unii.ci[2] = (*in++);
        unii.ci[3] = (*in++);
        mode = (unsigned char)(unii.i>>30);
        size = int(unii.i & (unsigned int)0x3FFFFFFF);
    }
    else // sizenum is the byte we just read
    {
        mode = sizenum_byte>>6;
        size = int(sizenum_byte & (unsigned char)0x3F);
    }
}

Here is the caller graph for this function:

double PLearn::read_double ( istream &  in,
bool  is_file_bigendian = true 
) [inline]

Definition at line 165 of file pl_io_deprecated.h.

References read_double().

{ double res; read_double(in,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::read_double ( istream &  in,
double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 429 of file pl_io_deprecated.cc.

References reverse_double().

Referenced by read_double().

{
    in.read((char *)ptr,n*sizeof(double));
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_double(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_double(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

float PLearn::read_float ( istream &  in,
bool  is_file_bigendian = true 
) [inline]

Definition at line 163 of file pl_io_deprecated.h.

References read_float().

{ float res; read_float(in,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::read_float ( istream &  in,
float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 416 of file pl_io_deprecated.cc.

References reverse_float().

Referenced by read_float().

{
    in.read((char *)ptr,n*sizeof(float));
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_float(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_float(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::read_int ( istream &  in,
bool  is_file_bigendian = true 
) [inline]

The following calls read a single value from the file, assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness used on the current architecture.

Definition at line 159 of file pl_io_deprecated.h.

References read_int().

{ int res; read_int(in,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::read_int ( istream &  in,
int ptr,
int  n,
bool  is_file_bigendian 
)

Reads binary data from a file assuming it is in the specified representation (either little or big endian) If necessary the representation is translated to the endianness on the current architecture.

Definition at line 390 of file pl_io_deprecated.cc.

References reverse_int().

Referenced by read_int(), and read_uint().

{
    in.read((char *)ptr,n*sizeof(int));
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_int(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_int(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

signed char PLearn::read_sbyte ( istream &  in) [inline]

Definition at line 171 of file pl_io_deprecated.h.

Referenced by PLearn::VecCompressor::readCompressedVec().

{ 
    char res;
    in.read(&res,1);
    return (signed char) res;
}

Here is the caller graph for this function:

short PLearn::read_short ( istream &  in,
bool  is_file_bigendian = true 
) [inline]

Definition at line 161 of file pl_io_deprecated.h.

References read_short().

{ short res; read_short(in,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::read_short ( istream &  in,
short *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 403 of file pl_io_deprecated.cc.

References reverse_short().

Referenced by read_short(), and read_ushort().

{
    in.read((char *)ptr,n*sizeof(short));
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
        reverse_short(ptr,n);
#endif
#ifdef BIGENDIAN
    if(!is_file_bigendian)
        reverse_short(ptr,n);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char PLearn::read_ubyte ( istream &  in) [inline]

Definition at line 177 of file pl_io_deprecated.h.

{ 
    char res;
    in.read(&res,1);
    return (unsigned char) res;
}
unsigned int PLearn::read_uint ( istream &  in,
bool  is_file_bigendian = true 
) [inline]

Definition at line 167 of file pl_io_deprecated.h.

References read_uint().

{ unsigned int res; read_uint(in,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::read_uint ( istream &  in,
unsigned int ptr,
int  n,
bool  is_file_bigendian 
) [inline]

Definition at line 149 of file pl_io_deprecated.h.

References read_int().

Referenced by read_uint().

{ read_int(in,(int*)ptr,n,is_file_bigendian); }

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned short PLearn::read_ushort ( istream &  in,
bool  is_file_bigendian = true 
) [inline]

Definition at line 169 of file pl_io_deprecated.h.

References read_ushort().

{ unsigned short res; read_ushort(in,&res,1,is_file_bigendian); return res; }

Here is the call graph for this function:

void PLearn::read_ushort ( istream &  in,
unsigned short *  ptr,
int  n,
bool  is_file_bigendian 
) [inline]

Definition at line 151 of file pl_io_deprecated.h.

References read_short().

Referenced by read_ushort().

{ read_short(in,(short*)ptr,n,is_file_bigendian); }

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::readAndMacroProcess ( PStream &  in,
map< string, string > &  variables,
time_t &  latest,
bool  skip_comments = true 
)

Will return the text, macro processed, with each instance of ${varname} in the text that corresponds to a key in the given map replaced by its associated value.

Also every $DEFINE{varname=... } in the text will add a new varname entry in the map (the DEFINE macro will be discarded). Also every $INCLUDE{filepath} will be replaced in place by the text of the file it includes and set latest, to max(latest,mtime(filepath))

Definition at line 731 of file fileutils.cc.

References c, endl(), PLearn::PStream::get(), getAfterSkipBlanksAndComments(), PLearn::PStream::getline(), PLearn::PStream::good(), i, max(), openString(), PLearn::PStream::peek(), peekAfterSkipBlanksAndComments(), pl_isnumber(), PLERROR, pout, PLearn::PStream::raw_ascii, readFileAndMacroProcess(), readWhileMatches(), removeblanks(), skipBlanksAndComments(), PLearn::PStream::smartReadUntilNext(), toint(), tostring(), and var().

Referenced by PLearn::PyPLearnScript::build_(), PLearn::HelpSystem::helpPrologueHTML(), and readFileAndMacroProcess().

{
    string text; // the processed text to return
    bool inside_a_quoted_string=false; // inside a quoted string we don't skip characters following a #
    int c=EOF, last_c=EOF;
    while(in.good())
    {
        last_c = c;
        c = in.get();
        if (last_c!='\\' && c=='"') // we find either the beginning or end of a quoted string
            inside_a_quoted_string = !inside_a_quoted_string; // flip status

        if(!inside_a_quoted_string && c=='#' && skip_comments)
            // It's a comment: skip rest of line
            while(c!=EOF && c!='\n' && c!='\r')
                c = in.get();

        if(c==EOF)
            break;
        else if(c!='$')
            text += c;
        else  // We have a $ macro command
        {
            c = in.peek();
            switch(c)
            {
            case '{':  // expand a defined variable ${varname}
            {
                string varname; // name of a variable
                in.get(); // skip '{'
                in.smartReadUntilNext("}", varname, true);
                // Maybe there are macros to process to obtain the real name of the variable.
                PStream varname_stream = openString(varname, PStream::raw_ascii);
                varname = readAndMacroProcess(varname_stream, variables, latest);
                varname = removeblanks(varname);
                map<string, string>::const_iterator it = variables.find(varname);
                if(it==variables.end())
                    PLERROR("Macro variable ${%s} undefined", varname.c_str());
                PStream varin = openString(it->second, PStream::raw_ascii);
                text += readAndMacroProcess(varin, variables, latest);
            }
            break;

            case 'C': // it's a CHAR{expression}
            {
                string expr;
                readWhileMatches(in, "CHAR");
                bool syntax_ok = true;
                c = in.get();
                if(c == '{')
                    in.smartReadUntilNext("}", expr, true);
                else
                    syntax_ok = false;
                if (!syntax_ok)
                    PLERROR("$CHAR syntax is: $CHAR{expr}");
                PStream expr_stream = openString(expr, PStream::raw_ascii);
                char ch = (char) toint(readAndMacroProcess(expr_stream, variables, latest));
                text += ch;
            }
            break;

            case 'D':
            {
                int next = in.get();
                next = in.peek();   // Next character.
                switch(next) {

                case 'E':   // it's a DEFINE{varname}{expr}
                {
                    string varname; // name of a variable
                    string vardef; // definition of a variable
                    readWhileMatches(in, "EFINE{");
                    in.getline(varname, '}');
                    varname = removeblanks(varname);
                    skipBlanksAndComments(in);
                    if(in.get()!='{')
                        PLERROR("Bad syntax in .plearn DEFINE macro: correct syntax is $DEFINE{name}{definition}");
                    in.smartReadUntilNext("}", vardef, true);
                    map<string, string>::const_iterator it = variables.find(varname);
                    if (it == variables.end())
                        variables[varname] = vardef;
                    else
                        PLERROR("Variable %s is already defined, you need to first $UNDEFINE it "
                                "if you want to assign it a new value", varname.c_str());
                }
                break;

                case 'I': // it's a DIVIDE{expr1}{expr2}
                {
                    string expr1, expr2;
                    readWhileMatches(in, "IVIDE");
                    bool syntax_ok = true;
                    c = in.get();
                    if (syntax_ok) {
                        if(c == '{')
                            in.smartReadUntilNext("}", expr1, true);
                        else
                            syntax_ok = false;
                    }
                    if (syntax_ok) {
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext("}", expr2, true);
                        else
                            syntax_ok = false;
                    }
                    if (!syntax_ok)
                        PLERROR("$DIVIDE syntax is: $DIVIDE{expr1}{expr2}");
                    PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                    PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                    string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                    string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                    real e1, e2;
                    if (!pl_isnumber(expr1_eval, &e1) || !pl_isnumber(expr2_eval, &e2)) {
                        PLERROR("In $DIVIDE{expr1}{expr2}, either 'expr1' or 'expr2' is not a number");
                    }
                    text += tostring(e1 / e2);
                }
                break;

                }
                break;
            }

            case 'E':
            {
                int next = in.get();
                next = in.peek();   // Next character.
                switch(next) {

                case 'C': // it's an ECHO{expr}
                {
                    string expr;
                    readWhileMatches(in, "CHO");
                    bool syntax_ok = true;
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", expr, true);
                    else
                        syntax_ok = false;
                    if (!syntax_ok)
                        PLERROR("$ECHO syntax is: $ECHO{expr}");
                    PStream expr_stream = openString(expr, PStream::raw_ascii);
                    pout << readAndMacroProcess(expr_stream, variables, latest) << endl;
                }
                break;

                case 'V': // it's an EVALUATE{varname}
                {
                    string expr;
                    readWhileMatches(in, "VALUATE");
                    bool syntax_ok = true;
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", expr, true);
                    else
                        syntax_ok = false;
                    if (!syntax_ok)
                        PLERROR("$EVALUATE syntax is: $EVALUATE{varname}");
                    PStream expr_stream = openString(expr, PStream::raw_ascii);
                    string varname = readAndMacroProcess(expr_stream, variables, latest);
                    string to_evaluate = variables[varname];
                    PStream to_evaluate_stream = openString(to_evaluate, PStream::raw_ascii);
                    string evaluated = readAndMacroProcess(to_evaluate_stream, variables, latest);
                    variables[varname] = evaluated;
                }
                break;
                }
                break;
            }

            case 'G': // it's a GETENV{expression}
            {
                string expr;
                readWhileMatches(in, "GETENV");
                bool syntax_ok = true;
                c = in.get();
                if(c == '{')
                    in.smartReadUntilNext("}", expr, true);
                else
                    syntax_ok = false;
                if (!syntax_ok)
                    PLERROR("$GETENV syntax is: $GETENV{expr}");
                PStream expr_stream = openString(expr, PStream::raw_ascii);
                string var_name = readAndMacroProcess(expr_stream, variables, latest);
                const char* var = PR_GetEnv(var_name.c_str());

                if (!var)
                    PLERROR("In readAndMacroProcess - The environment variable %s is not defined", var_name.c_str());
                text += string(var);
            }
            break;

            case 'I':
            {
                int next = in.get();
                next = in.peek();   // Next character.
                switch(next) {

                case 'F': // it's an IF{cond}{expr_cond_true}{expr_cond_false}
                {
                    string cond, expr_cond_true, expr_cond_false, expr_evaluated;
                    readWhileMatches(in, "F");
                    bool syntax_ok = true;
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", cond, true);
                    else
                        syntax_ok = false;
                    if (syntax_ok) {
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext("}", expr_cond_true, true);
                        else
                            syntax_ok = false;
                    }
                    if (syntax_ok) {
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext("}", expr_cond_false, true);
                        else
                            syntax_ok = false;
                    }
                    if (!syntax_ok)
                        PLERROR("$IF syntax is: $IF{cond}{expr_cond_true}{expr_cond_false}");

                    PStream cond_stream = openString(cond, PStream::raw_ascii);
                    string evaluate_cond = readAndMacroProcess(cond_stream, variables, latest);
                    if (evaluate_cond == "1" ) {
                        expr_evaluated = expr_cond_true;
                    } else if (evaluate_cond == "0") {
                        expr_evaluated = expr_cond_false;
                    } else {
                        PLERROR("$IF condition should be 0 or 1, but is %s", evaluate_cond.c_str());
                    }
                    PStream expr_stream = openString(expr_evaluated, PStream::raw_ascii);
                    text += readAndMacroProcess(expr_stream, variables, latest);
                }
                break;

                case 'N':
                {
                    next = in.get();
                    next = in.peek();   // Next character.
                    switch(next) {

                    case 'C': // it's an INCLUDE{filepath}
                    {
                        string raw_includefilepath; // The raw path read from the script.
                        readWhileMatches(in, "CLUDE");
                        c = in.get();
                        if(c=='<')
                            in.smartReadUntilNext(">", raw_includefilepath, true);
                        else if(c=='{')
                            in.smartReadUntilNext("}", raw_includefilepath, true);
                        else
                            PLERROR("$INCLUDE must be followed immediately by a { or <");
                        PStream pathin = openString(raw_includefilepath, PStream::raw_ascii);
                        raw_includefilepath = readAndMacroProcess(pathin, variables, latest);
                        raw_includefilepath = removeblanks(raw_includefilepath);
                        PPath p = PPath(raw_includefilepath);
                        // Read file with appropriate variable definitions.
                        time_t new_latest = 0;
                        text += readFileAndMacroProcess
                            (p, variables, new_latest);
                        latest=max(latest,new_latest);
                        string s=tostring(latest);
                        variables["MTIME"]=s;
                    }
                    break;

                    case 'T': // it's an INT{val}
                    {
                        string expr;
                        readWhileMatches(in, "T");
                        bool syntax_ok = true;
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext("}", expr, true);
                        else
                            syntax_ok = false;
                        if (!syntax_ok)
                            PLERROR("$INT syntax is: $INT{expr}");
                        PStream expr_stream = openString(expr, PStream::raw_ascii);
                        string expr_eval = readAndMacroProcess(expr_stream, variables, latest);
                        real e;
                        if (!pl_isnumber(expr_eval, &e)) {
                            PLERROR("In $INT{expr}, 'expr' is not a number");
                        }
                        text += tostring(int(e));
                    }
                    }
                }
                break;

                case 'S':
                {

                    next = in.get();
                    next = in.peek();   // Next character.
                    switch(next) {

                    case 'D': // it's an ISDEFINED{expr}
                    {
                        string expr;
                        readWhileMatches(in, "DEFINED");
                        bool syntax_ok = true;
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext("}", expr, true);
                        else
                            syntax_ok = false;
                        if (!syntax_ok)
                            PLERROR("$ISDEFINED syntax is: $ISDEFINED{expr}");
                        PStream expr_stream = openString(expr, PStream::raw_ascii);
                        string expr_eval = readAndMacroProcess(expr_stream, variables, latest);
                        map<string, string>::const_iterator it = variables.find(expr_eval);
                        if(it==variables.end()) {
                            // The variable is not defined.
                            text += "0";
                        } else {
                            text += "1";
                        }
                    }
                    break;

                    case 'E': // it's an ISEQUAL{expr1}{expr2}
                    {
                        string expr1, expr2;
                        readWhileMatches(in, "EQUAL");
                        bool syntax_ok = true;
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext( "}", expr1, true);
                        else
                            syntax_ok = false;
                        if (syntax_ok) {
                            c = in.get();
                            if(c == '{')
                                in.smartReadUntilNext("}", expr2, true);
                            else
                                syntax_ok = false;
                        }
                        if (!syntax_ok)
                            PLERROR("$ISEQUAL syntax is: $ISEQUAL{expr1}{expr2}");
                        PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                        PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                        string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                        string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                        if (expr1_eval == expr2_eval) {
                            text += "1";
                        } else {
                            text += "0";
                        }
                    }
                    break;

                    case 'H': // it's an ISHIGHER{expr1}{expr2}
                    {
                        string expr1, expr2;
                        readWhileMatches(in, "HIGHER");
                        bool syntax_ok = true;
                        c = in.get();
                        if(c == '{')
                            in.smartReadUntilNext("}", expr1, true);
                        else
                            syntax_ok = false;
                        if (syntax_ok) {
                            c = in.get();
                            if(c == '{')
                                in.smartReadUntilNext("}", expr2, true);
                            else
                                syntax_ok = false;
                        }
                        if (!syntax_ok)
                            PLERROR("$ISHIGHER syntax is: $ISHIGHER{expr1}{expr2}");
                        PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                        PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                        string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                        string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                        real e1, e2;
                        if (!pl_isnumber(expr1_eval, &e1) || !pl_isnumber(expr2_eval, &e2)) {
                            PLERROR("In $ISHIGHER{expr1}{expr2}, either 'expr1' or 'expr2' is not a number");
                        }
                        if (e1 > e2) {
                            text += "1";
                        } else {
                            text += "0";
                        }
                    }
                    break;
                    }
                }
                break;
                }
            }
            break;

            case 'M': // it's a MINUS{expr1}{expr2}
            {
                string expr1, expr2;
                readWhileMatches(in, "MINUS");
                bool syntax_ok = true;
                c = in.get();
                if (syntax_ok) {
                    if(c == '{')
                        in.smartReadUntilNext("}", expr1,true);
                    else
                        syntax_ok = false;
                }
                if (syntax_ok) {
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", expr2,true);
                    else
                        syntax_ok = false;
                }
                if (!syntax_ok)
                    PLERROR("$MINUS syntax is: $MINUS{expr1}{expr2}");
                PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                real e1, e2;
                if (!pl_isnumber(expr1_eval, &e1) || !pl_isnumber(expr2_eval, &e2)) {
                    PLERROR("In $MINUS{expr1}{expr2}, either 'expr1' or 'expr2' is not a number");
                }
                text += tostring(e1 - e2);
            }
            break;

            case 'O': // it's an OR{expr1}{expr2}
            {
                string expr1, expr2;
                readWhileMatches(in, "OR");
                bool syntax_ok = true;
                c = in.get();
                if (syntax_ok) {
                    if(c == '{')
                        in.smartReadUntilNext("}", expr1,true);
                    else
                        syntax_ok = false;
                }
                if (syntax_ok) {
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", expr2,true);
                    else
                        syntax_ok = false;
                }
                if (!syntax_ok)
                    PLERROR("$OR syntax is: $OR{expr1}{expr2}");
                PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                real e1, e2;
                if (!pl_isnumber(expr1_eval, &e1) || !pl_isnumber(expr2_eval, &e2)) {
                    PLERROR("In $OR{expr1}{expr2}, either 'expr1' or 'expr2' is not a number");
                }
                int i1 = toint(expr1_eval);
                int i2 = toint(expr2_eval);
                bool is_true = i1 || i2;
                text += tostring(is_true);
            }
            break;

            case 'P': // it's a PLUS{expr1}{expr2}
            {
                string expr1, expr2;
                readWhileMatches(in, "PLUS");
                bool syntax_ok = true;
                c = in.get();
                if (syntax_ok) {
                    if(c == '{')
                        in.smartReadUntilNext("}", expr1,true);
                    else
                        syntax_ok = false;
                }
                if (syntax_ok) {
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", expr2,true);
                    else
                        syntax_ok = false;
                }
                if (!syntax_ok)
                    PLERROR("$PLUS syntax is: $PLUS{expr1}{expr2}");
                PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                real e1, e2;
                if (!pl_isnumber(expr1_eval, &e1) || !pl_isnumber(expr2_eval, &e2)) {
                    PLERROR("In $PLUS{expr1}{expr2}, either 'expr1' or 'expr2' is not a number");
                }
                text += tostring(e1 + e2);
            }
            break;

            case 'S': // it's a SWITCH{expr}{cond1}{val1}{cond2}{val2}...{valdef}
            {
                string expr, valdef;
                vector<string> comp;
                vector<string> val;
                readWhileMatches(in, "SWITCH");
                bool syntax_ok = true;
                // First read 'expr'.
                c = in.get();
                if (syntax_ok) {
                    if(c == '{')
                        in.smartReadUntilNext("}", expr, true);
                    else
                        syntax_ok = false;
                }
                // Read the pairs {compx}{valx}, then {valdef}
                bool done_parsing = false;
                while (syntax_ok && !done_parsing) {
                    c = getAfterSkipBlanksAndComments(in);
                    string tmp_comp, tmp_val;
                    if(c == '{')
                        in.smartReadUntilNext("}", tmp_comp, true);
                    else
                        syntax_ok = false;
                    if (syntax_ok) {
                        c = peekAfterSkipBlanksAndComments(in);
                        if(c == '{') {
                            c = getAfterSkipBlanksAndComments(in);
                            in.smartReadUntilNext("}", tmp_val, true);
                        }
                        else {
                            // We must have read 'valdef' just before.
                            valdef = tmp_comp;
                            done_parsing = true;
                        }
                    }
                    if (!done_parsing) {
                        comp.push_back(tmp_comp);
                        val.push_back(tmp_val);
                    }
                }
                if (!syntax_ok)
                    PLERROR("$SWITCH syntax is: $SWITCH{expr}{comp1}{val1}{comp2}{val2}...{valdef}");
                PStream expr_stream = openString(expr, PStream::raw_ascii);
                string expr_eval =  readAndMacroProcess(expr_stream, variables, latest);
                bool not_done = true;
                for (size_t i = 0; i < comp.size() && not_done; i++) {
                    PStream comp_stream = openString(comp[i], PStream::raw_ascii);
                    string comp_eval = readAndMacroProcess(comp_stream, variables, latest);
                    if (expr_eval == comp_eval) {
                        not_done = false;
                        PStream val_stream = openString(val[i], PStream::raw_ascii);
                        text += readAndMacroProcess(val_stream, variables, latest);
                    }
                }
                if (not_done) {
                    // Default value needed.
                    PStream val_stream = openString(valdef, PStream::raw_ascii);
                    text += readAndMacroProcess(val_stream, variables, latest);
                }
            }
            break;

            case 'T': // it's a TIMES{expr1}{expr2}
            {
                string expr1, expr2;
                readWhileMatches(in, "TIMES");
                bool syntax_ok = true;
                c = in.get();
                if (syntax_ok) {
                    if(c == '{')
                        in.smartReadUntilNext("}", expr1, true);
                    else
                        syntax_ok = false;
                }
                if (syntax_ok) {
                    c = in.get();
                    if(c == '{')
                        in.smartReadUntilNext("}", expr2, true);
                    else
                        syntax_ok = false;
                }
                if (!syntax_ok)
                    PLERROR("$TIMES syntax is: $TIMES{expr1}{expr2}");
                PStream expr1_stream = openString(expr1, PStream::raw_ascii);
                PStream expr2_stream = openString(expr2, PStream::raw_ascii);
                string expr1_eval = readAndMacroProcess(expr1_stream, variables, latest);
                string expr2_eval = readAndMacroProcess(expr2_stream, variables, latest);
                real e1, e2;
                if (!pl_isnumber(expr1_eval, &e1) || !pl_isnumber(expr2_eval, &e2)) {
                    PLERROR("In $TIMES{expr1}{expr2}, either 'expr1' or 'expr2' is not a number");
                }
                text += tostring(e1 * e2);
            }
            break;

            case 'U': // it's an UNDEFINE{varname}
            {
                string expr;
                readWhileMatches(in, "UNDEFINE");
                bool syntax_ok = true;
                c = in.get();
                if(c == '{')
                    in.smartReadUntilNext("}", expr, true);
                else
                    syntax_ok = false;
                if (!syntax_ok)
                    PLERROR("$UNDEFINE syntax is: $UNDEFINE{expr}");
                PStream expr_stream = openString(expr, PStream::raw_ascii);
                string varname = readAndMacroProcess(expr_stream, variables, latest);
                while (variables.count(varname) > 0) {
                    // This loop is probably not necessary, but just in case...
                    variables.erase(varname);
                }
            }
            break;

            default:
                PLERROR("In readAndMacroProcess: only supported macro commands are \n"
                        "${varname}, $CHAR, $DEFINE, $DIVIDE, $ECHO, $EVALUATE, $GETENV, $IF, $INCLUDE, $INT, $ISDEFINED, $ISEQUAL, $ISHIGHER, $MINUS, $PLUS, $OR, $SWITCH, $TIMES, $UNDEFINE."
                        "But I read $%c !!",c);
            }
            c = ' '; // Make sure we do not believe it is a quoted string.
        }
    }

    return text;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::readField ( istream &  in,
const string &  fieldname,
T &  x 
)

Definition at line 227 of file pl_io_deprecated.h.

References read(), and readFieldName().

{ 
// Norman: This gives problems on VSNet when T is a Array<VMFieldStat> or VMFieldStat.
//         Because it is deprecated, well, I have decided to wipe it out! :)
#ifndef WIN32
    readFieldName(in,fieldname,true); 
    read(in,x); 
    if(!isspace(in.get())) 
        in.unget(); 
#endif
}

Here is the call graph for this function:

template<class T >
void PLearn::readField ( istream &  in,
const string &  fieldname,
T &  x,
default_value 
)

readField with a default value when the field is not found

Definition at line 258 of file pl_io_deprecated.h.

References read(), and readFieldName().

{ 
    if (readFieldName(in,fieldname)) 
    { 
        read(in,x); 
        if(!isspace(in.get())) 
            in.unget(); 
    } 
    else x=default_value; 
}

Here is the call graph for this function:

bool PLearn::readFieldName ( istream &  in,
const string &  fieldname,
bool  force = false 
)

consumes "fieldname: " if possible, and return true if it does however if force=true and fieldname is not found then call error.

Definition at line 95 of file pl_io_deprecated.cc.

References PLERROR, and PLearn::pl_streambuf::seekmark().

Referenced by binreadField(), binreadField_double(), and readField().

{ 
    pl_streambuf* buffer = dynamic_cast<pl_streambuf*>(in.rdbuf());
    pl_streammarker fence(buffer);
    string word;
    in >> word;
    if(word != fieldname+":")
    {
        if (force)
            PLERROR("In readFieldName read %s while expected fieldname was %s",word.c_str(),fieldname.c_str());
        else {
            // back-track to before trying to read the field name
            //NOTE: FIX_ME
            // seekmark is done on 'buffer'... which is NOT in's buffer...
            // so the pl_streambuf and the pl_streammarker are useless.
            // It would be an error anyways to set in's buffer to 'buffer':
            // 'buffer' is local to this function and seekmark is done just before
            // return.  suggestion: don't use this function...
            //                        -xsm
            buffer->seekmark(fence);
            return false;
        }
    }
    in.get(); // consume following white space
    return true;

}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::readFileAndMacroProcess ( const PPath &  filepath,
time_t &  latest 
) [inline]

Definition at line 255 of file fileutils.h.

References readFileAndMacroProcess().

{
    map<string, string> variables;
    return readFileAndMacroProcess(filepath, variables, latest);
}

Here is the call graph for this function:

string PLearn::readFileAndMacroProcess ( const PPath &  filepath) [inline]

Definition at line 261 of file fileutils.h.

References readFileAndMacroProcess().

{
    map<string, string> variables;
    time_t latest = 0;
    return readFileAndMacroProcess(filepath, variables, latest);
}

Here is the call graph for this function:

string PLearn::readFileAndMacroProcess ( const PPath &  filepath,
map< string, string > &  variables,
bool  change_dir = false 
) [inline]

Definition at line 247 of file fileutils.h.

References readFileAndMacroProcess().

{
    time_t latest = 0;
    return readFileAndMacroProcess(filepath, variables, latest, change_dir);
}

Here is the call graph for this function:

string PLearn::readFileAndMacroProcess ( const PPath &  filepath,
map< string, string > &  variables,
time_t &  latest,
bool  change_dir = false 
)

Same as readAndMacroProcess, but takes a filename instead of a string. The following variables are automatically set from the filepath: FILEPATH DIRPATH FILENAME FILEBASE FILEEXT Ex: if the absolute path to filepath is /home/me/foo.plearn Then we'll get: FILEPATH = "/home/me/foo.plearn" DIRPATH = "/home/me" FILENAME = "foo.plearn" FILEBASE = "foo" FILEEXT = ".plearn" Variables for the date and time (DATE, TIME, DATETIME) are also defined.

If 'change_dir' is set to true, the program will move to the directory containing 'filepath' before reading the file, and will move back to the current directory before exiting the function.

The path 'filepath' may contain local variables in the form: dir/file::var1=x1::var2=x2 ... These variables will be used when parsing the file, but will not be saved in the 'variables' map.

Definition at line 656 of file fileutils.cc.

References PLearn::PPath::absolute(), addFileAndDateVariables(), PLearn::PPath::basename(), chdir(), PLearn::PPath::dirname(), for(), PLearn::PPath::getcwd(), i, in, isfile(), max(), PLearn::PLearnError::message(), mtime(), openFile(), parseBaseAndParameters(), PLearn::PStream::plearn_ascii, PLERROR, and readAndMacroProcess().

Referenced by PLearn::VVMatrix::build_(), PLearn::VVMatrix::createPreproVMat(), getDataSet(), PLearn::VVMatrix::getDateOfVMat(), macroLoadObject(), readAndMacroProcess(), readFileAndMacroProcess(), PLearn::RunCommand::run(), smartLoadObject(), and PLearn::LearnerCommand::train().

{
    // pout << "Processing file: " << filepath.absolute() << endl;
    // Save old variables (to allow recursive calls)
    const char* OldVariables[] = {
        "FILEPATH", "DIRPATH", "FILENAME", "FILEBASE", "FILEEXT", "DATE", "TIME", "DATETIME"
    };
    const int num_old = sizeof(OldVariables) / sizeof(OldVariables[0]);
    map<string,string> old_vars;
    for (int i=0; i<num_old; ++i)
        old_vars[OldVariables[i]] = variables[OldVariables[i]];
    PPath file(filepath); // Default: file = filepath.

    map<string, string>* added = 0;
    map<string, string>* backup = 0;
    if (!isfile(file)) {
        // Parse 'file' for potential additional arguments.
        added  = new map<string, string>();
        backup = new map<string, string>();
        parseBaseAndParameters(file.absolute(), file, variables, added, backup);
    }

    // Possibly change directory.
    PPath old_dir;
    if (change_dir) {
        old_dir = PPath::getcwd();
        chdir(file.dirname());
        file = file.basename();
    }

    latest=max(latest,mtime(file.absolute()));

    // Add the new file and date variables
    addFileAndDateVariables(file, variables, latest);

    // Perform actual parsing and macro processing...
    PStream in = openFile(file, PStream::plearn_ascii, "r");
    string text;
    try
    { 
        text = readAndMacroProcess(in, variables, latest);
    }
    catch(const PLearnError& e)
    {
        PLERROR("while parsing file %s we got an error: \n%s",
                filepath.c_str(),e.message().c_str());
    }

    // Restore previous variables
    if (added)
        for (map<string, string>::const_iterator it = added->begin();
             it != added->end(); it++)
            variables.erase(it->first);
    if (backup)
        for (map<string, string>::const_iterator it = backup->begin();
             it != backup->end(); it++)
            variables[it->first] = it->second;
    for (int i=0; i<num_old; ++i)
        variables[OldVariables[i]] = old_vars[OldVariables[i]];

    // Restore previous directory.
    if (change_dir)
        chdir(old_dir);

    // Free memory.
    if (added)  delete added;
    if (backup) delete backup;

    return text;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::readFooter ( PStream &  in,
const string &  classname 
)

consumes "</ClassName>\n"

Definition at line 81 of file pl_io_deprecated.cc.

References PLearn::PStream::get(), and PLERROR.

Referenced by PLearn::RealMapping::read().

{
    string footer;
    in >> footer;
    string correctfooter = string("</")+classname+">";
    if(footer != correctfooter)
        PLERROR("In Object::readFooter WRONG FOOTER: %s (SHOULD BE %s)",footer.c_str(),correctfooter.c_str());
    in.get(); // consume newline
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::readHeader ( PStream &  in,
const string &  classname 
)

consumes "<ClassName:version>\n and returns version"

Definition at line 61 of file pl_io_deprecated.cc.

References PLearn::PStream::get(), PLERROR, and toint().

Referenced by PLearn::RealMapping::read().

{
    string header;
//#if defined(_MINGW_) || defined(WIN32)
//  in.tellg();   // Don't remove this line under MinGW, it apparently does nothing
//                // but if it's not there, it won't work (Hint: Microsoft conspiracy)
//#endif
    in >> header;
    int headerlen = (int)header.length();
    in.get(); // consume newline
    int classnamelen = (int)classname.length();
    if (   headerlen<classnamelen+2 
           || header[0]!='<' || header.substr(1,classnamelen)!=classname
           || (header[1+classnamelen]!='>' && header[1+classnamelen]!=':') )
        PLERROR("In Object::readHeader WRONG HEADER: %s (SHOULD BE {%s:version>)",header.c_str(),classname.c_str());
    if (header[1+classnamelen]==':')
        return toint(header.substr(2+classnamelen, headerlen-classnamelen-2));
    else return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class MapT >
void PLearn::readMap ( PStream &  in,
MapT &  m 
)

Definition at line 989 of file PStream.h.

References c, PLearn::PStream::get(), PLearn::PStream::peek(), PLERROR, and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

Referenced by operator>>().

{
    m.clear();
    in.skipBlanksAndCommentsAndSeparators();
    int c = in.get();
    if(c!='{')
        PLERROR("In readMap(Pstream& in, MapT& m) expected '{' but read %c",c);
    in.skipBlanksAndCommentsAndSeparators();
    c = in.peek(); // do we have a '}' ?
    while(c!='}')
    {
        pair<typename MapT::key_type, typename MapT::mapped_type> val;
        in >> val.first;
        in.skipBlanksAndCommentsAndSeparators();
        c = in.get();
        if(c!=':')
            PLERROR("In readMap(Pstream& in, MapT& m) separator between key and value must be ':', but I read a '%c'",c);
        in.skipBlanksAndCommentsAndSeparators();
        in >> val.second;
        m.insert(val);
        in.skipBlanksAndCommentsAndSeparators();
        c = in.peek(); // do we have a '}' ?
    }
    in.get(); // eat the '}'
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::readNewline ( istream &  in) [inline]

Reads next character and issues an error if it's not a newline.

Definition at line 201 of file pl_io_deprecated.h.

References PLERROR.

{ if(in.get()!='\n') PLERROR("In readNewline: character read is not a newline char"); }
Object* PLearn::readObject ( istream &  in_) [inline]

Definition at line 1143 of file Object.h.

References in, and readObject().

{
    PStream in(&in_);
    return readObject(in);
}

Here is the call graph for this function:

Object * PLearn::readObject ( PStream &  in,
unsigned int  id = UINT_MAX 
)

This function builds an object from its representation in the stream.

It understands several representations:

  • The <ObjectClass> ... </ObjectClass> type of representation as is typically produced by write() serialization methods and functions. This will call the object's read() method.
  • The ObjectClass( optionname=optionvalue; ... ; optionname=optionvalue ) type of representation (typical form for human input), will result in appropriate calls of the object's setOption() followed by its build().
  • load( filepath ) will call loadObject

Definition at line 880 of file Object.cc.

References c, PLearn::PStream::copies_map_in, PLearn::PStream::get(), PLearn::PStream::getline(), PLearn::Object::getOption(), PLearn::TypeFactory::instance(), loadObject(), newObject(), PLearn::TypeFactory::newObject(), PLearn::Object::newread(), PLearn::PStream::peek(), PLERROR, removeblanks(), PLearn::PStream::skipBlanksAndCommentsAndSeparators(), and PLearn::PStream::unread().

Referenced by PLearn::Plide::executePyPLearn(), loadObject(), macroLoadObject(), newObject(), operator>>(), readObject(), PLearn::RunCommand::run(), PLearn::PyPLearnScript::run(), and smartLoadObject().

{
    Object *o=0;
    in.skipBlanksAndCommentsAndSeparators();

    string head;

    int c = in.peek();
    if (c == '<')  // Old (deprecated) serialization mode 
        PLERROR("Old deprecated serialization mode starting with '<' no longer supported.");
    else if (c == '*') // Pointer to object
    {
        in >> o;
    } 
    else if(c == '`') // back-quote: reference to an object in another file
    {
        in.get(); // skip the opening back-quote
        string fname;
        in.getline(fname,'`');
        fname = removeblanks(fname);
        // TODO: Check if this is really what we want
        //       (ie: We could want to use the options
        //            of 'in' to load the object...)
        o = loadObject(fname);
    }
    else // It must be a Classname(...) kind of definition 
    {
        string cl;
        in.getline(cl, '(');
        cl = removeblanks(cl);
        // It's a Classname(opt1 = ...; ...; optn = ...); --> calls newread()
        o = TypeFactory::instance().newObject(cl);
        if (!o)
            PLERROR("readObject() - Type \"%s\" not declared in TypeFactory map (did you do a proper DECLARE_NAME_AND_DEEPCOPY?)", cl.c_str());
        in.unread(cl+'(');

        // Finally read the guts of the object
        o->newread(in, id);
    }

#if 0
    // Code that could be used... but need to see if it's useful and not too ugly.
    // See if we actually want an option of this object, instead of the object itself.
    in.skipBlanksAndCommentsAndSeparators();
    while (in.peek() == '.') {
        in.get(); // Skip the dot.
        char ch;
        string option_name;
        while (((ch = in.peek()) >= 'A' && ch <= 'z') || ch == '_' || (ch >= '0' && ch <= '9')) {
            in.get();
            option_name += ch;
        }
        if (option_name == "")
            PLERROR("In readObject - Could not read correctly the option name following a dot");
        o = newObject(o->getOption(option_name));
    }
#endif
       
    if (id != UINT_MAX)
        in.copies_map_in[id] = o;
    return o;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class PriorityQueueT >
void PLearn::readPriorityQueue ( PStream &  in,
PriorityQueueT &  pq 
)

Definition at line 1579 of file PStream.h.

References c, PLearn::PStream::get(), PLearn::PStream::peek(), PLCHECK, PLERROR, and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

Referenced by operator>>().

{
    PLCHECK(pq.empty());
    in.skipBlanksAndCommentsAndSeparators();
    int c = in.get();
    if(c!='[')
        PLERROR("In readPriorityQueue(Pstream& in, PriorityQueueT& pq) expected '[' but read %c",c);
    in.skipBlanksAndCommentsAndSeparators();
    c = in.peek(); // do we have a ']' ?
    while(c!=']')
    {
        typename PriorityQueueT::value_type val;
        in >> val;
        pq.push(val);
        in.skipBlanksAndCommentsAndSeparators();
        c = in.peek(); // do we have a ']' ?
    }
    in.get(); // eat the ']'
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class SequenceType >
void PLearn::readSequence ( PStream &  in,
SequenceType &  seq 
)

Reads in a sequence type from a PStream.

For this to work with the current implementation, the SequenceType must have:

  • typedefs defining (SequenceType::...) value_type, size_type, iterator,
  • a begin() method that returns a proper iterator,
  • a size_type size() method returning the size of the current container,
  • a resize(size_type n) method that allows to change the size of the container (which should also work with resize(0)),
  • a push_back(const value_type& x) method that appends the element x at the end.

Definition at line 1358 of file PStream.h.

References BIG_ENDIAN_ORDER, binread_(), byte_order(), c, endianswap(), PLearn::PStream::eof(), PLearn::PStream::get(), PLearn::PStream::inmode, LITTLE_ENDIAN_ORDER, n, PLearn::PStream::peek(), PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLERROR, PLearn::PStream::raw_ascii, PLearn::PStream::raw_binary, PLearn::PStream::read(), PLearn::PStream::skipBlanks(), PLearn::PStream::skipBlanksAndComments(), PLearn::PStream::skipBlanksAndCommentsAndSeparators(), and x.

Referenced by operator>>(), and PLearn::TVec< PP< RegressionTreeNode > >::read().

{
    switch(in.inmode)
    {
    case PStream::raw_ascii:
    {
        // norman: added explicit cast
        int n = (int)seq.size();
        typename SequenceType::iterator it = seq.begin();
        while(n--)
        {
            in.skipBlanks();
            in >> *it;
            // don't skip blanks before we need to read something else
            // (read might block).
            //in.skipBlanks();
            ++it;
        }
    }
    break;
    case PStream::raw_binary:
    {
        int n = (int)seq.size();
        typename SequenceType::iterator it = seq.begin();
        while(n--)
        {
            in >> *it;
            ++it;
        }
    }
    break;

    case PStream::plearn_ascii:
    case PStream::plearn_binary:
    {
        in.skipBlanksAndComments();
        int c = in.peek();
        if (c == EOF)
            PLERROR("In PStream.h / readSequence - The input stream is empty");
        else if(c=='[') // read until ']'
        {
            in.get(); // skip '['
            seq.resize(0);
            in.skipBlanksAndCommentsAndSeparators();
            while(in.peek()!=']' && in.peek()!=EOF && !in.eof())
            {
                typename SequenceType::value_type x;
                in >> x;
                seq.push_back(x);
                in.skipBlanksAndCommentsAndSeparators();
            }
            if (in.peek()==EOF || in.eof())
                PLERROR("Reading stream, unmatched left bracket [, missing ]");
            in.get(); // skip ']'
        }
        else if(isdigit(c))
        {
            unsigned int n;
            in >> n;
            in.skipBlanksAndComments();
            c = in.get();
            if(c!='[')
                PLERROR("Error in readSequence(SequenceType& seq), expected '[', read '%c'",c);
            // don't skip blanks before we need to read something else
            // (read might block).
            //in.skipBlanksAndCommentsAndSeparators();
            seq.resize((typename SequenceType::size_type) n);
            if (n>0)
            {
                typename SequenceType::iterator it = seq.begin();
                while(n--)
                {
                    in.skipBlanksAndCommentsAndSeparators();
                    in >> *it;
                    // don't skip blanks before we need to read something else
                    // (read might block).
                    //in.skipBlanksAndCommentsAndSeparators();
                    ++it;
                }
            }
            in.skipBlanksAndCommentsAndSeparators();
            c = in.get();
            if(c!=']')
                PLERROR("Error in readSequence(SequenceType& seq), expected ']', read '%c'",c);

        }
        else if(c==0x12 || c==0x13) // it's a generic binary 1D sequence
        {
            in.get(); // eat c
            unsigned char typecode = in.get();
            unsigned int l;
            in.read((char*)&l,sizeof(l));

            bool inverted_byte_order =
                ((c==0x12 && byte_order()==BIG_ENDIAN_ORDER)
                 || (c==0x13 && byte_order()==LITTLE_ENDIAN_ORDER) );

            if(inverted_byte_order)
                endianswap(&l);
            seq.resize((typename SequenceType::size_type) l);
            binread_(in, seq.begin(), l, typecode);
        }
        else
            PLERROR("In readSequence(SequenceType& seq) '%c' not a proper first character in the header of a sequence!",c);
    }
    break;

    default:
        PLERROR("In PStream::operator>>  unknown inmode!!!!!!!!!");
        break;
    }

}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class SetT >
void PLearn::readSet ( PStream &  in,
SetT &  s 
)

Definition at line 1529 of file PStream.h.

References c, PLearn::PStream::get(), PLearn::PStream::peek(), PLERROR, and PLearn::PStream::skipBlanksAndCommentsAndSeparators().

Referenced by operator>>().

{
    s.clear();
    in.skipBlanksAndCommentsAndSeparators();
    int c = in.get();
    if(c!='[')
        PLERROR("In readSet(Pstream& in, SetT& s) expected '[' but read %c",c);
    in.skipBlanksAndCommentsAndSeparators();
    c = in.peek(); // do we have a ']' ?
    while(c!=']')
    {
        typename SetT::value_type val;
        in >> val;
        s.insert(val);
        in.skipBlanksAndCommentsAndSeparators();
        c = in.peek(); // do we have a ']' ?
    }
    in.get(); // eat the ']'
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::readWhileMatches ( PStream &  in,
const string &  s 
)

Reads while the characters read exactly match those in s.

Will throw a PLERROR exception as soon as it doesn't match.

Definition at line 422 of file fileutils.cc.

References c, PLearn::PStream::get(), i, n, PLERROR, and PLearn::PStream::unget().

Referenced by readAndMacroProcess().

                                                   {
    string::size_type i = 0;
    int c;
    c = in.get();
    string::size_type n = s.length();
    while(c!=EOF)
    {
        if(s[i]!=c)
        {
            in.unget(); // Match failed, unget that last character.
            PLERROR("In readWhileMatches. Failure while matching %s: "
                    "at position %ld expected a '%c', but read a '%c'",s.c_str(),long(i),s[i],c);
        }
        ++i;
        if(i==n) // passed through the whole string 
            return;
        c = in.get();
    }
    PLERROR("In readWhileMatches, met EOF while matching %s", s.c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::real2rgb ( real  colorval,
real r,
real g,
real b 
)

Definition at line 68 of file GhostScript.cc.

Referenced by PLearn::GhostScript::setcolor(), and PLearn::GhostScript::writeBitmapHexString24Bits().

  {
    int col = int(colorval);
    int r100 = col/10000;
    col = col%10000;
    int g100 = col/100;
    col = col%100;
    int b100 = col;
    r = real(r100)/100.0;
    g = real(g100)/100.0;
    b = real(b100)/100.0;
  }

Here is the caller graph for this function:

VMat PLearn::rebalanceNClasses ( VMat  inputs,
int  nclasses,
const string &  filename 
)

Rebalance the input VMatrix so that each class has a probability 1/nclasses. Also, the return VMat class alternates between all classes cyclicly. The resulting VMat is a SelectRowsFileIndexVMatrix which has its IntVecFile load if filename already exist, or computed if not.

Definition at line 171 of file VMat_operations.cc.

References binary_search(), c, PLearn::Array< T >::clear(), clear(), PLearn::TMat< T >::column(), fast_exact_is_equal(), i, isfile(), j, PLearn::VMat::lastColumn(), PLearn::TVec< T >::length(), n, PLERROR, PLearn::IntVecFile::put(), PLearn::VMat::rows(), sortRows(), PLearn::VMat::toMat(), and PLearn::TMat< T >::toVecCopy().

{
    if (!isfile(filename))
    {
        IntVecFile indices(filename, true);
        Vec last = inputs.lastColumn()->toMat().toVecCopy();
        const int len = last.length();
        Vec capacity(nclasses);
        Array<Vec> index(nclasses);
        Array<Vec> index_used(nclasses);
        for (int i=0; i<nclasses; i++) index[i].resize(len);
        for (int i=0; i<nclasses; i++) index_used[i].resize(len);
        real** p_index;
        p_index = new real*[nclasses];
        for (int i=0; i<nclasses; i++) p_index[i] = index[i].data();
        for (int i=0; i<nclasses; i++) index_used[i].clear();
        for (int i=0; i<len; i++)
        {
            int class_i = int(last[i]);
            *p_index[class_i]++ = i;
            capacity[class_i]++;
        }
        for (int i=0; i<nclasses; i++) index[i].resize(int(capacity[i]));
        for (int i=0; i<nclasses; i++) index_used[i].resize(int(capacity[i]));

        Mat class_length(nclasses,2);
        for (int i=0; i<nclasses; i++)
        {
            class_length(i,0) = capacity[i];
            class_length(i,1) = i;
        }
        sortRows(class_length);
        Vec remap = class_length.column(1).toVecCopy();

        vector<int> n(nclasses,0);
        int new_index = -1;
        for (int i=0; i<len; i++)
        {
            int c = i%nclasses;
            int c_map = int(remap[c]);
            if (c == 0)
            {
                if (fast_exact_is_equal(n[0], capacity[c_map])) n[0] = 0;
                new_index = int(index[c_map][n[0]++]);
            }
            else
            {
                if (fast_exact_is_equal(n[c], capacity[c_map]))
                {
                    n[c] = 0;
                    index_used[c_map].clear();
                }
                bool index_found = false;
                int start_pos = binary_search(index[c_map], real(new_index));
                for (int j=start_pos+1; j<capacity[c_map]; j++)
                {
                    if (fast_exact_is_equal(index_used[c_map][j], 0))
                    {
                        index_used[c_map][j] = 1;
                        new_index = int(index[c_map][j]);
                        index_found = true;
                        n[c]++;
                        break;
                    }
                }
                if (!index_found)
                {
                    for (int j=0; j<start_pos; j++)
                    {
                        if (fast_exact_is_equal(index_used[c_map][j], 0))
                        {
                            index_used[c_map][j] = 1;
                            new_index = int(index[c_map][j]);
                            index_found = true;
                            n[c]++;
                            break;
                        }
                    }
                }
                if (!index_found)
                    PLERROR("In rebalanceNClasses:  something got wrong!");
            }
            indices.put(i, new_index);
        }

        delete[] p_index;
    }
    return inputs.rows(filename);
}

Here is the call graph for this function:

template<class ObjectType , class VecElementType >
void PLearn::redeclareOption ( OptionList &  ol,
const string &  optionname,
TVec< VecElementType > ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Partial specialization for TVec<T>

Definition at line 507 of file Option.h.

References PLERROR.

{
    bool found = false;
    for (OptionList::iterator it = ol.begin(); !found && it != ol.end(); it++) {
        if ((*it)->optionname() == optionname) {
            // We found the option to redeclare.
            found = true;
            (*it) = new TVecOption<ObjectType, VecElementType>
                (optionname, member_ptr, flags,
                 TypeTraits< TVec<VecElementType> >::name(),
                 defaultval, description, level);
        }
    }
    if (!found) {
        // We tried to redeclare an option that wasn't declared previously.
        PLERROR("Option::redeclareOption: trying to redeclare option '%s' that has "
                "not been declared before", optionname.c_str());
    }
}
template<class ObjectType , class OptionType >
void PLearn::redeclareOption ( OptionList &  ol,
const string &  optionname,
OptionType ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Allows one to redeclare an option differently (e.g.

in a subclass, after calling inherited::declareOptions).

Parameters:
olthe list to which this option should be appended
optionnamethe name of this option
member_ptr&YourClass::your_field
descriptionsee the flags in OptionBase a description of the option
levelOption level (see OptionBase)
defaultvaldefault value for this option, as set by the default constructor

Definition at line 455 of file Option.h.

References PLearn::TypeTraits< T >::name(), and PLERROR.

Referenced by PLearn::VariableDeletionVMatrix::declareOptions(), PLearn::UnfrozenDeepBeliefNet::declareOptions(), PLearn::UnfoldedFuncVariable::declareOptions(), PLearn::UnconditionalDistribution::declareOptions(), PLearn::UCIDataVMatrix::declareOptions(), PLearn::TorchLearner::declareOptions(), PLearn::TanhModule::declareOptions(), PLearn::SVMClassificationTorch::declareOptions(), PLearn::SurfaceTemplateLearner::declareOptions(), PLearn::Supersampling2DModule::declareOptions(), PLearn::Subsampling2DModule::declareOptions(), PLearn::SplitModule::declareOptions(), PLearn::SpectralClustering::declareOptions(), PLearn::SortRowsVMatrix::declareOptions(), PLearn::SoftmaxModule::declareOptions(), PLearn::SelectRowsVMatrix::declareOptions(), PLearn::SelectColumnsVMatrix::declareOptions(), PLearn::ScoreLayerVariable::declareOptions(), PLearn::ReorderByMissingVMatrix::declareOptions(), PLearn::RemoveDuplicateVMatrix::declareOptions(), PLearn::RegressionTreeMulticlassLeaveProb::declareOptions(), PLearn::RegressionTreeMulticlassLeaveFast::declareOptions(), PLearn::RBMMixedConnection::declareOptions(), PLearn::RBMMatrixTransposeConnection::declareOptions(), PLearn::RBMLocalMultinomialLayer::declareOptions(), PLearn::RBMConv2DConnection::declareOptions(), PLearn::RBMConnection::declareOptions(), PLearn::RandomGaussMix::declareOptions(), PLearn::ProcessDatasetVMatrix::declareOptions(), PLearn::PrecomputedVMatrix::declareOptions(), PLearn::NGramDistribution::declareOptions(), PLearn::NetworkModule::declareOptions(), PLearn::MultiToUniInstanceSelectRandomVMatrix::declareOptions(), PLearn::ModuleStackModule::declareOptions(), PLearn::MixtureDistribution::declareOptions(), PLearn::MemoryVMatrixNoSave::declareOptions(), PLearn::MeanMedianModeImputationVMatrix::declareOptions(), PLearn::MaxSubsampling2DModule::declareOptions(), PLearn::ManifoldParzen2::declareOptions(), PLearn::LogaddOnBagsModule::declareOptions(), PLearn::LocallyPrecomputedVMatrix::declareOptions(), PLearn::LLE::declareOptions(), PLearn::LinearRegressor::declareOptions(), PLearn::KernelProjection::declareOptions(), PLearn::KernelPCA::declareOptions(), PLearn::Isomap::declareOptions(), PLearn::HyperLearner::declareOptions(), PLearn::GramVMatrix::declareOptions(), PLearn::GaussMixLocalProjections::declareOptions(), PLearn::FilteredVMatrix::declareOptions(), PLearn::ExtractNNetParamsVMatrix::declareOptions(), PLearn::CrossEntropyCostModule::declareOptions(), PLearn::CostModule::declareOptions(), PLearn::CosKernel::declareOptions(), PLearn::Convolution2DModule::declareOptions(), PLearn::CombiningCostsModule::declareOptions(), PLearn::BootstrapVMatrix::declareOptions(), PLearn::BackConvolution2DModule::declareOptions(), PLearn::AutoVMatrixSaveSource::declareOptions(), and PLearn::AutoVMatrix::declareOptions().

{
    bool found = false;
    for (OptionList::iterator it = ol.begin(); !found && it != ol.end(); it++) {
        if ((*it)->optionname() == optionname) {
            // We found the option to redeclare.
            found = true;
            (*it) = new Option<ObjectType, OptionType>
                (optionname, member_ptr, flags, TypeTraits<OptionType>::name(), defaultval, description, level);
        }
    }
    if (!found) {
        // We tried to redeclare an option that wasn't declared previously.
        PLERROR("Option::redeclareOption: trying to redeclare option '%s' that has "
                "not been declared before", optionname.c_str());
    }
}

Here is the call graph for this function:

template<class ObjectType , class OptionType >
void PLearn::redeclareOption ( OptionList &  ol,
const string &  optionname,
OptionType *ObjectType::*  member_ptr,
OptionBase::flag_t  flags,
const string &  description,
const OptionBase::OptionLevel  level = OptionBase::default_level,
const string &  defaultval = "" 
) [inline]

Partial specialization for pointers.

Parameters:
olthe list to which this option should be appended
optionnamethe name of this option
member_ptr&YourClass::your_field
descriptionsee the flags in OptionBase a description of the option
levelOption level (see OptionBase)
defaultvaldefault value for this option, as set by the default constructor

Definition at line 481 of file Option.h.

References PLearn::TypeTraits< T >::name(), and PLERROR.

{
    bool found = false;
    for (OptionList::iterator it = ol.begin(); !found && it != ol.end(); it++) {
        if ((*it)->optionname() == optionname) {
            // We found the option to redeclare.
            found = true;
            (*it) = new Option<ObjectType, OptionType*>
                (optionname, member_ptr, flags, TypeTraits<OptionType*>::name(), defaultval, description, level);
        }
    }
    if (!found) {
        // We tried to redeclare an option that wasn't declared previously.
        PLERROR("Option::redeclareOption: trying to redeclare option '%s' that has "
                "not been declared before", optionname.c_str());
    }
}

Here is the call graph for this function:

VMat PLearn::reduceDataSetSize ( real  fraction,
VMat  data 
)

Definition at line 159 of file databases.cc.

References PLearn::VMat::length(), and PLearn::VMat::subMatRows().

{
    int n_examples=data->length();
    int new_n_examples=(int)(fraction*n_examples);
    return data.subMatRows(0,new_n_examples);
}

Here is the call graph for this function:

VMat PLearn::reduceInputSize ( real  fraction,
VMat  data 
)

Definition at line 151 of file databases.cc.

References endl(), PLearn::VMat::subMatColumns(), and PLearn::VMat::width().

{
    int n_inputs=data->width()-1;
    int reduce_n_inputs=(int)(fraction*n_inputs);
    cout<<"use "<<reduce_n_inputs<<" of "<<n_inputs<<endl;
    VMat new_data = data.subMatColumns(n_inputs-reduce_n_inputs,1+reduce_n_inputs);
    return new_data;
}

Here is the call graph for this function:

int PLearn::region1ClosestPoint ( const Vec &  planep,
const Vec &  va,
const Vec &  vb,
const Vec &  ea,
Vec &  closest 
) [inline]

Definition at line 1219 of file geometry.cc.

References dot().

Referenced by closestPointOnTriangle().

{
  real ta = dot( (planep - va), ea ) / dot( ea, ea );

  if( ta >= 1 ) // then vb
  {
    closest << vb;
    return( 1 );
  }
  else if( ta <= 0 ) // then va
  {
    closest << va;
    return( 0 );
  }
  else // then ea
  {
    closest << ( va + ta*ea );
    return( 2 );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::region2ClosestPoint ( const Vec &  planep,
const Vec &  va,
const Vec &  vb,
const Vec &  vc,
const Vec &  ea,
const Vec &  eb,
Vec  closest 
) [inline]

Definition at line 1279 of file geometry.cc.

References dot().

Referenced by closestPointOnTriangle().

{
  real ta = dot( planep - va, ea ) / dot( ea, ea );
  real tb = dot( planep - vb, eb ) / dot( eb, eb );

  if( ta <= 0 ) // then va
  {
    closest << va;
    return( 0 );
  }
  else if( tb >=1 ) // then vc
  {
    closest << vc;
    return( 2 );
  }
  else if( ta < 1 ) // then ea
  {
    closest << ( va + ta*ea );
    return( 3 );
  }
  else if( tb > 0 ) // then eb
  {
    closest << (vb + tb*eb );
    return( 4 );
  }
  else // then vb
  {
    closest << vb;
    return( 1 );
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::regulargrid_x_y_outputs_to_bitmap ( Mat  regulargrid_x_y_outputs,
bool  output_margin,
int  ndiscretevals,
Mat &  bm,
real xlow,
real xhigh,
real ylow,
real yhigh 
)

Definition at line 163 of file DisplayUtils.cc.

References color_luminance_to_rgbreal(), PLearn::TMat< T >::column(), PLearn::TMat< T >::length(), regulargrid_x_y_rgbreal_to_bitmap(), scores_to_winners(), PLearn::TMat< T >::subMatColumns(), transform_perclass_values_into_luminance(), and PLearn::TMat< T >::width().

  {
    int l = regulargrid_x_y_outputs.length();
    int outputsize = regulargrid_x_y_outputs.width()-2;
    Mat regulargrid_x_y = regulargrid_x_y_outputs.subMatColumns(0,2);
    Mat outputs = regulargrid_x_y_outputs.subMatColumns(2,outputsize);
    Mat winners;
    scores_to_winners(outputs, winners);
    Vec classnums(l);
    Vec values(l);
    classnums << winners.column(0);
    values << winners.column(output_margin ?2 :1);
    transform_perclass_values_into_luminance(classnums, values, ndiscretevals);
    Vec rgbreal;
    color_luminance_to_rgbreal(classnums, values, rgbreal);
    Mat regulargrid_x_y_rgbreal(l,3);
    regulargrid_x_y_rgbreal.subMatColumns(0,2) << regulargrid_x_y;
    regulargrid_x_y_rgbreal.column(2) << rgbreal;    
    regulargrid_x_y_rgbreal_to_bitmap(regulargrid_x_y_rgbreal, 
                                      bm, xlow, xhigh, ylow, yhigh);  
  }

Here is the call graph for this function:

void PLearn::regulargrid_x_y_rgbreal_to_bitmap ( Mat &  regulargrid_x_y_rgbreal,
Mat &  bm,
real xlow,
real xhigh,
real ylow,
real yhigh 
)

Definition at line 135 of file DisplayUtils.cc.

References fast_exact_is_equal(), i, j, PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::resize(), and sortRows().

Referenced by regulargrid_x_y_outputs_to_bitmap().

  {
    TVec<int> key_columns(2);
    key_columns[0] = 0;
    key_columns[1] = 1;
    sortRows(regulargrid_x_y_rgbreal, key_columns);
    int l = regulargrid_x_y_rgbreal.length();
    xlow = regulargrid_x_y_rgbreal(0,0);
    xhigh = regulargrid_x_y_rgbreal(l-1,0);
    ylow = regulargrid_x_y_rgbreal(0,1);
    yhigh = regulargrid_x_y_rgbreal(l-1,1);
    int ny=1;
    while(!fast_exact_is_equal(regulargrid_x_y_rgbreal(ny,1), ylow))
      ++ny;

    int nx = l/ny;
    if(nx*ny!=l)
      PLERROR("Problem in regulargrid_x_y_rgbreal_to_rgbimage : estimated_nx * estimated_ny != l (%d*%d!=%d)",nx,ny,l);

    bm.resize(ny,nx);    
    int k = 0;
    for(int j=0; j<nx; j++)
      for(int i=ny-1; i>=0; i--)
        bm(i,j) = regulargrid_x_y_rgbreal(k++,2);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::regularizeMatrix ( const TMat< T > &  mat,
tolerance 
)

Applies a regularizer : diag(A) += (tolerance * trace(A))

Definition at line 4508 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), and trace().

Referenced by PLearn::ReconstructionWeightsKernel::reconstruct(), smartInitialization(), and PLearn::LLC::train().

{
    T reg;
    T* k;
    int shift;
    reg = tolerance * trace(mat);
    k = mat.data();
    shift = mat.mod() + 1;
    for (int i = 0; i < mat.length(); i++) {
        *k += reg;
        k += shift;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::reindexed_target ( Var  target,
Var  input,
PP< Dictionary >  dict,
TVec< int target_cols 
) [inline]

Definition at line 108 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,dict,target_cols); }
Var PLearn::reindexed_target ( Var  target,
Var  input,
VMat  source,
TVec< int target_cols 
) [inline]

Definition at line 105 of file ReIndexedTargetVariable.h.

Referenced by PLearn::DistRepNNet::buildVarGraph().

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }

Here is the caller graph for this function:

void PLearn::remapClassnums ( VMat &  data,
real  remap_minval_to,
real  remap_maxval_to 
)

remaps classnums to {0,1} or to {-1,+1}

Definition at line 167 of file databases.cc.

References i, PLearn::VMat::length(), and PLearn::VMat::width().

{
    // Map classnums in last row from 0,1 to -1,1
    int inputsize = data.width()-1;
    for(int i=0; i<data.length(); i++)
    {
        if(data(i,inputsize)<=0.0)
            data->put(i,inputsize,remap_minval_to);
        else
            data->put(i,inputsize,remap_maxval_to);
    }
}

Here is the call graph for this function:

VMat PLearn::remapLastColumn ( VMat  s,
Mat  mapping,
bool  call_build_ = false 
) [inline]

Definition at line 115 of file RemapLastColumnVMatrix.h.

Referenced by loadClassificationDataset().

{ return new RemapLastColumnVMatrix(s, mapping, call_build_); }

Here is the caller graph for this function:

VMat PLearn::remapLastColumn ( VMat  s,
real  if_equals_value,
real  then_value = 1.0,
real  else_value = -1.0,
bool  call_build_ = false 
) [inline]

Definition at line 118 of file RemapLastColumnVMatrix.h.

{ return new RemapLastColumnVMatrix(s, if_equals_value,
                                    then_value, else_value, call_build_); }
Object * PLearn::remote_deepCopy ( Object *  source)

Definition at line 1053 of file Object.cc.

References PLearn::Object::deepCopy().

{
    CopiesMap copies;
    return source->deepCopy(copies);
}

Here is the call graph for this function:

tuple<real,real> PLearn::remote_KS_test ( Vec &  v1,
Vec &  v2,
int  conv 
)

Returns result of Kolmogorov-Smirnov test between 2 samples (D and p-value) The call sorts v1 and v2.

Definition at line 343 of file stats_utils.cc.

References KS_test().

{
    real D, pvalue;
    KS_test(v1,v2,conv,D, pvalue);
    return make_tuple(D, pvalue);
}

Here is the call graph for this function:

tuple< Vec, Vec > PLearn::remote_KS_tests ( VMat &  m1,
VMat &  m2,
int  conv 
)

Returns result of Kolmogorov-Smirnov test for each pair of variable between the two VMat (Ds and p-values) The call sorts v1 and v2.

Definition at line 350 of file stats_utils.cc.

References KS_test().

{
    Vec Ds, pvalues;
    KS_test(m1, m2, conv, Ds, pvalues);
    return make_tuple(Ds, pvalues);
}

Here is the call graph for this function:

Mat PLearn::remote_solveLinearSystemByCholesky ( const Mat &  A,
const Mat &  B 
)

Remote method for 'solveLinearSystemByCholesky'.

Definition at line 70 of file TMat_maths.cc.

References PLearn::TMat< T >::length(), solveLinearSystemByCholesky(), and PLearn::TMat< T >::width().

{
    Mat weights(A.length(), B.width());
    solveLinearSystemByCholesky(A, B, weights);
    return weights;
}

Here is the call graph for this function:

vector< string > PLearn::remove ( const vector< string > &  v,
string  element 
)

return vector with all instances of element removed

Definition at line 587 of file stringutils.cc.

References i.

{
    vector<string> res;
    for (size_t i=0;i<v.size();i++)
        if (v[i]!=element) res.push_back(v[i]);
    return res;
}
void PLearn::remove_comments ( string &  text,
const string &  commentstart 
)

In a multiline text, removes everything starting at commentstart pattern until the end of line.

Definition at line 554 of file stringutils.cc.

Referenced by getModelAliases(), PLearn::SurfaceMesh::readVRMLCoordinate3_(), PLearn::SurfaceMesh::readVRMLIndexedFaceSet_(), and PLearn::SurfaceMesh::readVRMLIndexedLineSet_().

{
    size_t startpos=0;
    size_t endpos=0;
    while(endpos!=string::npos)
    {
        startpos = text.find(commentstart,startpos);
        if(startpos==string::npos)
            break;
        endpos = text.find_first_of("\n\r",startpos);
        text.erase(startpos, endpos-startpos);
    }
}

Here is the caller graph for this function:

string PLearn::remove_extension ( const string &  filename)

Return the filename withoug the extension (i.e. removing the last.

Definition at line 119 of file stringutils.cc.

Referenced by PLearn::MatlabInterface::eigs_r11(), matlabR11eigs(), and use().

{
    size_t p = filename.rfind(".");
    if (p != string::npos)
        return filename.substr(0,p);
    else
        return filename;
}

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::remove_missing ( const TVec< T > &  vec)

@ return a new array that contain only the non-missing value @ see remove_missing_inplace for inplace version

Definition at line 1833 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, is_missing(), PLearn::TVec< T >::length(), n, and PLearn::TVec< T >::resize().

Referenced by PLearn::SequentialModelSelector::paired_t_test(), PLearn::TMatTest::perform(), and PLearn::SequentialModelSelector::train().

{
    int n = vec.length();
    int n_non_missing = 0;
    TVec<T> result(n);
    if (n > 0) {
        T* v = vec.data();
        T* r = result.data();
        for(int i=0; i<n; i++) {
            if (!is_missing(v[i]))
                r[n_non_missing++] = v[i];
        }
        result.resize(n_non_missing);
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::remove_missing_inplace ( TVec< T > &  v)

remove all missing value inplace while keeping the order

Definition at line 1852 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), is_missing(), PLearn::TVec< T >::length(), pl_swap(), and PLearn::TVec< T >::resize().

Referenced by KS_test().

{   
    int n_non_missing=0;
    int next_non_missing=1;
    T* d = v.data();
    for(;;)
    {
        while(n_non_missing<v.length()&&!is_missing(d[n_non_missing]))
        {
            n_non_missing++;next_non_missing++;
        }
        if(n_non_missing>=v.length())
            return;
        while(next_non_missing<v.length()&&is_missing(d[next_non_missing]))
            next_non_missing++;
        if(next_non_missing>=v.length())
        {
            v.resize(n_non_missing);
            return;
        }
        else
        {
            pl_swap(d[n_non_missing],d[next_non_missing]);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::remove_trailing_slash ( const string &  s)

removes any trailing '/' from the path

Definition at line 217 of file stringutils.cc.

References slash_char.

Referenced by PLearn::VVMatrix::createPreproVMat(), PLearn::VVMatrix::getPrecomputedDataName(), PLearn::VVMatrix::isPrecomputedAndUpToDate(), and newFilename().

{
    string::size_type pos = s.length();
    while(pos >= 1 && s[pos - 1]==slash_char)
        pos--;
    return s.substr(0,pos);
}

Here is the caller graph for this function:

string PLearn::removeallblanks ( const string &  s)

removes all blanks '\n','\r',' ','\t'

Definition at line 167 of file stringutils.cc.

References c, and i.

Referenced by PLearn::StatSpec::parseStatname().

{
    string res;
    size_t l = s.length();
    for(size_t i=0; i<l; i++)
    {
        char c = s[i];
        if(c!=' ' && c!='\t' && c!='\n' && c!='\r')
            res += c;
    }
    return res;
}

Here is the caller graph for this function:

string PLearn::removeblanks ( const string &  s)

removes starting and ending blanks '\n','\r',' ','\t'

Definition at line 145 of file stringutils.cc.

References i, and j.

Referenced by PLearn::Object::asString(), PLearn::Object::asStringRemoteTransmit(), PLearn::VVMatrix::build_(), PLearn::LIBSVMSparseVMatrix::build_(), PLearn::FileDictionary::build_(), PLearn::AsciiVMatrix::build_(), PLearn::VVMatrix::createPreproVMat(), PLearn::VVMatrix::extractSourceMatrix(), PLearn::HTMLUtils::format_free_text(), PLearn::HTMLHelpCommand::format_free_text(), PLearn::VVMatrix::generateVMatIndex(), getDataSet(), getModelAliases(), PLearn::Object::getOption(), PLearn::WordNetSenseDictionary::getSensesFromWordNet(), PLearn::TextFilesVMatrix::getTextFields(), PLearn::HTMLHelpCommand::helpOnClass(), PLearn::HelpSystem::helpOnOptionHTML(), loadAscii(), loadAsciiSingleBinaryDescriptor(), PLearn::Object::newread(), PLearn::PDate::PDate(), pl_isnumber(), PLearn::VMatLanguage::preprocess(), PLearn::VVMatrix::processJoinSection(), PLearn::RealMapping::read(), PLearn::TextFilesVMatrix::readAndCheckOptionName(), readAndMacroProcess(), readObject(), PLearn::SurfaceMesh::readVRMLCoordinate3_(), PLearn::SurfaceMesh::readVRMLIndexedFaceSet_(), PLearn::SurfaceMesh::readVRMLIndexedLineSet_(), PLearn::VMatrix::resolveFieldInfoLink(), PLearn::TextFilesVMatrix::setColumnNamesAndWidth(), PLearn::TextFilesVMatrix::splitIntoFields(), PLearn::VMatLanguage::staticPreprocess(), stemsOfWord(), stemWord(), PLearn::StringTable::StringTable(), PLearn::TextFilesVMatrix::transformStringToValue(), viewVMat(), and vmatmain().

{
    size_t start=0;
    size_t end=0;
    size_t i;
    string::size_type j;
    for(i=0; i<s.length(); i++)
        if(s[i]!=' ' && s[i]!='\t' && s[i]!='\n' && s[i]!='\r')
            break;
  
    if(i==s.length())
        return string("");
    else
        start = i;

    for(j=s.length(); j>=1; j--)
        if(s[j-1]!=' ' && s[j-1]!='\t' && s[j-1]!='\n' && s[j-1]!='\r')
            break;
    end = size_t(j - 1);
    return s.substr(start,end-start+1);
}

Here is the caller graph for this function:

template<class T >
TMat< T > PLearn::removeColumn ( const TMat< T > &  m,
int  colnum 
)

returns a new mat which is m with the given column removed if the column to remove is the first or the last one, then a submatrix (a view) of m will be returned (for efficiency) otherwise, it is a fresh copy with the column removed.

Definition at line 686 of file TMat_impl.h.

References hconcat(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

{
    if(colnum==0)
        return m.subMatColumns(1,m.width()-1);
    else if(colnum==m.width()-1)
        return m.subMatColumns(0,m.width()-1);
    else
        return hconcat(m.subMatColumns(0,colnum),
                       m.subMatColumns(colnum+1,m.width()-(colnum+1)));
}

Here is the call graph for this function:

void PLearn::removeDelimiters ( string &  s,
string  delim,
string  replace 
)

Definition at line 2914 of file WordNetOntology.cc.

Referenced by PLearn::WordNetOntology::extractOntology(), and PLearn::WordNetOntology::getSynsetWords().

{
    unsigned int pos = s.find(delim, 0);
    while (pos != string::npos)
    {
        s.replace(pos, 1, replace);
        pos = s.find(delim, pos + 1);
    }
}

Here is the caller graph for this function:

template<class T >
TVec< T > PLearn::removeElement ( const TVec< T > &  v,
int  elemnum 
)

if the element to remove is the first or the last one, then a submatrix (a view) of m will be returned (for efficiency) otherwise, it is a fresh copy with the element removed.

Definition at line 221 of file TMat_impl.h.

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

{
    if(elemnum==0)
        return v.subVec(1,v.length()-1);
    else if(elemnum==v.length()-1)
        return v.subVec(0,v.length()-1);
    else
        return concat(v.subVec(0,elemnum),
                      v.subVec(elemnum+1,v.length()-(elemnum+1)));
}

Here is the call graph for this function:

void PLearn::removeFromWrappedObjectsSet ( PyObject *  o)

Definition at line 464 of file PythonExtension.cc.

References endl(), PLASSERT, PLERROR, and the_PLearn_python_module.

Referenced by PLearn::PythonObjectWrapper::gc_collect1(), and ramassePoubelles().

{
    DBG_MODULE_LOG << "removeFromWrappedObjectsSet for module: " << PythonObjectWrapper(the_PLearn_python_module)
                   << "\tremoving object: " << PythonObjectWrapper(o) << endl;
    PLASSERT(the_PLearn_python_module);
    if(-1 == PyObject_SetAttrString(the_PLearn_python_module, const_cast<char*>("_tmp_wrapped_instance"), o))
        PLERROR("in removeFromWrappedObjectsSet : cannot add wrapped object to module.");
    PyObject* res= PyRun_String("\nwrapped_PLearn_instances.remove(_tmp_wrapped_instance)"
                                "\ndel _tmp_wrapped_instance\n", 
                                Py_file_input, 
                                PyModule_GetDict(the_PLearn_python_module), 
                                PyModule_GetDict(the_PLearn_python_module));
    if(!res)
    {
        if(PyErr_Occurred()) PyErr_Print();
        PLERROR("in removeFromWrappedObjectsSet : cannot remove wrapped object from set.");
    }
    Py_DECREF(res);
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::removenewline ( const string &  s)

removes any trailing '\n' and/or '\r'

Definition at line 180 of file stringutils.cc.

Referenced by PLearn::AsciiVMatrix::build_(), PLearn::TextFilesVMatrix::getTextRow(), and pgetline().

{
    string::size_type pos = s.length();
    while(pos>=1 && (s[pos - 1]=='\r' || s[pos - 1]=='\n'))
        pos--;
    return s.substr(0,pos);
}

Here is the caller graph for this function:

string PLearn::removequotes ( const string &  s)

remove exactly one pair of matching leading and trailing '\'' and '"'; if there is none, return the string unmodified

Definition at line 188 of file stringutils.cc.

References n.

{
    const int n = int(s.size());
    if (n >= 2) {
        if ((s[0] == '"'  && s[n-1] == '"') ||
            (s[0] == '\'' && s[n-1] == '\''))
            return s.substr(1,n-2);
    }
    return s;
}
void PLearn::removeReferenceToFile ( const PPath &  file)

Decrease by one the number of references to a file.

Definition at line 1402 of file fileutils.cc.

References PLearn::PPath::absolute(), PLearn::PPath::canonical(), count_refs_to_file, PLearn::PPath::isEmpty(), and PLERROR.

Referenced by PLearn::TemporaryFileVMatrix::closeCurrentFile(), and PLearn::TemporaryDiskVMatrix::closeCurrentFiles().

{
    if (file.isEmpty())
        return;
    string s = file.canonical();
    if (count_refs_to_file.find(s) != count_refs_to_file.end())
        if (count_refs_to_file[s] == 0)
            PLERROR("In removeReferenceToFile - Trying to decrease the counter"
                    " of references to file '%s', but it is already zero",
                    file.absolute().c_str());
        else
            count_refs_to_file[s]--;
    else
        PLERROR("In removeReferenceToFile - Trying to decrease the counter of "
                "references to file '%s', but it is not in the counter map",
                file.absolute().c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::removeRow ( VMat  d,
int  rownum 
) [inline]

Definition at line 105 of file RemoveRowsVMatrix.h.

{ return new RemoveRowsVMatrix(d,Vec(1,rownum)); }
template<class T >
TMat< T > PLearn::removeRow ( const TMat< T > &  m,
int  rownum 
)

returns a new mat which is m with the given row removed if the row to remove is the first or the last one, then a submatrix (a view) of m will be returned (for efficiency) otherwise, it is a fresh copy with the row removed.

Definition at line 674 of file TMat_impl.h.

References PLearn::TMat< T >::length(), PLearn::TMat< T >::subMatRows(), and vconcat().

Referenced by PLearn::Learner::computeLeaveOneOutCosts(), and PLearn::BallTreeNearestNeighbors::createAnchors().

{
    if(rownum==0)
        return m.subMatRows(1,m.length()-1);
    else if(rownum==m.length()-1)
        return m.subMatRows(0,m.length()-1);
    else
        return vconcat(m.subMatRows(0,rownum),
                       m.subMatRows(rownum+1,m.length()-(rownum+1)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::removeRows ( VMat  d,
Vec  rownums 
) [inline]

Definition at line 102 of file RemoveRowsVMatrix.h.

{ return new RemoveRowsVMatrix(d,rownums); }
VMat PLearn::repeat_vmatrix ( VMat  source,
int  repeat_n_times 
) [inline]

Definition at line 117 of file RepeatVMatrix.h.

References PLearn::RepeatVMatrix::build(), PLearn::RepeatVMatrix::repeat_n_times, and PLearn::SourceVMatrix::source.

{
  RepeatVMatrix* vmat = new RepeatVMatrix();
  vmat->source = source;
  vmat->repeat_n_times = repeat_n_times;
  vmat->build();
  return vmat;
}

Here is the call graph for this function:

void PLearn::replaceChars ( string &  str,
string  char_to_replace,
string  replacing_char 
)

Definition at line 2932 of file WordNetOntology.cc.

{
    unsigned int pos = str.find(char_to_replace, 0);
    while (pos != string::npos)
    {
        str.replace(pos, 1, replacing_char);
        pos = str.find(char_to_replace, pos + 1);
    }
}
Var PLearn::reshape ( Var  v,
int  newlength,
int  newwidth 
) [inline]

Definition at line 83 of file ReshapeVariable.h.

Referenced by PLearn::GaussianContinuum::build_(), and PLearn::GaussianContinuumDistribution::build_().

{ return new ReshapeVariable(v,newlength,newwidth); }

Here is the caller graph for this function:

void PLearn::reverse_double ( const double *  ptr,
int  n 
) [inline]

Definition at line 73 of file pl_io_deprecated.h.

References endianswap().

Referenced by fread_double(), fwrite_double(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), read_double(), and write_double().

{ endianswap((double*)ptr,n); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::reverse_float ( const float *  ptr,
int  n 
) [inline]

Definition at line 72 of file pl_io_deprecated.h.

References endianswap().

Referenced by fread_float(), fwrite_float(), loadCorelDatamat(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), read_float(), and write_float().

{ endianswap((float*)ptr,n); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::reverse_int ( const int ptr,
int  n 
) [inline]

Definition at line 71 of file pl_io_deprecated.h.

References endianswap().

Referenced by fread_int(), fwrite_int(), PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), PLearn::FilesIntStream::read_current(), read_int(), and write_int().

{ endianswap((int*)ptr,n); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::reverse_short ( const short *  ptr,
int  n 
) [inline]

Definition at line 75 of file pl_io_deprecated.h.

References endianswap().

Referenced by PLearn::SimpleDB< KeyType, QueryResult >::memoryToDisk(), read_short(), and write_short().

{ endianswap((short*)ptr,n); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::reverse_uint ( const unsigned int ptr,
int  n 
) [inline]

Swap bytes between Big-Endian and Little-Endian representation in memory NOTE: these calls are deprecated, use directly endianswap from base/byte_order.h.

Definition at line 70 of file pl_io_deprecated.h.

References endianswap().

{ endianswap((unsigned int*) ptr,n); }

Here is the call graph for this function:

void PLearn::reverse_ushort ( const unsigned short *  ptr,
int  n 
) [inline]

Definition at line 74 of file pl_io_deprecated.h.

References endianswap().

Referenced by fread_short().

{ endianswap((unsigned short*)ptr,n); }

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::rgb2real ( real  r,
real  g,
real  b 
)

These are used to pack and unpack r,g,b triplets to and from a single real. As usual in postscript, r,g and b are values between 0 and 1 indicating quantity of light.

Definition at line 60 of file GhostScript.cc.

Referenced by color(), and color_luminance_to_rgbreal().

  { 
    int r100 = int(r*99.99);
    int g100 = int(g*99.99);
    int b100 = int(b*99.99);
    return real(r100*10000+g100*100+b100);
  }

Here is the caller graph for this function:

real PLearn::ridgeRegressionByGCV ( Mat  X,
Mat  Y,
Mat  W,
real best_GCV,
bool  X_is_transposed = false,
real  initial_weight_decay_guess = -1,
int  explore_threshold = 5,
real  min_weight_decay = 0 
)

Perform ridge regression WITH model selection (i.e.

choosing the weight decay). The selection of weight decay is done in order to minimize the Generalized Cross Validation (GCV) criterion(Craven & Wahba 1979). The ridge regression weights minimize min ||Y - X*W'||^2 + weight_decay ||W||^2. where Y is nxm, X is nxp, W is mxp, and this procedure ALSO selects a weight_decay value. The GCV is obtained by performing and SVD of X = U D V' and using the formula from (Bates, Lindstrom, Wahba, Yandell 1986) [tech report at http://www.stat.wisc.edu/~wahba/ftp1/oldie/775r.pdf] (here for m=1): n ( ||Y||^2 - ||Z||^2 + sum_{j=1}^p z_j^2 (weight_decay / (d_j^2 + weight_decay))^2 ) GCV = ------------------------------------------------------------------------------------ ( n - p + sum_{j=1}^p (weight_decay / (d_j^2 + weight_decay)) )^2 where Z = U' Y, z_j is the j-th element of Z and d_j is the j-th singular value of X. This formula can be efficiently re-computed for different values of weight decay. For this purpose, pre-compute the SVD can call GCVfromSVD. Once a weight decay has been selected, the SVD can also be used (optionally) to obtain the minimizing weights: W = V inv(D^2 + weight_decay I) D Z If a positve initial_weight_decay_guess is provided, then instead of trying all the eigenvalues the algorithm searches from this initial guess, never going more than explore_threshold steps from the best weight decay found up to now. The weight decays tried are intermediate values (geometric average) between consecutive eigenvalues. Set best_GCV to the GCV of the selected weight decay and return that selected weight decay.

Definition at line 890 of file plapack.cc.

References PLearn::TMat< T >::column(), dist(), exp(), PLearn::TVec< T >::fill(), GCVfromSVD(), PLearn::TMat< T >::hasMissing(), i, j, left(), PLearn::TMat< T >::length(), m, max(), min(), n, pl_log, PLASSERT, PLERROR, pownorm(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), right(), sumsquare(), SVD(), PLearn::TVec< T >::toMat(), transpose(), transposeProduct(), and PLearn::TMat< T >::width().

{
    int n = Y.length();
    int m = Y.width();
    int p, nx;
    if (X_is_transposed)
    { 
        nx=X.width();
        p=X.length();
    } else {
        nx=X.length();
        p=X.width();
    }
    if (nx!=n)
        PLERROR("ridgeRegressionByGCV: incompatible arguments X and Y don't have same number of examples: %d and %d\n",nx,n);
    if (W.length()!=m)
        PLERROR("ridgeRegressionByGCV: incompatible arguments W and Y don't have compatible dimensions: %d and %d\n",W.length(),m);
    if (W.width()!=p)
        PLERROR("ridgeRegressionByGCV: incompatible arguments W and X don't have compatible dimensions: %d and %d\n",W.width(),p);
    Mat Xcopy, U, Vt, Z, squaredZ;
    Vec singular_values, eigen_values, s, y2, z2, best_s;
    Xcopy.resize(n,p);
    if (X_is_transposed)
        transpose(X, Xcopy);
    else
        Xcopy << X;
    int rank = min(n,p);
    U.resize(n,rank);
    Vt.resize(rank,p);
    singular_values.resize(rank);
    eigen_values.resize(rank);
    Z.resize(m,rank);
    squaredZ.resize(m,rank);
    s.resize(rank);
    best_s.resize(rank);
    y2.resize(m);
    z2.resize(m);
    PLASSERT( !Xcopy.hasMissing() );
    SVD(Xcopy, U, singular_values, Vt, 'S', 2);
    for (int i=0;i<rank;i++)
        eigen_values[i] = singular_values[i]*singular_values[i];

    for (int j=0;j<m;j++)
    {
        Mat Yj = Y.column(j);
        Vec Zj = Z(j);
        y2[j] = sumsquare(Yj);
        transposeProduct(Zj.toMat(rank,1),U,Yj);
        z2[j] = pownorm(Zj);
    }

    Vec gcv;
    gcv.resize(rank);
    gcv.fill(-1.);
    best_gcv = 1e38;
    real best_weight_decay = min_weight_decay;
    if (initial_weight_decay_guess<0) // TRY ALL EIGENVALUES
        // for (int i=1;i<=rank;i++)
        for (int i=1;i<rank;i++)
        {
            bool stop=false;
            real weight_decay = 0;
            /*
            if(i==rank)
                weight_decay = min_weight_decay;
            else
            */
            weight_decay = exp(0.5*(pl_log(eigen_values[i-1])+pl_log(eigen_values[i])));
            // perr << "Trying weight_decay = " << weight_decay;
            if (weight_decay < min_weight_decay)
            {
                weight_decay = min_weight_decay;
                stop = true;
            }
            for (int j=0;j<rank;j++)
                s[j] = weight_decay / (weight_decay + eigen_values[j]);
            real gcv_i = 0;
            for (int j=0;j<m;j++)
                gcv_i += GCVfromSVD(n,y2[j]-z2[j], Z(j), s);
            // perr << " -> gcv =  " << gcv_i << endl;
            if (gcv_i<best_gcv)
            {
                best_gcv=gcv_i;
                best_weight_decay = weight_decay;
                best_s << s;
            }
            if (stop)
                break;
        }
    else // BE MORE GREEDY: DO A SEARCH FROM INITIAL GUESS
    {
        // first find eigenvalue closest to initial guess
        Vec weight_decays(rank+1);
        weight_decays[0] = max(min_weight_decay,eigen_values[0]);
        int stop = rank;
        for (int i=1;i<rank;i++)
        {
            if (i<stop)
            {
                weight_decays[i] = exp(0.5*(pl_log(eigen_values[i-1])+pl_log(eigen_values[i])));
                if (weight_decays[i] < min_weight_decay)
                {
                    stop = i;
                    weight_decays[i] = min_weight_decay;
                }
            }
            else weight_decays[i] = min_weight_decay;
        }
        int closest = 0;
        real eval_dist = fabs(weight_decays[0]-initial_weight_decay_guess);
        for (int i=1;i<stop;i++)
        {
            real dist = fabs(weight_decays[i]-initial_weight_decay_guess);
            if (dist < eval_dist)
            {
                eval_dist = dist;
                closest = i;
            }
        }
        // how well are we doing there?
        best_weight_decay = weight_decays[closest];

        int best_i = closest;
        for (int i=0;i<rank;i++)
            s[i] =  best_weight_decay / (best_weight_decay + eigen_values[i]);
        gcv[closest] = 0;
        for (int j=0;j<m;j++)
            gcv[closest] += GCVfromSVD(n,y2[j]-z2[j], Z(j), s);
        best_gcv = gcv[closest];
        best_s << s;

        // then explore around it, first one way, then the other, until it looks like we can't get better
        int left=closest;
        int right=closest;
        if (right<stop-1)
            right++;
        else
            left--;
        while (left>=0 || right<stop-1)
        {
            bool improved = false;
            if (gcv[left]<0)
            {
                for (int i=0;i<rank;i++)
                    s[i] = weight_decays[left] / (weight_decays[left] + eigen_values[i]);
                gcv[left] = 0;
                for (int j=0;j<m;j++)
                    gcv[left] += GCVfromSVD(n,y2[j]-z2[j], Z(j), s);
                if (gcv[left]<best_gcv)
                {
                    best_gcv=gcv[left];
                    best_weight_decay = weight_decays[left];
                    best_i = left;
                    best_s << s;

                    if (left>0)
                    {
                        left--;
                        improved = true;
                    }
                }
            }   
            if (gcv[right]<0)
            {
                for (int i=0;i<rank;i++)
                    s[i] = weight_decays[right] / (weight_decays[right] + eigen_values[i]);
                gcv[right] = 0;
                for (int j=0;j<m;j++)
                    gcv[right] += GCVfromSVD(n,y2[j]-z2[j], Z(j), s);
                if (gcv[right]<best_gcv)
                {
                    best_gcv=gcv[right];
                    best_weight_decay = weight_decays[right];
                    best_i = right;
                    best_s << s;

                    if (right<stop-1)
                    {
                        right++;
                        improved = true;
                    }
                }
            }
            if (!improved)
            {
                if (best_i - left < right - best_i)
                {
                    if (best_i - left < explore_threshold)
                    {
                        if (left>0)
                            left--;
                        else if (right - best_i < explore_threshold && right<stop-1)
                            right++;
                        else break;
                    }
                    else break;
                }
                else
                {
                    if (right - best_i < explore_threshold)
                    {
                        if (right<stop-1)
                            right++;
                        else if (best_i - left < explore_threshold && left>0)
                            left--;
                        else break;
                    }
                    else break;
                }
            }
        }
    }

    // compute weights for selected weight decay
    for (int j=0;j<m;j++)
    {
        Vec zj = Z(j);
        for (int i=0;i<rank;i++)
            zj[i] *= best_s[i]*singular_values[i]/best_weight_decay;
        transposeProduct(W(j),Vt,zj);
    }
    return best_weight_decay;
}

Here is the call graph for this function:

string PLearn::right ( const string &  s,
size_t  width,
char  padding 
)
Var PLearn::rightPseudoInverse ( Var  v) [inline]

Definition at line 76 of file RightPseudoInverseVariable.h.

{
    return new RightPseudoInverseVariable(v);
}
template<class T >
void PLearn::rightPseudoInverse ( const TMat< T > &  m,
TMat< T > &  inv 
)

Definition at line 6079 of file TMat_maths_impl.h.

References inverse(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
    if (m.length()==m.width())
        inverse(m,inv);
    if (m.length()>m.width())
        PLERROR("rightPseudoInverse: matrix length(%d) must be <= width(%d)",
                m.length(), m.width());
    PLERROR("SVD not implemented yet");
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::rightPseudoInverse ( TMat< T > &  m)

Definition at line 6069 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

Referenced by PLearn::RightPseudoInverseVariable::fprop(), and PLearn::ProductRandomVariable::invertible().

{
    TMat<T> inv(m.width(), m.length());
    rightPseudoInverse(m,inv);
    return inv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool PLearn::rm ( const PPath &  file,
bool  fail_on_error_if_exist 
)

Remove a file (return 'true' if removed sucessfully).

Definition at line 356 of file fileutils.cc.

References PLearn::PPath::absolute(), pathexists(), and PLERROR.

Referenced by PLearn::Cache< KeyType, ValueType >::clear(), PLearn::VVMatrix::createPreproVMat(), PLearn::VVMatrix::generateFilterIndexFile(), PLearn::VVMatrix::generateVMatIndex(), PLearn::VMatrix::getPrecomputedStatsFromFile(), loadMat(), newFilename(), PLearn::FilteredVMatrix::openIndex(), PLearn::FileVMatrixTest::perform(), PLearn::FieldConvertCommand::run(), PLearn::VMatrix::savePMAT(), PLearn::VMatrix::saveStringMappings(), PLearn::MeanMedianModeImputationVMatrix::setMetaDataDir(), PLearn::VMatrix::setSFIFFilename(), PLearn::VMatrix::unlockMetaDataDir(), PLearn::PrecomputedVMatrix::usePrecomputed(), vmatmain(), PLearn::TemporaryDiskVMatrix::~TemporaryDiskVMatrix(), and PLearn::TemporaryFileVMatrix::~TemporaryFileVMatrix().

{
    // New cross-platform version.
    PRStatus ret = PR_Delete(file.absolute().c_str());
    if(fail_on_error_if_exist && ret != PR_SUCCESS && pathexists(file))
        PLERROR("Can't delete file %s",file.c_str());
    return ret == PR_SUCCESS;
    /*
    // TODO Better cross-platform version ?
#ifdef WIN32
    // For the moment works ONLY with files!!!
    if ( !DeleteFile(file.absolute().c_str()) )
    {
        DWORD errorCode = GetLastError(); 
        LPVOID lpMsgBuf;
        FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
                       FORMAT_MESSAGE_FROM_SYSTEM,
                       NULL, errorCode,
                       MAKELANGID(LANG_NEUTRAL,
                                  SUBLANG_DEFAULT),
                       (LPTSTR) &lpMsgBuf, 0,
                       NULL );

        // Comment because it works only with files..
        //PLERROR("Cannot delete file %s. %s", file.c_str(), lpMsgBuf);
        LocalFree( lpMsgBuf );
    }
#else
    string command = "\\rm -rf " + file.absolute();
    system(command.c_str());
#endif
*/
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Func PLearn::rosenbrock ( int  D) [static]

Definition at line 64 of file ConjRosenbrock.cc.

References pow(), subMat(), and sum().

Referenced by PLearn::ConjRosenbrock::perform().

{
    // D = length(x);
    // f = sum(100*(x(2:D)-x(1:D-1).^2).^2 + (1-x(1:D-1)).^2);
    Var input(1, D, "input");
    Var drop_first   = subMat(input, 0, 1, 1, D-1);
    Var drop_last    = subMat(input, 0, 0, 1, D-1);
    Var drop_last_sq = pow(drop_last, 2);
    Var diff_100x_sq = pow(drop_first - drop_last_sq, 2) * 100.0;
    Var second_term  = pow(1 - drop_last,2);
    Var rosenbrock   = sum(diff_100x_sq + second_term);

    return Func(VarArray(input), VarArray(rosenbrock));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::rotate ( Mat &  a,
int  i,
int  j,
int  k,
int  l,
const real s,
const real tau 
)

Definition at line 409 of file geometry.cc.

References a, and g.

Referenced by jacobi().

{
  real g = a( i, j );
  real h = a( k, l );
  a( i, j ) = g - s*( h + g*tau );
  a( k, l ) = h + s*( g - h*tau );
}

Here is the caller graph for this function:

Mat PLearn::rotationFromAxisAngle ( const Vec &  K,
real  th 
)

Definition at line 104 of file SurfaceTemplate/geometry.cc.

References c.

{
    Mat R( 3, 3 );
    real c = cos( th );
    real s = sin( th );
    real v = 1 - c;

    R( 0, 0 ) = K[0]*K[0]*v + c;
    R( 0, 1 ) = K[0]*K[1]*v - K[2]*s;
    R( 0, 2 ) = K[0]*K[2]*v + K[1]*s;
    R( 1, 0 ) = K[0]*K[1]*v + K[2]*s;
    R( 1, 1 ) = K[1]*K[1]*v + c;
    R( 1, 2 ) = K[1]*K[2]*v - K[0]*s;
    R( 2, 0 ) = K[0]*K[2]*v - K[1]*s;
    R( 2, 1 ) = K[1]*K[2]*v + K[0]*s;
    R( 2, 2 ) = K[2]*K[2]*v + c;

    return R;
}
Mat PLearn::rotationFromAxisAngle ( Vec &  K,
real  th 
)

Definition at line 97 of file geometry.cc.

References c.

Referenced by main(), rotationFromWeightedMatchedPoints(), and weightedRotationFromMatchedPoints().

{
  // j'ai pas cherché à comprendre
  Mat R( 3, 3 );
  real c = cos( th );
  real s = sin( th );
  real v = 1 - c;

  R( 0, 0 ) = K[0]*K[0]*v + c;
  R( 0, 1 ) = K[0]*K[1]*v - K[2]*s;
  R( 0, 2 ) = K[0]*K[2]*v + K[1]*s;
  R( 1, 0 ) = K[0]*K[1]*v + K[2]*s;
  R( 1, 1 ) = K[1]*K[1]*v + c;
  R( 1, 2 ) = K[1]*K[2]*v - K[0]*s;
  R( 2, 0 ) = K[0]*K[2]*v - K[1]*s;
  R( 2, 1 ) = K[1]*K[2]*v + K[0]*s;
  R( 2, 2 ) = K[2]*K[2]*v + c;

  return R;
}

Here is the caller graph for this function:

Mat PLearn::rotationFromFixedAngles ( real  rx,
real  ry,
real  rz 
)

Definition at line 73 of file geometry.cc.

References DEG2RAD.

Referenced by PLearn::ICP::buildMeshes(), PLearn::ICP::iterate(), PLearn::ICP::iterativeReweight(), and main().

{
  Mat rot( 3, 3 );

  rx *= DEG2RAD;
  ry *= DEG2RAD;
  rz *= DEG2RAD;

  rot( 0, 0 ) = cos( rz ) * cos( ry );
  rot( 1, 0 ) = sin( rz ) * cos( ry );
  rot( 2, 0 ) = -sin( ry );

  rot( 0, 1 ) = cos( rz ) * sin( ry ) * sin( rx ) - sin( rz ) * cos( rx );
  rot( 1, 1 ) = sin( rz ) * sin( ry ) * sin( rx ) + cos( rz ) * cos( rx );
  rot( 2, 1 ) = cos( ry ) * sin( rx );

  rot( 0, 2 ) = cos( rz ) * sin( ry ) * cos( rx ) + sin( rz ) * sin( rx );
  rot( 1, 2 ) = sin( rz ) * sin( ry ) * cos( rx ) - cos( rz ) * sin( rx );
  rot( 2, 2 ) = cos( ry ) * cos( rx );

  return rot;
}

Here is the caller graph for this function:

Mat PLearn::rotationFromWeightedMatchedPoints ( const Mat &  template_points,
const Mat &  mol_points,
const Vec &  weights,
real error 
)

Definition at line 153 of file SurfaceTemplate/geometry.cc.

References diagonalmatrix(), eigenVecOfSymmMat(), i, PLearn::TMat< T >::length(), n, rotationFromAxisAngle(), PLearn::TMat< T >::subMat(), PLearn::TMat< T >::toVecCopy(), and transposeProductAcc().

Referenced by transformationFromWeightedMatchedPoints().

{
    Mat M( 4, 4 );
    Mat A( 4, 4 );
    Mat rot( 3, 3 );

    int n = template_points.length();
    Vec tp( 3 );
    Vec mp( 3 );

    for( int i=0 ; i<n ; i++ )
    {
        tp = template_points( i );
        mp = mol_points( i );

        real weight = weights[ i ];
        M(0,1) = tp[2]+mp[2];
        M(0,2) = -tp[1]-mp[1];
        M(0,3) = tp[0]-mp[0];

        M(1,0) = -tp[2]-mp[2];
        M(1,2) = tp[0]+mp[0];
        M(1,3) = tp[1]-mp[1];

        M(2,0) = tp[1]+mp[1];
        M(2,1) = -tp[0]-mp[0];
        M(2,3) = tp[2]-mp[2];

        M(3,0) = -tp[0]+mp[0];
        M(3,1) = -tp[1]+mp[1];
        M(3,2) = -tp[2]+mp[2];

        // A = A + transpose(M) * M * weight
        transposeProductAcc( A, M, M * weight );
    }

    Vec eigen_vals( 4 );
    Mat eigen_vecs( 4, 4 );

    eigenVecOfSymmMat( A, 4, eigen_vals, eigen_vecs, false );

    error = eigen_vals[ 3 ];
    real theta = 2.0 * acos( eigen_vecs( 3, 3 ) );

    if( theta !=0 )
    {
        Vec axis = eigen_vecs.subMat( 3, 0, 1, 3 ).toVecCopy();
        axis /= real(sin( theta/2.0 ));
        rot << rotationFromAxisAngle( axis, theta );
    }
    else
        rot << diagonalmatrix( Vec( 3, 1 ) );

    return rot;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::rotationMatrixFromAngles ( real  rx,
real  ry,
real  rz 
)

Definition at line 73 of file SurfaceTemplate/geometry.cc.

References DEG2RAD.

Referenced by PLearn::ChemicalICP::minimizeWeightedDistance(), rotationMatrixFromAngles(), and PLearn::ChemicalICP::run().

{
    Mat rot( 3, 3 );
    rx *= DEG2RAD;
    ry *= DEG2RAD;
    rz *= DEG2RAD;

    rot(0, 0) = cos( rz ) * cos( ry );
    rot(1, 0) = sin( rz ) * cos( ry );
    rot(2, 0) = -sin( ry );

    rot(0, 1) = cos( rz ) * sin( ry ) * sin( rx ) - sin( rz ) * cos( rx );
    rot(1, 1) = sin( rz ) * sin( ry ) * sin( rx ) + cos( rz ) * cos( rx );
    rot(2, 1) = cos( ry ) * sin( rx );

    rot(0, 2) = cos( rz ) * sin( ry ) * cos( rx ) + sin( rz ) * sin( rx );
    rot(1, 2) = sin( rz ) * sin( ry ) * cos( rx ) - cos( rz ) * sin( rx );
    rot(2, 2) = cos( ry ) * cos( rx );

    return rot;
}

Here is the caller graph for this function:

Mat PLearn::rotationMatrixFromAngles ( const Vec &  angles)

Definition at line 95 of file SurfaceTemplate/geometry.cc.

References PLERROR, rotationMatrixFromAngles(), and PLearn::TVec< T >::size().

{
    if( angles.size() != 3 )
        PLERROR( "rotationMatrixFromAngles - angles size should be 3 (is %d)."
                 "\n", angles.size() );

    return rotationMatrixFromAngles( angles[0], angles[1], angles[0] );
}

Here is the call graph for this function:

Mat PLearn::rotationMatrixFromAxisAngle ( const Vec &  K,
real  th 
)
template<class T >
void PLearn::rowArgmax ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5449 of file TMat_maths_impl.h.

References argmax(), i, PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1 || mat.width()==0)
        PLERROR("IN void rowMax(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix, and mat must have non-zero width");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = argmax(mat(i));
}

Here is the call graph for this function:

template<class T >
void PLearn::rowArgmin ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5460 of file TMat_maths_impl.h.

References argmin(), i, PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1 || mat.width()==0)
        PLERROR("IN void rowMax(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix, and mat must have non-zero width");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = argmin(mat(i));
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::rowmatrix ( const TVec< T > &  v) [inline]

returns a view of this vector as a single row matrix

Definition at line 860 of file TMat_impl.h.

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

Referenced by product(), and transposeProduct().

{ return v.toMat(1,v.length()); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::rowMax ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5404 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), max(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ShiftAndRescaleVMatrix::build_().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1 || mat.width()==0)
        PLERROR("IN void rowMax(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix, and mat must have non-zero width");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = max(mat(i));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::rowMax ( const TMat< T > &  mat,
const TVec< T > &  colvec 
)

Definition at line 5415 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), max(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(colvec.length()!=mat.length())
        PLERROR("IN void rowSum(const TMat<T>& mat, const TVec<T>& colvec) colvec must have same length as mat");
#endif
    for(int i=0; i<mat.length(); i++)
        colvec[i] = max(mat(i));
}

Here is the call graph for this function:

template<class T >
void PLearn::rowMean ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5365 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), mean(), PLERROR, and PLearn::TMat< T >::width().

Referenced by computeColumnsMeanAndStddev().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1 || mat.width()==0)
        PLERROR("IN void rowMean(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix, and mat must have non-zero width");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = mean(mat(i));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::rowMin ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5426 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), min(), PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ShiftAndRescaleVMatrix::build_().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1 || mat.width()==0)
        PLERROR("IN void rowMin(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix, and mat must have non-zero width");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = min(mat(i));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::rowMin ( const TMat< T > &  mat,
const TVec< T > &  colvec 
)

Definition at line 5438 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), min(), and PLERROR.

{
#ifdef BOUNDCHECK
    if(colvec.length()!=mat.length())
        PLERROR("IN void rowSum(const TMat<T>& mat, const TVec<T>& colvec) colvec must have same length as mat");
#endif
    for(int i=0; i<mat.length(); i++)
        colvec[i] = min(mat(i));
}

Here is the call graph for this function:

Var PLearn::rowOf ( VMat  distr,
Var  index 
) [inline]

rowOf

Definition at line 87 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
template<class T >
void PLearn::rowSum ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

all the operations below result in a column vector and are obtained by iterating (e.g. summing) over the column index, e.g. yielding the sum of each row in the result.

Definition at line 5330 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLERROR, sum(), and PLearn::TMat< T >::width().

Referenced by PLearn::KernelProjection::computeOutput(), PLearn::TimesColumnVariable::symbolicBprop(), PLearn::PlusColumnVariable::symbolicBprop(), PLearn::MinusColumnVariable::symbolicBprop(), and PLearn::DuplicateColumnVariable::symbolicBprop().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width() != 1)
        PLERROR("IN void rowSum(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = sum(mat(i));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::rowSum ( const TMat< T > &  mat,
const TVec< T > &  colvec 
)

Definition at line 5354 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and sum().

{
#ifdef BOUNDCHECK
    if(colvec.length()!=mat.length())
        PLERROR("IN void rowSum(const TMat<T>& mat, const TVec<T>& colvec) colvec must have same length as mat");
#endif
    for(int i=0; i<mat.length(); i++)
        colvec[i] = sum(mat(i));
}

Here is the call graph for this function:

Var PLearn::rowSum ( Var  v) [inline]

Definition at line 73 of file RowSumVariable.h.

{ 
    if(v->isColumnVec())
        return v;
    else
        return new RowSumVariable(v); 
}
template<class T >
void PLearn::rowSumAcc ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5342 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLERROR, sum(), and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width() != 1)
        PLERROR("IN void rowSum(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) += sum(mat(i));
}

Here is the call graph for this function:

template<class T >
void PLearn::rowSumOfSquares ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn 
)

Definition at line 5387 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1)
        PLERROR("IN void rowSumOfSquares(const TMat<T>& mat, TMat<T>& singlecolumn) singlecolumn must be a mat.length() x 1 matrix");
#endif
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T ss=0;
        T* mi=mat[i];
        for (int j=0;j<w;j++) { T mij=mi[j]; ss+=mij*mij; }
        singlecolumn(i,0)=ss;
    }
}

Here is the call graph for this function:

Var PLearn::rowSumSquare ( Var  v) [inline]

Definition at line 77 of file RowSumSquareVariable.h.

Referenced by PLearn::ScoreLayerVariable::build_(), and PLearn::DiverseComponentAnalysis::build_().

{ 
    return new RowSumSquareVariable(v); 
}

Here is the caller graph for this function:

template<class T >
void PLearn::rowVariance ( const TMat< T > &  mat,
const TMat< T > &  singlecolumn,
const TMat< T > &  rowmean 
)

Definition at line 5376 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), PLERROR, variance(), and PLearn::TMat< T >::width().

Referenced by computeColumnsMeanAndStddev().

{
#ifdef BOUNDCHECK
    if(singlecolumn.length()!=mat.length() || singlecolumn.width()!=1 || rowmean.length()!=mat.length() || rowmean.width()!=1 || mat.width()==0)
        PLERROR("IN void rowVariance(const TMat<T>& mat, TMat<T>& singlecolumn, const TMat<T>& rowmean) singlecolumn and rowmean must be mat.length() x 1 matrices, mat must have non-zero width");
#endif
    for(int i=0; i<mat.length(); i++)
        singlecolumn(i,0) = variance(mat(i),rowmean(i,0));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::safeexp ( real  a)

Definition at line 104 of file pl_math.cc.

References exp().

Referenced by PLearn::NnlmOutputLayer::applyMuCandidateGradient(), PLearn::NnlmOutputLayer::applyMuTargetGradient(), PLearn::NnlmOutputLayer::applySigmaCandidateGradient(), PLearn::NnlmOutputLayer::applySigmaGradient(), PLearn::NnlmOutputLayer::applySigmaTargetGradient(), PLearn::SoftmaxLossVariable::bprop(), PLearn::MatrixSoftmaxLossVariable::bprop(), PLearn::LogSoftSoftMaxVariable::bprop(), PLearn::LogSoftmaxVariable::bprop(), PLearn::LogAddVariable::bprop(), PLearn::MultiMaxVariable::bpropLogSoftMax(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::NeuralProbabilisticLanguageModel::compute_softmax(), PLearn::FeatureSetSequentialCRF::compute_softmax(), PLearn::FeatureSetNNet::compute_softmax(), PLearn::NnlmOutputLayer::computeApproxDiscriminantGradient(), PLearn::MultiInstanceNNet::computeCostsFromOutputs(), PLearn::NnlmOutputLayer::computeDiscriminantGradient(), PLearn::RBMWoodsLayer::computeExpectation(), PLearn::RBMWoodsLayer::computeExpectations(), PLearn::LocalMedBoost::computeFunctionWeightFormula(), PLearn::NnlmOutputLayer::computeNonDiscriminantGradient(), PLearn::MixtureRandomVariable::EMBprop(), PLearn::StackedFocusedAutoassociatorsNet::fineTuningStep(), PLearn::SoftmaxLossVariable::fprop(), PLearn::RBMWoodsLayer::fprop(), PLearn::MatrixSoftmaxVariable::fprop(), PLearn::MatrixSoftmaxLossVariable::fprop(), PLearn::LogSoftSoftMaxVariable::fprop(), PLearn::ExpVariable::fprop(), PLearn::RBMWoodsLayer::freeEnergyContributionGradient(), fullGaussianRBF(), PLearn::NnlmOutputLayer::getBestCandidates(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::MultiMaxVariable::logSoftmax_range(), normal_density(), PLearn::PLMathTest::perform(), rbf(), PLearn::LocalMedBoost::recomputeSampleWeight(), PLearn::SoftmaxLossVariable::rfprop(), softmax(), PLearn::MultiMaxVariable::softmax_range(), softmaxMinus(), PLearn::NnlmOnlineLearner::test(), and PLearn::PseudolikelihoodRBM::train().

{
#ifdef USEDOUBLE
    if (a < -300) return 0;
    if (a > 300) return 1e38;
#else
    if (a < -87) return 0;
    if (a > 43) return 5e18;
#endif
    return exp(a);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::safeflog ( real  base,
real  a 
)

Definition at line 126 of file pl_math.cc.

References safeflog().

{
    return safeflog(a) / safeflog(base);
}

Here is the call graph for this function:

real PLearn::safeflog ( real  a)

Definition at line 95 of file pl_math.cc.

References pl_log, and PLERROR.

Referenced by PLearn::GaussianProcessRegressor::BayesianCost(), PLearn::SparseIncrementalAffineTransformVariable::bprop(), PLearn::PowVariableVariable::bprop(), PLearn::PLogPVariable::bprop(), PLearn::LayerCostModule::bpropUpdate(), PLearn::ClassifierFromConditionalPDistribution::computeCostsFromOutputs(), PLearn::MultiInstanceNNet::computeCostsFromOutputs(), PLearn::StructuralLearner::computeCostsFromOutputs(), DirichletEstimatorMMoments(), PLearn::MultinomialRandomVariable::EMUpdate(), PLearn::DiagonalNormalRandomVariable::EMUpdate(), PLearn::MixtureRandomVariable::EMUpdate(), PLearn::NegLogProbCostFunction::evaluate(), PLearn::BinaryKernelDiscrimination::evaluate(), PLearn::PLogPVariable::fprop(), PLearn::LayerCostModule::fprop(), PLearn::LogVariable::fprop(), PLearn::SemiSupervisedProbClassCostVariable::fprop(), PLearn::RBMLateralBinomialLayer::fpropNLL(), PLearn::LayerCostModule::func_(), PLearn::FeatureSetNaiveBayesClassifier::getProbs(), PLearn::LayerCostModule::KLdivTerm(), PLearn::NGramDistribution::log_density(), PLearn::NeuralProbabilisticLanguageModel::nll(), PLearn::FeatureSetNNet::nll(), PLearn::FeatureSetSequentialCRF::nll(), PLearn::PLMathTest::perform(), safeflog(), safeflog2(), safelog(), PLearn::StructuralLearner::test(), PLearn::AdaBoost::train(), PLearn::NGramDistribution::train(), and PLearn::BinaryStump::train().

{
    if (a < 0.0)
        PLERROR("safeflog: negative argument (%f)", a);
    if (a < 1e-25)
        return -57.5;
    else return (real)pl_log((double)a);
}

Here is the caller graph for this function:

real PLearn::safeflog2 ( real  a)

Definition at line 131 of file pl_math.cc.

References LOG_2, and safeflog().

Referenced by PLearn::GraphicalBiText::computeKL(), and PLearn::PLMathTest::perform().

{
    return safeflog(a) / LOG_2;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::safelog ( const TVec< T > &  src) [inline]

Definition at line 1362 of file TMat_maths_impl.h.

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

{ TVec<T> dest(src.length()); compute_safelog(src,dest); return dest; }

Here is the call graph for this function:

real PLearn::safelog ( real  a) [inline]
void PLearn::samePos ( ProbabilitySparseMatrix &  m1,
ProbabilitySparseMatrix &  m2,
string  m1name,
string  m2name 
) [inline]

Definition at line 448 of file ProbabilitySparseMatrix.h.

References PLearn::Set::begin(), PLearn::Set::end(), PLearn::ProbabilitySparseMatrix::exists(), PLearn::ProbabilitySparseMatrix::getPyX(), PLERROR, x, and PLearn::ProbabilitySparseMatrix::Y.

{
    for (SetIterator yit = m1.Y.begin(); yit != m1.Y.end(); ++yit)
    {
        int y = *yit;
        const map<int, real>& yX = m1.getPyX(y);
        for (map<int, real>::const_iterator it = yX.begin(); it != yX.end(); ++it)
        {
            int x = it->first;
            if (!m2.exists(y, x))
                PLERROR("in samePos, %s contains an element that is not present in %s", m1name.c_str(), m2name.c_str());
        }
    }
}

Here is the call graph for this function:

void PLearn::sample ( ConditionalExpression  conditional_expression,
Mat &  samples 
)

Sample N instances from the given conditional expression, of the form (LHS|RHS) where LHS is a RandomVar and RHS is a RVInstanceArray, e.g. (X==x && Z==z && W==w). Put the N instances in the rows of the given Nxd matrix. THIS ALSO SHOWS HOW TO REPEATEDLY SAMPLE IN AN EFFICIENT MANNER (rather than call "Vec sample(ConditionalExpression)").

Definition at line 677 of file RandomVar.cc.

References PLearn::VarArray::fprop(), PLearn::TMat< T >::length(), and Sample().

{
    if (samples.length()==0) return;
    Var instance = Sample(conditional_expression);
    instance->fprop_from_all_sources();
    samples(0) << instance->value;
    if (samples.length()>0)
    {
        VarArray path;
        instance->random_sources().setMark(); // mark the random sources
        instance->markPath(); // mark successors of the random sources
        instance->buildPath(path); // extract path from the random sources to instance
        // and clear marks
        for (int i=1;i<samples.length();i++)
        {
            path.fprop();
            samples(i) << instance->value;
        }
    }
}

Here is the call graph for this function:

Var PLearn::Sample ( ConditionalExpression  conditional_expression)

Return a Var which depends functionally on the RHS instances and the value of other RandomVars which are non-random and influence the LHS.

Definition at line 701 of file RandomVar.cc.

References PLearn::ConditionalExpression::LHS, PLearn::ConditionalExpression::RHS, and PLearn::RVInstance::V.

Referenced by sample().

{
    RVInstanceArray& RHS = conditional_expression.RHS;
    RandomVar& LHS = conditional_expression.LHS.V;
    LHS->markRHSandSetKnownValues(RHS);
    LHS->unmarkAncestors();
    return LHS->value;
}

Here is the caller graph for this function:

Vec PLearn::sample ( ConditionalExpression  conditional_expression)

in practice, the user might want to specifify how to do the integrals, with an object yet to define, Marginalizer. RandomVar marginalize(const RandomVar& hiddenRV,Marginalizer& m) { PLERROR("marginalize not implemented yet..."); }

Sample an instance from the given conditional expression, of the form (LHS|RHS) where LHS is a RandomVar and RHS is a RVInstanceArray, e.g. (X==x && Z==z && W==w).

Definition at line 664 of file RandomVar.cc.

References Sample().

Referenced by PLearn::RBMTruncExpLayer::build_(), PLearn::RBMMultinomialLayer::build_(), PLearn::RBMGaussianLayer::build_(), PLearn::RBMBinomialLayer::build_(), PLearn::RBMTruncExpLayer::generateSample(), PLearn::RBMMultinomialLayer::generateSample(), PLearn::RBMGaussianLayer::generateSample(), PLearn::RBMBinomialLayer::generateSample(), PLearn::TopDownAsymetricDeepNetwork::greedyStep(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::GaussianDBNRegression::greedyStep(), PLearn::GaussianDBNClassification::greedyStep(), PLearn::DiscriminativeDeepBeliefNet::greedyStep(), PLearn::DeepNonLocalManifoldParzen::greedyStep(), PLearn::RBMBinomialLayer::RBMBinomialLayer(), PLearn::RBMGaussianLayer::RBMGaussianLayer(), PLearn::RBMMultinomialLayer::RBMMultinomialLayer(), PLearn::RBMTruncExpLayer::RBMTruncExpLayer(), PLearn::NnlmOnlineLearner::reevaluateGaussianParameters(), PLearn::PDistribution::remote_generate(), PLearn::TransformationLearner::return_dirichlet_sample(), PLearn::TransformationLearner::returnPredictedFrom(), PLearn::NnlmOnlineLearner::test(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedModulesLearner::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::PartSupervisedDBN::train(), PLearn::NnlmOnlineLearner::train(), PLearn::NatGradSMPNNet::train(), PLearn::NatGradNNet::train(), PLearn::ModulesLearner::train(), PLearn::mNNet::train(), PLearn::ManifoldParzen::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), and PLearn::DeepBeliefNet::train().

{
    Var instance = Sample(conditional_expression);
    instance->fprop_from_all_sources();
    return instance->value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::save ( const PPath &  filepath,
const T &  x,
PStream::mode_t  io_formatting = PStream::plearn_ascii,
bool  implicit_storage = true 
) [inline]

If necessary, missing directories along the filepath will be created A PStream is opened for saving with mode io_formatting and implicit_storage set as specified (see PStream.h for a.

Definition at line 71 of file load_and_save.h.

References force_mkdir_for_file(), PLearn::PStream::implicit_storage, mvforce(), openFile(), and x.

Referenced by PLearn::SelectColumnsVMatrix::build_(), PLearn::Experimentation::build_(), PLearn::MissingIndicatorVMatrix::buildNewRecordFormat(), cross_valid(), PLearn::VMatrix::getPrecomputedStatsFromFile(), PLearn::VMatrix::getRanges(), PLearn::PTester::perform1Split(), PLearn::Object::remote_save(), PLearn::VMatDictionaryCommand::run(), PLearn::Train::run(), PLearn::RunObject::run(), PLearn::OutputFeaturesCommand::run(), PLearn::FillFeatureSetCommand::run(), PLearn::WordNetOntology::save(), PLearn::SparseVMatrix::save(), PLearn::Object::save(), PLearn::CompactVMatrix::save(), PLearn::LearnerCommand::test(), PLearn::LearnerCommand::train(), train_and_test(), and vmatmain().

{ 
    force_mkdir_for_file(filepath);
    PPath tmp_file=filepath+".plearn_tmpsave";
    {
        PStream out = openFile( tmp_file, io_formatting, "w" );
        out.implicit_storage = implicit_storage;
        out << x;
    }//to be sure out is closed.
    mvforce(tmp_file, filepath);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::save_load_compare ( const AutoVMatrix &  vm,
const PPath &  prefix,
const PPath &  base,
const string &  ext,
int  dot 
)

Definition at line 130 of file AutoVMatrixTest.cc.

References endl(), PLearn::TMat< T >::isEqual(), MAND_LOG, PLERROR, PLearn::ForwardVMatrix::saveAMAT(), PLearn::ForwardVMatrix::saveDMAT(), PLearn::ForwardVMatrix::savePMAT(), and PLearn::ForwardVMatrix::toMat().

Referenced by unitTest().

{
    PPath save_to = prefix + PPath(base).replace(dot, base.length(), ext);
    if ( ext == ".amat" )
        vm.saveAMAT( save_to );
    else if ( ext == ".pmat" )
        vm.savePMAT( save_to );
    else if ( ext == ".dmat" )
        vm.saveDMAT( save_to );
    else
        PLERROR("!!!");

    AutoVMatrix reloaded( save_to );
    bool success = ( vm.toMat().isEqual( reloaded.toMat() ) );
    if ( success )
    {MAND_LOG << "Save and load suceeded on " << save_to << endl << endl;}
    else
    {MAND_LOG << "!!! Save and load FAILED on " << save_to << endl << endl;}
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void PLearn::save_vmat_as_arff ( VMat  source,
ostream &  destination,
TVec< string > &  date_columns,
bool  skip_missings,
int  precision = 12,
bool  verbose = true 
) [static]

This function converts a VMat to a ARFF (Attribute-Relation File Format) file with the given name.

One can also specify whether any missing values on a row cause that row to be skipped during export. In addition, the number of significant digits after the decimal period can be specified.

The 'date_columns' option (if not empty) flags the specified columns as a date. Also, it converts the date from CYYMMDD to YYYYMMDD (if necessary).

Definition at line 156 of file vmatmain.cc.

References PLearn::TVec< T >::contains(), PLearn::TVec< T >::hasMissing(), i, is_missing(), j, PLearn::VMat::length(), m, n, PLERROR, search_replace(), PLearn::TVec< T >::size(), and strlen().

Referenced by vmatmain().

{
    PP<ProgressBar> pb;
    if (verbose)
        pb = new ProgressBar(cout, "Saving to ARFF", source.length());

    // First, write the ARFF specific file header
    destination << "@relation arff-database\n";
    TVec<string> fields = source->fieldNames();
    int nb_fields = fields.size();
    for (int i=0; i<nb_fields; ++i)
    {
        string curfield = fields[i];
        destination << "@attribute " << curfield << " ";
        map<string,real> string_map = source->getStringToRealMapping(i);
        if (date_columns.contains(curfield))  // e.g. @attribute start_date date "yyyyMMdd"
            destination << "date \"yyyyMMdd\"\n";
        else if (string_map.empty())  // e.g. @attribute Age numeric
            destination << "numeric\n";
        else  // e.g. @attribute Country {"Canada", "China", "Columbia"}
        {
            int nb_keys = string_map.size();
            int key_i = 0;
            destination << "{";
            map<string,real>::iterator it;
            for (it = string_map.begin(); it != string_map.end(); ++it)
            {
                string key = it->first;
                search_replace(key, "\"", "\\\"");
                destination << '"' << key << '"';
                if (key_i < nb_keys-1)
                    destination << ", ";
                key_i++;
            }
            destination << "}\n";
        }
    }
    destination << "@data\n";

    // Next, output each line.  Perform missing-value checks if required.
    const string delimiter = ",";
    const int buffer_size = 10000;
    char buffer[buffer_size];
    for (int i=0, n=source.length(); i<n; ++i) {
        if (pb)
            pb->update(i+1);

        // Skip missing values?
        Vec currow = source(i);
        if (skip_missings && currow.hasMissing())
            continue;

        for (int j=0, m=currow.size(); j<m; ++j)
        {
            string strval = "";
            // Date field
            if (date_columns.contains(fields[j]))
            {
                // Date conversion: add 19000000 to convert from CYYMMDD to
                // YYYYMMDD, and always output without trailing . if not
                // necessary
                real curfield = currow[j];
                if (is_missing(curfield)  ||  curfield==0)  // missing value
                {
                    strval = "?";
                    strncpy(buffer, strval.c_str(), buffer_size);
                }
                else
                {
                    if (curfield < 10000000)  // CYYMMDD format
                        curfield += 19000000.0;
                    sprintf(buffer, "%8d", int(curfield));
                }
            }
            // String mapped field
            else if ((strval=source->getValString(j,currow[j])) != "")
            {
                search_replace(strval, "\"", "\\\"");
                strval = "\"" + strval + "\"";
                if (strval.length()>buffer_size-1)
                    PLERROR("a value is too big!");
                strncpy(buffer, strval.c_str(), buffer_size);
            }
            // Numeric field
            else
            {
                real curfield = currow[j];
                if (is_missing(curfield))  // missing value
                {
                    strval = "?";
                    strncpy(buffer, strval.c_str(), buffer_size);
                }
                else
                {
                    // Normal processing
                    sprintf(buffer, "%#.*f", precision, currow[j]);

                    // strip all trailing zeros and final period
                    // there is always a period since sprintf includes # modifier
                    char* period = buffer;
                    while (*period && *period != '.')
                        period++;
                    for (char* last = period + strlen(period) - 1; last >= period && (*last == '0' || *last == '.'); --last)
                    {
                        bool should_break = *last == '.';
                        *last = '\0';
                        if (should_break)
                            break;
                    }
                }
            }
            destination << buffer;
            if (j < m-1)
                destination << delimiter;
        }
        destination << "\n";
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void PLearn::save_vmat_as_csv ( VMat  source,
ostream &  destination,
bool  skip_missings,
int  precision = 12,
string  delimiter = ",",
bool  verbose = true,
bool  convert_date = false 
) [static]

This function converts a VMat to a CSV (comma-separated value) file with the given name.

One can also specify a list of column names or numbers to keep, as well as whether any missing values on a row cause that row to be skipped during export. In addition, the number of significant digits after the decimal period can be specified.

If the 'convert_date' option is true (whose purpose is to convert CYYMMDD dates into YYYYMMDD dates), then the integer 19000000 is added to the first element of each row (assumed to contain a date column).

Definition at line 77 of file vmatmain.cc.

References PLearn::TVec< T >::hasMissing(), i, j, PLearn::VMat::length(), m, n, PLERROR, search_replace(), PLearn::TVec< T >::size(), and strlen().

Referenced by vmatmain().

{
    char buffer[1000];
  
    // First, output the fieldnames in quoted CSV format.  Don't forget
    // to quote the quotes
    TVec<string> fields = source->fieldNames();
    for (int i=0, n=fields.size() ; i<n ; ++i) {
        string curfield = fields[i];
        search_replace(curfield, "\"", "\\\"");
        destination << '"' << curfield << '"';
        if (i < n-1)
            destination << delimiter;
    }
    destination << "\n";

    PP<ProgressBar> pb;
    if (verbose)
        pb = new ProgressBar(cout, "Saving to CSV", source.length());

    // Next, output each line.  Perform missing-value checks if required.
    for (int i=0, n=source.length() ; i<n ; ++i) {
        if (pb)
            pb->update(i+1);
        Vec currow = source(i);
        if (! skip_missings || ! currow.hasMissing()) {
            for (int j=0, m=currow.size() ; j<m ; ++j) {
                string strval="";
                if (convert_date && j==0)
                    // Date conversion: add 19000000 to convert from CYYMMDD to
                    // YYYYMMDD, and always output without trailing . if not
                    // necessary
                    sprintf(buffer, "%8f", currow[j] + 19000000.0);
                else if((strval=source->getValString(j,currow[j]))!=""){
                    search_replace(strval, "\"", "\\\"");
                    strval = "\"" + strval + "\"";
                    if(strval.length()>1000-1)
                        PLERROR("a value is too big!");
                    strncpy(buffer,strval.c_str(),1000);
                }else{
                    // Normal processing
                    sprintf(buffer, "%#.*f", precision, currow[j]);

                    // strip all trailing zeros and final period
                    // there is always a period since sprintf includes # modifier
                    char* period = buffer;
                    while (*period && *period != '.')
                        period++;
                    for (char* last = period + strlen(period) - 1 ;
                         last >= period && (*last == '0' || *last == '.') ; --last) {
                        bool should_break = *last == '.';
                        *last = '\0';
                        if (should_break)
                            break;
                    }
                }
                destination << buffer;
                if (j < m-1)
                    destination << delimiter;
            }
            destination << "\n";
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::saveAscii ( const string &  filename,
const TMat< T > &  mat,
const TVec< string > &  fieldnames,
int  inputsize = -1,
int  targetsize = -1,
int  weightsize = -1,
int  extrasize = 0 
)

Definition at line 482 of file MatIO.h.

References endl(), i, j, PLearn::TMat< T >::length(), PLERROR, PLearn::TVec< T >::size(), space_to_underscore(), and PLearn::TMat< T >::width().

Referenced by PLearn::Grapher::plot_1D_regression(), PLearn::SequentialValidation::reportStats(), and saveAscii().

{
    ofstream out(filename.c_str());
    if (!out)
        PLERROR("In saveAscii could not open file %s for writing",filename.c_str());

    out << "#size: "<< mat.length() << ' ' << mat.width() << endl;
    out.precision(15);
    if(fieldnames.size()>0)
    {
        out << "#: ";
        for(int k=0; k<fieldnames.size(); k++)
            //there must not be any space in a field name...
            out << space_to_underscore(fieldnames[k]) << ' ';
        out << endl;
    }
    if(inputsize>=0)
        out << "#sizes: " << inputsize << ' ' << targetsize << ' ' << weightsize << ' ' << extrasize << endl;

    for(int i=0; i<mat.length(); i++) 
    {
        const T* row_i = mat[i];
        for(int j=0; j<mat.width(); j++)
            out << row_i[j] << ' ';
        out << '\n';
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::saveAscii ( const string &  filename,
const TMat< T > &  mat 
)

Definition at line 476 of file MatIO.h.

References saveAscii().

{
    saveAscii(filename, mat, TVec<string>());
}

Here is the call graph for this function:

template<class T >
void PLearn::saveAscii ( const string &  filename,
const TVec< T > &  vec 
)

first number in file is length

Definition at line 512 of file MatIO.h.

References PLearn::TVec< T >::begin(), PLearn::TVec< T >::end(), endl(), PLearn::TVec< T >::length(), and PLERROR.

{
    ofstream out(filename.c_str());
    if (!out)
        PLERROR("In saveAscii: could not open file %s for writing",filename.c_str());

    out << vec.length() << endl;
    out.precision(15);

    typename TVec<T>::iterator it = vec.begin();
    typename TVec<T>::iterator itend = vec.end();
    for(; it!=itend; ++it)
        out << *it << ' ';
    out << endl;
}

Here is the call graph for this function:

void PLearn::saveAsciiWithoutSize ( const string &  filename,
const Vec &  vec 
)

Definition at line 857 of file MatIO.cc.

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

Referenced by PLearn::SequentialModelSelector::test(), and PLearn::SequentialModelSelector::train().

{
    FILE *f;
    f=fopen(filename.c_str(),"w");
    if (!f)
        PLERROR("In Vec::saveAscii: could not open file %s for writing",filename.c_str());
    int i;
    char buffer[100];
    real *p= vec.data();
    for (i=0;i<vec.length();i++,p++)
    {
        pretty_print_number(buffer,*p);
        fprintf(f,"%s ",buffer);
    }
    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::saveAsciiWithoutSize ( const string &  filename,
const Mat &  mat 
)

Definition at line 896 of file MatIO.cc.

References i, j, PLearn::TMat< T >::length(), PLERROR, pretty_print_number(), and PLearn::TMat< T >::width().

{
    FILE *f;
    f=fopen(filename.c_str(),"w");
    if (!f)
        PLERROR("In saveAscii, could not open file %s for writing",filename.c_str());
    char buffer[100];
    for(int i=0; i<mat.length(); i++) 
    {
        const real* row_i = mat[i];
        for(int j=0; j<mat.width(); j++)
        {
            pretty_print_number(buffer,row_i[j]);
            fprintf(f,"%s ",buffer);
        }
        fprintf(f,"\n");
    }
    fclose(f);
}

Here is the call graph for this function:

void PLearn::saveGnuplot ( const string &  filename,
const Vec &  vec 
)

Definition at line 625 of file MatIO.cc.

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

Referenced by PLearn::Gnuplot::multiplot(), PLearn::Gnuplot::plot(), PLearn::Gnuplot::plot3d(), and plotVMats().

{
    FILE* f=fopen(filename.c_str(),"w");
    if (!f) 
        PLERROR("In Vec::saveGnuplot, couldn't open %s for writing",filename.c_str());

    real* p = vec.data();
    for (int i=0; i<vec.length(); i++, p++)
        fprintf(f,"%e\n", *p);
    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::saveGnuplot ( const string &  filename,
const Mat &  mat 
)

Definition at line 638 of file MatIO.cc.

References i, j, left(), PLearn::TMat< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
    ofstream out(filename.c_str());
    if (!out) 
        PLERROR("In saveGnuplot, couldn't open %s for writing.",filename.c_str());
    out.flags(ios::left);
    for(int i=0; i<mat.length(); i++)
    {
        const real* m_i = mat[i];
        for(int j=0; j<mat.width(); j++)
            out << setw(11) << m_i[j] << ' ';
        out << "\n";
    }
    out.flush();
}

Here is the call graph for this function:

void PLearn::savePMat ( const string &  filename,
const TMat< double > &  mat 
)

Definition at line 387 of file MatIO.cc.

References DATAFILE_HEADERLENGTH, i, PLearn::TMat< T >::length(), PLERROR, strlen(), and PLearn::TMat< T >::width().

{
    FILE* f = fopen(filename.c_str(),"wb");
    if (!f)
        PLERROR("In savePMat, could not open file %s for writing",filename.c_str());

    char header[DATAFILE_HEADERLENGTH]; 

#ifdef LITTLEENDIAN
    sprintf(header,"MATRIX %d %d DOUBLE LITTLE_ENDIAN", mat.length(), mat.width());
#endif
#ifdef BIGENDIAN
    sprintf(header,"MATRIX %d %d DOUBLE BIG_ENDIAN", mat.length(), mat.width());
#endif

    // Pad the header with whites and terminate it with '\n'
    for(size_t pos=strlen(header); pos<DATAFILE_HEADERLENGTH; pos++)
        header[pos] = ' ';
    header[DATAFILE_HEADERLENGTH-1] = '\n';

    // write the header to the file
    fwrite(header,DATAFILE_HEADERLENGTH,1,f);

    // write the data to the file
    for (int i=0; i<mat.length(); i++) 
    {
        const double* p = mat[i];
        fwrite(p,sizeof(double),mat.width(),f);
    }
    fclose(f);
}

Here is the call graph for this function:

void PLearn::savePMat ( const string &  filename,
const TMat< float > &  mat 
)

Definition at line 355 of file MatIO.cc.

References DATAFILE_HEADERLENGTH, i, PLearn::TMat< T >::length(), PLERROR, strlen(), and PLearn::TMat< T >::width().

Referenced by PLearn::DeepReconstructorNet::computeAndSaveLayerActivationStats(), and PLearn::GaussianProcessNLLVariable::fbpropFragments().

{
    FILE* f = fopen(filename.c_str(),"wb");
    if (!f)
        PLERROR("In savePMat, could not open file %s for writing",filename.c_str());

    char header[DATAFILE_HEADERLENGTH]; 

#ifdef LITTLEENDIAN
    sprintf(header,"MATRIX %d %d FLOAT LITTLE_ENDIAN", mat.length(), mat.width());
#endif
#ifdef BIGENDIAN
    sprintf(header,"MATRIX %d %d FLOAT BIG_ENDIAN", mat.length(), mat.width());
#endif

    // Pad the header with whites and terminate it with '\n'
    for(size_t pos = strlen(header); pos<DATAFILE_HEADERLENGTH; pos++)
        header[pos] = ' ';
    header[DATAFILE_HEADERLENGTH-1] = '\n';

    // write the header to the file
    fwrite(header,DATAFILE_HEADERLENGTH,1,f);

    // write the data to the file
    for (int i=0; i<mat.length(); i++) 
    {
        const float* p = mat[i];
        fwrite(p,sizeof(float),mat.width(),f);
    }
    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::savePMat ( const string &  filename,
const TMat< T > &  mat 
)

Definition at line 910 of file TMat_impl.h.

References PLERROR.

{ PLERROR("savePMat only implemented for float and double"); }
void PLearn::savePMatFieldnames ( const string &  pmatfilename,
const TVec< string > &  fieldnames 
)

Will save the fieldnames in corresponding pmatfilename.metadata/fieldnames (creating the metadata directory if necessary)

Definition at line 419 of file MatIO.cc.

References force_mkdir(), i, isdir(), PLearn::TVec< T >::length(), and PLERROR.

Referenced by PLearn::DeepReconstructorNet::computeAndSaveLayerActivationStats().

{
    string metadatadir = pmatfilename+".metadata";
    if(!isdir(metadatadir))
        force_mkdir(metadatadir);
    string fname = metadatadir+"/fieldnames";
    FILE* f = fopen(fname.c_str(),"w");
    if(!f)
        PLERROR("Could not open file %s for writing",fname.c_str());
    for(int i= 0; i < fieldnames.length(); ++i)
        fprintf(f,"%s\t0\n",fieldnames[i].c_str());
    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::savePVec ( const string &  filename,
const TVec< double > &  vec 
)

Definition at line 219 of file MatIO.cc.

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

{
    FILE* f = fopen(filename.c_str(),"wb");
    if (!f)
        PLERROR("In savePVec, could not open file %s for writing",filename.c_str());

    char header[DATAFILE_HEADERLENGTH]; 

#ifdef LITTLEENDIAN
    sprintf(header,"VECTOR %d DOUBLE LITTLE_ENDIAN", vec.length());
#endif
#ifdef BIGENDIAN
    sprintf(header,"VECTOR %d DOUBLE BIG_ENDIAN", vec.length());
#endif

    // Pad the header with whites and terminate it with '\n'
    for(size_t pos = strlen(header); pos<DATAFILE_HEADERLENGTH; pos++)
        header[pos] = ' ';
    header[DATAFILE_HEADERLENGTH-1] = '\n';

    // write the header to the file
    fwrite(header,DATAFILE_HEADERLENGTH,1,f);

    // write the data to the file
    if(0 < vec.length())
    {
        const double* p = vec.data();
        fwrite(p,sizeof(double),vec.length(),f);
    }

    fclose(f);
}

Here is the call graph for this function:

template<class T >
void PLearn::savePVec ( const string &  filename,
const TVec< T > &  vec 
)

Definition at line 134 of file TVec_impl.h.

References PLERROR.

{ PLERROR("savePVec only implemented for float and double"); }
void PLearn::savePVec ( const string &  filename,
const TVec< float > &  vec 
)

Native PLearn binary format (.pmat)

Definition at line 186 of file MatIO.cc.

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

Referenced by PLearn::TVec< PP< RegressionTreeNode > >::save().

{
    FILE* f = fopen(filename.c_str(),"wb");
    if (!f)
        PLERROR("In savePVec, could not open file %s for writing",filename.c_str());

    char header[DATAFILE_HEADERLENGTH]; 

#ifdef LITTLEENDIAN
    sprintf(header,"VECTOR %d FLOAT LITTLE_ENDIAN", vec.length());
#endif
#ifdef BIGENDIAN
    sprintf(header,"VECTOR %d FLOAT BIG_ENDIAN", vec.length());
#endif

    // Pad the header with whites and terminate it with '\n'
    for(size_t pos = strlen(header); pos<DATAFILE_HEADERLENGTH; pos++)
        header[pos] = ' ';
    header[DATAFILE_HEADERLENGTH-1] = '\n';

    // write the header to the file
    fwrite(header,DATAFILE_HEADERLENGTH,1,f);

    // write the data to the file
    if(0 < vec.length())
    {
        const float* p = vec.data();
        fwrite(p,sizeof(float),vec.length(),f);
    }

    fclose(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::saveSNMat ( const string &  filename,
const Mat &  mat 
)

Definition at line 940 of file MatIO.cc.

References fwrite_float(), fwrite_int(), i, j, PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

{
    FILE *f=fopen(filename.c_str(),"wb");
    int i=0x1e3d4c51L;
    int j=0;
    fwrite_int(f,&i,1);
    i=2; /*  number of dimensions = 2 for a matrix  */
    fwrite_int(f,&i,1);
    int length = mat.length();
    int width = mat.width();
    fwrite_int(f,&length,1);
    fwrite_int(f,&width,1);
    while (i++ < 3) fwrite_int(f,&j,1);
    for (i=0;i<length;i++)
        fwrite_float(f,mat[i],width);
    fclose(f);
}

Here is the call graph for this function:

void PLearn::saveSNVec ( const string &  filename,
const Vec &  vec 
)

Definition at line 995 of file MatIO.cc.

References PLearn::TVec< T >::data(), fwrite_float(), fwrite_int(), i, j, PLearn::TVec< T >::length(), and PLERROR.

{
    FILE* f=fopen(filename.c_str(),"wb");
    if(!f)
        PLERROR("In Vec::loadSNVec could not open file for writing");
    int i=0x1e3d4c51L;
    int j=0;
    fwrite_int(f,&i,1);
    i=1; /*  number of dimensions = 1 for a vector  */
    fwrite_int(f,&i,1);
    int length = vec.length();
    fwrite_int(f,&length,1);
    while (i++ < 3) 
        fwrite_int(f,&j,1);
    fwrite_float(f,vec.data(),length);
    fclose(f);
}

Here is the call graph for this function:

void PLearn::saveStringInFile ( const PPath &  filepath,
const string &  text 
)

Writes the raw string into the given file.

Intermediate directories in filepath are created if necessary.

Definition at line 336 of file fileutils.cc.

References force_mkdir_for_file(), openFile(), and PLearn::PStream::raw_ascii.

Referenced by PLearn::SequentialValidation::createStatVMats(), PLearn::PTester::perform(), and PLearn::PTester::perform1Split().

{
    force_mkdir_for_file(filepath);
    PStream out = openFile(filepath, PStream::raw_ascii, "w");
    out << text;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::scores_to_winners ( Mat  scores,
Mat &  winners 
)

scores is a (nsamples x nclasses) matrix with rows containing scores for each class. winners is a (nsamples x 3) matrix with rows containing the winning class (argmax), its winning score (max), and the difference to the second best class (margin)

Definition at line 66 of file DisplayUtils.cc.

References argmax(), i, PLearn::TMat< T >::length(), max(), and PLearn::TMat< T >::resize().

Referenced by regulargrid_x_y_outputs_to_bitmap().

  {
    int l = scores.length();
    winners.resize(l,3);
    for(int i=0; i<l; i++)
      {
        Vec scorerow = scores(i);
        int maxpos = argmax(scorerow);
        real maxval = scorerow[maxpos];
        scorerow[maxpos] = -FLT_MAX;
        real maxval2 = max(scorerow);
        scorerow[maxpos] = maxval;
        winners(i,0) = maxpos;
        winners(i,1) = maxval;
        winners(i,2) = maxval-maxval2;
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::search_replace ( string &  text,
const string &  searchstr,
const string &  replacestr 
)

replaces all occurences of searchstr in the text by replacestr returns the number of matches that got replaced

Definition at line 334 of file stringutils.cc.

References n.

Referenced by PLearn::SurfaceMesh::build_(), PLearn::PythonCodeSnippet::compileGlobalCode(), injectPLearnClasses(), PLearn::PDate::PDate(), PLearn::PLCheckTest::perform(), PLearn::HTMLUtils::quote(), PLearn::HTMLHelpCommand::quote(), save_vmat_as_arff(), save_vmat_as_csv(), and PLearn::PythonProcessedLearner::setOutputNamesFromParams().

{
    int n = 0;
    size_t startpos = text.find(searchstr, 0);
    while(startpos!=string::npos)
    {
        text.replace(startpos, searchstr.length(), replacestr);
        ++n;
        startpos = text.find(searchstr, startpos+replacestr.length());
    }
    return n;
}

Here is the caller graph for this function:

void PLearn::seed ( )

Utilities for random numbers generation. ---------------------------------------

initializes the random number generator with the cpu time

Definition at line 183 of file random.cc.

References manual_seed().

Referenced by PLearn::EmpiricalDistribution::EmpiricalDistribution(), PLearn::AdaBoost::forget(), PLearn::VVMatrix::generateVMatIndex(), get_seed(), PLearn::TangentLearner::initializeParams(), PLearn::StructuralLearner::initializeParams(), PLearn::NeuralNet::initializeParams(), PLearn::NeighborhoodSmoothnessNNet::initializeParams(), PLearn::MultiInstanceNNet::initializeParams(), PLearn::GaussianContinuumDistribution::initializeParams(), PLearn::GaussianContinuum::initializeParams(), PLearn::DistRepNNet::initializeParams(), PLearn::DeepNNet::initializeParams(), PLearn::ConditionalDensityNet::initializeParams(), PLearn::AddLayersNNet::initializeParams(), old_plearn_main(), and plearn_main().

{
    time_t  ltime;
    struct  tm *today;
    time(&ltime);
    today = localtime(&ltime);
    manual_seed((int32_t)today->tm_sec+
                60*today->tm_min+
                60*60*today->tm_hour+
                60*60*24*today->tm_mday);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class I >
void PLearn::select ( const TMat< T > &  source,
const TVec< I > &  row_indices,
const TVec< I > &  column_indices,
TMat< T > &  destination 
)

Definition at line 637 of file TMat_impl.h.

References PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

Referenced by eigenSparseNonSymmMat(), eigenSparseSymmMat(), and PLearn::TMat< pair< real, real > >::operator()().

{
    int rni = row_indices.length();
    int cni = column_indices.length();
    if (rni!=destination.length() || cni!=destination.width())
        PLERROR("select(Mat(%d,%d),Vec(%d),Vec(%d),Mat(%d,%d)): arguments have incompatible dimensions",
                source.length(),source.width(),rni,cni,destination.length(),destination.width());
    I* rindx = row_indices.data();
    I* cindx = column_indices.data();
#ifdef BOUNDCHECK
    int nr=source.length();
    int nc=source.width();
#endif
    for (int i=0;i<rni;i++)
    {
        int ri=(int)rindx[i];
#ifdef BOUNDCHECK
        if (ri<0 || ri>=nr)
            PLERROR("select(Mat,Vec,Vec,Mat) row_indices[%d]=%d out of bounds (0,%d)",
                    i,ri,nr-1);
#endif
        T* dest_row = destination[i];
        T* src_row = source[ri];
        for (int j=0;j<cni;j++)
        {
            int cj = (int)cindx[j];
#ifdef BOUNDCHECK
            if (cj<0 || cj>=nc)
                PLERROR("select(Mat,Vec,Vec,Mat) col_indices[%d]=%d out of bounds (0,%d)",
                        i,cj,nc-1);
#endif
            dest_row[j] = src_row[cj];
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::select ( const TMat< T > &  source,
const TVec< T > &  row_indices,
const TVec< T > &  column_indices,
TMat< T > &  destination 
)
template<class T >
T PLearn::selectAndOrder ( const TVec< T > &  vec,
int  pos 
)

find the element at position pos that would result from a sort and put all elements (not in order!) lower than v[pos] in v[i<pos].

Definition at line 2507 of file TMat_maths_impl.h.

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

Referenced by PLearn::LiftStatsCollector::finalize(), and PLearn::LiftStatsIterator::finish().

{
    if (pos<0 || pos>=vec.length()) PLERROR("Bad position (%d)", pos);

    int l=0;
    int h=vec.length()-1;
    T* v = vec.data();

    while (l<h)
    {
        T p = v[(l+h)/2];
        int x = l;
        int y = h;

        do
        {
            while (v[x]<p) x++;
            while (p<v[y]) y--;
            if (x<=y)
            {
                PLearn::swap(v[x],v[y]);
                x++;
                y--;
            }
        } while (x<=y);

        if (pos>=x) l=x;
        else h=x-1;
    }

    return v[l];
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::selectAndOrder ( const TMat< T > &  mat,
int  pos,
int  colnum = 0 
)

Definition at line 4717 of file TMat_maths_impl.h.

References PLearn::TMat< T >::column(), PLearn::TMat< T >::length(), PLERROR, PLearn::TMat< T >::swapRows(), PLearn::TMat< T >::width(), and x.

{
#ifdef BOUNDCHECK
    if (colnum<0 || colnum>=mat.width()) PLERROR("Bad column number (%d)", colnum);
    if (pos<0 || pos>=mat.length()) PLERROR("Bad position (%d)", pos);
#endif

    int l=0;
    int h=mat.length()-1;
    TMat<T> v = mat.column(colnum);

    while (l<h)
    {
        T p = v((l+h)/2,0);
        int x = l;
        int y = h;

        do
        {
            while (v(x,0)<p) x++;
            while (p<v(y,0)) y--;
            if (x<=y)
            {
                mat.swapRows(x,y);
                x++;
                y--;
            }
        } while (x<=y);

        if (pos>=x) l=x;
        else h=x-1;
    }

    return mat(l);
}

Here is the call graph for this function:

template<class T , class I >
void PLearn::selectColumns ( const TMat< T > &  source,
const TVec< I > &  column_indices,
TMat< T > &  destination 
)

Definition at line 602 of file TMat_impl.h.

References PLearn::TMat< T >::column(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::TMat< pair< real, real > >::columns(), PLearn::GaussMix::missingExpectation(), PLearn::Molecule::readMolecule(), PLearn::GaussianProcessRegressor::trainProjectedProcess(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

{
    int ni = column_indices.length();
    if (ni!=destination.width())
        PLERROR("selectColums(Mat,Vec,Mat): last 2 arguments have dimensions %d != %d",
                ni,destination.width());

    if (column_indices.isEmpty())
        // Nothing to select. In addition, 'destination' is empty too since it
        // has zero width, according to the test above. Thus there is nothing
        // to do.
        return;

    I* indx = column_indices.data();
#ifdef BOUNDCHECK
    int n=source.width();
#endif
    for (int i=0;i<ni;i++)
    {
        int pos = int(indx[i]);
#ifdef BOUNDCHECK
        if (pos<0 || pos>=n)
            PLERROR("selectColumns(Mat,Vec,Mat) indices[%d]=%d out of bounds (0,%d)",
                    i,pos,n-1);
#endif
        destination.column(i) << source.column(pos);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class I >
void PLearn::selectElements ( const TVec< T > &  source,
const TVec< I > &  indices,
TVec< T > &  destination 
)

select the elements of the source as specified by the vector of indices (between 0 and source.length()-1) into the destination vector (which must have the same length() as the indices vector).

Definition at line 177 of file TMat_impl.h.

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

Referenced by PLearn::SummationKernel::addDataForKernelMatrix(), PLearn::PruningLinearRegressor::computeOutput(), PLearn::SummationKernel::evaluate(), PLearn::SummationKernel::evaluate_all_i_x(), PLearn::SummationKernel::evaluate_i_x(), and PLearn::TVec< PP< RegressionTreeNode > >::operator()().

{
    int ni = indices.length();
    if (ni!=destination.length())
        PLERROR("select(Vec,Vec,Vec): last 2 arguments have lengths %d != %d",
                indices.length(),destination.length());
    I* indx = indices.data();
    T* dest = destination.data();
    T* src = source.data();
#ifdef BOUNDCHECK
    int n=source.length();
#endif
    for (int i=0;i<ni;i++)
    {
        int pos = int(indx[i]);
#ifdef BOUNDCHECK
        if (pos<0 || pos>=n)
            PLERROR("select(Vec,Vec,Vec) indices[%d]=%d out of bounds (0,%d)",
                    i,pos,n-1);
#endif
        dest[i] = src[pos];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class I >
void PLearn::selectRows ( const TMat< T > &  source,
const TVec< I > &  row_indices,
TMat< T > &  destination 
)

Definition at line 568 of file TMat_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), n, and PLERROR.

Referenced by PLearn::RBMLayer::fpropNLL(), PLearn::TMat< pair< real, real > >::rows(), and PLearn::GaussMix::updateInverseVarianceFromPrevious().

{
    int ni = row_indices.length();
    if (ni!=destination.length())
        PLERROR("selectRows(Mat,Vec,Mat): last 2 arguments have lengths %d != %d",
                ni,destination.length());

    if (row_indices.isEmpty())
        // Nothing to select. In addition, 'destination' is empty too since it
        // has zero length, according to the test above. Thus there is nothing
        // to do.
        return;

    I* indx = row_indices.data();
#ifdef BOUNDCHECK
    int n=source.length();
#endif
    for (int i=0;i<ni;i++)
    {
        int pos = int(indx[i]);
#ifdef BOUNDCHECK
        if (pos<0 || pos>=n)
            PLERROR("selectRows(Mat,Vec,Mat) indices[%d]=%d out of bounds (0,%d)",
                    i,pos,n-1);
#endif
        destination(i) << source(pos);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static END_DECLARE_REMOTE_FUNCTIONS void PLearn::set_global_calendars ( string  command_line_option) [static]

Definition at line 151 of file plearn_main.cc.

References endl(), PLearn::VMat::getColumn(), getDataSet(), i, PLearn::Calendar::makeCalendar(), n, perr, PLERROR, PLearn::Calendar::setGlobalCalendar(), and split().

Referenced by global_options().

{
    // Assume command-line-option of the form
    // CalendarName1:CalendarFilename1,CalendarName2:CalendarFilename2,...
    vector<string> names_files = split(command_line_option, ',');
    for (vector<string>::size_type i=0, n=names_files.size() ; i<n ; ++i) {
        vector<string> namefile = split(names_files[i], ':');
        if (namefile.size() != 2)
            PLERROR("Cannot understand '%s' for specifying a global calendar.",
                    names_files[i].c_str());
        string calname = namefile[0];
        string filename = namefile[1];
        VMat dates_vmat = getDataSet(filename);
        Vec dates_vec = dates_vmat.getColumn(0);
        Calendar::setGlobalCalendar(calname,
                                    Calendar::makeCalendar(dates_vec));
        perr << "Set global calendar \"" << calname << "\" from file \"" << filename << '"' << endl;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::setNullPout ( )

Definition at line 515 of file PythonExtension.cc.

References pnull, and pout.

{
    pout= pnull;
}
void PLearn::setoption_broadcast ( const Object *  o,
const string &  class_name,
const string &  option_name,
const string &  option_value,
ObjectGraphIterator::TraversalType  tt = ObjectGraphIterator::DepthPreOrder 
)

Broadcast a call to setOption only for specific classes.

This function recursively calls Object::setOption (with a constant option-name and option-value), but only for those objects (in the graph induced by ObjectGraphIterator) of a class derived from that specified.

Parameters:
oRoot of the graph
class_nameString representation of the class to filter on
option_nameName of the option to set
option_valueValue of the option to set

Definition at line 298 of file ObjectGraphIterator.cc.

{
    ObjectGraphIterator grit(o, tt, false, class_name), grend;
    for ( ; grit != grend ; ++grit)
        const_cast<Object*>(*grit)->setOption(option_name, option_value);
}
void PLearn::setPoutToPerr ( )

Definition at line 519 of file PythonExtension.cc.

References perr, and pout.

{
    pout= perr;
}
void PLearn::setProgressBarPlugin ( string  pb_type)

Definition at line 276 of file ProgressBar.cc.

References PLERROR, and PLearn::ProgressBar::setPlugin().

{
    if(pb_type == "none")
        ProgressBar::setPlugin(new NullProgressBarPlugin);
    else if(pb_type == "text")
        ProgressBar::setPlugin(new TextProgressBarPlugin(cerr));
    else
        PLERROR("Invalid ProgressBar type: %s", pb_type.c_str());
}

Here is the call graph for this function:

void PLearn::setPythonModuleAndInject ( PyObject *  module)

Definition at line 497 of file PythonExtension.cc.

References createWrappedObjectsSet(), injectPLearnClasses(), injectPLearnException(), injectPLearnGlobalFunctions(), and the_PLearn_python_module.

Referenced by PLearn::PythonCodeSnippet::compileGlobalCode(), and initPythonExtensionModule().

{
    /* //can't set logging before this gets called
    perr << "[pid=" << getPid() << "] "
         << "setPythonModuleAndInject for module: " << PythonObjectWrapper(module) << "\tat " << (void*)module << endl;
    */
    injectPLearnGlobalFunctions(module);
    injectPLearnClasses(module);
    injectPLearnException(module);
    createWrappedObjectsSet(module);
    the_PLearn_python_module= module;   
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::setSaveDiffs ( PLearnDiff *  diffs,
bool  save_diffs,
bool save_diffs_backup = 0 
)

Just call diffs->setSaveDiffs(save_diffs, save_diffs_backup).

This function is used so that it can be forward-declared.

Definition at line 227 of file PLearnDiff.cc.

References PLearn::PLearnDiff::setSaveDiffs().

Referenced by diff().

{
    diffs->setSaveDiffs(save_diffs, save_diffs_backup);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::setVersion ( int  major_version,
int  minor_version,
int  fixlevel 
)

Definition at line 133 of file plearn_main.cc.

Referenced by plearn_main().

{
    // Copy the version variables to private namespace (i.e. static variables)
    // to make them available to other callers.
    plearn_major_version = major_version;
    plearn_minor_version = minor_version;
    plearn_fixlevel      = fixlevel;
}

Here is the caller graph for this function:

bool PLearn::setVMatAsPtr ( bool  vmat_as_ptr)

Definition at line 1115 of file PythonObjectWrapper.cc.

References PLearn::PythonObjectWrapper::VMatAsPtr.

{
    bool prev= PythonObjectWrapper::VMatAsPtr;
    PythonObjectWrapper::VMatAsPtr= vmat_as_ptr;
    return prev;
}
void PLearn::sgesdd_ ( char *  JOBZ,
int M,
int N,
float *  A,
int LDA,
float *  S,
float *  U,
int LDU,
float *  VT,
int LDVT,
float *  WORK,
int LWORK,
int IWORK,
int INFO 
)

Referenced by lapack_Xgesdd_().

Here is the caller graph for this function:

void PLearn::sgesv_ ( int N,
int NRHS,
float *  A,
int LDA,
int IPIV,
float *  B,
int LDB,
int INFO 
)

Referenced by lapackSolveLinearSystem().

Here is the caller graph for this function:

void PLearn::sgetrf_ ( int M,
int N,
float *  A,
int LDA,
int IPIV,
int INFO 
)

Referenced by matInvert().

Here is the caller graph for this function:

void PLearn::sgetri_ ( int N,
float *  A,
int LDA,
int IPIV,
float *  WORK,
int LWORK,
int INFO 
)

Referenced by matInvert().

Here is the caller graph for this function:

StatsIt PLearn::sharpe_ratio_stats ( ) [inline]

exponential of the mean

Definition at line 436 of file StatsIterator.h.

VMat PLearn::shuffle ( VMat  d)

returns a SelectRowsVMatrix that has d's rows shuffled

Definition at line 140 of file VMat_operations.cc.

References PLearn::VMat::length(), PLearn::VMat::rows(), and shuffleElements().

{
    Vec indices(0, d.length()-1, 1); // Range-vector
    shuffleElements(indices);
    return d.rows(indices);
}

Here is the call graph for this function:

template<class T >
void PLearn::shuffleElements ( const TVec< T > &  vec)

randomly shuffle the entries of the TVector

Definition at line 159 of file random.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), j, PLearn::TVec< T >::length(), and uniform_sample().

Referenced by PLearn::AnalyzeFieldStats::analyzeVariableStats(), bootstrap(), PLearn::TrainValidTestSplitter::build_(), PLearn::ShuffleColumnsVMatrix::build_(), PLearn::SelectInputSubsetLearner::build_(), PLearn::RepeatSplitter::build_(), PLearn::BasisSelectionRegressor::buildAllCandidateFunctions(), PLearn::VVMatrix::generateVMatIndex(), PLearn::TestImputations::initialize(), random_subset_indices(), randomSplit(), shuffle(), split(), and PLearn::Poll::waitForEvents().

{
    if (vec.isEmpty())
        return; // Do not try to shuffle an empty vec.
    
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
    {
        int j = i+(int)(uniform_sample()*(vec.length()-i));
        // int j=(int)floor(i+uniform_sample()*(length()-i-1e-5));
        if(j!=i)
        {
            T tmp = v[i];
            v[i] = v[j];
            v[j] = tmp;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::shuffleRows ( const TMat< T > &  mat)

Definition at line 181 of file random.h.

References i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::swapRows(), and uniform_sample().

Referenced by computeRanks(), input2dSet(), loadATT800(), loadBreastCancer(), loadBreastCancerWisconsin(), loadCorel(), loadDiabetes(), loadIonosphere(), loadLetters(), loadPimaIndians(), loadSonar(), and PLearn::StatsCollector::sort_values_by_magnitude().

{
    for(int i=0; i<mat.length(); i++)
    {
        int j = i+int(uniform_sample()*(mat.length()-i));
        mat.swapRows(i,j);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TVec<T> PLearn::sigmoid ( const TVec< T > &  src) [inline]

Definition at line 1460 of file TMat_maths_impl.h.

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

{ TVec<T> dest(src.length()); compute_sigmoid(src,dest); return dest; }

Here is the call graph for this function:

real PLearn::sigmoid ( real  x) [inline]

numerically stable version of sigmoid(x) = 1.0/(1.0+exp(-x))

Definition at line 438 of file pl_math.h.

References tanh().

Referenced by PLearn::DistRepNNet::add_transfer_func(), PLearn::NNet::applyTransferFunc(), PLearn::RBMMatrixConnection::applyWeightPenalty(), PLearn::RBMDiagonalMatrixConnection::applyWeightPenalty(), PLearn::SoftSlopeVariable::bprop(), PLearn::SoftplusVariable::bprop(), PLearn::NegCrossEntropySigmoidVariable::bprop(), PLearn::CrossEntropyCostModule::bpropAccUpdate(), PLearn::ShuntingNNetLayerModule::bpropUpdate(), PLearn::RBMJointLLParameters::bpropUpdate(), PLearn::RBMClassificationModule::bpropUpdate(), PLearn::CrossEntropyCostModule::bpropUpdate(), PLearn::ScoreLayerVariable::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::ConditionalDensityNet::build_(), compute_sigmoid(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::SVMClassificationTorch::computeCostsFromOutputs(), PLearn::RBMRateLayer::computeExpectation(), PLearn::RBMLateralBinomialLayer::computeExpectation(), PLearn::RBMBinomialLayer::computeExpectation(), PLearn::RBMRateLayer::computeExpectations(), PLearn::RBMLateralBinomialLayer::computeExpectations(), PLearn::RBMBinomialLayer::computeExpectations(), PLearn::IIDNoiseKernel::computeGramMatrixDerivative(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspAlpha(), PLearn::SquaredExponentialARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::NeuralNetworkARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::LinearARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::SquaredExponentialARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::PLearnerDiagonalKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::NeuralNetworkARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::LinearARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::IIDNoiseKernel::computeGramMatrixDerivKronecker(), PLearn::ChemicalICP::computeWeights(), d_soft_slope(), PLearn::RationalQuadraticARDKernel::derivIspAlpha(), PLearn::SquaredExponentialARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspGlobalSigma(), PLearn::NeuralNetworkARDKernel::derivIspGlobalSigma(), PLearn::Matern1ARDKernel::derivIspGlobalSigma(), PLearn::LinearARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::SquaredExponentialARDKernel::derivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::derivIspSignalSigma(), PLearn::Matern1ARDKernel::derivIspSignalSigma(), PLearn::LinearARDKernel::derivIspSignalSigma(), PLearn::SigmoidalKernel::evaluate(), PLearn::LiftBinaryCostFunction::evaluate(), PLearn::SigmoidVariable::fprop(), PLearn::RBMRateLayer::fprop(), PLearn::RBMModule::fprop(), PLearn::RBMLateralBinomialLayer::fprop(), PLearn::RBMBinomialLayer::fprop(), PLearn::NegCrossEntropySigmoidVariable::fprop(), PLearn::FNetLayerVariable::fprop(), PLearn::RBMRateLayer::freeEnergyContributionGradient(), PLearn::RBMBinomialLayer::freeEnergyContributionGradient(), PLearn::NNet::hiddenLayer(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), PLearn::DiverseComponentAnalysis::nonlinear_transform(), PLearn::PLMathTest::perform(), PLearn::VMatLanguage::run(), softmax(), PLearn::SoftplusVariable::symbolicBprop(), PLearn::IncrementalNNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::RBMMatrixConnection::updateGibbs(), and PLearn::RBMLayer::updateGibbs().

{ return (real)0.5*(tanh(0.5*x)+1.); }

Here is the call graph for this function:

Var PLearn::sigmoid ( Var  v) [inline]

Definition at line 73 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
Var PLearn::sign ( Var  input) [inline]

Definition at line 72 of file SignVariable.h.

{ return new SignVariable(input); }
template<class T >
TVec<T> PLearn::sign ( const TVec< T > &  vec)

Definition at line 58 of file TMat_maths_impl.h.

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

{
    int len = vec.length();

    TVec<T> sign_( len );
    if (len > 0) {
        T*  v   = vec.data();
        T*  s   = sign_.data();

        while(--len >= 0)
        {
            *s = sign( *v );
            v++; s++;
        }
    }
    return sign_;
}

Here is the call graph for this function:

real PLearn::sign ( real  a) [inline]
template<class T >
int PLearn::sizeInBytes ( PP< T >  x) [inline]

Definition at line 276 of file PP.h.

References n, and sizeInBytes().

                                { 
    int n = sizeof(T*); 
    if (x) 
        n+= sizeInBytes(*x);  
    return n;
}

Here is the call graph for this function:

template<class T >
int PLearn::sizeInBytes ( const TVec< T > &  x) [inline]

Definition at line 929 of file TVec_decl.h.

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

                                         { 
    int n=x.length();
    int s=sizeof(TVec<T>);
    if (n>0) s+=n*sizeInBytes(x[0]); 
    return s;
}

Here is the call graph for this function:

template<class T >
int PLearn::sizeInBytes ( const TMat< T > &  x) [inline]

Definition at line 988 of file TMat_decl.h.

References n, PLearn::TMat< T >::size(), sizeInBytes(), and x.

                                         { 
    int n=x.size();
    int s=sizeof(TMat<T>);
    if (n>0) s+=n*sizeInBytes(x(0,0)); 
    return s;
}

Here is the call graph for this function:

template<class T >
int PLearn::sizeInBytes ( T *  x) [inline]

Definition at line 277 of file general.h.

References n, and sizeInBytes().

                             { 
    int n = sizeof(T*); 
    if (x) 
        n+= sizeInBytes(*x);  
    return n;
}

Here is the call graph for this function:

int PLearn::sizeInBytes ( int  x) [inline]

Definition at line 270 of file general.h.

{ return sizeof(int); }
int PLearn::sizeInBytes ( char  x) [inline]

Definition at line 274 of file general.h.

{ return sizeof(char); }
int PLearn::sizeInBytes ( float  x) [inline]

Definition at line 271 of file general.h.

{ return sizeof(float); }
int PLearn::sizeInBytes ( double  x) [inline]

Definition at line 272 of file general.h.

{ return sizeof(double); }
int PLearn::sizeInBytes ( long  x) [inline]

Definition at line 273 of file general.h.

{ return sizeof(long); }
template<class T1 , class T2 >
int PLearn::sizeInBytes ( pair< T1, T2 >  x) [inline]

Definition at line 284 of file general.h.

References sizeInBytes().

{ return sizeInBytes(x.first)+sizeInBytes(x.second); }

Here is the call graph for this function:

int PLearn::sizeInBytes ( string  x) [inline]

Definition at line 275 of file general.h.

{ return int(x.length()); }
template<class T >
int PLearn::sizeInBytes ( const DoublyLinkedListElement< T > &  element) [inline]

Definition at line 162 of file DoublyLinkedList.h.

References PLearn::DoublyLinkedListElement< T >::entry.

Referenced by PLearn::Cache< KeyType, ValueType >::removeExcess(), PLearn::BoundedMemoryCache< KeyType, ValueType >::removeExcess(), PLearn::BoundedMemoryCache< KeyType, ValueType >::set(), and sizeInBytes().

{ return 2*sizeof(DoublyLinkedListElement<T>*)+sizeInBytes(element.entry); }

Here is the caller graph for this function:

void PLearn::skipBlanksAndComments ( PStream &  in)

Will skip all blanks (white space, newline and #-style comments).

Next character read will be first "non-blank".

Definition at line 456 of file fileutils.cc.

References c, PLearn::PStream::get(), skipRestOfLine(), and PLearn::PStream::unget().

Referenced by PLearn::MultiInstanceVMatrix::build_(), getAfterSkipBlanksAndComments(), loadAscii(), loadAsciiSingleBinaryDescriptor(), peekAfterSkipBlanksAndComments(), and readAndMacroProcess().

{
    int c = in.get();
    while(c!=EOF)
    {
        if(!isspace(c))
        {
            if(c=='#')
                skipRestOfLine(in);
            else
                break;
        }
        c = in.get();
    }
    in.unget();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::skipRestOfLine ( PStream &  in)

Skips everything until '
' (also consumes the '
').

Definition at line 446 of file fileutils.cc.

References c, and PLearn::PStream::get().

Referenced by PLearn::VMatLanguage::preprocess(), skipBlanksAndComments(), and PLearn::VMatLanguage::staticPreprocess().

{
    int c = in.get();
    while (c!='\n' && c!=EOF)
        c = in.get();
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::small_dilogarithm ( real  x)

Definition at line 206 of file pl_math.cc.

References i, PLWARNING, and x.

Referenced by positive_dilogarithm().

{
    // TODO Deal with x == 0.
    real somme = x;
    real prod = x;
    int i=2;
    for (;i<=999;i++)
    {
        real coef = (i-1.0)/i;
        prod *= x*coef*coef;
        somme += prod;
        if (fabs(prod/somme)<1e-16) break; // tolerance
    }
    static bool warning_was_raised=false;
    if (i==1000 && !warning_was_raised) 
    {
        warning_was_raised=true;
        PLWARNING("dilogarithm (%f): insufficient precision", x);
    }
    return somme;
}

Here is the caller graph for this function:

Mat PLearn::smartInitialization ( VMat  v,
int  n,
real  c,
real  regularization 
)

Definition at line 92 of file GaussianContinuum.cc.

References b, c, PLearn::TMat< T >::clear(), i, j, PLearn::VMat::length(), n, regularizeMatrix(), solveLinearSystem(), uniform_multinomial_sample(), w, and PLearn::VMat::width().

Referenced by PLearn::TangentLearner::initializeParams().

{
  int l = v->length();
  int w = v->width();
  
  Mat result(n,w);
  Mat temp(w,w);
  Vec b(w);
  b<<c;
  
  int i,j;

  for (i=0;i<n;++i)
  {
    temp.clear();
    for (j=0;j<w;++j)
    {
      v->getRow(uniform_multinomial_sample(l),temp(j));
    }
    // regularization pour eviter 1/ quand on a tire deux fois le meme indice  2/ quand les points sont trops proches
    regularizeMatrix(temp,regularization);
    result(i) << solveLinearSystem(temp, b);
  }
  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Object * PLearn::smartLoadObject ( PPath  filepath,
const vector< string > &  args,
time_t &  return_date 
)

Reads an object from the given filepath, performaing adequate preprocessing according to file extension.

Currently supported file extensions are: .psave : no preprocessing performed .plearn .vmat : perform simple plearn macro processing .pyplearn .pymat: use python preprocessor The given args vector can be used to pass string arguments of the form argname=value. The first arguments is ignored as we consider that it is the script name. The return_date is set to the lastest date of dependence of file. Otherwise return (time_t)0. Work for .vmat, .psave and .plearn file.

Definition at line 326 of file PyPLearnScript.cc.

References std::copy(), extract_extension(), i, in, isfile(), PLearn::PP< T >::isNotNull(), mtime(), openFile(), openString(), parseBaseAndParameters(), PLearn::PStream::plearn_ascii, PLERROR, PLearn::PyPLearnScript::process(), readFileAndMacroProcess(), readObject(), and split_on_first().

Referenced by PLearn::LearnerCommand::compute_outputs(), PLearn::LearnerCommand::process_dataset(), PLearn::DiffCommand::run(), PLearn::PLearnServer::run(), PLearn::ReadAndWriteCommand::run(), smartLoadObject(), and PLearn::LearnerCommand::test().

{
    vector<string> args = args_;
    vector<string> args_augmented;

    if (!isfile(filepath)) {
        // There is no file with this exact name. Maybe there are parameters
        // appended to the name?
        string base;
        map<string, string> params;
        parseBaseAndParameters(filepath, base, params);
        if (!isfile(base))
            PLERROR("Non-existent script file: %s\n", filepath.c_str());
        // Add new arguments.
        args_augmented = args;
        map<string, string>::const_iterator it = params.begin();
        for (; it != params.end(); it++)
            args_augmented.push_back(it->first + "=" + it->second);
        args = args_augmented;
        filepath = base;
    }

    const string extension = extract_extension(filepath);
    string script;
    time_t date = 0;

    PP<PyPLearnScript> pyplearn_script;
    PStream in;

    if (extension == ".pyplearn" || extension==".pymat")
    {
        // Make a copy of args with the first argument (the name of the script)
        // removed, leaving the first argument to the script at index 0.
        vector<string> pyplearn_args(args.size()-1);
        copy(args.begin() + 1, args.end(), pyplearn_args.begin());
    
        pyplearn_script = PyPLearnScript::process(filepath, pyplearn_args);
        script          = pyplearn_script->getScript();
    
        // When we call the pyplearn script with either
        // --help or --dump, everything will already have been done by
        // the time the PyPLearnScript is built. 
        if ( script == "" )
            PLERROR("Empty script");

        in = openString( script, PStream::plearn_ascii );
    }
    else if(extension==".plearn" || extension==".vmat")  // perform plearn macro expansion
    {
        map<string, string> vars;
        // populate vars with the arguments passed on the command line
        for (unsigned int i=1; i<args.size(); i++)
        {
            string option = args[i];
            // Skip --foo command-lines options.
            if (option.size() < 2 || option.substr(0, 2) != "--")
            {
                pair<string, string> name_val = split_on_first(option, "=");
                vars[name_val.first] = name_val.second;
            }
        }
        script = readFileAndMacroProcess(filepath, vars, date);
        in = openString( script, PStream::plearn_ascii );
    }
    else if(extension==".psave") // do not perform plearn macro expansion
    {
        in = openFile(filepath, PStream::plearn_ascii);
        date=mtime(filepath);
    }
    else
        PLERROR("In smartLoadObject: unsupported file extension. Must be one of .pyplearn .pymat .plearn .vmat .psave");

    Object* o = readObject(in);
    if(extension==".vmat")
        ((VMatrix*)o)->updateMtime(date);
    return_date=date;
    if ( pyplearn_script.isNotNull() )
        pyplearn_script->close();

    return o;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Object* PLearn::smartLoadObject ( PPath  filepath,
time_t &  return_date 
) [inline]

Same as smartLoadObject(PPath, vector<string>, time_t) but passing an empty vector<string>

Definition at line 202 of file PyPLearnScript.h.

References smartLoadObject().

{ vector<string> args; args.push_back("");/* empty script filename*/ return smartLoadObject(filepath, args,return_date); }

Here is the call graph for this function:

Object* PLearn::smartLoadObject ( PPath  filepath) [inline]

Same as smartLoadObject(PPath, vector<string>, time_t) but passing an empty vector<string> and an empty return_date.

Definition at line 206 of file PyPLearnScript.h.

References d, and smartLoadObject().

{time_t d=0;return smartLoadObject(filepath, d);}

Here is the call graph for this function:

Object* PLearn::smartLoadObject ( PPath  filepath,
const vector< string > &  args 
) [inline]

Same as smartLoadObject(PPath, vector<string>, time_t) but passing an empty return_date.

Definition at line 199 of file PyPLearnScript.h.

References d, and smartLoadObject().

{ time_t d=0; return smartLoadObject(filepath, args, d); }

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::smooth ( TMat< T >  data,
int  windowsize 
)

Definition at line 6988 of file TMat_maths_impl.h.

References i, PLearn::TMat< T >::length(), and PLearn::TMat< T >::width().

{
    TVec<T> sumvec(data.width());
    TMat<T> result(data.length(), data.width());
    int currentwindowsize = windowsize/2;
    for(int k=0; k<currentwindowsize; k++)
        sumvec += data(k);
    result(0) << sumvec;
    //result(0) /= (T)currentwindowsize;
    TVec<T> res0 = result(0);
    res0 /= (T)currentwindowsize;
    result(0) << res0;

    for(int i=0; i<data.length(); i++)
    {
        int lowi = i-(windowsize-1)/2; // lowest index of window rows (inclusive)
        int highi = i+windowsize/2; // highest index of window rows (inclusive)
        if(lowi-1>=0) // remove row lowi-1 if it exists
        {
            sumvec -= data(lowi-1);
            currentwindowsize--;
        }
        if(highi<data.length()) // add row highi if it exists
        {
            sumvec += data(highi);
            currentwindowsize++;
        }
        result(i) << sumvec;
        //result(i) /= (T)currentwindowsize;
        TVec<T> resi = result(i);
        resi /= (T)currentwindowsize;
        result(i) << resi;
    }


    return result;
}

Here is the call graph for this function:

Mat PLearn::smoothCorelHisto ( Mat &  data)

Definition at line 594 of file databases.cc.

References d, i, j, PLearn::TMat< T >::length(), and n.

Referenced by loadCorel().

{
    Mat res(data.length(), 7*7*7);
    for(int n=0; n<data.length(); n++)
    {
        real* r = res[n];
        real* d = data[n];
        for(int i=0; i<7; i++)
            for(int j=0; j<7; j++)
                for(int k=0; k<7; k++,r++)
                {
                    *r += 0.15*d[i*2*16*16+j*2*16+k*2];
                    *r += 0.35*d[(i*2+1)*16*16+(j*2+1)*16+k*2+1];
                    *r += 0.35*d[(i*2+2)*16*16+(j*2+2)*16+k*2+2];
                    *r += 0.15*d[(i*2+3)*16*16+(j*2+3)*16+k*2+3];
                }
    }
    return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::snaupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short   
)

Referenced by eigenSparseNonSymmMat().

Here is the caller graph for this function:

int PLearn::sneupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
float *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short  ,
short   
)

Referenced by eigenSparseNonSymmMat().

Here is the caller graph for this function:

Var PLearn::soft_slope ( Var  x,
Var  smoothness,
Var  left,
Var  right 
) [inline]

Definition at line 81 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
real PLearn::soft_slope ( real  x,
real  smoothness = 1,
real  left = 0,
real  right = 1 
) [inline]

Definition at line 529 of file pl_math.h.

References fast_exact_is_equal(), hard_slope(), left(), right(), and softplus().

Referenced by PLearn::SoftSlopeVariable::bprop(), PLearn::ConditionalDensityNet::build_(), PLearn::SoftSlopeVariable::fprop(), PLearn::PLMathTest::perform(), and PLearn::ConditionalDensityNet::train().

{
    if (fast_exact_is_equal(smoothness, 0))
        return 0.5;
    if (smoothness>1000)
        return hard_slope(x,left,right);
    return 1 + (softplus(-smoothness*(x-left))-softplus(-smoothness*(x-right)))/(smoothness*(right-left));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::soft_slope_integral ( Var  smoothness,
Var  left,
Var  right,
real  a = 0,
real  b = 1 
) [inline]

Definition at line 80 of file SoftSlopeIntegralVariable.h.

References a, and b.

{
    return new SoftSlopeIntegralVariable(smoothness,left,right,a,b);
}
real PLearn::soft_slope_integral ( real  smoothness,
real  left,
real  right,
real  a,
real  b 
)

Definition at line 298 of file pl_math.cc.

References a, fast_exact_is_equal(), hard_slope_integral(), and softplus_primitive().

Referenced by PLearn::ConditionalDensityNet::build_(), PLearn::SoftSlopeIntegralVariable::fprop(), and PLearn::PLMathTest::perform().

{
    if (fast_exact_is_equal(smoothness, 0))
        return 0.5*(b-a);
    if (smoothness<100)
        return 
            (b - a) + (softplus_primitive(-smoothness*(b-right)) - softplus_primitive(-smoothness*(b-left))
                       -softplus_primitive(-smoothness*(a-right)) + softplus_primitive(-smoothness*(a-left)))/
            (smoothness*smoothness*(right-left));
    // else do the integral of the hard slope function
    return hard_slope_integral(left,right,a,b);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::soft_slope_limit ( Var  x,
Var  smoothness,
Var  left,
Var  right 
) [inline]

Definition at line 91 of file SoftSlopeVariable.h.

References PLearn::Var::length(), PLERROR, w, and PLearn::Var::width().

Referenced by PLearn::ConditionalDensityNet::build_().

{
    int l=0; 
    int w=0;
    if (x->length()>l) l=x->length();
    if (x->width()>w) w=x->width();
    if (smoothness->length()>l) l=smoothness->length();
    if (smoothness->width()>w) w=smoothness->width();
    if (left->length()>l) l=left->length();
    if (left->width()>w) w=left->width();
    if (right->length()>l) l=right->length();
    if (right->width()>w) w=right->width();
    if (x->length()>l && l!=x->length()) PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (x->width()>w && w!=x->width()) PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (smoothness->length()>l && l!=smoothness->length())  PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (smoothness->width()>w && w!=smoothness->width())  PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (left->length()>l && l!=left->length())  PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (left->width()>w && w!=left->width())  PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (right->length()>l && l!=right->length())  PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    if (right->width()>w && w!=right->width())  PLERROR("soft_slope_limit: Each argument should have the same size or size 1");
    Var res(l,w);
    res->value.fill(0.5);
    return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::softmax ( Var  v) [inline]

Definition at line 75 of file SoftmaxVariable.h.

{
    if(v->isVec()) 
        return new SoftmaxVariable(v);
    else return new MatrixSoftmaxVariable(v);
}
Var PLearn::softmax ( Var  input,
Var  index 
) [inline]

Definition at line 79 of file SoftmaxLossVariable.h.

{ 
    if (input->isVec())
        return new SoftmaxLossVariable(input, index);
    else return new MatrixSoftmaxLossVariable(input, index);
}
Var PLearn::softmax ( Var  x1,
Var  x2,
Var  hardness 
)

a soft version of the ordinary max(x1,x2) mathematical operation where the hardness parameter controls how close to an actual max(x1,x2) we are (i.e. as hardness --> infty we quickly get max(x1,x2), but as hardness --> 0 we get the simple average of x1 and x2.

Definition at line 133 of file SigmoidVariable.cc.

References sigmoid(), and w.

{
    Var w=sigmoid(hardness*(x1-x2));
    return x1*w + x2*(1-w);
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::softmax ( const TVec< T > &  x)

Definition at line 2200 of file TMat_maths_impl.h.

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

{
    TVec<T> y(x.length());
    softmax(x,y);
    return y;
}

Here is the call graph for this function:

template<class T >
void PLearn::softmax ( const TMat< T > &  x,
const TMat< T > &  y 
)

Definition at line 50 of file RBMLocalMultinomialLayer.cc.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::end(), i, PLearn::TMat< T >::length(), max(), PLASSERT, PLERROR, safeexp(), w, and PLearn::TMat< T >::width().

{
    int l = x.length();
    int w = x.width();
    PLASSERT( y.length() == l );
    PLASSERT( y.width() == w );

    if (l*w>0)
    {
        TMatElementIterator<real> xp = x.begin();
        TMatElementIterator<real> yp = y.begin();
        T maxx = max(x);
        real s = 0;

        for (int i=0; i<l*w; i++, xp++, yp++)
            s += ( (*yp) = safeexp((*xp) - maxx) );

        if (s == 0)
            PLERROR( "Trying to divide by 0 in softmax");
        s = 1.0 / s;

        for (yp = y.begin(); yp != y.end(); yp++)
            (*yp) *= s;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::softmax ( const TVec< T > &  x,
const TVec< T > &  y 
)

y = softmax(x)

Definition at line 170 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), max(), n, PLERROR, and safeexp().

Referenced by PLearn::DistRepNNet::add_transfer_func(), PLearn::NNet::applyTransferFunc(), PLearn::NLLErrModule::bbpropUpdate(), PLearn::LogSumVariable::bprop(), PLearn::LogaddOnBagsModule::bprop(), PLearn::SoftmaxNLLCostModule::bpropAccUpdate(), PLearn::SoftmaxNLLCostModule::bpropUpdate(), PLearn::ScoreLayerVariable::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::RBMLocalMultinomialLayer::computeExpectation(), PLearn::RBMMultinomialLayer::computeExpectations(), PLearn::RBMLocalMultinomialLayer::computeExpectations(), PLearn::IncrementalNNet::computeOutput(), PLearn::StructuralLearner::computeOutputWithFeatures(), PLearn::MixtureRandomVariable::ElogP(), PLearn::SoftmaxVariable::fprop(), PLearn::SoftmaxModule::fprop(), PLearn::RBMMultinomialLayer::fprop(), PLearn::RBMLocalMultinomialLayer::fprop(), PLearn::NLLErrModule::fprop(), PLearn::DeepNNet::fprop(), PLearn::DenoisingRecurrentNet::fpropInputReconstructionFromHidden(), PLearn::RBMMultinomialLayer::freeEnergyContributionGradient(), PLearn::NNet::hiddenLayer(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), PLearn::MultinomialRandomVariable::logP(), PLearn::MixtureRandomVariable::logP(), main(), PLearn::VarUtilsTest::perform(), PLearn::TMatTest::perform(), PLearn::MultinomialRandomVariable::setValueFromParentsValue(), PLearn::MixtureRandomVariable::setValueFromParentsValue(), softmax(), PLearn::LogSumVariable::symbolicBprop(), and PLearn::IncrementalNNet::train().

{
    int n = x.length();
    if (n>0)
    {
        T* yp = y.data();
        T* xp = x.data();
        T maxx = max(x);
        real s = 0;
        for (int i=0;i<n;i++)
            s += (yp[i] = safeexp(xp[i]-maxx));
        if (s == 0) PLERROR("trying to divide by 0 in softmax");
        s = 1.0 / s;
        for (int i=0;i<n;i++)
            yp[i] *= s;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::softmax ( Var  input,
int  index 
)

< should be numerically more stable

Definition at line 66 of file Var_utils.cc.

References exp(), and sum().

{ 
    return 1.0/sum(exp(input-input[index])); 
}

Here is the call graph for this function:

template<class T >
void PLearn::softmaxMinus ( const TVec< T > &  x,
const TVec< T > &  y 
)

y = softmax(-x)

Definition at line 190 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), min(), n, PLERROR, and safeexp().

Referenced by PLearn::RBMMultinomialLayer::computeExpectation().

{
    int n = x.length();
    if (n>0)
    {
        T* yp = y.data();
        T* xp = x.data();
        T minx = min(x);
        real s = 0;
        for (int i=0;i<n;i++)
            s += (yp[i] = safeexp(-xp[i]+minx));
        if (s == 0) PLERROR("trying to divide by 0 in softmax");
        s = 1.0 / s;
        for (int i=0;i<n;i++)
            yp[i] *= s;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::softplus ( Var  v) [inline]

Definition at line 79 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
real PLearn::softplus ( real  x) [inline]

numerically stable computation of log(1+exp(x))

return 0.5*x + LOG_2 - log(1./cosh(0.5*x));

Definition at line 463 of file pl_math.h.

References exp(), and x.

Referenced by PLearn::DistRepNNet::add_transfer_func(), PLearn::NNet::applyTransferFunc(), PLearn::SoftSlopeIntegralVariable::bprop(), PLearn::KLp0p1RBMModule::bpropAccUpdate(), PLearn::ConditionalDensityNet::build_(), PLearn::GaussianContinuum::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::NeuralNet::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::KLp0p1RBMModule::computeFreeEnergyOfHidden(), PLearn::KLp0p1RBMModule::computeFreeEnergyOfVisible(), PLearn::NeuralNetworkARDKernel::computeGramMatrix(), PLearn::SquaredExponentialARDKernel::computeGramMatrix(), PLearn::LinearARDKernel::computeGramMatrix(), PLearn::IIDNoiseKernel::computeGramMatrix(), PLearn::Matern1ARDKernel::computeGramMatrix(), PLearn::PLearnerDiagonalKernel::computeGramMatrix(), PLearn::RationalQuadraticARDKernel::computeGramMatrix(), PLearn::LinearARDKernel::computeGramMatrixDerivIspInputSigma(), PLearn::LinearARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::NeuralNetworkARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::PLearnerDiagonalKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::SquaredExponentialARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::Matern1ARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivIspSignalSigma(), PLearn::IIDNoiseKernel::computeGramMatrixDerivKronecker(), PLearn::RBMJointGenericParameters::computeLinearUnitActivations(), PLearn::RBMJointLLParameters::computeUnitActivations(), PLearn::RationalQuadraticARDKernel::derivIspAlpha(), PLearn::LinearARDKernel::derivIspGlobalSigma(), PLearn::SquaredExponentialARDKernel::derivIspGlobalSigma(), PLearn::Matern1ARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspGlobalSigma(), PLearn::NeuralNetworkARDKernel::derivIspGlobalSigma(), PLearn::RationalQuadraticARDKernel::derivIspInputSigma(), PLearn::LinearARDKernel::derivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::derivIspSignalSigma(), PLearn::SquaredExponentialARDKernel::derivIspSignalSigma(), PLearn::Matern1ARDKernel::derivIspSignalSigma(), PLearn::RationalQuadraticARDKernel::evaluate(), PLearn::SquaredExponentialARDKernel::evaluate(), PLearn::Matern1ARDKernel::evaluate(), PLearn::PLearnerDiagonalKernel::evaluate(), PLearn::IIDNoiseKernel::evaluate(), PLearn::LinearARDKernel::evaluate(), PLearn::NeuralNetworkARDKernel::evaluate(), PLearn::IIDNoiseKernel::evaluate_all_i_x(), PLearn::RationalQuadraticARDKernel::evaluate_all_i_x(), PLearn::IIDNoiseKernel::evaluate_i_x(), PLearn::CrossEntropyCostModule::fprop(), PLearn::RBMClassificationModule::fprop(), PLearn::KLp0p1RBMModule::fprop(), PLearn::SoftplusVariable::fprop(), PLearn::RBMBinomialLayer::fpropNLL(), PLearn::RBMWoodsLayer::fpropNLL(), PLearn::RBMRateLayer::fpropNLL(), PLearn::RBMBinomialLayer::freeEnergyContribution(), PLearn::RBMRateLayer::freeEnergyContribution(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), PLearn::NNet::hiddenLayer(), log_sigmoid(), PLearn::PLMathTest::perform(), soft_slope(), PLearn::KroneckerBaseKernel::softplusFloor(), tabulated_softplus(), PLearn::InferenceRBM::targetExpGivenInput(), and PLearn::PseudolikelihoodRBM::train().

{ 
    if(x<=-30.)
        return 0.0;
    else if(x>=30.)
        return x;
    else
        return log1p(exp(x));
}

Here is the call graph for this function:

real PLearn::softplus_primitive ( real  x) [inline]

Definition at line 601 of file pl_math.h.

References dilogarithm(), and exp().

Referenced by PLearn::PLMathTest::perform(), soft_slope_integral(), and tabulated_softplus_primitive().

                                       {
    return -dilogarithm(-exp(x));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::softplus_primitive ( Var  v) [inline]

Definition at line 78 of file DilogarithmVariable.h.

References dilogarithm(), and exp().

{ return -dilogarithm(-exp(v)); }

Here is the call graph for this function:

void PLearn::softsoftmax_bprop ( int  n,
int  d,
const real *__restrict__ const  X,
const real *__restrict__ const  U,
const real *__restrict__ const  logH,
const real *__restrict__ const  H_gr,
real *__restrict__ const  X_gr,
real *__restrict__ const  U_gr 
)

Definition at line 196 of file SoftSoftMaxVariable.cc.

References d, i, j, n, and SOFTSOFTMAX_SAFEEXP.

Referenced by PLearn::SoftSoftMaxVariable::bprop().

{
    // Beware: must be passed logH and H_gr, where H_gr is the gradient on H, not on logH. 

    // note: X, logH, H_gr, X_gr  all have the same shape (n,d) 
    // Offset positions will be the same for these matrices, so we wont prefix the variable holding offset positions for these.
    // However, variable indicating offset positions kj in U and U_gr (which are (d,d) matrices) will be called Ukj_pos.


    for(int i=0, row_i_pos=0; i<n; i++, row_i_pos+=d)
    {
        for(int j=0; j<d; j++)
        {          
            int ij = row_i_pos+j; // ij index offset
            real sumk = 0;
            for(int k=0, Ukj_pos=j; k<d; k++, Ukj_pos+=d)
            {
                // Ukj_pos = k*d+j;
                int ik = row_i_pos+k; // ik index offset
                real l_ik = logH[ik];
                real val_k = -H_gr[ik]*SOFTSOFTMAX_SAFEEXP(U[Ukj_pos] + l_ik+l_ik - X[ik] + X[ij]);
                if(k!=j)
                    U_gr[Ukj_pos] += val_k;
                sumk += val_k;
            }
            real h_ij = SOFTSOFTMAX_SAFEEXP(logH[ij]);
            X_gr[ij] += H_gr[ij]*h_ij + sumk; 
        }
    }
}

Here is the caller graph for this function:

void PLearn::softsoftmax_fprop_hardapprox_version ( int  n,
int  d,
const real *__restrict__ const  X,
const real *__restrict__ const  U,
real *__restrict__ const  H 
)

Definition at line 171 of file SoftSoftMaxVariable.cc.

References d, i, j, n, and SOFTSOFTMAX_SAFEEXP.

{
  int Hpos = 0;
  int xistart = 0;
  for(int i=0; i<n; i++, xistart+=d)
    {
      int uposstart  = 0;
      for(int j=0; j<d; j++, uposstart+=d)
        {
          real maxelem = X[xistart] + U[uposstart];
          for(int xpos=xistart+1, upos=uposstart+1; xpos<xistart+d; xpos++, upos++)
            {
              real elem = X[xpos] + U[upos];
              if(elem>maxelem)
                maxelem = elem;
            }
          H[Hpos++] = SOFTSOFTMAX_SAFEEXP(X[xistart+j]-maxelem);
        }
    }
}
void PLearn::softsoftmax_fprop_singlepass_version ( int  n,
int  d,
const real *__restrict__ const  X,
const real *__restrict__ const  U,
real *__restrict__ const  H 
)

Definition at line 79 of file SoftSoftMaxVariable.cc.

References d, i, j, n, SOFTSOFTMAX_LOGADD, and SOFTSOFTMAX_SAFEEXP.

{
  int Hpos = 0;
  int xistart = 0;
  for(int i=0; i<n; i++, xistart+=d)
    {

      int upos  = 0;
      for(int j=0; j<d; j++)
        {
          real Xij = X[xistart+j];

          real res = X[xistart] + U[upos++] - Xij;
          for(int xpos=xistart+1; xpos<xistart+d; xpos++, upos++)
            {
              real newelem = X[xpos] + U[upos] - Xij;
              res = SOFTSOFTMAX_LOGADD(res,newelem);
            }

          H[Hpos++] = SOFTSOFTMAX_SAFEEXP(-res);
        }
    }
}
void PLearn::softsoftmax_fprop_twopass_version ( int  n,
int  d,
const real *__restrict__ const  X,
const real *__restrict__ const  U,
real *__restrict__ const  H 
)

Definition at line 107 of file SoftSoftMaxVariable.cc.

References d, i, j, n, SOFTSOFTMAX_EXP, SOFTSOFTMAX_SAFEEXP, and SOFTSOFTMAX_SAFELOG.

{
  int Hpos = 0;
  int xistart = 0;
  for(int i=0; i<n; i++, xistart+=d)
    {
      int uposstart  = 0;
      for(int j=0; j<d; j++, uposstart+=d)
        {
          real maxelem = X[xistart] + U[uposstart];
          for(int xpos=xistart+1, upos=uposstart+1; xpos<xistart+d; xpos++, upos++)
            {
              real elem = X[xpos] + U[upos];
              if(elem>maxelem)
                maxelem = elem;
            }
          real res = 0;
          for(int xpos=xistart, upos=uposstart; xpos<xistart+d; xpos++, upos++)
            res += SOFTSOFTMAX_EXP(X[xpos] + U[upos] - maxelem);
          res = maxelem + SOFTSOFTMAX_SAFELOG(res) - X[xistart+j];

          H[Hpos++] = SOFTSOFTMAX_SAFEEXP(-res);
        }
    }
}
void PLearn::softsoftmax_with_log_twopass_version ( int  n,
int  d,
const real *__restrict__ const  X,
const real *__restrict__ const  U,
real *__restrict__ const  logH,
real *__restrict__ const  H 
)

Definition at line 137 of file SoftSoftMaxVariable.cc.

References d, i, j, n, SOFTSOFTMAX_EXP, SOFTSOFTMAX_SAFEEXP, and SOFTSOFTMAX_SAFELOG.

Referenced by PLearn::SoftSoftMaxVariable::fprop().

{
  int Hpos = 0;
  int xistart = 0;
  for(int i=0; i<n; i++, xistart+=d)
    {
      int uposstart  = 0;
      for(int j=0; j<d; j++, uposstart+=d)
        {
          real maxelem = X[xistart] + U[uposstart];
          for(int xpos=xistart+1, upos=uposstart+1; xpos<xistart+d; xpos++, upos++)
            {
              real elem = X[xpos] + U[upos];
              if(elem>maxelem)
                maxelem = elem;
            }
          real res = 0;
          for(int xpos=xistart, upos=uposstart; xpos<xistart+d; xpos++, upos++)
            res += SOFTSOFTMAX_EXP(X[xpos] + U[upos] - maxelem);
          res = -(maxelem + SOFTSOFTMAX_SAFELOG(res) - X[xistart+j]);

          logH[Hpos] = res;
          H[Hpos] = SOFTSOFTMAX_SAFEEXP(res);
          Hpos++;
        }
    }
}

Here is the caller graph for this function:

template<class MatT >
bool PLearn::SolveLinearSymmSystemByCG ( MatT  A,
Vec  x,
const Vec &  b,
int max_iter,
real tol,
real  lambda 
)

for debugging

general purpose but non-debuggable with current gdb...

inverse diagonal of A, for preconditionning

r = b - (A+lambda*I)*x;

z = M.solve(r); i.e. solve M z = r, i.e. diag(A+lambda I) z = r i.e. z_i = r_i / (A_{i,i} + lambda)

p = z + beta * p;

q = (A+lambda I)*p;

x += alpha * p;

r -= alpha * q;

cout << "at " << i << ", |r| = " << resid << endl;

Definition at line 279 of file GenMat.h.

References b, diag(), dot(), i, invertElements(), multiply(), multiplyAcc(), multiplyAdd(), norm(), and product().

Referenced by InversePowerIteration().

{
    real resid;
    int n=A.length();
    Vec p(n), z(n), q(n), invdiag(n);
    real alpha, beta, rho, previous_rho;
    real normb = norm(b);

    diag(A, invdiag);
    if (lambda>0)
        invdiag+=lambda;
    invertElements(invdiag);

    Vec r(n);
    product(A, x,r);
    if (lambda>0)
        multiplyAcc(r, x,lambda);
    r*=-1;
    r+=b;

    if (normb == 0.0) 
        normb = 1;
  
    resid = norm(r);
    //cout << "at 0, |r| = " << resid << endl;
    if ((resid / normb) <= tol) {
        tol = resid;
        max_iter = 0;
        return true;
    }

    for (int i = 1; i <= max_iter; i++) {
        multiply(r,invdiag,z);

        rho = dot(r, z);
    
        if (i == 1)
            p << z;
        else {
            beta = rho / previous_rho;
            multiplyAdd(z,p,beta,p);
        }
    
        product(A, p,q);
        multiplyAcc(q, p,lambda);

        alpha = rho / dot(p, q);

        multiplyAcc(x, p,alpha);
        multiplyAcc(r, q,-alpha);
        resid = norm(r);
        if ((resid / normb) <= tol) {
            tol = resid;
            max_iter = i;
            return true;     
        }

        previous_rho = rho;
    }
  
    tol = resid;
    return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::solveLinearSystem ( const Mat &  A,
const Vec &  b 
)

Returns solution x of Ax = b (same as above, except b and x are vectors)

Definition at line 360 of file plapack.cc.

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

{ return solveLinearSystem(A,b.toMat(b.length(),1)).toVec(); }

Here is the call graph for this function:

Mat PLearn::solveLinearSystem ( const Mat &  A,
const Mat &  B 
)

Returns the solution X of AX = B A and B are left intact, and the solution is returned. This call does memory allocations/deallocations and transposed copies of matrices (contrary to the lower level lapackSolveLinearSystem call that you may consider using if efficiency is a concern).

Definition at line 347 of file plapack.cc.

References lapackSolveLinearSystem(), PLearn::TMat< T >::length(), PLERROR, and transpose().

{
    Mat Bt = transpose(B);
    Mat At = transpose(A);
    TVec<int> pivots(A.length());
    int status = lapackSolveLinearSystem(At,Bt,pivots);
    if(status<0)
        PLERROR("Illegal value in argument of lapackSolveLinearSystem");
    else if(status>0)
        PLERROR("In solveLinearSystem: The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed.");
    return transpose(Bt); // return X
}

Here is the call graph for this function:

void PLearn::solveLinearSystem ( const Mat &  A,
const Mat &  Y,
Mat &  X 
)

for matrices A such that A.length() <= A.width(), find X s.t.

A X = Y

Definition at line 335 of file plapack.cc.

References PLERROR.

Referenced by constrainedLinearRegression(), PLearn::ProductRandomVariable::EMBprop(), linearRegression(), PLearn::ReconstructionWeightsKernel::reconstruct(), smartInitialization(), solveLinearSystem(), and weightedLinearRegression().

{
    PLERROR("solveLinearSystem: not implemented yet");
}

Here is the caller graph for this function:

template<class T >
void PLearn::solveLinearSystemByCholesky ( const TMat< T > &  A,
const TMat< T > &  B,
TMat< T > &  X,
TMat< T > *  pL = 0,
TVec< T > *  py = 0 
)

Definition at line 6125 of file TMat_maths_impl.h.

References choleskyDecomposition(), choleskySolve(), PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ProductRandomVariable::EMUpdate(), PLearn::GaussianProcessNLLVariable::fbpropFragments(), linearRegression(), linearRegressionNoBias(), remote_solveLinearSystemByCholesky(), PLearn::KernelRidgeRegressor::train(), and weightedLinearRegression().

{
    int n=A.length();
    int m=X.width();
    if (X.length()!=n || A.width()!=n || B.length()!=n || B.width()!=m)
        PLERROR("solveLinearSystemByCholesky:  A(%d,%d) * X(%d,%d) == B(%d,%d), incompatible",
                n,A.width(),X.length(),m,B.length(),B.width());
    TMat<T>* L;
    TVec<T>* y;
    if (pL) L=pL; else L = new TMat<T>(n,n);
    if (py) y=py; else y = new TVec<T>(n);
    choleskyDecomposition(A,*L);
    choleskySolve(*L,B,X,*y);
    if (!pL) delete L;
    if (!py) delete y;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::solveTransposeLinearSystem ( const Mat &  A,
const Mat &  Y,
Mat &  X 
)

for matrices A such that A.length() >= A.width(), find X s.t.

X A = Y

Definition at line 342 of file plapack.cc.

References PLERROR.

Referenced by PLearn::ProductRandomVariable::EMBprop().

{
    PLERROR("solveTransposeLinearSystem: not implemented yet");
}

Here is the caller graph for this function:

template<class T >
void PLearn::solveTransposeLinearSystemByCholesky ( const TMat< T > &  A,
const TMat< T > &  B,
TMat< T > &  X,
TMat< T > *  pL = 0,
TVec< T > *  py = 0 
)

Definition at line 6153 of file TMat_maths_impl.h.

References choleskyDecomposition(), choleskySolve(), i, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ProductRandomVariable::EMUpdate().

{
    int n=X.length();
    int m=X.width();
    if (A.length()!=m || A.width()!=m || B.length()!=n || B.width()!=m)
        PLERROR("solveTransposeLinearSystemByCholesky: X(%d,%d) * A(%d,%d) == B(%d,%d), incompatible",
                n,m,A.length(),A.width(),B.length(),B.width());
    TMat<T>* L;
    TVec<T>* y;
    if (pL) L=pL; else L = new TMat<T>(m,m);
    if (py) y=py; else y = new TVec<T>(m);
    choleskyDecomposition(A,*L);
    for (int i=0;i<n;i++)
        choleskySolve(*L,B(i),X(i),*y);
    if (!pL) delete L;
    if (!py) delete y;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::someAsserts ( )

Definition at line 270 of file PPathTest.cc.

                               :').up()", PPath("PL_ROOT:").up() );   // PLERROR
    PRINT_TEST( "PPath('').up()",  PPath("").up() );    // PLERROR
  
    ASSERT( "PPath('PL_ROOT:foo').up() == 'PL_ROOT:'",
            PPath("PL_ROOT:foo").up() == "PL_ROOT:" );  

    ASSERT( "PPath('foo/bar').up() == 'foo'",
            PPath("foo/bar").up() == "foo" );  

    ASSERT( "PPath('foo/bar/').up() == 'foo'",
            PPath("foo/bar/").up() == "foo" );

    ASSERT( "PPath('foo.cc').dirname() == '.'",
            PPath("foo.cc").dirname() == "." );
    
    ASSERT( "PPath('foo/bar').dirname() == 'foo'",
            PPath("foo/bar").dirname() == "foo" );
    
    ASSERT( "PPath('foo/bar/').dirname() == 'foo/bar'",
            PPath("foo/bar/").dirname() == "foo/bar" );
  
    ASSERT( "PPath('foo/bar/hi.cc').dirname() == 'foo/bar'",
            PPath("foo/bar/hi.cc").dirname() == "foo/bar" );

    MAND_LOG << plhead("Methods extension and no_extension") << endl;  

    ASSERT( "PPath('foo/bar/hi.cc').extension() == 'cc'",
            PPath("foo/bar/hi.cc").extension() == "cc" );

    ASSERT( "PPath('foo/bar.dir/hi.cc').extension() == 'cc'",
            PPath("foo/bar.dir/hi.cc").extension() == "cc" );

    ASSERT( "PPath('foo/bar/hi.').extension() == ''",
            PPath("foo/bar/hi.").extension() == "" );

    ASSERT( "PPath('foo/bar/hi').extension() == ''",
            PPath("foo/bar/hi").extension() == "" );

    ASSERT( "PPath('foo/bar.dir/hi').extension() == ''",
            PPath("foo/bar.dir/hi").extension() == "" );

    ASSERT( "PPath('foo/bar/hi.cc').no_extension() == 'foo/bar/hi'",
            PPath("foo/bar/hi.cc").no_extension() == "foo/bar/hi" );

    ASSERT( "PPath('foo/bar.d/hi.cc').no_extension() == 'foo/bar.d/hi'",
            PPath("foo/bar.d/hi.cc").no_extension() == "foo/bar.d/hi" );

    ASSERT( "PPath('foo/bar.d/hi').no_extension() == 'foo/bar.d/hi'",
            PPath("foo/bar.d/hi").no_extension() == "foo/bar.d/hi" );

    ASSERT( "PPath('foo/bar.d/hi.').no_extension() == 'foo/bar.d/hi.'",
            PPath("foo/bar.d/hi.").no_extension() == "foo/bar.d/hi." );

    MAND_LOG << plhead("Methods addProtocol() and removeProtocol()") << endl;  

    // TODO There is currently a problem with the 'file' protocol with DOS
    // paths: we cannot use file:C:\foo (could be worth checking out why
    // exactly), nor can we use file:foo (it is forbidden to use the file
    // protocol with a relative path). Thus the 'file' protocol is pretty
    // useless, and the following tests have been hacked to systematically
    // yield success, as otherwise they would fail.
    string portability_hack_string;

    // TODO Actually, this does not look like a correct canonical output!
#ifdef WIN32
    portability_hack_string ="file:/foo/bar";
#else
    portability_hack_string = PPath("/foo/bar").addProtocol().canonical();
#endif

    PRINT_TEST( "PPath('/foo/bar').addProtocol()",
                portability_hack_string);

    PRINT_TEST( "PPath('foo/bar').addProtocol()",
                PPath("foo/bar").addProtocol().canonical() );  // PLERROR

#ifdef WIN32
    portability_hack_string ="PL_ROOT:foo/bar";
#else
    portability_hack_string = PPath("file:/foo/bar").removeProtocol().canonical();
#endif
    PRINT_TEST( "PPath('file:/foo/bar').removeProtocol()",
                portability_hack_string);

    PRINT_TEST( "PPath('PL_ROOT:foo/bar').removeProtocol()",
                PPath("PL_ROOT:foo/bar").removeProtocol().canonical() );

    MAND_LOG << plhead("PPath comparisons") << endl;  

    ASSERT( "PPath('foo') == 'foo/'",
            PPath("foo") == "foo/" );

    ASSERT( "!(PPath('foo') != 'foo/')",
            !(PPath("foo") != "foo/") );

    ASSERT( "PPath('') == ''",
            PPath("") == "" );

    ASSERT( "!(PPath('') != '')",
            !(PPath("") != "") );
    
    // TODO See note above about the protocols problems with DOS paths.
    bool portability_hack_bool;
#ifdef WIN32
    portability_hack_bool = true;
#else
    portability_hack_bool = PPath("/foo/bar") == "file:/foo/bar";
#endif

    ASSERT( "PPath('/foo/bar') == 'file:/foo/bar'",
            portability_hack_bool );

#ifdef WIN32
    portability_hack_bool = true;
#else
    portability_hack_bool = !(PPath("/foo/bar") != "file:/foo/bar");
#endif

    ASSERT( "!(PPath('/foo/bar') != 'file:/foo/bar')",
            portability_hack_bool );

    ASSERT( "PPath('ftp:/foo/bar') == 'ftp:/foo/bar/'",
            PPath("ftp:/foo/bar") == "ftp:/foo/bar/" );

    ASSERT( "!(PPath('ftp:/foo/bar') != 'ftp:/foo/bar/')",
            !(PPath("ftp:/foo/bar") != "ftp:/foo/bar/") );

    ASSERT( "PPath('PL_ROOT:foo') != 'ftp:/foo'",
            PPath("PL_ROOT:foo") != "ftp:/foo" );

#ifdef WIN32
    portability_hack_bool = true;
#else
    portability_hack_bool = PPath("file:/foo") != "htpp:/foo";
#endif

    ASSERT( "PPath('file:/foo') != 'http:/foo'",
            portability_hack_bool );

}

void canonical()
{
    MAND_LOG << plhead("Canonical paths") << endl;

    // Single dots.

    PRINT_TEST("./foo", PPath("./foo").canonical())
        PRINT_TEST("./", PPath("./").canonical())
        PRINT_TEST(".", PPath(".").canonical())
        PRINT_TEST("PL_ROOT:.", PPath("PL_ROOT:.").canonical())
        PRINT_TEST("PL_ROOT:./", PPath("PL_ROOT:./").canonical())
        PRINT_TEST("PL_ROOT:./foo", PPath("PL_ROOT:./foo").canonical())
        PRINT_TEST("foo/.", PPath("foo/.").canonical())
        PRINT_TEST("foo/./", PPath("foo/./").canonical())
        PRINT_TEST("foo/./bar", PPath("foo/./bar").canonical())
        PRINT_TEST("foo/.bar", PPath("foo/.bar").canonical())
        PRINT_TEST("foo./bar", PPath("foo./bar").canonical())

        // Double dots.
template<class T >
void PLearn::sortColumns ( const TMat< T > &  mat,
int  rownum 
)

Definition at line 247 of file TMat_sort.h.

References i, j, PLearn::TMat< T >::length(), min(), PLERROR, and PLearn::TMat< T >::width().

{
    int j,jj,i;
    T min;
    T tmp;
    int mincol;
  
    if(rownum>=mat.length())
        PLERROR("In sortColumns: no rownumumn %d in matrix (%dx%d)",rownum,mat.width(),mat.length());

    for(j=0; j<mat.width(); j++)
    {
        // look, starting from col j, for the col with the minimum rownum element
        mincol = j;
        min = mat(rownum,j);
        for(jj=j; jj<mat.width(); jj++)
        {
            if(mat(rownum,jj)<min)
            {
                min = mat(rownum,jj);
                mincol = jj;
            }
        }
        if(mincol>j) /*   Found a col with inferior value   */
        {
            /*   So let's exchange cols j and mincol   */
            for(i=0; i<mat.length(); i++)
            {
                tmp = mat(i,j);
                mat(i,j) = mat(i,mincol);
                mat(i,mincol) = tmp;
            }
        }
    }
}

Here is the call graph for this function:

template<class T >
bool PLearn::sortedVectorsIntersect ( const TVec< T > &  v1,
const TVec< T > &  v2 
)

v1 and v2 have their elements in increasing order.

Do they have at least one element in common? Use the 'merge sort' principle to find out.

Definition at line 95 of file TMat_maths_impl.h.

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

{
    int i1=0,i2=0;
    do
    {
        T v1i = v1[i1];
        T v2i = v2[i2];
        if (v1i==v2i) return true;
        if (v1i<v2i) i1++;
        else i2++;
    }
    while (i1<v1.size() && i2<v2.size());
    return false;
}

Here is the call graph for this function:

template<class T >
void PLearn::sortElements ( const TVec< T > &  vec,
bool  reverse_elems = false 
) [inline]
int PLearn::sortIdComparator ( const void *  i1,
const void *  i2 
)

Definition at line 179 of file StatsCollector.cc.

References d, and fast_exact_is_equal().

{
    real d = ((PairRealSCCType*)i1)->first - ((PairRealSCCType*)i2)->first;
    return (d<0)?-1:(fast_exact_is_equal(d, 0) ? 0:1);
}

Here is the call graph for this function:

template<class T >
void PLearn::sortRows ( const TMat< T > &  mat,
int  col = 0,
bool  increasing_order = true 
)

This implementation should be very efficient, but it does two memory allocation: a first one of mat.length()*(sizeof(real)+sizeof(int)) and a second one of mat.length()*sizeof(int).

(Note: due to the implementation of the column sorting, this function always performs a STABLE SORT (in the sense of the STL stable_sort function). There is no need to explicitly call stable_sort to achieve the effect, iff increasing_order=true)

Definition at line 202 of file TMat_sort.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), and PLearn::TMat< T >::swapRows().

{
    vector< pair<T,int> > order(mat.length());
    typename vector< pair<T,int> >::iterator it = order.begin();
    T* ptr = mat.data()+col;
    for(int i=0; i<mat.length(); ++i, ptr+=mat.mod(), ++it)
    {
        it->first = *ptr;
        it->second = i;
    }

    if(increasing_order)
        sort(order.begin(),order.end());
    else 
        sort(order.begin(), order.end(), greater< pair<T,int> >() );

    // Build the new destination position array
    // (destpos is the inverse map of order.second)
    vector<int> destpos(mat.length());  
    for(int i=0; i<mat.length(); ++i)
        destpos[order[i].second] = i;

    // Now put the full rows in order...
    for(int startpos = 0; startpos<mat.length(); startpos++)
    {
        int dest = destpos[startpos];      
        if(dest!=-1)
        {
            while(dest!=startpos)
            {
                mat.swapRows(startpos,dest);
                int newdest = destpos[dest];
                destpos[dest] = -1;
                dest = newdest;
            }
            destpos[startpos] = -1;
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::sortRows ( TMat< T > &  mat,
const TVec< int > &  key_columns,
bool  increasing_order = true 
)
string PLearn::space_to_underscore ( string  str)

replaces all characters <= ' ' (i.e. newline, tab, space, etc...) by '_'

Definition at line 303 of file stringutils.cc.

References i.

Referenced by PLearn::AsciiVMatrix::AsciiVMatrix(), PLearn::SurfaceMesh::build_(), PLearn::Learner::costNames(), PLearn::SDBVMFieldRemapStrings::getDiscreteValue(), PLearn::VMatrix::saveAMAT(), saveAscii(), PLearn::Learner::testResultsNames(), PLearn::RowIterator::toString(), and PLearn::FieldValue::toString().

{
    for(size_t i=0; i<str.size(); i++)
    {
        if(str[i]<=' ')
            str[i] = '_';
    }
    return str;
}

Here is the caller graph for this function:

Var PLearn::sparse_incremental_affine_transform ( Var  vec,
Var  transformation,
real  the_running_average_prop = 0.01,
real  the_start_grad_prop = 1 
) [inline]

first row of transformation is the bias.

Definition at line 112 of file SparseIncrementalAffineTransformVariable.h.

{ 
  return new SparseIncrementalAffineTransformVariable(vec,transformation,the_running_average_prop,the_start_grad_prop);
}
TMat<int> PLearn::SpearmanRankCorrelation ( const VMat &  x,
const VMat &  y,
Mat &  r,
bool  ignore_missing = false 
)

Compute the Spearman Rank correlation statistic.

It measures how much of a monotonic dependency there is between two variables x and y (column matrices). The statistic is computed as follows: r = 1 - 6 (sum_{i=1}^n (rx_i - ry_i)^2) / (n(n^2-1)) If x and y are column matrices than r is a 1x1 matrix. If x and y have width wx and wy respectively than the statistic is computed for each pair of column (the first taken from x and the second from y) and r will be a symmetric matrix size wx by wy upon return. N.B. If x holds in memory than copying it to a matrix (toMat()) before calling this function will speed up computation significantly. If 'ignore_missing' is set to true, rows for which either x or y is missing will be ignored. The returned matrix is empty if 'ignore_missing' is false, otherwise it contains the number of non-missing values for each pair of variables in x and y.

Definition at line 55 of file stats_utils.cc.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::column(), PLearn::VMat::column(), computeRanks(), fast_exact_is_equal(), i, j, PLearn::TMat< T >::length(), PLearn::VMat::length(), MISSING_VALUE, n, PLERROR, PLWARNING, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), PLearn::VMat::toMat(), PLearn::ProgressBar::update(), and PLearn::VMat::width().

Referenced by testSpearmanRankCorrelation().

{
    TMat<int> result;
    int n=x.length();
    if (n!=y.length())
        PLERROR("SpearmanRankCorrelation: x and y must have the same length");
    int wx=x.width();
    int wy=y.width();
    r.resize(wx,wy);
    r.clear();
    Mat y_ranks;
    TVec<int> n_ynonmissing = computeRanks(y.toMat(),y_ranks, ignore_missing);
    Mat x_rank(n,1);
    //real rank_normalization = sqrt(1.0/(n*n-1.0));
    real rank_normalization = 12.0/(n*(n-1.0)*(n-2.0));
    real half = n*0.5;
    // Vectors used only when 'ignore_missing' is true.
    Vec rank_normalization_miss;
    Vec half_miss;
    Mat y_copy, y_rankj, xi_placeholder;
    if (ignore_missing) {
        rank_normalization_miss.resize(wy);
        half_miss.resize(wy);
        result.resize(wx, wy);
        y_copy.resize(n, 1);
        y_rankj.resize(n, 1);
        xi_placeholder.resize(x.length(), 1);
    }
    ProgressBar pb("Computing Spearman rank correlation", wx);
    for (int i=0;i<wx; pb.update(++i))
    {
        Mat xi = x.column(i).toMat();
        const Vec& r_i = r(i);

        if (ignore_missing) {
            // Ignoring missing values is more complex, because we need to ignore them
            // both in x and y.
            for (int j = 0; j < wy; j++) {
                // We replace values in x_i associated to missing values in y by missing
                // values, so that they are not taken into account when computing ranks.
                // We need to make a copy to ensure we do not destroy any data.
                if (n_ynonmissing[j] < y.length()) {
                    Mat xi_back = xi; // Backup of original xi.
                    xi = xi_placeholder;
                    xi << xi_back;
                    for (int k = 0; k < y_ranks.length(); k++)
                        if (fast_exact_is_equal(y_ranks(k,j), -1)) // -1 rank <-> missing value
                            xi(k,0) = MISSING_VALUE;
                }
                TVec<int> n_nonmissing = computeRanks(xi, x_rank, ignore_missing);
                n = n_nonmissing[0];
                result(i,j) = n;
                rank_normalization = 12.0/(n*(n-1.0)*(n-2.0));
                half = n*0.5;
                y_rankj << y_ranks.column(j);
                // We need to recompute y's ranks if there were missing values in x.
                if (n < n_ynonmissing[j]) {
                    y_copy << y.column(j).toMat();
                    for (int k = 0; k < x_rank.length(); k++)
                        if (fast_exact_is_equal(x_rank(k,0), -1))
                            y_copy(k,0) = MISSING_VALUE;
                    computeRanks(y_copy, y_rankj, ignore_missing);
                } else
                    y_rankj << y_ranks.column(j);
                for (int k = 0; k < x_rank.length(); k++) {
                    real x_r = x_rank(k,0);
                    real y_r = y_rankj(k,0);
                    if (!fast_exact_is_equal(x_r, -1)) // -1 rank <-> missing value
                        r_i[j] += (x_r - half) * (y_r - half) * rank_normalization;
                }
            }
        } else {
            // Compute the rank of the i-th column of x
            computeRanks(xi,x_rank, ignore_missing);
            // Compute the Spearman rank correlation coefficient:
            for (int k=0;k<n;k++)
                for (int j=0;j<wy;j++)
                {
                    //real delta = (x_rank(k,0) - y_ranks(k,j))*rank_normalization;
                    // r_i[j] += delta*delta;
                    r_i[j] += (x_rank(k,0) - half) * (y_ranks(k,j)-half) * rank_normalization;
                }
        }
        for (int j=0;j<wy;j++)
            if (r_i[j]<-1.01 || r_i[j]>1.01)
                PLWARNING("SpearmanRankCorrelation: weird correlation coefficient, %f for %d-th input, %d-target",
                          r_i[j],i,j);
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

vector< string > PLearn::split ( const string &  s,
const string &  delimiters = " \t\n\r",
bool  keepdelimiters = false 
)

splits a string into a list of substrings (using any sequence of the given delimiters as split point) if keepdelimiters is true the delimitersequences are appended to the list otherwise (the default) they are removed.

Definition at line 495 of file stringutils.cc.

{
    vector<string> result;

    size_t startpos = 0;
    size_t endpos = 0;

    for(;;)
    {
        startpos = endpos;
        endpos = s.find_first_not_of(delimiters,startpos);
        if(endpos==string::npos)
        {
            if(keep_delimiters)
                result.push_back(s.substr(startpos));
            break;
        }
        if(keep_delimiters && endpos>startpos)
            result.push_back(s.substr(startpos,endpos-startpos));

        startpos = endpos;
        endpos = s.find_first_of(delimiters,startpos);
        if(endpos==string::npos)
        {
            result.push_back(s.substr(startpos));
            break;
        }
        result.push_back(s.substr(startpos,endpos-startpos));
    }

    return result;
}
void PLearn::split ( VMat  d,
real  validation_fraction,
real  test_fraction,
VMat &  train,
VMat &  valid,
VMat &  test,
bool  do_shuffle 
)

Splits the dataset d into 3 subsets.

Definition at line 166 of file Splitter.cc.

References endl(), PLearn::VMat::length(), PLearn::VMat::rows(), and shuffleElements().

{
    int ntest = int( test_fraction>=1.0 ?test_fraction :test_fraction*d.length() );
    int nvalid = int( validation_fraction>=1.0 ?validation_fraction :validation_fraction*d.length() );
    int ntrain = d.length()-(ntest+nvalid);
    Vec indices(0, d.length()-1, 1); // Range-vector
    if (do_shuffle){
        cout<<"shuffle !"<<endl;
        shuffleElements(indices);
    }
    train = d.rows(indices.subVec(0,ntrain));
    valid = d.rows(indices.subVec(ntrain,nvalid));
    test = d.rows(indices.subVec(ntrain+nvalid,ntest));
    cout<<"n_train : "<<ntrain<<endl<<"n_valid : "<<nvalid<<endl<<"n_test : "<<(d.length()-ntrain+nvalid)<<endl;
}

Here is the call graph for this function:

void PLearn::split ( VMat  d,
real  test_fraction,
VMat &  train,
VMat &  test,
int  i = 0,
bool  use_all = false 
)

Splits the dataset d into a train and a test subset If test_fraction is <1.0 then the size of the test subset is set to be ntest = int(test_fraction*d.length()) If test_fraction is >=1.0 then ntest = int(test_fraction) Last argument i allows to get the ith split of a K-fold cross validation i = 0 corresponds to having the last ntest samples used as the test set i = 1 means having the ntest samples before those as the test set, etc... If the bool 'use_all' is true, then the test set may contain more examples so that if we ask all splits, all the examples are contained in one test split.

Definition at line 114 of file Splitter.cc.

References PLearn::VMat::length(), n, PLearn::VMat::subMatRows(), and vconcat().

{
    int n = d.length();
    real ftest = test_fraction>=1.0 ? test_fraction : test_fraction*real(n);
    int ntest = int(ftest);
    int ntrain_before_test = n - (i+1)*ntest;
    int ntrain_after_test = i*ntest;
    if (use_all) {
        // See how many splits there are.
        int nsplits = int(n / ftest + 0.5);
        // See how many examples will be left.
        int nleft = n - nsplits * ntest;
        // Deduce how many examples to add in each split.
        int ntest_more = nleft / nsplits;
        // And, finally, how many splits will have one more example so that they are
        // all taken somewhere.
        int nsplits_one_more = nleft % nsplits;
        // Now recompute ntest, ntrain_before_test and ntrain_after_test.
        ntest = ntest + ntest_more;
        if (i < nsplits_one_more) {
            ntest++;
            ntrain_before_test = n - (i+1) * ntest;
        } else {
            ntrain_before_test =
                n
                - (nsplits_one_more)          * (ntest + 1)
                - (i - nsplits_one_more + 1)  * ntest;
        }
        ntrain_after_test = n - ntest - ntrain_before_test;
    }

    test = d.subMatRows(ntrain_before_test, ntest);
    if(ntrain_after_test == 0)
        train = d.subMatRows(0,ntrain_before_test);
    else if(ntrain_before_test==0)
        train = d.subMatRows(ntest, ntrain_after_test);
    else
        train = vconcat( d.subMatRows(0,ntrain_before_test),
                         d.subMatRows(ntrain_before_test+ntest, ntrain_after_test) );
}

Here is the call graph for this function:

vector< string > PLearn::split ( const string &  s,
char  delimiter 
)

splits a string along occurences of the delimiters.

Definition at line 348 of file stringutils.cc.

Referenced by PLearn::SDBVMatrix::appendField(), PLearn::MultiInstanceVMatrix::build_(), PLearn::LIBSVMSparseVMatrix::build_(), PLearn::GraphicalBiText::build_(), PLearn::DictionaryVMatrix::build_(), PLearn::ConditionalDictionary::build_(), PLearn::AsciiVMatrix::build_(), PLearn::VVMatrix::createPreproVMat(), cross_valid(), PLearn::PL_Log::enableNamedLogging(), PLearn::VVMatrix::extractSourceMatrix(), PLearn::VMatLanguage::generateCode(), PLearn::VVMatrix::generateVMatIndex(), PLearn::VVMatrix::getDateOfVMat(), PLearn::EntropyContrast::getInfo(), getList(), getNonBlankLines(), getProcessDataMemory(), PLearn::VMatrix::getSavedFieldInfos(), PLearn::MultiTaskSeparationSplitter::getSplit(), PLearn::KFoldSplitter::getSplit(), PLearn::ClassSeparationSplitter::getSplit(), getSynsetPtr(), PLearn::ShellProgressBar::getTime(), global_options(), PLearn::HTMLUtils::highlight_known_classes(), PLearn::HTMLHelpCommand::highlight_known_classes(), interactiveDisplayCDF(), PLearn::WordNetOntology::load(), loadAscii(), loadAsciiSingleBinaryDescriptor(), PLearn::GraphicalBiText::loadBitext(), loadClassificationDataset(), PLearn::GraphicalBiText::loadSensemap(), main(), PLearn::GhostScript::multilineShow(), PLearn::Object::newwrite(), parseSizeFromRemainingLines(), PLearn::StatSpec::parseStatname(), PLearn::PPath::parseUrlParameters(), plotVMats(), PLearn::VMatLanguage::preprocess(), PLearn::VVMatrix::processJoinSection(), randomSplit(), PLearn::PairwiseDiffsCommand::run(), PLearn::FieldConvertCommand::run(), set_global_calendars(), PLearn::BestAveragingPLearner::setTrainingSet(), split_quoted_delimiter(), PLearn::VMatLanguage::staticPreprocess(), PLearn::StringTable::StringTable(), and vmatmain().

{
    vector<string> res;
    string::size_type l = s.length();
    unsigned int beg = 0;
    unsigned int end = 0;
  
    while(end<=l)
    {
        while(end<l && s[end]!=delimiter)
            ++end;
        res.push_back(s.substr(beg,end-beg));
        ++end;
        beg = end;
    }

    return res;
}
vector< string > PLearn::split_all ( const string &  s,
const string &  delimiters = " \t\n\r" 
)

splits a string into a list of substrings (using any occurence of the given delimiters as split point)

Definition at line 472 of file stringutils.cc.

{
    vector<string> result;

    size_t startpos = 0;
    size_t endpos = 0;

    for(;;)
    {
        startpos = endpos;
        endpos = s.find_first_of(delimiters,startpos);
        if(endpos==string::npos)
        {
            result.push_back(s.substr(startpos));
            break;
        }
        result.push_back(s.substr(startpos,endpos-startpos));
        endpos++;
    }

    return result;
}
void PLearn::split_behavior ( const string &  test,
const string &  dos,
const string &  posix 
)

Definition at line 196 of file PPathTest.cc.

        {
        PPath p("./foo//bar\\toto");
vector< string > PLearn::split_from_string ( const string &  s,
const string &  delimiter 
)

Split a string along occurences of the substring 'delimiter'.

Definition at line 716 of file stringutils.cc.

Referenced by parseBaseAndParameters().

{
    vector<string> res;
    string::size_type pos_of_delim;
    string::size_type pos_of_start = 0;
    string::size_type size_of_delim = delimiter.size();
    do {
        pos_of_delim = s.find(delimiter, pos_of_start);
        if (pos_of_delim == string::npos)
            res.push_back(s.substr(pos_of_start));
        else {
            res.push_back(s.substr(pos_of_start, pos_of_delim - pos_of_start));
            pos_of_start = pos_of_delim + size_of_delim;
        }
    } while (pos_of_delim != string::npos);
    return res;
}

Here is the caller graph for this function:

void PLearn::split_on_first ( const string &  s,
const string &  delimiters,
string &  left,
string &  right 
)

Split the string on the first occurence of a delimiter and returns what was left of the delimitor and what was right of it. If no delimitor character is found, the original string is returned as left, and "" is returned in right

Definition at line 529 of file stringutils.cc.

Referenced by parseBaseAndParameters(), PLearn::StatSpec::parseStatname(), PLearn::PPath::parseUrlParameters(), PLearn::PTester::perform1Split(), PLearn::PyPLearnScript::process(), PLearn::StatsCommand::run(), PLearn::RunCommand::run(), PLearn::ReadAndWriteCommand::run(), smartLoadObject(), and split_on_first().

{
    size_t pos = s.find_first_of(delimiters);
    if (pos != string::npos)
    {
        left = s.substr(0,pos);
        right = s.substr(pos+1);
    }
    else
    {
        left = s;
        right = "";
    }
}

Here is the caller graph for this function:

pair< string, string > PLearn::split_on_first ( const string &  s,
const string &  delimiters = " \t\n\r" 
)

Split the string on the first occurence of a delimiter; return a pair with the two split parts. If the splitting character is not found, the original string is returned in the first part of the pair, and "" is in the second part

Definition at line 545 of file stringutils.cc.

References left(), right(), and split_on_first().

{
    string left, right;
    split_on_first(s, delimiters, left, right);
    return make_pair(left,right);
}

Here is the call graph for this function:

vector< string > PLearn::split_quoted_delimiter ( const string &  s,
char  delimiter,
const string &  double_quote 
)

Split a string at deliminer while allowing a delimiter to be quoted so that it is not considered to be as a delimiter. The double_quote are only considered at the boundary of the field. The function should execute in O(n+k) where n is the number of character in s and k is the number of field in k. The delimiter should not be the same as double_quote.

Parameters:
sthe string to split
delimiterthe caractere that separate the fields of s. a string that will surround a field if it containt delimiter caractere that should not consider generate a new field.
Todo:
optimize...

Definition at line 367 of file stringutils.cc.

References i, j, PLASSERT, split(), string_begins_with(), and string_ends_with().

Referenced by split_quoted_delimiter(), and PLearn::TextFilesVMatrix::splitIntoFields().

                                                                 {
    int quote_size=double_quote.size();
    if(quote_size==1)
        return split_quoted_delimiter(s,delimiter,double_quote[0]);
    else if(quote_size==0)
        return split(s,delimiter);
    PLASSERT(double_quote.size()>0);

    vector<string> ret = split(s, delimiter);
    vector<string> ret2;
    for(uint i=0; i<ret.size();i++){
        bool bw=string_begins_with(ret[i],double_quote);
        bool ew=string_ends_with(ret[i],double_quote);
        if(bw && ew){
            ret2.push_back(ret[i].substr(quote_size,
                                         ret[i].size()-quote_size)); 
        }else if(bw){
            string tmp=ret[i].substr(quote_size);
            tmp+=delimiter;
            for(uint j=i+1;j<ret.size();j++){
                if(string_ends_with(ret[j],double_quote)){
                    tmp+=ret[j].substr(0,ret[j].size()-quote_size);
                    ret2.push_back(tmp);
                    i=j;
                    break;
                }
                tmp+=ret[j];
                tmp+=delimiter;
            }
        }else
            ret2.push_back(ret[i]);
    }
    return ret2;
    
}

Here is the call graph for this function:

Here is the caller graph for this function:

vector< string > PLearn::split_quoted_delimiter ( const string &  s,
char  delimiter,
char  double_quote 
)

Definition at line 403 of file stringutils.cc.

References i, j, PLASSERT, and split().

                                                        {
    PLASSERT(delimiter!=double_quote);
    vector<string> ret = split(s, delimiter);
    vector<string> ret2;
    for(uint i=0; i<ret.size();i++){
        string f = ret[i];
        bool bw=f[0]==double_quote;
        bool ew=f[f.size()-1]==double_quote;
        if(bw && ew){
            ret2.push_back(f.substr(1,f.size()-2)); 
        }else if(bw){
            string tmp=f.substr(1);
            tmp+=delimiter;
            for(uint j=i+1;j<ret.size();j++){
                if(ret[j][ret[j].size()-1]==double_quote){
                    tmp+=ret[j].substr(0,ret[j].size()-1);
                    ret2.push_back(tmp);
                    i=j;
                    break;
                }
                tmp+=ret[j];
                tmp+=delimiter;
            }
        }else
            ret2.push_back(f);
    }
    return ret2;
}

Here is the call graph for this function:

vector< string > PLearn::split_quoted_delimiter ( const string &  s,
const string &  delimiters,
const string &  double_quote 
)

Definition at line 433 of file stringutils.cc.

References PLASSERT, split(), split_quoted_delimiter(), and string_begins_with().

{
    int quote_size=double_quote.size();
    if(quote_size==1 && delimiters.size()==1)
        return split_quoted_delimiter(s,delimiters[0],double_quote[0]);
    else if(delimiters.size()==1 && quote_size==0)
        return split(s,delimiters[0]);
    PLASSERT(delimiters.size()>0);
    vector<string> ret;

    size_t startpos = 0;
    size_t endpos = 0;

    for(;;)
    {
        startpos = endpos;
        bool quoted = string_begins_with(s.substr(startpos),double_quote);
        if(quoted){
            startpos+=quote_size;
            endpos = s.find(double_quote,startpos);
        }else
            endpos = s.find_first_of(delimiters,startpos);
        if(endpos==string::npos)
        {
            ret.push_back(s.substr(startpos));
            break;
        }
        ret.push_back(s.substr(startpos,endpos-startpos));
        if(quoted){
            endpos+=quote_size+1;
        }else
            endpos++;
        if(endpos>s.size())
            break;
    }
    return ret;
}

Here is the call graph for this function:

void PLearn::splitTrainValidTest ( VMat &  data_set,
VMat &  train_set,
VMat &  valid_set,
real  valid_fraction,
VMat &  test_set,
real  test_fraction,
bool  normalize 
)

Definition at line 133 of file databases.cc.

References PLearn::VMat::length(), normalizeDataSets(), PLearn::VMat::subMatColumns(), PLearn::VMat::subMatRows(), and PLearn::VMat::width().

{ 
    int nvalid = int((real)data_set.length()*valid_fraction);
    int ntest = int((real)data_set.length()*test_fraction);
    int ntrain = data_set.length()-(nvalid+ntest);

    train_set = data_set.subMatRows(0,ntrain);
    valid_set = data_set.subMatRows(ntrain, nvalid);
    test_set = data_set.subMatRows(ntrain+nvalid,ntest);
    if (normalize){
        VMat train_set_inputs=train_set.subMatColumns(0,data_set.width()-1);
        VMat valid_set_inputs=valid_set.subMatColumns(0,data_set.width()-1); 
        VMat test_set_inputs = test_set.subMatColumns(0,data_set.width()-1);
        normalizeDataSets(train_set_inputs,valid_set_inputs,test_set_inputs);
    }
}

Here is the call graph for this function:

void PLearn::sposvx_ ( char *  FACT,
char *  UPLO,
int N,
int NRHS,
float *  A,
int LDA,
float *  AF,
int LDAF,
char *  EQUED,
float *  S,
float *  B,
int LDB,
float *  X,
int LDX,
float *  RCOND,
float *  FERR,
float *  BERR,
float *  WORK,
int IWORK,
int INFO 
)

Referenced by lapack_Xposvx_().

Here is the caller graph for this function:

void PLearn::spotrf_ ( char *  UPLO,
int N,
float *  A,
int LDA,
int INFO 
)

Referenced by lapack_Xpotrf_().

Here is the caller graph for this function:

void PLearn::spotrs_ ( char *  UPLO,
int N,
int NRHS,
float *  A,
int LDA,
float *  B,
int LDB,
int INFO 
)

Referenced by lapack_Xpotrs_().

Here is the caller graph for this function:

template<class T >
TMat<T> PLearn::sqrt ( const TMat< T > &  m)

Definition at line 7039 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, sqrt(), w, and PLearn::TMat< T >::width().

{
    TMat<T> res(m.length(), m.width());
    int w=m.width();
    for(int i=0; i<m.length(); i++)
        for(int j=0; j<w; j++)
            res(i,j) = sqrt(m(i,j));
    return res;
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::sqrt ( const TVec< T > &  src) [inline]

Definition at line 1342 of file TMat_maths_impl.h.

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

Referenced by affineNormalization(), PLearn::BallTreeNearestNeighbors::anchorTrain(), anglesFromRotationMatrix(), autocorrelation_function(), PLearn::BallTreeNearestNeighbors::BallKNN(), bnldev(), PLearn::SquareRootVariable::bprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::bprop(), PLearn::ErfVariable::bprop(), PLearn::AffineTransformWeightPenalty::bprop(), PLearn::mNNet::bpropUpdateNet(), PLearn::MoleculeTemplateLearner::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::NnlmOnlineLearner::buildLayers(), calcNormal(), calculateEuclDist(), chol_rotgen(), choleskyAppendDimension(), choleskyDecomposition(), choleskyInsertBasis(), choleskyUpgrade(), PLearn::VMatrix::compareStats(), PLearn::MoleculeTemplateLearner::compute_S_mean_std(), compute_sqrt(), computeBasicStats(), computeColumnsMeanAndStddev(), computeConditionalMeans(), PLearn::PLS::computeConfidenceFromOutput(), PLearn::LinearRegressor::computeConfidenceFromOutput(), PLearn::GaussianProcessRegressor::computeConfidenceFromOutput(), PLearn::LayerCostModule::computeCorrelationStatistics(), PLearn::NeuralNetworkARDKernel::computeGramMatrix(), computeInputMeanAndStddev(), computeInverseStandardDeviationFromMeanAndSquareMean(), computeMeanAndStddev(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::PCA::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::KernelProjection::computeOutput(), PLearn::PLearner::computeOutputCovMat(), PLearn::LocalizedFeaturesLayerVariable::computeSubsets(), PLearn::PruningLinearRegressor::computeTRatio(), PLearn::ChemicalICP::computeWeightedDistance(), computeWeightedInputOutputMeansAndStddev(), PLearn::ChemicalICP::computeWeights(), PLearn::BallTreeNearestNeighbors::contain(), correlation(), correlations(), PLearn::PvGradNNet::discountGrad(), dist(), PLearn::ICP::dynamicDistanceThreshold(), PLearn::ProbSparseMatrix::euclidianDistance(), PLearn::NeuralNetworkARDKernel::evaluate(), PLearn::DivisiveNormalizationKernel::evaluate(), PLearn::CorrelationKernel::evaluate(), PLearn::BetaKernel::evaluate(), PLearn::DivisiveNormalizationKernel::evaluate_i_j(), PLearn::DistanceKernel::evaluate_i_j(), PLearn::CosKernel::evaluate_i_j(), PLearn::DivisiveNormalizationKernel::evaluate_i_x(), PLearn::DivisiveNormalizationKernel::evaluate_i_x_again(), PLearn::DivisiveNormalizationKernel::evaluate_x_i(), PLearn::DivisiveNormalizationKernel::evaluate_x_i_again(), PLearn::RegressionTree::expandTree(), PLearn::NNet::fillWeights(), PLearn::NeuralProbabilisticLanguageModel::fillWeights(), PLearn::LinearInductiveTransferClassifier::fillWeights(), PLearn::FeatureSetSequentialCRF::fillWeights(), PLearn::FeatureSetNNet::fillWeights(), PLearn::DistRepNNet::fillWeights(), PLearn::DeepFeatureExtractorNNet::fillWeights(), PLearn::FieldStat::finalize(), PLearn::BasisSelectionRegressor::findBestCandidateFunction(), findSmallestEigenPairOfSymmMat(), PLearn::StackedFocusedAutoassociatorsNet::fineTuningStep(), PLearn::SharpeRatioStatsIterator::finish(), PLearn::StderrStatsIterator::finish(), PLearn::StddevStatsIterator::finish(), fixedAnglesFromRotation(), PLearn::RBMSparse1DMatrixConnection::forget(), PLearn::RBMQLParameters::forget(), PLearn::RBMMatrixConnection::forget(), PLearn::RBMLQParameters::forget(), PLearn::RBMLLParameters::forget(), PLearn::RBMGenericParameters::forget(), PLearn::RBMDiagonalMatrixConnection::forget(), PLearn::RBMConv2DLLParameters::forget(), PLearn::RBMConv2DConnection::forget(), PLearn::NxProfileLearner::forget(), PLearn::NatGradSMPNNet::forget(), PLearn::NatGradNNet::forget(), PLearn::mNNet::forget(), PLearn::LinearFilterModule::forget(), PLearn::SquareRootVariable::fprop(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::HeterogenuousAffineTransformWeightPenalty::fprop(), PLearn::Cov2CorrVariable::fprop(), PLearn::AffineTransformWeightPenalty::fprop(), PLearn::NatGradSMPNNet::fpropNet(), PLearn::NatGradNNet::fpropNet(), gamdev(), gaussian_01(), GDFindSmallEigenPairs(), PLearn::GaussianDistribution::generate(), PLearn::GaussMix::generateFromGaussian(), PLearn::TransformationLearner::generatorBuild(), PLearn::LocallyMagnifiedDistribution::getActualNComputationNeighbors(), PLearn::LocallyMagnifiedDistribution::getActualNWidthNeighbors(), PLearn::VecStatsCollector::getCovariance(), PLearn::JoinVMatrix::getNewRow(), PLearn::VecStatsCollector::getStdDev(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::TangentLearner::initializeParams(), PLearn::StructuralLearner::initializeParams(), PLearn::NonLocalManifoldParzen::initializeParams(), PLearn::GaussianContinuumDistribution::initializeParams(), PLearn::GaussianContinuum::initializeParams(), PLearn::DeepNNet::initializeParams(), PLearn::BallTreeNearestNeighbors::intersect(), jacobi(), kernelPCAfromDotProducts(), KS_test(), PLearn::mNNet::l1regularizeOutputs(), PLearn::LocallyMagnifiedDistribution::log_density(), main(), PLearn::TransformationLearner::mainLearnerBuild(), PLearn::GaussianContinuumDistribution::make_random_walk(), PLearn::GaussianContinuum::make_random_walk(), maxPointMotion(), metricMultiDimensionalScaling(), PLearn::ConjGradientOptimizer::minimizeLineSearch(), multivariate_normal(), PLearn::PvGradNNet::neuronDiscountGrad(), norm(), PLearn::NatGradSMPNNet::onlineStep(), PLearn::NatGradNNet::onlineStep(), PLearn::NatGradEstimator::operator()(), p_value(), paired_t_test(), PLearn::SequentialModelSelector::paired_t_test(), PLearn::TMatTest::perform(), PLearn::PLMathTest::perform(), poidev(), PLearn::RegressionTreeLeave::printStats(), PLearn::PvGradNNet::pvGrad(), randomRotation(), PLearn::PCA::reconstruct(), PLearn::TMat< T >::resizePreserve(), PLearn::VMatLanguage::run(), PLearn::FieldConvertCommand::run(), PLearn::VMatrix::saveCMAT(), PLearn::GaussianProcessRegressor::setInput(), PLearn::DiagonalNormalRandomVariable::setValueFromParentsValue(), PLearn::BallTreeNearestNeighbors::smallestContainer(), sqrt(), squareroot(), PLearn::VMFieldStat::stddev(), PLearn::StatsCollector::stddev(), PLearn::StatsCollector::stderror(), PLearn::ErfVariable::symbolicBprop(), testNoCorrelationAsymptotically(), PLearn::ImputationVMatrix::testResultantVMatrix(), PLearn::WPLS::train(), PLearn::StructuralLearner::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::GaussianProcessRegressor::train(), PLearn::GaussianContinuum::train(), PLearn::EntropyContrast::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::AdaBoost::train(), PLearn::RegressionTreeLeave::uniqTarget(), vmatmain(), weighted_distance(), and weightedRidgeRegressionByGCV().

{ TVec<T> dest(src.length()); compute_sqrt(src,dest); return dest; }

Here is the call graph for this function:

Var PLearn::sqrt ( Var  v) [inline]

Definition at line 80 of file PowVariable.h.

References pow().

{ return pow(v,0.5); }

Here is the call graph for this function:

Var PLearn::square ( Var  v) [inline]

Definition at line 82 of file SquareVariable.h.

{ return new SquareVariable(v); }
template<class T >
TVec<T> PLearn::square ( const TVec< T > &  vec)

Definition at line 1792 of file TMat_maths_impl.h.

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

{
    int n = vec.length();
    TVec<T> result(n);
    square(result,vec);
    return result;
}

Here is the call graph for this function:

template<class T >
void PLearn::square ( TVec< T > &  result,
const TVec< T > &  vec 
)

Definition at line 1801 of file TMat_maths_impl.h.

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

{
#ifdef BOUNDCHECK
    if (result.size() != vec.size())
        PLERROR("In square, 'result' and 'vec' must have the same size");
#endif
    int n = vec.length();
    if (n > 0) {
        T* v = vec.data();
        T* r = result.data();
        for(int i=0; i<n; i++)
            r[i] = v[i]*v[i];
    }
}

Here is the call graph for this function:

template<class T >
T PLearn::square ( const T &  x) [inline]

Definition at line 266 of file pl_math.h.

References x.

Referenced by autocorrelation_function(), PLearn::WeightedLogGaussian::bprop(), PLearn::TanhVariable::bprop(), PLearn::ShuntingNNetLayerModule::bpropUpdate(), PLearn::NonLocalManifoldParzen::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::GaussianKernel::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::NNet::buildPenalties(), PLearn::EntropyContrast::compute_df_dx(), PLearn::EntropyContrast::compute_extra_grad_wrt_df_dx(), PLearn::MoleculeTemplateLearner::compute_S_mean_std(), computeBasicStats(), computeConditionalMeans(), PLearn::MovingAverage::computeCostsFromOutputs(), PLearn::HintonDeepBeliefNet::computeCostsFromOutputs(), PLearn::GaussPartSupervisedDBN::computeCostsFromOutputs(), PLearn::GaussianDBNRegression::computeCostsFromOutputs(), PLearn::BasisSelectionRegressor::computeCostsFromOutputs(), PLearn::GaussMix::computeLogLikelihood(), PLearn::PDistribution::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::PvGradNNet::discountGrad(), PLearn::SquaredErrorCostFunction::evaluate(), PLearn::ScaledGaussianKernel::evaluate(), PLearn::GeodesicDistanceKernel::evaluate(), PLearn::GeodesicDistanceKernel::evaluate_i_j(), PLearn::GeodesicDistanceKernel::evaluate_i_x_again(), PLearn::GeodesicDistanceKernel::evaluate_i_x_from_distances(), PLearn::FieldStat::finalize(), PLearn::BasisSelectionRegressor::findBestCandidateFunction(), PLearn::WeightedLogGaussian::fprop(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::OneHotSquaredLoss::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), PLearn::MatrixOneHotSquaredLoss::fprop(), PLearn::GaussMix::generateFromGaussian(), PLearn::NeuralProbabilisticLanguageModel::gradient_transfer_func(), PLearn::FeatureSetSequentialCRF::gradient_transfer_func(), PLearn::FeatureSetNNet::gradient_transfer_func(), PLearn::BasisSelectionRegressor::initTargetsResidueWeight(), PLearn::NonLocalManifoldParzen::log_density(), PLearn::LocallyMagnifiedDistribution::log_density(), log_fullGaussianRBF(), logOfCompactGaussian(), PLearn::DiagonalNormalRandomVariable::logP(), PLearn::PvGradNNet::neuronDiscountGrad(), PLearn::DiverseComponentAnalysis::nonlinear_transform(), norm(), PLearn::PDistribution::outputsize(), PLearn::TMatTest::perform(), PLearn::PLMathTest::perform(), pownorm(), PLearn::GaussMix::precomputeGaussianLogCoefficient(), PLearn::BasisSelectionRegressor::recomputeResidue(), PLearn::TMat< T >::resizePreserve(), PLearn::TanhVariable::rfprop(), PLearn::FieldConvertCommand::run(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), PLearn::GaussMix::setPredictor(), PLearn::GaussMix::setPredictorPredictedSizes_const(), square(), squareElements(), sumsquare(), PLearn::TanhVariable::symbolicBprop(), PLearn::ErfVariable::symbolicBprop(), PLearn::DivVariable::symbolicBprop(), PLearn::EntropyContrast::train(), PLearn::ConditionalStatsCollector::update(), PLearn::EntropyContrast::update_mu_sigma_f(), PLearn::VMFieldStat::variance(), and PLearn::StatsCollector::variance().

{ return x*x; }
template<class T >
TMat<T> PLearn::square ( const TMat< T > &  m)

Definition at line 7028 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, square(), w, and PLearn::TMat< T >::width().

{
    TMat<T> res(m.length(), m.width());
    int w=m.width();
    for(int i=0; i<m.length(); i++)
        for(int j=0; j<w; j++)
            res(i,j) = square(m(i,j));
    return res;
}

Here is the call graph for this function:

real PLearn::square_f ( real  x)

Definition at line 185 of file pl_math.cc.

References x.

Referenced by PLearn::LocalMedBoost::computeCostsFromOutputs(), PLearn::DiagonalNormalRandomVariable::EMBprop(), and PLearn::HeterogenuousAffineTransformWeightPenalty::fprop().

{ return x*x; }

Here is the caller graph for this function:

template<class T >
void PLearn::squareAcc ( const TVec< T > &  vec,
const TVec< T > &  x 
)

TVec[i] += x[i]*x[i];.

Definition at line 2738 of file TMat_maths_impl.h.

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

Referenced by PLearn::MatTPlusSumSquaredVec< MatT >::diag().

{
    int n=x.length();
    if (vec.length()!=n)
        PLERROR("TVec::squareAcc this has length_=%d and x has length_=%d", vec.length(),n);
    T* p=vec.data();
    T* xp=x.data();
    for (int i=0;i<n;i++)
    {
        T xpi = xp[i];
        p[i] += xpi * xpi;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

CostFunc PLearn::squared_classification_error ( real  hot_value = 0.8,
real  cold_value = 0.2 
) [inline]

Definition at line 88 of file SquaredErrorCostFunction.h.

{
    return new SquaredErrorCostFunction(hot_value, cold_value);
}
CostFunc PLearn::squared_error ( int  singleoutputindex) [inline]

Definition at line 92 of file SquaredErrorCostFunction.cc.

Referenced by PLearn::LinearRegressor::train().

{ 
    if(singleoutputindex>=0)
        return new SelectedOutputCostFunction(new SquaredErrorCostFunction(),singleoutputindex); 
    else
        return new SquaredErrorCostFunction();
}

Here is the caller graph for this function:

template<class T >
void PLearn::squareElements ( const TMat< T > &  m)

squares the elements of m in place

Definition at line 278 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::compact_begin(), PLearn::TMat< T >::compact_end(), PLearn::TMat< T >::end(), PLearn::TMat< T >::isCompact(), PLearn::TMat< T >::size(), and square().

{
    if (m.size()==0)
        return;
    if(m.isCompact()) {
        typename TMat<T>::compact_iterator it = m.compact_begin();
        typename TMat<T>::compact_iterator itend = m.compact_end();
        for(; it != itend; ++it)
            *it = square(*it);
    } else {
        typename TMat<T>::iterator it = m.begin();
        typename TMat<T>::iterator itend = m.end();
        for(; it != itend; ++it)
            *it = square(*it);
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::squareElements ( const TVec< T > &  x)

squares the elements of x in place

Definition at line 263 of file TMat_maths_impl.h.

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

Referenced by PLearn::ShuntingNNetLayerModule::bpropUpdate(), and PLearn::ShuntingNNetLayerModule::fprop().

{
    if (x.length() == 0)
        return;
    T* ptr = x.data();
    int l = x.length();
    while(l--)
    {
        *ptr *= *ptr;
        ++ptr;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::squareMultiplyAcc ( const TMat< T > &  mat,
const TMat< T > &  x,
scale 
)

Definition at line 4666 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::length(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=x.length()*x.width();
    if (mat.length()*mat.width()!=n)
        PLERROR("squareMultiplyAcc this has size=%d and x has size=%d",
                mat.width()*mat.length(),n);
    T* p=mat.data();
    T* xp=x.data();
    for (int i=0;i<n;i++)
    {
        T xpi = xp[i];
        p[i] += scale * xpi * xpi;
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::squareMultiplyAcc ( const TVec< T > &  vec,
const TVec< T > &  x,
scale 
)

TVec[i] += x[i]*x[i]*scale;.

Definition at line 2722 of file TMat_maths_impl.h.

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

Referenced by PLearn::DiagonalNormalRandomVariable::EMBprop().

{
    int n=x.length();
    if (vec.length()!=n)
        PLERROR("TVec::squareMultiplyAcc this has length_=%d and x has length_=%d", vec.length(),n);
    T* p=vec.data();
    T* xp=x.data();
    for (int i=0;i<n;i++)
    {
        T xpi = xp[i];
        p[i] += scale * xpi * xpi;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::squareProductAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 3767 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::TransposeProductVariable::bbprop().

{
#ifdef BOUNDCHECK
    if (m1.width()!=m2.length() || mat.length()!=m1.length() || mat.width()!=m2.width())
        PLERROR("squareProductAcc(Mat,Mat), incompatible arguments %dx%d= %dx%d times %dx%d",
                mat.length(),mat.width(),m1.length(),m1.width(), m2.length(),m2.width());
#endif
    int n=m1.length();
    int m=m1.width();
    int l=m2.width();
    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            T* m2kj = m2.data()+j;
            for (int k=0;k<m;k++,m2kj+=m2.mod())
            {
                T m1ik=m1i[k];
                s += m1ik*m1ik * (*m2kj);
            }
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::squareProductTranspose ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 3990 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if (m1.width()!=m2.width() || mat.length()!=m1.length() || mat.width()!=m2.length())
        PLERROR("squareProductTranspose(Mat,Mat), incompatible arguments %dx%d= %dx%d times %dx%d'",
                mat.length(),mat.width(),m1.length(),m1.width(), m2.length(),m2.width());
#endif
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
            {
                T m1ik=m1i[k];
                s += m1ik*m1ik * m2j[k];
            }
            mi[j] = s;
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::squareProductTransposeAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 4160 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), m, n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::TransposeProductVariable::bbprop().

{
#ifdef BOUNDCHECK
    if (m1.width()!=m2.width() || mat.length()!=m1.length() || mat.width()!=m2.length())
        PLERROR("squareProductTransposeAcc(Mat,Mat), incompatible arguments %dx%d= %dx%d times %dx%d'",
                mat.length(),mat.width(),m1.length(),m1.width(), m2.length(),m2.width());
#endif
    int n=m1.length();
    int m=m1.width();
    int l=m2.length();
    for (int i=0;i<n;i++)
    {
        const T* m1i = m1[i];
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            for (int k=0;k<m;k++)
            {
                T m1ik=m1i[k];
                s += m1ik*m1ik * m2j[k];
            }
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::squareroot ( Var  v) [inline]

Definition at line 73 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
template<class T >
TVec<T> PLearn::squareroot ( const TVec< T > &  vec)

Definition at line 1817 of file TMat_maths_impl.h.

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

Referenced by PLearn::ScoreLayerVariable::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::DiverseComponentAnalysis::nonlinear_transform(), and PLearn::TMatTest::perform().

{
    int n = vec.length();
    TVec<T> result(n);
    if (n > 0) {
        T* v = vec.data();
        T* r = result.data();
        for(int i=0; i<n; i++)
        r[i] = sqrt(v[i]);
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::squareSubtract ( const TVec< T > &  vec,
const TVec< T > &  x 
)

Tvec[i] -= x[i]*x[i];.

Definition at line 2754 of file TMat_maths_impl.h.

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

Referenced by PLearn::SharpeRatioStatsIterator::finish(), and PLearn::StderrStatsIterator::finish().

{
    int n=x.length();
    if (vec.length()!=n)
        PLERROR("TVec::squareDiff this has length_=%d and x has length_=%d", vec.length(),n);
    T* p=vec.data();
    T* xp=x.data();
    for (int i=0;i<n;i++)
    {
        T xpi = xp[i];
        p[i] -= xpi * xpi;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::ssaupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short   
)

Referenced by eigenSparseSymmMat().

Here is the caller graph for this function:

int PLearn::sseupd_ ( FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
float *  ,
const char *  ,
FORTRAN_Integer *  ,
const char *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
float *  ,
float *  ,
FORTRAN_Integer *  ,
FORTRAN_Integer *  ,
short  ,
short  ,
short   
)

Referenced by eigenSparseSymmMat().

Here is the caller graph for this function:

void PLearn::ssyev_ ( char *  JOBZ,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  W,
float *  WORK,
int LWORK,
int INFO 
)

Referenced by eigen_SymmMat().

Here is the caller graph for this function:

void PLearn::ssyevr_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  VL,
float *  VU,
int IL,
int IU,
float *  ABSTOL,
int M,
float *  W,
float *  Z,
int LDZ,
int ISUPPZ,
float *  WORK,
int LWORK,
int IWORK,
int LIWORK,
int INFO 
)

Referenced by lapack_Xsyevr_().

Here is the caller graph for this function:

void PLearn::ssyevx_ ( char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  VL,
float *  VU,
int IL,
int IU,
float *  ABSTOL,
int M,
float *  W,
float *  Z,
int LDZ,
float *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
)

Referenced by lapack_Xsyevx_().

Here is the caller graph for this function:

void PLearn::ssygvx_ ( int ITYPE,
char *  JOBZ,
char *  RANGE,
char *  UPLO,
int N,
float *  A,
int LDA,
float *  B,
int LDB,
float *  VL,
float *  VU,
int IL,
int IU,
float *  ABSTOL,
int M,
float *  W,
float *  Z,
int LDZ,
float *  WORK,
int LWORK,
int IWORK,
int IFAIL,
int INFO 
)

Referenced by lapack_Xsygvx_().

Here is the caller graph for this function:

Var PLearn::stable_cross_entropy ( Var  linear_output,
Var  target,
bool  ignore_missing = false 
) [inline]

Definition at line 89 of file NegCrossEntropySigmoidVariable.h.

Referenced by PLearn::LinearInductiveTransferClassifier::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::DeepFeatureExtractorNNet::buildCosts(), and PLearn::NNet::getCost().

{
    return new NegCrossEntropySigmoidVariable(linear_output, target, 0, ignore_missing);
}

Here is the caller graph for this function:

bool PLearn::startsWith ( const string &  str,
const string &  s 
)

Definition at line 92 of file PPath.cc.

{
    if ( s.length() > str.length() )
        return false;
    return str.substr(0, s.length()) == s;
}
bool PLearn::startsWith ( const string &  str,
const char &  c 
)

Definition at line 78 of file PPath.cc.

References c.

Referenced by PLearn::PPath::canonical(), extractFiles(), PLearn::PPath::isabs(), PLearn::WordNetOntology::load(), main(), and PLearn::PPath::PPath().

{
    if (str.empty())
        return false;
    return str[0] == c;
}

Here is the caller graph for this function:

bool PLearn::startsWith ( string &  base,
string  s 
)

Definition at line 2924 of file WordNetOntology.cc.

References i.

{
    if (base.size() < s.size()) return false;
    for (unsigned int i = 0; i < s.size(); i++)
        if (base[i] != s[i]) return false;
    return true;
}
StatsIt PLearn::stddev_stats ( ) [inline]

Definition at line 429 of file StatsIterator.h.

{ return new StddevStatsIterator(); }
StatsIt PLearn::stderr_stats ( ) [inline]

Definition at line 430 of file StatsIterator.h.

Referenced by PLearn::Learner::Learner().

{ return new StderrStatsIterator(); }

Here is the caller graph for this function:

void PLearn::stemsOfWord ( string  word,
TVec< string > &  stems 
)

Lists the possible stemmed variation of a word using its POS.

Definition at line 223 of file WordNetSenseDictionary.cc.

References cstr(), PLearn::TVec< T >::push_back(), removeblanks(), PLearn::TVec< T >::resize(), and tostring().

{
    stems.resize(0);
    stems.push_back(word);
    char* input_word = cstr(word);

    char* lemma = morphstr(input_word, NOUN);
    string lemma_str;
    while(lemma)
    {
        lemma_str = removeblanks(tostring(lemma));
        if(lemma_str != word)
            stems.push_back(lemma_str);
        lemma = morphstr(NULL, NOUN);
    }

    lemma = morphstr(input_word, VERB);
    while(lemma)
    {
        lemma_str = removeblanks(tostring(lemma));
        if(lemma_str != word)
            stems.push_back(lemma_str);
        lemma = morphstr(NULL, VERB);
    }

    lemma = morphstr(input_word, ADJ);
    while(lemma)
    {
        lemma_str = removeblanks(tostring(lemma));
        if(lemma_str != word)
            stems.push_back(lemma_str);
        lemma = morphstr(NULL, ADJ);
    }

    lemma = morphstr(input_word, ADV);
    while(lemma)
    {
        lemma_str = removeblanks(tostring(lemma));
        if(lemma_str != word)
            stems.push_back(lemma_str);
        lemma = morphstr(NULL, ADV);
    }

    delete input_word;
}

Here is the call graph for this function:

void PLearn::stemsOfWord ( string  word,
int  wn_pos,
TVec< string > &  stems 
)

Lists the possible stemmed variation of a word.

Definition at line 206 of file WordNetSenseDictionary.cc.

References cstr(), PLearn::TVec< T >::push_back(), removeblanks(), PLearn::TVec< T >::resize(), and tostring().

Referenced by PLearn::WordNetFeatureSet::getNewFeaturesString(), and PLearn::WordNetSenseDictionary::getSensesFromWordNet().

{
    stems.resize(0);
    stems.push_back(word);
    char* input_word = cstr(word);
    char* lemma = morphstr(input_word, wn_pos);
    string lemma_str;
    while(lemma)
    {
        lemma_str = removeblanks(tostring(lemma));
        if(lemma_str != word)
            stems.push_back(lemma_str);
        lemma = morphstr(NULL, wn_pos);
    }
    delete input_word;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::stemWord ( string  word,
int  wn_pos 
)

Stems a word, according to a POS.

Definition at line 195 of file WordNetSenseDictionary.cc.

References cstr(), removeblanks(), and tostring().

{
    char* input_word = cstr(word);
    char* lemma = morphword(input_word, wn_pos);
    delete input_word;
    if (lemma == NULL)
        return word;
    else
        return removeblanks(tostring(lemma));
}

Here is the call graph for this function:

string PLearn::stemWord ( string &  word,
int  wn_pos 
)

Definition at line 2894 of file WordNetOntology.cc.

References cstr().

{
    //char* input_word = const_cast<char*>(word.c_str());
    char* input_word = cstr(word);
    char* lemma = morphword(input_word, wn_pos);
    if (lemma == NULL)
        return word;
    else
        return string(lemma);
}

Here is the call graph for this function:

string PLearn::stemWord ( string  word)

Stems a word.

Definition at line 173 of file WordNetSenseDictionary.cc.

References cstr(), removeblanks(), and tostring().

Referenced by PLearn::WordNetOntology::extractWord(), PLearn::LemmatizeVMatrix::getLemma(), PLearn::WordNetOntology::isInWordNet(), main(), and PLearn::TextSenseSequenceVMatrix::permute().

{
    char* input_word = cstr(word);
    char* lemma = morphword(input_word, NOUN);
    if (lemma == NULL)
    {
        lemma = morphword(input_word, VERB);
        if (lemma == NULL)
        {
            lemma = morphword(input_word, ADJ);
            if (lemma == NULL)
            {
                lemma = morphword(input_word, ADV);
            }
        }
    }
 
    delete input_word;
    if (lemma == NULL) return word;
    else return removeblanks(tostring(lemma));
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::stemWord ( string &  word)

Definition at line 2867 of file WordNetOntology.cc.

References cstr().

{
    //char* input_word = const_cast<char*>(word.c_str());
    char* input_word = cstr(word);
    char* lemma = morphword(input_word, NOUN);
    if (lemma == NULL)
    {
        lemma = morphword(input_word, VERB);
        if (lemma == NULL)
        {
            lemma = morphword(input_word, ADJ);
            if (lemma == NULL)
            {
                lemma = morphword(input_word, ADV);
            }
        }
    } 
    if (lemma == NULL)
    {
        return word;
    } else
    {
        //cout << word << " -> " << lemma << endl;
        return string(lemma);
    }
}

Here is the call graph for this function:

char * PLearn::strcopy ( char *  s)

make a copy of a C string and return it

Definition at line 73 of file general.cc.

References strlen().

{
    if (!s) return 0;
    char* ss=new char[strlen(s)+1];
    strcpy(ss,s);
    return ss;
}

Here is the call graph for this function:

bool PLearn::string_begins_with ( const string &  s,
const string &  beginning 
) [inline]
bool PLearn::string_ends_with ( const string &  s,
const string &  end 
) [inline]

Return true iff string 's' ends with string 'end'.

Definition at line 148 of file stringutils.h.

References m, and n.

Referenced by PLearn::LayerCostModule::build_(), PLearn::PLStringutilsTest::perform(), and split_quoted_delimiter().

{
    string::size_type n = end.size();
    string::size_type m = s.size();
    return (m >= n  &&  end == s.substr(m-n, n) );
}

Here is the caller graph for this function:

char* PLearn::stringPos ( const char *  s,
const char *  strings[] 
)

Definition at line 93 of file TypesNumeriques.cc.

References i.

Referenced by compactRepresentationTranslate().

{
    char *t = 0;
    int  i=0;
    while (!t && strings[i])
    {
        t = strstr(s,strings[i]);
        i++;
    }
    return t;
}

Here is the caller graph for this function:

vector< string > PLearn::stringvector ( int  argc,
char **  argv 
)

makes a C++ style vector of strings from a C style vectr of strings Note: this may be useful in conjunction with get_option.

Definition at line 653 of file stringutils.cc.

References i.

Referenced by old_plearn_main(), PLearn::PyPLearnScript::openScriptFile(), and plearn_main().

{
    if(argc>0)
    {
        vector<string> result(argc);
        for(int i=0; i<argc; i++)
            result[i] = string(argv[i]);
        return result;
    }
    else
        return vector<string>();
}

Here is the caller graph for this function:

static int PLearn::strlen ( char *  s) [static]
real PLearn::student_t_cdf ( real  t,
int  nb_degrees_of_freedom 
)

returns the incomplete beta function B_z(x,y)

Student-t cumulative distribution function

Definition at line 150 of file random.cc.

References incomplete_beta(), and PLERROR.

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

{
    real p_t = 0.5*incomplete_beta(nb_degrees_of_freedom/(nb_degrees_of_freedom+t*t),0.5*nb_degrees_of_freedom,0.5);
    //real p_t = 0.5*incbet(0.5*nb_degrees_of_freedom,0.5,nb_degrees_of_freedom/(nb_degrees_of_freedom+t*t));
#ifdef BOUNDCHECK
    if (p_t < 0) {
        PLERROR("Bug in incomplete_beta : returned a negative p_t !\n- p_t = %f\n- degrees of freedom = %d\n- t = %f",
                p_t, nb_degrees_of_freedom, t);
    }
#endif
    if (t>0)
        return 1.0 - p_t;
    else
        return p_t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::subMat ( Var  v,
int  i,
int  j,
int  l,
int  w 
) [inline]
Var PLearn::subsample ( Var  input,
int  subsample_factor 
) [inline]

Definition at line 81 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
template<class T >
void PLearn::subsample ( TMat< T >  m,
int  thesubsamplefactor,
TMat< T >  result 
)

Definition at line 7098 of file TMat_maths_impl.h.

References c, i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), norm(), sum(), and PLearn::TMat< T >::width().

Referenced by PLearn::SubsampleVariable::fprop().

{
    T sum;
    int norm = thesubsamplefactor * thesubsamplefactor;
    for(int i=0; i<result.length(); i++)
        for(int j=0; j<result.width(); j++)
        {
            T* mptr = m[thesubsamplefactor*i]+thesubsamplefactor*j;
            sum = 0.0;
            for(int l=0; l<thesubsamplefactor; l++, mptr += m.mod())
                for(int c=0; c<thesubsamplefactor; c++)
                    sum += mptr[c];
            result(i,j) = sum/norm;
        }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::substract ( const TVec< T > &  source1,
source2,
TVec< T > &  destination 
) [inline]

Definition at line 2035 of file TMat_maths_impl.h.

References add().

Referenced by PLearn::ProjectionErrorVariable::bprop(), PLearn::VBoundDBN2::bpropAccUpdate(), PLearn::RBMWoodsLayer::bpropNLL(), PLearn::RBMRateLayer::bpropNLL(), PLearn::RBMMultinomialLayer::bpropNLL(), PLearn::RBMLocalMultinomialLayer::bpropNLL(), PLearn::RBMLateralBinomialLayer::bpropNLL(), PLearn::RBMGaussianLayer::bpropNLL(), PLearn::RBMBinomialLayer::bpropNLL(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::ManifoldParzen::computeOutput(), PLearn::GaussianContinuum::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::DiagonalNormalRandomVariable::EMBprop(), PLearn::MinusRandomVariable::EMBprop(), PLearn::PlusRandomVariable::EMBprop(), PLearn::DiagonalNormalRandomVariable::EMUpdate(), PLearn::NatGradSMPNNet::fbpropLoss(), PLearn::NatGradNNet::fbpropLoss(), PLearn::mNNet::fbpropLoss(), PLearn::StackedFocusedAutoassociatorsNet::fineTuningStep(), PLearn::DeepNonLocalManifoldParzen::fineTuningStep(), PLearn::VBoundDBN2::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::NllGeneralGaussianVariable::fprop(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::RandomNeighborsDifferencesVMatrix::getNewRow(), PLearn::LocalNeighborsDifferencesVMatrix::getNewRow(), PLearn::StackedFocusedAutoassociatorsNet::greedyStep(), PLearn::NonLocalManifoldParzen::log_density(), PLearn::ManifoldKNNDistribution::log_density(), PLearn::GaussianContinuumDistribution::log_density(), log_fullGaussianRBF(), logOfNormal(), operator-(), PLearn::IncrementalNNet::output_loss_gradient(), and PLearn::DeepNNet::train().

{ add(source1,-source2,destination); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::substract ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2040 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("substract: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] = s1[i]-s2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::substract ( source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2078 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, and PLearn::TVec< T >::resize().

{
  int n=source2.length();
  if (n!=destination.length())
    destination.resize(n);
  if (n > 0) {
      T* s2=source2.data();
      T* d=destination.data();
      for (int i=0;i<n;i++)
          d[i] = source1-s2[i];
  }
}

Here is the call graph for this function:

template<class T >
void PLearn::substract ( const TMat< T > &  m1,
const TMat< T > &  m2,
TMat< T > &  destination 
)

Definition at line 5964 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(m1.width()!=m2.width() || m1.length()!=m2.length()
       || m1.width()!=destination.width() || m1.length()!=destination.length())
        PLERROR("IN substract(m1(%d,%d), m2(%d,%d), dest(%d,%d)): args must have same dimensions",
                m1.length(),m1.width(),m2.length(),m2.width(),destination.length(),
                destination.width());
#endif
    T* m1_i = m1.data();
    T* m2_i = m2.data();
    T* d_i = destination.data();
    int m1_mod = m1.mod();
    int m2_mod = m2.mod();
    int d_mod = destination.mod();
    int w = m1.width();
    for (int i=0;i<m1.length();i++,m1_i+=m1_mod,m2_i+=m2_mod,d_i+=d_mod)
        for (int j=0;j<w;j++)
            d_i[j] = m1_i[j] - m2_i[j];
}

Here is the call graph for this function:

template<class T >
void PLearn::substractAcc ( const TVec< T > &  source1,
const TVec< T > &  source2,
TVec< T > &  destination 
)

Definition at line 2059 of file TMat_maths_impl.h.

References d, PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), n, PLERROR, and PLearn::TVec< T >::resize().

{
    int n=source1.length();
    if (n!=source2.length())
        PLERROR("substract: two sources (l=%d and %d) must have same length",
                n,source2.length());
    if (n!=destination.length())
        destination.resize(n);
    if (n > 0) {
        T* s1=source1.data();
        T* s2=source2.data();
        T* d=destination.data();
        for (int i=0;i<n;i++)
            d[i] += s1[i]-s2[i];
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::substractFromColumns ( const TMat< T > &  mat,
const TVec< T >  col,
bool  ignored 
)

Definition at line 4904 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T* row_i=mat.data();
    int w=mat.width();
    for (int i=0;i<mat.length();i++)
    {
        T col_i=col[i];
        for (int j=0;j<w;j++)
            row_i[j] -= col_i;
        row_i+=mat.mod();
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::substractFromRows ( const TMat< T > &  mat,
const TVec< T >  row,
bool  ignored 
)

Definition at line 4891 of file TMat_maths_impl.h.

References i, and PLearn::TMat< T >::length().

Referenced by PLearn::ManifoldParzen::train().

{
    for (int i=0;i<mat.length();i++)
    {
        TVec<T> row_i = mat(i);
        row_i -= row;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::sum ( Var  v) [inline]

Definition at line 79 of file SumVariable.h.

{ 
    if (v->isScalar())
        return v;
    else
        return new SumVariable(v); 
}
template<class T >
T PLearn::sum ( const TMat< T > &  mat,
bool  ignore_missing 
)

Sum of elements of a matrix, which handles missing values.

Should only be called with T = double or float.

Definition at line 4928 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, is_missing(), j, PLearn::TMat< T >::length(), MISSING_VALUE, PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    double res = 0.0;
    T* m_i = mat.data();
    int w=mat.width();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
    {
        for(int j=0; j<w; j++)
        {
            if (!is_missing(m_i[j])) res += m_i[j];
            else if (!ignore_missing) return MISSING_VALUE;
        }
    }
    return T(res);
}

Here is the call graph for this function:

template<class T >
T PLearn::sum ( const TMat< T > &  mat)

Sum of elements of a matrix, which assumes all elements are non-missing (will return NAN if T = float or double and there is a missing value).

Definition at line 4947 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

{
    T res = T(0);
    T* m_i = mat.data();
    int w=mat.width();

    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
            res += m_i[j];
    return res;
}

Here is the call graph for this function:

template<class T >
T PLearn::sum ( const TVec< T > &  vec,
bool  ignore_missing 
)

Sum of elements of a vector, which handles missing values.

Should only be called with T = double or float.

Definition at line 403 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, is_missing(), PLearn::TVec< T >::length(), MISSING_VALUE, and PLearn::TVec< T >::size().

Referenced by PLearn::LogSoftmaxVariable::bprop(), PLearn::Convolution2DModule::bpropAccUpdate(), PLearn::MultiMaxVariable::bpropHardMaxValue(), PLearn::MultiMaxVariable::bpropLogSoftMax(), PLearn::Supersampling2DModule::bpropUpdate(), PLearn::Subsampling2DModule::bpropUpdate(), PLearn::Convolution2DModule::bpropUpdate(), PLearn::BackConvolution2DModule::bpropUpdate(), PLearn::TextSenseSequenceVMatrix::build_(), PLearn::StackedSVDNet::build_(), PLearn::SplitModule::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::RandomGaussMix::build_(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiMaxVariable::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::MixtureVMatrix::build_(), PLearn::MixtureDistribution::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::KNNVMatrix::build_(), PLearn::GeneralizedOneHotVMatrix::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::NNet::buildCosts(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::TargetEncodingLearner::buildEncodingsFromTrainset(), PLearn::MissingIndicatorVMatrix::buildNewRecordFormat(), PLearn::DistRepNNet::buildPenalties(), PLearn::StructuralLearner::buildThetaParameters(), PLearn::DistRepNNet::buildVarGraph(), PLearn::HistogramDistribution::calc_density_from_survival(), calcTransformation4(), PLearn::GraphicalBiText::check_consitency(), PLearn::ComplementedProbSparseMatrix::checkCondProbIntegrity(), PLearn::SmoothedProbSparseMatrix::checkCondProbIntegrity(), PLearn::ProbSparseMatrix::checkCondProbIntegrity(), choleskyDecomposition(), choleskyInvert(), choleskyLeftSolve(), choleskyRightSolve(), choleskySolve(), PLearn::EntropyContrast::compute_extra_grad_wrt_df_dx(), PLearn::GraphicalBiText::compute_likelihood(), PLearn::DivisiveNormalizationKernel::computeAverage(), PLearn::AdditiveNormalizationKernel::computeAverage(), computeConditionalMeans(), PLearn::MultiInstanceNNet::computeCostsFromOutputs(), PLearn::KFoldLogisticClassifier::computeCostsFromOutputs(), PLearn::LiftStatsCollector::computeLift(), PLearn::LiftStatsCollector::computeLiftMax(), PLearn::KPCATangentLearner::computeOutput(), PLearn::AdaBoost::computeOutput_(), PLearn::RBMModule::computePartitionFunction(), PLearn::Test_PP::conversionOPchildA(), convolve(), convolve2D(), PLearn::TransformationLearner::dirichlet_sample(), PLearn::MixtureRandomVariable::ElogP(), PLearn::MixtureRandomVariable::EMBprop(), PLearn::MultinomialRandomVariable::EMUpdate(), PLearn::MixtureRandomVariable::EMUpdate(), entropy(), PLearn::Kernel::estimateHistograms(), PLearn::RowMapSparseValueMatrix< T >::euclidianDistance(), PLearn::RowMapSparseMatrix< real >::euclidianDistance(), PLearn::NegLogProbCostFunction::evaluate(), PLearn::ReconstructionWeightsKernel::evaluate_sum_k_i_k_j(), PLearn::HistogramDistribution::expectation(), PLearn::LiftStatsCollector::finalize(), PLearn::StackedSVDNet::fineTuningStep(), PLearn::LiftStatsIterator::finish(), PLearn::SumVariable::fprop(), PLearn::SoftmaxLossVariable::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NLLCostModule::fprop(), PLearn::MatrixSoftmaxLossVariable::fprop(), PLearn::LogSoftSoftMaxVariable::fprop(), PLearn::DotProductVariable::fprop(), PLearn::RBMMultinomialLayer::fpropNLL(), PLearn::RBMLocalMultinomialLayer::fpropNLL(), PLearn::JoinVMatrix::getNewRow(), PLearn::WordNetSenseDictionary::getSensesFromWordNet(), PLearn::StackedSVDNet::greedyStep(), PLearn::NeuralProbabilisticLanguageModel::importance_sampling_gradient_update(), PLearn::DistRepNNet::initializeParams(), PLearn::TransformationLearner::isWellDefined(), PLearn::StatsCollector::lift(), loadATT800(), PLearn::UniformDistribution::log_density(), logadd(), PLearn::DiagonalNormalRandomVariable::logP(), makeRowsSumTo1(), mean(), PLearn::StatsCollector::mean(), PLearn::StatsCollector::mean_lift(), PLearn::StatsCollectorCounts::merge(), PLearn::TransformationLearner::MStepNoiseVarianceMAP(), PLearn::RowMapSparseMatrix< real >::multiplyVecs(), norm(), normalizeColumns(), normalizeRows(), PLearn::GaussMixLocalProjections::outputsize(), PLearn::TMatTest::perform(), PLearn::TextSenseSequenceVMatrix::permute(), pl_gser(), pownorm(), PLearn::StatsCollector::prbp(), PLearn::ReconstructionWeightsKernel::reconstruct(), PLearn::DenoisingRecurrentNet::recurrentFprop(), PLearn::GeneralizedOneHotVMatrix::reset_dimensions(), PLearn::SumVariable::rfprop(), PLearn::SoftmaxLossVariable::rfprop(), PLearn::OneHotSquaredLoss::rfprop(), PLearn::DotProductVariable::rfprop(), rosenbrock(), rowSum(), rowSumAcc(), PLearn::EntropyContrast::set_NNcontinuous_gradient(), PLearn::AdditiveNormalizationKernel::setDataForKernelMatrix(), PLearn::StackedFocusedAutoassociatorsNet::setTrainingSet(), softmax(), subsample(), PLearn::DoubleAccessSparseMatrix< T >::sumCol(), PLearn::ProbabilitySparseMatrix::sumOfElements(), PLearn::DoubleAccessSparseMatrix< T >::sumOfElements(), PLearn::DoubleAccessSparseMatrix< T >::sumRow(), PLearn::StatsCollector::sumsquare(), PLearn::PlusScalarVariable::symbolicBprop(), PLearn::MinusScalarVariable::symbolicBprop(), PLearn::DuplicateScalarVariable::symbolicBprop(), PLearn::DynamicallyLinkedRBMsModel::test(), PLearn::NGramDistribution::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::GaussMix::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::AutoLinearRegressor::train(), PLearn::AdaBoost::train(), PLearn::ToBagClassifier::updateCostAndBagOutput(), PLearn::HistogramDistribution::variance(), vmatmain(), weighted_variance(), weightedRidgeRegressionByGCV(), and PLearn::PRandom::weightedShuffleElements().

{
    double res = 0.0;
    if (vec.size() == 0)
        return res;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
    {
        if (!is_missing(v[i])) res += v[i];
        else if (!ignore_missing) return MISSING_VALUE;
    }
    return T(res);
}

Here is the call graph for this function:

template<class T >
T PLearn::sum ( const TVec< T > &  vec)

Sum of elements of a vector, which assumes all elements are non-missing (will return NAN if T = float or double and there is a missing value).

Definition at line 420 of file TMat_maths_impl.h.

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

{
    T res = T(0);
    if (vec.size() == 0)
        return res;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
        res += v[i];
    return res;
}

Here is the call graph for this function:

template<class T >
T PLearn::sum_of_log ( const TVec< T > &  vec)

Returns the sum of the log of the elements (this is also the log of the product of the elements but is more stable if you have very small elements).

Definition at line 435 of file TMat_maths_impl.h.

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

Referenced by PLearn::TMatTest::perform().

{
    double res = 0.0;
    if (vec.size() == 0)
        return res;
    T* v = vec.data();
    for(int i=0; i<vec.length(); i++)
        res += pl_log(v[i]);
    return T(res);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::sum_of_squares ( const TMat< T > &  mat)

Definition at line 4973 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), w, and PLearn::TMat< T >::width().

Referenced by columnSumOfSquares().

{
    double res = 0.0;
    T* m_i = mat.data();
    int w=mat.width();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<w; j++)
        {
            T v = m_i[j];
            res += v*v;
        }
    return T(res);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::sumabs ( Var  v) [inline]

Definition at line 73 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
template<class T >
T PLearn::sumabs ( const TMat< T > &  m)

returns the sum of absolute value of the elements

Definition at line 326 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::compact_begin(), PLearn::TMat< T >::compact_end(), PLearn::TMat< T >::end(), PLearn::TMat< T >::isCompact(), and PLearn::TMat< T >::size().

{
    if (m.size()==0)
        return T(0);
    if(m.isCompact())
    {
        typename TMat<T>::compact_iterator it = m.compact_begin();
        typename TMat<T>::compact_iterator itend = m.compact_end();
        T res = fabs(*it);
        ++it;
        for(; it!=itend; ++it)
            res += fabs(*it);
        return res;
    }
    else
    {
        typename TMat<T>::iterator it = m.begin();
        typename TMat<T>::iterator itend = m.end();
        T res = fabs(*it);
        ++it;
        for(; it!=itend; ++it)
            res += fabs(*it);
        return res;
    }
}

Here is the call graph for this function:

template<class T >
T PLearn::sumabs ( const TVec< T > &  x)

returns the sum of absolute values of elements

Definition at line 249 of file TMat_maths_impl.h.

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

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::NNet::buildPenalties(), PLearn::IncrementalNNet::computeCostsFromOutputs(), PLearn::HeterogenuousAffineTransformWeightPenalty::fprop(), PLearn::AffineTransformWeightPenalty::fprop(), PLearn::NNet::getCost(), PLearn::TMatTest::perform(), PLearn::VMatLanguage::run(), and PLearn::IncrementalNNet::train().

{
    if (x.length() == 0)
        return T(0);
    T* v = x.data();
    T res = (T)(fabs((real)v[0]));
    int l = x.length();
    for(int i=1; i<l; i++)
        res += (T)(fabs((real)v[i]));
    return res;
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::summarizedVecString ( Vec  v,
int  maxn = 16,
string  format = "%2.2g" 
)

Definition at line 316 of file DisplayUtils.cc.

References i, PLearn::TVec< T >::length(), n, and tostring().

Referenced by displayVarGraph().

  {
    string result = "";
    int n = 0;
    char buf[30];
    int nsame = 1;
    string val;
    string prev_val;
    int l = v.length();
    result = tostring(l)+ " [ ";
    int i;
    for(i=0; i<l && n<maxn; i++)
      {
        snprintf(buf,20,format.c_str(),v[i]);
        val = buf;
        if(i==0)
          prev_val = val;
        else if(val==prev_val)
          { nsame++; }
        else 
          {
            result += prev_val;
            if(nsame>1)
              result += (string("*")+tostring(nsame));
            result += " ";
            n++;
            nsame = 1;
          }
        prev_val = val;
      }

    if(l>0)
      {
        result += prev_val;
        if(nsame>1)
          result += (string("*")+tostring(nsame));
      }
    if(i<l)
      result += " ...]";
    else
      result += " ]";
    return result;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::sumOf ( Var  output,
const VarArray &  inputs,
VMat  distr,
int  nsamples = -1,
VarArray  parameters = VarArray(),
bool  the_do_sizeprop = false 
) [inline]

deprecated old version do not use!

Definition at line 168 of file SumOfVariable.h.

References PLearn::VMat::length(), and sumOf().

{ 
    if(nsamples<0) nsamples = distr.length();
    return sumOf(distr,Func(inputs,output),nsamples,the_do_sizeprop); 
}

Here is the call graph for this function:

Var PLearn::sumOf ( VMat  distr,
Func  f,
int  nsamples,
int  input_size 
) [inline]

Definition at line 97 of file MatrixSumOfVariable.h.

Referenced by PLearn::DeepReconstructorNet::prepareForFineTuning(), sumOf(), PLearn::DeepReconstructorNet::trainHiddenLayer(), and PLearn::DeepReconstructorNet::trainSupervisedLayer().

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }

Here is the caller graph for this function:

Var PLearn::sumOf ( VMat  distr,
Func  f,
int  nsamples = -1,
bool  the_do_sizeprop = false 
) [inline]

sumOf

Definition at line 161 of file SumOfVariable.h.

References PLearn::VMat::length().

{ 
    if(nsamples<0) nsamples = distr.length();
    return new SumOfVariable(distr,f,nsamples,the_do_sizeprop); 
}

Here is the call graph for this function:

Var PLearn::sumOverBags ( VMat  vmat,
Func  f,
int  max_bag_size,
int  nsamples,
bool  average = false,
bool  transpose = false 
) [inline]

sumOf

Definition at line 124 of file SumOverBagsVariable.h.

References transpose().

Referenced by PLearn::NNet::train(), PLearn::NeighborhoodSmoothnessNNet::train(), and PLearn::MultiInstanceNNet::train().

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::sums2Gaussian ( real  sum_w,
Vec  sum_wx,
Mat  sum_wx2,
Vec  mu,
Mat  cov_evectors,
Vec  cov_evalues,
real  min_variance 
)

Given weighted statistics of order 0, 1 and 2, compute first and second moments of a Gaussian.

0-th order statistic: sum_w = sum_i w_i 1-st order statistic: sum_wx = sum_i w_i x_i 2-nd order statistic: sum_wx2 = sum_i w_i x_i x_i' and put the results in mu = sum_wx / sum_w (cov_evectors, cov_evalues) = eigen-decomposition of cov = sum_wx2 / sum_w - mu mu' with eigenvectors in the ROWS of cov_evectors. eigenvalues are replaced by max(eigenvalues,min_variance).

Definition at line 409 of file distr_maths.cc.

References eigenVecOfSymmMat(), externalProductScaleAcc(), PLearn::TVec< T >::fill(), i, identityMatrix(), PLearn::TVec< T >::length(), and multiply().

{
    if (sum_w>0)
    {
        real normf=1.0/sum_w;
        // mu = sum_x / sum_1
        multiply(sum_wx,normf,mu);
        // sigma = sum_x2 / sum_1  - mu mu'
        multiply(sum_wx2,sum_wx2,normf);
        externalProductScaleAcc(sum_wx2,mu,mu,-1.0);
        // perform eigendecoposition of the covariance matrix
        eigenVecOfSymmMat(sum_wx2,mu.length(),cov_evalues,cov_evectors,false);
    }
    else 
    {
        cov_evalues.fill(1.0);
        identityMatrix(cov_evectors);
    }
    for (int i=0;i<cov_evalues.length();i++)
        if (cov_evalues[i]<min_variance)
            cov_evalues[i]=min_variance;
}

Here is the call graph for this function:

Var PLearn::sumsquare ( Var  v) [inline]

Definition at line 73 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
template<class T >
T PLearn::sumsquare ( const TMat< T > &  m)

returns the sum of squared elements

Definition at line 297 of file TMat_maths_impl.h.

References PLearn::TMat< T >::begin(), PLearn::TMat< T >::compact_begin(), PLearn::TMat< T >::compact_end(), PLearn::TMat< T >::end(), PLearn::TMat< T >::isCompact(), PLearn::TMat< T >::size(), and square().

{
    if (m.size()==0)
        return T(0);
    if(m.isCompact())
    {
        typename TMat<T>::compact_iterator it = m.compact_begin();
        typename TMat<T>::compact_iterator itend = m.compact_end();
        T res = square(*it);
        ++it;
        for(; it!=itend; ++it)
            res += square(*it);
        return res;
    }
    else
    {
        typename TMat<T>::iterator it = m.begin();
        typename TMat<T>::iterator itend = m.end();
        T res = square(*it);
        ++it;
        for(; it!=itend; ++it)
            res += square(*it);
        return res;
    }
}

Here is the call graph for this function:

template<class T >
T PLearn::sumsquare ( const TVec< T > &  x)
template<class num_t >
void PLearn::SVD ( const TMat< num_t > &  A,
TMat< num_t > &  U,
TVec< num_t > &  S,
TMat< num_t > &  Vt,
char  JOBZ = 'A',
real  safeguard = 1 
) [inline]

Performs the SVD decomposition A = U.S.Vt Where U and Vt are orthonormal matrices.

A is an MxN matrix whose content is destroyed by the call.

S in the above formula is also an MxN matrix, with only its first min(M,N) diagonal elements are non-zero. The call fills a vector S with those elements: the singular values, in decreasing order.

JOBZ has the following meaning:

'A': all M columns of U and all N rows of Vt are returned in the arrays U and VT;

'S': the first min(M,N) columns of U and the first min(M,N) rows of Vt are returned in the arrays U and Vt;

'O': If M >= N, the first N columns of U are overwritten on the array A and all rows of Vt are returned in the array VT; otherwise, all columns of U are returned in the array U and the first M rows of Vt are overwritten in the array VT; = 'N': no columns of U or rows of Vt are computed.

'N': compute only the singular values (U and V are not computed)

The optional value 'safeguard' may be used with a value > 1 if there is a crash in the SVD (typically, saying that parameter 12 has an illegal value).

Relationships between SVD(A) and eigendecomposition of At.A and A.At -> square(singular values) = eigenvalues -> columns of V (rows of Vt) are the eigenvectors of At.A -> columns of U are the eigenvectors of A.At

Definition at line 556 of file plapack.h.

References PLearn::TMat< T >::hasMissing(), lapackSVD(), and PLASSERT.

Referenced by PLearn::SVDVariable::fprop(), GCV(), ridgeRegressionByGCV(), PLearn::WPLS::train(), PLearn::StackedSVDNet::train(), PLearn::PLS::train(), and weightedRidgeRegressionByGCV().

{
    // A = U.S.Vt -> At = V.S.Ut
    PLASSERT( !A.hasMissing() );
    lapackSVD(A,Vt,S,U,JOBZ, safeguard);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::svd ( Var  v) [inline]

Definition at line 78 of file SVDVariable.h.

Referenced by PLearn::EntropyContrastLearner::build_().

{
    return new SVDVariable(v); }

Here is the caller graph for this function:

template<class T >
void PLearn::swap ( TVec< T > &  a,
TVec< T > &  b 
)

Definition at line 100 of file TVec_impl.h.

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

{ swap_ranges(a.begin(), a.end(), b.begin()); }

Here is the call graph for this function:

template<class T >
void PLearn::swap ( Array< T > &  a1,
Array< T > &  a2 
)

Definition at line 56 of file Array_impl.h.

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

Referenced by PLearn::SmallVector< T, SizeBits, Allocator >::operator=(), selectAndOrder(), PLearn::TVec< PP< RegressionTreeNode > >::swap(), PLearn::TinyVector< T, N, TTrait >::swap(), PLearn::SmallVector< T, SizeBits, Allocator >::swap(), PLearn::ArrayAllocatorTrivial< T, SizeBits >::swap(), PLearn::ArrayAllocatorIndex< index_base, SizeBits >::swap(), and PLearn::ArrayAllocator< T, SizeBits >::swap().

{
    T* a1d = a1.data();
    T* a2d = a2.data();
    T tmp;
#ifdef BOUNDCHECK
    if (a1.size()!=a2.size())
        PLERROR("Array::swap expects two same-size arguments");
#endif
    for(int i=0; i<a1.size(); i++)
    {
        tmp = a1d[i];
        a1d[i]=a2d[i];
        a2d[i]=tmp;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::swap ( TMat< T > &  a,
TMat< T > &  b 
)

Definition at line 748 of file TMat_impl.h.

References PLearn::TMat< T >::begin(), and PLearn::TMat< T >::end().

{ swap_ranges(a.begin(), a.end(), b.begin()); }

Here is the call graph for this function:

template<class T >
void PLearn::swapRows ( const TMat< T > &  mat,
int  i,
int  j 
)

Swap rows i and j in matrix 'mat'.

It is specialized for real numbers in TMat_maths_specialisation.h, in order to use the corresponding BLAS function.

Definition at line 4706 of file TMat_maths_impl.h.

References PLearn::TMat< T >::swapRows().

Referenced by chol_dxch_tr(), and PLearn::TMat< pair< real, real > >::swapUpsideDown().

{
    if (i == j)
        return;
    mat.swapRows(i, j);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class MatT >
int PLearn::SymmMatNullSpaceByInversePowerIteration ( MatT &  A,
Mat  solutions,
Vec  normsAx,
Vec  xAx,
real  error_tolerance = 1e-3,
real  improvement_tolerance = 1e-4,
int  max_n_cg_iter = 0,
int  max_n_power_iter = 0,
bool  verbose = false 
)

Try to find the null space of a symmetric semi-definite positive generic nxn matrix A, based on the inverse power iteration. The algorithm looks for the m smallest-magnitude eigen-pairs of A. The iterations to find a null space vector x stop when |A x| < error_tolerance, or when x'Ax does not improve (decrease) by a fraction more than improvement_tolerance. This method uses an inverse power iteration, which iterates at most max_n_power_iter times through the solution of a linear system by conjugate gradients (which itself takes at most max_n_cg_iter iterations). If the values of max_n_cg_iter or max_n_power_iter are left to the default of 0, then a value is automatically chosen. The function sets the results in the mxn matrix 'solutions' (an orthormal basis for the resulting sub-space), and sets normsAx[i] = |A x_i| and xAX[i] = x_i'A x_i for each row x_i of the solutions matrix (i=0 to m-1). It is possible that the algorithm finds less than m solutions: in that case they lie in the first rows of the solutions matrix; the number of obtained solutions is returned.

check x'Ax and norm of |Ax|

Definition at line 745 of file GenMat.h.

References dot(), endl(), PLearn::TVec< T >::fill(), fill_random_uniform(), findSmallestEigenPairOfSymmMat(), GramSchmidtOrthogonalization(), i, PLearn::TVec< T >::length(), MIN, multiply(), norm(), pl_log, pow(), PowerIteration(), product(), PLearn::TMat< T >::resize(), PLearn::MatTPlusSumSquaredVec< MatT >::squaredVecAcc(), and PLearn::TMat< T >::subMatRows().

{  
    int n=A.length();
    int n_soln=normsAx.length();
    solutions.resize(n_soln,n);
    if (max_n_cg_iter==0)
        max_n_cg_iter = 5+int(pow(double(n),0.3));
    if (max_n_power_iter==0)
        max_n_power_iter = 5+int(pl_log(n));
    Vec Ax(n);

    MatTPlusSumSquaredVec<MatT> B(A,n_soln);
    Vec sy(n);
    fill_random_uniform(sy);
    Mat largest_evecs(3,n);
    int offs;
    int n_iter = MIN(max_n_power_iter,20);
    real largest_evalue = PowerIteration(A, sy, n_iter ,1e-3,
                                         largest_evecs, offs,verbose);
    if (verbose)
        cout << "largest evalue(B) = " << largest_evalue << endl;
    for (int i=0;i<n_soln;i++)
    {
        Vec y = solutions(i);
        if (i==0)
            y.fill(1);
        else
            fill_random_uniform(y,0.1,0.5);
        real residue=findSmallestEigenPairOfSymmMat(B, y, 
                                                    error_tolerance,
                                                    improvement_tolerance,
                                                    max_n_cg_iter,
                                                    max_n_power_iter,verbose);
        if (verbose)
        {
            cout << "found vector with |B y| = " << residue << endl;
            cout << "|y| = " << norm(y) << endl;
            product(A, y,Ax);
            cout << "****** |A y| = " << norm(Ax) << endl;
        }
        multiply(y,largest_evalue,sy);
        B.squaredVecAcc(sy);
    }

    int n_s=GramSchmidtOrthogonalization(solutions);
    solutions = solutions.subMatRows(0,n_s);
    if (n_s<n_soln && verbose)
        cout << "found only " << n_s << " independent solutions out of " 
             << n_soln << " requested" << endl;
    for (int i=0;i<n_s;i++)
    {
        Vec xi = solutions(i);
        product(A, xi,Ax);
        real err = dot(xi,Ax);
        real normAx = norm(Ax);
        normsAx[i]=normAx;
        xAx[i]=err;
        if (verbose)
            cout << "for " << i << "-th solution x: x'Ax = " << err << ", |Ax|/|x|= "
                 << normAx << endl;
    }
    return n_s;
}

Here is the call graph for this function:

real PLearn::tabulated_soft_slope ( real  x,
real  smoothness = 1,
real  left = 0,
real  right = 1 
) [inline]

Definition at line 538 of file pl_math.h.

References fast_exact_is_equal(), hard_slope(), left(), right(), and tabulated_softplus().

Referenced by PLearn::SoftSlopeVariable::bprop(), PLearn::SoftSlopeVariable::fprop(), and PLearn::PLMathTest::perform().

{
    if (fast_exact_is_equal(smoothness, 0))
        return 0.5;
    if (smoothness>1000)
        return hard_slope(x,left,right);
    return 1 + (tabulated_softplus(-smoothness*(x-left))-tabulated_softplus(-smoothness*(x-right)))/(smoothness*(right-left));
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::tabulated_soft_slope_integral ( real  smoothness,
real  left,
real  right,
real  a,
real  b 
)

Definition at line 311 of file pl_math.cc.

References a, fast_exact_is_equal(), hard_slope_integral(), and tabulated_softplus_primitive().

Referenced by PLearn::SoftSlopeIntegralVariable::fprop(), and PLearn::PLMathTest::perform().

{
    if (fast_exact_is_equal(smoothness, 0))
        return 0.5*(b-a);
    if (smoothness<100)
        return 
            (b - a) + (tabulated_softplus_primitive(-smoothness*(b-right)) - tabulated_softplus_primitive(-smoothness*(b-left))
                       -tabulated_softplus_primitive(-smoothness*(a-right)) + tabulated_softplus_primitive(-smoothness*(a-left)))/
            (smoothness*smoothness*(right-left));
    // else do the integral of the hard slope function
    return hard_slope_integral(left,right,a,b);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::tabulated_softplus ( real  x) [inline]

Definition at line 474 of file pl_math.h.

References i, softplus(), and x.

Referenced by PLearn::SoftSlopeIntegralVariable::bprop(), PLearn::KLp0p1RBMModule::computeFreeEnergyOfHidden(), PLearn::KLp0p1RBMModule::computeFreeEnergyOfVisible(), PLearn::ShuntingNNetLayerModule::fprop(), PLearn::RBMBinomialLayer::fpropNLL(), PLearn::RBMWoodsLayer::fpropNLL(), PLearn::RBMRateLayer::fpropNLL(), PLearn::RBMBinomialLayer::freeEnergyContribution(), PLearn::RBMRateLayer::freeEnergyContribution(), PLearn::PLMathTest::perform(), tabulated_soft_slope(), PLearn::InferenceRBM::targetExpGivenInput(), and PLearn::PseudolikelihoodRBM::train().

{
    static const int n_softplus_values = 1000000;
    static const real min_softplus_arg = -10;
    static const real max_softplus_arg = 10;
    static const real softplus_delta = (n_softplus_values-1)/(max_softplus_arg-min_softplus_arg);
    static real softplus_values[n_softplus_values];
    static bool computed_softplus_table = false;
    if (isnan(x)) return x; // softplus(nan)=nan
    int is_inf=isinf(x);
    if (is_inf>0) return x; // softplus(inf)=inf
    if (is_inf<0) return 0; // softplus(-inf)=0
    if (!computed_softplus_table)
    {
        real y=min_softplus_arg;
        real dy=1.0/softplus_delta;
        for (int i=0;i<n_softplus_values;i++,y+=dy)
            softplus_values[i] = softplus(y);
        computed_softplus_table=true;
    }
    if (x<min_softplus_arg) return 0;
    if (x>max_softplus_arg) return x;
    int bin = int(rint((x-min_softplus_arg)*softplus_delta));
    return softplus_values[bin];
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::tabulated_softplus_primitive ( real  x)

Definition at line 136 of file pl_math.cc.

References i, and softplus_primitive().

Referenced by PLearn::PLMathTest::perform(), and tabulated_soft_slope_integral().

                                          {
    static const int n_softplus_primitive_values = 10000;
    static const real min_softplus_primitive_arg = -20;
    static const real max_softplus_primitive_arg = 10;
    static const real max_offset = max_softplus_primitive_arg*max_softplus_primitive_arg*0.5;
    static const real softplus_primitive_delta = (n_softplus_primitive_values-1)/(max_softplus_primitive_arg-min_softplus_primitive_arg);
    static real softplus_primitive_values[n_softplus_primitive_values];
    static bool computed_softplus_primitive_table = false;
    if (!computed_softplus_primitive_table)
    {
        real y=min_softplus_primitive_arg;
        real dy=1.0/softplus_primitive_delta;
        for (int i=0;i<n_softplus_primitive_values;i++,y+=dy)
            softplus_primitive_values[i] = softplus_primitive(y);
        computed_softplus_primitive_table=true;
    }
    if (x<min_softplus_primitive_arg) return 0;
    if (x>max_softplus_primitive_arg) return softplus_primitive_values[n_softplus_primitive_values-1]+x*x*0.5 - max_offset;
    int bin = int(rint((x-min_softplus_primitive_arg)*softplus_primitive_delta));
    return softplus_primitive_values[bin];
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::tagVariables ( VarArray  vars,
string  tag 
)

Definition at line 797 of file DisplayUtils.cc.

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

Referenced by displayFunction().

{
  for(int i=0; i<vars.length(); i++)
    {
      string name = vars[i]->getName();
      vars[i]->setName(tag+":"+name);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::tanh ( Var  v) [inline]

Definition at line 75 of file TanhVariable.h.

{ return new TanhVariable(v); }
template<class T >
void PLearn::tanh ( const TVec< T > &  x,
TVec< T > &  y 
)

Definition at line 2208 of file TMat_maths_impl.h.

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

{
    int n = x.length();
#ifdef BOUNDCHECK
    if (y.length()!=n)
        PLERROR("tanh(TVec<T>,TVec<T>), second argument of length %d, first of length %d, should be =",
                n,y.length());
#endif
    if (n>0)
    {
        T* yp = y.data();
        T* xp = x.data();
        for (int i=0;i<n;i++)
            yp[i] = tanh(xp[i]);
    }
}

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::tanh ( const TVec< T > &  src) [inline]

Definition at line 1403 of file TMat_maths_impl.h.

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

Referenced by PLearn::DistRepNNet::add_transfer_func(), PLearn::NNet::applyTransferFunc(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::GaussianContinuum::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::TangentLearner::build_(), PLearn::NeuralNet::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::EntropyContrast::compute_df_dx(), compute_tanh(), PLearn::RBMBinomialLayer::computeExpectations(), PLearn::IncrementalNNet::computeOutput(), PLearn::StructuralLearner::computeOutputWithFeatures(), PLearn::TanhVariable::fprop(), PLearn::LocalizedFeaturesLayerVariable::fprop(), PLearn::RBMBinomialLayer::fprop(), PLearn::TanhModule::fprop(), PLearn::DeepNNet::fprop(), PLearn::NatGradSMPNNet::fpropNet(), PLearn::NatGradNNet::fpropNet(), PLearn::RBMBinomialLayer::freeEnergyContributionGradient(), PLearn::DeepFeatureExtractorNNet::hiddenLayer(), PLearn::NNet::hiddenLayer(), main(), PLearn::DiverseComponentAnalysis::nonlinear_transform(), PLearn::TMatTest::perform(), PLearn::PLMathTest::perform(), PLearn::PLMathInitializer::PLMathInitializer(), PLearn::EntropyContrast::set_NNcontinuous_gradient(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), sigmoid(), tanh(), and PLearn::IncrementalNNet::train().

{ TVec<T> dest(src.length()); compute_tanh(src,dest); return dest; }

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::temporalThreshold ( VMat  distr,
int  threshold_date,
bool  is_before,
int  yyyy_col,
int  mm_col,
int  dd_col 
)

Definition at line 316 of file VMat_operations.cc.

References i, PLearn::VMat::length(), and PLearn::VMat::rows().

{
    Vec indices(distr->length());
    int n_data = 0;
    for (int i=0; i<distr->length(); i++)
    {
        int reference_date = 10000*(int)distr(i, yyyy_col) + 100*(int)distr(i, mm_col) + (int)distr(i, dd_col);
        if (is_before ? reference_date<=threshold_date : reference_date>=threshold_date)
            indices[n_data++] = i;
    }
    indices.resize(n_data);

    return distr.rows(indices);
}

Here is the call graph for this function:

VMat PLearn::temporalThreshold ( VMat  distr,
int  threshold_date,
bool  is_before,
int  yyyymmdd_col 
)

This VMat is a SelectRowsVMatrix which, given a threshold date, keep only the rows earlier (or later) than this date. The thresdold date is given as a YYYYMMDD date, and the date on the original VMatrix are kept on 1 column (YYYYMMDD) or 3 (YYYY, MM and DD).

Definition at line 300 of file VMat_operations.cc.

References i, PLearn::VMat::length(), and PLearn::VMat::rows().

{
    Vec indices(distr->length());
    int n_data = 0;
    for (int i=0; i<distr->length(); i++)
    {
        int reference_date = (int)distr(i, yyyymmdd_col);
        if (is_before ? reference_date<=threshold_date : reference_date>=threshold_date)
            indices[n_data++] = i;
    }
    indices.resize(n_data);

    return distr.rows(indices);
}

Here is the call graph for this function:

static void PLearn::test ( const char *  test_name,
const int  actual,
const int  expected 
) [static]

Complains if the actual and expected char parameters are not equal.

Definition at line 156 of file PStreamBufTest.cc.

References char_string(), and endl().

{
    if (actual != expected)
        std::cout << test_name << ": expected " << char_string(expected)
                  << ", got " << char_string(actual) << "" << std::endl;
}

Here is the call graph for this function:

void PLearn::test ( const char *  test_name,
const std::string  actual,
const std::string  expected 
)

Complains if the actual and expected string parameters are not equal.

Definition at line 135 of file PStreamBufTest.cc.

References endl().

Referenced by PLearn::NetworkModule::build_(), PLearn::IfThenElseVariable::fprop(), loadCorelDatamat(), test_negchar(), test_read(), test_write(), and test_write_unbuffered().

{
    if (actual != expected)
        std::cout << test_name << ": expected '" << expected
                  << "', got '" << actual << "'" << std::endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::test_negchar ( )

Definition at line 296 of file PStreamBufTest.cc.

References openString(), PLearn::PStream::raw_ascii, PLearn::PStream::setBufferCapacities(), test(), and PLearn::PStream::write().

Referenced by PLearn::PStreamBufTest::perform().

{
    std::string str;
    PLearn::PStream s = PLearn::openString(str, PLearn::PStream::raw_ascii, "w");

    const unsigned int inbuf_size = 6;
    const unsigned int outbuf_size = 0;
    const unsigned int ungetbuf_size = 4;
    s.setBufferCapacities(inbuf_size, outbuf_size, ungetbuf_size);

    s.write("\xff");
    test("Write a single 'negative' character", str, "\xff");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::test_read ( )

Definition at line 163 of file PStreamBufTest.cc.

References PLearn::PStream::get(), PLearn::PStream::good(), openString(), PLearn::PStream::peek(), PLearn::PStream::plearn_ascii, PLearn::PStream::putback(), PLearn::PStream::raw_ascii, PLearn::PStream::read(), PLearn::PStream::setBufferCapacities(), test(), and PLearn::PStream::unread().

Referenced by PLearn::PStreamBufTest::perform().

                 {
    const std::string str = "abcdefghijklmnopqrstuvwxyz";
    PLearn::PStream s = PLearn::openString(str, PLearn::PStream::raw_ascii);

    const unsigned int inbuf_size = 6;
    const unsigned int outbuf_size = 5;
    const unsigned int ungetbuf_size = 4;
    s.setBufferCapacities(inbuf_size, outbuf_size, ungetbuf_size);

    test("Read a single char", s.get(), 'a');

    std::string temp;
  
    s.read(temp, 2);
    test("Read a couple of chars", temp, "bc");

    s.read(temp, inbuf_size - 2);
    test("Read enough to force a buffer refill", temp, "defg");

    s.read(temp, inbuf_size);
    test("Read a whole inbuf_size", temp, "hijklm");

    s.read(temp, inbuf_size + 2);
    test("Read a whole inbuf_size, and then some", temp, "nopqrstu");

    test("Peek", s.peek(), 'v');

    //test("Conversion to bool, not on EOF", bool(s), 1);//DEPRECATED
    test("stream.good(), not on EOF", s.good(), 1);
  
    s.putback('U');
    test("Putback of a single char", s.get(), 'U');

    s.unread("RSTu");
    s.read(temp, 5);
    test("Unread of 4 chars", temp, "RSTuv");

    s.read(temp, 4);
    test("Read rest of string", temp, "wxyz");

    test("EOF", s.get(), EOF);

    s.read(temp, 10);
    test("EOF, reading into a string", temp, "");

    //test("Conversion to bool on EOF", bool(s), 0);//DEPRECATED
    test("stream.good() on EOF", s.good(), 0);
  
    test("EOF, second time", s.get(), EOF);

    s.unread("1234");
    s.read(temp, 8);
    test("Unread after EOF", temp, "1234");

    // Test bug fixed in r8087 when reading a quoted string whose last
    // character is also the last quote.
    string quoted_str("\"123\"");
    s = PLearn::openString(quoted_str, PLearn::PStream::plearn_ascii);
    s >> temp;
    test("EOF at end of quoted string", s.peek(), EOF);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::test_write ( )

Definition at line 226 of file PStreamBufTest.cc.

References PLearn::PStream::flush(), openString(), PLearn::PStream::put(), PLearn::PStream::raw_ascii, PLearn::PStream::setBufferCapacities(), test(), and PLearn::PStream::write().

Referenced by PLearn::PStreamBufTest::perform().

{
    std::string str;
    PLearn::PStream s = PLearn::openString(str, PLearn::PStream::raw_ascii, "a");

    const unsigned int inbuf_size = 6;
    const unsigned int outbuf_size = 5;
    const unsigned int ungetbuf_size = 4;
    s.setBufferCapacities(inbuf_size, outbuf_size, ungetbuf_size);

    s.put('a');
    test("Write a single char", str, "");

    s.write("bcd");
    test("Write a couple of chars", str, "");

    s.write("ef");
    test("Write to overflow the outbuf", str, "abcde");

    s.flush();
    test("Flush", str, "abcdef");

    s.write("ghijk");
    test("Write a outbuf size chunk", str, "abcdef");

    s.flush();
    test("Flush of full buffer", str, "abcdefghijk");

    s.write("lmnopqrs");
    test("Write more than outbuf size", str, "abcdefghijklmnop");

    s.write("tuvwxyzABCDE");
    test("Write more than two outbuf size", str, "abcdefghijklmnopqrstuvwxyzABCDE");

    s.flush();
    test("Flush on empty buffer", str, "abcdefghijklmnopqrstuvwxyzABCDE");

    s.write("FGHIJK");
    test("Write outbuf size plus one", str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJ");

    s.flush();
    test("Another flush", str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK");

    s.write("LMNOP");
    test("Fill up the buffer...", str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJK");

    s.put('Q');
    test("... and put a single char", str, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::test_write_unbuffered ( )

Definition at line 276 of file PStreamBufTest.cc.

References PLearn::PStream::flush(), openString(), PLearn::PStream::raw_ascii, PLearn::PStream::setBufferCapacities(), test(), and PLearn::PStream::write().

Referenced by PLearn::PStreamBufTest::perform().

{
    std::string str;
    PLearn::PStream s = PLearn::openString(str, PLearn::PStream::raw_ascii, "w");

    const unsigned int inbuf_size = 6;
    const unsigned int outbuf_size = 0;
    const unsigned int ungetbuf_size = 4;
    s.setBufferCapacities(inbuf_size, outbuf_size, ungetbuf_size);

    s.write("abc");
    test("Write a short string (unbuffered)", str, "abc");

    s.write("defghijklm");
    test("Write a longer string (unbuffered)", str, "abcdefghijklm");

    s.flush();
    test("Flush (unbuffered)", str, "abcdefghijklm");  
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::testCholeskyRoutines ( )

Definition at line 371 of file Cholesky_utils.cc.

References choleskyDecomposition(), choleskyInsertBasis(), choleskyUpgrade(), PLearn::TMat< T >::column(), endl(), externalProductAcc(), fill_random_uniform(), identityMatrix(), max(), n, product(), PLearn::TMat< T >::subMat(), PLearn::TMat< T >::subMatColumns(), sumsquare(), PLearn::TMat< T >::toVecCopy(), and transpose().

{
    int n=5,l=10;
    real lambda=0.1;
    Mat Xp(l,n+1);
    Mat X=Xp.subMatColumns(0,n);
    Mat Mp(n+1,n+1);
    Mat M=Mp.subMat(0,0,n,n);
    Mat L(n+1,n+1), testL(n,n), Lp(n+1,n+1), testLp(n+1,n+1);
    L.resize(n,n);
    fill_random_uniform(Xp,-1.,1.);

    identityMatrix(Mp);
    Mp*=lambda;
    choleskyDecomposition(M,testL);
    for (int t=0;t<l;t++)
    {
        //externalProductAcc(M,X(t),X(t));
        externalProductAcc(Mp,Xp(t),Xp(t));
        choleskyUpgrade(testL,X(t));
    }
    choleskyDecomposition(M,L);
    Mat testM(n,n);
    product(testM, L,transpose(L));
    testM -= M;
    real average_error = sumsquare(testM)/(n*n);
    real max_error = max(testM);
    cout << "Cholesky decomposition average error = " << average_error << ", max error = " << max_error << endl;

    // *** test choleskyUpgrade ***
    // compare with the batch method:
    testL -=L;
    average_error = sumsquare(testL)/(n*(n+1)/2);
    max_error = max(testL);
    cout << "average error in choleskyUpgrade for " << l << " upgrades of a " << n << " x " << n << " matrix = " << average_error <<  ", max error = " << max_error << endl;

    // *** test choleskyInsertBasis ***
    Mat bases_outputs = transpose(X);
    choleskyInsertBasis(L,bases_outputs, Xp.column(n).toVecCopy(), lambda, 1e-10);
    // compare with the batch method:
    choleskyDecomposition(Mp,testLp);
    testLp -=L;
    average_error = sumsquare(testLp)/((n+1)*(n+2)/2);
    max_error = max(testLp);
    cout << "average error in choleskyInsertBasis = " << average_error <<  ", max error = " << max_error << endl;
}

Here is the call graph for this function:

real PLearn::testNoCorrelationAsymptotically ( real  r,
int  n 
)

Return P(|R|>|r|) two-sided p-value for the null-hypothesis that there is no monotonic dependency, with r the observed Spearman Rank correlation between two paired samples of length n.

Return P(|R|>|r|) two-sided p-value for the null-hypothesis that there is no monotonic dependency, with r the observed correlation between two paired samples of length n.

The p-value is computed by taking advantage of the fact that under the null hypothesis r*sqrt(n-1) converges to a Normal(0,1), if n is LARGE ENOUGH (approx. > 30).

The p-value is computed by taking advantage of the fact that under the null hypothesis (true corr=0), r*sqrt(n-1) converges to a Normal(0,1), if n is LARGE ENOUGH.

Definition at line 151 of file stats_utils.cc.

References gauss_01_cum(), and sqrt().

Referenced by correlations(), and testSpearmanRankCorrelation().

{
    real fz = fabs(r)*sqrt(n-1.0);
    return (1-gauss_01_cum(fz)) + gauss_01_cum(-fz);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::testSpearmanRankCorrelation ( const VMat &  x,
const VMat &  y,
Mat &  r,
Mat &  pvalues,
bool  ignore_missing 
)

same as above but return also in r the rank correlations

Definition at line 163 of file stats_utils.cc.

References i, j, PLearn::TMat< T >::length(), PLearn::VMat::length(), n, PLearn::TMat< T >::resize(), SpearmanRankCorrelation(), testNoCorrelationAsymptotically(), and PLearn::TMat< T >::width().

Referenced by PLearn::TestDependencyCommand::run(), PLearn::TestDependenciesCommand::run(), and testSpearmanRankCorrelationPValues().

{
    int n = x.length();
    TMat<int> n_mat = SpearmanRankCorrelation(x,y,r, ignore_missing);
    pvalues.resize(r.length(),r.width());
    for (int i=0;i<r.length();i++)
        for (int j=0;j<r.width();j++)
            pvalues(i,j) = testNoCorrelationAsymptotically(r(i,j), ignore_missing ? n_mat(i,j) : n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::testSpearmanRankCorrelationPValues ( const VMat &  x,
const VMat &  y,
Mat &  pvalues,
bool  ignore_missing = false 
)

Compute P(|R|>|r|) two-sided p-value for the null-hypothesis that there is no monotonic dependency, with r the observed Spearman Rank correlation between two paired samples x and y of length n (column matrices).

The p-value is computed by taking advantage of the fact that under the null hypothesis r*sqrt(n-1) is Normal(0,1). If x and y have width wx and wy respectively than the statistic is computed for each pair of column (the first taken from x and the second from y) and pvalues will be a symmetric matrix size wx by wy upon return. N.B. If x holds in memory than copying it to a matrix (toMat()) before calling this function will speed up computation significantly. See 'SpearmanRankCorrelation' for the meaning of 'ignore_missing'.

Definition at line 157 of file stats_utils.cc.

References testSpearmanRankCorrelation().

{
    Mat r;
    testSpearmanRankCorrelation(x,y,r,pvalues, ignore_missing);
}

Here is the call graph for this function:

Var PLearn::threshold_bprop ( Var  v,
real  gradient_threshold_factor = 0.0 
) [inline]

copy its argument but block gradient completely or partially

Definition at line 91 of file ThresholdBpropVariable.h.

Referenced by PLearn::GaussianContinuumDistribution::build_(), and PLearn::NonLocalManifoldParzen::build_().

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }

Here is the caller graph for this function:

VMat PLearn::thresholdVMat ( VMat  source,
real  threshold,
real  cold_value = 0.0,
real  hot_value = 1.0,
bool  gt_threshold = true,
bool  call_build_ = false 
) [inline]

Definition at line 89 of file ThresholdVMatrix.h.

{ return new ThresholdVMatrix(source, threshold, cold_value, hot_value,
                              gt_threshold, call_build_); }
Var PLearn::times ( Var  v,
Var  w 
) [inline]

Definition at line 77 of file TimesVariable.h.

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::Profiler::end(), PLearn::AutoRunCommand::run(), and PLearn::Profiler::start().

                               {
    return new TimesVariable(v, w);
}

Here is the caller graph for this function:

Var PLearn::timesConstantScalar2 ( Var  v,
Var  scalar 
) [inline]

Definition at line 76 of file TimesConstantScalarVariable2.h.

                                                   {
    return new TimesConstantScalarVariable2(v, scalar);
}
Var PLearn::timesScalar ( Var  v,
Var  scalar 
) [inline]

Definition at line 83 of file TimesScalarVariable.h.

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_().

                                          {
    return new TimesScalarVariable(v, scalar);
}

Here is the caller graph for this function:

bool PLearn::tobool ( const string &  s)

Definition at line 222 of file lexical_cast.cc.

References PLERROR.

Referenced by PLearn::WordNetOntology::load(), main(), and PLearn::OutputFeaturesCommand::run().

{
    if (s=="true" || s=="1") return true;
    if (s=="false" || s=="0") return false;
    PLERROR("tobool: can't convert string %s into a boolean",s.c_str());
    return false;
}

Here is the caller graph for this function:

double PLearn::todouble ( const RowIterator &  it)

Generic conversions from an iterator.

Definition at line 673 of file SimpleDB.cc.

References PLearn::RowIterator::toDouble().

{
    return it.toDouble();
}

Here is the call graph for this function:

double PLearn::todouble ( const string &  s)

Definition at line 212 of file lexical_cast.cc.

References MISSING_VALUE, and pl_strtod().

Referenced by PLearn::SDBWithStats::computeStats(), PLearn::VerifyGradientCommand::run(), PLearn::SDBVMFieldRemapReals::SDBVMFieldRemapReals(), tofloat(), and universal_compare().

{
    const char* nptr = s.c_str();
    char* endptr;
    double result = pl_strtod(nptr,&endptr);
    if(endptr==nptr) // no character to be read
        result = MISSING_VALUE;
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

float PLearn::tofloat ( const string &  s) [inline]

Definition at line 78 of file lexical_cast.h.

References todouble().

Referenced by PLearn::VMatLanguage::generateCode(), and PLearn::SDBWithStats::loadStats().

{
    return float(todouble(s));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
Object* PLearn::toIndexedObjectPtr ( const TVec< T > &  x,
int  i 
)

Definition at line 208 of file ObjectConversions.h.

References toObjectPtr().

{
    return toObjectPtr(static_cast<T &>(x[i]));
}

Here is the call graph for this function:

template<class T >
Object* PLearn::toIndexedObjectPtr ( const T &  ,
int   
)

Definition at line 214 of file ObjectConversions.h.

References PLERROR.

{
    PLERROR("toIndexedObjectPtr() - Object is not indexable"); return 0;
}
template<class T >
Object* PLearn::toIndexedObjectPtr ( const Array< T > &  x,
int  i 
)

Return the Object* at index i of an Array or TVec.

Produces a PLError if the conversion cannot be done.

Definition at line 202 of file ObjectConversions.h.

References toObjectPtr().

Referenced by PLearn::StaticOption< TVec< VecElementType > >::getIndexedObject(), PLearn::Option< DeallocatorType, self >::getIndexedObject(), and indexable().

{
    return toObjectPtr(static_cast<T &>(x[i]));
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::toint ( const string &  s,
int  base = 10 
) [inline]

Definition at line 83 of file lexical_cast.h.

References tolong().

Referenced by PLearn::LIBSVMSparseVMatrix::build_(), PLearn::AsciiVMatrix::build_(), PLearn::VVMatrix::createPreproVMat(), PLearn::MatlabInterface::eigs_r11(), PLearn::VMatLanguage::generateCode(), PLearn::VVMatrix::generateVMatIndex(), PLearn::VMatrix::getFieldIndex(), PLearn::VecStatsCollector::getFieldNum(), PLearn::WordNetSenseDictionary::getId(), PLearn::ConcatDisjointFeatureSet::getIndexFeature(), getList(), getProcessDataMemory(), PLearn::VMatrix::getSavedFieldInfos(), PLearn::ShellProgressBar::getWcAsciiFileLineCount(), PLearn::WordNetOntology::load(), loadAscii(), loadAsciiSingleBinaryDescriptor(), loadClassificationDataset(), PLearn::WordNetOntology::loadPredominentSyntacticClasses(), PLearn::SDBWithStats::loadStats(), loadUCISet(), main(), matlabR11eigs(), old_plearn_main(), PLearn::HyperSetOption::optimize(), PLearn::HyperOptimize::optimize(), PLearn::OptionBase::optionLevelFromString(), PLearn::Object::parseOptionName(), PLearn::StatSpec::parseStatname(), PLearn::PDate::PDate(), PLearn::PDateTime::PDateTime(), plotVMats(), PLearn::VMatLanguage::preprocess(), readAndMacroProcess(), readHeader(), PLearn::Object::readOptionVal(), PLearn::VerifyGradientCommand::run(), PLearn::TxtmatCommand::run(), PLearn::TestDependencyCommand::run(), PLearn::TestDependenciesCommand::run(), PLearn::Stan::run(), PLearn::ServerCommand::run(), PLearn::LearnerCommand::run(), PLearn::KolmogorovSmirnovCommand::run(), PLearn::JulianDateCommand::run(), PLearn::FillFeatureSetCommand::run(), PLearn::FieldConvertCommand::run(), PLearn::ExtractOptionCommand::run(), PLearn::VMatLanguage::staticPreprocess(), train_and_test(), PLearn::TextFilesVMatrix::transformStringToValue(), PLearn::TxtmatCommand::view(), viewVMat(), PLearn::PL_Log::vlevelFromString(), vmatmain(), and PLearn::Object::writeOptionVal().

{
    return int(tolong(s,base));
}

Here is the call graph for this function:

long PLearn::tolong ( const string &  s,
int  base 
)

conversions from string to numerical types

Definition at line 200 of file lexical_cast.cc.

References PLERROR.

Referenced by PLearn::SquaredExponentialARDKernel::computeGramMatrixDerivative(), PLearn::RationalQuadraticARDKernel::computeGramMatrixDerivative(), PLearn::LinearARDKernel::computeGramMatrixDerivative(), getSynsetPtr(), PLearn::WordNetOntology::load(), PLearn::TVecStaticOption< VecElementType >::readIntoIndex(), PLearn::TVecOption< ObjectType, VecElementType >::readIntoIndex(), toint(), PLearn::TVecStaticOption< VecElementType >::writeAtIndex(), and PLearn::TVecOption< ObjectType, VecElementType >::writeAtIndex().

{
    const char* nptr = s.c_str();
    char* endptr;
    long result = strtol(nptr,&endptr,base);
    if(endptr==nptr) { // no character to be read
        string err = string("in toint string is not an int: ") + s;
        PLERROR(err.c_str());
    }
    return result;
}

Here is the caller graph for this function:

Object* PLearn::toObjectPtr ( const PythonProcessedLearner &  o) [inline]

Definition at line 208 of file PythonProcessedLearner.h.

Object* PLearn::toObjectPtr ( const WeightedDistance &  o) [inline]

Definition at line 83 of file WeightedDistance.h.

Object* PLearn::toObjectPtr ( const TimesConstantVariable &  o) [inline]

Definition at line 87 of file TimesConstantVariable.h.

{ 
Object* PLearn::toObjectPtr ( const SoftmaxVariable &  o) [inline]

Definition at line 72 of file SoftmaxVariable.h.

{
Object* PLearn::toObjectPtr ( const SVMClassificationTorch &  o) [inline]

Definition at line 161 of file SVMClassificationTorch.h.

Object* PLearn::toObjectPtr ( const UnfoldedFuncVariable &  o) [inline]

Definition at line 93 of file UnfoldedFuncVariable.h.

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }
Object* PLearn::toObjectPtr ( const LearnerProcessedVMatrix &  o) [inline]

Definition at line 114 of file LearnerProcessedVMatrix.h.

Object* PLearn::toObjectPtr ( const NLLErrModule &  o) [inline]

Definition at line 140 of file NLLErrModule.h.

Object* PLearn::toObjectPtr ( const RegressionTree &  o) [inline]

Definition at line 133 of file RegressionTree.h.

Object* PLearn::toObjectPtr ( const LemmatizeVMatrix &  o) [inline]

Definition at line 134 of file LemmatizeVMatrix.h.

Object* PLearn::toObjectPtr ( const RBMLateralBinomialLayer &  o) [inline]

Definition at line 302 of file RBMLateralBinomialLayer.h.

Object* PLearn::toObjectPtr ( const ColumnIndexVariable &  o) [inline]

Definition at line 75 of file ColumnIndexVariable.h.

{
Object* PLearn::toObjectPtr ( const LocalMedBoost &  o) [inline]

Definition at line 162 of file LocalMedBoost.h.

Object* PLearn::toObjectPtr ( const TimesScalarVariable &  o) [inline]

Definition at line 81 of file TimesScalarVariable.h.

{
Object* PLearn::toObjectPtr ( const RegressionTreeMulticlassLeave &  o) [inline]

Definition at line 97 of file RegressionTreeMulticlassLeave.h.

Object* PLearn::toObjectPtr ( const ConstantRegressor &  o) [inline]

Definition at line 163 of file ConstantRegressor.h.

Object* PLearn::toObjectPtr ( const ShiftAndRescaleFeatureRealFunction &  o) [inline]

Definition at line 119 of file ShiftAndRescaleFeatureRealFunction.h.

Object* PLearn::toObjectPtr ( const NonLocalManifoldParzen &  o) [inline]

Definition at line 288 of file NonLocalManifoldParzen.h.

Object* PLearn::toObjectPtr ( const LogSoftSoftMaxVariable &  o) [inline]

Definition at line 132 of file LogSoftSoftMaxVariable.h.

Object* PLearn::toObjectPtr ( const TransposedDoubleProductVariable &  o) [inline]

Definition at line 140 of file TransposedDoubleProductVariable.h.

Object* PLearn::toObjectPtr ( const RBMConnection &  o) [inline]

Definition at line 291 of file RBMConnection.h.

Object* PLearn::toObjectPtr ( const RBMQLParameters &  o) [inline]

Definition at line 195 of file RBMQLParameters.h.

Object* PLearn::toObjectPtr ( const NullModule &  o) [inline]

Definition at line 207 of file NullModule.h.

Object* PLearn::toObjectPtr ( const OnlineGramNaturalGradientOptimizer &  o) [inline]

Definition at line 156 of file OnlineGramNaturalGradientOptimizer.h.

Object* PLearn::toObjectPtr ( const VarRowsVariable &  o) [inline]

Definition at line 79 of file VarRowsVariable.h.

Object* PLearn::toObjectPtr ( const LinearInductiveTransferClassifier &  o) [inline]

Definition at line 283 of file LinearInductiveTransferClassifier.h.

Object* PLearn::toObjectPtr ( const StatsCollector &  o) [inline]

Definition at line 400 of file StatsCollector.h.

{
Object* PLearn::toObjectPtr ( const NeighborhoodConditionalMean &  o) [inline]

Definition at line 233 of file NeighborhoodConditionalMean.h.

Object* PLearn::toObjectPtr ( const RemoveRowsVMatrix &  o) [inline]

Definition at line 108 of file RemoveRowsVMatrix.h.

Object* PLearn::toObjectPtr ( const TorchLearner &  o) [inline]

Definition at line 180 of file TorchLearner.h.

Object* PLearn::toObjectPtr ( const ExplicitSplitter &  o) [inline]

Definition at line 114 of file ExplicitSplitter.h.

Object* PLearn::toObjectPtr ( const RBMParameters &  o) [inline]

Definition at line 196 of file RBMParameters.h.

Object* PLearn::toObjectPtr ( const ComputeDond2Target &  o) [inline]

Definition at line 154 of file ComputeDond2Target.h.

Object* PLearn::toObjectPtr ( const ReshapeVariable &  o) [inline]

Definition at line 81 of file ReshapeVariable.h.

{ return new ReshapeVariable(v,newlength,newwidth); }
Object* PLearn::toObjectPtr ( const ValueSelectRowsVMatrix &  o) [inline]

Definition at line 115 of file ValueSelectRowsVMatrix.h.

Object* PLearn::toObjectPtr ( const VarArrayElementVariable &  o) [inline]

Definition at line 77 of file VarArrayElementVariable.h.

Object* PLearn::toObjectPtr ( const ConfRatedAdaboostCostVariable &  o) [inline]

Definition at line 74 of file ConfRatedAdaboostCostVariable.h.

{
Object* PLearn::toObjectPtr ( const OutputVariable &  o) [inline]

Definition at line 78 of file OutputVariable.h.

{
Object* PLearn::toObjectPtr ( const DeepFeatureExtractorNNet &  o) [inline]

Definition at line 340 of file DeepFeatureExtractorNNet.h.

Object* PLearn::toObjectPtr ( const ReconstructionWeightsKernel &  o) [inline]

Definition at line 213 of file ReconstructionWeightsKernel.h.

Object* PLearn::toObjectPtr ( const TransformationLearner &  o) [inline]

Definition at line 917 of file TransformationLearner.h.

Object* PLearn::toObjectPtr ( const NnlmWordRepresentationLayer &  o) [inline]

Definition at line 194 of file NnlmWordRepresentationLayer.h.

Object* PLearn::toObjectPtr ( const PLogPVariable &  o) [inline]

Definition at line 71 of file PLogPVariable.h.

{ return new PLogPVariable(v); }
Object* PLearn::toObjectPtr ( const VPLProcessor &  o) [inline]

Definition at line 177 of file VPLProcessor.h.

Object* PLearn::toObjectPtr ( const StackedLearner &  o) [inline]

Definition at line 221 of file StackedLearner.h.

Object* PLearn::toObjectPtr ( const ObservationWindow &  o) [inline]

Definition at line 143 of file ObservationWindow.h.

Object* PLearn::toObjectPtr ( const SparseVMatrix &  o) [inline]

Definition at line 119 of file SparseVMatrix.h.

Object* PLearn::toObjectPtr ( const EqualVariable &  o) [inline]

Definition at line 76 of file EqualVariable.h.

Object* PLearn::toObjectPtr ( const LiftOutputVariable &  o) [inline]

Definition at line 69 of file LiftOutputVariable.h.

{
Object* PLearn::toObjectPtr ( const WordNetSenseDictionary &  o) [inline]

Definition at line 209 of file WordNetSenseDictionary.h.

Object* PLearn::toObjectPtr ( const PythonCodeSnippet &  o) [inline]

Definition at line 366 of file PythonCodeSnippet.h.

Object* PLearn::toObjectPtr ( const PreprocessingVMatrix &  o) [inline]

Definition at line 198 of file VMatLanguage.h.

:1125)
Object* PLearn::toObjectPtr ( const HardSlopeVariable &  o) [inline]

Definition at line 73 of file HardSlopeVariable.h.

{ return new HardSlopeVariable(x,left,right); }
Object* PLearn::toObjectPtr ( const SVDVariable &  o) [inline]

Definition at line 76 of file SVDVariable.h.

{
Object* PLearn::toObjectPtr ( const ArgminVariable &  o) [inline]

Definition at line 74 of file ArgminVariable.h.

{ return new ArgminVariable(v); }
Object* PLearn::toObjectPtr ( const PrecomputedKernel &  o) [inline]

Definition at line 99 of file PrecomputedKernel.h.

Object* PLearn::toObjectPtr ( const VMatKernel &  o) [inline]

Definition at line 149 of file VMatKernel.h.

Object* PLearn::toObjectPtr ( const GaussianContinuumDistribution &  o) [inline]

Definition at line 279 of file GaussianContinuumDistribution.h.

Object* PLearn::toObjectPtr ( const ScaledLaplacianKernel &  o) [inline]

Definition at line 73 of file ScaledLaplacianKernel.h.

Object* PLearn::toObjectPtr ( const NnlmOnlineLearner &  o) [inline]

Definition at line 280 of file NnlmOnlineLearner.h.

Object* PLearn::toObjectPtr ( const Distribution &  o) [inline]

Definition at line 147 of file Distribution.h.

:654)
Object* PLearn::toObjectPtr ( const LiftStatsIterator &  o) [inline]

Definition at line 338 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const LiftBinaryCostFunction &  o) [inline]

Definition at line 85 of file LiftBinaryCostFunction.h.

{ return new LiftBinaryCostFunction(make_positive); }
Object* PLearn::toObjectPtr ( const UCIDataVMatrix &  o) [inline]

Definition at line 109 of file UCIDataVMatrix.h.

Object* PLearn::toObjectPtr ( const LocallyWeightedDistribution &  o) [inline]

Definition at line 121 of file LocallyWeightedDistribution.h.

:654)
Object* PLearn::toObjectPtr ( const NetflixVMatrix &  o) [inline]

Definition at line 238 of file NetflixVMatrix.h.

Object* PLearn::toObjectPtr ( const SubMatVariable &  o) [inline]

Definition at line 104 of file SubMatVariable.h.

{
Object* PLearn::toObjectPtr ( const SubMatTransposeVariable &  o) [inline]

Definition at line 88 of file SubMatTransposeVariable.h.

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }
Object* PLearn::toObjectPtr ( const DeepNonLocalManifoldParzen &  o) [inline]

Definition at line 353 of file DeepNonLocalManifoldParzen.h.

Object* PLearn::toObjectPtr ( const RankingFromKernel &  o) [inline]

Definition at line 179 of file RankingFromKernel.h.

Object* PLearn::toObjectPtr ( const NormalizedDotProductKernel &  o) [inline]

Definition at line 73 of file NormalizedDotProductKernel.h.

Object* PLearn::toObjectPtr ( const UniformDistribution &  o) [inline]

Definition at line 144 of file UniformDistribution.h.

Object* PLearn::toObjectPtr ( const GaussianDBNClassification &  o) [inline]

Definition at line 299 of file GaussianDBNClassification.h.

Object* PLearn::toObjectPtr ( const RowOfVariable &  o) [inline]

Definition at line 84 of file RowOfVariable.h.

{ return new RowOfVariable(distr,index); }
Object* PLearn::toObjectPtr ( const CompactVMatrixGaussianKernel &  o) [inline]

Definition at line 83 of file CompactVMatrixGaussianKernel.h.

Object* PLearn::toObjectPtr ( const TreeDBNModule &  o) [inline]

Definition at line 372 of file TreeDBNModule.h.

Object* PLearn::toObjectPtr ( const NearestNeighborPredictionCost &  o) [inline]

Definition at line 125 of file NearestNeighborPredictionCost.h.

Object* PLearn::toObjectPtr ( const AnalyzeFieldStats &  o) [inline]

Definition at line 178 of file AnalyzeFieldStats.h.

Object* PLearn::toObjectPtr ( const InterfunctionXchgTest &  o) [inline]

Definition at line 134 of file InterfunctionXchgTest.h.

Object* PLearn::toObjectPtr ( const BatchVMatrix &  o) [inline]

Definition at line 86 of file BatchVMatrix.h.

Object* PLearn::toObjectPtr ( const SoftHistogramBinner &  o) [inline]

Definition at line 133 of file SoftHistogramBinner.h.

Object* PLearn::toObjectPtr ( const VPLPreprocessedLearner &  o) [inline]

Definition at line 197 of file VPLPreprocessedLearner.h.

Object* PLearn::toObjectPtr ( const MarginPerceptronCostVariable &  o) [inline]

Definition at line 81 of file MarginPerceptronCostVariable.h.

{
Object* PLearn::toObjectPtr ( const TanhVariable &  o) [inline]

Definition at line 73 of file TanhVariable.h.

{ return new TanhVariable(v); }
Object* PLearn::toObjectPtr ( const UnaryVariable &  o) [inline]

Definition at line 112 of file UnaryVariable.h.

Object* PLearn::toObjectPtr ( const ConcatSetsSplitter &  o) [inline]

Definition at line 123 of file ConcatSetsSplitter.h.

Object* PLearn::toObjectPtr ( const NxProfileLearner &  o) [inline]

Definition at line 207 of file NxProfileLearner.h.

Object* PLearn::toObjectPtr ( const VPLPreprocessedLearner2 &  o) [inline]

Definition at line 215 of file VPLPreprocessedLearner2.h.

Object* PLearn::toObjectPtr ( const TestInTrainSplitter &  o) [inline]

Definition at line 153 of file TestInTrainSplitter.h.

Object* PLearn::toObjectPtr ( const LinearFilterModule &  o) [inline]

Definition at line 188 of file LinearFilterModule.h.

Object* PLearn::toObjectPtr ( const UniformizeLearner &  o) [inline]

Definition at line 187 of file UniformizeLearner.h.

Object* PLearn::toObjectPtr ( const IndexedVMatrix &  o) [inline]

Definition at line 108 of file IndexedVMatrix.h.

Object* PLearn::toObjectPtr ( const VarElementVariable &  o) [inline]

Definition at line 82 of file VarElementVariable.h.

Object* PLearn::toObjectPtr ( const RealFunctionProduct &  o) [inline]

Definition at line 116 of file RealFunctionProduct.h.

Object* PLearn::toObjectPtr ( const Variable &  o) [inline]

Definition at line 485 of file Variable.h.

Object* PLearn::toObjectPtr ( const SourceVMatrixSplitter &  o) [inline]

Definition at line 132 of file SourceVMatrixSplitter.h.

Object* PLearn::toObjectPtr ( const AddCostToLearner &  o) [inline]

Definition at line 228 of file AddCostToLearner.h.

Object* PLearn::toObjectPtr ( const ManifoldParzen &  o) [inline]

Definition at line 186 of file ManifoldParzen.h.

Object* PLearn::toObjectPtr ( const SortRowsVMatrix &  o) [inline]

Definition at line 95 of file SortRowsVMatrix.h.

Object* PLearn::toObjectPtr ( const InterValuesVariable &  o) [inline]

Definition at line 76 of file InterValuesVariable.h.

{ return new InterValuesVariable(values); }
Object* PLearn::toObjectPtr ( const NegLogProbCostFunction &  o) [inline]

Definition at line 95 of file NegLogProbCostFunction.h.

{ return new NegLogProbCostFunction(normalize,smooth_map_outputs,outstart,outend); }
Object * PLearn::toObjectPtr ( const NatGradEstimator &  o) [inline]

Definition at line 192 of file NatGradItEstimator.h.

Object* PLearn::toObjectPtr ( const DeepReconstructorNet &  o) [inline]

Definition at line 274 of file DeepReconstructorNet.h.

Object* PLearn::toObjectPtr ( const LogaddOnBagsModule &  o) [inline]

Definition at line 108 of file LogaddOnBagsModule.h.

Object* PLearn::toObjectPtr ( const PrecomputedProcessedLearner &  o) [inline]

Definition at line 141 of file PrecomputedProcessedLearner.h.

Object* PLearn::toObjectPtr ( const NeuralNetworkARDKernel &  o) [inline]

Definition at line 144 of file NeuralNetworkARDKernel.h.

Object* PLearn::toObjectPtr ( const RowAtPositionVariable &  o) [inline]

Definition at line 87 of file RowAtPositionVariable.h.

Object* PLearn::toObjectPtr ( const PricingTransactionPairProfitFunction &  o) [inline]

Definition at line 95 of file PricingTransactionPairProfitFunction.h.

Object* PLearn::toObjectPtr ( const RegressionTreeRegisters &  o) [inline]

Definition at line 196 of file RegressionTreeRegisters.h.

Object* PLearn::toObjectPtr ( const VVMatrix &  o) [inline]

Definition at line 137 of file VVMatrix.h.

Object* PLearn::toObjectPtr ( const IndexedVMatrixTest &  o) [inline]

Definition at line 108 of file IndexedVMatrixTest.h.

Object* PLearn::toObjectPtr ( const DotProductKernel &  o) [inline]

Definition at line 69 of file DotProductKernel.h.

Object* PLearn::toObjectPtr ( const ShuntingNNetLayerModule &  o) [inline]

Definition at line 172 of file ShuntingNNetLayerModule.h.

Object* PLearn::toObjectPtr ( const CumVMatrix &  o) [inline]

Definition at line 112 of file CumVMatrix.h.

Object* PLearn::toObjectPtr ( const TMatTest &  o) [inline]

Definition at line 139 of file TMatTest.h.

Object* PLearn::toObjectPtr ( const VecElementVariable &  o) [inline]

Definition at line 80 of file VecElementVariable.h.

{ return new VecElementVariable(v,index); }
Object* PLearn::toObjectPtr ( const RowSumVariable &  o) [inline]

Definition at line 71 of file RowSumVariable.h.

{ 
Object* PLearn::toObjectPtr ( const NegLogPoissonVariable &  o) [inline]

Definition at line 81 of file NegLogPoissonVariable.h.

{
Object* PLearn::toObjectPtr ( const RowSumSquareVariable &  o) [inline]

Definition at line 75 of file RowSumSquareVariable.h.

{ 
Object* PLearn::toObjectPtr ( const MinusColumnVariable &  o) [inline]

Definition at line 75 of file MinusColumnVariable.h.

Object* PLearn::toObjectPtr ( const RightPseudoInverseVariable &  o) [inline]

Definition at line 74 of file RightPseudoInverseVariable.h.

{
Object* PLearn::toObjectPtr ( const TemporaryFileVMatrix &  o) [inline]

Definition at line 128 of file TemporaryFileVMatrix.h.

Object* PLearn::toObjectPtr ( const IdentityVariable &  o) [inline]

Definition at line 61 of file IdentityVariable.h.

{ return new IdentityVariable(v); }
Object* PLearn::toObjectPtr ( const AppendNeighborsVMatrix &  o) [inline]

Definition at line 130 of file AppendNeighborsVMatrix.h.

{
Object* PLearn::toObjectPtr ( const GeneralizedDistanceRBFKernel &  o) [inline]

Definition at line 76 of file GeneralizedDistanceRBFKernel.h.

Object* PLearn::toObjectPtr ( const ProjectionErrorVariable &  o) [inline]

Definition at line 96 of file ProjectionErrorVariable.h.

{
Object* PLearn::toObjectPtr ( const StderrStatsIterator &  o) [inline]

Definition at line 219 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const ExtendedVariable &  o) [inline]

Definition at line 97 of file ExtendedVariable.h.

{ return new ExtendedVariable(v,top_extent,bottom_extent,left_extent,right_extent,fill_value); }
Object* PLearn::toObjectPtr ( const PowVariable &  o) [inline]

Definition at line 75 of file PowVariable.h.

{ return new PowVariable(v,power); }
Object* PLearn::toObjectPtr ( const PruningLinearRegressor &  o) [inline]

Definition at line 136 of file PruningLinearRegressor.h.

Object* PLearn::toObjectPtr ( const ParentableObject &  o) [inline]

Definition at line 160 of file ParentableObject.h.

Object* PLearn::toObjectPtr ( const SharpeRatioStatsIterator &  o) [inline]

Definition at line 254 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const LinearCombinationModule &  o) [inline]

Definition at line 279 of file LinearCombinationModule.h.

Object* PLearn::toObjectPtr ( const ConcatRowsVariable &  o) [inline]

Definition at line 77 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
Object* PLearn::toObjectPtr ( const ConvexBasisKernel &  o) [inline]

Definition at line 77 of file ConvexBasisKernel.h.

Object* PLearn::toObjectPtr ( const PlusConstantVariable &  o) [inline]

Definition at line 94 of file PlusConstantVariable.h.

Object* PLearn::toObjectPtr ( const PDistributionVariable &  o) [inline]

Definition at line 83 of file PDistributionVariable.h.

Object* PLearn::toObjectPtr ( const RealValueIndicatorFunction &  o) [inline]

Definition at line 116 of file RealValueIndicatorFunction.h.

Object* PLearn::toObjectPtr ( const RegressorFromDistribution &  o) [inline]

Definition at line 174 of file RegressorFromDistribution.h.

Object* PLearn::toObjectPtr ( const MemoryCachedKernel &  o) [inline]

Definition at line 199 of file MemoryCachedKernel.h.

Object* PLearn::toObjectPtr ( const RowBufferedVMatrix &  o) [inline]

Definition at line 95 of file RowBufferedVMatrix.h.

Object* PLearn::toObjectPtr ( const Subsampling2DModule &  o) [inline]

Definition at line 229 of file Subsampling2DModule.h.

Object* PLearn::toObjectPtr ( const TemporalHorizonVMatrix &  o) [inline]

Definition at line 104 of file TemporalHorizonVMatrix.h.

Object* PLearn::toObjectPtr ( const EntropyContrastLearner &  o) [inline]

Definition at line 218 of file EntropyContrastLearner.h.

Object* PLearn::toObjectPtr ( const NnlmOutputLayer &  o) [inline]

Definition at line 334 of file NnlmOutputLayer.h.

Object* PLearn::toObjectPtr ( const BinaryNumbersVMatrix &  o) [inline]

Definition at line 146 of file BinaryNumbersVMatrix.h.

Object* PLearn::toObjectPtr ( const WPLS &  o) [inline]

Definition at line 185 of file WPLS.h.

Object* PLearn::toObjectPtr ( const AutoLinearRegressor &  o) [inline]

Definition at line 185 of file AutoLinearRegressor.h.

Object* PLearn::toObjectPtr ( const VecDictionary &  o) [inline]

Definition at line 122 of file VecDictionary.h.

Object* PLearn::toObjectPtr ( const TestMethod &  o) [inline]

Definition at line 89 of file TestMethod.h.

Object* PLearn::toObjectPtr ( const AffineTransformVariable &  o) [inline]

Definition at line 89 of file AffineTransformVariable.h.

{ 
Object* PLearn::toObjectPtr ( const MinusVariable &  o) [inline]

Definition at line 75 of file MinusVariable.h.

{
Object* PLearn::toObjectPtr ( const NllGeneralGaussianVariable &  o) [inline]

Definition at line 103 of file NllGeneralGaussianVariable.h.

{
Object* PLearn::toObjectPtr ( const RankLearner &  o) [inline]

Definition at line 178 of file RankLearner.h.

Object* PLearn::toObjectPtr ( const BinaryStump &  o) [inline]

Definition at line 159 of file BinaryStump.h.

Object* PLearn::toObjectPtr ( const MaxSubsampling2DModule &  o) [inline]

Definition at line 203 of file MaxSubsampling2DModule.h.

Object* PLearn::toObjectPtr ( const ClassSeparationSplitter &  o) [inline]

Definition at line 143 of file ClassSeparationSplitter.h.

Object* PLearn::toObjectPtr ( const VBoundDBN2 &  o) [inline]

Definition at line 297 of file VBoundDBN2.h.

Object* PLearn::toObjectPtr ( const ExtractVariable &  o) [inline]

Definition at line 86 of file ExtractVariable.h.

{
Object* PLearn::toObjectPtr ( const SplitWiseValidationVMatrix &  o) [inline]

Definition at line 118 of file SplitWiseValidationVMatrix.h.

Object* PLearn::toObjectPtr ( const MovingAverage &  o) [inline]

Declares a few other classes and functions related to this class.

Definition at line 93 of file MovingAverage.h.

Object* PLearn::toObjectPtr ( const BaseRegressorConfidence &  o) [inline]

Definition at line 113 of file BaseRegressorConfidence.h.

Object* PLearn::toObjectPtr ( const MultiSampleVariable &  o) [inline]

Definition at line 142 of file MultiSampleVariable.h.

Object* PLearn::toObjectPtr ( const Matern1ARDKernel &  o) [inline]

Definition at line 141 of file Matern1ARDKernel.h.

Object* PLearn::toObjectPtr ( const SelectedOutputCostFunction &  o) [inline]

Definition at line 82 of file SelectedOutputCostFunction.h.

Object * PLearn::toObjectPtr ( const Molecule &  o) [inline]

Definition at line 67 of file Molecule.h.

Object* PLearn::toObjectPtr ( const RemoveDuplicateVMatrix &  o) [inline]

Definition at line 110 of file RemoveDuplicateVMatrix.h.

Object* PLearn::toObjectPtr ( const MixtureDistribution &  o) [inline]

Definition at line 217 of file MixtureDistribution.h.

Object* PLearn::toObjectPtr ( const CovariancePreservationImputationVMatrix &  o) [inline]

Definition at line 124 of file CovariancePreservationImputationVMatrix.h.

Object* PLearn::toObjectPtr ( const ModuleTester &  o) [inline]

Definition at line 132 of file ModuleTester.h.

Object* PLearn::toObjectPtr ( const FNetLayerVariable &  o) [inline]

Definition at line 119 of file FNetLayerVariable.h.

Object* PLearn::toObjectPtr ( const IsMissingVariable &  o) [inline]

Definition at line 96 of file IsMissingVariable.h.

{ 
Object* PLearn::toObjectPtr ( const RBMMatrixConnectionNatGrad &  o) [inline]

Definition at line 121 of file RBMMatrixConnectionNatGrad.h.

Object* PLearn::toObjectPtr ( const ReIndexedTargetVMatrix &  o) [inline]

Definition at line 109 of file ReIndexedTargetVMatrix.h.

Object* PLearn::toObjectPtr ( const UndirectedSoftmaxModule &  o) [inline]

Definition at line 147 of file UndirectedSoftmaxModule.h.

Object* PLearn::toObjectPtr ( const ForwardVMatrix &  o) [inline]

Definition at line 186 of file ForwardVMatrix.h.

Object* PLearn::toObjectPtr ( const OnlineLearningModule &  o) [inline]

Definition at line 333 of file OnlineLearningModule.h.

Object* PLearn::toObjectPtr ( const CheckDond2FileSequence &  o) [inline]

Definition at line 111 of file CheckDond2FileSequence.h.

Object* PLearn::toObjectPtr ( const BallTreeNearestNeighbors &  o) [inline]

Definition at line 210 of file BallTreeNearestNeighbors.h.

Object* PLearn::toObjectPtr ( const StackedModulesLearner &  o) [inline]

Definition at line 214 of file StackedModulesLearner.h.

Object* PLearn::toObjectPtr ( const RPPath &  o) [inline]

Definition at line 105 of file RPPath.h.

Object* PLearn::toObjectPtr ( const ConcatDisjointFeatureSet &  o) [inline]

Definition at line 132 of file ConcatDisjointFeatureSet.h.

Object* PLearn::toObjectPtr ( const DatedJoinVMatrix &  o) [inline]

Definition at line 135 of file DatedJoinVMatrix.h.

Object* PLearn::toObjectPtr ( const PvGradNNet &  o) [inline]

Definition at line 171 of file PvGradNNet.h.

Object* PLearn::toObjectPtr ( const KernelDensityEstimator &  o) [inline]

Definition at line 177 of file KernelDensityEstimator.h.

Object* PLearn::toObjectPtr ( const RBMMatrixConnection &  o) [inline]

Definition at line 296 of file RBMMatrixConnection.h.

Object* PLearn::toObjectPtr ( const PLLogTest &  o) [inline]

Definition at line 130 of file PLLogTest.h.

Object* PLearn::toObjectPtr ( const TransposeVMatrix &  o) [inline]

Definition at line 119 of file TransposeVMatrix.h.

Object* PLearn::toObjectPtr ( const PLCheckTest &  o) [inline]

Definition at line 126 of file PLCheckTest.h.

Object* PLearn::toObjectPtr ( const GaussianContinuum &  o) [inline]

Definition at line 281 of file GaussianContinuum.h.

Object* PLearn::toObjectPtr ( const RandomSamplesVMatrix &  o) [inline]

Definition at line 155 of file RandomSamplesVMatrix.h.

Object* PLearn::toObjectPtr ( const RowBufferedVMatrixTest &  o) [inline]

Definition at line 126 of file RowBufferedVMatrixTest.h.

Object* PLearn::toObjectPtr ( const RandomSamplesFromVMatrix &  o) [inline]

Definition at line 134 of file RandomSamplesFromVMatrix.h.

Object* PLearn::toObjectPtr ( const SurfaceMesh &  o) [inline]

Definition at line 227 of file SurfaceMesh.h.

Object* PLearn::toObjectPtr ( const Convolution2DModule &  o) [inline]

Definition at line 257 of file Convolution2DModule.h.

template<class T >
Object* PLearn::toObjectPtr ( const PP< T > &  x) [inline]

Definition at line 184 of file ObjectConversions.h.

References PLearn::PP< T >::isNotNull(), and toObjectPtr().

{
    if (x.isNotNull())
        return toObjectPtr(*static_cast<T *>(x));
    else
        return 0;
    
}

Here is the call graph for this function:

Object* PLearn::toObjectPtr ( const EqualScalarVariable &  o) [inline]

Definition at line 74 of file EqualScalarVariable.h.

Object* PLearn::toObjectPtr ( const DeepNNet &  o) [inline]

Definition at line 213 of file DeepNNet.h.

Object* PLearn::toObjectPtr ( const EmbeddedLearner &  o) [inline]

Definition at line 200 of file EmbeddedLearner.h.

Object* PLearn::toObjectPtr ( const CostModule &  o) [inline]

Definition at line 198 of file CostModule.h.

Object* PLearn::toObjectPtr ( const MultiInstanceNNet &  o) [inline]

Definition at line 172 of file MultiInstanceNNet.h.

Object* PLearn::toObjectPtr ( const BasicIdentityCallsTest &  o) [inline]

Definition at line 144 of file BasicIdentityCallsTest.h.

Object* PLearn::toObjectPtr ( const SeparateInputVMatrix &  o) [inline]

Definition at line 123 of file SeparateInputVMatrix.h.

Object* PLearn::toObjectPtr ( const AsciiVMatrix &  o) [inline]

Definition at line 115 of file AsciiVMatrix.h.

Object* PLearn::toObjectPtr ( const ErfVariable &  o) [inline]

Definition at line 69 of file ErfVariable.h.

{ return new ErfVariable(v); }
Object* PLearn::toObjectPtr ( const Template &  o) [inline]

Definition at line 61 of file Template.h.

Object* PLearn::toObjectPtr ( const VecStatsCollector &  o) [inline]

Definition at line 338 of file VecStatsCollector.h.

Object* PLearn::toObjectPtr ( const SummationKernel &  o) [inline]

Definition at line 145 of file SummationKernel.h.

Object* PLearn::toObjectPtr ( const QuantilesStatsIterator &  o) [inline]

Definition at line 372 of file StatsIterator.h.

: public Array<StatsIt>
Object* PLearn::toObjectPtr ( const DistanceKernel &  o) [inline]

Definition at line 90 of file DistanceKernel.h.

Object* PLearn::toObjectPtr ( const BernoulliSampleVariable &  o) [inline]

Definition at line 137 of file BernoulliSampleVariable.h.

Object* PLearn::toObjectPtr ( const ClassMarginCostFunction &  o) [inline]

Definition at line 93 of file ClassMarginCostFunction.h.

{ return new ClassMarginCostFunction(binary_target_is_01,output_is_positive); }
Object* PLearn::toObjectPtr ( const RBMMatrixTransposeConnection &  o) [inline]

Definition at line 216 of file RBMMatrixTransposeConnection.h.

Object* PLearn::toObjectPtr ( const KNNImputationVMatrix &  o) [inline]

Definition at line 135 of file KNNImputationVMatrix.h.

Object* PLearn::toObjectPtr ( const Dictionary &  o) [inline]

Definition at line 190 of file Dictionary.h.

Object* PLearn::toObjectPtr ( const RealMapping &  o) [inline]

Definition at line 265 of file RealMapping.h.

Object* PLearn::toObjectPtr ( const PrecomputedVMatrix &  o) [inline]

Definition at line 112 of file PrecomputedVMatrix.h.

Object* PLearn::toObjectPtr ( const PairsVMatrix &  o) [inline]

Definition at line 92 of file PairsVMatrix.h.

Object* PLearn::toObjectPtr ( const DenoisingRecurrentNet &  o) [inline]

Definition at line 524 of file DenoisingRecurrentNet.h.

Object* PLearn::toObjectPtr ( const LimitedGaussianSmoother &  o) [inline]

Definition at line 128 of file LimitedGaussianSmoother.h.

Object* PLearn::toObjectPtr ( const LogAddVariable &  o) [inline]

Definition at line 108 of file LogAddVariable.h.

{ return new LogAddVariable(input1, input2); }
Object* PLearn::toObjectPtr ( const MaxVariable &  o) [inline]

Definition at line 70 of file MaxVariable.h.

{ return new MaxVariable(v); }
Object* PLearn::toObjectPtr ( const PartsDistanceKernel &  o) [inline]

Definition at line 82 of file PartsDistanceKernel.h.

Object* PLearn::toObjectPtr ( const ImputationVMatrix &  o) [inline]

Definition at line 84 of file ImputationVMatrix.h.

Object* PLearn::toObjectPtr ( const WeightedLogGaussian &  o) [inline]

Definition at line 90 of file WeightedLogGaussian.h.

Object* PLearn::toObjectPtr ( const InterleaveVMatrix &  o) [inline]

Definition at line 119 of file InterleaveVMatrix.h.

Object* PLearn::toObjectPtr ( const SequentialModelSelector &  o) [inline]

Declares a few other classes and functions related to this class.

Definition at line 187 of file SequentialModelSelector.h.

Object* PLearn::toObjectPtr ( const AutoVMatrixTest &  o) [inline]

Definition at line 133 of file AutoVMatrixTest.h.

Object* PLearn::toObjectPtr ( const LLEKernel &  o) [inline]

Definition at line 160 of file LLEKernel.h.

Object* PLearn::toObjectPtr ( const TextStreamVMatrix &  o) [inline]

Definition at line 120 of file TextStreamVMatrix.h.

Object* PLearn::toObjectPtr ( const NeighborhoodImputationVMatrix &  o) [inline]

Definition at line 119 of file NeighborhoodImputationVMatrix.h.

Object* PLearn::toObjectPtr ( const Learner &  o) [inline]

Definition at line 568 of file Learner.h.

{
Object* PLearn::toObjectPtr ( const ScaleGradientModule &  o) [inline]

Definition at line 123 of file ScaleGradientModule.h.

Object * PLearn::toObjectPtr ( const GaussianProcessRegressor &  o) [inline]
Object* PLearn::toObjectPtr ( const VecExtendedVMatrix &  o) [inline]

Definition at line 106 of file VecExtendedVMatrix.h.

Object* PLearn::toObjectPtr ( const RBMTrainer &  o) [inline]

Definition at line 174 of file RBMTrainer.h.

Object* PLearn::toObjectPtr ( const IIDNoiseKernel &  o) [inline]

Definition at line 146 of file IIDNoiseKernel.h.

Object* PLearn::toObjectPtr ( const StackedSVDNet &  o) [inline]

Definition at line 270 of file StackedSVDNet.h.

Object* PLearn::toObjectPtr ( const MovingAverageVMatrix &  o) [inline]

Definition at line 116 of file MovingAverageVMatrix.h.

Object* PLearn::toObjectPtr ( const TestImputations &  o) [inline]

Definition at line 197 of file TestImputations.h.

Object* PLearn::toObjectPtr ( const SelectSetsSplitter &  o) [inline]

Definition at line 127 of file SelectSetsSplitter.h.

Object* PLearn::toObjectPtr ( const TruncatedRealFunction &  o) [inline]

Definition at line 125 of file TruncatedRealFunction.h.

Object* PLearn::toObjectPtr ( const HyperCommand &  o) [inline]

Definition at line 132 of file HyperCommand.h.

Object* PLearn::toObjectPtr ( const GeodesicDistanceKernel &  o) [inline]

Definition at line 176 of file GeodesicDistanceKernel.h.

Object* PLearn::toObjectPtr ( const LIBSVMSparseVMatrix &  o) [inline]

Definition at line 137 of file LIBSVMSparseVMatrix.h.

Object* PLearn::toObjectPtr ( const BaseRegressorWrapper &  o) [inline]

Definition at line 116 of file BaseRegressorWrapper.h.

Object* PLearn::toObjectPtr ( const WordNetFeatureSet &  o) [inline]

Definition at line 113 of file WordNetFeatureSet.h.

Object* PLearn::toObjectPtr ( const Function &  o) [inline]

Definition at line 208 of file Func.h.

Object* PLearn::toObjectPtr ( const InjectionTest &  o) [inline]

Definition at line 133 of file InjectionTest.h.

Object* PLearn::toObjectPtr ( const BetaKernel &  o) [inline]

Definition at line 145 of file BetaKernel.h.

Object* PLearn::toObjectPtr ( const NLLNeighborhoodWeightsVariable &  o) [inline]

Definition at line 129 of file NLLNeighborhoodWeightsVariable.h.

{ 
Object* PLearn::toObjectPtr ( const SelectRowsMultiInstanceVMatrix &  o) [inline]

Definition at line 136 of file SelectRowsMultiInstanceVMatrix.h.

Object* PLearn::toObjectPtr ( const LinearARDKernel &  o) [inline]

Definition at line 148 of file LinearARDKernel.h.

Object* PLearn::toObjectPtr ( const AbsVariable &  o) [inline]

Definition at line 71 of file AbsVariable.h.

{ return new AbsVariable(v); }
Object* PLearn::toObjectPtr ( const ConstantRealFunction &  o) [inline]

Definition at line 121 of file ConstantRealFunction.h.

Object* PLearn::toObjectPtr ( const MatrixSumOfVariable &  o) [inline]

Definition at line 94 of file MatrixSumOfVariable.h.

{ return new MatrixSumOfVariable(distr,f,nsamples,input_size); }
Object* PLearn::toObjectPtr ( const GaussianDensityKernel &  o) [inline]

Definition at line 78 of file GaussianDensityKernel.h.

Object* PLearn::toObjectPtr ( const CrossEntropyCostModule &  o) [inline]

Definition at line 123 of file CrossEntropyCostModule.h.

Object* PLearn::toObjectPtr ( const RBMLocalMultinomialLayer &  o) [inline]

Definition at line 181 of file RBMLocalMultinomialLayer.h.

Object* PLearn::toObjectPtr ( const MemoryVMatrixNoSave &  o) [inline]

Definition at line 119 of file MemoryVMatrixNoSave.h.

Object* PLearn::toObjectPtr ( const RBMConv2DLLParameters &  o) [inline]

Definition at line 236 of file RBMConv2DLLParameters.h.

Object* PLearn::toObjectPtr ( const PLearnDiff &  o) [inline]

Definition at line 140 of file PLearnDiff.h.

Object* PLearn::toObjectPtr ( const MatrixModule &  o) [inline]

Definition at line 224 of file MatrixModule.h.

Object* PLearn::toObjectPtr ( const ChainedLearners &  o) [inline]

Definition at line 186 of file ChainedLearners.h.

Object* PLearn::toObjectPtr ( const KNNVMatrix &  o) [inline]

Definition at line 151 of file KNNVMatrix.h.

Object* PLearn::toObjectPtr ( const Isomap &  o) [inline]

Definition at line 135 of file Isomap.h.

Object* PLearn::toObjectPtr ( const GaussianProcessNLLVariable &  o) [inline]

Definition at line 230 of file GaussianProcessNLLVariable.h.

Object* PLearn::toObjectPtr ( const MulticlassLossVariable &  o) [inline]

Definition at line 79 of file MulticlassLossVariable.h.

{ return new MulticlassLossVariable(network_output, targets); }
Object* PLearn::toObjectPtr ( const UnfrozenDeepBeliefNet &  o) [inline]

Definition at line 125 of file UnfrozenDeepBeliefNet.h.

Object* PLearn::toObjectPtr ( const BestAveragingPLearner &  o) [inline]

Definition at line 228 of file BestAveragingPLearner.h.

Object* PLearn::toObjectPtr ( const ClassifierFromConditionalPDistribution &  o) [inline]

Definition at line 155 of file ClassifierFromConditionalPDistribution.h.

Object* PLearn::toObjectPtr ( const X o) [inline]

Definition at line 172 of file ObjectGraphIteratorTest.cc.

: public X
Object* PLearn::toObjectPtr ( const RBMConv2DConnection &  o) [inline]

Definition at line 242 of file RBMConv2DConnection.h.

Object* PLearn::toObjectPtr ( const DeepBeliefNet &  o) [inline]

Definition at line 528 of file DeepBeliefNet.h.

Object* PLearn::toObjectPtr ( const PlusScalarVariable &  o) [inline]

Definition at line 77 of file PlusScalarVariable.h.

Object* PLearn::toObjectPtr ( const PLearnerOutputVMatrix &  o) [inline]

Definition at line 148 of file PLearnerOutputVMatrix.h.

Object* PLearn::toObjectPtr ( const ExtractNNetParamsVMatrix &  o) [inline]

Definition at line 122 of file ExtractNNetParamsVMatrix.h.

Object* PLearn::toObjectPtr ( const UnconditionalDistribution &  o) [inline]

Definition at line 133 of file UnconditionalDistribution.h.

Object* PLearn::toObjectPtr ( const NonDiagVariable &  o) [inline]

Definition at line 77 of file NonDiagVariable.h.

{ return new NonDiagVariable(v); }
Object* PLearn::toObjectPtr ( const MixUnlabeledNeighbourVMatrix &  o) [inline]

Definition at line 140 of file MixUnlabeledNeighbourVMatrix.h.

Object* PLearn::toObjectPtr ( const ShiftAndRescaleVMatrix &  o) [inline]

Definition at line 133 of file ShiftAndRescaleVMatrix.h.

Object* PLearn::toObjectPtr ( const RBMJointGenericParameters &  o) [inline]

Definition at line 197 of file RBMJointGenericParameters.h.

Object* PLearn::toObjectPtr ( const FilteredVMatrix &  o) [inline]

Definition at line 136 of file FilteredVMatrix.h.

Object* PLearn::toObjectPtr ( const LLE &  o) [inline]

Definition at line 127 of file LLE.h.

Object* PLearn::toObjectPtr ( const PCA &  o) [inline]

Definition at line 234 of file PCA.h.

Object* PLearn::toObjectPtr ( const PlusColumnVariable &  o) [inline]

Definition at line 78 of file PlusColumnVariable.h.

{ 
Object * PLearn::toObjectPtr ( const RBMGaussianLayer &  o) [inline]

Definition at line 128 of file DEPRECATED/RBMGaussianLayer.h.

Object* PLearn::toObjectPtr ( const GenerateDecisionPlot &  o) [inline]

Definition at line 115 of file GenerateDecisionPlot.h.

Object* PLearn::toObjectPtr ( const ModuleLearner &  o) [inline]

Definition at line 210 of file ModuleLearner.h.

Object* PLearn::toObjectPtr ( const RandomGaussMix &  o) [inline]

Definition at line 107 of file RandomGaussMix.h.

Object* PLearn::toObjectPtr ( const PLearnerDiagonalKernel &  o) [inline]

Definition at line 127 of file PLearnerDiagonalKernel.h.

Object* PLearn::toObjectPtr ( const SumVarianceOfLinearTransformedBernoullis &  o) [inline]

Definition at line 144 of file SumVarianceOfLinearTransformedBernoullis.h.

Object* PLearn::toObjectPtr ( const ARDBaseKernel &  o) [inline]

Definition at line 120 of file ARDBaseKernel.h.

Object* PLearn::toObjectPtr ( const KLp0p1RBMModule &  o) [inline]

Definition at line 338 of file KLp0p1RBMModule.h.

Object* PLearn::toObjectPtr ( const Supersampling2DModule &  o) [inline]

Definition at line 229 of file Supersampling2DModule.h.

Object* PLearn::toObjectPtr ( const GaussianDBNRegression &  o) [inline]

Definition at line 286 of file GaussianDBNRegression.h.

Object* PLearn::toObjectPtr ( const ProbabilityPairsInverseVariable &  o) [inline]

Definition at line 140 of file ProbabilityPairsInverseVariable.h.

Object * PLearn::toObjectPtr ( const RBMLayer &  o) [inline]

Definition at line 166 of file DEPRECATED/RBMLayer.h.

Object* PLearn::toObjectPtr ( const SelectRowsFileIndexVMatrix &  o) [inline]

Definition at line 95 of file SelectRowsFileIndexVMatrix.h.

Object* PLearn::toObjectPtr ( const HintonDeepBeliefNet &  o) [inline]

Definition at line 342 of file HintonDeepBeliefNet.h.

Object* PLearn::toObjectPtr ( const NeighborhoodSmoothnessNNet &  o) [inline]

Definition at line 173 of file NeighborhoodSmoothnessNNet.h.

Object* PLearn::toObjectPtr ( const Experiment &  o) [inline]

Definition at line 108 of file Experiment.h.

Object* PLearn::toObjectPtr ( const UnaryHardSlopeVariable &  o) [inline]

Definition at line 81 of file UnaryHardSlopeVariable.h.

{ return new UnaryHardSlopeVariable(v,l,r); }
Object* PLearn::toObjectPtr ( const TraceVariable &  o) [inline]

Definition at line 77 of file TraceVariable.h.

{ return new TraceVariable(v); }
Object* PLearn::toObjectPtr ( const ConditionalStatsCollector &  o) [inline]

Definition at line 172 of file ConditionalStatsCollector.h.

Object* PLearn::toObjectPtr ( const RegressionTreeMulticlassLeaveFast &  o) [inline]

Definition at line 95 of file RegressionTreeMulticlassLeaveFast.h.

Object* PLearn::toObjectPtr ( const BinarizeModule &  o) [inline]

Definition at line 289 of file BinarizeModule.h.

Object* PLearn::toObjectPtr ( const BackConvolution2DModule &  o) [inline]

Definition at line 248 of file BackConvolution2DModule.h.

Object* PLearn::toObjectPtr ( const DuplicateScalarVariable &  o) [inline]

Definition at line 79 of file DuplicateScalarVariable.h.

{ 
Object* PLearn::toObjectPtr ( const DuplicateRowVariable &  o) [inline]

Definition at line 78 of file DuplicateRowVariable.h.

{ 
Object* PLearn::toObjectPtr ( const AddMissingVMatrix &  o) [inline]

Definition at line 131 of file AddMissingVMatrix.h.

{
Object* PLearn::toObjectPtr ( const PlusVariable &  o) [inline]

Definition at line 78 of file PlusVariable.h.

Object* PLearn::toObjectPtr ( const RBMLQParameters &  o) [inline]

Definition at line 195 of file RBMLQParameters.h.

Object* PLearn::toObjectPtr ( const DiagVariable &  o) [inline]

Definition at line 77 of file DiagVariable.h.

{ return new DiagVariable(v); }
Object* PLearn::toObjectPtr ( const NegOutputCostFunction &  o) [inline]

Definition at line 67 of file NegOutputCostFunction.h.

{ return new NegOutputCostFunction(); }
Object* PLearn::toObjectPtr ( const PythonTableVMatrix &  o) [inline]

Definition at line 91 of file PythonTableVMatrix.h.

Object * PLearn::toObjectPtr ( const RBMMixedLayer &  o) [inline]

Definition at line 139 of file DEPRECATED/RBMMixedLayer.h.

Object* PLearn::toObjectPtr ( const DotProductVariable &  o) [inline]

Definition at line 79 of file DotProductVariable.h.

{ return new DotProductVariable(v1,v2); }
Object* PLearn::toObjectPtr ( const EqualConstantVariable &  o) [inline]

Definition at line 78 of file EqualConstantVariable.h.

{  return new EqualConstantVariable(v1,cte); }
Object* PLearn::toObjectPtr ( const ConjRosenbrock &  o) [inline]

Definition at line 97 of file ConjRosenbrock.h.

Object* PLearn::toObjectPtr ( const MoleculeTemplate &  o) [inline]

Definition at line 139 of file MoleculeTemplate.h.

Object* PLearn::toObjectPtr ( const FinancePreprocVMatrix &  o) [inline]

Definition at line 170 of file FinancePreprocVMatrix.h.

Object* PLearn::toObjectPtr ( const ClassDistanceProportionCostFunction &  o) [inline]

Definition at line 76 of file ClassDistanceProportionCostFunction.h.

{ 
Object* PLearn::toObjectPtr ( const IdentityModule &  o) [inline]

Definition at line 190 of file IdentityModule.h.

Object* PLearn::toObjectPtr ( const HyperRetrain &  o) [inline]

Definition at line 116 of file HyperRetrain.h.

Object* PLearn::toObjectPtr ( const PPTest &  o) [inline]

Definition at line 130 of file PPTest.h.

Object* PLearn::toObjectPtr ( const AdditiveGaussianNoiseVariable &  o) [inline]

Definition at line 140 of file AdditiveGaussianNoiseVariable.h.

Object* PLearn::toObjectPtr ( const ConcatRowsVMatrix &  o) [inline]

Definition at line 151 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
Object* PLearn::toObjectPtr ( const Min2Variable &  o) [inline]

Definition at line 78 of file Min2Variable.h.

{ return new Min2Variable(v1,v2); }
Object* PLearn::toObjectPtr ( const ConstrainVariable &  o) [inline]

Definition at line 81 of file ConstrainVariable.h.

{ return new ConstrainVariable(v); }
Object* PLearn::toObjectPtr ( const MultiToUniInstanceSelectRandomVMatrix &  o) [inline]

Definition at line 96 of file MultiToUniInstanceSelectRandomVMatrix.h.

Object* PLearn::toObjectPtr ( const ChemicalICP &  o) [inline]

Definition at line 288 of file ChemicalICP.h.

Object* PLearn::toObjectPtr ( const TransparentParentable &  o) [inline]

Definition at line 316 of file ParentableObject.h.

Object* PLearn::toObjectPtr ( const PerformanceEvaluator &  o) [inline]

Definition at line 122 of file PerformanceEvaluator.h.

Object* PLearn::toObjectPtr ( const CubicSpline &  o) [inline]

Definition at line 152 of file CubicSpline.h.

Object* PLearn::toObjectPtr ( const TimesConstantScalarVariable2 &  o) [inline]

Definition at line 74 of file TimesConstantScalarVariable2.h.

{
Object* PLearn::toObjectPtr ( const PStreamBufTest &  o) [inline]

Definition at line 130 of file PStreamBufTest.h.

Object* PLearn::toObjectPtr ( const OnBagsModule &  o) [inline]

Definition at line 155 of file OnBagsModule.h.

Object* PLearn::toObjectPtr ( const BootstrapVMatrix &  o) [inline]

Definition at line 102 of file BootstrapVMatrix.h.

Object* PLearn::toObjectPtr ( const ScoreLayerVariable &  o) [inline]

Definition at line 202 of file ScoreLayerVariable.h.

Object* PLearn::toObjectPtr ( const NegateElementsVariable &  o) [inline]

Definition at line 82 of file NegateElementsVariable.h.

{
Object* PLearn::toObjectPtr ( const MatrixOneHotSquaredLoss &  o) [inline]

Definition at line 78 of file MatrixOneHotSquaredLoss.h.

Object* PLearn::toObjectPtr ( const ByteMemoryVMatrix &  o) [inline]

Definition at line 80 of file ByteMemoryVMatrix.h.

Object* PLearn::toObjectPtr ( const PseudolikelihoodRBM &  o) [inline]

Definition at line 437 of file PseudolikelihoodRBM.h.

Object* PLearn::toObjectPtr ( const NormalizationLearner &  o) [inline]

Definition at line 187 of file NormalizationLearner.h.

Object* PLearn::toObjectPtr ( const SumAbsVariable &  o) [inline]

Definition at line 71 of file SumAbsVariable.h.

{ return new SumAbsVariable(v); }
Object* PLearn::toObjectPtr ( const ParzenWindow &  o) [inline]

Definition at line 113 of file ParzenWindow.h.

Object* PLearn::toObjectPtr ( const GradientOptimizer &  o) [inline]

Definition at line 126 of file GradientOptimizer.h.

Object* PLearn::toObjectPtr ( const SecondIterationTester &  o) [inline]

Definition at line 100 of file SecondIterationTester.h.

Object* PLearn::toObjectPtr ( const RepeatVMatrix &  o) [inline]

Definition at line 115 of file RepeatVMatrix.h.

{
Object* PLearn::toObjectPtr ( const FractionSplitter &  o) [inline]

Definition at line 125 of file FractionSplitter.h.

Object* PLearn::toObjectPtr ( const ThresholdBpropVariable &  o) [inline]

Definition at line 88 of file ThresholdBpropVariable.h.

{ return new ThresholdBpropVariable(v,gradient_threshold_factor); }
Object* PLearn::toObjectPtr ( const RegressionTreeQueue &  o) [inline]

Definition at line 94 of file RegressionTreeQueue.h.

Object* PLearn::toObjectPtr ( const RunObject &  o) [inline]

Definition at line 122 of file RunObject.h.

Object* PLearn::toObjectPtr ( const DiskVMatrix &  o) [inline]

Definition at line 124 of file DiskVMatrix.h.

Object* PLearn::toObjectPtr ( const HistogramDistribution &  o) [inline]

Definition at line 179 of file HistogramDistribution.h.

Object* PLearn::toObjectPtr ( const SumEntropyOfCategoricals &  o) [inline]

Definition at line 139 of file SumEntropyOfCategoricals.h.

Object* PLearn::toObjectPtr ( const DistRepNNet &  o) [inline]

Definition at line 353 of file DistRepNNet.h.

Object* PLearn::toObjectPtr ( const AutoVMatrixSaveSource &  o) [inline]

Definition at line 90 of file AutoVMatrixSaveSource.h.

Object* PLearn::toObjectPtr ( const Experimentation &  o) [inline]

Definition at line 203 of file Experimentation.h.

Object* PLearn::toObjectPtr ( const ModuleStackModule &  o) [inline]

Definition at line 182 of file ModuleStackModule.h.

Object* PLearn::toObjectPtr ( const ConcatRowsSubVMatrix &  o) [inline]

Definition at line 116 of file ConcatRowsSubVMatrix.h.

Object* PLearn::toObjectPtr ( const TemporaryDiskVMatrix &  o) [inline]

Definition at line 127 of file TemporaryDiskVMatrix.h.

Object* PLearn::toObjectPtr ( const MultiTargetOneHotVMatrix &  o) [inline]

Definition at line 134 of file MultiTargetOneHotVMatrix.h.

{
Object* PLearn::toObjectPtr ( const NNet &  o) [inline]

Definition at line 291 of file NNet.h.

Object* PLearn::toObjectPtr ( const MemoryStressTest &  o) [inline]

Definition at line 139 of file MemoryStressTest.h.

Object* PLearn::toObjectPtr ( const RealRangeIndicatorFunction &  o) [inline]

Definition at line 117 of file RealRangeIndicatorFunction.h.

Object* PLearn::toObjectPtr ( const PlusRowVariable &  o) [inline]

Definition at line 78 of file PlusRowVariable.h.

Object* PLearn::toObjectPtr ( const ConcatColumnsVariable &  o) [inline]

Definition at line 79 of file ConcatColumnsVariable.h.

{ return new ConcatColumnsVariable(varray); }
Object* PLearn::toObjectPtr ( const VariableDeletionVMatrix &  o) [inline]

Definition at line 96 of file VariableDeletionVMatrix.h.

Object* PLearn::toObjectPtr ( const MinStatsIterator &  o) [inline]

Definition at line 277 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const TimesRowVariable &  o) [inline]

Definition at line 80 of file TimesRowVariable.h.

Object* PLearn::toObjectPtr ( const ThresholdedKernel &  o) [inline]

Definition at line 178 of file ThresholdedKernel.h.

Object* PLearn::toObjectPtr ( const ArgmaxModule &  o) [inline]

Definition at line 263 of file ArgmaxModule.h.

Object* PLearn::toObjectPtr ( const StepwiseSelectionOracle &  o) [inline]

Definition at line 145 of file StepwiseSelectionOracle.h.

Object* PLearn::toObjectPtr ( const CompressedVMatrix &  o) [inline]

Definition at line 122 of file CompressedVMatrix.h.

Object* PLearn::toObjectPtr ( const MeshMatch &  o) [inline]

Definition at line 131 of file MeshMatch.h.

Object* PLearn::toObjectPtr ( const MeshGraph &  o) [inline]

Definition at line 129 of file MeshGraph.h.

Object* PLearn::toObjectPtr ( const PlusManyVariable &  o) [inline]

Definition at line 112 of file PlusManyVariable.h.

Object* PLearn::toObjectPtr ( const GaussMixLocalProjections &  o) [inline]

Definition at line 165 of file GaussMixLocalProjections.h.

Object* PLearn::toObjectPtr ( const SumOverBagsVariable &  o) [inline]

Definition at line 121 of file SumOverBagsVariable.h.

{ return new SumOverBagsVariable(vmat, f, max_bag_size, nsamples, average, transpose); }
Object* PLearn::toObjectPtr ( const ExplicitListOracle &  o) [inline]

Definition at line 118 of file ExplicitListOracle.h.

Object* PLearn::toObjectPtr ( const HyperOptimize &  o) [inline]

Definition at line 194 of file HyperOptimize.h.

Object* PLearn::toObjectPtr ( const RemapLastColumnVMatrix &  o) [inline]

Definition at line 124 of file RemapLastColumnVMatrix.h.

Object* PLearn::toObjectPtr ( const ElementAtPositionVariable &  o) [inline]

Definition at line 84 of file ElementAtPositionVariable.h.

Object* PLearn::toObjectPtr ( const EncodedVMatrix &  o) [inline]

Definition at line 87 of file EncodedVMatrix.h.

Object* PLearn::toObjectPtr ( const LocalizedFeaturesLayerVariable &  o) [inline]

Definition at line 115 of file LocalizedFeaturesLayerVariable.h.

Object* PLearn::toObjectPtr ( const Preprocessing &  o) [inline]

Definition at line 144 of file Preprocessing.h.

Object* PLearn::toObjectPtr ( const IdentityPLearner &  o) [inline]

Definition at line 93 of file IdentityPLearner.h.

Object* PLearn::toObjectPtr ( const ToBagClassifier &  o) [inline]

Definition at line 159 of file ToBagClassifier.h.

Object* PLearn::toObjectPtr ( const InvertElementsVariable &  o) [inline]

Definition at line 70 of file InvertElementsVariable.h.

{ return new InvertElementsVariable(v); }
Object* PLearn::toObjectPtr ( const SquaredErrorCostModule &  o) [inline]

Definition at line 132 of file SquaredErrorCostModule.h.

Object* PLearn::toObjectPtr ( const EpanechnikovKernel &  o) [inline]

Definition at line 113 of file EpanechnikovKernel.h.

Object* PLearn::toObjectPtr ( const Splitter &  o) [inline]

Definition at line 109 of file Splitter.h.

Object* PLearn::toObjectPtr ( const SequentialSplitter &  o) [inline]

Definition at line 111 of file SequentialSplitter.h.

Object* PLearn::toObjectPtr ( const MissingIndicatorVMatrix &  o) [inline]

Definition at line 101 of file MissingIndicatorVMatrix.h.

Object* PLearn::toObjectPtr ( const RangeVMatrix &  o) [inline]

Definition at line 84 of file RangeVMatrix.h.

Object* PLearn::toObjectPtr ( const SequentialLearner &  o) [inline]

Declares a few other classes and functions related to this class.

Definition at line 174 of file SequentialLearner.h.

Object* PLearn::toObjectPtr ( const RBMLLParameters &  o) [inline]

Definition at line 208 of file RBMLLParameters.h.

Object * PLearn::toObjectPtr ( const NoBpropVariable &  o) [inline]

Definition at line 88 of file var/NoBpropVariable.h.

{ return new NoBpropVariable(v,gradient_scaling_factor); }
Object* PLearn::toObjectPtr ( const SquaredErrorCostFunction &  o) [inline]

Definition at line 86 of file SquaredErrorCostFunction.h.

{
Object* PLearn::toObjectPtr ( const StatsIterator &  o) [inline]

Definition at line 108 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const GaussianDistribution &  o) [inline]

Definition at line 112 of file GaussianDistribution.h.

Object* PLearn::toObjectPtr ( const ObjectOptionVariable &  o) [inline]

Definition at line 171 of file ObjectOptionVariable.h.

Object* PLearn::toObjectPtr ( const PTest &  o) [inline]

Definition at line 127 of file PTest.h.

Object* PLearn::toObjectPtr ( const ObjectGenerator &  o) [inline]

Definition at line 96 of file ObjectGenerator.h.

Object* PLearn::toObjectPtr ( const LeftPseudoInverseVariable &  o) [inline]

Definition at line 74 of file LeftPseudoInverseVariable.h.

{
Object* PLearn::toObjectPtr ( const Y &  o) [inline]

Definition at line 192 of file ObjectGraphIteratorTest.cc.

: public Object
Object * PLearn::toObjectPtr ( const RBMMultinomialLayer &  o) [inline]

Definition at line 128 of file DEPRECATED/RBMMultinomialLayer.h.

Object* PLearn::toObjectPtr ( const KroneckerBaseKernel &  o) [inline]

Definition at line 139 of file KroneckerBaseKernel.h.

Object* PLearn::toObjectPtr ( const DilogarithmVariable &  o) [inline]

Definition at line 73 of file DilogarithmVariable.h.

{ return new DilogarithmVariable(v); }
Object* PLearn::toObjectPtr ( const NGramTree &  o) [inline]

Definition at line 145 of file NGramTree.h.

Object* PLearn::toObjectPtr ( const LLC &  o) [inline]

Definition at line 163 of file LLC.h.

Object* PLearn::toObjectPtr ( const CompareLearner &  o) [inline]

Definition at line 171 of file CompareLearner.h.

Object* PLearn::toObjectPtr ( const CorrelationKernel &  o) [inline]

Definition at line 162 of file CorrelationKernel.h.

Object* PLearn::toObjectPtr ( const AutoScaledGradientOptimizer &  o) [inline]

Definition at line 124 of file AutoScaledGradientOptimizer.h.

Object* PLearn::toObjectPtr ( const PowDistanceKernel &  o) [inline]

Definition at line 78 of file PowDistanceKernel.h.

Object* PLearn::toObjectPtr ( const BootstrapSplitter &  o) [inline]

Definition at line 136 of file BootstrapSplitter.h.

Object* PLearn::toObjectPtr ( const ScaledGeneralizedDistanceRBFKernel &  o) [inline]

Definition at line 79 of file ScaledGeneralizedDistanceRBFKernel.h.

Object* PLearn::toObjectPtr ( const SpiralDistribution &  o) [inline]

Definition at line 145 of file SpiralDistribution.h.

Object* PLearn::toObjectPtr ( const LinearCombinationOfScalarVariables &  o) [inline]

Definition at line 157 of file LinearCombinationOfScalarVariables.h.

Object* PLearn::toObjectPtr ( const StackedAutoassociatorsNet &  o) [inline]

Definition at line 595 of file StackedAutoassociatorsNet.h.

Object* PLearn::toObjectPtr ( const OracleObjectGenerator &  o) [inline]

Definition at line 102 of file OracleObjectGenerator.h.

Object* PLearn::toObjectPtr ( const StackedModulesModule &  o) [inline]

Definition at line 199 of file StackedModulesModule.h.

Object* PLearn::toObjectPtr ( const OneVsAllVMatrix &  o) [inline]

Definition at line 115 of file OneVsAllVMatrix.h.

Object* PLearn::toObjectPtr ( const StabilisationLearner &  o) [inline]

Definition at line 145 of file StabilisationLearner.h.

Object* PLearn::toObjectPtr ( const GaussianizeVMatrix &  o) [inline]

Definition at line 150 of file GaussianizeVMatrix.h.

Object* PLearn::toObjectPtr ( const EmpiricalDistribution &  o) [inline]

Definition at line 101 of file EmpiricalDistribution.h.

Object* PLearn::toObjectPtr ( const ProbabilityPairsVariable &  o) [inline]

Definition at line 143 of file ProbabilityPairsVariable.h.

Object* PLearn::toObjectPtr ( const StackedFocusedAutoassociatorsNet &  o) [inline]

Definition at line 365 of file StackedFocusedAutoassociatorsNet.h.

Object* PLearn::toObjectPtr ( const SecondIterationWrapper &  o) [inline]

Definition at line 118 of file SecondIterationWrapper.h.

Object* PLearn::toObjectPtr ( const ProductTransposeVariable &  o) [inline]

Definition at line 77 of file ProductTransposeVariable.h.

{
Object* PLearn::toObjectPtr ( const HeapTest &  o) [inline]

Definition at line 129 of file HeapTest.h.

Object* PLearn::toObjectPtr ( const SquaredErrModule &  o) [inline]

Definition at line 133 of file SquaredErrModule.h.

Object* PLearn::toObjectPtr ( const VPLCombinedLearner &  o) [inline]

Definition at line 183 of file VPLCombinedLearner.h.

Object* PLearn::toObjectPtr ( const GeneralizedOneHotVMatrix &  o) [inline]

Definition at line 110 of file GeneralizedOneHotVMatrix.h.

Object* PLearn::toObjectPtr ( const WeightedSumSquareVariable &  o) [inline]

Definition at line 78 of file WeightedSumSquareVariable.h.

{ return new WeightedSumSquareVariable(v,w); }
Object* PLearn::toObjectPtr ( const UpsideDownVMatrix &  o) [inline]

Definition at line 100 of file UpsideDownVMatrix.h.

Object* PLearn::toObjectPtr ( const SoftmaxLossVariable &  o) [inline]

Definition at line 77 of file SoftmaxLossVariable.h.

{ 
Object* PLearn::toObjectPtr ( const SumEntropyOfBernoullis &  o) [inline]

Definition at line 139 of file SumEntropyOfBernoullis.h.

Object* PLearn::toObjectPtr ( const MatRowVariable &  o) [inline]

Definition at line 82 of file MatRowVariable.h.

{ return new MatRowVariable(m,index); }
Object* PLearn::toObjectPtr ( const SparseIncrementalAffineTransformVariable &  o) [inline]

Definition at line 109 of file SparseIncrementalAffineTransformVariable.h.

{ 
Object* PLearn::toObjectPtr ( const SquareVariable &  o) [inline]

Definition at line 80 of file SquareVariable.h.

{ return new SquareVariable(v); }
Object* PLearn::toObjectPtr ( const OneHotVariable &  o) [inline]

Definition at line 84 of file OneHotVariable.h.

{ return new OneHotVariable(the_length, hotindex, coldvalue, hotvalue); }
Object* PLearn::toObjectPtr ( const AddLayersNNet &  o) [inline]

Definition at line 147 of file AddLayersNNet.h.

Object* PLearn::toObjectPtr ( const GaussMix &  o) [inline]

Definition at line 536 of file GaussMix.h.

Object* PLearn::toObjectPtr ( const MultiMaxVariable &  o) [inline]

Definition at line 162 of file MultiMaxVariable.h.

{ return new MultiMaxVariable(v, groupsizes, computation_type); }
Object* PLearn::toObjectPtr ( const MergeDond2Files &  o) [inline]

Definition at line 188 of file MergeDond2Files.h.

Object* PLearn::toObjectPtr ( const VariablesTest &  o) [inline]

Definition at line 122 of file VariablesTest.h.

Object* PLearn::toObjectPtr ( const ClassifierFromDensity &  o) [inline]

Definition at line 146 of file ClassifierFromDensity.h.

Object* PLearn::toObjectPtr ( const PythonFeatureSet &  o) [inline]

Definition at line 109 of file PythonFeatureSet.h.

Object* PLearn::toObjectPtr ( const MinusRowVariable &  o) [inline]

Definition at line 75 of file MinusRowVariable.h.

Object* PLearn::toObjectPtr ( const ScaledConditionalCDFSmoother &  o) [inline]

Definition at line 129 of file ScaledConditionalCDFSmoother.h.

Object* PLearn::toObjectPtr ( const CompactFileVMatrix &  o) [inline]

Definition at line 181 of file CompactFileVMatrix.h.

Object* PLearn::toObjectPtr ( const SelectInputSubsetLearner &  o) [inline]

Definition at line 149 of file SelectInputSubsetLearner.h.

Object* PLearn::toObjectPtr ( const MeshFace &  o) [inline]

Definition at line 142 of file MeshFace.h.

Object* PLearn::toObjectPtr ( const ConditionalCDFSmoother &  o) [inline]

Definition at line 127 of file ConditionalCDFSmoother.h.

Object* PLearn::toObjectPtr ( const ClassSubsetVMatrix &  o) [inline]

Definition at line 132 of file ClassSubsetVMatrix.h.

Object* PLearn::toObjectPtr ( const FeatureSet &  o) [inline]

Definition at line 132 of file FeatureSet.h.

Object* PLearn::toObjectPtr ( const ConditionalDensityNet &  o) [inline]

Definition at line 320 of file ConditionalDensityNet.h.

Object* PLearn::toObjectPtr ( const DichotomizeDond2DiscreteVariables &  o) [inline]

Definition at line 124 of file DichotomizeDond2DiscreteVariables.h.

Object* PLearn::toObjectPtr ( const AnalyzeDond2DiscreteVariables &  o) [inline]

Definition at line 123 of file AnalyzeDond2DiscreteVariables.h.

Object* PLearn::toObjectPtr ( const DisregardRowsVMatrix &  o) [inline]

Definition at line 145 of file DisregardRowsVMatrix.h.

Object* PLearn::toObjectPtr ( const ClassificationLossVariable &  o) [inline]

Definition at line 77 of file ClassificationLossVariable.h.

{ 
Object* PLearn::toObjectPtr ( const NetworkConnection &  o) [inline]

Definition at line 143 of file NetworkConnection.h.

Object* PLearn::toObjectPtr ( const GradNNetLayerModule &  o) [inline]

Definition at line 185 of file GradNNetLayerModule.h.

Object* PLearn::toObjectPtr ( const KNNRegressor &  o) [inline]

Definition at line 195 of file KNNRegressor.h.

Object* PLearn::toObjectPtr ( const LogOfGaussianDensityKernel &  o) [inline]

Definition at line 81 of file LogOfGaussianDensityKernel.h.

Object* PLearn::toObjectPtr ( const InferenceRBM &  o) [inline]

Definition at line 184 of file InferenceRBM.h.

Object* PLearn::toObjectPtr ( const VMatrixFromDistribution &  o) [inline]

Definition at line 125 of file VMatrixFromDistribution.h.

Object* PLearn::toObjectPtr ( const ConditionalGaussianDistribution &  o) [inline]

Definition at line 105 of file ConditionalGaussianDistribution.h.

Object* PLearn::toObjectPtr ( const UniformVMatrix &  o) [inline]

Definition at line 80 of file UniformVMatrix.h.

Object* PLearn::toObjectPtr ( const ViewSplitterVMatrix &  o) [inline]

Definition at line 121 of file ViewSplitterVMatrix.h.

Object* PLearn::toObjectPtr ( const VariableSelectionWithDirectedGradientDescent &  o) [inline]
Object* PLearn::toObjectPtr ( const LaplacianKernel &  o) [inline]

Definition at line 76 of file LaplacianKernel.h.

Object* PLearn::toObjectPtr ( const SubsamplingDBN &  o) [inline]

Definition at line 439 of file SubsamplingDBN.h.

Object* PLearn::toObjectPtr ( const MemoryVMatrix &  o) [inline]

Definition at line 117 of file MemoryVMatrix.h.

Object* PLearn::toObjectPtr ( const SetOption &  o) [inline]

Definition at line 113 of file SetOption.h.

Object* PLearn::toObjectPtr ( const DiscriminativeRBM &  o) [inline]

Definition at line 311 of file DiscriminativeRBM.h.

Object* PLearn::toObjectPtr ( const InsertZerosVariable &  o) [inline]

Definition at line 72 of file InsertZerosVariable.h.

{ return new InsertZerosVariable(v, the_rows); }
Object* PLearn::toObjectPtr ( const FileDictionary &  o) [inline]

Definition at line 118 of file FileDictionary.h.

Object* PLearn::toObjectPtr ( const AffineTransformWeightPenalty &  o) [inline]

Definition at line 111 of file AffineTransformWeightPenalty.h.

{ return new AffineTransformWeightPenalty(transformation, weight_decay, bias_decay, penalty_type); } 
Object* PLearn::toObjectPtr ( const ConditionalMeanImputationVMatrix &  o) [inline]

Definition at line 109 of file ConditionalMeanImputationVMatrix.h.

Object * PLearn::toObjectPtr ( const RBMBinomialLayer &  o) [inline]

Definition at line 127 of file DEPRECATED/RBMBinomialLayer.h.

Object* PLearn::toObjectPtr ( const KernelRidgeRegressor &  o) [inline]

Definition at line 170 of file KernelRidgeRegressor.h.

Object* PLearn::toObjectPtr ( const Redirect &  o) [inline]

Definition at line 119 of file Redirect.h.

Object* PLearn::toObjectPtr ( const GaussianKernel &  o) [inline]

Definition at line 121 of file GaussianKernel.h.

Object* PLearn::toObjectPtr ( const ConditionalDistribution &  o) [inline]

Definition at line 88 of file ConditionalDistribution.h.

Object* PLearn::toObjectPtr ( const SoftmaxModule &  o) [inline]

Definition at line 132 of file SoftmaxModule.h.

Object* PLearn::toObjectPtr ( const PartSupervisedDBN &  o) [inline]

Definition at line 375 of file PartSupervisedDBN.h.

Object* PLearn::toObjectPtr ( const SupervisedDBN &  o) [inline]

Definition at line 383 of file SupervisedDBN.h.

Object * PLearn::toObjectPtr ( const PTester &  o) [inline]

Definition at line 133 of file PExperiment.h.

Object* PLearn::toObjectPtr ( const TupleTest &  o) [inline]

Definition at line 126 of file TupleTest.h.

Object* PLearn::toObjectPtr ( const BinaryClassificationLossVariable &  o) [inline]

Definition at line 84 of file BinaryClassificationLossVariable.h.

{ 
Object* PLearn::toObjectPtr ( const LocalNeighborsDifferencesVMatrix &  o) [inline]

Definition at line 120 of file LocalNeighborsDifferencesVMatrix.h.

{
Object* PLearn::toObjectPtr ( const StackedSplitter &  o) [inline]

Definition at line 132 of file StackedSplitter.h.

Object* PLearn::toObjectPtr ( const EntropyContrast &  o) [inline]

Definition at line 281 of file EntropyContrast.h.

Object* PLearn::toObjectPtr ( const KernelProjection &  o) [inline]

Definition at line 189 of file KernelProjection.h.

Object* PLearn::toObjectPtr ( const OneHotSquaredLoss &  o) [inline]

Definition at line 86 of file OneHotSquaredLoss.h.

{ 
Object* PLearn::toObjectPtr ( const DTWKernel &  o) [inline]

Definition at line 154 of file DTWKernel.h.

Object* PLearn::toObjectPtr ( const PentaTest &  o) [inline]

Definition at line 130 of file PentaTest.h.

Object* PLearn::toObjectPtr ( const RealFunctionOfInputFeature &  o) [inline]

Definition at line 121 of file RealFunctionOfInputFeature.h.

Object* PLearn::toObjectPtr ( const RealFunctionFromKernel &  o) [inline]

Definition at line 120 of file RealFunctionFromKernel.h.

Object* PLearn::toObjectPtr ( const TangentLearner &  o) [inline]

Definition at line 206 of file TangentLearner.h.

Object* PLearn::toObjectPtr ( const ManualBinner &  o) [inline]

Definition at line 116 of file ManualBinner.h.

Object* PLearn::toObjectPtr ( const MaxSubsamplingTest &  o) [inline]

Definition at line 136 of file MaxSubsamplingTest.h.

Object* PLearn::toObjectPtr ( const IsSmallerVariable &  o) [inline]

Definition at line 74 of file IsSmallerVariable.h.

{ return new IsSmallerVariable(v1, v2); }
Object* PLearn::toObjectPtr ( const KFoldLogisticClassifier &  o) [inline]

Definition at line 177 of file KFoldLogisticClassifier.h.

Object* PLearn::toObjectPtr ( const SoftSlopeVariable &  o) [inline]

Definition at line 79 of file SoftSlopeVariable.h.

{ return new SoftSlopeVariable(x,smoothness,left,right); }
Object* PLearn::toObjectPtr ( const LocalGaussianClassifier &  o) [inline]

Definition at line 214 of file LocalGaussianClassifier.h.

Object* PLearn::toObjectPtr ( const MeshVertex &  o) [inline]

Definition at line 129 of file MeshVertex.h.

Object* PLearn::toObjectPtr ( const FeatureSetNaiveBayesClassifier &  o) [inline]

Definition at line 165 of file FeatureSetNaiveBayesClassifier.h.

Object* PLearn::toObjectPtr ( const SemiSupervisedProbClassCostVariable &  o) [inline]

Definition at line 127 of file SemiSupervisedProbClassCostVariable.h.

Object* PLearn::toObjectPtr ( const HyperLearner &  o) [inline]

Definition at line 123 of file HyperLearner.h.

Object* PLearn::toObjectPtr ( const MeshEdge &  o) [inline]

Definition at line 120 of file MeshEdge.h.

Object* PLearn::toObjectPtr ( const RowsSubVMatrix &  o) [inline]

Definition at line 102 of file RowsSubVMatrix.h.

Object* PLearn::toObjectPtr ( const CenteredVMatrix &  o) [inline]

Definition at line 120 of file CenteredVMatrix.h.

Object* PLearn::toObjectPtr ( const ProcessingVMatrix &  o) [inline]

Definition at line 127 of file ProcessingVMatrix.h.

Object* PLearn::toObjectPtr ( const SaltPepperNoiseVariable &  o) [inline]

Definition at line 143 of file SaltPepperNoiseVariable.h.

Object* PLearn::toObjectPtr ( const PotentialsVariable &  o) [inline]

Definition at line 95 of file PotentialsVariable.h.

{ return new PotentialsVariable(the_input, the_comp_input, the_dp_target, the_target_dist_rep, the_output, the_proppath_params, the_distr); }
Object* PLearn::toObjectPtr ( const SourceVariable &  o) [inline]

Definition at line 118 of file SourceVariable.h.

Object* PLearn::toObjectPtr ( const MinVariable &  o) [inline]

Definition at line 68 of file MinVariable.h.

{ return new MinVariable(v); }
Object* PLearn::toObjectPtr ( const HyperSetOption &  o) [inline]

Definition at line 115 of file HyperSetOption.h.

Object* PLearn::toObjectPtr ( const SemiSupervisedDBN &  o) [inline]

Definition at line 170 of file SemiSupervisedDBN.h.

Object* PLearn::toObjectPtr ( const HTMLHelpGenerator &  o) [inline]

Definition at line 116 of file HTMLHelpGenerator.h.

Object* PLearn::toObjectPtr ( const SymbolNode &  o) [inline]

Definition at line 144 of file SymbolNode.h.

Object* PLearn::toObjectPtr ( const MatrixAffineTransformFeedbackVariable &  o) [inline]

Definition at line 75 of file MatrixAffineTransformFeedbackVariable.h.

Object* PLearn::toObjectPtr ( const StatefulLearner &  o) [inline]

Definition at line 153 of file StatefulLearner.h.

Object* PLearn::toObjectPtr ( const SplitModule &  o) [inline]

Definition at line 184 of file SplitModule.h.

Object* PLearn::toObjectPtr ( const SelectRowsVMatrix &  o) [inline]

Definition at line 140 of file SelectRowsVMatrix.h.

Object* PLearn::toObjectPtr ( const DiverseComponentAnalysis &  o) [inline]

Definition at line 240 of file DiverseComponentAnalysis.h.

Object* PLearn::toObjectPtr ( const AdaBoost &  o) [inline]

Definition at line 226 of file AdaBoost.h.

Object* PLearn::toObjectPtr ( const RepeatSplitter &  o) [inline]

Definition at line 131 of file RepeatSplitter.h.

Object* PLearn::toObjectPtr ( const SoftSoftMaxVariable &  o) [inline]

Definition at line 133 of file SoftSoftMaxVariable.h.

Object* PLearn::toObjectPtr ( const Kernel &  o) [inline]

Definition at line 270 of file Kernel.h.

: public PP<Kernel>
Object* PLearn::toObjectPtr ( const ReorderByMissingVMatrix &  o) [inline]

Definition at line 107 of file ReorderByMissingVMatrix.h.

Object* PLearn::toObjectPtr ( const MatrixAffineTransformVariable &  o) [inline]

Definition at line 76 of file MatrixAffineTransformVariable.h.

Object* PLearn::toObjectPtr ( const VMatLanguage &  o) [inline]

Definition at line 163 of file VMatLanguage.h.

: public RowBufferedVMatrix
Object* PLearn::toObjectPtr ( const RegularGridVMatrix &  o) [inline]

Definition at line 109 of file RegularGridVMatrix.h.

Object* PLearn::toObjectPtr ( const BinaryVariable &  o) [inline]

Definition at line 101 of file BinaryVariable.h.

Object* PLearn::toObjectPtr ( const DivVariable &  o) [inline]

Definition at line 79 of file DivVariable.h.

Object* PLearn::toObjectPtr ( const CachedFeatureSet &  o) [inline]

Definition at line 139 of file CachedFeatureSet.h.

Object* PLearn::toObjectPtr ( const TanhModule &  o) [inline]

Definition at line 137 of file TanhModule.h.

Object* PLearn::toObjectPtr ( const SigmoidPrimitiveKernel &  o) [inline]

Definition at line 76 of file SigmoidPrimitiveKernel.h.

Object* PLearn::toObjectPtr ( const BinaryBallTree &  o) [inline]

Definition at line 130 of file BinaryBallTree.h.

Object* PLearn::toObjectPtr ( const GenericNearestNeighbors &  o) [inline]

Definition at line 179 of file GenericNearestNeighbors.h.

Object* PLearn::toObjectPtr ( const MinusTransposedColumnVariable &  o) [inline]

Definition at line 74 of file MinusTransposedColumnVariable.h.

Object* PLearn::toObjectPtr ( const BasisSelectionRegressor &  o) [inline]

Definition at line 248 of file BasisSelectionRegressor.h.

Object* PLearn::toObjectPtr ( const MoleculeTemplateLearner &  o) [inline]

Definition at line 236 of file MoleculeTemplateLearner.h.

Object* PLearn::toObjectPtr ( const NonLocalManifoldParzenKernel &  o) [inline]

Definition at line 83 of file NonLocalManifoldParzenKernel.h.

Object* PLearn::toObjectPtr ( const YMDDatedVMatrix &  o) [inline]

Definition at line 141 of file YMDDatedVMatrix.h.

Object* PLearn::toObjectPtr ( const InfiniteMNISTVMatrix &  o) [inline]

Definition at line 168 of file InfiniteMNISTVMatrix.h.

Object* PLearn::toObjectPtr ( const RandomNeighborsDifferencesVMatrix &  o) [inline]

Definition at line 117 of file RandomNeighborsDifferencesVMatrix.h.

{
Object* PLearn::toObjectPtr ( const DivisiveNormalizationKernel &  o) [inline]

Definition at line 154 of file DivisiveNormalizationKernel.h.

Object* PLearn::toObjectPtr ( const IdentityFeatureSet &  o) [inline]

Definition at line 101 of file IdentityFeatureSet.h.

Object* PLearn::toObjectPtr ( const SigmoidalKernel &  o) [inline]

Definition at line 73 of file SigmoidalKernel.h.

Object* PLearn::toObjectPtr ( const ExtendedVMatrix &  o) [inline]

Definition at line 116 of file ExtendedVMatrix.h.

Object* PLearn::toObjectPtr ( const FileVMatrix &  o) [inline]

Definition at line 134 of file FileVMatrix.h.

Object* PLearn::toObjectPtr ( const SoftmaxNLLCostModule &  o) [inline]

Definition at line 147 of file SoftmaxNLLCostModule.h.

Object* PLearn::toObjectPtr ( const TrainValidTestSplitter &  o) [inline]

Definition at line 141 of file TrainValidTestSplitter.h.

Object* PLearn::toObjectPtr ( const RBMModule &  o) [inline]

Definition at line 388 of file RBMModule.h.

Object* PLearn::toObjectPtr ( const ExpMeanStatsIterator &  o) [inline]

Definition at line 161 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const RBMClassificationModule &  o) [inline]

Definition at line 190 of file RBMClassificationModule.h.

Object* PLearn::toObjectPtr ( const ShuffleColumnsVMatrix &  o) [inline]

Definition at line 110 of file ShuffleColumnsVMatrix.h.

Object* PLearn::toObjectPtr ( const DictionaryVMatrix &  o) [inline]

Definition at line 186 of file DictionaryVMatrix.h.

Object* PLearn::toObjectPtr ( const GramVMatrix &  o) [inline]

Definition at line 116 of file GramVMatrix.h.

Object* PLearn::toObjectPtr ( const ComputePurenneError &  o) [inline]

Definition at line 79 of file ComputePurenneError.h.

Object* PLearn::toObjectPtr ( const PolynomialKernel &  o) [inline]

Definition at line 103 of file PolynomialKernel.h.

Object* PLearn::toObjectPtr ( const TrainTestSplitter &  o) [inline]

Definition at line 127 of file TrainTestSplitter.h.

Object* PLearn::toObjectPtr ( const OneHotVMatrix &  o) [inline]

Definition at line 113 of file OneHotVMatrix.h.

Object* PLearn::toObjectPtr ( const RBMRateLayer &  o) [inline]

Definition at line 158 of file RBMRateLayer.h.

Object* PLearn::toObjectPtr ( const SubVMatrix &  o) [inline]

Definition at line 126 of file SubVMatrix.h.

Object* PLearn::toObjectPtr ( const NeuralNet &  o) [inline]

Definition at line 158 of file NeuralNet.h.

Object* PLearn::toObjectPtr ( const MultiTaskSeparationSplitter &  o) [inline]

Definition at line 139 of file MultiTaskSeparationSplitter.h.

Object* PLearn::toObjectPtr ( const MatrixSoftmaxVariable &  o) [inline]

Definition at line 71 of file MatrixSoftmaxVariable.h.

Object* PLearn::toObjectPtr ( const MeanMedianModeImputationVMatrix &  o) [inline]

Definition at line 127 of file MeanMedianModeImputationVMatrix.h.

Object* PLearn::toObjectPtr ( const VMatrix &  o) [inline]

Definition at line 901 of file VMatrix.h.

Object* PLearn::toObjectPtr ( const RBMSparse1DMatrixConnection &  o) [inline]

Definition at line 146 of file RBMSparse1DMatrixConnection.h.

Object* PLearn::toObjectPtr ( const HeterogenuousAffineTransformWeightPenalty &  o) [inline]

Definition at line 119 of file HeterogenuousAffineTransformWeightPenalty.h.

{ return new HeterogenuousAffineTransformWeightPenalty(input, weights, the_input_is_discrete, weight_decay, bias_decay, penalty_type); }
Object* PLearn::toObjectPtr ( const TestLearner &  o) [inline]

Definition at line 176 of file TestLearner.h.

Object* PLearn::toObjectPtr ( const JulianizeVMatrix &  o) [inline]

Definition at line 157 of file JulianizeVMatrix.h.

Object* PLearn::toObjectPtr ( const MeanStatsIterator &  o) [inline]

Definition at line 134 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const IsomapTangentLearner &  o) [inline]

Definition at line 181 of file IsomapTangentLearner.h.

Object* PLearn::toObjectPtr ( const RBMWoodsLayer &  o) [inline]

Definition at line 211 of file RBMWoodsLayer.h.

Object* PLearn::toObjectPtr ( const MissingInstructionVMatrix &  o) [inline]

Definition at line 133 of file MissingInstructionVMatrix.h.

Object* PLearn::toObjectPtr ( const ProcessInputCostModule &  o) [inline]

Definition at line 190 of file ProcessInputCostModule.h.

Object* PLearn::toObjectPtr ( const ConstrainedSourceVariable &  o) [inline]

Definition at line 124 of file ConstrainedSourceVariable.h.

Object* PLearn::toObjectPtr ( const EmbeddedSequentialLearner &  o) [inline]

Declares a few other classes and functions related to this class.

Definition at line 113 of file EmbeddedSequentialLearner.h.

Object* PLearn::toObjectPtr ( const TransposeVariable &  o) [inline]

Definition at line 36 of file TransposeVariable.h.

{ return new TransposeVariable(v); }
Object* PLearn::toObjectPtr ( const IsLargerVariable &  o) [inline]

Definition at line 75 of file IsLargerVariable.h.

{ return new IsLargerVariable(v1, v2); }
Object* PLearn::toObjectPtr ( const ConstantVMatrix &  o) [inline]

Definition at line 114 of file ConstantVMatrix.h.

Object* PLearn::toObjectPtr ( const TransposeProductVariable &  o) [inline]

Definition at line 77 of file TransposeProductVariable.h.

{
Object* PLearn::toObjectPtr ( const Correspondence &  o) [inline]

Definition at line 117 of file Correspondence.h.

Object* PLearn::toObjectPtr ( const MeanImputationVMatrix &  o) [inline]

Definition at line 113 of file MeanImputationVMatrix.h.

Object* PLearn::toObjectPtr ( const ManifoldParzen2 &  o) [inline]

Definition at line 139 of file ManifoldParzen2.h.

Object* PLearn::toObjectPtr ( const RBMGenericParameters &  o) [inline]

Definition at line 214 of file RBMGenericParameters.h.

Object* PLearn::toObjectPtr ( const ClassErrorCostModule &  o) [inline]

Definition at line 150 of file ClassErrorCostModule.h.

Object* PLearn::toObjectPtr ( const OptionsOracle &  o) [inline]

Definition at line 132 of file OptionsOracle.h.

Object* PLearn::toObjectPtr ( const LinearRegressor &  o) [inline]

Definition at line 210 of file LinearRegressor.h.

Object* PLearn::toObjectPtr ( const DiagonalizedFactorsProductVariable &  o) [inline]

Definition at line 85 of file DiagonalizedFactorsProductVariable.h.

{ return new DiagonalizedFactorsProductVariable(left_matrix,center_diagonal,right_matrix); }
Object* PLearn::toObjectPtr ( const ManifoldKNNDistribution &  o) [inline]

Definition at line 198 of file ManifoldKNNDistribution.h.

Object* PLearn::toObjectPtr ( const Z &  o) [inline]

Definition at line 219 of file ObjectGraphIteratorTest.cc.

{
Object* PLearn::toObjectPtr ( const ExhaustiveNearestNeighbors &  o) [inline]

Definition at line 197 of file ExhaustiveNearestNeighbors.h.

Object* PLearn::toObjectPtr ( const MultiInstanceVMatrix &  o) [inline]

Definition at line 109 of file MultiInstanceVMatrix.h.

Object* PLearn::toObjectPtr ( const DatedVMatrix &  o) [inline]

Definition at line 112 of file DatedVMatrix.h.

Object* PLearn::toObjectPtr ( const UniformizeVMatrix &  o) [inline]

Definition at line 132 of file UniformizeVMatrix.h.

Object* PLearn::toObjectPtr ( const NetworkModule &  o) [inline]

Definition at line 185 of file NetworkModule.h.

Object* PLearn::toObjectPtr ( const SumOfVariable &  o) [inline]

Definition at line 158 of file SumOfVariable.h.

{ 
Object* PLearn::toObjectPtr ( const PutSubVMatrix &  o) [inline]

Definition at line 121 of file PutSubVMatrix.h.

Object* PLearn::toObjectPtr ( const NeuralProbabilisticLanguageModel &  o) [inline]

Definition at line 465 of file NeuralProbabilisticLanguageModel.h.

Object* PLearn::toObjectPtr ( const MatrixElementsVariable &  o) [inline]

Definition at line 92 of file MatrixElementsVariable.h.

{ return new MatrixElementsVariable(expression, i, j, ni, nj, parameters); }
Object* PLearn::toObjectPtr ( const SourceKernel &  o) [inline]

Definition at line 129 of file SourceKernel.h.

Object* PLearn::toObjectPtr ( const RBMJointLLParameters &  o) [inline]

Definition at line 184 of file RBMJointLLParameters.h.

Object* PLearn::toObjectPtr ( const NegKernel &  o) [inline]

Definition at line 74 of file NegKernel.h.

{ return new NegKernel(k); }
Object* PLearn::toObjectPtr ( const GetInputVMatrix &  o) [inline]

Definition at line 115 of file GetInputVMatrix.h.

{
Object* PLearn::toObjectPtr ( const KPCATangentLearner &  o) [inline]

Definition at line 179 of file KPCATangentLearner.h.

Object* PLearn::toObjectPtr ( const FilterSplitter &  o) [inline]

Definition at line 126 of file FilterSplitter.h.

Object* PLearn::toObjectPtr ( const SelectColumnsVMatrix &  o) [inline]

Definition at line 149 of file SelectColumnsVMatrix.h.

Object* PLearn::toObjectPtr ( const NegCrossEntropySigmoidVariable &  o) [inline]

Definition at line 87 of file NegCrossEntropySigmoidVariable.h.

{
Object* PLearn::toObjectPtr ( const SurfaceTemplateLearner &  o) [inline]

Definition at line 148 of file SurfaceTemplateLearner.h.

Object* PLearn::toObjectPtr ( const DiscriminativeDeepBeliefNet &  o) [inline]

Definition at line 315 of file DiscriminativeDeepBeliefNet.h.

Object* PLearn::toObjectPtr ( const PPathTest &  o) [inline]

Definition at line 126 of file PPathTest.h.

Object* PLearn::toObjectPtr ( const HorizonStatefulLearner &  o) [inline]

Definition at line 106 of file HorizonStatefulLearner.h.

Object* PLearn::toObjectPtr ( const StddevStatsIterator &  o) [inline]

Definition at line 190 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const BinaryKernelDiscrimination &  o) [inline]

Definition at line 146 of file BinaryKernelDiscrimination.h.

Object* PLearn::toObjectPtr ( const SquaredExponentialARDKernel &  o) [inline]

Definition at line 153 of file SquaredExponentialARDKernel.h.

Object* PLearn::toObjectPtr ( const PLStringutilsTest &  o) [inline]

Definition at line 126 of file PLStringutilsTest.h.

Object* PLearn::toObjectPtr ( const ConditionalDictionary &  o) [inline]

Definition at line 137 of file ConditionalDictionary.h.

Object* PLearn::toObjectPtr ( const Cov2CorrVariable &  o) [inline]

Definition at line 82 of file Cov2CorrVariable.h.

{ return new Cov2CorrVariable(v,diagonal_choice,epsilon); }
Object* PLearn::toObjectPtr ( const MatrixSoftmaxLossVariable &  o) [inline]

Definition at line 77 of file MatrixSoftmaxLossVariable.h.

Object* PLearn::toObjectPtr ( const UCISpecification &  o) [inline]

Definition at line 127 of file UCISpecification.h.

Object* PLearn::toObjectPtr ( const PTimer &  o) [inline]

Definition at line 142 of file PTimer.h.

Object* PLearn::toObjectPtr ( const ClassErrorCostFunction &  o) [inline]

Definition at line 99 of file ClassErrorCostFunction.h.

{ 
Object* PLearn::toObjectPtr ( const RankedVMatrix &  o) [inline]

Definition at line 128 of file RankedVMatrix.h.

Object* PLearn::toObjectPtr ( const NGramDistribution &  o) [inline]

Definition at line 182 of file NGramDistribution.h.

Object* PLearn::toObjectPtr ( const RBMMultitaskClassificationModule &  o) [inline]

Definition at line 201 of file RBMMultitaskClassificationModule.h.

Object* PLearn::toObjectPtr ( const Grapher &  o) [inline]

Definition at line 127 of file Grapher.h.

Object* PLearn::toObjectPtr ( const KernelPCA &  o) [inline]

Definition at line 124 of file KernelPCA.h.

Object* PLearn::toObjectPtr ( const VarRowVariable &  o) [inline]

Definition at line 78 of file VarRowVariable.h.

Object* PLearn::toObjectPtr ( const PRandom &  o) [inline]

Definition at line 307 of file PRandom.h.

Object* PLearn::toObjectPtr ( const IfThenElseVariable &  o) [inline]

Definition at line 84 of file IfThenElseVariable.h.

{ return new IfThenElseVariable(If,Then,Else); }
Object* PLearn::toObjectPtr ( const TopDownAsymetricDeepNetwork &  o) [inline]

Definition at line 282 of file TopDownAsymetricDeepNetwork.h.

Object* PLearn::toObjectPtr ( const PLearner &  o) [inline]

Definition at line 727 of file PLearner.h.

Object* PLearn::toObjectPtr ( const GaussPartSupervisedDBN &  o) [inline]

Definition at line 380 of file GaussPartSupervisedDBN.h.

Object* PLearn::toObjectPtr ( const MultiClassAdaBoost &  o) [inline]

Definition at line 220 of file MultiClassAdaBoost.h.

Object* PLearn::toObjectPtr ( const NatGradSMPNNet &  o) [inline]

Definition at line 364 of file NatGradSMPNNet.h.

template<class ParentT >
Object* PLearn::toObjectPtr ( const TypedParentableObject< ParentT > &  o) [inline]

Definition at line 213 of file ParentableObject.h.

Object* PLearn::toObjectPtr ( const StochasticBinarizeVMatrix &  o) [inline]

Definition at line 118 of file StochasticBinarizeVMatrix.h.

Object* PLearn::toObjectPtr ( const DynamicallyLinkedRBMsModel &  o) [inline]

Definition at line 291 of file DynamicallyLinkedRBMsModel.h.

Object* PLearn::toObjectPtr ( const KMeansClustering &  o) [inline]

Definition at line 132 of file KMeansClustering.h.

Object* PLearn::toObjectPtr ( const CrossEntropyVariable &  o) [inline]

Definition at line 74 of file CrossEntropyVariable.h.

{ return new CrossEntropyVariable(network_output, targets); }
Object * PLearn::toObjectPtr ( const RBMTruncExpLayer &  o) [inline]

Definition at line 128 of file DEPRECATED/RBMTruncExpLayer.h.

Object* PLearn::toObjectPtr ( const GradientAdaboostCostVariable &  o) [inline]

Definition at line 80 of file GradientAdaboostCostVariable.h.

{
Object* PLearn::toObjectPtr ( const SumVarianceOfLinearTransformedCategoricals &  o) [inline]
Object* PLearn::toObjectPtr ( const CompactVMatrixPolynomialKernel &  o) [inline]

Definition at line 82 of file CompactVMatrixPolynomialKernel.h.

Object* PLearn::toObjectPtr ( const ForwardModule &  o) [inline]

Definition at line 178 of file ForwardModule.h.

Object* PLearn::toObjectPtr ( const StrTableVMatrix &  o) [inline]

Definition at line 60 of file StrTableVMatrix.h.

Object* PLearn::toObjectPtr ( const GradientCorrector &  o) [inline]

Definition at line 132 of file GradientCorrector.h.

Object* PLearn::toObjectPtr ( const ShellScript &  o) [inline]

Definition at line 117 of file ShellScript.h.

Object* PLearn::toObjectPtr ( const NatGradNNet &  o) [inline]

Definition at line 314 of file NatGradNNet.h.

Object* PLearn::toObjectPtr ( const mNNet &  o) [inline]

Definition at line 220 of file mNNet.h.

Object* PLearn::toObjectPtr ( const DeterminantVariable &  o) [inline]

Definition at line 76 of file DeterminantVariable.h.

{ return new DeterminantVariable(m); }
Object* PLearn::toObjectPtr ( const CutBelowThresholdVariable &  o) [inline]

Definition at line 74 of file CutBelowThresholdVariable.h.

{ return new CutBelowThresholdVariable(v,threshold); }
Object* PLearn::toObjectPtr ( const CCCostVariable &  o) [inline]

Definition at line 97 of file CCCostVariable.h.

{ return new CCCostVariable(distr,the_f_error,the_f_candidate); }
Object* PLearn::toObjectPtr ( const Train &  o) [inline]

Definition at line 122 of file Train.h.

Object* PLearn::toObjectPtr ( const AutoVMatrix &  o) [inline]

Definition at line 103 of file AutoVMatrix.h.

Object* PLearn::toObjectPtr ( const IncrementalNNet &  o) [inline]

Definition at line 254 of file IncrementalNNet.h.

Object* PLearn::toObjectPtr ( const ConvolveVariable &  o) [inline]

Definition at line 72 of file ConvolveVariable.h.

{ return new ConvolveVariable(input, mask); }
Object* PLearn::toObjectPtr ( const SequentialValidation &  o) [inline]

Declares a few other classes and functions related to this class.

Definition at line 265 of file SequentialValidation.h.

Object* PLearn::toObjectPtr ( const ProductVariable &  o) [inline]

Definition at line 77 of file ProductVariable.h.

{  return new ProductVariable(v1,v2); }
Object* PLearn::toObjectPtr ( const RunICPVariable &  o) [inline]

Definition at line 181 of file RunICPVariable.h.

Object* PLearn::toObjectPtr ( const DifferenceKernel &  o) [inline]

Definition at line 67 of file DifferenceKernel.h.

Object* PLearn::toObjectPtr ( const KNNClassifier &  o) [inline]

Definition at line 217 of file KNNClassifier.h.

Object* PLearn::toObjectPtr ( const SignVariable &  o) [inline]

Definition at line 70 of file SignVariable.h.

{ return new SignVariable(input); }
Object* PLearn::toObjectPtr ( const SoftplusVariable &  o) [inline]

Definition at line 77 of file SoftplusVariable.h.

{ return new SoftplusVariable(v); }
Object* PLearn::toObjectPtr ( const SquareRootVariable &  o) [inline]

Definition at line 71 of file SquareRootVariable.h.

{ return new SquareRootVariable(v);}
Object* PLearn::toObjectPtr ( const ConcatOfVariable &  o) [inline]

Definition at line 85 of file ConcatOfVariable.h.

{ return new ConcatOfVariable(distr,f); }
Object* PLearn::toObjectPtr ( const CartesianProductOracle &  o) [inline]

Definition at line 111 of file CartesianProductOracle.h.

Object* PLearn::toObjectPtr ( const PyPLearnScript &  o) [inline]

Definition at line 183 of file PyPLearnScript.h.

{ time_t d=0; return smartLoadObject(filepath, args, d); }
Object* PLearn::toObjectPtr ( const PLMathTest &  o) [inline]

Definition at line 128 of file PLMathTest.h.

Object* PLearn::toObjectPtr ( const Optimizer &  o) [inline]

Definition at line 181 of file Optimizer.h.

Object* PLearn::toObjectPtr ( const UnfoldedSumOfVariable &  o) [inline]

Definition at line 89 of file UnfoldedSumOfVariable.h.

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }
Object* PLearn::toObjectPtr ( const TimesVariable &  o) [inline]

Definition at line 75 of file TimesVariable.h.

{
Object* PLearn::toObjectPtr ( const FixDond2BinaryVariables &  o) [inline]

Definition at line 137 of file FixDond2BinaryVariables.h.

Object* PLearn::toObjectPtr ( const SubsampleVariable &  o) [inline]

Definition at line 79 of file SubsampleVariable.h.

{ return new SubsampleVariable(input, subsample_factor); }
Object* PLearn::toObjectPtr ( const ToBagSplitter &  o) [inline]

Definition at line 136 of file ToBagSplitter.h.

Object* PLearn::toObjectPtr ( const LayerCostModule &  o) [inline]

Definition at line 245 of file LayerCostModule.h.

Object* PLearn::toObjectPtr ( const RegressionTreeLeave &  o) [inline]

Definition at line 118 of file RegressionTreeLeave.h.

Object* PLearn::toObjectPtr ( const RegressionTreeMulticlassLeaveProb &  o) [inline]

Definition at line 96 of file RegressionTreeMulticlassLeaveProb.h.

Object* PLearn::toObjectPtr ( const LocallyPrecomputedVMatrix &  o) [inline]

Definition at line 113 of file LocallyPrecomputedVMatrix.h.

Object* PLearn::toObjectPtr ( const SumSquareVariable &  o) [inline]

Definition at line 71 of file SumSquareVariable.h.

{ return new SumSquareVariable(v); }
Object* PLearn::toObjectPtr ( const FileVMatrixTest &  o) [inline]

Definition at line 130 of file FileVMatrixTest.h.

Object* PLearn::toObjectPtr ( const ArgmaxVariable &  o) [inline]

Definition at line 74 of file ArgmaxVariable.h.

{ return new ArgmaxVariable(v); }
Object* PLearn::toObjectPtr ( const AdditiveNormalizationKernel &  o) [inline]

Definition at line 163 of file AdditiveNormalizationKernel.h.

Object* PLearn::toObjectPtr ( const FeatureSetSequentialCRF &  o) [inline]

Definition at line 434 of file FeatureSetSequentialCRF.h.

Object* PLearn::toObjectPtr ( const CosKernel &  o) [inline]

Definition at line 72 of file CosKernel.h.

Object* PLearn::toObjectPtr ( const DuplicateColumnVariable &  o) [inline]

Definition at line 79 of file DuplicateColumnVariable.h.

{ 
Object* PLearn::toObjectPtr ( const WeightedCostFunction &  o) [inline]

Definition at line 80 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
Object* PLearn::toObjectPtr ( const RealFunctionsProcessedVMatrix &  o) [inline]

Definition at line 113 of file RealFunctionsProcessedVMatrix.h.

Object* PLearn::toObjectPtr ( const NoSplitSplitter &  o) [inline]

Definition at line 124 of file NoSplitSplitter.h.

Object* PLearn::toObjectPtr ( const Max2Variable &  o) [inline]

Definition at line 78 of file Max2Variable.h.

{ return new Max2Variable(v1,v2); }
Object* PLearn::toObjectPtr ( const FeatureSetNNet &  o) [inline]

Definition at line 441 of file FeatureSetNNet.h.

Object* PLearn::toObjectPtr ( const LocallyMagnifiedDistribution &  o) [inline]

Definition at line 161 of file LocallyMagnifiedDistribution.h.

Object* PLearn::toObjectPtr ( const TimesColumnVariable &  o) [inline]

Definition at line 80 of file TimesColumnVariable.h.

Object* PLearn::toObjectPtr ( const VarUtilsTest &  o) [inline]

Definition at line 130 of file VarUtilsTest.h.

Object* PLearn::toObjectPtr ( const SumVariable &  o) [inline]

Definition at line 77 of file SumVariable.h.

{ 
Object* PLearn::toObjectPtr ( const MaxStatsIterator &  o) [inline]

Definition at line 300 of file StatsIterator.h.

: public StatsIterator
Object* PLearn::toObjectPtr ( const PLS &  o) [inline]

Definition at line 192 of file PLS.h.

Object* PLearn::toObjectPtr ( const DoubleProductVariable &  o) [inline]

Definition at line 138 of file DoubleProductVariable.h.

Object* PLearn::toObjectPtr ( const NllSemisphericalGaussianVariable &  o) [inline]

Definition at line 91 of file NllSemisphericalGaussianVariable.h.

{
Object* PLearn::toObjectPtr ( const BinaryOpVMatrix &  o) [inline]

Definition at line 121 of file BinaryOpVMatrix.h.

Object* PLearn::toObjectPtr ( const OptimizeOptionOracle &  o) [inline]

Definition at line 128 of file OptimizeOptionOracle.h.

Object* PLearn::toObjectPtr ( const MatrixInverseVariable &  o) [inline]

Definition at line 71 of file MatrixInverseVariable.h.

{
Object* PLearn::toObjectPtr ( const ReIndexedTargetVariable &  o) [inline]

Definition at line 103 of file ReIndexedTargetVariable.h.

{ return new ReIndexedTargetVariable(target,input,source,target_cols); }
Object* PLearn::toObjectPtr ( const CrossReferenceVMatrix &  o) [inline]

Definition at line 95 of file CrossReferenceVMatrix.h.

Object* PLearn::toObjectPtr ( const HeterogenuousAffineTransformVariable &  o) [inline]

Definition at line 113 of file HeterogenuousAffineTransformVariable.h.

{ return new HeterogenuousAffineTransformVariable(input, weights, the_input_is_discrete); }
Object* PLearn::toObjectPtr ( const Binner &  o) [inline]

Definition at line 123 of file Binner.h.

Object* PLearn::toObjectPtr ( const TransformOutputLearner &  o) [inline]

Definition at line 134 of file TransformOutputLearner.h.

Object* PLearn::toObjectPtr ( const RealFunction &  o) [inline]

Definition at line 129 of file RealFunction.h.

Object* PLearn::toObjectPtr ( const AddBagInformationVMatrix &  o) [inline]

Definition at line 126 of file AddBagInformationVMatrix.h.

Object* PLearn::toObjectPtr ( const JoinVMatrix &  o) [inline]

Definition at line 112 of file JoinVMatrix.h.

Object* PLearn::toObjectPtr ( const SourceVMatrix &  o) [inline]

Definition at line 157 of file SourceVMatrix.h.

Object* PLearn::toObjectPtr ( const WeightedQuadraticPolynomialKernel &  o) [inline]

Definition at line 93 of file WeightedQuadraticPolynomialKernel.h.

Object* PLearn::toObjectPtr ( const ScaledGaussianKernel &  o) [inline]

Definition at line 80 of file ScaledGaussianKernel.h.

Object* PLearn::toObjectPtr ( const TargetEncodingLearner &  o) [inline]

Definition at line 196 of file TargetEncodingLearner.h.

Object* PLearn::toObjectPtr ( const PDistribution &  o) [inline]

Definition at line 349 of file PDistribution.h.

Object* PLearn::toObjectPtr ( const ObjectGraphIteratorTest &  o) [inline]

Definition at line 130 of file ObjectGraphIteratorTest.h.

Object* PLearn::toObjectPtr ( const ReplicateSamplesVMatrix &  o) [inline]

Definition at line 119 of file ReplicateSamplesVMatrix.h.

Object* PLearn::toObjectPtr ( const PythonProcessedVMatrix &  o) [inline]

Definition at line 195 of file PythonProcessedVMatrix.h.

Object* PLearn::toObjectPtr ( const RBMDistribution &  o) [inline]

Definition at line 186 of file RBMDistribution.h.

Object* PLearn::toObjectPtr ( const QuadraticUtilityCostFunction &  o) [inline]

Definition at line 83 of file QuadraticUtilityCostFunction.h.

{
Object* PLearn::toObjectPtr ( const ManifoldParzenKernel &  o) [inline]

Definition at line 87 of file ManifoldParzenKernel.h.

Object* PLearn::toObjectPtr ( const CutAboveThresholdVariable &  o) [inline]

Definition at line 74 of file CutAboveThresholdVariable.h.

{ return new CutAboveThresholdVariable(v,threshold); }
Object* PLearn::toObjectPtr ( const RationalQuadraticARDKernel &  o) [inline]

Definition at line 172 of file RationalQuadraticARDKernel.h.

Object* PLearn::toObjectPtr ( const InstanceSnippetTest &  o) [inline]

Definition at line 197 of file InstanceSnippetTest.h.

Object* PLearn::toObjectPtr ( const BiasWeightAffineTransformVariable &  o) [inline]

Definition at line 98 of file BiasWeightAffineTransformVariable.h.

{ 
Object* PLearn::toObjectPtr ( const MiniBatchClassificationLossVariable &  o) [inline]

Definition at line 75 of file MiniBatchClassificationLossVariable.h.

Object* PLearn::toObjectPtr ( const MulticlassErrorCostFunction &  o) [inline]

Definition at line 72 of file MulticlassErrorCostFunction.h.

Object* PLearn::toObjectPtr ( const CorrelationProfiler &  o) [inline]

Definition at line 123 of file CorrelationProfiler.h.

Object* PLearn::toObjectPtr ( const LiftStatsCollector &  o) [inline]

Definition at line 170 of file LiftStatsCollector.h.

Object* PLearn::toObjectPtr ( const HashMapFeatureSet &  o) [inline]

Definition at line 143 of file HashMapFeatureSet.h.

Object* PLearn::toObjectPtr ( const StructuralLearner &  o) [inline]

Definition at line 244 of file StructuralLearner.h.

Object* PLearn::toObjectPtr ( const ExpVariable &  o) [inline]

Definition at line 71 of file ExpVariable.h.

{ return new ExpVariable(v); }
Object* PLearn::toObjectPtr ( const TestingLearner &  o) [inline]

Definition at line 177 of file TestingLearner.h.

Object* PLearn::toObjectPtr ( const DichotomizeVMatrix &  o) [inline]

Definition at line 125 of file DichotomizeVMatrix.h.

Object* PLearn::toObjectPtr ( const IsAboveThresholdVariable &  o) [inline]

Definition at line 78 of file IsAboveThresholdVariable.h.

{ return new IsAboveThresholdVariable(v,threshold,truevalue,falsevalue,strict); }
Object* PLearn::toObjectPtr ( const SigmoidVariable &  o) [inline]

Definition at line 71 of file SigmoidVariable.h.

{ return new SigmoidVariable(v); }
Object* PLearn::toObjectPtr ( const VarColumnsVariable &  o) [inline]

Definition at line 74 of file VarColumnsVariable.h.

Object* PLearn::toObjectPtr ( const Smoother &  o) [inline]

Definition at line 124 of file Smoother.h.

Object* PLearn::toObjectPtr ( const ConcatColumnsVMatrix &  o) [inline]

Definition at line 113 of file ConcatColumnsVMatrix.h.

{ return new ConcatColumnsVMatrix(d1,d2); }
Object* PLearn::toObjectPtr ( const MixtureVMatrix &  o) [inline]

Definition at line 130 of file MixtureVMatrix.h.

Object* PLearn::toObjectPtr ( const SpectralClustering &  o) [inline]

Definition at line 123 of file SpectralClustering.h.

Object* PLearn::toObjectPtr ( const SubInputVMatrix &  o) [inline]

Definition at line 109 of file SubInputVMatrix.h.

Object* PLearn::toObjectPtr ( const NeighborhoodBoxVolumeDensityEstimator &  o) [inline]

Definition at line 147 of file NeighborhoodBoxVolumeDensityEstimator.h.

Object* PLearn::toObjectPtr ( const UnequalConstantVariable &  o) [inline]

Definition at line 78 of file UnequalConstantVariable.h.

{  return new UnequalConstantVariable(v1,cte); }
Object* PLearn::toObjectPtr ( const NLLCostModule &  o) [inline]

Definition at line 145 of file NLLCostModule.h.

Object* PLearn::toObjectPtr ( const EarlyStoppingOracle &  o) [inline]

Definition at line 140 of file EarlyStoppingOracle.h.

Object* PLearn::toObjectPtr ( const Calendar &  o) [inline]

Definition at line 312 of file Calendar.h.

Object* PLearn::toObjectPtr ( const ProcessSymbolicSequenceVMatrix &  o) [inline]

Definition at line 314 of file ProcessSymbolicSequenceVMatrix.h.

Object* PLearn::toObjectPtr ( const SoftSlopeIntegralVariable &  o) [inline]

Definition at line 78 of file SoftSlopeIntegralVariable.h.

{
Object* PLearn::toObjectPtr ( const ModulesLearner &  o) [inline]

Definition at line 184 of file ModulesLearner.h.

Object* PLearn::toObjectPtr ( const RBMDiagonalMatrixConnection &  o) [inline]

Definition at line 220 of file RBMDiagonalMatrixConnection.h.

Object* PLearn::toObjectPtr ( const RemoveObservationTest &  o) [inline]

Definition at line 111 of file RemoveObservationTest.h.

Object* PLearn::toObjectPtr ( const RandomForcedValuesVariable &  o) [inline]

Definition at line 141 of file RandomForcedValuesVariable.h.

Object* PLearn::toObjectPtr ( const PowVariableVariable &  o) [inline]

Definition at line 88 of file PowVariableVariable.h.

{ return new PowVariableVariable(v,power); }
Object* PLearn::toObjectPtr ( const LogSoftmaxVariable &  o) [inline]

Definition at line 80 of file LogSoftmaxVariable.h.

{
Object* PLearn::toObjectPtr ( const KFoldSplitter &  o) [inline]

Definition at line 117 of file KFoldSplitter.h.

Object* PLearn::toObjectPtr ( const RBMMixedConnection &  o) [inline]

Definition at line 243 of file RBMMixedConnection.h.

Object* PLearn::toObjectPtr ( const ICP &  o) [inline]

Definition at line 205 of file ICP.h.

template<class T >
Object* PLearn::toObjectPtr ( const T &  x) [inline]

Attempt to return a pointer to Object (or an error if the passed argument cannot be considered an Object subclass)

Remark: this version differs substantially from the previous implementation, and now relies on Boost's type_traits library.

Definition at line 170 of file ObjectConversions.h.

References toObjectPtrImpl().

Referenced by convertible(), PLearn::StaticOption< TVec< VecElementType > >::getAsObject(), PLearn::Option< DeallocatorType, self >::getAsObject(), toIndexedObjectPtr(), and toObjectPtr().

{
    typedef typename boost::remove_cv<T>::type T_nocv;
    typedef typename boost::is_convertible<T_nocv,  const Object*> T_isconv;
    typedef typename boost::is_convertible<T_nocv*, const Object*> pT_isconv;

    if (pT_isconv::value)
        return toObjectPtrImpl(&x, pT_isconv());
    else
        // May end up in the PLerror branch -- this is wanted
        return toObjectPtrImpl(x, T_isconv());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Object* PLearn::toObjectPtr ( const CompactVMatrix &  o) [inline]

Definition at line 203 of file CompactVMatrix.h.

Object* PLearn::toObjectPtr ( const BinSplitter &  o) [inline]

Definition at line 131 of file BinSplitter.h.

Object* PLearn::toObjectPtr ( const BaggingLearner &  o) [inline]

Definition at line 154 of file BaggingLearner.h.

Object* PLearn::toObjectPtr ( const KernelVMatrix &  o) [inline]

Definition at line 93 of file KernelVMatrix.h.

Object* PLearn::toObjectPtr ( const LogVariable &  o) [inline]

Definition at line 70 of file LogVariable.h.

{ return new LogVariable(v); }
Object* PLearn::toObjectPtr ( const RegressionTreeNode &  o) [inline]

Definition at line 147 of file RegressionTreeNode.h.

Object* PLearn::toObjectPtr ( const IndexAtPositionVariable &  o) [inline]

Definition at line 79 of file IndexAtPositionVariable.h.

Object* PLearn::toObjectPtr ( const ProcessDatasetVMatrix &  o) [inline]

Definition at line 112 of file ProcessDatasetVMatrix.h.

Object* PLearn::toObjectPtr ( const DBSplitter &  o) [inline]

Definition at line 126 of file DBSplitter.h.

Object* PLearn::toObjectPtr ( const CombiningCostsModule &  o) [inline]

Definition at line 175 of file CombiningCostsModule.h.

template<class T >
Object* PLearn::toObjectPtrImpl ( const T &  ,
const boost_false_type &   
)

Definition at line 147 of file ObjectConversions.h.

References PLERROR.

Referenced by toObjectPtr().

{
    PLERROR("Attempting to perform impossible conversion from type '%s' to Object*",
            TypeTraits<T>::name().c_str());
    return 0;
}

Here is the caller graph for this function:

template<class T >
Object* PLearn::toObjectPtrImpl ( const T &  x,
const boost_true_type &   
)

Definition at line 155 of file ObjectConversions.h.

References x.

{
    return const_cast<Object*>(static_cast<const Object*>(x));
}
string PLearn::tostring ( const RowIterator &  it)

Definition at line 678 of file SimpleDB.cc.

References PLearn::RowIterator::toString().

{
    return it.toString();
}

Here is the call graph for this function:

template<class T >
string PLearn::tostring ( const T &  x,
PStream::mode_t  io_formatting = PStream::raw_ascii 
)

Definition at line 71 of file tostring.h.

References _tostring_static_pstream_(), and x.

{
    string str;
#ifdef _OPENMP
#pragma omp critical (tostring)
#endif
    {
        _tostring_static_pstream_(true, io_formatting) << x;
        str = static_cast<StringPStreamBuf*>(
            (PStreamBuf*)_tostring_static_pstream_(false))->getString();
    }
    return str;
}

Here is the call graph for this function:

string PLearn::tostring ( const double &  x,
PStream::mode_t  io_formatting 
)

Definition at line 89 of file tostring.cc.

References _tostring_static_pstream_(), fast_exact_is_equal(), PLearn::PStream::raw_ascii, and x.

Referenced by PLearn::HashMapFeatureSet::addFeatures(), PLearn::CachedFeatureSet::addFeatures(), addFileAndDateVariables(), PLearn::RegressionTreeQueue::addHeap(), PLearn::TextProgressBarPlugin::addProgressBar(), PLearn::BasisSelectionRegressor::appendCandidateFunctionsOfSingleField(), PLearn::DiskVMatrix::appendRow(), PLearn::BasicIdentityCallsTest::binary(), PLearn::TreeDBNModule::bpropAccUpdate(), PLearn::VariableDeletionVMatrix::build_(), PLearn::TreeDBNModule::build_(), PLearn::TemporaryDiskVMatrix::build_(), PLearn::SubVMatrix::build_(), PLearn::SplitModule::build_(), PLearn::SelectColumnsVMatrix::build_(), PLearn::ScoreLayerVariable::build_(), PLearn::ReplicateSamplesVMatrix::build_(), PLearn::RemapLastColumnVMatrix::build_(), PLearn::ProcessSymbolicSequenceVMatrix::build_(), PLearn::OneHotVMatrix::build_(), PLearn::NetworkModule::build_(), PLearn::MovingAverageVMatrix::build_(), PLearn::ModuleLearner::build_(), PLearn::MissingInstructionVMatrix::build_(), PLearn::MeanMedianModeImputationVMatrix::build_(), PLearn::LinearCombinationModule::build_(), PLearn::GraphicalBiText::build_(), PLearn::GeneralizedOneHotVMatrix::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::EarlyStoppingOracle::build_(), PLearn::DiskVMatrix::build_(), PLearn::DichotomizeVMatrix::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::ConcatColumnsVMatrix::build_(), PLearn::BestAveragingPLearner::build_(), PLearn::BaseRegressorWrapper::build_(), PLearn::AddLayersNNet::build_(), PLearn::TestImputations::build_ball_tree(), PLearn::SubsamplingDBN::build_costs(), PLearn::DiscriminativeRBM::build_costs(), PLearn::DeepBeliefNet::build_costs(), PLearn::NNet::buildOutputFromInput(), PLearn::SequentialModelSelector::checkModelNames(), PLearn::VMatLanguage::compileStream(), compute_learner_outputs_on_grid(), PLearn::DeepReconstructorNet::computeAndSaveLayerActivationStats(), PLearn::Kernel::computeGramMatrixDerivative(), PLearn::ManifoldParzen2::computeOutput(), PLearn::KNNRegressor::computeOutput(), computeOutputFields(), PLearn::SDBWithStats::computeStats(), PLearn::BasisSelectionRegressor::computeWeightedAveragesWithResidue(), PLearn::Test_PP::conversionOPchildA(), PLearn::Test_PP::conversionOPchildB(), PLearn::Test_PP::conversionOPparent(), PLearn::Experimentation::createHeaderFile(), PLearn::NeighborhoodConditionalMean::createMasterHeaderFile(), PLearn::TestImputations::createOutputFile(), cross_valid(), PLearn::DichotomizeDond2DiscreteVariables::dichotomizeDiscreteVariables(), diff(), PLearn::ShellProgressBar::draw(), DX_create_grid_outputs_file(), DX_write_2D_fields(), PLearn::MatlabInterface::eigs_r11(), PLearn::RegressionTree::expandTree(), PLearn::Experimentation::experimentSetUp(), PLearn::NeighborhoodConditionalMean::experimentWithVariousKs(), PLearn::GaussianProcessNLLVariable::fbpropFragments(), PLearn::Cache< KeyType, ValueType >::filename(), PLearn::LiftStatsCollector::finalize(), PLearn::HTMLHelpCommand::flagsAndLevelHeading(), PLearn::OptimizeOptionOracle::generateNextTrial(), PLearn::Profiler::get_omp_save_name(), PLearn::ObjectOptionsIterator::getCurrentOptionName(), PLearn::VMatrix::getFieldIndex(), PLearn::VMatrix::getFieldInfos(), PLearn::Experimentation::getHeaderRecord(), PLearn::ConcatDisjointFeatureSet::getIndexFeature(), PLearn::SelectColumnsVMatrix::getIndicesFromFields(), PLearn::Variable::getName(), PLearn::ConcatDisjointFeatureSet::getNewFeaturesString(), PLearn::RegressionTreeMulticlassLeaveProb::getOutputNames(), PLearn::PLearner::getOutputNames(), PLearn::BaggingLearner::getOutputNames(), getProcessDataMemory(), PLearn::KFoldSplitter::getSplit(), PLearn::VecStatsCollector::getStat(), PLearn::VMatrix::getString(), PLearn::ConcatDisjointFeatureSet::getStringFeature(), getSynsetKey(), getSynsetPtr(), PLearn::PLearner::getTestCostIndex(), PLearn::TopDownAsymetricDeepNetwork::getTestCostNames(), PLearn::ToBagClassifier::getTestCostNames(), PLearn::StackedSVDNet::getTestCostNames(), PLearn::StackedFocusedAutoassociatorsNet::getTestCostNames(), PLearn::StackedAutoassociatorsNet::getTestCostNames(), PLearn::KNNClassifier::getTestCostNames(), PLearn::ExhaustiveNearestNeighbors::getTestCostNames(), PLearn::DynamicallyLinkedRBMsModel::getTestCostNames(), PLearn::DenoisingRecurrentNet::getTestCostNames(), PLearn::DeepNonLocalManifoldParzen::getTestCostNames(), PLearn::BaggingLearner::getTestCostNames(), PLearn::AddCostToLearner::getTestCostNames(), PLearn::PLearner::getTrainCostIndex(), PLearn::StackedAutoassociatorsNet::getTrainCostNames(), PLearn::BestAveragingPLearner::getTrainCostNames(), getUser(), PLearn::LemmatizeVMatrix::getValString(), PLearn::DictionaryVMatrix::getValString(), global_options(), PLearn::HTMLHelpCommand::helpClasses(), PLearn::HelpSystem::helpClassOptions(), PLearn::HelpSystem::helpFunctions(), PLearn::HTMLHelpCommand::helpOnClass(), PLearn::HTMLUtils::highlight_known_classes(), PLearn::HTMLHelpCommand::highlight_known_classes(), PLearn::GaussianProcessRegressor::hyperOptimize(), PLearn::UnequalConstantVariable::info(), PLearn::TimesConstantVariable::info(), PLearn::QuantilesStatsIterator::info(), PLearn::SelectedOutputCostFunction::info(), PLearn::PowDistanceKernel::info(), PLearn::PlusConstantVariable::info(), PLearn::PDateTime::info(), PLearn::PDate::info(), PLearn::EqualConstantVariable::info(), PLearn::DistanceKernel::info(), PLearn::PLearner::initTrain(), PLearn::Test_PP::invariants(), PLearn::PythonCodeSnippet::invoke(), loadAscii(), PLearn::GraphicalBiText::loadBitext(), loadCallxx(), loadCorelDatamat(), loadUCISet(), PLearn::VMatrix::lockMetaDataDir(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::GaussianProcessNLLVariable::logVarray(), main(), PLearn::HTMLUtils::make_http_hyperlinks(), makeFileNameValid(), matlabR11eigs(), matlabSave(), PLearn::Learner::measure(), PLearn::ConvertToPyObject< std::map< T, U > >::newPyObject(), PLearn::ConvertToPyObject< VMField >::newPyObject(), PLearn::ConvertToPyObject< RealRange >::newPyObject(), PLearn::HyperOptimize::optimize(), PLearn::OnlineGramNaturalGradientOptimizer::optimizeN(), PLearn::OptionBase::optionLevelToString(), PLearn::LineOutputProgressBarPlugin::pbInfo(), PLearn::PDate::PDate(), PLearn::TupleTest::perform(), PLearn::PTester::perform(), PLearn::InterfunctionXchgTest::perform(), PLearn::PTester::perform1Split(), PLearn::Gnuplot::plotClasses(), plotVMats(), PLearn::VMatLanguage::preprocess(), PLearn::RegressionTreeRegisters::printRegisters(), PLearn::RemoteProgressBarPlugin::printTitle(), PLearn::PyPLearnScript::process(), PLearn::VPLProcessor::processDataSet(), PLearn::WordNetOntology::processUnknownWord(), PLearn::PLearnService::progress_callback(), PLearn::BasicIdentityCallsTest::quaternary(), readAndMacroProcess(), PLearn::PLearner::remote_batchComputeOutputAndConfidence(), PLearn::SequentialValidation::reportMemoryUsage(), PLearn::Experimentation::reviewGlobalStats(), PLearn::VMatLanguage::run(), PLearn::VMatDictionaryCommand::run(), PLearn::TestClientCommand::run(), PLearn::ServerCommand::run(), PLearn::SequentialValidation::run(), PLearn::RunObject::run(), PLearn::PairwiseDiffsCommand::run(), PLearn::FieldConvertCommand::run(), PLearn::Experiment::run(), PLearn::HyperOptimize::runTest(), PLearn::TextFilesVMatrix::setColumnNamesAndWidth(), PLearn::VPLCombinedLearner::setExperimentDirectory(), PLearn::StackedLearner::setExperimentDirectory(), PLearn::ChainedLearners::setExperimentDirectory(), PLearn::BestAveragingPLearner::setExperimentDirectory(), PLearn::VPLPreprocessedLearner::setTrainingSet(), PLearn::SVMClassificationTorch::setTrainingSet(), PLearn::PLearner::setTrainingSet(), PLearn::FinancePreprocVMatrix::setVMFields(), PLearn::VMatLanguage::staticPreprocess(), stemsOfWord(), stemWord(), PLearn::Learner::stop_if_wanted(), summarizedVecString(), PLearn::BasicIdentityCallsTest::ternary(), PLearn::SequentialModelSelector::test(), tostring(), PLearn::RowIterator::toString(), PLearn::FieldValue::toString(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::TangentLearner::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::SequentialModelSelector::train(), PLearn::RegressionTree::train(), PLearn::PartSupervisedDBN::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NNet::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::MultiInstanceNNet::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::ModulesLearner::train(), PLearn::LocalMedBoost::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::HyperLearner::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GraphicalBiText::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussMix::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::FeatureSetNNet::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::EntropyContrastLearner::train(), PLearn::DistRepNNet::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DeepReconstructorNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::DeepNNet::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::DeepBeliefNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::AdaBoost::train(), PLearn::DeepReconstructorNet::trainHiddenLayer(), PLearn::SimpleDB< KeyType, QueryResult >::truncateFromRow(), PLearn::BasicIdentityCallsTest::unary(), PLearn::VMatrix::unduplicateFieldNames(), PLearn::TextProgressBarPlugin::update(), PLearn::GraphicalBiText::update_WSD_model(), PLearn::FieldStat::updateNumber(), version_string(), PLearn::TxtmatCommand::view(), viewVMat(), vmatmain(), and word_sequences2files_int_stream().

{
    string str;
#ifdef _OPENMP
#pragma omp critical (tostring)
#endif
    {
        PStream& out = _tostring_static_pstream_(true, io_formatting);
        int ix = int(x);
        if (io_formatting==PStream::raw_ascii && fast_exact_is_equal(ix, x))
            out << ix;
        else
            out << x;
        str = static_cast<StringPStreamBuf*>(
            (PStreamBuf*)_tostring_static_pstream_(false))->getString();
    }
    return str;

}

Here is the call graph for this function:

string PLearn::tostring ( const float &  x,
PStream::mode_t  io_formatting = PStream::raw_ascii 
) [inline]

Definition at line 65 of file tostring.h.

References tostring().

{ return tostring(double(x), io_formatting); }

Here is the call graph for this function:

void PLearn::touch ( const PPath &  file)

Trivial unix touch.

Definition at line 616 of file fileutils.cc.

References PLearn::PPath::absolute().

{
    string command = "touch "+ file.absolute();
    system(command.c_str());
} 

Here is the call graph for this function:

Var PLearn::trace ( Var  v) [inline]

Definition at line 79 of file TraceVariable.h.

{ return new TraceVariable(v); }
template<class T >
T PLearn::trace ( const TMat< T > &  mat)

Definition at line 4496 of file TMat_maths_impl.h.

References PLearn::TMat< T >::firstElement(), i, PLearn::TMat< T >::isSquare(), PLearn::TMat< T >::length(), and PLERROR.

Referenced by regularizeMatrix(), and PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    if (!mat.isSquare())
        PLERROR( "In trace()\nThe matrix must be square." );
    T tr = mat.firstElement();
    for ( int i = 1; i < mat.length(); i++ )
        tr += mat(i,i);
    return tr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::train_and_test ( const string &  modelalias,
string  trainalias,
vector< string >  testaliases 
)

Definition at line 127 of file old_plearn_main.cc.

References endl(), exitmsg(), getDataSet(), getModelAliases(), i, isdir(), isfile(), PLearn::TVec< T >::length(), PLearn::VMat::length(), loadObject(), lsdir(), read(), save(), PLearn::TVec< T >::subVec(), toint(), and PLearn::VMat::width().

Referenced by old_plearn_main().

{
    map<string,string> dataset_aliases = getDatasetAliases(".");
    if(dataset_aliases.empty())
        exitmsg("Problem: No dataset.aliases found in the current directory or its parents");
    if(dataset_aliases.find(trainalias)==dataset_aliases.end())
        exitmsg("Problem: No alias '%s' found in dataset.aliases",trainalias.c_str());
    string trainsetdef = dataset_aliases[trainalias];
    cout << ">> Will be training on alias '" << trainalias << "': " << trainsetdef << endl;
    VMat trainset = getDataSet(trainsetdef,trainalias);
    cout << "   size: " << trainset.length() << " x " << trainset.width() << endl;

    int ntestsets = testaliases.size();
    Array<VMat> testsets(ntestsets);
    for(int i=0; i<ntestsets; i++)
    {
        string alias = testaliases[i];
        if(dataset_aliases.find(alias)==dataset_aliases.end())
            exitmsg("Problem: No alias for '%s' found in dataset.aliases",alias.c_str());
        string testsetdef = dataset_aliases[testaliases[i]];
        cout << ">> Will be testing on alias '" << alias << "': " << testsetdef << endl;
        testsets[i] = getDataSet(testsetdef, alias);
        cout << "   size: " << testsets[i].length() << " x " << testsets[i].width() << endl;
    }

    if(!isfile("model.aliases"))
        exitmsg("Problem: No model.aliases file in current directory");
    map<string, string> model_aliases = getModelAliases("model.aliases");
    if(model_aliases.find(modelalias)==model_aliases.end())
        exitmsg("Problem: Could not find alias %s in file model.aliases",modelalias.c_str());

    string use_saved_model = ""; // look for a possibly last saved model in modelalias directory
    if(isdir(modelalias))
    {
        vector<string> dirlist = lsdir(modelalias);
        vector<string>::iterator it = dirlist.begin();
        vector<string>::iterator itend = dirlist.end();
        int maxmodelnum = -1;
        for(; it!=itend; ++it)
        {
            int itl = it->length();
            if(*it == "model.psave")
            {
                use_saved_model = modelalias + "/" + *it;
                break;
            }
            else if(itl>11 && it->substr(0,5)=="model" && it->substr(itl-6,6)==".psave")
            {
                int modelnum = toint(it->substr(5,itl-11));
                if(modelnum>maxmodelnum)
                {
                    modelnum = maxmodelnum;
                    use_saved_model = modelalias + "/" + *it;
                }
            }
        }
    }

    PP<Learner> learner;
    if(use_saved_model!="")
    {
        cout << ">> Loading saved learner from file " << use_saved_model << endl;
        learner = dynamic_cast<Learner*>(loadObject(use_saved_model));
        if(!learner)
            exitmsg("Problem in making file %s into a Learner",use_saved_model.c_str());
    }
    else
    {
        string modelspec = model_aliases[modelalias];
        cout << ">> Creating learner: " << modelspec << endl;
        PLearn::read(modelspec, learner);
        // learner = dynamic_cast<Learner*>(newObject(modelspec));  
    }

    //  learner->setOption("save_at_every_epoch","true");

    cout << ">> Learner has inputsize=" << learner->inputsize() << " targetsize=" << learner->targetsize() << " outputsize=" << learner->outputsize() << endl;
    //  if(trainset.width()!=learner->inputsize()+learner->targetsize())
    //    exitmsg("Problem: learner's inputsize+targetsize differs from the width of the trainingset!!!");

    learner->setExperimentDirectory(modelalias);
    learner->setTestDuringTrain(testsets);

    cout << "Training and testing..." << endl;
    learner->train(trainset);

    string psavefile = learner->basename()+".psave";
    cout << ">>> Saving final trained model in file: " << psavefile << endl;
    cerr << "{Temporarily commented out by Pascal: don't want to save the Object.\n"
         << " Also with the current 3 argument version, this systematically calls newsave,\n"
         << " so older objects which don't yet have a functional option system cannot be saved through this: to be fixed!!!\n";

#if 0
    // MACHIN PASTE

    string targetfile = learner->basename()+".targets.pmat";
    string outputfile = learner->basename()+"."+datasetalias+".outputs.pmat";
    string costfile = learner->basename()+"."+datasetalias+".costs.pmat";
    VMat vm = testsets[ntestsets-1];
    int l = vm.length();
    VMat outputmat = new FileVMatrix(outputfile,l,learner->outputsize());
    VMat costmat = new FileVMatrix(costfile,l,learner->costsize());
    VMat targetmat = new FileVMatrix(targetfile,l,learner->targetsize());
    Vec input_and_target(vm.width());
    Vec input = input_and_target.subVec(0,learner->inputsize());
    Vec target = input_and_target.subVec(learner->inputsize(), learner->targetsize());
    Vec output(learner->outputsize());
    Vec cost(learner->costsize());
    Vec costs(learner->costsize(), 0.0);
    {//beg. scope of ProgressBar
        ProgressBar pbar(cout,"Computing output and cost",l);
        for(int i=0; i<l; i++)
        {
            vm->getRow(i,input_and_target);
            learner->useAndCost(input, target, output, cost);
            targetmat->putRow(i,target);
            outputmat->putRow(i,output);
            costmat->putRow(i,cost);
            costs+= cost;
            pbar(i);
        }
        // learner->applyAndComputeCosts(vm,outputmat,costmat); 
    }//end. scope of ProgressBar

    cout << learner->costNames() << endl
         << costs/l << endl;

#endif

    save(psavefile, *learner);

}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::transform_perclass_values_into_luminance ( Vec  classnums,
const Vec &  values,
int  ndiscretevals 
)

Definition at line 106 of file DisplayUtils.cc.

References c, i, PLearn::TVec< T >::length(), and max().

Referenced by regulargrid_x_y_outputs_to_bitmap().

  {
    int l = classnums.length();
    int nclasses = (int)max(classnums);
    Vec minval(nclasses,FLT_MAX);
    Vec maxval(nclasses,-FLT_MAX);
    for(int i=0; i<l; i++)
      {
        int c = int(classnums[i]);
        real val = values[i];
        if(val<minval[c])
          minval[c] = val;
        if(val>maxval[c])
          maxval[c] = val;        
      }

    for(int i=0; i<l; i++)
      {
        int c = int(classnums[i]);
        real val = values[i];
        // rescale it between 0 and 1
        val = (val-minval[c])/(maxval[c]-minval[c]);
        if(ndiscretevals>1) // discretize it
          val = floor(val*ndiscretevals+0.5)/ndiscretevals;
        values[i] = val;
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::transformationFromWeightedMatchedPoints ( const Mat &  template_points,
const Mat &  mol_points,
const Vec &  weights,
const Mat &  rot,
const Vec &  trans,
real error 
)

Definition at line 133 of file SurfaceTemplate/geometry.cc.

References productAcc(), rotationFromWeightedMatchedPoints(), and weightedCentroid().

Referenced by PLearn::ChemicalICP::minimizeWeightedDistance().

{
    Vec t_centroid = weightedCentroid( template_points, weights );
    Vec m_centroid = weightedCentroid( mol_points, weights );

    Mat origin_tp = template_points - t_centroid;
    Mat origin_mp = mol_points - m_centroid;

    rot << rotationFromWeightedMatchedPoints( origin_tp, origin_mp,
                                              weights, error );

    // trans = m_centroid - rot * t_centroid
    trans << m_centroid;
    productAcc( trans, rot, -t_centroid );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::transformMesh ( const Mat &  rot,
const Vec &  trans,
SurfMesh &  sm 
)

Definition at line 167 of file geometry.cc.

References transformPoints().

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

{
  Mat input = sm->getVertexCoords();
  transformPoints( rot, trans, input, input );
  sm->setVertexCoords( input );

  input = sm->getVertexNorms();
  transformPoints( rot, Vec(3), input, input );
  sm->setVertexNorms( input );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::transformPoints ( const Mat &  rot,
const Vec &  trans,
const Mat &  points_in,
Mat &  points_out 
)

Definition at line 155 of file geometry.cc.

References PLearn::TMat< T >::length(), n, productTranspose(), and PLearn::TMat< T >::resize().

Referenced by PLearn::ICP::iterate(), PLearn::ICP::iterativeReweight(), main(), and transformMesh().

{
  int n = points_in.length();
  points_out.resize( n, 3 );
  Mat tmp( n, 3 );

  productTranspose( tmp, points_in, rot );
  tmp += trans;
  points_out << tmp;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VMat PLearn::transpose ( VMat  m1)

returns M1'

Definition at line 153 of file VMat_linalg.cc.

References PLearn::VMat::toMat(), and transpose().

{
    return VMat(transpose(m1.toMat()));
}

Here is the call graph for this function:

Var PLearn::transpose ( Var  v) [inline]

Definition at line 90 of file SubMatTransposeVariable.h.

References PLearn::Var::length(), and PLearn::Var::width().

{ return new SubMatTransposeVariable(v,0,0,v->length(),v->width()); }

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::transpose ( const TMat< T > &  src)

Definition at line 6782 of file TMat_maths_impl.h.

References PLearn::TMat< T >::length(), transpose(), and PLearn::TMat< T >::width().

{
    TMat<T> res(src.width(),src.length());
    transpose(src,res);
    return res;
}

Here is the call graph for this function:

template<class T >
void PLearn::transpose ( const TMat< T >  src,
TMat< T >  dest 
)

Definition at line 6761 of file TMat_maths_impl.h.

References i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by align(), PLearn::GaussianProcessNLLVariable::alpha(), PLearn::ShiftAndRescaleVMatrix::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::NNet::buildOutputFromInput(), PLearn::Variable::column(), PLearn::GaussianProcessNLLVariable::fbpropFragments(), GCV(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), lapackCholeskySolveInPlace(), multiply(), PLearn::NatGradEstimator::operator()(), qld_interface(), ridgeRegressionByGCV(), PLearn::Variable::row(), PLearn::ExtractOptionCommand::run(), PLearn::EntropyContrast::set_NNcontinuous_gradient_from_extra_cost(), solveLinearSystem(), sumOverBags(), PLearn::SubMatTransposeVariable::symbolicBprop(), testCholeskyRoutines(), PLearn::GaussianProcessRegressor::trainProjectedProcess(), transpose(), PLearn::RowMapSparseMatrix< real >::transposeProduct(), unfoldedFunc(), and vmatmain().

{
    int l=src.length();
    int w=src.width();
#ifdef BOUNDCHECK
    if (w!=dest.length() || l!=dest.width())
        PLERROR("transpose(TMat<T>(%d,%d),T,TMat<T>(%d,%d)) args of unequal dimensions",
                src.length(),src.width(),dest.length(),dest.width());
#endif
    int dmod=dest.mod();
    for (int i=0;i<l;i++)
    {
        const T* si=src[i];
        T* dji= &dest(0,i);
        for (int j=0;j<w;j++,dji+=dmod)
            *dji = si[j];
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::transposedLayerL1BpropUpdate ( TVec< T >  input_gradient,
TMat< T >  weights,
const TVec< T > &  input,
const TVec< T > &  output_gradient,
real  learning_rate,
weight_decay 
)

Definition at line 7407 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, sign(), and PLearn::TMat< T >::width().

Referenced by PLearn::IncrementalNNet::train().

{
    int n_inputs = input_gradient.length();
    int n_outputs = output_gradient.length();
#ifdef BOUNDCHECK
    if (weights.width() != n_outputs || weights.length() != n_inputs
        || input.length() != n_inputs)
        PLERROR("layerL1BpropUpdate: arguments have incompatible sizes");
#endif
    input_gradient.clear();
    T* in_g = input_gradient.data();
    T* out_g = output_gradient.data();
    T* inp = input.data();
    for (int j=0;j<n_inputs;j++)
    {
        T* Wj = weights[j];
        T inp_j = inp[j];
        for (int i=0;i<n_outputs;i++)
        {
            T out_gi = out_g[i];
            T Wji = Wj[i];
            in_g[j] += Wji * out_gi;
            Wj[i] -= learning_rate * (out_gi * inp_j + weight_decay * sign(Wji));
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::transposedLayerL2BpropUpdate ( TVec< T >  input_gradient,
TMat< T >  weights,
const TVec< T > &  input,
const TVec< T > &  output_gradient,
real  learning_rate,
weight_decay 
)

Definition at line 7345 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLERROR, and PLearn::TMat< T >::width().

{
    int n_inputs = input_gradient.length();
    int n_outputs = output_gradient.length();
#ifdef BOUNDCHECK
    if (weights.width() != n_outputs || weights.length() != n_inputs
        || input.length() != n_inputs)
        PLERROR("layerL2BpropUpdate: arguments have incompatible sizes");
#endif
    input_gradient.clear();
    T* in_g = input_gradient.data();
    T* out_g = output_gradient.data();
    T* inp = input.data();
    for (int j=0;j<n_inputs;j++)
    {
        T* Wj = weights[j];
        T inp_j = inp[j];
        for (int i=0;i<n_outputs;i++)
        {
            T out_gi = out_g[i];
            T Wji = Wj[i];
            in_g[j] += Wji * out_gi;
            Wj[i] -= learning_rate * (out_gi * inp_j + weight_decay * Wji);
        }
    }
}

Here is the call graph for this function:

Var PLearn::transposeProduct ( const Var &  m1,
const Var &  m2 
) [inline]

Definition at line 79 of file TransposeProductVariable.h.

{
    return new TransposeProductVariable(m1, m2);
}
Mat PLearn::transposeProduct ( VMat  m)

computes M'.M

Definition at line 56 of file VMat_linalg.cc.

References i, PLearn::VMat::length(), rowmatrix(), transposeProductAcc(), and PLearn::VMat::width().

{
    Mat result(m.width(),m.width());

    Vec v(m.width());
    Mat vrowmat = rowmatrix(v);

    for(int i=0; i<m.length(); i++)
    {
        m->getRow(i,v);
        transposeProductAcc(result, vrowmat,vrowmat);
    }
    return result;
}

Here is the call graph for this function:

template<class T >
void PLearn::transposeProduct ( const TVec< T > &  result,
const TMat< T > &  m,
const TVec< T > &  v 
)

result[i] = sum_j m[j,i] * v[j] Equivalently: rowvec(result) = rowvec(v) .

m Equivalently: columnvec(result) = transpose(m).columnvec(v)

Definition at line 2931 of file TMat_maths_impl.h.

References PLearn::TVec< T >::clear(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::isEmpty(), j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLearn::Profiler::pl_profile_end(), PLearn::Profiler::pl_profile_start(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by PLearn::UndirectedSoftmaxModule::bpropUpdate(), PLearn::RBMQLParameters::bpropUpdate(), PLearn::RBMMultitaskClassificationModule::bpropUpdate(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::RBMLQParameters::bpropUpdate(), PLearn::RBMLLParameters::bpropUpdate(), PLearn::DenoisingRecurrentNet::bpropUpdateConnection(), PLearn::NeuralNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::ConditionalDensityNet::build_(), closestPointOnHyperplane(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), computeCovar(), PLearn::RBMGenericParameters::computeLinearUnitActivations(), computeMeanAndCovar(), PLearn::WPLS::computeOutput(), PLearn::PLS::computeOutput(), PLearn::LinearRegressor::computeOutput(), PLearn::IncrementalNNet::computeOutput(), PLearn::GaussianContinuum::computeOutput(), computePrincipalComponents(), PLearn::RBMMatrixTransposeConnection::computeProduct(), PLearn::RBMMatrixConnection::computeProduct(), PLearn::RBMGenericParameters::computeQuadraticUnitActivations(), PLearn::RBMQLParameters::computeUnitActivations(), PLearn::RBMLQParameters::computeUnitActivations(), PLearn::RBMLLParameters::computeUnitActivations(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::ProductRandomVariable::EMBprop(), PLearn::TransposeProductVariable::fprop(), PLearn::RBMMultitaskClassificationModule::fprop(), PLearn::RBMModule::fprop(), PLearn::ProjectionErrorVariable::fprop(), PLearn::NllSemisphericalGaussianVariable::fprop(), PLearn::CombiningCostsModule::fprop(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden(), PLearn::DenoisingRecurrentNet::fpropHiddenReconstructionFromLastHidden2(), PLearn::DenoisingRecurrentNet::fpropHiddenSymmetricDynamicMatrix(), PLearn::DenoisingRecurrentNet::fpropInputReconstructionFromHidden(), GCV(), PLearn::GaussianDistribution::generate(), PLearn::GaussianContinuum::get_image_matrix(), PLearn::GaussianContinuum::get_nll(), PLearn::OnlineGramNaturalGradientOptimizer::gramEigenNaturalGradient(), linearRegressionNoBias(), PLearn::GaussianContinuumDistribution::log_density(), PLearn::RBMMatrixConnection::petiteCulotteOlivierUpdate(), PLearn::TransposeProductVariable::rfprop(), ridgeRegressionByGCV(), PLearn::ProductVariable::symbolicBprop(), PLearn::ProductTransposeVariable::symbolicBprop(), PLearn::WPLS::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PLS::train(), PLearn::LLC::train(), transposeProduct(), PLearn::RBMMatrixConnection::updateGibbs(), PLearn::GaussMix::updateInverseVarianceFromPrevious(), PLearn::Function::verifyrfprop(), and weightedRidgeRegressionByGCV().

{
    Profiler::pl_profile_start("transposeProduct T");
    int l=m.length();
#ifdef BOUNDCHECK
    int w=m.width();
    if (l!=v.length() || w!=result.length())
        PLERROR("transposeProduct(TVec, TMat, TVec), incompatible arguments:\n"
                "%d <- %dx%d' times %d",
                result.length(), l, w, v.length());
#endif

    if (m.isEmpty() || v.isEmpty() || result.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-vector multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!result.isEmpty())
            result.clear();
        Profiler::pl_profile_end("transposeProduct T");
        return;
    }

    T *rp = result.data();
    T *vp = v.data();
    result.clear();
    for (int j=0;j<l;j++)
    {
        const T* mj = m[j];
        T vj = vp[j];
        for (int i=0;i<result.length();i++)
            rp[i] += mj[i] * vj;
    }
    Profiler::pl_profile_end("transposeProduct T");
}

Here is the call graph for this function:

Mat PLearn::transposeProduct ( VMat  m1,
VMat  m2 
)

computes M1'.M2

Definition at line 71 of file VMat_linalg.cc.

References i, PLearn::VMat::length(), PLERROR, rowmatrix(), transposeProductAcc(), and PLearn::VMat::width().

{
    if(m1.length()!=m2.length())
        PLERROR("in Mat transposeProduct(VMat m1, VMat m2) arguments have incompatible dimensions");

    Mat result(m1.width(),m2.width());

    Vec v1(m1.width());
    Vec v2(m2.width());
    Mat v1rowmat = rowmatrix(v1);
    Mat v2rowmat = rowmatrix(v2);

    for(int i=0; i<m1.length(); i++)
    {
        m1->getRow(i,v1);
        m2->getRow(i,v2);
        transposeProductAcc(result, v1rowmat,v2rowmat);
    }
    return result;
}

Here is the call graph for this function:

Vec PLearn::transposeProduct ( VMat  m1,
Vec  v2 
)

computes M1'.V2

Definition at line 92 of file VMat_linalg.cc.

References PLearn::TVec< T >::clear(), i, PLearn::TVec< T >::length(), PLearn::VMat::length(), PLERROR, and PLearn::VMat::width().

{
    if(m1.length()!=v2.length())
        PLERROR("in Mat transposeProduct(VMat m1, Vec v2) arguments have incompatible dimensions");

    Vec result(m1.width(),1);
    result.clear();

    Vec v1(m1.width());
    for(int i=0; i<m1.length(); i++)
    {
        m1->getRow(i,v1);
        result += v1 * v2[i];
    }
    return result;
}

Here is the call graph for this function:

template<class T >
void PLearn::transposeProduct ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] = sum_k m1[k,i] * m2[k,j]

Definition at line 4190 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (m!=m2.length() || mat.length()!=n || mat.width()!=l)
        PLERROR("transposeProduct(TMat, TMat, TMat), incompatible arguments:\n"
                "%dx%d <- %dx%d' times %dx%d",
                mat.length(), mat.width(), m, n, m2.length(), l);
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat.clear();
        return;
    }

    mat.clear();
    for (int i=0;i<n;i++)
    {
        T* m1ki = m1.data()+i;
        T* mi = mat[i];
        for (int k=0;k<m;k++,m1ki+=m1.mod())
        {
            const T* m2k = m2[k];
            T m1_ki = *m1ki;
            for (int j=0;j<l;j++)
                mi[j] += m1_ki * m2k[j];
        }
    }
}

Here is the call graph for this function:

template<class T >
TMat<T> PLearn::transposeProduct ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

return m1' x m2

Definition at line 7197 of file TMat_maths_impl.h.

References transposeProduct(), and PLearn::TMat< T >::width().

{ TMat<T> res(m1.width(),m2.width()); transposeProduct(res, m1,m2); return res; }

Here is the call graph for this function:

template<class T >
TVec<T> PLearn::transposeProduct ( const TMat< T > &  m,
const TVec< T > &  v 
) [inline]

return m' x v

Definition at line 7187 of file TMat_maths_impl.h.

References transposeProduct(), and PLearn::TMat< T >::width().

{ TVec<T> res(m.width()); transposeProduct(res, m,v); return res; }

Here is the call graph for this function:

template<class T >
void PLearn::transposeProduct2 ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 4229 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (m!=m2.length() || mat.length()!=n || mat.width()!=l)
        PLERROR("transposeProduct2(Mat,Mat), incompatible arguments "
                "%dx%d' times %dx%d into %dx%d",
                m1.length(),m1.width(), m2.length(),m2.width(), mat.length(), mat.width());
#endif
    mat.clear();
    for (int i=0;i<n;i++)
    {
        T* m1ki = m1.data()+i;
        T* mi = mat[i];
        for (int k=0;k<m;k++,m1ki+=m1.mod())
        {
            const T* m2k = m2[k];
            T m1_ki = *m1ki;
            for (int j=0;j<l;j++)
            {
                T m2kj=m2k[j];
                mi[j] += m1_ki * m2kj*m2kj;
            }
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::transposeProduct2Acc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

Definition at line 4343 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::ProductVariable::bbprop(), and PLearn::ProductTransposeVariable::bbprop().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (m!=m2.length() || mat.length()!=n || mat.width()!=l)
        PLERROR("transposeProduct2Acc(Mat,Mat), incompatible arguments "
                "%dx%d' times %dx%d into %dx%d",
                m1.length(),m1.width(), m2.length(),m2.width(), mat.length(), mat.width());
#endif
    for (int i=0;i<n;i++)
    {
        T* m1ki = m1.data()+i;
        T* mi = mat[i];
        for (int k=0;k<m;k++,m1ki+=m1.mod())
        {
            const T* m2k = m2[k];
            T m1_ki = *m1ki;
            for (int j=0;j<l;j++)
            {
                T m2kj = m2k[j];
                mi[j] += m1_ki * m2kj * m2kj;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::transposeProductAcc ( const TVec< T > &  result,
const TMat< T > &  m,
const TVec< T > &  v 
)

result[i] += sum_j m[j,i] * v[j]

Definition at line 2969 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::isEmpty(), j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by PLearn::RBMSparse1DMatrixConnection::accumulateNegStats(), PLearn::RBMMatrixConnection::accumulateNegStats(), PLearn::RBMLateralBinomialLayer::accumulateNegStats(), PLearn::RBMSparse1DMatrixConnection::accumulatePosStats(), PLearn::RBMMatrixConnection::accumulatePosStats(), PLearn::RBMLateralBinomialLayer::accumulatePosStats(), PLearn::NeuralProbabilisticLanguageModel::add_affine_transform(), PLearn::FeatureSetSequentialCRF::add_affine_transform(), PLearn::FeatureSetNNet::add_affine_transform(), PLearn::ProductVariable::bprop(), PLearn::ProductTransposeVariable::bprop(), PLearn::BiasWeightAffineTransformVariable::bprop(), PLearn::RBMLateralBinomialLayer::bpropNLL(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::RBMLateralBinomialLayer::bpropUpdate(), PLearn::DenoisingRecurrentNet::bpropUpdateConnection(), PLearn::RBMMatrixTransposeConnection::computeProduct(), PLearn::RBMMatrixConnection::computeProduct(), PLearn::SparseIncrementalAffineTransformVariable::fprop(), PLearn::MatrixAffineTransformVariable::fprop(), PLearn::BiasWeightAffineTransformVariable::fprop(), PLearn::AffineTransformVariable::fprop(), PLearn::RBMMatrixConnection::petiteCulotteOlivierUpdate(), PLearn::TransposeProductVariable::rfprop(), rotationFromWeightedMatchedPoints(), transposeProduct(), and weightedRotationFromMatchedPoints().

{
    int l=m.length();
    int w=m.width();
#ifdef BOUNDCHECK
    if (l!=v.length() || w!=result.length())
        PLERROR("transposeProductAcc(TVec, TMat, TVec), incompatible arguments"
                ":\n"
                "%dx%d' times %d -> %d",
                result.length(), l, w, v.length());
#endif

    if (m.isEmpty() || v.isEmpty() || result.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-vector multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        return;
    }

    T* rdata = result.data();
    T* vp = v.data();
    T* mp = m.data();
    int deltam = m.mod()-m.width();
    for (int j=0;j<l;j++)
    {
        T vj = *vp++;

        /*
          T* rp = rdata;
          for (int i=0;i<w;i++)
          *rp++ += vj * *mp++;
          mp += deltam;
        */

        if(vj!=0)
        {
            if(vj==1)
            {
                T* rp = rdata;
                for (int i=0;i<w;i++)
                    *rp++ += *mp++;
                mp += deltam;
            }
            else
            {
                T* rp = rdata;
                for (int i=0;i<w;i++)
                    *rp++ += vj * *mp++;
                mp += deltam;
            }
        }
        else mp += w + deltam;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::transposeProductAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] += sum_k m1[k,i] * m2[k,j]

Definition at line 4260 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (m!=m2.length() || mat.length()!=n || mat.width()!=l)
        PLERROR("transposeProductAcc(TMat, TMat, TMat), incompatible"
                " arguments:\n"
                "%dx%d <- %dx%d' times %dx%d",
                mat.length(), mat.width(), m, n, m2.length(), l);
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        return;
    }

    for (int i=0;i<n;i++)
    {
        T* m1ki = m1.data()+i;
        T* mi = mat[i];
        for (int k=0;k<m;k++,m1ki+=m1.mod())
        {
            const T* m2k = m2[k];
            T m1_ki = *m1ki;
            for (int j=0;j<l;j++)
                mi[j] += m1_ki * m2k[j];
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::transposeProductScaleAcc ( const TVec< T > &  result,
const TMat< T > &  m,
const TVec< T > &  v,
alpha,
beta 
)

result[i] = alpha * sum_j m[j,i] * v[j] + beta * result[i]

Definition at line 3028 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), PLearn::TVec< T >::data(), i, PLearn::TVec< T >::isEmpty(), PLearn::TMat< T >::isEmpty(), j, PLearn::TVec< T >::length(), PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, w, and PLearn::TMat< T >::width().

Referenced by PLearn::RBMSparse1DMatrixConnection::bpropAccUpdate(), PLearn::RBMMatrixConnection::bpropAccUpdate(), PLearn::RBMSparse1DMatrixConnection::bpropUpdate(), PLearn::RBMMatrixTransposeConnection::bpropUpdate(), PLearn::RBMMatrixConnection::bpropUpdate(), PLearn::LinearFilterModule::bpropUpdate(), PLearn::GradNNetLayerModule::bpropUpdate(), PLearn::RBMModule::fprop(), productScaleAcc(), PLearn::PseudolikelihoodRBM::train(), PLearn::RBMSparse1DMatrixConnection::update(), PLearn::RBMMatrixConnection::update(), PLearn::RBMLayer::update(), PLearn::RBMLateralBinomialLayer::update(), PLearn::RBMMatrixConnection::updateCDandGibbs(), and PLearn::RBMMatrixConnection::updateGibbs().

{
    int l=m.length();
    int w=m.width();
#ifdef BOUNDCHECK
    if (l!=v.length() || w!=result.length())
        PLERROR("transposeProductScaleAcc(TVec, TMat, TVec), incompatible"
                " arguments:\n"
                "%d <- %dx%d' times %d",
                result.length(), l, w, v.length());
#endif

    if (m.isEmpty() || v.isEmpty() || result.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-vector multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!result.isEmpty())
            result *= beta;
        return;
    }

    T* rdata = result.data();
    T* vp = v.data();
    T* mp = m.data();
    int deltam = m.mod()-m.width();

    T* rp = rdata;
    // initial scaling
    for (int i=0;i<w;i++)
        *rp++ *= beta;

    for (int j=0;j<l;j++)
    {
        T vj = *vp++;
        rp = rdata;
        for (int i=0;i<w;i++)
            *rp++ += alpha * vj * *mp++;
        mp += deltam;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::transposeProductScaleAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2,
alpha,
beta 
)

Definition at line 4298 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.width();
#ifdef BOUNDCHECK
    if (m!=m2.length() || mat.length()!=n || mat.width()!=l)
        PLERROR("transposeProductScaleAcc(TMat, TMat, TMat), incompatible"
                " arguments:\n"
                "%dx%d <- %dx%d' times %dx%d",
                mat.length(), mat.width(), m, n, m2.length(), l);
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat *= beta;
        return;
    }

    for (int i=0;i<n;i++)
    {
        T* m1ki = m1.data()+i;
        T* mi = mat[i];

        // initial scaling
        for (int j=0;j<l;j++)
            mi[j] *= beta;

        for (int k=0;k<m;k++,m1ki+=m1.mod())
        {
            const T* m2k = m2[k];
            T m1_ki = *m1ki;
            for (int j=0;j<l;j++)
                mi[j] += alpha * m1_ki * m2k[j];
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::transposeTransposeProduct ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] = sum_k m1[k,i] * m2[j,k]

Definition at line 4373 of file TMat_maths_impl.h.

References PLearn::TMat< T >::clear(), PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

Referenced by PLearn::GaussianProcessRegressor::trainProjectedProcess().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.length();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.width() || l!=mat.width())
        PLERROR("transposeTransposeProduct(TMat, TMat, TMat), incompatible"
                " arguments:\n"
                "%dx%d <- %dx%d' times %dx%d'",
                mat.length(), mat.width(), m, n, l, m2.width());
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat.clear();
        return;
    }

    for (int i=0;i<n;i++)
    {
        T* m1ki0 = m1.data()+i;
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            T* m1ki = m1ki0;
            for (int k=0;k<m;k++,m1ki+=m1.mod())
                s += (*m1ki) * m2j[k];
            mi[j] = s;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::transposeTransposeProductAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2 
)

mat[i,j] += sum_k m1[k,i] * m2[j,k]

Definition at line 4415 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.length();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.width() || l!=mat.width())
        PLERROR("transposeTransposeProductAcc(TMat, TMat, TMat), incompatible"
                " arguments:\n"
                "%dx%d <-  %dx%d' times %dx%d'",
                mat.length(), mat.width(), m, n, l, m2.width());
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        return;
    }

    for (int i=0;i<n;i++)
    {
        T* m1ki0 = m1.data()+i;
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            T* m1ki = m1ki0;
            for (int k=0;k<m;k++,m1ki+=m1.mod())
                s += (*m1ki) * m2j[k];
            mi[j] += s;
        }
    }
}

Here is the call graph for this function:

template<class T >
void PLearn::transposeTransposeProductScaleAcc ( const TMat< T > &  mat,
const TMat< T > &  m1,
const TMat< T > &  m2,
alpha,
beta 
)

mat[i,j] = alpha * sum_k m1[k,i] * m2[j,k] + beta * mat[i,j]

Definition at line 4455 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), i, PLearn::TMat< T >::isEmpty(), j, PLearn::TMat< T >::length(), m, PLearn::TMat< T >::mod(), n, PLERROR, and PLearn::TMat< T >::width().

Referenced by productScaleAcc().

{
    int n=m1.width();
    int m=m1.length();
    int l=m2.length();
#ifdef BOUNDCHECK
    if (n!=mat.length() || m!=m2.width() || l!=mat.width())
        PLERROR("transposeTransposeProductScaleAcc(TMat, TMat, TMat),"
                " incompatible arguments:\n"
                "%dx%d <- %dx%d' times %dx%d'",
                mat.length(), mat.width(), m, n, l, m2.width());
#endif

    if (m1.isEmpty() || m2.isEmpty() || mat.isEmpty())
    {
        // Size zero: no need to bother computing anything.
        // In such a case, the result of the matrix-matrix multiplication, if
        // not empty, is necessarily zero, since R^0 = {0}.
        if (!mat.isEmpty())
            mat *= beta;
        return;
    }

    for (int i=0;i<n;i++)
    {
        T* m1ki0 = m1.data()+i;
        T* mi = mat[i];
        for (int j=0;j<l;j++)
        {
            T s=0;
            const T* m2j = m2[j];
            T* m1ki = m1ki0;
            for (int k=0;k<m;k++,m1ki+=m1.mod())
                s += (*m1ki) * m2j[k];
            mi[j] = alpha * s + beta * mi[j];
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::trimWord ( string  word)

Definition at line 2815 of file WordNetOntology.cc.

References isDigit(), isLegalPunct(), isLetter(), and NULL_TAG.

Referenced by PLearn::WordNetOntology::extractWord(), and PLearn::WordNetOntology::isInWordNet().

{
    // trim forward
    int index = 0;
    bool forward_trimmed = isLetter(word[index]) || isDigit(word[index]) || isLegalPunct(word[index]);
    while (!forward_trimmed)
    {
        index++;
        if (index > (int)word.size()) return NULL_TAG;
        forward_trimmed = isLetter(word[index]) || isDigit(word[index]) || isLegalPunct(word[index]);
    }

    word = word.substr(index, word.size());

    // trim backward
    index = word.size() - 1;
    bool backward_trimmed = isLetter(word[index]) || isDigit(word[index]) || isLegalPunct(word[index]);
    while (!backward_trimmed)
    {
        index--;
        if (index < 0) return NULL_TAG;
        backward_trimmed = isLetter(word[index]) || isDigit(word[index]) || isLegalPunct(word[index]);
    }

    string trimmed_word = word.substr(0, index + 1);

    if (trimmed_word == ".")
        return NULL_TAG;
    else
        return trimmed_word;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::two ( const T &  x) [inline]
real PLearn::ultrafastsigmoid ( const real x) [inline]

Definition at line 375 of file pl_math.h.

References ultrafasttanh().

Referenced by PLearn::PLMathTest::perform().

{
    //    return 0.5*x / (1. + fabs(x)) + 0.5;
    return (real)0.5*(ultrafasttanh(0.5*x)+1.);
    // return fastsigmoid(x);
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::ultrafasttanh ( const real x) [inline]

Definition at line 357 of file pl_math.h.

References x.

Referenced by PLearn::PLMathTest::perform(), and ultrafastsigmoid().

{
    if(x>=0)
        return (x<1.7 ? (1.5*x/(1+x)) : ( x<3 ? (0.935409070603099 + 0.0458812946797165*(x-1.7)) :0.99505475368673));
    else
    {
        real xx = -x;
        return -(xx<1.7 ? (1.5*xx/(1+xx)) : ( xx<3 ? (0.935409070603099 + 0.0458812946797165*(xx-1.7)) :0.99505475368673));
    }
}

Here is the caller graph for this function:

Var PLearn::unary_hard_slope ( Var  v,
real  l = -1,
real  r = 1 
) [inline]

Definition at line 83 of file UnaryHardSlopeVariable.h.

Referenced by PLearn::DistRepNNet::add_transfer_func(), PLearn::NNet::hiddenLayer(), and PLearn::DeepFeatureExtractorNNet::hiddenLayer().

{ return new UnaryHardSlopeVariable(v,l,r); }

Here is the caller graph for this function:

void PLearn::uncompress_vec ( char *  comprbuf,
double *  data,
int  l,
bool  double_stored_as_float 
)

Definition at line 506 of file pl_io.cc.

References n, PLERROR, and read_compr_mode_and_size_ptr().

{
    unsigned char mode;
    int n;
    double* p = data;
    while(l>0)
    {
        read_compr_mode_and_size_ptr(comprbuf, mode, n);
        //cerr << "mode: " << int(mode) << " size: " << n << endl;
        if(mode==0 || mode==1)
        {
            while(n--)
            { *p++ = 0; --l; }
            if(mode==1)
            { *p++ = 1; --l; }
        }
        else if(mode==2)
        {
            char val; 
            while(n--)
            {
                val=(*comprbuf++);
                *p++ = double(val);
                --l;
            }
        }
        else if(mode==3)
        {
            memcpy(p,comprbuf,sizeof(double)*n);
            comprbuf+=sizeof(double)*n;
            p += n;
            l -= n;
        }
        else 
            PLERROR("BUG IN binread_compressed: mode is only 2 bits, so how can it be other than 0,1,2,3 ?");
    }

    if(l!=0)
        PLERROR("In binread_compressed : l is not 0 at exit of function, wrong data?");
}

Here is the call graph for this function:

string PLearn::underscore_to_space ( string  str)

replaces all underscores by a single space character

Definition at line 313 of file stringutils.cc.

References i.

Referenced by PLearn::WordNetOntology::extractWord(), PLearn::WordNetOntology::isInWordNet(), and matlabSave().

{
    for(size_t i=0; i<str.size(); i++)
    {
        if(str[i]=='_')
            str[i] = ' ';
    }
    return str;
}

Here is the caller graph for this function:

Var PLearn::unfoldedFunc ( Var  input_matrix,
Func  f,
bool  transpose = false 
) [inline]

Definition at line 95 of file UnfoldedFuncVariable.h.

References transpose().

Referenced by PLearn::NeighborhoodSmoothnessNNet::build_().

{ return new UnfoldedFuncVariable(input_matrix, f, transpose); }

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::unfoldedSumOf ( Var  input_matrix,
Var  bag_size,
Func  f,
int  max_bag_size 
) [inline]

Definition at line 91 of file UnfoldedSumOfVariable.h.

Referenced by PLearn::MultiInstanceNNet::build_().

{ return new UnfoldedSumOfVariable(input_matrix,bag_size,f,max_bag_size); }

Here is the caller graph for this function:

int PLearn::uniform_multinomial_sample ( int  N)

return an integer between 0 and N-1 with equal probabilities

Definition at line 516 of file random.cc.

References uniform_sample().

Referenced by bootstrap(), bootstrap_rows(), fill_random_discrete(), PLearn::KMeansClustering::forget(), PLearn::EmpiricalDistribution::generate(), PLearn::VMatrix::lockMetaDataDir(), and smartInitialization().

{
    // N.B. uniform_sample() cannot return 1.0
    return int(N*uniform_sample());
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::uniform_sample ( )

Long period ramdom number generator from the 'numerical recipes'.

Rem: - It is a long period (> 2 x 10^18) random number generator of L'Ecuyer with Bays-Durham shuffle and added safeguards.

  • Initialized with a negative seed.
    Returns:
    a random number uniformly distributed between 0 and 1 \ (exclusive of the endpoint values).

Definition at line 220 of file random.cc.

References AM1, IA1, IA2, IM1, IM2, IMM1, IQ1, IQ2, IR1, IR2, j, NDIV1, NTAB, RNMX, and the_seed.

Referenced by bnldev(), bounded_uniform(), PLearn::RepeatSplitter::build_(), PLearn::MultiToUniInstanceSelectRandomVMatrix::build_(), expdev(), fill_random_uniform(), gamdev(), gaussian_01(), PLearn::ConditionalDensityNet::generate(), PLearn::OptimizeOptionOracle::generateNextTrial(), PLearn::UniformVMatrix::get(), PLearn::RandomNeighborsDifferencesVMatrix::getNewRow(), PLearn::UniformVMatrix::getSubRow(), multinomial_sample(), PLearn::TextSenseSequenceVMatrix::permute(), poidev(), randomRotation(), randomShuffleRows(), shuffleElements(), shuffleRows(), PLearn::AdaBoost::train(), and uniform_multinomial_sample().

{
    int j;
    int32_t k;
    static int32_t idum2=123456789;
    static int32_t iy=0;
    static int32_t iv[NTAB];
    real temp;

    if (the_seed <= 0) {
        if (-the_seed < 1) the_seed=1;
        else the_seed = -the_seed;
        idum2=the_seed;
        for (j=NTAB+7;j>=0;j--) {
            k=the_seed/IQ1;
            the_seed=IA1*(the_seed-k*IQ1)-k*IR1;
            if (the_seed < 0) the_seed += IM1;
            if (j < NTAB) iv[j] = the_seed;
        }
        iy=iv[0];
    }
    k=the_seed/IQ1;
    the_seed=IA1*(the_seed-k*IQ1)-k*IR1;
    if (the_seed < 0) the_seed += IM1;
    k=idum2/IQ2;
    idum2=IA2*(idum2-k*IQ2)-k*IR2;
    if (idum2 < 0) idum2 += IM2;
    j=int(iy/NDIV1);
    iy=iv[j]-idum2;
    iv[j] = the_seed;
    if (iy < 1) iy += IMM1;
    if ((temp=AM1*iy) > RNMX) return RNMX;
    else return temp;
}

Here is the caller graph for this function:

void PLearn::UNIT_TEST ( const string &  argument) [inline]

Definition at line 171 of file AutoVMatrixTest.cc.

References endl(), MAND_LOG, PLearn::PLearnError::message(), perr, plhead(), and unitTest().

Referenced by PLearn::AutoVMatrixTest::perform().

{
    MAND_LOG << plhead(argument) << endl;
    try {
        unitTest(argument);
        MAND_LOG << endl;
    }
    catch(const PLearnError& e)
    {
        perr << "FATAL ERROR: " << e.message() << endl << endl;
    }
    catch (...)
    {
        perr << "FATAL ERROR: uncaught unknown exception" << endl << endl;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::unitmatrix ( int  n)

Definition at line 140 of file Mat.cc.

References i, m, and n.

{
    Mat m(n,n);
    for(int i=0; i<n; i++)
        m(i,i) = 1.0;
    return m;
}
void PLearn::unitTest ( const PPath &  path)

Definition at line 153 of file AutoVMatrixTest.cc.

References PLearn::PPath::basename(), dot(), endl(), m, MAND_LOG, and save_load_compare().

{
    AutoVMatrix vm(path);
    MAND_LOG << vm << endl;

    Mat m(vm);
    MAND_LOG << m << endl;

    PPath base       = path.basename();
    unsigned int dot = base.rfind('.');
    base[dot]        = '_';
    PPath prefix     = base + "__to__";

    save_load_compare( vm, prefix, base, ".amat", dot );
    save_load_compare( vm, prefix, base, ".pmat", dot );
    save_load_compare( vm, prefix, base, ".dmat", dot );
}

Here is the call graph for this function:

void PLearn::unitTest ( const string &  p)

Definition at line 516 of file PPathTest.cc.

Referenced by UNIT_TEST().

{
    // ### The test code should go here.
    PL_Log::instance().verbosity(VLEVEL_NORMAL);
    PL_Log::instance().outmode( PStream::raw_ascii );
    // Add root metaprotocol binding for cross-platform tests.
#ifdef WIN32
    string pl_root = "C:\\";
#else
    string pl_root = "/";
#endif

Here is the caller graph for this function:

int PLearn::universal_compare ( const string &  x,
const string &  y 
)

"Universal compare".

If x and y "look like" numbers (according to 'todouble'), compare them as numbers: return <0 if x<y, ==0 if x==y and >0 if x>y. Equality checking for numbers is performed with pl_math.cc::is_equal function. Otherwise, return x.compare(y) [[string comparison]]

Definition at line 604 of file stringutils.cc.

References is_equal(), is_missing(), and todouble().

{
    // Try numerical comparison
    double x_double = todouble(x);
    double y_double = todouble(y);
    if (! (is_missing(x_double) || is_missing(y_double))) {
        if (is_equal(x_double, y_double))
            return 0;
        else
            return int(x_double - y_double);
    }

    // Fall back to string comparison
    return x.compare(y);
}

Here is the call graph for this function:

void PLearn::untagVariables ( VarArray  vars,
string  tag 
)

Definition at line 806 of file DisplayUtils.cc.

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

Referenced by displayFunction().

{
  int startpos = tag.length()+1;
  for(int i=0; i<vars.length(); i++)
    {
      string name = vars[i]->getName();
      vars[i]->setName(name.substr(startpos,name.length()-startpos));
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::update ( ProbabilitySparseMatrix &  pYX,
ProbabilitySparseMatrix &  nYX 
) [inline]

Definition at line 497 of file ProbabilitySparseMatrix.h.

References PLearn::Set::begin(), PLearn::ProbabilitySparseMatrix::clear(), PLearn::ProbabilitySparseMatrix::computeX(), PLearn::ProbabilitySparseMatrix::computeY(), PLearn::Set::end(), PLearn::ProbabilitySparseMatrix::set(), PLearn::ProbabilitySparseMatrix::sumPYx(), x, PLearn::ProbabilitySparseMatrix::X, and PLearn::ProbabilitySparseMatrix::Y.

Referenced by PLearn::VMatrix::computeStats(), computeStats(), PLearn::SequentialModelSelector::test(), PLearn::SequentialModelSelector::train(), PLearn::StatsIterator::update(), PLearn::ConstrainedSourceVariable::update(), and vmatmain().

{
    pYX.clear();
    nYX.computeX();
    nYX.computeY();
    for (SetIterator xit = nYX.X.begin(); xit != nYX.X.end(); ++xit)
    {
        int x = *xit;
        real sumYx = nYX.sumPYx(x);
        if (sumYx != 0.0)
        {
            for (SetIterator yit = nYX.Y.begin(); yit != nYX.Y.end(); ++yit)
            {
                int y = *yit;
                real p = nYX(y, x) / sumYx;
                if (p)
                    pYX.set(y, x, p);
            }
        }
    }
    pYX.computeY();
    pYX.computeX();
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename RandomAccessIterator , typename StrictWeakOrdering >
void PLearn::update_heap ( RandomAccessIterator  first,
RandomAccessIterator  last,
RandomAccessIterator  damaged,
StrictWeakOrdering  comp 
)

This function restores the heap condition for a heap that has been "damaged" (i.e.

for which the heap condition might be locally violated). The heap is contained between [first,last), and the damaged object is pointed to by 'damaged'.

Definition of the heap condition: for any object and its two children (child1 and child2), comp(object,childi) is false.

Definition at line 66 of file heap_utilities.h.

Referenced by PLearn::HeapTest::perform(), and update_heap().

{
    typedef typename std::iterator_traits<RandomAccessIterator>::difference_type
        difference_type;
    difference_type cur = damaged-first;
    difference_type size = last-first;
    typename
        std::iterator_traits<RandomAccessIterator>::value_type value = *damaged;

    // Push down as much as possible, then push up
    difference_type second_child = 2*cur+2;
    while (second_child < size) {              // there are two children
        if (comp(first[second_child], first[second_child-1]))
            second_child--;                        // take larger child
        first[cur] = first[second_child];        // fill hole
        cur = second_child;
        second_child = 2 * (second_child+1);
    }
    if (second_child == size) {
        first[cur] = first[second_child-1];      // hole is in first child
        cur = second_child-1;
    }
    first[cur] = value;
    push_heap(first,first+cur+1,comp);
}

Here is the caller graph for this function:

template<typename RandomAccessIterator >
void PLearn::update_heap ( RandomAccessIterator  first,
RandomAccessIterator  last,
RandomAccessIterator  damaged 
) [inline]

Version of update_heap that uses less<T> as the strict weak ordering.

Definition at line 100 of file heap_utilities.h.

References update_heap().

{
    typedef typename std::iterator_traits<RandomAccessIterator>::value_type value_type;
    update_heap(first,last,damaged, std::less<value_type>());
}

Here is the call graph for this function:

void PLearn::updateAndClearCounts ( ProbabilitySparseMatrix &  pYX,
ProbabilitySparseMatrix &  nYX 
) [inline]

Definition at line 521 of file ProbabilitySparseMatrix.h.

References PLearn::Set::begin(), PLearn::ProbabilitySparseMatrix::clear(), PLearn::ProbabilitySparseMatrix::computeX(), PLearn::ProbabilitySparseMatrix::computeY(), PLearn::Set::end(), PLearn::ProbabilitySparseMatrix::set(), PLearn::ProbabilitySparseMatrix::sumPYx(), PLearn::ProbabilitySparseMatrix::X, x, and PLearn::ProbabilitySparseMatrix::Y.

{
    pYX.clear();
    nYX.computeX();
    nYX.computeY();
    for (SetIterator xit = nYX.X.begin(); xit != nYX.X.end(); ++xit)
    {
        int x = *xit;
        real sumYx = nYX.sumPYx(x);
        if (sumYx != 0.0)
        {
            for (SetIterator yit = nYX.Y.begin(); yit != nYX.Y.end(); ++yit)
            {
                int y = *yit;
                real p = nYX(y, x) / sumYx;
                if (p)
                    pYX.set(y, x, p);
            }
        }
    }
    pYX.computeY();
    pYX.computeX();
}

Here is the call graph for this function:

string PLearn::upperstring ( const string &  ss)

convert a string to all uppercase

Definition at line 249 of file stringutils.cc.

Referenced by PLearn::RealMapping::read().

{
    string s(ss);
    string::iterator it = s.begin(), end = s.end();

    // for some reason toupper and tolower from ctype.h seem to create
    // problems when compiling in optimized mode, so we do this
    for (; it != end; ++it)
    {
        if(*it>='a' && *it<='z')
            *it -= 'a'-'A';
    }
    return s;
}

Here is the caller graph for this function:

void PLearn::usage ( )

Definition at line 460 of file old_plearn_main.cc.

References endl().

Referenced by PLearn::Test_PP::copieConsChildPP(), PLearn::Test_PP::copieConsSameTypePP(), PLearn::ChildB::deepCopy(), PLearn::ChildA::deepCopy(), PLearn::Parent::deepCopy(), PLearn::Test_PP::invariants(), old_plearn_main(), PLearn::TMat< pair< real, real > >::resize(), and PLearn::TMat< T >::resizePreserve().

{
    cerr << "Usage: " << endl
         << " * plearn train <modelalias> <trainsetalias> [<testsetalias> <testsetalias> ...]\n"
         << "   Will look for the corresponding alias in the 'model.aliases' file in the current directory \n"
         << "   as well as for the specified dataset aliases in a 'dataset.aliases' file in the current or parent direcotries \n"
         << "   It will then build the specified learner with the specified learneroptions, \n"
         << "   train it on the specified train set, and save results (including test results \n"
         << "   on specified testsets) in <modelalias> directory. \n"
         << "   NOTE: you can train multiple models if you append ('*') to a model alias prefix.\n"
         << "   Dont forget the quotes when you use the wildcard to prevent shelle expansion!\n"
         << "         e.g: 'plearn train 'linear*' train valid'.\n"
         << " * plearn cross kfoldval <modelalias> <trainsetalias>\n"
         << "   As with train, but will perform a crossvalidation training with ?? Pascal, complete ca stp:)\n"
         << " * plearn use <model#.psave> <datasetalias>\n"
         << "   After locating the appropriate dataset.aliases looking in parent directories, \n"
         << "   will apply the saved model to the specified dataset, and compute and create \n"
         << "   <model#>.<datasetalias>.outputs.pmat and <model#>.<datasetalias>.costs.pmat \n"
         << " * plearn listmodels <model> \n"
         << "   list the model aliases in the model.aliases file\n"
         << "   model can optionnaly contain a wildcard '*'\n"

        /*
          << " * plearn test <modeldir> <testsetalias> [<testsetalias> ...] \n"
          << "   Will look for a dataset.aliases file in <modeldir> and its parent directories \n"
          << "   to determine which actual datasets the specified testsetalias arguments refer to.\n"
          << "   It will then keep watching the modeldir for any new, untested, model#.psave \n"
          << "   and test it on the specified sets. \n" 
        */
         << " * plearn help datasets \n"
         << "   Will display info about the dataset specification strings you can use to define \n"
         << "   aliases in the dataset.aliases file \n"
         << " * plearn help Learner \n"
         << "   Will print a list of available learners\n"
         << " * plearn help Optimizer \n"
         << "   Will print a list of available optimizers\n"
         << " * plearn help <object-type> \n"
         << "   Will display help (mostly about available options) for that object-type\n"
         << endl;
    exit(0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::use ( const string &  modelfile,
const string &  datasetalias 
)

Definition at line 407 of file old_plearn_main.cc.

References endl(), exitmsg(), getDataSet(), i, PLearn::VMat::length(), loadObject(), remove_extension(), PLearn::TVec< T >::subVec(), and PLearn::VMat::width().

Referenced by old_plearn_main(), and PLearn::Learner::use().

{
    map<string,string> aliases = getDatasetAliases(modelfile);
    if(aliases.empty())
        exitmsg("Problem: could not locate a meaningful dataset.aliases file in this or parent directories");
    if(aliases.find(datasetalias)==aliases.end())
        exitmsg("Problem: no %s in dataset.aliases file",datasetalias.c_str());
    string dataset = aliases[datasetalias];
    VMat vm = getDataSet(dataset);
    cout << ">> Dataset has " << vm.length() << " rows and " << vm.width() << " columns" << endl;
    PP<Learner> learner = dynamic_cast<Learner*>(loadObject(modelfile));
    if(!learner)
        exitmsg("Problem in making file %s into a Learner",modelfile.c_str());

    if(learner->costsize() < 1)
        learner->setTestCostFunctions(Array<Ker>(new SquaredErrorCostFunction()));

    cout << ">> Learner has inputsize=" << learner->inputsize() << " targetsize=" << learner->targetsize() << " outputsize=" << learner->outputsize() << endl;
    //  if(vm.width()!=learner->inputsize()+learner->targetsize())
    //    exitmsg("Problem: learner's inputsize+targetsize differs from the width of the dataset!!!");
    string targetfile = datasetalias+".targets.pmat";
    string outputfile = remove_extension(modelfile)+"."+datasetalias+".outputs.pmat";
    string costfile = remove_extension(modelfile)+"."+datasetalias+".costs.pmat";
    int l = vm.length();
    VMat outputmat = new FileVMatrix(outputfile,l,learner->outputsize());
    VMat costmat = new FileVMatrix(costfile,l,learner->costsize());
    VMat targetmat = new FileVMatrix(targetfile,l,learner->targetsize());
    Vec input_and_target(vm.width());
    Vec input = input_and_target.subVec(0,learner->inputsize());
    Vec target = input_and_target.subVec(learner->inputsize(), learner->targetsize());
    Vec output(learner->outputsize());
    Vec cost(learner->costsize());
    Vec costs(learner->costsize(), 0.0);
    {//beg. scope of ProgressBar
        ProgressBar pbar(cout,"Computing output and cost",l);
        for(int i=0; i<l; i++)
        {
            vm->getRow(i,input_and_target);
            learner->useAndCost(input, target, output, cost);
            targetmat->putRow(i,target);
            outputmat->putRow(i,output);
            costmat->putRow(i,cost);
            costs+= cost;
            pbar(i);
        }
        // learner->applyAndComputeCosts(vm,outputmat,costmat); 
    }//end. scope of ProgressBar

    cout << learner->costNames() << endl
         << costs/l << endl;

}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::var ( real  init_value) [inline]
void PLearn::varDeepCopyField ( Var &  field,
CopiesMap &  copies 
)

To use varDeepCopyField.

Definition at line 59 of file Var.cc.

Referenced by PLearn::Variable::makeDeepCopyFromShallowCopy(), PLearn::VarArray::makeDeepCopyFromShallowCopy(), PLearn::UnfoldedSumOfVariable::makeDeepCopyFromShallowCopy(), PLearn::UnaryVariable::makeDeepCopyFromShallowCopy(), PLearn::TangentLearner::makeDeepCopyFromShallowCopy(), PLearn::ScoreLayerVariable::makeDeepCopyFromShallowCopy(), PLearn::PotentialsVariable::makeDeepCopyFromShallowCopy(), PLearn::Optimizer::makeDeepCopyFromShallowCopy(), PLearn::NonLocalManifoldParzen::makeDeepCopyFromShallowCopy(), PLearn::NNet::makeDeepCopyFromShallowCopy(), PLearn::MultiInstanceNNet::makeDeepCopyFromShallowCopy(), PLearn::MoleculeTemplateLearner::makeDeepCopyFromShallowCopy(), PLearn::MatrixElementsVariable::makeDeepCopyFromShallowCopy(), PLearn::LinearInductiveTransferClassifier::makeDeepCopyFromShallowCopy(), PLearn::GaussianContinuumDistribution::makeDeepCopyFromShallowCopy(), PLearn::GaussianContinuum::makeDeepCopyFromShallowCopy(), PLearn::DistRepNNet::makeDeepCopyFromShallowCopy(), PLearn::DeepReconstructorNet::makeDeepCopyFromShallowCopy(), PLearn::DeepFeatureExtractorNNet::makeDeepCopyFromShallowCopy(), PLearn::ConditionalDensityNet::makeDeepCopyFromShallowCopy(), PLearn::ChemicalICP::makeDeepCopyFromShallowCopy(), PLearn::BinaryVariable::makeDeepCopyFromShallowCopy(), PLearn::BiasWeightAffineTransformVariable::makeDeepCopyFromShallowCopy(), and PLearn::AddCostToLearner::makeDeepCopyFromShallowCopy().

{
    if (field)
        field = field->deepCopy(copies);
}  

Here is the caller graph for this function:

template<class T >
T PLearn::variance ( const TVec< T > &  vec,
meanval,
bool  ignore_missing = false 
)

Definition at line 629 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), diff(), i, is_missing(), PLearn::TVec< T >::length(), MISSING_VALUE, n, PLERROR, and PLearn::TVec< T >::size().

Referenced by columnVariance(), computeConditionalMeans(), PLearn::CorrelationKernel::evaluate(), PLearn::VecStatsCollector::getStdDev(), PLearn::VecStatsCollector::getVariance(), PLearn::DiagonalNormalRandomVariable::logP(), normal(), rowVariance(), PLearn::SequentialModelSelector::sequenceCost(), PLearn::VMFieldStat::stddev(), PLearn::StatsCollector::stddev(), PLearn::StatsCollector::stderror(), and vmatmain().

{
#ifdef BOUNDCHECK
    if(vec.length()<=1)
        PLERROR("IN T variance(const TVec<T>& vec, T meanval) vec length must be more than one");
#endif
    if (vec.size() == 0)
        return MISSING_VALUE;
    double res = 0.0;
    T* v = vec.data();
    int n = 0;
    for(int i=0; i<vec.length(); i++)
    {
        if (!is_missing(v[i]))
        {
            double diff = v[i]-meanval;
            res += diff*diff;
            n++;
        }
        else if (!ignore_missing)
            return MISSING_VALUE;
    }
    if (n == 0)
        return MISSING_VALUE;
    else
        return T(res/n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::variance ( const TMat< T > &  mat,
meanval 
)

Definition at line 5025 of file TMat_maths_impl.h.

References PLearn::TMat< T >::data(), diff(), i, j, PLearn::TMat< T >::length(), PLearn::TMat< T >::mod(), PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(mat.length()==0 || mat.width()==0)
        PLERROR("IN T variance(const TMat<T>& mat, T meanval) mat has 0 size");
#endif
    double res = 0.0;
    T* m_i = mat.data();
    for(int i=0; i<mat.length(); i++, m_i+=mat.mod())
        for(int j=0; j<mat.width(); j++)
        {
            double diff = m_i[j]-meanval;
            res += diff*diff;
        }
    return res/(mat.length()*mat.width()-1);
}

Here is the call graph for this function:

VMat PLearn::vconcat ( VMat  d1,
VMat  d2 
) [inline]

Definition at line 153 of file ConcatRowsVMatrix.h.

{ return new ConcatRowsVMatrix(d1,d2); }
template<class T >
TMat<T> PLearn::vconcat ( const TMat< T > &  m1,
const TMat< T > &  m2 
) [inline]

Definition at line 211 of file Array_impl.h.

References vconcat().

{ return vconcat(Array< TMat<T> >(m1,m2)); }

Here is the call graph for this function:

VMat PLearn::vconcat ( TVec< VMat >  ds) [inline]

Definition at line 156 of file ConcatRowsVMatrix.h.

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

                                   {
    if (ds.size() == 1) {
        // Only one matrix: no need to use a ConcatRowsVMatrix.
        return ds[0];
    } else {
        return new ConcatRowsVMatrix(ds);
    }
}

Here is the call graph for this function:

Var PLearn::vconcat ( const VarArray &  varray) [inline]

Definition at line 79 of file ConcatRowsVariable.h.

{ return new ConcatRowsVariable(varray); }
template<class T >
TMat<T> PLearn::vconcat ( const Array< TMat< T > > &  ar)

Definition at line 169 of file Array_impl.h.

References n, PLERROR, PLearn::TMat< T >::subMatRows(), and w.

Referenced by PLearn::ScoreLayerVariable::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::AddLayersNNet::build_(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::DistRepNNet::buildVarGraph(), PLearn::VVMatrix::createPreproVMat(), PLearn::MixtureRandomVariable::ElogP(), PLearn::TrainValidTestSplitter::getSplit(), PLearn::TestInTrainSplitter::getSplit(), loadUCI(), PLearn::MixtureRandomVariable::logP(), PLearn::RVArrayRandomElementRandomVariable::logP(), PLearn::GaussianContinuumDistribution::make_random_walk(), PLearn::GaussianContinuum::make_random_walk(), PLearn::RVInstanceArray::operator|(), removeRow(), PLearn::JointRandomVariable::setValueFromParentsValue(), split(), PLearn::InterValuesVariable::symbolicBprop(), and vconcat().

{
    int l = 0;
    int w = ar[0].width();
    for(int n=0; n<ar.size(); n++)
    {
        if(ar[n].width() != w)
            PLERROR("In Mat vconcat(Array<Mat> ar) all Mats do not have the same width()!");
        l += ar[n].length();
    }
    TMat<T> result(l, w);
    int pos = 0;
    for(int n=0; n<ar.size(); n++)
    {
        result.subMatRows(pos, ar[n].length()) << ar[n];
        pos+=ar[n].length();  // do not put this line after the n++ in the for loop, or it will cause a bug!
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
int PLearn::vec_counts ( const TVec< T > &  src,
value 
)

Definition at line 2397 of file TMat_maths_impl.h.

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

{
    int len = src.length();
    int n = 0;
    if (len > 0) {
        T *p = src.data();
        for (int i=0; i<len; i++, p++)
            if (*p == value)
                n++;
    }
    return n;
}

Here is the call graph for this function:

template<class T >
int PLearn::vec_find ( const TVec< T > &  src,
f 
)

Definition at line 2412 of file TMat_maths_impl.h.

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

Referenced by PLearn::GeneralizedOneHotVMatrix::build_(), and PLearn::GeneralizedOneHotVMatrix::getNewRow().

{
    int len = src.length();
    if (len > 0) {
        T *p = src.data();
        for (int i=0; i<len; i++, p++)
            if (*p == f)
                return(i);
    }
    return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void void void PLearn::verrormsg ( const char *  msg,
va_list  args 
)

Definition at line 86 of file plerror.cc.

References endl(), ERROR_MSG_SIZE, error_stream, and PLearn::PLMPI::rank.

Referenced by errormsg(), errormsg2(), warn_err(), and warn_err2().

{
    char message[ERROR_MSG_SIZE];

#if !defined(ULTRIX) && !defined(_MINGW_) && !defined(WIN32)
    vsnprintf(message, ERROR_MSG_SIZE,msg,args);
#else
    vsprintf(message,msg,args);
#endif
    //output to module log: can be useful when throwing exceptions
    DBG_MODULE_LOG << endl << "-------------- PLERROR:" << message << endl << "--------------" << endl;
#ifndef USE_EXCEPTIONS
#if USING_MPI
    *error_stream <<" ERROR from rank=" << PLMPI::rank << ": " <<message<<endl;
#else //USING_MPI
    *error_stream <<" ERROR: "<<message<<endl;
#endif //USING_MPI
    exit(1);
#else
// Commented out as one error message seems to be enough.
//  IMP_LOG << "Throwing PLearnError exception: " << message << endl;
    throw PLearnError(message);                
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

std::string PLearn::version_string ( )

Definition at line 116 of file plearn_main.cc.

References pl_repository_compile_date(), pl_repository_compile_time(), pl_repository_revision(), prgname(), and tostring().

Referenced by PLearn::HTMLUtils::generated_by(), PLearn::HTMLHelpCommand::generated_by(), output_version(), and PLearn::Plide::versionString().

{
    string s;
    if(plearn_major_version == -1)
        return string();
    s = prgname() + ' ' + tostring(plearn_major_version);
    if (plearn_minor_version >= 0) {
        s += '.' + tostring(plearn_minor_version);
        if (plearn_fixlevel >= 0)
            s += '.' + tostring(plearn_fixlevel);
    }
    s += "  svn_revision:" + pl_repository_revision();
    s += "  (" + pl_repository_compile_date() + ' ' +
        pl_repository_compile_time() + ")\n";
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::viewVMat ( const VMat &  vm,
PPath  filename = "" 
)

Enters curses interactive view of dataset vm.

'filename' is the optional filename of the dataset, that may be used to reload it.

Can take three values: 0 - usual display 1 - values that are *exactly* the same as the one of the previous vmat line will be replaced by ... 2 - values that are *approximately* the same as the one of the previous vmat line will be replaced by ...

if true we will display the filename at the bottom of the screan instead of the normal other information.

Definition at line 159 of file viewVMat.cc.

References PLearn::TVec< T >::append(), c, PLearn::VMat::columns(), fast_exact_is_equal(), PLearn::VMat::fieldName(), get_pointer(), PLearn::VMat::getColumn(), getDataSet(), PLearn::VMat::getFieldIndex(), getList(), i, is_equal(), is_missing(), j, PLearn::VMat::length(), max(), min(), pl_isnumber(), PLERROR, removeblanks(), PLearn::TVec< T >::resize(), strlen(), toint(), tostring(), PLearn::VMat::width(), and x.

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

{
    initscr();
    cbreak();
    noecho();
    keypad(stdscr,TRUE);

    VMat vm_showed = vm;

    int key = 0;
    bool view_strings = true;
    // If 'indent_strings_left' is set to false, then strings will be indented
    // to the right.
    bool indent_strings_left = true;
    int hide_sameval = 0;
    bool transposed = false;

    bool display_filename = false;
    int namewidth = 0;
    for(int j=0; j<vm->width(); j++)
        namewidth = max(namewidth, (int) vm->fieldName(j).size());
    int namewidth_ = namewidth;

    int valwidth = 15;
    int valstrwidth = valwidth-1;

    const char* valstrformat = "%14s";

    int curi = 0;
    int curj = 0;
    int starti = 0;
    int startj = 0;

    int vStartHelp = 0;

    bool onError=false;

    map<int,Vec> cached_columns;

    try {

        while(key != 'q' && key != 'Q')
        {
            erase();

            int leftcolwidth = transposed ?1+namewidth :10;

            int nj = transposed ? LINES-3 : (COLS-leftcolwidth)/valwidth;
            int ni = transposed ? (COLS-leftcolwidth)/valwidth : LINES-4;
            if(display_filename && filename.length()>(size_t)COLS)
                ni -= filename.length()/COLS;

            int endj = min(vm_showed->width(), startj+nj);
            int endi = min(vm_showed->length(), starti+ni);

            int x=0, y=0; // (curses coordinates are (y,x) )

            // print field names
            for(int j=startj; j<endj; j++)
            {
                string s = vm_showed->fieldName(j);
                if ( int(s.size()) > namewidth)
                    s = s.substr(0, namewidth);

                // if(j==curj)
                //  attron(A_REVERSE);
                if(transposed)
                    mvprintw(1+(j-startj),0,"%s", s.c_str());
                else
                {
                    x = 1+leftcolwidth+(j-startj)*valwidth;
                    mvprintw(0, x, valstrformat,
                             s.substr(0,valstrwidth).c_str() );
                    if((int)s.length() > valstrwidth)
                        mvprintw(1, x, valstrformat,
                                 s.substr(valstrwidth,valstrwidth).c_str() );
                }
                // attroff(A_REVERSE);
            }

            Vec v(vm_showed.width());
            Vec oldv(vm_showed.width());

            for(int i=starti; i<endi; i++)
            {
                if(transposed)
                {
                    y = 0;
                    x = 1+leftcolwidth+(i-starti)*valwidth;
                    mvprintw(y,x,"%14d",i);
                }
                else
                {
                    y = i-starti+2;
                    x = 0;
                    mvprintw(y,x,"%d",i);
                }

                vm_showed->getRow(i,v);

                for(int j=startj; j<endj; j++)
                {
                    real val = v[j];
                    string s = vm_showed->getValString(j,val);
                    if (!view_strings || s == "")
                    {
                        // We only have 14 characters, and have to display
                        // correctly numbers like "18270326".
                        // Best compromise found is "%14.8g".
                        char tmp[1000];
                        sprintf(tmp, "%14.8g", val);
                        s = tmp;
                    }
                    else {
                        // This is a string. Maybe we want to indent it to the
                        // right.
                        // In this case we truncate it to its last characters.
                        if (!indent_strings_left) {
                            if (s.size() >= (size_t) valstrwidth) {
                                s = s.substr(s.size() - valstrwidth,
                                             valstrwidth);
                            } else {
                                string added_spaces((size_t) (valstrwidth - s.size()), ' ');
                                s = added_spaces + s;
                            }
                        }
                    }

                    if(transposed)
                        y = 1+(j-startj);
                    else
                        x = 1+leftcolwidth+(j-startj)*valwidth;

                    if( i == curi || (vm_showed.width() > 1 && j == curj) )
                        attron(A_REVERSE);
                    //else if ()
                    //  attron(A_REVERSE);

                    if(hide_sameval== 2 && i>starti && (is_equal(val,oldv[j])) )
                        mvprintw(y, x, valstrformat, "...");
                    else if(fast_exact_is_equal(hide_sameval, 1) && i>starti &&
                            (fast_exact_is_equal(val, oldv[j]) ||
                             (is_missing(val) && is_missing(oldv[j]))))
                        mvprintw(y, x, valstrformat, "...");
                    else
                        mvprintw(y, x, valstrformat,
                                 s.substr(0,valstrwidth).c_str());

                    attroff(A_REVERSE);
                }
                oldv << v;
            }

            string strval = vm_showed->getString(curi, curj);
            mvprintw(0,0,"Cols[%d-%d]", 0, vm_showed.width()-1);
            if(display_filename){
                mvprintw(LINES-filename.length()/COLS-1,0,"%s",filename.c_str());
            }else
                mvprintw(LINES-1,0,
                         " %dx%d   line= %d   col= %d     %s = %s (%f)",
                         vm_showed->length(), vm_showed->width(),
                         curi, curj, vm_showed->fieldName(curj).c_str(),
                         strval.c_str(), vm_showed(curi,curj));

            refresh();
            if (!onError)
                key = getch();
            else
                onError = false;

            switch(key)
            {
            case KEY_LEFT:
                if(transposed)
                {
                    if(curi>0)
                        --curi;
                    if(curi<starti)
                        starti = curi;
                }
                else
                {
                    if(curj>0)
                        --curj;
                    if(curj<startj)
                        startj=curj;
                }
                break;
            case KEY_RIGHT:
                if(transposed)
                {
                    if(curi<vm_showed->length()-1)
                        ++curi;
                    if(curi>=starti+ni)
                        ++starti;
                }
                else
                {
                    if(curj<vm_showed->width()-1)
                        ++curj;
                    if(curj>=startj+nj)
                        ++startj;
                }
                break;
            case KEY_UP:
                if(transposed)
                {
                    if(curj>0)
                        --curj;
                    if(curj<startj)
                        startj=curj;
                }
                else
                {
                    if(curi>0)
                        --curi;
                    if(curi<starti)
                        starti = curi;
                }
                break;
            case KEY_DOWN:
                if(transposed)
                {
                    if(curj<vm_showed->width()-1)
                        ++curj;
                    if(curj>=startj+nj)
                        ++startj;
                }
                else
                {
                    if(curi<vm_showed->length()-1)
                        ++curi;
                    if(curi>=starti+ni)
                        ++starti;
                }
                break;
            case KEY_PPAGE:
                if(transposed)
                {
                    curj -= nj;
                    startj -= nj;
                    if(startj<0)
                        startj = 0;
                    if(curj<0)
                        curj = 0;
                }
                else
                {
                    curi -= ni;
                    starti -= ni;
                    if(starti<0)
                        starti = 0;
                    if(curi<0)
                        curi = 0;
                }
                break;
            case KEY_NPAGE:
                if(transposed)
                {
                    curj += nj;
                    startj += nj;
                    if(curj>=vm_showed->width())
                        curj = vm_showed->width()-1;
                    if(startj>vm_showed->width()-nj)
                        startj = max(0,vm_showed->width()-nj);
                }
                else
                {
                    curi += ni;
                    starti += ni;
                    if(curi>=vm_showed->length())
                        curi = vm_showed->length()-1;
                    if(starti>vm_showed->length()-ni)
                        starti = max(0,vm_showed->length()-ni);
                }
                break;
            case KEY_HOME:
                // not working on unix for the moment: see
                // http://dickey.his.com/xterm/xterm.faq.html#xterm_pc_style
                if(transposed)
                {
                    curi = 0;
                    starti = 0;
                }
                else
                {
                    curj = 0;
                    startj = 0;
                }
                break;
            case KEY_END:
                // not working on unix for the moment: see
                // http://dickey.his.com/xterm/xterm.faq.html#xterm_pc_style
                if(transposed)
                {
                    curi = vm_showed->length()-1;
                    starti = max(curi-ni + 1, 0);
                }
                else
                {
                    curj = vm_showed->width()-1;
                    startj = max(curj-nj + 1, 0);
                }
                break;
            case '.':
                if (hide_sameval == 1)
                    hide_sameval = 0;
                else
                    hide_sameval = 1;
                break;
            case ',':
                if (hide_sameval == 2)
                    hide_sameval = 0;
                else
                    hide_sameval = 2;
                break;
            case 't': case 'T':
                transposed = !transposed;
                nj = transposed ? LINES-3 : (COLS-leftcolwidth)/valwidth;
                ni = transposed ? (COLS-leftcolwidth)/valwidth : LINES-4;
                starti = max(0,curi-ni/2);
                startj = max(0,curj-nj/2);
                //endj = min(vm_showed->width(), startj+nj);
                //endi = min(vm_showed->length(), starti+ni);
                break;
            case '/':  // search for value
            {
                echo();
                char strmsg[] = {"Search for value or string: "};
                mvprintw(LINES-1,0,strmsg);
                // clear the rest of the line
                clrtoeol();
                move(LINES-1, (int)strlen(strmsg));
                char l[20];
                getnstr(l, 20);
                string searchme = removeblanks(l);
                real searchval = vm_showed(curi,curj);
                if(searchme!="")
                {
                    searchval = vm_showed->getStringVal(curj, searchme);
                    if(is_missing(searchval))
                    {
                        searchval = toreal(searchme);
                        // This one gives a very bad error: to be changed
                        if(is_missing(searchval))
                            PLERROR("Search item is neither a string with a valid mapping, nor convertible to a real");
                    }
                }

                Vec cached;
                if(cached_columns.find(curj)!=cached_columns.end())
                    cached = cached_columns[curj];
                else
                {
                    mvprintw(LINES-1,0,"Building cache...");
                    // clear the rest of the line
                    clrtoeol();
                    refresh();
                    cached.resize(vm_showed->length());
                    vm_showed->getColumn(curj,cached);
                    cached_columns[curj] = cached;
                }

                mvprintw(LINES-1,0,"Searching for value %f ...",searchval);
                clrtoeol();
                refresh();
                int curi_backup = curi;
                ++curi; // start searching from next row
                while(curi<vm_showed->length() &&
                      !fast_exact_is_equal(cached[curi], searchval))
                    ++curi;
                bool found = (curi < vm_showed->length());
                if (!found) {
                    // Try approximate match.
                    curi = curi_backup + 1;
                    while(curi<vm_showed->length() &&
                            !is_equal(cached[curi], searchval))
                        ++curi;
                }
                if(curi>=vm_showed->length())
                    curi = 0;
                ni = transposed ? (COLS-leftcolwidth)/valwidth : LINES-4;
                starti = max(0,curi-ni/2);
            }
            break;
            case (int)'l': case (int)'L':
            {
                echo();
                char strmsg[] = {"Goto line: "};
                mvprintw(LINES-1,0,strmsg);
                clrtoeol();
                move(LINES-1, (int)strlen(strmsg));
                char l[10];
                getnstr(l, 10);
                if(l[0] == '\0' || !pl_isnumber(l) || toint(l) < 0 || toint(l)>=vm_showed->length())
                {
                    mvprintw(LINES-1,0,"*** Invalid line number ***");
                    clrtoeol();
                    refresh();
                    // wait until the user types something
                    key = getch();
                    onError = true;
                }
                else
                {
                    curi= toint(l);
                    starti = max(curi-ni + 1, 0);
                    //starti = curi;
                }
                noecho();
            }
            break;
            case (int)'c': case (int)'C':
            {
                echo();
                char strmsg[] = {"Goto column: "};
                mvprintw(LINES-1,0,strmsg);
                clrtoeol();
                move(LINES-1, (int)strlen(strmsg));
                char c[200];
                getnstr(c, 10);
                string the_col = c;
                int col_num = -1;
                try {
                    col_num = vm_showed->getFieldIndex(the_col);
                } catch (...) {}
                if(col_num < 0)
                {
                    mvprintw(LINES-1,0,"*** Invalid column number ***");
                    clrtoeol();
                    refresh();
                    // wait until the user types something
                    key = getch();
                    onError = true;
                }
                else
                {
                    curj = col_num;
                    startj = max(curj-nj + 1, 0);
                }
                noecho();
            }
            break;
            case (int)'v': case (int)'V':
            {
                echo();
                char strmsg[] = {"View dataset ('Enter' = reload last dataset): "};
                mvprintw(LINES-1,0,strmsg);
                clrtoeol();
                move(LINES-1, (int) strlen(strmsg));
                char c[200];
                getnstr(c, 200);
                if (!string(c).empty())
                    filename = string(c);
                VMat new_vm;
                bool error = false;
                try {
                    new_vm = getDataSet(filename);
                } catch(const PLearnError&) {
                    error = true;
                }
                if (error) {
                    mvprintw(LINES-1,0,"*** Invalid dataset ***");
                    clrtoeol();
                    refresh();
                    // Wait until the user types something.
                    key = getch();
                    onError = true;
                } else {
                    // Display the new dataset.
                    // First close the current display.
                    mvprintw(LINES-1,0,"");
                    clrtoeol();
                    refresh();
                    endwin();
                    // And launch the new one.
                    viewVMat(new_vm, filename);
                    if(string(c).empty())
                        //if we reload, we should forget the last one
                        key='q';
                }
            }
            break;
            case (int)'i': case (int)'I':
            {
                echo();
                char strmsg[] = {"Insert before column ('Enter' = current, '-1' = insert at the end): "};
                mvprintw(LINES-1,0,strmsg);
                clrtoeol();
                move(LINES-1, (int)strlen(strmsg));
                char l[10];
                getnstr(l, 10);
                int ins_col = curj;
                if (l[0] != '\0') {
                    if (!pl_isnumber(l) || toint(l) < -1 || toint(l)>=vm_showed->width()) {
                        mvprintw(LINES-1,0,"*** Invalid column number ***");
                        clrtoeol();
                        refresh();
                        // wait until the user types something
                        key = getch();
                        onError = true;
                        noecho();
                        break;
                    } else {
                        ins_col = toint(l);
                    }
                }
                if (ins_col == -1)
                    ins_col = vm_showed->width();
                char strmsg2[] = {"Name of the column to insert ('Enter' = column number): "};
                mvprintw(LINES-1,0,strmsg2);
                clrtoeol();
                move(LINES-1, (int)strlen(strmsg2));
                char l2[100];
                getnstr(l2, 100);
                string ins_name = tostring(ins_col);
                if (l2[0] != '\0') {
                    ins_name = l2;
                }
                char strmsg3[] = {"Default value ('Enter' = 0): "};
                mvprintw(LINES-1,0,strmsg3);
                clrtoeol();
                move(LINES-1, (int)strlen(strmsg3));
                char l3[100];
                getnstr(l3, 100);
                string default_val = tostring(0);
                if (l3[0] != '\0') {
                    default_val = l3;
                }
                TVec<VMat> vmats;
                if (ins_col > 0)
                    vmats.append(new SubVMatrix(vm_showed, 0, 0,
                                                vm_showed->length(), ins_col));
                Mat col_mat(vm_showed->length(), 1);
                VMat col_vmat(col_mat);
                col_vmat->declareFieldNames(TVec<string>(1, ins_name));
                real val;
                if (pl_isnumber(default_val, &val))
                    col_mat.fill(val);
                else {
                    col_mat.fill(-1000);
                    col_vmat->addStringMapping(0, default_val, -1000);
                }
                vmats.append(col_vmat);
                if (ins_col < vm_showed->width())
                    vmats.append(new SubVMatrix(vm_showed, 0, ins_col,
                                                vm_showed->length(),
                                                vm_showed->width() - ins_col));
                vm_showed = new ConcatColumnsVMatrix(vmats);
                mvprintw(LINES-1,0,"*** Inserted column '%s' at position %d with default value %s ***",
                         ins_name.c_str(), ins_col, default_val.c_str());
                clrtoeol();
                refresh();
                // Wait for a key to be pressed.
                key = getch();
                noecho();
            }
            break;
            case (int)'e': case (int)'E':
            {
                echo();
                char strmsg[100];
                sprintf(strmsg, "Enter column(s) or range (ex: 7;1-20;7,8,12) to export (enter=%d): ", curj);
                mvprintw(LINES-1,0,strmsg);
                clrtoeol();

                move(LINES-1, (int)strlen(strmsg));
                char strRange[50];
                getnstr(strRange, 50);

                Vec indexs;
                char strReason[100] = {"\0"};
                bool invalidInput = getList(strRange, curj, vm_showed, indexs,
                                            strReason);

                if (invalidInput)
                {
                    mvprintw(LINES-1,0,"*** Invalid input: %s ***", strReason);
                    clrtoeol();
                    refresh();
                    // wait until the user types something
                    key = getch();
                    onError = true;
                }
                else
                {

                    char filemsg[] = {"Enter file name (enter=outCol.txt): "};
                    mvprintw(LINES-1,0,filemsg);
                    clrtoeol();

                    move(LINES-1, (int)strlen(filemsg));
                    char fname[200];
                    getnstr(fname, 200);

                    if (fname[0] == '\0')
                        strcpy(fname, "outCol.txt");
                    string fname_str = fname;

                    mvprintw(LINES-1,0,"Writing file '%s'...", fname);
                    clrtoeol();
                    refresh();

                    // Save the selected columns to the desired file, keeping
                    // the string values if 'view_strings' is currently true
                    // (can be toggled with 's'/'S' keys).
                    vm_showed.columns(indexs)->saveAMAT(fname_str, false,
                                                        false, view_strings);

                    mvprintw(LINES-1,0,"*** Output written on: %s ***", fname);
                    clrtoeol();
                    refresh();
                    // wait until the user types something
                    key = getch();

                }

                noecho();
            }
            break;
            case (int)'r': case (int)'R':
            {
                echo();
                char strmsg[100];
                sprintf(strmsg, "Enter column(s) or range (ex: 7;1-20;7,8,12) to view (enter=%d): ", curj);
                mvprintw(LINES-1,0,strmsg);
                clrtoeol();

                move(LINES-1, (int)strlen(strmsg));
                char c[50];
                getnstr(c, 50);

                Vec indexs;
                char strReason[100] = {"\0"};
                bool invalidInput = getList(c, curj, vm_showed, indexs,
                                            strReason);

                if (invalidInput)
                {
                    mvprintw(LINES-1,0,"*** Invalid input: %s ***", strReason);
                    clrtoeol();
                    refresh();
                    // wait until the user types something
                    key = getch();
                    onError = true;
                }
                else
                {
                    vm_showed = vm_showed.columns(indexs);
                    if (curj>=vm_showed.width())
                    {
                        curj = vm_showed.width()-1;
                        startj = max(curj-nj + 1, 0);
                    }
                }

                noecho();
            }
            break;
            case (int)'x': case (int)'X':
                // Hide the currently selected row.
            {
                //echo();
                Vec index(vm_showed.width() - 1);
                for (int i = 0; i < curj; i++) {
                    index[i] = i;
                }
                for (int i = curj + 1; i < vm_showed.width(); i++) {
                    index[i - 1] = i;
                }
                vm_showed = vm_showed.columns(index);
                if (curj>=vm_showed.width()) {
                    curj = vm_showed.width()-1;
                    startj = max(curj-nj + 1, 0);
                }

                //          noecho();
            }
            break;
            case (int)'<': case (int)'>':
                // Sort by increasing or decreasing order.
            {
                PP<SortRowsVMatrix> new_vm;
                if(vm_showed->classname()!="SortRowsVMatrix" 
                   || ((PP<SortRowsVMatrix>)vm_showed)->sort_columns[0]!=curj){
                //if it is a SortRowsVMatrix and we sort on a new column
                // we can't reuse the last SortRowsVMatrix as it don't suport 
                // different order on each row.
                    new_vm = new SortRowsVMatrix();
                    new_vm->source = vm_showed;
                    vm_showed = get_pointer(new_vm);
                } else 
                    //in the case where we sort multiple time on the same column
                    //we reuse the last VMatrix.
                    new_vm= (PP<SortRowsVMatrix>)vm_showed;
                new_vm->sort_columns = TVec<int>(1, curj);
                if (key == (int)'>')
                    new_vm->increasing_order = false;
                else                    
                    new_vm->increasing_order = true;
                new_vm->build();
            }
            break;
            case (int)'a': case (int)'A':
                vm_showed = vm;
                break;
            case (int)'n': case (int)'N':
                if ( namewidth != namewidth_ )
                    namewidth = namewidth_;
                else
                {
                    int def = (namewidth < 80) ? namewidth : 80;

                    echo();
                    char strmsg[100];
                    sprintf(strmsg, "Enter namewidth to use (between 10 and %d -- enter=%d): ",
                            namewidth, def);
                    mvprintw(LINES-1,0,strmsg);
                    clrtoeol();

                    move(LINES-1, (int)strlen(strmsg));
                    char l[10];
                    getnstr(l, 10);
                    if(l[0] == '\0')
                    {
                        namewidth = def;
                    }
                    else if( !pl_isnumber(l) || toint(l) < 0 || toint(l)>namewidth )
                    {
                        mvprintw(LINES-1,0,"*** Invalid line number ***");
                        clrtoeol();
                        refresh();
                        // wait until the user types something
                        key = getch();
                        onError = true;
                    }
                    else
                    {
                        namewidth = toint(l);
                    }
                    noecho();
                }
                break;
            case (int)'s':
                if (indent_strings_left)
                    // Toggle display.
                    view_strings = !view_strings;
                else {
                    // Do not remove display if we only asked to change
                    // indentation.
                    indent_strings_left = true;
                    if (!view_strings)
                        view_strings = true;
                }
                break;
            case (int)'S':
                // Same as above, except we indent to the right.
                if (!indent_strings_left)
                    view_strings = !view_strings;
                else {
                    indent_strings_left = false;
                    if (!view_strings)
                        view_strings = true;
                }
                break;
            case (int)'h': case (int)'H':
                erase();

                vStartHelp = 2;

                mvprintw(0,COLS/2-6,"*** HELP ***");

                mvprintw(vStartHelp++,10,"KEYS:");
                mvprintw(vStartHelp++,10," - up: move up one line");
                mvprintw(vStartHelp++,10," - down: move down one line");
                mvprintw(vStartHelp++,10," - right: move right one column");
                mvprintw(vStartHelp++,10," - left: move left one column");
                mvprintw(vStartHelp++,10," - page up: move up one screen");
                mvprintw(vStartHelp++,10," - page down: move down one screen");
                mvprintw(vStartHelp++,10," - home: move to the first column");
                mvprintw(vStartHelp++,10," - end: move to the last column");
                mvprintw(vStartHelp++,10," - 'r' or 'R': show only a range or a set of columns");
                mvprintw(vStartHelp++,10," - 'x' or 'X': hide the currently selected column");
                mvprintw(vStartHelp++,10," - 'a' or 'A': show the original VMat");
                mvprintw(vStartHelp++,10," - 'f' or 'F': toggle the display of the filename");
                mvprintw(vStartHelp++,10," - 'i' or 'I': insert a new column with default value");
                mvprintw(vStartHelp++,10," - 'l' or 'L': prompt for a line number and go to that line");
                mvprintw(vStartHelp++,10," - 'c' or 'C': prompt for a column number and go to that column");
                mvprintw(vStartHelp++,10," - 's' or 'S': toggle display string fields as strings or numbers ('S' = right indentation)");
                mvprintw(vStartHelp++,10," - 't' or 'T': toggle transposed display mode");
                mvprintw(vStartHelp++,10," - 'n' or 'N': toggle truncated field name display mode (under transposed display mode)");
                mvprintw(vStartHelp++,10," - 'e' or 'E': export a range or a set of columns to file");
                mvprintw(vStartHelp++,10," - 'v' or 'V': prompt for another dataset to view");
                mvprintw(vStartHelp++,10," - '.'       : toggle displaying of ... for values that do not change (exact match)");
                mvprintw(vStartHelp++,10," - ','       : toggle displaying of ... for values that do not change (approximate match)");
                mvprintw(vStartHelp++,10," - '/'       : search for a value of the current field");
                mvprintw(vStartHelp++,10," - '<' or '>': sort column by increasing or decreasing order");
                mvprintw(vStartHelp++,10," - 'h' or 'H': display this screen");
                mvprintw(vStartHelp++,10," - 'q' or 'Q': quit program");
                mvprintw(vStartHelp++,COLS/2-13,"(press any key to continue)");

                refresh();
                getch();

                break;

            case (int)'f': case (int)'F':
                display_filename = !display_filename;

            case (int)'q': case (int)'Q':
                break;

            default:
                mvprintw(LINES-1,0,"*** Invalid command (type 'h' for help) ***");
                // clear the rest of the line
                clrtoeol();

                refresh();

                // wait until the user types something
                key = getch();
                onError = true;

                //sleep(1);
                break;
            }
        }
    } // end try
    catch(const PLearnError& e)
    {
        endwin();
        throw(e);
    }

    // make sure it is clean
    mvprintw(LINES-1,0,"");
    clrtoeol();
    refresh();

    endwin();
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::vmatmain ( int  argc,
char **  argv 
)

Interpret the following options:

--cols=col1,col2,col3,... :: keep only the given columns (no space between the commas and the columns); columns can be given either as a number (zero-based) or a string. You can also specify a range, such as 0-18, or any combination thereof.

--skip-missings :: if a row (after selecting the appropriate columns) contains one or more missing values, skip it during export

--precision=N :: conversion to CSV keeps N digits AFTER THE DECIMAL POINT

--delimiter=CHAR :: conversion to CSV uses specified character as field delimiter --mat_to_mem :: load the source vmat in memory before saving --save_vmat :: if the source is a vmat, we serialize the constructed :: object in the metadatadir of the destination --update :: we generate the <destination> only when the <source> file is newer than :: the destination file or when the destination file is missing --force_float :: if the destination is a pmat, we force the pmat file to be in float format --auto_float :: if the destination is a pmat, we will store the data in float format if this don't loose any precision compared to double format.

Definition at line 614 of file vmatmain.cc.

References PLearn::TVec< T >::append(), b, PLearn::VMatLanguage::compileString(), displayBasicStats(), endl(), extract_extension(), fast_exact_is_equal(), PLearn::VMat::fieldName(), flush(), getDataSetDate(), getDataSetHelp(), PLearn::VMatrix::getMtime(), PLearn::VVMatrix::getPrecomputedDataName(), getVMat(), PLearn::HelpSystem::helpOnCommand(), i, interactiveDisplayCDF(), is_missing(), PLearn::StatsCollector::isbinary(), isfile(), PLearn::StatsCollector::isinteger(), PLearn::VVMatrix::isPrecomputedAndUpToDate(), j, KS_test(), left(), PLearn::VMat::length(), m, max(), PLearn::StatsCollector::mean(), mean(), min(), PLearn::StatsCollector::n(), PLearn::StatsCollector::nmissing(), PLearn::StatsCollector::nnonmissing(), openFile(), p_value(), pl_isnumber(), PLCHECK, PLERROR, plotVMats(), PLWARNING, pout, pow(), PLearn::VMat::precompute(), print_diff(), printDistanceStatistics(), PLearn::PStream::raw_ascii, removeblanks(), right(), rm(), PLearn::VMatLanguage::run(), save(), save_vmat_as_arff(), save_vmat_as_csv(), PLearn::PStream::setDoubleFormat(), PLearn::PStream::setFloatFormat(), PLearn::RealMapping::size(), PLearn::TVec< T >::size(), sortRows(), split(), sqrt(), PLearn::StatsCollector::stderror(), sum(), sumsquare(), toint(), tostring(), transpose(), update(), PLearn::StatsCollector::variance(), variance(), and PLearn::VMat::width().

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

{
  
    if(argc<3)
    {
        // Use the VMatCommand help instead of repeating the same help message twice...
        // help message in file commands/PLearnCommands/VMatCommand.cc
        pout << HelpSystem::helpOnCommand("vmat") << flush;
        exit(0);
    }

    PPath indexf= "";
    if(string(argv[1])=="-i")
    {
        indexf= argv[2];
        argv+= 2;//skip -i and indexfile name
    }

    string command = argv[1];

    if(command=="cdf")
    {      
        Array<VMat> vmats;
        for(int i=2; i<argc; i++)
        {
            string dbname = argv[i];
            VMat vm = getVMat(dbname, indexf);
            vmats.append(vm);
        }
        interactiveDisplayCDF(vmats);
    }
    /*
      else if(command=="cond")
      {
      string dbname = argv[2];
      VMat vm = getDataSet(dbname);
      cout << "** Using dataset: " << dbname << " **" << endl;
      cout << "Metadata for this dataset in: " << vm->getMetaDataDir() << endl;
      int condfield = atoi(argv[3]);
      printConditionalStats(vm, condfield);    
      }
    */
    else if(command=="convert")
    {
        if(argc<4)
            PLERROR("Usage: vmat convert <source> <destination> "
                    "[--mat_to_mem] [--cols=col1,col2,col3,...] [--save_vmat] [--skip-missings] [--precision=N] [--delimiter=CHAR] [--force_float] [--auto_float]");

        PPath source = argv[2];
        PPath destination = argv[3];
        bool mat_to_mem = false;
        if(source==destination)
            PLERROR("You are overwriting the source. This is not allowed!");
        TVec<string> columns;
        TVec<string> date_columns;
        bool skip_missings = false;
        int precision = 12;
        string delimiter = ",";
        bool convert_date = false;
        bool save_vmat = false;
        bool update = false;
        bool force_float = false;
        bool auto_float = false;

        string ext = extract_extension(destination);

        for (int i=4 ; i < argc && argv[i] ; ++i) {
            string curopt = removeblanks(argv[i]);
            if (curopt == "")
                continue;
            if (curopt.substr(0,7) == "--cols=") {
                string columns_str = curopt.substr(7);
                columns = split(columns_str, ',');
            }
            else if (curopt.substr(0,12) == "--date-cols=") {
                string columns_str = curopt.substr(12);
                date_columns = split(columns_str, ',');
            }
            else if (curopt == "--skip-missings")
                skip_missings = true;
            else if (curopt.substr(0,12) == "--precision=") {
                precision = toint(curopt.substr(12));
            }
            else if (curopt.substr(0,12) == "--delimiter=") {
                if(ext!=".csv")
                    PLERROR("Vmat convert: the --delimiter option is supported only with .csv destination file. You have a '%s' extension.",ext.c_str());
                delimiter = curopt.substr(12);
            }
            else if (curopt == "--convert-date")
                convert_date = true;
            else if (curopt =="--mat_to_mem")
                mat_to_mem = true;
            else if (curopt == "--save_vmat")
                save_vmat = true;
            else if (curopt == "--update")
                update = true;
            else if (curopt == "--force_float"){
                PLCHECK(ext==".pmat");
                force_float = true;
            }else if (curopt == "--auto_float"){
                PLCHECK(ext==".pmat");
                auto_float = true;
            }else
                PLWARNING("VMat convert: unrecognized option '%s'; ignoring it...",
                          curopt.c_str());
        }
        VMat vm = getVMat(source, indexf);

        // If columns specified, select them.  Note: SelectColumnsVMatrix is very
        // powerful and allows ranges, etc.
        if (columns.size() > 0)
            vm = new SelectColumnsVMatrix(vm, columns);

        if (ext != ".csv" && skip_missings)
            PLWARNING("Option '--skip-missings' not supported for extension '%s'; ignoring it...",
                      ext.c_str());
        if(mat_to_mem)
            vm.precompute();
        if(update && vm->isUpToDate(destination))
            pout << "The file is up to date. We don't regenerate it."<<endl;
        else if(ext==".amat")
            // Save strings as strings so they are not lost.
            vm->saveAMAT(destination, true, false, true);
        else if(ext==".cmat")
            vm->saveCMAT(destination);
        else if(ext==".pmat")
            vm->savePMAT(destination, force_float, auto_float);
        else if(ext==".dmat")
            vm->saveDMAT(destination);
        else if(ext == ".csv")
        {
            if (destination == "-.csv")
                save_vmat_as_csv(vm, cout, skip_missings, precision, delimiter, true /*verbose*/, convert_date);
            else
            {
                ofstream out(destination.c_str());
                save_vmat_as_csv(vm, out, skip_missings, precision, delimiter, true /*verbose*/, convert_date);
            }
        }
        else if(ext == ".arff")
        {
            ofstream out(destination.c_str());
            save_vmat_as_arff(vm, out, date_columns, skip_missings, precision);
        }
        else if(ext == ".vmat")
            PLearn::save(destination,vm);
        else
        {
            cerr << "ERROR: can only convert to .amat .pmat .dmat, .vmat or .csv" << endl
                 << "Please specify a destination name with a valid extension " << endl;
        }
        if(save_vmat && extract_extension(source)==".vmat")
            PLearn::save(destination+".metadata/orig.vmat",vm);
        else if(save_vmat)
            PLWARNING("We haven't saved the original file as it is not a vmat");
    }
    else if(command=="info")
    {
        for(int i=2;i<argc;i++){
            string dbname = argv[i];
            VMat vm = getVMat(dbname, indexf);
            if(argc>3)
                pout<<dbname<<endl;
            pout<<vm.length()<<" x "<<vm.width()<<endl;
            pout << "inputsize: " << vm->inputsize() << endl;
            pout << "targetsize: " << vm->targetsize() << endl;
            pout << "weightsize: " << vm->weightsize() << endl;
            pout << "extrasize: " << vm->extrasize() << endl;
            VVMatrix * vvm = dynamic_cast<VVMatrix*>((VMatrix*)vm);
            if(vvm!=NULL)
            {
                pout<< "Last modification (including dependencies of .vmat): "
                    << int32_t(vvm->getMtime()) << endl;
                bool ispre=vvm->isPrecomputedAndUpToDate();
                pout<<"precomputed && uptodate : ";
                if(ispre)
                {
                    pout <<"yes : " << vvm->getPrecomputedDataName()<<endl;
                    pout<< "timestamp of precom. data : "
                        <<int32_t(getDataSetDate(vvm->getPrecomputedDataName()))
                        << endl;
                }
                else pout <<"no"<<endl;
            }
        }
    }
    else if(command=="fields")
    {
        bool add_info = true;
        bool transpose = false;
        if (argc >= 4) {
            add_info = !(string(argv[3]) == "name_only");
        }
        if (argc >= 5) {
            transpose = (string(argv[4]) == "transpose");
        }
        string dbname = argv[2];
        VMat vm = getVMat(dbname, indexf);
        if (add_info) {
            pout<<"FieldNames: ";
            if (!transpose) {
                pout << endl;
            }
        }
        for(int i=0;i<vm.width();i++) {
            if (add_info) {
                pout << i << ": ";
            }
            pout << vm->fieldName(i);
            if (transpose) {
                pout << " ";
            } else {
                pout << endl;
            }
        }
        if (transpose) {
            // It misses a carriage return after everything is displayed.
            pout << endl;
        }
    }
    else if(command=="fieldinfo")
    {
        if (argc < 4)
            PLERROR("The 'fieldinfo' subcommand requires more parameters, please check the help");
        string dbname = argv[2];
        string fieldname_or_num = argv[3];

        bool print_binning = false;
        if (argc == 5) {
            if (argv[4] == string("--bin"))
                print_binning = true;
            else
                PLERROR("vmat fieldinfo: unrecognized final argument; can be '--bin' "
                        "to print the binning");
        }
        
        VMat vm = getVMat(dbname, indexf);
        vm->printFieldInfo(pout, fieldname_or_num, print_binning);
    }
    else if(command=="stats")
    {
        string dbname = argv[2];
        VMat vm = getVMat(dbname, indexf);
        displayBasicStats(vm);
    }
    else if(command=="gendef")
    {
        string dbname = argv[2];
        TVec<int> bins(argc-3);
        for(int i=3;i<argc;i++)
            bins[i-3]=toint(argv[i]);
      
        VMat vm = getVMat(dbname, indexf);
        TVec<StatsCollector> sc = vm->getStats();
        // write stats file in metadatadir
        string name = vm->getMetaDataDir()+"/stats.def";
        ofstream sfile(name.c_str());
        for(int i=0;i<sc.size();i++)
        {
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".mean "<<tostring(sc[i].mean())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".stddev "<<tostring(sc[i].stddev())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".stderr "<<tostring(sc[i].stderror())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".min "<<tostring(sc[i].min())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".max "<<tostring(sc[i].max())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".normalized @"<<vm->fieldName(i)<<" @"<<vm->fieldName(i)<<".mean - @"<<
                vm->fieldName(i)<<".stddev /"<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".sum "<<tostring(sc[i].sum())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".sumsquare "<<tostring(sc[i].sumsquare())<<endl;
            sfile<<"DEFINE @"<<vm->fieldName(i)<<".variance "<<tostring(sc[i].variance())<<endl;
        }
        for(int i=0;i<bins.size();i++)
        {
            int b=bins[i];
            PPath f_name = vm->getMetaDataDir() / "bins"+tostring(b)+".def";
            PStream bfile = openFile(f_name, PStream::raw_ascii, "w");
            RealMapping rm;
            for(int j=0;j<sc.size();j++)
            {
                rm = sc[j].getBinMapping(int(vm.length()/real(b)),int(vm.length()/real(b)));
                bfile<<"DEFINE @"<<vm->fieldName(j)<<".ranges"+tostring(b)+" "<<rm<<endl;
                bfile<<"DEFINE @"<<vm->fieldName(j)<<".ranges"+tostring(b)+".nbins "<<rm.size()<<endl;
                bfile<<"DEFINE @"<<vm->fieldName(j)<<".ranges"+tostring(b)+".nbins_m1 "<<rm.size()-1<<endl;
                bfile<<"DEFINE @"<<vm->fieldName(j)<<".binned"+tostring(b)+" @"<<vm->fieldName(j)<<" @"
                     <<vm->fieldName(j)<<".ranges"+tostring(b)<<endl;
                bfile<<"DEFINE @"<<vm->fieldName(j)<<".onehot"+tostring(b)+" @"<<vm->fieldName(j)<<".binned"
                    +tostring(b)+" @"<<vm->fieldName(j)<<".ranges"+tostring(b)+".nbins onehot"<<endl;

            }
        }
    }
    else if(command=="genkfold")
    {
        if(argc<5)
        {
            cerr<<"usage vmat genkfold <source_dataset> <fileprefix> <kvalue>\n";
            exit(1);
        }
        string dbname = argv[2];
        string prefix = argv[3];
        int kval=toint(argv[4]);
        VMat vm = getVMat(dbname, indexf);
        for(int i=0;i<kval;i++)
        {
            ofstream out((prefix+"_train_"+tostring(i+1)+".vmat").c_str());
            out<<"<SOURCES>"<<endl;
            int ntest = vm.length()/kval;
            int ntrain_before_test = i*ntest;
            int ntrain_after_test = vm.length()-(i+1)*ntest;
            if(ntrain_before_test>0)
                out<<dbname<<":0:"<<ntrain_before_test<<endl;
            if(ntrain_after_test>0)
                out<<dbname<<":"<<ntest+ntrain_before_test<<":"<<ntrain_after_test<<endl;
            out<<"</SOURCES>"<<endl;
            ofstream out2((prefix+"_test_"+tostring(i+1)+".vmat").c_str());
            out2<<"<SOURCES>"<<endl;
            out2<<dbname<<":"<<ntrain_before_test<<":"<<ntest<<endl;
            out2<<"</SOURCES>"<<endl;
        }
    }
    else if(command=="genvmat")
    {
        if(argc<5)
        {
            cerr<<"usage vmat genvmat <source_dataset> <dest_vmat> (binned{num} | onehot{num} | normalized)\n";
            exit(1);
        }
        string dbname = argv[2];
        string destvmat = argv[3];
        string type=argv[4];
        int typen= 0;
        int bins= 0;
        if(type.find("binned")!=string::npos)
        {
            typen=0;
            bins=toint(type.substr(6));
        }
        else if(type.find("onehot")!=string::npos)
        {
            typen=1;
            bins=toint(type.substr(6));
        }
        else if(type.find("normalized")!=string::npos)
            typen=2;
        else PLERROR("Unknown operation: %s",type.c_str());

        VMat vm = getVMat(dbname, indexf);
        ofstream out(destvmat.c_str());
      
        out<<"<SOURCES>"<<endl;
        out<<dbname<<endl;
        out<<"</SOURCES>"<<endl;
        out<<"<PROCESSING>"<<endl;
        out<<"INCLUDE "<<dbname+".metadata/stats.def"<<endl;
        if(typen!=2)
            out<<"INCLUDE "<<dbname+".metadata/bins"<<bins<<".def"<<endl;

        for(int i=0;i<vm.width();i++)
        {
            switch(typen)
            {
            case 0:
                out<<"@"<<vm->fieldName(i)<<".binned"<<bins<<endl;
                out<<":"<<vm->fieldName(i)<<endl;
                break;
            case 1:
                out<<"@"<<vm->fieldName(i)<<".onehot"<<bins<<endl;
                out<<":"<<vm->fieldName(i)<<".:0:@"<<vm->fieldName(i)<<".ranges"<<bins<<".nbins_m1"<<endl;
                break;
            case 2:
                out<<"@"<<vm->fieldName(i)<<".normalized"<<endl;
                out<<":"<<vm->fieldName(i)<<endl;
                break;
            }

        }
        out<<"</PROCESSING>"<<endl;
        out.close();
    }
    else if(command=="diststat")
    {
        VMat vm = getVMat(argv[2], indexf);
        int inputsize = atoi(argv[3]);
        printDistanceStatistics(vm, inputsize);      
    }
    else if(command=="diff")
    {
        if(argc < 4)
            PLERROR("'vmat diff' must be used that way : vmat diff <dataset1> <dataset2> [<tolerance> [<verbose>]]");

        VMat vm1 = getVMat(argv[2], indexf);
        VMat vm2 = getVMat(argv[3], indexf);
        double tol = 1e-6;
        int verb = 1;
        if(argc >= 5)
            tol = atof(argv[4]);
        if (argc >= 6)
            verb = atoi(argv[5]);
        print_diff(cout, vm1, vm2, tol, verb);      
    }
    else if(command=="cat")
    {
        if(argc < 3)
            PLERROR("'vmat cat' must be used that way : vmat cat FILE... [--precision=N] [vplFilteringCode]");
        string code;
        int nb_file=argc-2;
        int precision = -1;
        for (int i=argc-1 ; i >=3 && argv[i] ; i--) {
            string curopt = removeblanks(argv[i]);
            if(curopt.substr(0,12) == "--precision="){
                precision = toint(curopt.substr(12));
                nb_file--;
            }else if(!isfile(argv[argc-1])){
                code=argv[argc-1];
                nb_file--;
            }
        }
        if(precision>0){
            char tmpbuf[100];
            snprintf(tmpbuf,100,"%%#.%df",precision);
            pout.setDoubleFormat(tmpbuf);
            pout.setFloatFormat(tmpbuf);
        }
        for(int file=0;file<nb_file;file++)
        {
            string dbname=argv[file+2];
            if(nb_file>1)
                pout<<dbname<<endl;
            VMat vm = getVMat(dbname, indexf);
            Vec tmp(vm.width());
            if(code.length()>0){
                VMatLanguage vpl(vm);
                vector<string> fn; 
                for(int i=0;i<vm->width();i++)
                    fn.push_back(vm->fieldName(i));
                vpl.compileString(code,fn);
                Vec answer(1);
                for(int i=0;i<vm.length();i++)
                {
                    vpl.run(i,answer);
                    if(!fast_exact_is_equal(answer[0], 0)) {
                        vm->getRow(i, tmp);
                        pout<<tmp<<endl;
                    }
                }

            }
            else
                for(int i=0;i<vm.length();i++)
                {
                    vm->getRow(i,tmp);      
                    pout<<tmp<<endl;
                }
        }
    }
    else if(command=="catstr")
    {
        if(argc!=3 && argc != 4)
            PLERROR("'vmat catstr' must be used that way : vmat cat FILE [separator]");
        string dbname = argv[2];
        string sep = "\t";
        if(argc==4)
            sep = argv[3];
        VMat vm = getVMat(dbname, indexf);
        Vec tmp(vm.width());
        string out = "";
        for(int i=0;i<vm.length();i++)
        {
            vm->getRow(i,tmp);
            for(int j=0; j<vm.width(); j++)
            {
                out = vm->getValString(j,tmp[j]);
                if(out == "") out = tostring(tmp[j]);
                pout << out << sep;
            }
            pout << endl;
        }
    }
    else if(command=="sascat")
    {
        if(argc!=4)
            PLERROR("'vmat sascat' must be used that way : vmat sascat <in-dataset> <out-filename.txt>");
        string dbname = argv[2];
        string outname = argv[3];
        string code;
        VMat vm = getVMat(dbname, indexf);
        ofstream out(outname.c_str());
        for (int i=0;i<vm.width();i++)
            out << vm->fieldName(i) << "\t";
        out << endl;
        for(int i=0;i<vm.length();i++)
        {
            for (int j=0;j<vm.width();j++)
                out << vm->getString(i,j) << "\t";
            out<<endl;
        }
    }
    else if(command=="plot")
    {
        if(0 != argc%2)
            PLERROR("Bad number of arguments. Syntax for option plot:\n"
                    "%s plot <dbname0> <col0>[:<row0>:<nrows0>] {<dbnameN> <colN>[:<rowN>:<nrowsN>]}", argv[0]);
        plotVMats(argv+2, argc-2);
    }
    else if(command=="help")
    {
        pout << getDataSetHelp() << endl;
    }
    else if(command=="compare_stats")
    {
        if(!(argc==4||argc==5||argc==6))
            PLERROR("vmat compare_stats must be used that way: vmat compare_stats <dataset1> <dataset2> [[stderror threshold [missing threshold]]");

        VMat m1 = getVMat(argv[2], indexf);
        VMat m2 = getVMat(argv[3], indexf);

        m1->compatibleSizeError(m2);

        real stderror_threshold = 1;
        real missing_threshold = 10;
        if(argc>4)
            stderror_threshold=toreal(argv[4]);
        if(argc>5)
            missing_threshold=toreal(argv[5]);
        Vec missing(m1->width());
        Vec stderror(m1->width());

        pout << "Test of difference that suppose gaussiane variable"<<endl;
        m1->compareStats(m2, stderror_threshold, missing_threshold,
                         stderror, missing);

        Mat score(m1->width(),3);

        for(int col = 0;col<m1->width();col++)
        {
            score(col,0)=col;
            score(col,1)=stderror[col];
            score(col,2)=missing[col];
        }
        
        int nbdiff = 0;

        pout<<"Print the field that do not pass the threshold sorted by the stderror"<<endl;
        sortRows(score,1,false);
        for(int i=0;i<score.length();i++)
        {
            if(score(i,1)>stderror_threshold)
            {
                const StatsCollector tstats = m1->getStats(i);
                const StatsCollector lstats = m2->getStats(i);
                real tmean = tstats.mean();
                real lmean = lstats.mean();
                real tstderror = sqrt(pow(tstats.stderror(), 2) + 
                                      pow(lstats.stderror(), 2));

                pout<<i<<"("<<m1->fieldName(int(round(score(i,0))))<<")"
                    <<" differ by "<<score(i,1)<<" stderror."
                    <<" The mean is "<<lmean<<" while the target mean is "<<tmean
                    <<" and the used stderror is "<<tstderror<<endl;
                nbdiff++;
            }
        }

        cout<<"Print the field that do not pass the threshold sorted by the missing error"<<endl;
        sortRows(score,2,false);
        for(int i=0;i<score.length();i++)
        {
            if(score(i,2)>missing_threshold)
            {
                const StatsCollector tstats = m1->getStats(i);
                const StatsCollector lstats = m2->getStats(i);
                real tmissing = tstats.nmissing()/tstats.n();
                real lmissing = lstats.nmissing()/lstats.n();
                pout<<i<<"("<<m1->fieldName(int(round(score(i,0))))<<")"
                    <<" The missing stats difference is "<< score(i,2)
                    <<". There are "<<lmissing<<" missing while target has "
                    <<tmissing<<" missing."<<endl;
                nbdiff++;
            }
        }

        pout<<"There are "<<nbdiff<<"/"<<m1.width()
            <<" fields that have different stats"<<endl;

    }
    else if(command=="compare_stats_ks")
    {
        bool err = false;
        real threshold = REAL_MAX;
        bool mat_to_mem = false;
        if(argc<4||argc>6)
            err = true;
        if(argc==5)
        {
            if(argv[4]==string("--mat_to_mem"))
                mat_to_mem=true;
            else if(!pl_isnumber(string(argv[4]),&threshold))
                err = true;
        }
        else if(argc==6)
        {
             if(argv[5]!=string("--mat_to_mem"))
                 err = true;
             else if(!pl_isnumber(string(argv[4]),&threshold))
                 err = true;
        }
        if(err)
            PLERROR("vmat compare_stats_ks must be used that way:"
                    " vmat compare_stats_ks <dataset1> <dataset2> [threshold]"
                    " [--mat_to_mem]");

        VMat m1 = getVMat(argv[2], indexf);
        VMat m2 = getVMat(argv[3], indexf);
        if(mat_to_mem)
        {
            m1.precompute();
            m2.precompute();
        }

        m1->compatibleSizeError(m2);
        int pc_value_99=0;
        int pc_value_95=0;
        int pc_value_90=0;
        int pc_value_0=0;

        uint size_fieldnames=m1->maxFieldNamesSize();

        Vec Ds(m1->width());
        Vec p_values(m1->width());
        KS_test(m1,m2,10,Ds,p_values,true);
        Mat score(m1->width(),3);
            
        for(int col = 0;col<m1->width();col++)
        {
            score(col,0)=col;
            score(col,1)=Ds[col];
            real p_value = p_values[col];
            score(col,2)=p_value;
            if(p_value>0.99)
                pc_value_99++;
            if(p_value>0.95)
                pc_value_95++;
            if(p_value>0.90)
                pc_value_90++;
            else
                pc_value_0++;
        }

        sortRows(score,2,false);
        pout <<"Kolmogorov Smirnov two sample test"<<endl<<endl;
        if(threshold<REAL_MAX)
            pout<<"Variables that are under the threshold"<<endl;
        pout<<"Sorted by p_value"<<endl;
        cout << std::left << setw(8) << "# "
             << setw(size_fieldnames) << " fieldname " << std::right
             << setw(15) << " D"
             << setw(15) << " p_value"
             <<endl;
        int threshold_fail=0;
        for(int col=0;col<score.length();col++)
        {
            if(threshold>=score(col,2))
            {
                cout << std::left << setw(8) << tostring(col)+"/"+tostring(score(col,0))
                     << setw(size_fieldnames) << m1->fieldName(int(round(score(col,0))))
                     << std::right
                     << setw(15) << score(col,1)
                     << setw(15) << score(col,2)
                     <<endl;
                threshold_fail++;
            }
        }
        if(threshold<REAL_MAX)
            pout << "There are "<<threshold_fail<<" variables that are under the threshold"<<endl;
        if(threshold==REAL_MAX)
        {
            pout << "99% cutoff: "<<pc_value_99<<endl;
            pout << "95% cutoff: "<<pc_value_95<<endl;
            pout << "90% cutoff: "<<pc_value_90<<endl;
            pout << "0-90% cutoff: "<<pc_value_0<<endl;
        }
        pout <<"Kolmogorov Smirnov two sample test end"<<endl<<endl;
    }
    else if(command=="compare_stats_desjardins")
    {      
        bool err=false;
        bool mat_to_mem=false;
        if(!(argc==8||argc==9))
            err=true;
        if(argc==9)
        {
            if(argv[8]!=string("--mat_to_mem"))
                 err = true;
            else
                mat_to_mem=true;
        }
        if(err)
            PLERROR("vmat compare_stats_desjardins must be used that way:"
                    " vmat compare_stats_desjardins <orig dataset1> <orig dataset2> <new dataset3> <ks_threshold> <stderror_threshold> <missing_threshold> [--mat_to_mem]");

        VMat m1 = getVMat(argv[2], indexf);
        VMat m2 = getVMat(argv[3], indexf);
        VMat m3 = getVMat(argv[4], indexf);
        real ks_threshold = toreal(argv[5]);

        m3->compatibleSizeError(m1);
        m3->compatibleSizeError(m2);

        Vec Ds(m1->width());
        Vec p_values(m1->width());
        Mat score(m1->width(),3);
        uint size_fieldnames=m1->maxFieldNamesSize();
        if(mat_to_mem==true)
        {
            m1.precompute();
            m2.precompute();
            m3.precompute();
        }

        KS_test(m1,m3,10,Ds,p_values,true);
        for(int col = 0;col<m1->width();col++)
        {
            score(col,0)=col;
            score(col,1)=Ds[col];
            real p_value = p_values[col];
            score(col,2)=p_value;
        }

        KS_test(m2,m3,10,Ds,p_values,true);
        for(int col = 0;col<m1->width();col++)
        {
            if(p_values[col]>score(col,2))
            {
                score(col,1)=Ds[col];
                score(col,2)=p_values[col];
            }
        }

        sortRows(score,2,false);
        pout <<"Kolmogorov Smirnov two sample test"<<endl<<endl;
        pout<<"Variables that are under the ks_threshold"<<endl;
        pout<<"Sorted by p_value"<<endl;
        cout << std::left << setw(8) << "# "
             << setw(size_fieldnames) << " fieldname " << std::right
             << setw(15) << " D"
             << setw(15) << " p_value"
             <<endl;
        int threshold_fail = 0;
        for(int col=0;col<score.length();col++)
        {
            if(ks_threshold>=score(col,2))
            {
                cout << std::left << setw(8) << tostring(col)+"/"+tostring(score(col,0))
                     << setw(size_fieldnames) << m1->fieldName(int(round(score(col,0))))
                     << std::right
                     << setw(15) << score(col,1)
                     << setw(15) << score(col,2)
                     <<endl;
                threshold_fail++;
            }
        }
        pout << "There are "<<threshold_fail<<"/"<<m1->width()<<
            " variables that are under the threshold"<<endl<<
            " Kolmogorov Smirnov two sample test end"<<endl<<endl;


//         real stderror_threshold = 1;
//         real missing_threshold = 10;
//         stderror_threshold=toreal(argv[6]);
//         missing_threshold=toreal(argv[7]);

//         pout << "Test of difference that suppose gaussiane variable"<<endl;
//         pout << "Comparing with dataset1"<<endl;

//         m3->compareStats(m1, stderror_threshold, missing_threshold,
//                          stderr, missing);
//         pout << "Comparing with dataset2"<<endl;
//         m3->compareStats(m2, stderror_threshold, missing_threshold,
//                          stderr, missing);
//         pout<<"There are "<<diff<<"/"<<m1.width()
//             <<" fields that have different stats"<<endl;
    }
    else if(command=="characterize")
    {
        if(argc!=3)
            PLERROR("The command 'vmat characterize' must be used that way: vmat caracterize <dataset1>");
        VMat m1 = getVMat(argv[2], indexf);
        TVec<StatsCollector> stats = 
            m1->getStats();//"stats_all.psave",-1,true);
        TVec<string> caracs;
        uint size_fieldnames=m1->maxFieldNamesSize();

        for(int i=0;i<stats.size();i++)
        {
            StatsCollector& stat=stats[i];
            string carac = tostring(i)+"\t"+left(m1->fieldName(i),size_fieldnames);
            if(stat.isbinary())
                carac += "\tBinary";
            else if(stat.isinteger())
                carac+="\tInteger";
            else
                carac+="\tReal";

            //find is normal or not
            int m=min(100,int(round(sqrt(stat.nnonmissing()))));
            int nelem=int(stat.nnonmissing()/m);
            int row=0;
            real gsum=0;
            for(int bloc=0;bloc<m;bloc++)
            {
                real bloc_sum=0;
                for(int bloc_elem=0;bloc_elem<nelem;)
                {
                    real v = m1->get(row,i);
                    if(is_missing(v))
                        continue;
                    else
                    {
                        bloc_elem++;
                        row++;
                        bloc_sum+=v;
                    }
                    
                }
                gsum+=pow((bloc_sum/nelem)-stat.mean(),2);
            }
            real s2=(stat.variance()/nelem);
            real mu_square = stat.mean()*stat.mean();
            real th = ((1./(m-1))*gsum)/s2;
            real th2= mu_square+s2-12*mu_square*s2+mu_square*mu_square
                * s2*s2;
            bool b = th>(s2+2*th2)/s2;
                carac+="\tnormal test value: "+tostring(th)+" "+tostring(th2)
                + " "+tostring(b);
            caracs.append(carac);
            pout<<carac<<endl;
        }

    }
    else if(command=="mtime")
    {    
        if(argc!=3)
            PLERROR("The command 'vmat mtime' must be used that way: vmat mtime <dataset>");
        VMat m1 = getVMat(argv[2], indexf);
        pout<<m1->getMtime()<<endl;
    }
    else
        PLERROR("Unknown command : %s",command.c_str());
    return 0;
}

Here is the caller graph for this function:

VMat PLearn::vrange ( real  start,
real  end,
real  step = 1.0 
) [inline]

Definition at line 81 of file RangeVMatrix.h.

{ return new RangeVMatrix(start,end,step); }
void void PLearn::vwarningmsg ( const char *  msg,
va_list  args 
)

Definition at line 121 of file plerror.cc.

References endl(), ERROR_MSG_SIZE, and NORMAL_LOG.

Referenced by warn_err(), warn_err2(), and warningmsg().

{
    char message[ERROR_MSG_SIZE];

#if !defined(ULTRIX) && !defined(_MINGW_) && !defined(WIN32)
    vsnprintf(message,ERROR_MSG_SIZE,msg,args);
#else
    vsprintf(message,msg,args);
#endif

    // *error_stream <<" WARNING: "<<message<<endl;
    NORMAL_LOG << " WARNING: " << message << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::warn_err ( bool  warn,
const char *  msg,
  ... 
)

Definition at line 135 of file plerror.cc.

References verrormsg(), and vwarningmsg().

{
    va_list args;
    va_start(args,msg);
    if(warn) vwarningmsg(msg,args);
    else verrormsg(msg, args);
    va_end(args);
}

Here is the call graph for this function:

void void PLearn::warn_err2 ( const char *  filename,
const int  linenumber,
bool  warn,
const char *  msg,
  ... 
)

Definition at line 144 of file plerror.cc.

References ERROR_MSG_SIZE, PLASSERT, strlen(), verrormsg(), and vwarningmsg().

{
    va_list args;
    va_start(args,msg);

    if(warn) vwarningmsg(msg,args);
    else{
        char message[ERROR_MSG_SIZE];
    
        snprintf(message, ERROR_MSG_SIZE, "In file: \"%s\" at line %d\n",
                 PPath(filename).basename().c_str(), linenumber);
        PLASSERT(ERROR_MSG_SIZE>=strlen(message)+strlen(msg));
        strncat(message,msg,ERROR_MSG_SIZE);
        verrormsg(message, args);
    }
    va_end(args);
}

Here is the call graph for this function:

void PLearn::warningmsg ( const char *  msg,
  ... 
)

Definition at line 113 of file plerror.cc.

References vwarningmsg().

{
    va_list args;
    va_start(args,msg);
    vwarningmsg(msg, args);
    va_end(args);
}

Here is the call graph for this function:

CostFunc PLearn::weighted_costfunc ( CostFunc  costfunc) [inline]

reweighting

Definition at line 83 of file WeightedCostFunction.h.

{ return new WeightedCostFunction(costfunc); }
template<class T >
T PLearn::weighted_distance ( const TVec< T > &  vec1,
const TVec< T > &  vec2,
double  n,
const TVec< T > &  weights 
)

Definition at line 1184 of file TMat_maths_impl.h.

References mypow(), sqrt(), and weighted_powdistance().

{
    if(n==1.0)
        return weighted_powdistance(vec1, vec2, 1.0, weights);
    else if(n==2.0)
        return sqrt(weighted_powdistance(vec1, vec2, 2.0, weights));
    else
        return mypow(weighted_powdistance(vec1, vec2, n, weights), 1.0/n);
}

Here is the call graph for this function:

template<class T >
T PLearn::weighted_mean ( const TVec< T > &  vec,
const TVec< T > &  weights,
bool  ignore_missing = false 
)

Definition at line 600 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, is_missing(), PLearn::TVec< T >::length(), MISSING_VALUE, PLERROR, PLearn::TVec< T >::size(), and w.

Referenced by columnWeightedMean().

{
#ifdef BOUNDCHECK
    if(vec.length()!=weights.length() || vec.length() == 0)
        PLERROR("IN T weighted_mean(const TVec<T>& vec, const TVec<T>& weights) vec and weights must have equal (non-zero) lengths");
#endif
    if (vec.size() == 0)
        return MISSING_VALUE;
    double res = 0.0;
    T sum_weights = 0.0;
    T* v = vec.data();
    T* w = weights.data();
    for(int i=0; i<vec.length(); i++)
    {
        if (!is_missing(v[i]) && !is_missing(w[i]))
        {
            res += v[i] * w[i];
            sum_weights += w[i];
        }
        else if (!ignore_missing) return MISSING_VALUE;
    }
    if (sum_weights == 0)
        PLERROR("IN T weighted_mean: sum(weights) == 0");
    return T(res/sum_weights);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
T PLearn::weighted_powdistance ( const TVec< T > &  vec1,
const TVec< T > &  vec2,
double  n,
const TVec< T > &  weights 
)

Definition at line 1138 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), diff(), i, PLearn::TVec< T >::length(), mypow(), PLERROR, PLearn::TVec< T >::size(), and w.

Referenced by PLearn::ScaledGaussianKernel::evaluate(), and weighted_distance().

{
#ifdef BOUNDCHECK
    if(vec1.length() != weights.length() || vec2.length()!=weights.length())
        PLERROR("In weighted_powdistance: vec1, vec2 and weights vector should have the same length");
#endif
    T result = 0.0;
    if (vec1.size() > 0 && vec2.size() > 0 && weights.size() > 0) {
        T* v1 = vec1.data();
        T* v2 = vec2.data();
        T* w = weights.data();
        int length = vec1.length();
        if(n==1.0) // L1 distance
        {
            for(int i=0; i<length; i++)
            {
                T diff = w[i]*(v1[i]-v2[i]);
                if(diff>=0)
                    result += diff;
                else
                    result -= diff;
            }
        }
        else if(n==2.0)
        {
            for(int i=0; i<length; i++)
            {
                T diff = w[i]*(v1[i]-v2[i]);
                result += diff*diff;
            }
        }
        else
        {
            for(int i=0; i<length; i++)
            {
                T diff = w[i]*(v1[i]-v2[i]);
                if(diff<0)
                    diff = -diff;
                result += mypow(diff,n);
            }
        }
    }
    return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Var PLearn::weighted_sumsquare ( Var  v,
Var  w 
) [inline]

Definition at line 80 of file WeightedSumSquareVariable.h.

Referenced by PLearn::NeuralNet::build_().

{ return new WeightedSumSquareVariable(v,w); }

Here is the caller graph for this function:

template<class T >
T PLearn::weighted_variance ( const TVec< T > &  vec,
const TVec< T > &  weights,
no_weighted_mean,
weighted_mean 
)

Definition at line 683 of file TMat_maths_impl.h.

References PLearn::TVec< T >::data(), i, PLearn::TVec< T >::length(), MISSING_VALUE, PLERROR, PLearn::TVec< T >::size(), sum(), and w.

Referenced by columnWeightedVariance().

{
#ifdef BOUNDCHECK
    if(vec.length()!=weights.length() || vec.length()==0)
        PLERROR("IN T weighted_variance(const TVec<T>& vec, const TVec<T>& weights, T no_weighted_mean, T weighted_mean) vec and weights must have equal (non-zero) lengths");
#endif
    if (vec.size() == 0)
        return MISSING_VALUE;
    double res = 0.0;
    T* v = vec.data();
    T* w = weights.data();
    for(int i=0; i<vec.length(); i++)
        res += v[i] * v[i] * w[i];
    T sum_weights = sum(weights, false);
    if (sum_weights == 0)
        PLERROR("IN T weighted_variance(const TVec<T>& vec, const TVec<T>& weights, T no_weighted_mean, T weighted_mean) sum(weights) == 0");
    return (res/sum_weights - no_weighted_mean * (2*weighted_mean - no_weighted_mean))*vec.length()/(vec.length()-1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::weightedCentroid ( const Mat &  pts,
const Vec &  weights 
)

Definition at line 206 of file geometry.cc.

References i, PLearn::TMat< T >::length(), n, and w.

Referenced by calcTransformation4(), transformationFromWeightedMatchedPoints(), and weightedTransformationFromMatchedPoints().

{
  Vec centroid( 3 );
  int n = pts.length();
  real w_tot = 0;

  for( int i=0 ; i<n ; i++ )
  {
    real w = weights[ i ];
    centroid += pts( i ) * w;
    w_tot += w;
  }

  if( w_tot == 0 )
  {
    centroid = Vec( 3 );
  }
  else
  {
    centroid /= w_tot;
  }

  return centroid;
}

Here is the call graph for this function:

Here is the caller graph for this function:

real PLearn::weightedLinearRegression ( VMat  inputs,
VMat  outputs,
VMat  gammas,
real  weight_decay,
Mat  theta_t,
bool  use_precomputed_XtX_XtY,
Mat  XtX,
Mat  XtY,
real sum_squared_Y,
Vec &  outputwise_sum_squared_Y,
real sum_gammas,
bool  return_squared_loss = false,
int  verbose_computation_every = 0,
bool  cholesky = true,
int  apply_decay_from = 1 
)

Linear regression where each input point is given a different importance weight (the gammas); returns weighted average of squared loss This regression is made with no added bias.

If you want a bias, add it yourself with passing inputs_w_bias = new ExtendedVMatrix(inputs,0,0,1,0,1.0)

< element-wise square

Definition at line 264 of file VMat_linalg.cc.

References PLearn::TMat< T >::clear(), dot(), externalProductScaleAcc(), PLearn::TVec< T >::fill(), i, PLearn::TMat< T >::length(), PLearn::VMat::length(), PLERROR, product(), PLearn::TVec< T >::resize(), solveLinearSystem(), solveLinearSystemByCholesky(), PLearn::TMat< T >::width(), PLearn::VMat::width(), and x.

Referenced by PLearn::LinearRegressor::train(), and weightedLinearRegression().

{
    int inputsize = inputs.width();
    int targetsize = outputs.width();
    if (outputs.length()!=inputs.length())
        PLERROR("linearRegression: inputs.length()=%d while outputs.length()=%d",inputs.length(),outputs.length());
    if (theta_t.length()!=inputsize || theta_t.width()!=targetsize)
        PLERROR("linearRegression: theta_t(%d,%d) should be (%dx%d)",
                theta_t.length(),theta_t.width(),inputsize,targetsize);

    if(XtX.length()!=inputsize || XtX.width()!=inputsize)
        PLERROR("In linearRegression: XtX should have dimensions %dx%d (inputs.width())x(inputs.width())",
                inputsize,inputsize);
    if(XtY.length()!=inputsize || XtY.width()!=targetsize)
        PLERROR("In linearRegression: XtY should have dimensions %dx%d (inputs.width())x(outputs.width())",
                inputsize,targetsize);

    int l=inputs.length();
    if(!use_precomputed_XtX_XtY) // then compute them
    {
        XtX.clear();
        XtY.clear();
        // VMat X = new ExtendedVMatrix(inputs,0,0,1,0,1.0); // prepend a first column of ones
        VMat X = inputs;
        VMat Y = outputs;
        outputwise_sum_squared_Y.resize(targetsize);
        outputwise_sum_squared_Y.fill(0.0);

        sum_squared_Y= 0.0;
        sum_gammas= 0.0;

        // Prepare to comnpute weighted XtX and XtY
        Vec x(X.width());
        Vec y(Y.width());
        real gamma_i;

        // Display progress bar iff we have some verbosity
        PP<ProgressBar> pb(
            verbose_every?
            new ProgressBar("Performing Weighted Linear Regression", l) : 0);

        for(int i=0; i<l; i++)
        {
            if (pb)
                pb->update(i);

            X->getRow(i,x);
            Y->getRow(i,y);
            gamma_i = gammas(i,0);
            externalProductScaleAcc(XtX, x,x,gamma_i);
            externalProductScaleAcc(XtY, x,y,gamma_i);
            sum_squared_Y += gamma_i * dot(y,y);
            sum_gammas += gamma_i;
            y *= gamma_i*y;                                
            outputwise_sum_squared_Y += y;
        }
    }

    // add weight_decay on the diagonal of XX' (except for the bias)
    for (int i=apply_decay_from; i<XtX.length(); i++)
        XtX(i,i) += weight_decay;

    if (cholesky) {
        // now solve by Cholesky decomposition
        solveLinearSystemByCholesky(XtX,XtY,theta_t);
    } else {
        theta_t = solveLinearSystem(XtX, XtY);
    }

    real squared_loss=0;
    if (return_squared_loss)
    {
        // squared loss = sum_{ij} theta_{ij} (X'W X theta')_{ij} + sum_{t,i} gamma_t*Y_{ti}^2 - 2 sum_{ij} theta_{ij} (X'W Y)_{ij}
        Mat M(inputsize,targetsize);
        product(M,XtX,theta_t);
        squared_loss += dot(M,theta_t); //
        squared_loss += sum_squared_Y;
        squared_loss -= 2*dot(XtY,theta_t);
    }
    // return squared_loss/l;
    // perr << "linreg/l: " << squared_loss << "/" << l << "=" << squared_loss/l << endl;
    // perr << "linreg/sg: " << squared_loss << "/" << sum_gammas << "=" << squared_loss/sum_gammas << endl;
    return squared_loss/sum_gammas;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::weightedLinearRegression ( VMat  inputs,
VMat  outputs,
VMat  gammas,
real  weight_decay,
bool  include_bias 
)

Version that does all the memory allocations of XtX, XtY and theta_t.

Returns theta_t

Definition at line 356 of file VMat_linalg.cc.

References n, weightedLinearRegression(), and PLearn::VMat::width().

{
    int n = inputs.width()+(include_bias?1:0);
    int n_outputs = outputs.width();
    Mat XtX(n,n);
    Mat XtY(n,n_outputs);
    Mat theta_t(n,n_outputs);
    real sy=0;
    real sg=0;
    Vec outputwise_sum_squared_Y;
    if(include_bias)
        inputs = new ExtendedVMatrix(inputs,0,0,1,0,1.0); // prepend a first column of ones
    weightedLinearRegression(inputs, outputs, gammas, weight_decay, theta_t,
                             false, XtX, XtY, sy, outputwise_sum_squared_Y,
                             sg);
    return theta_t;
}

Here is the call graph for this function:

real PLearn::weightedRidgeRegressionByGCV ( Mat  X,
Mat  Y,
Vec  gamma,
Mat  W,
real best_gcv,
real  min_weight_decay = 0 
)

Similar to ridgeRegressionByGCV, but with support form sample weights gamma.

If gamma is empty, then this will perform an unweighted ridge regression based on GCV. WARNING: contrary to the unweighted version, here X and Y are modified by the call (this is to be more memory efficient), if you do not want this, call it with X.copy() and Y.copy().

Note: I'm not 100% sure that this weighted version is really correct. All it does is multiply the rows of X and Y by sqrt(gamma[i]) and then essentially the code is a slightly modified copy-paste of the unweighted version, where the number of samples is replaced by the sum of the weights in one or two spots. Somebody should more carefully check the maths!

Definition at line 1117 of file plapack.cc.

References PLearn::TMat< T >::column(), exp(), PLearn::TVec< T >::fill(), GCVfromSVD(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), m, min(), n, pl_log, PLERROR, pownorm(), PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), sqrt(), sum(), sumsquare(), SVD(), PLearn::TVec< T >::toMat(), transposeProduct(), and PLearn::TMat< T >::width().

Referenced by PLearn::AutoLinearRegressor::train().

{
    int l = X.length();

    real gamma_sum = 0;
    if(gamma.length()==0)
        gamma_sum = l;    
    else
    {
        gamma_sum = sum(gamma);
        for(int i=0; i<l; i++)
        {
            real s = sqrt(gamma[i]);
            X(i) *= s;
            Y(i) *= s;
        }
    }
    
    int n = Y.length();
    int m = Y.width();
    int p = X.width();
    int nx = X.length();

    if (nx!=n)
        PLERROR("ridgeRegressionByGCV: incompatible arguments X and Y don't have same number of examples: %d and %d\n",nx,n);
    if (W.length()!=m)
        PLERROR("ridgeRegressionByGCV: incompatible arguments W and Y don't have compatible dimensions: %d and %d\n",W.length(),m);
    if (W.width()!=p)
        PLERROR("ridgeRegressionByGCV: incompatible arguments W and X don't have compatible dimensions: %d and %d\n",W.width(),p);
    Mat U, Vt, Z, squaredZ;
    Vec singular_values, eigen_values, s, y2, z2, best_s;
    int rank = min(n,p);
    U.resize(n,rank);
    Vt.resize(rank,p);
    singular_values.resize(rank);
    eigen_values.resize(rank);
    Z.resize(m,rank);
    squaredZ.resize(m,rank);
    s.resize(rank);
    best_s.resize(rank);
    y2.resize(m);
    z2.resize(m);
    SVD(X, U, singular_values, Vt, 'S', 2);
    // perr << "Singular values: " << singular_values << endl;
    for (int i=0;i<rank;i++)
        eigen_values[i] = singular_values[i]*singular_values[i];
    // perr << "Eigen values: " << eigen_values << endl;

    for (int j=0;j<m;j++)
    {
        Mat Yj = Y.column(j);
        Vec Zj = Z(j);
        y2[j] = sumsquare(Yj);
        transposeProduct(Zj.toMat(rank,1),U,Yj);
        z2[j] = pownorm(Zj);
    }

    Vec gcv;
    gcv.resize(rank);
    gcv.fill(-1.);
    best_gcv = 1e38;
    real best_weight_decay = min_weight_decay;

    for (int i=1;i<=rank;i++)
    {
        bool stop=false;
        real weight_decay = 0;
        if(i==rank)
            weight_decay = min_weight_decay;
        else
            weight_decay = exp(0.5*(pl_log(eigen_values[i-1])+pl_log(eigen_values[i])));
        // perr << "Trying weight_decay = " << weight_decay;
        if (weight_decay < min_weight_decay)
        {
            weight_decay = min_weight_decay;
            stop = true;
        }
        for (int j=0;j<rank;j++)
            s[j] = weight_decay / (weight_decay + eigen_values[j]);
        real gcv_i = 0;
        for (int j=0;j<m;j++)
            gcv_i += GCVfromSVD(gamma_sum,y2[j]-z2[j], Z(j), s);
        // perr << " -> gcv =  " << gcv_i << endl;
        if (gcv_i<best_gcv)
        {
            best_gcv=gcv_i;
            best_weight_decay = weight_decay;
            best_s << s;
        }
        if (stop)
            break;
    }

    // compute weights for selected weight decay
    for (int j=0;j<m;j++)
    {
        Vec zj = Z(j);
        for (int i=0;i<rank;i++)
            zj[i] *= best_s[i]*singular_values[i]/best_weight_decay;
        transposeProduct(W(j),Vt,zj);
    }
    return best_weight_decay;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::weightedRotationFromMatchedPoints ( const Mat &  mp,
const Mat &  sp,
const Vec &  weights,
real error 
)

Definition at line 232 of file geometry.cc.

References diagonalmatrix(), eigsrt(), i, jacobi(), PLearn::TMat< T >::length(), n, rotationFromAxisAngle(), PLearn::TMat< T >::subMat(), and transposeProductAcc().

Referenced by calcTransformation4(), and weightedTransformationFromMatchedPoints().

{
  // Ouais, c'est absolument pas optimisé, je sais

  Mat M( 4, 4 );
  Mat A( 4, 4 );
  Mat rot( 3, 3 );

  int n = mp.length();
  Vec vm( 3 );
  Vec vs( 3 );

  for( int i=0 ; i<n ; i++ )
  {
    vm << mp( i );
    vs << sp( i );

    real weight = weights[ i ];
    M(0,1) = vm[2]+vs[2];
    M(0,2) = -vm[1]-vs[1];
    M(0,3) = vm[0]-vs[0];

    M(1,0) = -vm[2]-vs[2];
    M(1,2) = vm[0]+vs[0];
    M(1,3) = vm[1]-vs[1];

    M(2,0) = vm[1]+vs[1];
    M(2,1) = -vm[0]-vs[0];
    M(2,3) = vm[2]-vs[2];

    M(3,0) = -vm[0]+vs[0];
    M(3,1) = -vm[1]+vs[1];
    M(3,2) = -vm[2]+vs[2];

    // A = A + transpose(M) * M * weight
    transposeProductAcc( A, M, M * weight );
  }

  Vec ev( 4 );
  Mat e( 4, 4 );
  int n_rot;

  if( jacobi( A, ev, e, n_rot ) )
  {
    eigsrt( ev, e, 4 );

    error = ev[ 3 ];
    real theta = 2.0 * acos( e( 3, 3 ) );

    if( theta !=0 )
    {
      Vec v( 3 );
      v << e.subMat( 0, 3, 3, 1 );
      v /= real(sin( theta/2.0 ));
      rot << rotationFromAxisAngle( v, theta );
      return rot;
    }
  }

  // rot = Id3
  rot << diagonalmatrix( Vec( 3, 1 ) );

  return rot;

}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::weightedTransformationFromMatchedPoints ( const Mat &  mp,
const Mat &  sp,
const Vec &  weights,
Mat &  rot,
Vec &  trans,
real error 
)

Definition at line 180 of file geometry.cc.

References PLearn::TMat< T >::length(), n, product(), weightedCentroid(), and weightedRotationFromMatchedPoints().

Referenced by PLearn::ICP::iterativeReweight(), and main().

{
  Vec cs( 3 );
  cs << weightedCentroid( sp, weights );

  Vec cm( 3 );
  cm << weightedCentroid( mp, weights );

  int n = mp.length();
  Mat origin_mp( n, 3 );
  Mat origin_sp( n, 3 );

  origin_mp = mp - cm;
  origin_sp = sp - cs;

  rot << weightedRotationFromMatchedPoints( origin_mp, origin_sp, 
                                            weights, error );

  Vec res( 3 );
  product( res, rot, cm );

  trans << ( cs - res );
}

Here is the call graph for this function:

Here is the caller graph for this function:

FilesIntStream * PLearn::word_sequences2files_int_stream ( const char *  word_sequences_file)

Convert <word_sequences> filename into a FilesIntStream stream. This file must contain one line per <word_sequence> filename, and each of these filenames must represent binary integers files that can be associated to an IntStream.

Definition at line 247 of file IntStream.cc.

References PLERROR, strlen(), and tostring().

{
    FILE* word_sequences_fp=fopen(word_sequences_file,"rb");
    if (!word_sequences_fp)
        PLERROR("word_sequences2files_int_stream: can't open file %s",word_sequences_file);
    typedef const char* cstring;
    const char** word_sequences = new cstring[1000];
    int n_word_sequences=0;
    char buffer[1000];
    while (!feof(word_sequences_fp)) {
        if (!fgets(buffer,1000,word_sequences_fp)) break;
        int l=(int)strlen(buffer);
        if (buffer[l-1]=='\n') buffer[l-1]='\0';
        word_sequences[n_word_sequences]=tostring(buffer).c_str();
        n_word_sequences++;
    }
    fclose(word_sequences_fp);
    return new FilesIntStream(n_word_sequences,word_sequences);
}

Here is the call graph for this function:

bool PLearn::wordAndFreqGT ( const wordAndFreq &  a,
const wordAndFreq &  b 
)

Definition at line 76 of file NnlmOnlineLearner.cc.

References PLearn::wordAndFreq::frequency.

Referenced by PLearn::NnlmOnlineLearner::buildCandidates().

{
    return a.frequency > b.frequency;
}

Here is the caller graph for this function:

bool PLearn::wordAndProbGT ( const wordAndProb &  a,
const wordAndProb &  b 
)

Definition at line 62 of file NnlmOutputLayer.cc.

References PLearn::wordAndProb::probability.

Referenced by PLearn::NnlmOutputLayer::getBestCandidates().

{
    return a.probability > b.probability;
}

Here is the caller graph for this function:

const string & PLearn::wordseparators ( )

List of characters considered to mark a separation between "words"; This is a fairly restricted list, meaning that many things can be part of a "word" in this sense (for ex: "this-is_a+single@wor'd"), this is to insure a smooth transition for the new setOption, which calls readOptionVal ...

which may call read(istream&, string&)...

Definition at line 46 of file PStream_util.cc.

Referenced by PLearn::PStream::operator>>().

{
    static string wordseps = " \t\n\r)]};,:|#";
    return wordseps;
} 

Here is the caller graph for this function:

template<class T >
void PLearn::write ( ostream &  out_,
const T &  o 
) [inline]

Definition at line 1477 of file PStream.h.

{
    PStream out(&out_);
    out << o;
}
void PLearn::write ( ostream &  out,
const RealRange &  range 
) [inline]
void PLearn::write_bool ( ostream &  out,
const bool ptr,
int  n,
bool  is_file_bigendian 
)
void PLearn::write_compr_mode_and_size ( ostream &  out,
unsigned char  mode,
int  size 
) [inline]

Definition at line 76 of file pl_io.cc.

References binwrite(), and PLERROR.

Referenced by binwrite_compressed().

{
#ifdef BOUNDCHECK
    if(size<0 || size>=(1<<30))
        PLERROR("In write_compr_mode_and_size: size out of bounds");
#endif
    unsigned int imode = (unsigned int) mode;
    if(size<(1<<6))
    {
        unsigned char sizenum = (unsigned char) size | (unsigned char) (imode<<6);
        binwrite(out, sizenum);
    }
    else if(size<(1<<14))
    {
        unsigned short sizenum = (unsigned short) size | (unsigned short) (imode<<14);
        unsigned char header = 0x00;
        binwrite(out, header);
        binwrite(out, sizenum);
    }
    else
    {
        unsigned int sizenum = (unsigned int) size | (unsigned int) (imode<<30);
        unsigned char header = 0xC0;
        binwrite(out, header);
        binwrite(out, sizenum);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::write_compr_mode_and_size_ptr ( char *&  out,
unsigned char  mode,
int  size 
) [inline]

Definition at line 437 of file pl_io.cc.

References i, and PLERROR.

Referenced by compress_vec().

{
    union {unsigned short s;char cs[2];} unis;
    union {unsigned int i;char ci[4];} unii;

    if(sizeof(unsigned int)!=4)
        PLERROR("Function write_compr_mode_and_size_ptr is not ready for 64 bit.");

#ifdef BOUNDCHECK
    if(size<0 || size>=(1<<30))
        PLERROR("In write_compr_mode_and_size: size out of bounds");
#endif
    unsigned int imode = (unsigned int) mode;
    if(size<(1<<6))
    {
        unsigned char sizenum = (unsigned char) size | (unsigned char) (imode<<6);
        (*out++) = sizenum;
    }
    else if(size<(1<<14))
    {
        unis.s = (unsigned short) size | (unsigned short) (imode<<14);
        unsigned char header = 0x00;
        (*out++) = header;
        (*out++) = unis.cs[0];
        (*out++) = unis.cs[1];
    }
    else
    {
        unii.i = (unsigned int) size | (unsigned int) (imode<<30);
        unsigned char header = 0xC0;
        (*out++) = header;
        (*out++) = unii.ci[0];
        (*out++) = unii.ci[1];
        (*out++) = unii.ci[2];
        (*out++) = unii.ci[3];
    }
}

Here is the caller graph for this function:

void PLearn::write_double ( ostream &  out,
double  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 134 of file pl_io_deprecated.h.

References write_double().

{ write_double(out, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::write_double ( ostream &  out,
const double *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 338 of file pl_io_deprecated.cc.

References reverse_double().

Referenced by write_double().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_double(ptr,n);
        out.write((char*)ptr,n*sizeof(double));
        reverse_double(ptr,n);
    }
    else
        out.write((char*)ptr,n*sizeof(double));
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        out.write((char*)ptr,n*sizeof(double));
    else
    {
        reverse_double(ptr,n);
        out.write((char*)ptr,n*sizeof(double));
        reverse_double(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::write_float ( ostream &  out,
const float *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 363 of file pl_io_deprecated.cc.

References reverse_float().

Referenced by write_float().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_float(ptr,n);
        out.write((char*)ptr,n*sizeof(float));
        reverse_float(ptr,n);
    }
    else
        out.write((char*)ptr,n*sizeof(float));
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        out.write((char*)ptr,n*sizeof(float));
    else
    {
        reverse_float(ptr,n);
        out.write((char*)ptr,n*sizeof(float));
        reverse_float(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::write_float ( ostream &  out,
float  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 132 of file pl_io_deprecated.h.

References write_float().

{ write_float(out, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::write_int ( ostream &  out,
const int ptr,
int  n,
bool  is_file_bigendian 
)

Writes binary data to the file in the specified representation (little or big endian) regardeless of the endianness used on the current architecture.

Definition at line 290 of file pl_io_deprecated.cc.

References reverse_int().

Referenced by write_int(), and write_uint().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_int(ptr,n);
        out.write((char*)ptr,n*sizeof(int));
        reverse_int(ptr,n);
    }
    else
        out.write((char*)ptr,n*sizeof(int));
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        out.write((char*)ptr,n*sizeof(int));
    else
    {
        reverse_int(ptr,n);
        out.write((char*)ptr,n*sizeof(int));
        reverse_int(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::write_int ( ostream &  out,
int  value,
bool  is_file_bigendian = true 
) [inline]

The following calls write a single value to the file in the specified representation, regardeless of the endianness on the current architecture.

Definition at line 128 of file pl_io_deprecated.h.

References write_int().

{ write_int(out, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::write_sbyte ( ostream &  out,
signed char  x 
) [inline]

Definition at line 140 of file pl_io_deprecated.h.

Referenced by PLearn::VecCompressor::writeCompressedVec().

{ out.put(x); }

Here is the caller graph for this function:

void PLearn::write_short ( ostream &  out,
const short *  ptr,
int  n,
bool  is_file_bigendian 
)

Definition at line 314 of file pl_io_deprecated.cc.

References reverse_short().

Referenced by write_short(), and write_ushort().

{
#ifdef LITTLEENDIAN
    if(is_file_bigendian)
    {
        reverse_short(ptr,n);
        out.write((char*)ptr,n*sizeof(short));
        reverse_short(ptr,n);
    }
    else
        out.write((char*)ptr,n*sizeof(short));
#endif
#ifdef BIGENDIAN
    if(is_file_bigendian)
        out.write((char*)ptr,n*sizeof(short));
    else
    {
        reverse_short(ptr,n);
        out.write((char*)ptr,n*sizeof(short));
        reverse_short(ptr,n);
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::write_short ( ostream &  out,
short  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 130 of file pl_io_deprecated.h.

References write_short().

{ write_short(out, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::write_ubyte ( ostream &  out,
unsigned char  x 
) [inline]

Definition at line 141 of file pl_io_deprecated.h.

{ out.put(x); }
void PLearn::write_uint ( ostream &  out,
const unsigned int ptr,
int  n,
bool  is_file_bigendian 
) [inline]

Definition at line 120 of file pl_io_deprecated.h.

References write_int().

Referenced by write_uint().

{ write_int(out,(int*)ptr,n,is_file_bigendian); }

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::write_uint ( ostream &  out,
unsigned int  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 136 of file pl_io_deprecated.h.

References write_uint().

{ write_uint(out, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::write_ushort ( ostream &  out,
unsigned short  value,
bool  is_file_bigendian = true 
) [inline]

Definition at line 138 of file pl_io_deprecated.h.

References write_ushort().

{ write_ushort(out, &value, 1, is_file_bigendian); }

Here is the call graph for this function:

void PLearn::write_ushort ( ostream &  out,
const unsigned short *  ptr,
int  n,
bool  is_file_bigendian 
) [inline]

Definition at line 122 of file pl_io_deprecated.h.

References write_short().

Referenced by write_ushort().

{ write_short(out,(short*)ptr,n,is_file_bigendian); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
void PLearn::writeField ( ostream &  out,
const string &  fieldname,
const T &  x 
)

generic field writing and reading

Definition at line 217 of file pl_io_deprecated.h.

References write(), and writeFieldName().

Referenced by PLearn::StderrStatsIterator::oldwrite(), PLearn::StddevStatsIterator::oldwrite(), PLearn::ExpMeanStatsIterator::oldwrite(), PLearn::QuantilesStatsIterator::oldwrite(), PLearn::StatsCollector::oldwrite(), PLearn::SharpeRatioStatsIterator::oldwrite(), PLearn::StatsIterator::oldwrite(), PLearn::LiftStatsIterator::oldwrite(), PLearn::Learner::oldwrite(), and PLearn::MeanStatsIterator::oldwrite().

{ 
// Norman: This gives problems on VSNet when T is a Array<VMFieldStat> or VMFieldStat.
//         Because it is deprecated, well, I have decided to wipe it out! :)
#ifndef WIN32
    writeFieldName(out,fieldname); write(out,x); out << '\n'; 
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::writeFieldName ( ostream &  out,
const string &  fieldname 
)

writes "fieldname: "

writes and reads the given fieldname (should be followed by wrtiting or reading of the field's value. The readFieldName method checks the read fieldname against the one passed as argument and issues an error if they do not match

Definition at line 92 of file pl_io_deprecated.cc.

Referenced by binwriteField(), binwriteField_double(), PLearn::StatsCollector::oldwrite(), and writeField().

{ out << fieldname << ": "; }

Here is the caller graph for this function:

void PLearn::writeFooter ( ostream &  out,
const string &  classname 
)
void PLearn::writeHeader ( ostream &  out,
const string &  classname,
int  version = 0 
)
template<class MapT >
void PLearn::writeMap ( PStream &  out,
const MapT &  m 
)

Definition at line 959 of file PStream.h.

References PLearn::PStream::put(), and PLearn::PStream::write().

Referenced by operator<<().

{
    typename MapT::const_iterator it = m.begin();
    typename MapT::const_iterator itend = m.end();

    // PStream::mode_t curmode = out.switchToPLearnOutMode();

    out.put('{');
    if(!m.empty())
    {
        // write the first item
        out << it->first;
        out.write(": ");
        out << it->second;
        ++it;
        while(it!=itend)
        {
            out.write(", ");
            out << it->first;
            out.write(": ");
            out << it->second;
            ++it;
        }
    }
    out.put('}');

    // out.setOutMode(curmode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::writeNewline ( ostream &  out) [inline]

Writes a single newline character.

Definition at line 197 of file pl_io_deprecated.h.

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

{ out << '\n'; }

Here is the caller graph for this function:

template<class PriorityQueueT >
void PLearn::writePriorityQueue ( PStream &  out,
const PriorityQueueT &  pq 
)

Definition at line 1562 of file PStream.h.

References PLearn::PStream::put(), and PLearn::PStream::write().

Referenced by operator<<().

{
    PriorityQueueT pq2(pq);
    out.put('[');
    while(!pq2.empty())
    {
        typename PriorityQueueT::value_type val;
        val = pq2.top();
        out << val;
        pq2.pop();
        if (!pq2.empty())
            out.write(", ");
    }
    out.put(']');
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class SequenceType >
void PLearn::writeSequence ( PStream &  out,
const SequenceType &  seq 
)

Definition at line 1268 of file PStream.h.

References binwrite_(), byte_order(), LITTLE_ENDIAN_ORDER, n, PLearn::PStream::outmode, PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLERROR, PLearn::PStream::pretty_ascii, PLearn::PStream::put(), PLearn::PStream::raw_ascii, PLearn::PStream::raw_binary, and PLearn::PStream::write().

Referenced by operator<<(), and PLearn::TVec< PP< RegressionTreeNode > >::write().

{
    // norman: added explicit cast
    uint32_t n = (uint32_t)seq.size();
    typename SequenceType::const_iterator it = seq.begin();

    switch(out.outmode)
    {
    case PStream::raw_ascii:
        while(n--)
        {
            out << *it;
            out.put(' ');
            ++it;
        }
        break;

    case PStream::pretty_ascii:
        out.write("[ ");
        while(n--)
        {
            out << *it;
            if(n>0)
                out.write(", ");
            ++it;
        }
        out.write(" ] ");
        break;

    case PStream::raw_binary:
        binwrite_(out, it, n);
        break;

    case PStream::plearn_ascii:
        out << n;
        out.write("[ ");
        while(n--)
        {
            out << *it;
            ++it;
        }
        out.write("] ");
        break;

    case PStream::plearn_binary:
    {
        unsigned char typecode;
        if(byte_order()==LITTLE_ENDIAN_ORDER)
        {
            out.put((char)0x12); // 1D little-endian
            typecode = TypeTraits<typename SequenceType::value_type>
                ::little_endian_typecode();
        }
        else
        {
            out.put((char)0x13); // 1D big-endian
            typecode = TypeTraits<typename SequenceType::value_type>
                ::big_endian_typecode();
        }

        // write typecode
        out.put(typecode);

        // write length in raw_binary
        out.write((char*)&n, sizeof(n));

        // write the data
        binwrite_(out, it, n);
    }
    break;

    default:
        PLERROR("In PStream::writeSequence(Iterator& it, int n)  unknown outmode!!!!!!!!!");
        break;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class SetT >
void PLearn::writeSet ( PStream &  out,
const SetT &  s 
)

Definition at line 1512 of file PStream.h.

References PLearn::PStream::put(), and PLearn::PStream::write().

Referenced by operator<<().

{
    typename SetT::const_iterator it = s.begin();
    typename SetT::const_iterator itend = s.end();

    out.put('[');
    while(it!=itend)
    {
        out << *it;
        ++it;
        if (it != itend)
            out.write(", ");
    }
    out.put(']');
}

Here is the call graph for this function:

Here is the caller graph for this function:

PStream & PLearn::ws ( PStream &  in)

Definition at line 149 of file PStream.cc.

References in, PLearn::PStream::inmode, PLearn::PStream::plearn_ascii, PLearn::PStream::plearn_binary, PLERROR, PLearn::PStream::pretty_ascii, PLearn::PStream::raw_ascii, PLearn::PStream::raw_binary, PLearn::PStream::skipBlanks(), and PLearn::PStream::skipBlanksAndComments().

Referenced by PLearn::SumOverBagsVariable::build_(), PLearn::AsciiVMatrix::build_(), PLearn::StructuralLearner::buildTasksParameters(), PLearn::StructuralLearner::computeOutputWithFeatures(), PLearn::WordNetOntology::computeWordSenseUniqueIds(), PLearn::WordNetOntology::extractSenses(), PLearn::StructuralLearner::forget(), getModelAliases(), PLearn::WordNetOntology::getSenseKey(), PLearn::WordNetOntology::getWordSenseUniqueId(), PLearn::StructuralLearner::initializeParams(), PLearn::WordNetOntology::load(), loadAscii(), loadAsciiSingleBinaryDescriptor(), PLearn::NeighborhoodBoxVolumeDensityEstimator::log_density(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::StructuralLearner::makeDeepCopyFromShallowCopy(), operator>>(), PLearn::RealMapping::read(), PLearn::Object::read(), PLearn::VMatrix::setMetaInfoFrom(), PLearn::LocalGaussianClassifier::setTrainingSet(), PLearn::StructuralLearner::train(), and PLearn::GaussianDistribution::train().

{
    switch(in.inmode) {
    case PStream::raw_ascii:
    case PStream::pretty_ascii:
    case PStream::raw_binary:
        in.skipBlanks();
        break;
    case PStream::plearn_ascii:
    case PStream::plearn_binary:
        // Also skip comments.
        in.skipBlanksAndComments();
        break;
    default:
        PLERROR("In ws(PStream& in) - in's inmode is not supported");
    }
    return in;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 57 of file general.cc.

const char PLearn::ALPHAsymbols = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

Definition at line 51 of file TypesNumeriques.cc.

Referenced by compactRepresentationTranslate().

double PLearn::big = 4.503599627370496e15

Definition at line 669 of file random.cc.

Referenced by incbcf().

double PLearn::biginv = 2.22044604925031308085e-16

Definition at line 670 of file random.cc.

Referenced by incbcf().

Definition at line 59 of file PStream_util.cc.

map<string, unsigned int> PLearn::count_refs_to_file [static]

Definition at line 1361 of file fileutils.cc.

Referenced by addReferenceToFile(), nReferencesToFile(), and removeReferenceToFile().

bool PLearn::dbg = false [static]
const char PLearn::DIGITsymbols = "0123456789"

Definition at line 50 of file TypesNumeriques.cc.

Referenced by compactRepresentationTranslate(), and looksNumeric().

const JTime PLearn::EPS_TIME = 1e-9

Smallest representable increment.

Definition at line 83 of file Calendar.h.

ostream * PLearn::error_stream = &cerr

Definition at line 59 of file plerror.cc.

Referenced by exitmsg(), and verrormsg().

TVec<string> PLearn::funcs_help [static]

Definition at line 90 of file PythonExtension.cc.

Referenced by injectPLearnGlobalFunctions().

real PLearn::gset [static]

Definition at line 57 of file random.cc.

Referenced by gaussian_01().

const void * PLearn::Hash_DELETED_SLOT = (void *)0x00000001

Definition at line 53 of file Hash.cc.

Referenced by PLearn::Hash< KeyType, DataType >::hashKey().

const unsigned int PLearn::Hash_UNUSED_TAG = 0xffffffffu

DataType must have new, delete and copy constructor.

KeyType must have a (char *) type cast operator that returns a pointer to its usefull region since the key can be any object (therefore, the usefull part of the object does not necessarily starts a offset_0) const size_t byteLength() const that returns the byte-size of its usefull region, new, delete and a copy constructor ==, != Keys are unique

Definition at line 49 of file Hash.cc.

Referenced by PLearn::SimpleDB< KeyType, QueryResult >::findEqualIndexed(), PLearn::Hash< KeyType, DataType >::hashAddress(), and PLearn::SimpleDB< KeyType, QueryResult >::indexColumn().

Definition at line 60 of file PStream_util.cc.

int PLearn::iset = 0 [static]

Definition at line 56 of file random.cc.

Referenced by gaussian_01(), and manual_seed().

double PLearn::MACHEP = 1.11022302462515654042E-16

Definition at line 665 of file random.cc.

Referenced by incbcf().

const CTime PLearn::MAX_CTIME = INT_MAX

Maximum calendar time.

Definition at line 89 of file Calendar.h.

const JTime PLearn::MAX_TIME = DBL_MAX

Maximum time.

Definition at line 74 of file Calendar.h.

Referenced by PLearn::Calendar::calendarTimeOnOrAfter().

double PLearn::MAXLOG = 7.09782712893383996732E2

Definition at line 663 of file random.cc.

const CTime PLearn::MIN_CTIME = INT_MIN

Minimum calendar time.

Definition at line 92 of file Calendar.h.

const JTime PLearn::MIN_TIME = -DBL_MAX

Minimum time.

Definition at line 77 of file Calendar.h.

Referenced by PLearn::Calendar::calendarTimeOnOrBefore().

double PLearn::MINLOG = -7.451332191019412076235E2

Definition at line 664 of file random.cc.

const unsigned char PLearn::MissingCharacter = (unsigned char)SCHAR_MIN
const double PLearn::MissingDouble = MISSING_VALUE

Definition at line 53 of file SimpleDB.cc.

Referenced by PLearn::RowIterator::setMissing(), and PLearn::FieldValue::setMissing().

const float PLearn::MissingFloat = MISSING_VALUE

Definition at line 52 of file SimpleDB.cc.

Referenced by PLearn::RowIterator::setMissing().

const int PLearn::MissingInt = INT_MIN
const short PLearn::MissingShort = SHRT_MIN
const signed char PLearn::MissingSignedChar = (signed char)SCHAR_MIN
const char PLearn::MissingString = '\0'

A few constants for representing missing values.

Definition at line 47 of file SimpleDB.cc.

Referenced by PLearn::RowIterator::isMissing(), PLearn::FieldValue::isMissing(), PLearn::RowIterator::setMissing(), and PLearn::FieldValue::setMissing().

Definition at line 63 of file PStream_util.cc.

istream PLearn::nullin

a null instream: reading from it does nothing

Referenced by PLearn::PLMPI::init().

a null iostream: reading/writing from/to it does nothing

ostream PLearn::nullout

a null ostream: writing to it does nothing

Referenced by PLearn::PLMPI::init().

const int PLearn::num_tests = sizeof(test_objects) / sizeof(test_objects[0])
const char* PLearn::ORDINALS[] = {"d","nd","th","st",0}

Definition at line 52 of file TypesNumeriques.cc.

Referenced by compactRepresentationTranslate().

PStream PLearn::perr = get_perr()

Definition at line 135 of file PStream.cc.

Referenced by PLearn::HyperLearner::auto_save(), PLearn::PLearnCommandRegistry::badcommand(), PLearn::DiverseComponentAnalysis::build_(), PLearn::DeepReconstructorNet::build_(), PLearn::TextFilesVMatrix::buildIdx(), PLearn::VMatLanguage::compileStream(), PLearn::ConjGradientOptimizer::computeCostAndDerivative(), PLearn::KernelProjection::computeCostsFromOutputs(), PLearn::ConjGradientOptimizer::computeCostValue(), PLearn::ConjGradientOptimizer::computeDerivative(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::BasisSelectionRegressor::findBestCandidateFunction(), PLearn::DiverseComponentAnalysis::forget(), get_perr(), global_options(), PLearn::DeepReconstructorNet::initializeParams(), PLearn::VMatrix::lockMetaDataDir(), PLearn::LocallyMagnifiedDistribution::log_density(), operator>>(), PLearn::HyperOptimize::optimize(), PLearn::AutoScaledGradientOptimizer::optimizeN(), output_version(), PLearn::AutoVMatrixTest::perform(), plearn_main(), plearn_terminate_handler(), PLearn::DeepReconstructorNet::prepareForFineTuning(), printobj(), printWrappedObjects(), PLearn::StatsCollector::remove_observation(), PLearn::VerifyGradientCommand::run(), PLearn::Stan::run(), PLearn::ServerCommand::run(), PLearn::Redirect::run(), PLearn::PLearnServer::run(), PLearn::ExtractOptionCommand::run(), set_global_calendars(), setPoutToPerr(), PLearn::HyperLearner::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::DeepReconstructorNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::BasisSelectionRegressor::train(), PLearn::DeepReconstructorNet::trainHiddenLayer(), PLearn::DeepReconstructorNet::trainSupervisedLayer(), PLearn::DenoisingRecurrentNet::unconditionalFprop(), UNIT_TEST(), and PLearn::Function::verifyGradient().

PStream PLearn::pin = get_pin()

Definition at line 88 of file PStream.cc.

Referenced by get_pin(), and PLearn::StdPStreamBuf::rawin().

PStream PLearn::pio = get_pio()

Definition at line 119 of file PStream.cc.

Referenced by get_pio().

const int PLearn::pl_dftbuflen = 4096

Definition at line 53 of file pl_fdstream.h.

Referenced by PLearn::pl_fdstream::attach().

double PLearn::pl_gammln_cof[7] [static]
Initial value:
{ 1.000000000190015     ,
                                 76.18009172947146     ,
                                 -86.50532032941677     ,
                                 24.01409824083091     ,
                                 -1.231739572450155    ,
                                 0.1208650973866179e-2,
                                 -0.5395239384953e-5   }

Definition at line 51 of file pl_erf.cc.

Referenced by pl_dgammlndz(), and pl_gammln().

Definition at line 261 of file pl_erf.cc.

Definition at line 42 of file pl_hash_fun.cc.

Referenced by hashbytes().

Definition at line 71 of file pl_math.cc.

const char* PLearn::plide_code = "from plearn.plide.plide import *\n"

Definition at line 234 of file Plide.cc.

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

PStream PLearn::pnull = get_pnull()

Definition at line 73 of file PStream.cc.

Referenced by get_pnull(), and setNullPout().

PStream PLearn::pout = get_pout()

Definition at line 103 of file PStream.cc.

Referenced by PLearn::ReorderByMissingVMatrix::build_(), PLearn::RemoveDuplicateVMatrix::build_(), PLearn::RegressionTreeRegisters::build_(), PLearn::PyPLearnScript::build_(), PLearn::ModuleTester::build_(), PLearn::RBMTrainer::CD1(), PLearn::RBMModule::computePartitionFunction(), PLearn::KernelProjection::forget(), PLearn::LogVariable::fprop(), PLearn::KLp0p1RBMModule::fprop(), get_pout(), global_options(), PLearn::HelpCommand::helpAboutPLearnScript(), PLearn::HelpCommand::helpAboutPyPLearnScript(), PLearn::HelpCommand::helpCommands(), PLearn::HelpCommand::helpDatasets(), PLearn::HelpCommand::helpOverview(), PLearn::HelpCommand::helpScripts(), interactiveDisplayCDF(), PLearn::ICP::iterate(), PLearn::ICP::iterativeReweight(), PLearn::GaussMix::kmeans(), main(), PLearn::RBMTrainer::NLL(), PLearn::TupleTest::perform(), PLearn::TMatTest::perform(), PLearn::RowBufferedVMatrixTest::perform(), PLearn::PLStringutilsTest::perform(), PLearn::ObjectGraphIteratorTest::perform(), PLearn::MaxSubsamplingTest::perform(), PLearn::InstanceSnippetTest::perform(), PLearn::FileVMatrixTest::perform(), PLearn::ConjRosenbrock::perform(), plotVMats(), print_diff(), printDistanceStatistics(), PLearn::UnfoldedFuncVariable::printInfo(), PLearn::UnaryVariable::printInfo(), PLearn::SumOfVariable::printInfo(), PLearn::SourceVariable::printInfo(), PLearn::ObjectOptionVariable::printInfo(), PLearn::NaryVariable::printInfo(), PLearn::BinaryVariable::printInfo(), PLearn::StdPStreamBuf::rawout(), readAndMacroProcess(), PLearn::SurfaceMesh::readVRMLIndexedFaceSet(), PLearn::SurfaceMesh::readVRMLIndexedLineSet(), PLearn::RBMTrainer::recError(), PLearn::TestSnippet::recTest(), PLearn::TestSnippet::recTest2(), PLearn::TestSnippet::recTestCrash(), PLearn::VMatViewCommand::run(), PLearn::VerifyGradientCommand::run(), PLearn::TestClientCommand::run(), PLearn::StatsCommand::run(), PLearn::ServerCommand::run(), PLearn::Redirect::run(), PLearn::ReadAndWriteCommand::run(), PLearn::RBMTrainer::run(), PLearn::PLearnServer::run(), PLearn::ICP::run(), PLearn::HelpCommand::run(), PLearn::DiffCommand::run(), PLearn::VMatrix::saveCMAT(), PLearn::VMatrix::savePMAT(), setNullPout(), setPoutToPerr(), PLearn::WPLS::train(), PLearn::NNet::train(), PLearn::NatGradSMPNNet::train(), PLearn::LLC::train(), PLearn::KernelProjection::train(), PLearn::GaussMix::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::VariableSelectionWithDirectedGradientDescent::verbose(), PLearn::RegressionTree::verbose(), vmatmain(), PLearn::SurfaceMesh::writeVRMLBoundaries(), PLearn::SurfaceMesh::writeVRMLFile(), PLearn::SurfaceMesh::writeVRMLIndexedFaceSet(), and PLearn::SurfaceMesh::writeVRMLIndexedLineSet().

PObjectPool<PyMethodDef> PLearn::pyfuncs(50) [static]
TriType PLearn::r1_table[3][3] [static]
Initial value:

Definition at line 791 of file geometry.cc.

Referenced by closestPointOnTriangle().

TriType PLearn::r2_table[3][5] [static]
Initial value:

Definition at line 796 of file geometry.cc.

Referenced by closestPointOnTriangle().

Initial value:
 
{
    {"#an",     NT_CARDINAL + NT_PREFIXED },
    {"#n",      NT_CARDINAL               },
    {"#na",     NT_CARDINAL + NT_SUFFIXED },
    {"#ar",     NT_RANGE + NT_PREFIXED },
    {"#r",      NT_RANGE               },
    {"#ra",     NT_RANGE + NT_SUFFIXED },
    {"#n'a",    NT_ORDINAL  + NT_SUFFIXED },
    {"#ao",     NT_ORDINAL  + NT_PREFIXED },
    {"#o",      NT_ORDINAL                },
    {"#oa",     NT_ORDINAL  + NT_SUFFIXED },
    {"#o'a",    NT_ORDINAL  + NT_SUFFIXED },
    {"#$n",     NT_CURRENCY               },
    {"#$na",    NT_CURRENCY + NT_SUFFIXED },
    {"#$r",     NT_CURRENCY + NT_RANGE    },
    {"#$ra",    NT_CURRENCY + NT_RANGE + NT_SUFFIXED },
    {"#n:n",    NT_TIME },
    {"#n:n:n",  NT_TIME },
    {"#r:n",    NT_CODE },
    {"#n:r",    NT_CODE },
    {"",  NT_UNKNOWN_NUMERIC_TYPE}
}

Definition at line 89 of file TypesNumeriques.h.

Referenced by numericType().

const JTime PLearn::SMALL_TIME = 1./(24*60*60*1000)

Smallest valid increment (= 1/1000 second).

Definition at line 80 of file Calendar.h.

Definition at line 60 of file StatsCollector.cc.

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

const real PLearn::SQRT_ABSOLUTE_TOLERANCE = sqrt(ABSOLUTE_TOLERANCE) [static]

Definition at line 59 of file StatsCollector.cc.

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

Definition at line 58 of file pl_math.cc.

Referenced by fasttanh(), and PLearn::PLMathInitializer::PLMathInitializer().

const char* PLearn::test_objects[]
Initial value:
 {
    "Z(sub_objects = [])",

    "Z(sub_objects = [X(name=\"X1\"),          \n"
    "                 *1->X(name=\"X2\"),      \n"
    "                 Y(name=\"Y3\"),          \n"
    "                 *1,                      \n"
    "                 *2->Y(name=\"Y5\"),      \n"
    "                 X(name=\"X6\",           \n"
    "                   child = X(child = Y(name = \"innerY\"))) \n"
    "                 *2])"
}

Definition at line 239 of file ObjectGraphIteratorTest.cc.

Referenced by PLearn::ObjectGraphIteratorTest::perform().

int32_t PLearn::the_seed = 0 [static]

Definition at line 55 of file random.cc.

Referenced by gaussian_01(), get_seed(), manual_seed(), and uniform_sample().

Definition at line 221 of file ParentableObject.h.

string PLearn::vmat_view_dataset [static]

The specification of the dataset viewed by the vmat program.

Definition at line 46 of file vmatmain.h.

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines