00001
00009 #ifndef NORM_CALC_H
00010 #define NORM_CALC_H
00011
00012 namespace blue_sky
00013 {
00014 namespace norms
00015 {
00016
00018 enum norms_consts
00019 {
00020 C_CPV = 0,
00021 C_CPV_GAS,
00022 C_CPV_WATER,
00023 C_CPV_OIL,
00024
00025 C_ACPV,
00026 C_ACPV_GAS,
00027 C_ACPV_WATER,
00028 C_ACPV_OIL,
00029
00030 L2_CPV,
00031 L2_CPV_GAS,
00032 L2_CPV_WATER,
00033 L2_CPV_OIL,
00034
00035 L2_ACPV,
00036 L2_ACPV_GAS,
00037 L2_ACPV_WATER,
00038 L2_ACPV_OIL,
00039
00040 MB_ERR,
00041 MB_ERR_GAS,
00042 MB_ERR_WATER,
00043 MB_ERR_OIL,
00044
00045 S_RHS,
00046
00047
00048 NORMS_COUNTER
00049 };
00050
00051 }
00052
00056 template <class strategy_t>
00057 class norms_storage
00058 {
00059 public:
00060 typedef typename strategy_t::item_array_t item_array_t;
00061 typedef typename strategy_t::rhs_item_array_t rhs_item_array_t;
00062 typedef seq_vector <const char *> name_array_t;
00063
00064 public:
00066 norms_storage ();
00068 ~norms_storage ();
00070 void clear ();
00071
00072
00073
00074
00075 norms_storage &operator= (const norms_storage &rhs);
00076
00077
00078
00079
00080 public:
00081 name_array_t name;
00082 item_array_t val;
00083 boost::array <int, norms::NORMS_COUNTER> idx;
00084 boost::array <int, norms::NORMS_COUNTER> p_flag;
00085 };
00086
00087 }
00088
00089 #endif // NORM_CALC_H