00001 #ifndef LISTLISTBATCH_H 00002 #define LISTLISTBATCH_H 00003 00004 #include "SundanceDefs.h" 00005 00006 #include "ListBatch.h" 00007 00008 00009 namespace Sundance 00010 { 00011 00012 using namespace TSF; 00013 using std::string; 00014 00015 using std::ostream; 00016 00017 /** \ingroup LowLevelSymbolics 00018 * A batch of values of list-valued expressions. 00019 */ 00020 00021 class ListListBatch : public ListBatchBase 00022 { 00023 public: 00024 /** \name Developer-only methods */ 00025 //@{ 00026 /** no detailed docs */ 00027 ListListBatch(const ListBatch& v1); 00028 /** */ 00029 ListListBatch(const ListBatch& v1, const ListBatch& v2); 00030 /** */ 00031 ListListBatch(const ListBatch& v1, const ListBatch& v2, const ListBatch& v3); 00032 /** */ 00033 ListListBatch(const ListBatch& v1, const ListBatch& v2, const ListBatch& v3, 00034 const ListBatch& v4); 00035 /** */ 00036 ListListBatch(const TSFArray<ListBatch>& lists); 00037 00038 /** */ 00039 virtual ~ListListBatch(){;} 00040 00041 /** */ 00042 virtual int listLength() const {return data_.length();} 00043 /** */ 00044 virtual int nPoints() const {return data_[0].nPoints();} 00045 /** */ 00046 virtual int listSize() const ; 00047 /** */ 00048 virtual ExprValue sliceAt(int i) const ; 00049 /** */ 00050 virtual ExprValue sum(const DenseSerialVector& weights) const ; 00051 00052 /** */ 00053 virtual const ListBatch& listElement(int i) const {return data_[i];} 00054 /** */ 00055 virtual ListBatch& listElement(int i) {return data_[i];} 00056 //@} 00057 private: 00058 TSFArray<ListBatch> data_; 00059 }; 00060 00061 00062 00063 00064 } 00065 #endif