LIBINT  2.6.0
extract.h
1 /*
2  * Copyright (C) 2004-2019 Edward F. Valeev
3  *
4  * This file is part of Libint.
5  *
6  * Libint is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Libint is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Libint. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
25 #ifndef _libint2_src_bin_libint_extract_h_
26 #define _libint2_src_bin_libint_extract_h_
27 
28 #include <string>
29 #include <list>
30 #include <smart_ptr.h>
31 
32 namespace libint2 {
33 
34  class DGVertex;
35 
38  public:
39  typedef SafePtr<DGVertex> VertexPtr;
40  typedef std::list<std::string> Symbols;
41 
44 
46  void operator()(const VertexPtr& v);
47 
49  const Symbols& symbols() const;
50 
51  private:
52  mutable Symbols symbols_;
53  // symbols are stored as a map
54  typedef std::map<std::string,bool> LabelMap;
55  LabelMap map_;
56  };
57 
59  class ExtractRR {
60  public:
61  typedef SafePtr<DGVertex> VertexPtr;
62  typedef RRStack::InstanceID RRid;
63  typedef std::list<RRid> RRList;
64 
65  ExtractRR() {}
66  ~ExtractRR() {}
67 
69  void operator()(const VertexPtr& v);
70 
72  const RRList& rrlist() const;
73 
74  private:
75  mutable RRList rrlist_;
76  // RRid are stored in a map
77  typedef std::map<RRid,bool> RRMap;
78  RRMap map_;
79  };
80 
81 };
82 
83 #endif // header guard
This class collects all unique RRs. It uses RRStack to get their InstanceID.
Definition: extract.h:59
const RRList & rrlist() const
return list of sorted RRs
Definition: extract.cc:106
const Symbols & symbols() const
return list of sorted symbols
Definition: extract.cc:69
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
This class collects labels of all external non-compile-time constants.
Definition: extract.h:37
void operator()(const VertexPtr &v)
try v
Definition: extract.cc:34
void operator()(const VertexPtr &v)
try v
Definition: extract.cc:84