ClockWork DB CoreAPI 1.0.48
Abstract Time Series and Storage/Management Library
Loading...
Searching...
No Matches
sparse_series.hpp
1#ifndef HAVE_TOM__SPARSE_SERIES_HPP
2#define HAVE_TOM__SPARSE_SERIES_HPP
3
4#include <map>
5#include <tom-util/time_series.hpp>
6
7// template specialization for ordering timespec structs
8// used by the nano_sparse_series_impl<T> : sparse_series class
9template <>
10struct std::less<timespec>
11{
12 bool
13 operator()( const timespec & lhs, const timespec & rhs ) const {
14 if ( lhs.tv_sec < rhs.tv_sec ) return true;
15 if ( lhs.tv_sec > rhs.tv_sec ) return false;
16 if ( lhs.tv_nsec < rhs.tv_nsec ) return true;
17 return false;
18 }
19};
20
21
22namespace { // anonymous namespace
23
25 timespec2date( const timespec & ts )
26 {
27 struct tm tm1;
28 localtime_r( & ts.tv_sec, & tm1 );
29 return tom::calendars::date( tm1.tm_year + 1900, tm1.tm_mon + 1, tm1.tm_mday );
30
31 }
32 tom::calendars::date_int_type
33 timespec2date_int_type( const timespec & ts, tom::calendars::calendar &cal )
34 {
35 return cal( timespec2date( ts ) );
36 }
37
38} // end anonymous namespace
39
40namespace tom {
41
42namespace collections {
43
44using namespace tom::calendars;
45
46template <typename ContainerT>
48{
49public:
50 typedef ContainerT value_type;
51 typedef typename value_type::const_iterator iterator;
52
53 // pass the end iter, so we don't go past end
54 standard_sparse_series_iterator ( time_series &ts, iterator iter, iterator begin, iterator end ) :
55 m_ts( ts ), m_iter(iter), m_iter_begin(begin), m_iter_end(end)
56 { }
57
58 virtual
60
61 virtual
63 operator++() { if ( m_iter != m_iter_end ) ++m_iter; return *this; }
64
65 virtual
67 operator++(int) { if ( m_iter != m_iter_end ) m_iter++; return *this; }
68
69 virtual
71 operator--() { if ( m_iter != m_iter_begin ) --m_iter; return *this; }
72
73 virtual
75 operator--(int) { if ( m_iter != m_iter_begin ) m_iter--; return *this; }
76
77 virtual
78 bool
79 operator==( const tom::collections::time_series_iterator& rhs) const
80 {
81 return rhs.get_calendar() == get_calendar() &&
82 rhs.get_date_int() == get_date_int();
83 }
84
85 virtual
86 bool
87 operator!=( const tom::collections::time_series_iterator& rhs) const
88 {
89 return ! ( *this == rhs );
90 }
91
92 virtual
93 const observation &
94 operator*() const
95 {
96 return m_ts.get_observation( m_iter->first );
97 }
98
99 virtual
100 const observation &
101 operator->() const
102 {
103 return m_ts.get_observation( m_iter->first );
104 }
105
106 virtual
107 date
108 get_date() const { return get_calendar()( get_date_int() ); }
109
110 virtual
111 date_int_type
112 get_date_int() const
113 {
114 if ( m_iter != m_iter_end )
115 return m_iter->first;
116 else
117 return 0;
118 }
119
120 virtual
121 timespec
122 get_timespec() const
123 {
124 date d = get_date();
125 struct tm tm;
126 tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
127 tm.tm_year = d.year() - 1900;
128 tm.tm_mon = d.month();
129 tm.tm_mday = d.day();
130 struct timespec spec {0,0};
131 spec.tv_sec = mktime( &tm );
132 spec.tv_nsec = 0;
133 return spec;
134 }
135
136 virtual
137 calendar &
138 get_calendar() const { return m_ts.get_calendar(); }
139
140protected:
141 time_series & m_ts;
142 iterator m_iter;
143 iterator m_iter_begin;
144 iterator m_iter_end;
145};
146
147/*
148 * CLASS: sparse_series
149 *
150 *
151 *
152 *
153 *
154*/
156{
157public:
158 sparse_series( calendar &c ) : m_calendar( c ),
159 m_ignore_missing_values(false), m_ignore_same_values(true),
160 m_fill_forward(true) { }
161
162 sparse_series( calendar &c, bool ignore_same_value, bool ignore_missing_value ) :
163 m_calendar( c ),
164 m_ignore_missing_values( ignore_missing_value ),
165 m_ignore_same_values(ignore_same_value),
166 m_fill_forward( true ) { }
167
168 sparse_series( calendar &c, bool ignore_same_value, bool ignore_missing_value,
169 bool fill_forward ) :
170 m_calendar( c ),
171 m_ignore_missing_values( ignore_missing_value ),
172 m_ignore_same_values(ignore_same_value),
173 m_fill_forward( fill_forward ) { }
174
175 virtual ~sparse_series() { }
176
177 virtual
178 void
179 set_observation( date_int_type d, const observation & val ) = 0;
180
181 // this should suffice for any derived classes, and anyone who
182 // needs can just override it...who me? ( I do just that for efficiency in
183 // the sparse_series_impl<> class... )
184 virtual
185 void
186 set_observation( date d, const observation & val )
187 {
188 set_observation( get_calendar()(d), val );
189 }
190 // provide specific handlers for dates since they will need to
191 // be properly converted if time-series hold date_interval_observation
192 // values...which most(ALL!) date series will!
193 virtual void set_observation( date_int_type d, const Date & ) = 0;
194 virtual void set_observation( date d, const Date & ) = 0;
195
196 virtual
198 get_calendar() const { return m_calendar; }
199
200 void
201 set_ignore_missing_values( bool b )
202 { m_ignore_missing_values = b; }
203
204 bool
205 get_ignore_missing_values( ) const
206 { return m_ignore_missing_values; }
207
208 void
209 set_ignore_same_values( bool b )
210 { m_ignore_same_values = b; }
211
212 bool
213 get_ignore_same_values() const
214 { return m_ignore_same_values; }
215
216 bool
217 get_fill_forward() const
218 { return m_fill_forward; }
219
220 void
221 set_fill_forward( bool b )
222 { m_fill_forward = b; }
223
224 // useful helpers for native formats
225
226 // native float setters
227 void set_observation( date_int_type d, float f )
228 { set_observation( d, static_cast<const observation &>( Float(f) )); }
229 void set_observation( date d, float f )
230 { set_observation(get_calendar()( d ), static_cast<const observation &>( Float(f) )); }
231
232 // native double setters
233 void set_observation( date_int_type d, double f )
234 { set_observation(d, static_cast<const observation &>( Double(f) )); }
235 void set_observation( date d, double f )
236 { set_observation( get_calendar()( d ), static_cast<const observation &>( Double(f) )); }
237
238 // native std::string setters
239 void set_observation( date_int_type d, const std::string &f )
240 { set_observation(d, static_cast<const observation &>( String(f) ) ); }
241 void set_observation( date d, const std::string &f )
242 { set_observation(get_calendar()( d ), static_cast<const observation &>( String(f) ) ); }
243
244 // native const char * setters
245 void set_observation( date_int_type d, const char *f )
246 { set_observation(d, static_cast<const observation &>( String(f) )); }
247 void set_observation( date d, const char *f )
248 { set_observation( get_calendar()( d ), static_cast<const observation &>( String(f) )); }
249
250 // native int setters
251 void set_observation( date_int_type d, int f )
252 { set_observation(d, static_cast<const observation &>( Int(f) )); }
253 void set_observation( date d, int f )
254 { set_observation( get_calendar()( d ), static_cast<const observation &>( Int(f) )); }
255
256 // native bool setters
257 void set_observation( date_int_type d, bool f )
258 { set_observation(d, static_cast<const observation &>( Bool(f) ) ); }
259 void set_observation( date d, bool f )
260 { set_observation( get_calendar()( d ), static_cast<const observation &>( Bool(f) ) ); }
261
262 // native category_type setters
263 void set_observation( date_int_type d,
265 { set_observation(d, static_cast<const observation &>( Int(f) ) ); }
266 void set_observation( date d, tom::value_type f )
267 { set_observation( get_calendar()( d ), static_cast<const observation &>( Int(f) ) ); }
268
269protected:
270 calendar & m_calendar;
271 bool m_ignore_missing_values;
272 bool m_ignore_same_values;
273 bool m_fill_forward;
274};
275
276/*
277 * CLASS: sparse_series_impl<T>
278 *
279 *
280 *
281 *
282 *
283*/
284template <typename T>
285class TOM_UTIL_API sparse_series_impl : public sparse_series,
286 private std::map<date_int_type, typename T::value_type, std::less<date_int_type> >
287{
288public:
289 typedef T value_type;
290 typedef typename std::map<date_int_type, typename T::value_type, std::less<date_int_type> >
291 map_type;
292 typedef typename map_type::pointer pointer;
293 typedef typename map_type::reference reference;
294 typedef typename map_type::difference_type difference_type;
295 typedef std::random_access_iterator_tag iterator_category;
296
297 typedef typename map_type::iterator iterator;
298 typedef typename map_type::const_iterator const_iterator;
299
301 sparse_series( cal ), map_type() { }
302
303 sparse_series_impl( calendar &cal, bool ignore_same_value, bool ignore_missing_value,
304 bool fill_forward ) :
305 sparse_series( cal, ignore_same_value, ignore_missing_value, fill_forward ), map_type() { }
306
307 template <typename Iter>
308 sparse_series_impl( calendar &cal, Iter begin, Iter end ) :
309 sparse_series( cal ), map_type( begin, end ){ }
310
311 template <typename Iter>
312 sparse_series_impl( calendar &cal, bool ignore_same_value, bool ignore_missing_value,
313 Iter begin, Iter end ) :
314 sparse_series( cal, ignore_same_value, ignore_missing_value ), map_type( begin, end ){ }
315
316 virtual ~sparse_series_impl() { }
317
318 virtual time_series_iterator &
319 begin() const
320 {
322 const_cast<sparse_series_impl<T> &>(*this), real_begin(), real_begin(), real_end() );
323 }
324 virtual time_series_iterator &
325 end() const
326 {
328 const_cast<sparse_series_impl<T> &>(*this), real_end(), real_begin(), real_end() );
329 }
330
331 virtual
332 const observation &
333 get_observation( date_int_type d ) const
334 {
335 using namespace std;
336 if ( ! is_empty() && get_fill_forward() )
337 {
338 const_iterator it = this->map_type::upper_bound(d);
339 if ( it != real_begin() )
340 {
341 --it;
342 m_return_value = it->second;
343 return m_return_value;
344 }
345 else
346 return Int::HAS_NO_DATA;
347 }
348 else if ( ! is_empty() && ! get_fill_forward() )
349 {
350 const_iterator it = this->map_type::find(d);
351 if ( it != real_end() )
352 {
353 m_return_value = it->second;
354 return m_return_value;
355 }
356 else
357 return Int::HAS_NO_DATA;
358 }
359 else
360 return Int::HAS_NO_DATA; // ND in real life
361 }
362 virtual const observation &get_observation( const date d ) const;
363
364 void set_observation( const date_int_type d, const typename T::value_type & val );
365 void set_observation( const date d, const typename T::value_type & val );
366 void set_observation( const date_int_type d, tom::value_type val );
367 void set_observation( const date d, tom::value_type val );
368
369 void
370 set_observation_( date_int_type d, const T &v )
371 {
372 std::pair<iterator,bool> result = this->map_type::insert( typename map_type::value_type(d, v.value()) );
373 if ( ! result.second )
374 {
375 this->map_type::erase( result.first );
376 this->map_type::insert( typename map_type::value_type(d, v.value()) );
377 }
378 clean_missing_values();
379 clean_same_values();
380 }
381 virtual
382 void
383 set_observation( date d, const observation & val )
384 {
385 set_observation_( get_calendar()(d), T(val) );
386 }
387 virtual
388 void
389 set_observation( date_int_type d, const observation &val )
390 {
391 set_observation_( d, T(val) );
392 }
393 virtual void set_observation( date_int_type d, const Date &v )
394 {
395 set_observation_( d, T(v) );
396 }
397 virtual void set_observation( date d, const Date &v )
398 {
399 set_observation_( get_calendar()(d), T(v) );
400 }
401
402 virtual const observation & operator[ ]( const date_int_type d ) const ;
403 virtual observation & operator[ ]( const date_int_type d );
404 virtual const observation & operator[ ] ( const date d ) const ;
405 virtual observation & operator[ ] ( const date d ) ;
406
407 virtual std::ostream &print( std::ostream & ) const;
408
409 date_int_type
410 get_first_date_int() const
411 {
412 if ( is_empty() ) return 0;
413 const_iterator it = real_begin(); return it->first;
414 }
415
416 date_int_type
417 get_last_date_int() const
418 {
419 if ( is_empty() ) return 0;
420 const_iterator it = real_end(); it--; return it->first;
421 }
422
423 bool
424 is_empty() const
425 {
426 return this->map_type::empty();
427 }
428
429protected:
430
431 void
432 clean_same_values()
433 {
434 if ( ! get_ignore_same_values( ) )
435 return;
436
437 std::vector<date_int_type> getRidOfEm;
438 typename T::value_type prev = real_begin()->second;
439
440 for( const_iterator it = real_begin(); it != real_end(); it++)
441 {
442 if (it == real_begin())
443 {
444 prev = it->second;
445 }
446 else if(it->second == prev)
447 {
448 getRidOfEm.push_back(it->first);
449 }
450 prev = it->second;
451 }
452 for ( std::vector<date_int_type>::iterator it = getRidOfEm.begin();
453 it != getRidOfEm.end(); it++ )
454 this->map_type::erase(*it);
455
456 }
457 void
458 clean_missing_values()
459 {
460 if ( ! get_ignore_missing_values( ) )
461 return;
462
463 std::vector<date_int_type> deleteThem;
464
465 for ( const_iterator it = real_begin(); it != real_end(); it++)
466 if ( ! T(it->second).is_normal() )
467 deleteThem.push_back( it->first );
468
469 for ( std::vector<date_int_type>::iterator it = deleteThem.begin(); it != deleteThem.end(); it++ )
470 this->map_type::erase(*it);
471 }
472 iterator real_begin() { return this->map_type::begin(); }
473 iterator real_end() { return this->map_type::end(); }
474 const_iterator real_begin() const { return this->map_type::begin(); }
475 const_iterator real_end() const { return this->map_type::end(); }
476
477 private:
478 // This acts as a observation to be returned where one is needed
479 mutable value_type m_return_value;
480
481};
482
483template <typename T>
484inline
485const observation &
487{
488 date_int_type di = get_calendar()(d);
489 return this->get_observation( di );
490}
491
492template <typename T>
493inline
494void
495sparse_series_impl<T>::set_observation( const date_int_type d, const typename T::value_type & val )
496{
497 set_observation_( d , T(val) );
498};
499template <typename T>
500inline
501void
502sparse_series_impl<T>::set_observation( const date d, const typename T::value_type & val )
503{
504 set_observation_( get_calendar()( d ), T(val) );
505}
506template <typename T>
507inline
508void
509sparse_series_impl<T>::set_observation( const date_int_type d, tom::value_type val )
510{
511 set_observation_( d, T(val) );
512}
513template <typename T>
514inline
515void
516sparse_series_impl<T>::set_observation( const date d, tom::value_type val )
517{
518 set_observation_( get_calendar()( d ), T(val) );
519}
520
521template <typename T>
522const observation &
523sparse_series_impl<T>::operator[ ]( const date_int_type d ) const
524{
525 return get_observation(d);
526}
527template <typename T>
529sparse_series_impl<T>::operator[ ]( const date_int_type d )
530{
531 return *new value_type( get_observation(d) );
532}
533template <typename T>
534const observation &
535sparse_series_impl<T>::operator[ ] ( const date d ) const
536{
537 date_int_type di = get_calendar()(d);
538 return get_observation(di);
539}
540template <typename T>
542sparse_series_impl<T>::operator[ ] ( const date d )
543{
544 date_int_type di = get_calendar()(d);
545 return *new value_type( get_observation( di ) );
546}
547template <typename T>
548inline
549std::ostream &
550sparse_series_impl<T>::print( std::ostream & os) const
551{
552 calendar &cal = get_calendar();
553 if ( cal != ordinal_calendar::Instance() )
554 for( time_series_iterator &it = begin(); it != end(); it++ )
555 os << it.get_date() << ": " << *it << std::endl;
556 else
557 for( time_series_iterator &it = begin(); it != end(); it++ )
558 os << it.get_date_int() << ": " << *it << std::endl;
559
560 return os;
561}
562
563
564
565/*
566 * CLASS: nano_sparse_series_impl<T>
567 *
568 *
569 *
570 *
571 *
572*/
573template <typename T>
574class TOM_UTIL_API nano_sparse_series_impl : public sparse_series,
575 private std::map<timespec, typename T::value_type, std::less<timespec> >
576{
577public:
578 typedef T value_type;
579 typedef typename std::map<timespec, typename T::value_type, std::less<timespec> >
580 map_type;
581 typedef typename map_type::pointer pointer;
582 typedef typename map_type::reference reference;
583 typedef typename map_type::difference_type difference_type;
584 typedef std::random_access_iterator_tag iterator_category;
585
586 typedef typename map_type::iterator iterator;
587 typedef typename map_type::const_iterator const_iterator;
588
590 sparse_series( cal ), map_type() { }
591
592 nano_sparse_series_impl( calendar &cal, bool ignore_same_value, bool ignore_missing_value,
593 bool fill_forward ) :
594 sparse_series( cal, ignore_same_value, ignore_missing_value, fill_forward ), map_type() { }
595
596 template <typename Iter>
597 nano_sparse_series_impl( calendar &cal, Iter begin, Iter end ) :
598 sparse_series( cal ), map_type( begin, end ){ }
599
600 template <typename Iter>
601 nano_sparse_series_impl( calendar &cal, bool ignore_same_value, bool ignore_missing_value,
602 Iter begin, Iter end ) :
603 sparse_series( cal, ignore_same_value, ignore_missing_value ), map_type( begin, end ){ }
604
605 virtual ~nano_sparse_series_impl() { }
606
607 virtual time_series_iterator &
608 begin() const
609 {
611 const_cast<nano_sparse_series_impl<T> &>(*this), real_begin(), real_begin(), real_end() );
612 }
613 virtual time_series_iterator &
614 end() const
615 {
617 const_cast<nano_sparse_series_impl<T> &>(*this), real_end(), real_begin(), real_end() );
618 }
619
620 virtual
621 const observation &
622 get_observation( date_int_type d ) const
623 {
624 using namespace std;
625 if ( ! is_empty() && get_fill_forward() )
626 {
627 const_iterator it = this->map_type::upper_bound(d);
628 if ( it != real_begin() )
629 {
630 --it;
631 m_return_value = it->second;
632 return m_return_value;
633 }
634 else
635 return Int::HAS_NO_DATA;
636 }
637 else if ( ! is_empty() && ! get_fill_forward() )
638 {
639 const_iterator it = this->map_type::find(d);
640 if ( it != real_end() )
641 {
642 m_return_value = it->second;
643 return m_return_value;
644 }
645 else
646 return Int::HAS_NO_DATA;
647 }
648 else
649 return Int::HAS_NO_DATA; // ND in real life
650 }
651 virtual const observation &get_observation( const date d ) const;
652
653 void set_observation( const date_int_type d, const typename T::value_type & val );
654 void set_observation( const date d, const typename T::value_type & val );
655 void set_observation( const date_int_type d, tom::value_type val );
656 void set_observation( const date d, tom::value_type val );
657
658 void
659 set_observation_( date_int_type d, const T &v )
660 {
661 std::pair<iterator,bool> result = this->map_type::insert( typename map_type::value_type(d, v.value()) );
662 if ( ! result.second )
663 {
664 this->map_type::erase( result.first );
665 this->map_type::insert( typename map_type::value_type(d, v.value()) );
666 }
667 clean_missing_values();
668 clean_same_values();
669 }
670 virtual
671 void
672 set_observation( date d, const observation & val )
673 {
674 set_observation_( get_calendar()(d), T(val) );
675 }
676 virtual
677 void
678 set_observation( date_int_type d, const observation &val )
679 {
680 set_observation_( d, T(val) );
681 }
682 virtual void set_observation( date_int_type d, const Date &v )
683 {
684 set_observation_( d, T(v) );
685 }
686 virtual void set_observation( date d, const Date &v )
687 {
688 set_observation_( get_calendar()(d), T(v) );
689 }
690
691 virtual const observation & operator[ ]( const date_int_type d ) const ;
692 virtual observation & operator[ ]( const date_int_type d );
693 virtual const observation & operator[ ] ( const date d ) const ;
694 virtual observation & operator[ ] ( const date d ) ;
695
696 virtual std::ostream &print( std::ostream & ) const;
697
698 date_int_type
699 get_first_date_int() const
700 {
701 if ( is_empty() ) return 0;
702 const_iterator it = real_begin(); return it->first;
703 }
704
705 date_int_type
706 get_last_date_int() const
707 {
708 if ( is_empty() ) return 0;
709 const_iterator it = real_end(); it--; return it->first;
710 }
711
712 bool
713 is_empty() const
714 {
715 return this->map_type::empty();
716 }
717
718protected:
719
720 void
721 clean_same_values()
722 {
723 if ( ! get_ignore_same_values( ) )
724 return;
725
726 std::vector<date_int_type> getRidOfEm;
727 typename T::value_type prev;
728
729 for( const_iterator it = real_begin(); it != real_end(); it++)
730 {
731 if (it == real_begin())
732 {
733 prev = it->second;
734 }
735 else if(it->second == prev)
736 {
737 getRidOfEm.push_back(it->first);
738 }
739 prev = it->second;
740 }
741 for ( std::vector<date_int_type>::iterator it = getRidOfEm.begin();
742 it != getRidOfEm.end(); it++ )
743 this->map_type::erase(*it);
744
745 }
746 void
747 clean_missing_values()
748 {
749 if ( ! get_ignore_missing_values( ) )
750 return;
751
752 std::vector<date_int_type> deleteThem;
753
754 for ( const_iterator it = real_begin(); it != real_end(); it++)
755 if ( ! T(it->second).is_normal() )
756 deleteThem.push_back( it->first );
757
758 for ( std::vector<date_int_type>::iterator it = deleteThem.begin(); it != deleteThem.end(); it++ )
759 this->map_type::erase(*it);
760 }
761 iterator real_begin() { return this->map_type::begin(); }
762 iterator real_end() { return this->map_type::end(); }
763 const_iterator real_begin() const { return this->map_type::begin(); }
764 const_iterator real_end() const { return this->map_type::end(); }
765
766 private:
767 // This acts as a observation to be returned where one is needed
768 mutable value_type m_return_value;
769
770};
771
772template <typename T>
773inline
774const observation &
776{
777 date_int_type di = get_calendar()(d);
778 return this->get_observation( di );
779}
780
781template <typename T>
782inline
783void
784nano_sparse_series_impl<T>::set_observation( const date_int_type d, const typename T::value_type & val )
785{
786 set_observation_( d , T(val) );
787};
788template <typename T>
789inline
790void
791nano_sparse_series_impl<T>::set_observation( const date d, const typename T::value_type & val )
792{
793 set_observation_( get_calendar()( d ), T(val) );
794}
795template <typename T>
796inline
797void
798nano_sparse_series_impl<T>::set_observation( const date_int_type d, tom::value_type val )
799{
800 set_observation_( d, T(val) );
801}
802template <typename T>
803inline
804void
805nano_sparse_series_impl<T>::set_observation( const date d, tom::value_type val )
806{
807 set_observation_( get_calendar()( d ), T(val) );
808}
809
810template <typename T>
811const observation &
812nano_sparse_series_impl<T>::operator[ ]( const date_int_type d ) const
813{
814 return get_observation(d);
815}
816template <typename T>
818nano_sparse_series_impl<T>::operator[ ]( const date_int_type d )
819{
820 return *new value_type( get_observation(d) );
821}
822template <typename T>
823const observation &
824nano_sparse_series_impl<T>::operator[ ] ( const date d ) const
825{
826 date_int_type di = get_calendar()(d);
827 return get_observation(di);
828}
829template <typename T>
831nano_sparse_series_impl<T>::operator[ ] ( const date d )
832{
833 date_int_type di = get_calendar()(d);
834 return *new value_type( get_observation( di ) );
835}
836template <typename T>
837inline
838std::ostream &
839nano_sparse_series_impl<T>::print( std::ostream & os) const
840{
841 calendar &cal = get_calendar();
842 if ( cal != ordinal_calendar::Instance() )
843 for( time_series_iterator &it = begin(); it != end(); it++ )
844 os << it.get_date() << ": " << *it << std::endl;
845 else
846 for( time_series_iterator &it = begin(); it != end(); it++ )
847 os << it.get_date_int() << ": " << *it << std::endl;
848
849 return os;
850}
851
852} // end collections namespace
853} // end tom namespace
854
855#endif /*HAVE_TOM__SPARSE_SERIES_HPP*/
Definition dates.hpp:22
Definition string.hpp:15
Definition calendar.hpp:120
Definition calendar.hpp:47
Definition sparse_series.hpp:576
Definition sparse_series.hpp:287
Definition sparse_series.hpp:156
Definition time_series.hpp:157
Definition time_series.hpp:25
Definition observation.hpp:13
Definition scalar.hpp:19
Definition value_types.hpp:144