PLearn 0.1
Functions | Variables
test_ProcessingGlobalCalendars.cc File Reference
#include <plearn/misc/Calendar.h>
#include <plearn/vmat/ProcessingVMatrix.h>
#include <plearn/io/openString.h>
Include dependency graph for test_ProcessingGlobalCalendars.cc:

Go to the source code of this file.

Functions

int main ()

Variables

string calendar_name = "1"
string vpl_prg = "1 @date date2julian previncal julian2date :previncal\n"
string cal_dates = "[20040101 20040624 20041225]"
string test_dates = "9 1 [1031231 1040101 1040102 1040623 1040625 1041224 1041225 1041216 1050101]"

Detailed Description

Definition in file test_ProcessingGlobalCalendars.cc.


Function Documentation

int main ( )

Definition at line 61 of file test_ProcessingGlobalCalendars.cc.

References cal_dates, PLearn::Calendar::makeCalendar(), PLearn::openString(), PLearn::PStream::plearn_ascii, PLearn::Calendar::setGlobalCalendar(), test_dates, and vpl_prg.

{
    PStream cal_stream = openString(cal_dates, PStream::plearn_ascii);
    PStream test_stream= openString(test_dates,PStream::plearn_ascii);

    Vec cal_timestamps;
    Mat test_dates_mat;
    cal_stream  >> cal_timestamps;
    test_stream >> test_dates_mat;

    // Install global calendar
    PCalendar cal = Calendar::makeCalendar(cal_timestamps);
    Calendar::setGlobalCalendar("1", cal);

    // Create source data
    VMat source_data(test_dates_mat);
    source_data->declareField(0,"date");

    // Create processing vmatrix
    PP<ProcessingVMatrix> ProcVM = new ProcessingVMatrix(source_data,
                                                         vpl_prg);
    ProcVM->saveAMAT("test_ProcessingGlobalCalendars_output.amat");
    return 0;
}

Here is the call graph for this function:


Variable Documentation

string cal_dates = "[20040101 20040624 20041225]"

Definition at line 56 of file test_ProcessingGlobalCalendars.cc.

Referenced by main().

string calendar_name = "1"
string test_dates = "9 1 [1031231 1040101 1040102 1040623 1040625 1041224 1041225 1041216 1050101]"

Definition at line 58 of file test_ProcessingGlobalCalendars.cc.

Referenced by main().

string vpl_prg = "1 @date date2julian previncal julian2date :previncal\n"

Definition at line 51 of file test_ProcessingGlobalCalendars.cc.

Referenced by main().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines