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

PLearn::SDBVMFieldFunc1 Class Reference

#include <SDBVMat.h>

Inheritance diagram for PLearn::SDBVMFieldFunc1:

Inheritance graph
[legend]
Collaboration diagram for PLearn::SDBVMFieldFunc1:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SDBVMFieldFunc1 (SDBVMSource source, Func func, real missing_values_mapping=MISSING_VALUE)
virtual void convertField (const SDBWithStats &sdb, const Row &row, const Vec &output) const
virtual int fieldWidth () const
 Width that the field occupies in the VMat.


Protected Attributes

Func func_

Private Types

typedef SDBVMFieldSource1 inherited

Detailed Description

Apply a one-input func to the field: call operator()(const Vec& input) of the func, with the input vector set to the single value resulting from the conversion of the SDB field to a Real. The vector output by the func is kept completely in the output; in other words, fieldWidth() is equal to the size of the vector returned by the func.

Definition at line 454 of file SDBVMat.h.


Member Typedef Documentation

typedef SDBVMFieldSource1 PLearn::SDBVMFieldFunc1::inherited [private]
 

Reimplemented from PLearn::SDBVMFieldSource1.

Definition at line 456 of file SDBVMat.h.


Constructor & Destructor Documentation

PLearn::SDBVMFieldFunc1::SDBVMFieldFunc1 SDBVMSource  source,
Func  func,
real  missing_values_mapping = MISSING_VALUE
[inline]
 

Definition at line 459 of file SDBVMat.h.


Member Function Documentation

void PLearn::SDBVMFieldFunc1::convertField const SDBWithStats sdb,
const Row row,
const Vec output
const [virtual]
 

Given a database row, convert the appropriate parts to a (preallocated) output vector of the correct width (given by fieldWidth). Replace MISSING_VALUEs by missing_values_mapping.

Implements PLearn::SDBVMField.

Definition at line 404 of file SDBVMat.cc.

References func_, PLearn::SDBVMSource::getValue(), and PLearn::Vec.

int PLearn::SDBVMFieldFunc1::fieldWidth  )  const [virtual]
 

Width that the field occupies in the VMat.

Implements PLearn::SDBVMField.

Definition at line 413 of file SDBVMat.cc.

References func_.


Member Data Documentation

Func PLearn::SDBVMFieldFunc1::func_ [mutable, protected]
 

Definition at line 469 of file SDBVMat.h.

Referenced by convertField(), and fieldWidth().


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