Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

ListBatch.h

Go to the documentation of this file.
00001 #ifndef LISTBATCH_H
00002 #define LISTBATCH_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "TSFArray.h"
00007 #include "DenseSerialVector.h"
00008 #include "TSFSmartPtr.h"
00009 #include "ListBatchBase.h"
00010 
00011 
00012 
00013 namespace Sundance
00014 {
00015 
00016   using namespace TSF;
00017   using std::string;
00018 
00019   using std::ostream;
00020 
00021   /** \ingroup UserLevelSymbolics
00022    * ListBatch represents the value of a list-structured expr at a batch
00023    * of points.
00024    */
00025   class ListBatch
00026     {
00027     public:
00028 
00029       /** \name User-level methods */
00030       //@{
00031       /** no detailed doc */
00032       ListBatch();
00033       /** */
00034       ListBatch(ListBatchBase* ptr);
00035       /** */
00036       ListBatch(const DenseSerialVector& v);
00037       /** */
00038       ListBatch(const ListBatch& v1, const ListBatch& v2);
00039       /** */
00040       ListBatch(const ListBatch& v1, const ListBatch& v2,
00041                 const ListBatch& v3);
00042       /** */
00043       ListBatch(const ListBatch& v1, const ListBatch& v2,
00044                 const ListBatch& v3, const ListBatch& v4);
00045       /** */
00046       ListBatch(const TSFArray<ListBatch>& data);
00047 
00048       /** */
00049       int listLength() const ;
00050       /** */
00051       int listSize() const ;
00052       /** */
00053       int nPoints() const ;
00054 
00055       /** */
00056       ListBatch append(const ListBatch& other) const ;
00057       /** */
00058       const DenseSerialVector& value() const ;
00059       /** */
00060       const DenseSerialVector& value(const TSFArray<int>& indicies) const ;
00061       /** */
00062       ExprValue sliceAt(int i) const ;
00063       /** */
00064       ExprValue sum(const DenseSerialVector& weights) const ;
00065 
00066       /** */
00067       const ListBatch& operator[](int i) const ;
00068       /** */
00069       ListBatch& operator[](int i);
00070 
00071       /** */
00072       friend ListBatch join(const ListBatch& L1, const ListBatch& L2);
00073       //@}
00074     private:
00075       TSFSmartPtr<ListBatchBase> ptr_;
00076     };
00077 
00078   /** \relates ListBatch
00079    * create a list
00080    */
00081   inline ListBatch List(const ListBatch& L1, const ListBatch& L2)
00082     {
00083       return ListBatch(L1, L2);
00084     }
00085 
00086   /** \relates ListBatch
00087    * create a list
00088    */
00089   inline ListBatch List(const ListBatch& L1, const ListBatch& L2,
00090                         const ListBatch& L3)
00091     {
00092       return ListBatch(L1, L2, L3);
00093     }
00094 
00095   /** \relates ListBatch
00096    * create a list
00097    */
00098   inline ListBatch List(const ListBatch& L1, const ListBatch& L2,
00099                         const ListBatch& L3, const ListBatch& L4)
00100     {
00101       return ListBatch(L1, L2, L3, L4);
00102     }
00103 
00104 
00105 
00106 
00107 }
00108 #endif
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by