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

PLearn::DatedVMatrix Class Reference

#include <DatedVMatrix.h>

Inheritance diagram for PLearn::DatedVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DatedVMatrix ()
 DatedVMatrix (int width, int length)
virtual VMat subDistrRelativeDates (int first, int n, const string &units)=0
virtual VMat subDistrAbsoluteUnits (int year, int month, int day, int n_units, const string &units)=0
virtual int lengthInDates (const string &units)=0
 return "size" in the given units (e.g. interval in years, months, etc...)

virtual int positionOfRelativeDate (int first, const string &units)=0
 return row position of example whose relative date is the first with the given (relative) value, in the given time units

virtual int nDateFields ()=0
 return the number of real fields required to specify a date

virtual void copyDatesOfRows (int from_row, int n_rows, Mat &dates)=0
 copy the date fields for the relative positions starting at the given row position for the given number of rows, into the given matrix

virtual Vec copyRowDataAndDate (int row, int &year, int &month, int &day)=0
virtual void copyDateOfRow (int row, int &year, int &month, int &day)=0
 PLEARN_DECLARE_ABSTRACT_OBJECT (DatedVMatrix)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().


Static Public Member Functions

void declareOptions (OptionList &ol)
 redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)


Private Types

typedef VMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Detailed Description

A distribution to which some dates (or more generally time stamps) have been associated to each data row. Special methods then allow to take sub-distributions for particular intervals of dates. This is an abstract class: subclasses specify what time units are available and the semantics of date intervals.

Definition at line 59 of file DatedVMatrix.h.


Member Typedef Documentation

typedef VMatrix PLearn::DatedVMatrix::inherited [private]
 

Reimplemented from PLearn::VMatrix.

Reimplemented in PLearn::YMDDatedVMatrix.

Definition at line 61 of file DatedVMatrix.h.


Constructor & Destructor Documentation

PLearn::DatedVMatrix::DatedVMatrix  )  [inline]
 

Definition at line 67 of file DatedVMatrix.h.

PLearn::DatedVMatrix::DatedVMatrix int  width,
int  length
[inline]
 

Definition at line 69 of file DatedVMatrix.h.


Member Function Documentation

void PLearn::DatedVMatrix::build  )  [virtual]
 

Should call simply inherited::build(), then this class's build_().

This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::VMatrix.

Reimplemented in PLearn::YMDDatedVMatrix.

Definition at line 56 of file DatedVMatrix.cc.

References build_().

void PLearn::DatedVMatrix::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::VMatrix.

Reimplemented in PLearn::YMDDatedVMatrix.

Definition at line 63 of file DatedVMatrix.cc.

Referenced by build().

virtual void PLearn::DatedVMatrix::copyDateOfRow int  row,
int year,
int month,
int day
[pure virtual]
 

Implemented in PLearn::YMDDatedVMatrix.

virtual void PLearn::DatedVMatrix::copyDatesOfRows int  from_row,
int  n_rows,
Mat dates
[pure virtual]
 

copy the date fields for the relative positions starting at the given row position for the given number of rows, into the given matrix

Implemented in PLearn::YMDDatedVMatrix.

virtual Vec PLearn::DatedVMatrix::copyRowDataAndDate int  row,
int year,
int month,
int day
[pure virtual]
 

Implemented in PLearn::YMDDatedVMatrix.

void PLearn::DatedVMatrix::declareOptions OptionList ol  )  [static]
 

redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)

ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); }

Reimplemented from PLearn::VMatrix.

Reimplemented in PLearn::YMDDatedVMatrix.

Definition at line 50 of file DatedVMatrix.cc.

References PLearn::OptionList.

virtual int PLearn::DatedVMatrix::lengthInDates const string units  )  [pure virtual]
 

return "size" in the given units (e.g. interval in years, months, etc...)

Implemented in PLearn::YMDDatedVMatrix.

virtual int PLearn::DatedVMatrix::nDateFields  )  [pure virtual]
 

return the number of real fields required to specify a date

Implemented in PLearn::YMDDatedVMatrix.

PLearn::DatedVMatrix::PLEARN_DECLARE_ABSTRACT_OBJECT DatedVMatrix   ) 
 

virtual int PLearn::DatedVMatrix::positionOfRelativeDate int  first,
const string units
[pure virtual]
 

return row position of example whose relative date is the first with the given (relative) value, in the given time units

Implemented in PLearn::YMDDatedVMatrix.

virtual VMat PLearn::DatedVMatrix::subDistrAbsoluteUnits int  year,
int  month,
int  day,
int  n_units,
const string units
[pure virtual]
 

this one calls one of subDistrRelative{Years,Months,Days} according to wether units=="years", "months", or "days" (or if the first letter matches, irrespective of upper/lower case distinctions)

Implemented in PLearn::YMDDatedVMatrix.

virtual VMat PLearn::DatedVMatrix::subDistrRelativeDates int  first,
int  n,
const string units
[pure virtual]
 

this one calls one of subDistrRelative{Years,Months,Days} according to wether units=="years", "months", or "days" (or if the first letter matches, irrespective of upper/lower case distinctions)

Implemented in PLearn::YMDDatedVMatrix.


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