PLearn 0.1
|
#include <plearn/misc/Calendar.h>
#include <plearn/vmat/ProcessingVMatrix.h>
#include <plearn/io/openString.h>
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]" |
Definition in file test_ProcessingGlobalCalendars.cc.
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; }
string cal_dates = "[20040101 20040624 20041225]" |
Definition at line 56 of file test_ProcessingGlobalCalendars.cc.
Referenced by main().
string calendar_name = "1" |
Definition at line 50 of file test_ProcessingGlobalCalendars.cc.
Referenced by PLearn::Calendar::setGlobalCalendar().
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().
Definition at line 51 of file test_ProcessingGlobalCalendars.cc.
Referenced by main().