inlib  1.2.0
/Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/a6
Go to the documentation of this file.
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
00002 // See the file inlib.license for terms.
00003 
00004 #ifndef inlib_a6
00005 #define inlib_a6
00006 
00007 #include "sqm"
00008 
00009 namespace inlib {
00010 namespace a6 {
00011 
00012 template <class T>
00013 
00014 class cbm : public array<T> { //cbm is for cubic matrix.
00015 public:
00016   inline cbm():array<T>(3,6){}
00017   virtual ~cbm() {}
00018 public:
00019   inline cbm(const cbm& a_from):array<T>(a_from){}
00020   inline cbm& operator=(const cbm& a_from){
00021     inlib::array<T>::operator=(a_from);
00022     return *this;
00023   }
00024 public:
00025   inline T value(unsigned int a1,unsigned int a2,unsigned int a3) const { 
00026     return array<T>::m_vector[a1 + a2 * 6 + a3 * 36];
00027   }
00028   inline void set_value(unsigned int a1,unsigned int a2,unsigned int a3,const T& a_value) { 
00029     array<T>::m_vector[a1 + a2 * 6 + a3 * 36] = a_value;
00030   }
00031 };
00032 
00033 }}
00034 
00035 #endif
00036 
00037 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines