My Project
ElementContainerArray.hh
00001 /*
00002 $Id: ElementContainerArray.hh 2295 2011-08-10 02:57:13Z jisuzuki $
00003 */
00004 
00005 
00006 #ifndef ELEMENTCONTAINERARRAY
00007 #define ELEMENTCONTAINERARRAY
00008 
00009 #include <stdio.h>
00010 #include <stdlib.h>
00011 
00012 #include "Header.hh"
00013 #include "NeutronVector.hh"
00014 #include "ElementContainer.hh"
00015 #include "NeutronReadBinaryData.hh"
00016 #include "NeutronWriteBinaryData.hh"
00017 #include "CppToPython.hh"
00018 #include "ElementContainerAppendError.hh"
00019 
00021 
00029 class ElementContainerArray 
00030   : public NeutronVector< ElementContainer, HeaderBase >
00031 {
00032 private:
00033   friend class ElementContainerMatrix;
00035 
00036 public:
00037   using NeutronVector< ElementContainer, HeaderBase >::operator();
00038 
00039   ElementContainerArray();
00045   ElementContainerArray( HeaderBase pheader );
00052   ElementContainerArray( const NeutronVector< ElementContainer, HeaderBase > &ob );
00053   // This copy constructor is very important from operators in NeutronVector
00054 
00055   /*
00056   ElementContainerArray &operator=
00057   ( const ElementContainerArray &ob );
00058   */
00059 
00060   ElementContainerArray( const ElementContainerArray &ob );
00061 
00062   vector<Double>* operator()( UInt4 index, string key );
00067   vector<Double>*   operator()( UInt4 index, UInt4 C_index );
00073   vector<UInt4> SaveToBinFile( string key, string FileName );
00085   PyObject *SaveToBinFilePy( string key, string FileName );
00092   void ReadBinFile( string FileName, vector<UInt4> dimensions, 
00093                     string key );
00103   void ReadBinFile( string FileName, PyObject *dimensions, 
00104                     string key );
00113   void AppendErr( string Counts, string Error, Double ErrorValue=0.0 );
00124   ElementContainerArray Mul( Double d );
00125   ElementContainerArray &MulMySelf( Double d );
00126   ElementContainerArray Mul( Double d, Double e );
00127   ElementContainerArray &MulMySelf( Double d, Double e );
00128   ElementContainerArray Mul( pair<Double,Double> &p ){ return Mul(p.first,p.second); }
00129   ElementContainerArray &MulMySelf( pair<Double,Double> &p ){ return MulMySelf(p.first,p.second); }
00130 
00131   ElementContainerArray Plus( Double d );
00132   ElementContainerArray &PlusMySelf( Double d );
00133   ElementContainerArray Plus( Double d, Double e );
00134   ElementContainerArray &PlusMySelf( Double d, Double e );
00135   ElementContainerArray Plus( pair<Double,Double> &p ){ return Plus(p.first,p.second); }
00136   ElementContainerArray &PlusMySelf( pair<Double,Double> &p ){ return PlusMySelf(p.first,p.second); }
00137 };
00138 
00139 
00140 #endif
 All Classes Functions Variables Friends