LIBINT 2.9.0
extract.h
1/*
2 * Copyright (C) 2004-2024 Edward F. Valeev
3 *
4 * This file is part of Libint compiler.
5 *
6 * Libint compiler 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 compiler 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 compiler. 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 <rr.h>
29#include <smart_ptr.h>
30
31#include <list>
32#include <map>
33#include <string>
34
35namespace libint2 {
36
37class DGVertex;
38
41 public:
42 typedef std::shared_ptr<DGVertex> VertexPtr;
43 typedef std::list<std::string> Symbols;
44
47
49 void operator()(const VertexPtr& v);
50
52 const Symbols& symbols() const;
53
54 private:
55 mutable Symbols symbols_;
56 // symbols are stored as a map
57 typedef std::map<std::string, bool> LabelMap;
58 LabelMap map_;
59};
60
62class ExtractRR {
63 public:
64 typedef std::shared_ptr<DGVertex> VertexPtr;
65 typedef RRStack::InstanceID RRid;
66 typedef std::list<RRid> RRList;
67
68 ExtractRR() {}
69 ~ExtractRR() {}
70
72 void operator()(const VertexPtr& v);
73
75 const RRList& rrlist() const;
76
77 private:
78 mutable RRList rrlist_;
79 // RRid are stored in a map
80 typedef std::map<RRid, bool> RRMap;
81 RRMap map_;
82};
83
84}; // namespace libint2
85
86#endif // header guard
This class collects labels of all external non-compile-time constants.
Definition extract.h:40
void operator()(const VertexPtr &v)
try v
Definition extract.cc:34
const Symbols & symbols() const
return list of sorted symbols
Definition extract.cc:68
This class collects all unique RRs. It uses RRStack to get their InstanceID.
Definition extract.h:62
void operator()(const VertexPtr &v)
try v
Definition extract.cc:81
const RRList & rrlist() const
return list of sorted RRs
Definition extract.cc:105
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24