|
PLearn 0.1
|
verifies if the date within the row is greater than a threshold date More...
#include <SDBVMat.h>


Public Member Functions | |
| SDBVMFieldDateGreater (SDBVMSource source, PDate the_ref) | |
| 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. | |
| virtual real | getDiscreteValue (const SDBWithStats &sdb, const Row &row) const |
Protected Attributes | |
| PDate | ref |
Private Types | |
| typedef SDBVMFieldDiscrete | inherited |
verifies if the date within the row is greater than a threshold date
typedef SDBVMFieldDiscrete PLearn::SDBVMFieldDateGreater::inherited [private] |
Reimplemented from PLearn::SDBVMFieldDiscrete.
| PLearn::SDBVMFieldDateGreater::SDBVMFieldDateGreater | ( | SDBVMSource | source, |
| PDate | the_ref | ||
| ) | [inline] |
< true or false
Definition at line 672 of file SDBVMat.h.
: inherited(source),ref(the_ref) { setNumClasses(2); }
| void PLearn::SDBVMFieldDateGreater::convertField | ( | const SDBWithStats & | sdb, |
| const Row & | row, | ||
| const Vec & | output | ||
| ) | const [virtual] |
This function is implemented as a call to a virtual function getDiscreteValue(), followed by a call to setOutput of the OutputCoder.
Reimplemented from PLearn::SDBVMFieldDiscrete.
Definition at line 631 of file SDBVMat.cc.
References d, PLearn::SDBVMSource::getValue(), PLearn::PPointable::ref(), and PLearn::SDBVMFieldSource1::source_.

| int PLearn::SDBVMFieldDateGreater::fieldWidth | ( | ) | const [virtual] |
Width that the field occupies in the VMat.
Reimplemented from PLearn::SDBVMFieldDiscrete.
Definition at line 642 of file SDBVMat.cc.
{
return 1;
}
| real PLearn::SDBVMFieldDateGreater::getDiscreteValue | ( | const SDBWithStats & | sdb, |
| const Row & | row | ||
| ) | const [virtual] |
This function must be overridden in derived classes to get the correctly-mapped discrete value obtained from the SDB. The semantics prescribe missing values to be remapped to missing_values_mapping_.
Implements PLearn::SDBVMFieldDiscrete.
Definition at line 647 of file SDBVMat.cc.
References PLearn::SDBVMSource::getValue(), PLearn::FieldValue::isMissing(), PLearn::SDBVMField::missing_values_mapping_, PLearn::PPointable::ref(), PLearn::SDBVMFieldSource1::source_, and PLearn::FieldValue::toDate().
{
// WARNING: IS THIS CORRECT (Pascal?)
FieldValue v = source_.getValue(sdb,row);
if(v.isMissing())
return missing_values_mapping_;
return v.toDate()>ref ?1 :0;
}

PDate PLearn::SDBVMFieldDateGreater::ref [protected] |
1.7.4