PLearn 0.1
Public Member Functions | Private Types
PLearn::SDBVMFieldAsIs Class Reference

Pass through the value within the SDB (after conversion to real of the underlying SDB type) More...

#include <SDBVMat.h>

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

List of all members.

Public Member Functions

 SDBVMFieldAsIs (SDBVMSource source, 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.

Private Types

typedef SDBVMFieldSource1 inherited

Detailed Description

Pass through the value within the SDB (after conversion to real of the underlying SDB type)

Definition at line 333 of file SDBVMat.h.


Member Typedef Documentation

Reimplemented from PLearn::SDBVMFieldSource1.

Definition at line 335 of file SDBVMat.h.


Constructor & Destructor Documentation

PLearn::SDBVMFieldAsIs::SDBVMFieldAsIs ( SDBVMSource  source,
real  missing_values_mapping = MISSING_VALUE 
) [inline]

Definition at line 338 of file SDBVMat.h.

        : inherited(source,missing_values_mapping,VMField::Continuous) {}

Member Function Documentation

void PLearn::SDBVMFieldAsIs::convertField ( const SDBWithStats sdb,
const Row theRow,
const Vec outputField 
) 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 295 of file SDBVMat.cc.

References PLearn::SDBVMField::convertMissing(), PLearn::SDBVMSource::getValue(), and PLearn::SDBVMFieldSource1::source_.

{
    output[0] = real(source_.getValue(sdb,row));
    convertMissing(output);
}

Here is the call graph for this function:

int PLearn::SDBVMFieldAsIs::fieldWidth ( ) const [virtual]

Width that the field occupies in the VMat.

Implements PLearn::SDBVMField.

Definition at line 302 of file SDBVMat.cc.

{
    return 1;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines