File indexing completed on 2025-04-19 09:09:52
0001 #ifndef ATOOLS_Org_Integration_Info_H
0002 #define ATOOLS_Org_Integration_Info_H
0003
0004 #ifndef ATOOLS_Org_Info_Key_H
0005 #error The header 'Integration_Info.H' must not be included directly. \
0006 Please include the header 'Info_Key.H' instead.
0007 #else
0008
0009
0010 #include "ATOOLS/Org/Info_Key.H"
0011 #include "ATOOLS/Org/My_Limits.H"
0012 #include "ATOOLS/Org/CXXFLAGS.H"
0013 #include <map>
0014 #include <vector>
0015 #include <limits>
0016
0017 namespace ATOOLS {
0018
0019 const double UNDEFINED_LOWER=-std::numeric_limits<double>::max();
0020 const double UNDEFINED_UPPER=std::numeric_limits<double>::max();
0021 const double UNDEFINED_DOUBLE=std::numeric_limits<double>::max();
0022 const double UNDEFINED_WEIGHT=0.;
0023
0024 const ATOOLS::Vec4D UNDEFINED_VECTOR=ATOOLS::Vec4D();
0025
0026 class Integration_Info {
0027 public:
0028
0029 typedef std::vector<Info_Key*> Key_Vector;
0030 typedef std::pair<size_t,Key_Vector> SizeT_KeyVector_Pair;
0031 typedef std::map<std::string,SizeT_KeyVector_Pair> String_KeyPair_Map;
0032 typedef std::pair<size_t,String_KeyPair_Map> SizeT_KeyMap_Pair;
0033 typedef std::map<std::string,SizeT_KeyMap_Pair> String_MapPair_Map;
0034
0035 private:
0036
0037 String_MapPair_Map m_keymap;
0038
0039 std::vector<Double_Container> m_doubles;
0040 std::vector<Vector_Container> m_vectors;
0041 std::vector<Double_Container> m_weights;
0042 std::vector<si::code> m_status;
0043
0044 void AssignKey(Info_Key &key,const size_t doubles,const size_t vectors);
0045 void ReleaseKey(Info_Key &key);
0046
0047 Double_Container &Doubles(const size_t valuekey);
0048 Vector_Container &Vectors(const size_t valuekey);
0049
0050 double &Double(const size_t valuekey,const size_t i);
0051 ATOOLS::Vec4D &Vector(const size_t valuekey,const size_t i);
0052
0053 double Double(const size_t valuekey,const size_t i) const;
0054 ATOOLS::Vec4D Vector(const size_t valuekey,const size_t i) const;
0055
0056 void SetWeight(const size_t valuekey,const size_t weightkey,
0057 const double weight);
0058 double Weight(const size_t valuekey,const size_t weightkey) const;
0059
0060 si::code SetStatus(const size_t statuskey,const si::code status);
0061 si::code Status(const size_t statuskey);
0062
0063 friend class Info_Key;
0064
0065 friend std::ostream &operator<<(std::ostream &str,
0066 const Integration_Info &info);
0067 friend std::ostream &operator<<(std::ostream &str,const Info_Key &key);
0068
0069 public:
0070
0071
0072 Integration_Info();
0073
0074
0075 ~Integration_Info();
0076
0077
0078 void ResetAll();
0079
0080 };
0081
0082 std::ostream &operator<<(std::ostream &str,const Integration_Info &info);
0083 std::ostream &operator<<(std::ostream &str,const Double_Container &doubles);
0084 std::ostream &operator<<(std::ostream &str,const Vector_Container &vectors);
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123 }
0124
0125 #include "ATOOLS/Org/Integration_Info.inl.H"
0126
0127
0128 #endif
0129
0130
0131 #endif