26#ifndef _libint2_src_bin_libint_dgarc_h_
27#define _libint2_src_bin_libint_dgarc_h_
31class RecurrenceRelation;
36 std::shared_ptr<DGVertex> orig_;
37 std::shared_ptr<DGVertex> dest_;
40 DGArc(
const std::shared_ptr<DGVertex>& orig,
41 const std::shared_ptr<DGVertex>& dest);
44 std::shared_ptr<DGVertex> orig()
const {
return orig_; }
45 std::shared_ptr<DGVertex> dest()
const {
return dest_; }
48 virtual void print(std::ostream& os)
const = 0;
56 const std::shared_ptr<DGVertex>& dest)
57 :
DGArc(orig, dest) {}
61 void print(std::ostream& os)
const override {
62 os <<
"DGArcDirect: connects " << orig().get() <<
" to " << dest().get();
73 virtual std::shared_ptr<RecurrenceRelation>
rr()
const = 0;
76 DGArcRR(
const std::shared_ptr<DGVertex>& orig,
77 const std::shared_ptr<DGVertex>& dest);
84template <
class ArcRel>
86 std::shared_ptr<ArcRel> rel_;
89 DGArcRel(
const std::shared_ptr<DGVertex>& orig,
90 const std::shared_ptr<DGVertex>& dest,
91 const std::shared_ptr<ArcRel>& rel);
95 std::shared_ptr<RecurrenceRelation>
rr()
const override {
96 return std::dynamic_pointer_cast<RecurrenceRelation, ArcRel>(rel_);
99 void print(std::ostream& os)
const override {
100 os <<
"DGArcRel<T>: connects " << orig().get() <<
" to " << dest().get()
105template <
class ArcRel>
106DGArcRel<ArcRel>::DGArcRel(
const std::shared_ptr<DGVertex>& orig,
107 const std::shared_ptr<DGVertex>& dest,
108 const std::shared_ptr<ArcRel>& rel)
109 : DGArcRR(orig, dest), rel_(rel){};
111template <
class ArcRel>
112DGArcRel<ArcRel>::~DGArcRel(){};
Class DGArcDirect describes arcs that does not correspond to any relationship.
Definition dgarc.h:53
void print(std::ostream &os) const override
Overload of DGArc::print()
Definition dgarc.h:61
Class DGArcRR describes arcs correspond to recurrence relations.
Definition dgarc.h:68
virtual std::shared_ptr< RecurrenceRelation > rr() const =0
rr() returns pointer to the RecurrenceRelation describing the arc
Class DGArcRel describes arcs in a directed graph which is represented by a relationship ArcRel.
Definition dgarc.h:85
std::shared_ptr< RecurrenceRelation > rr() const override
Implementation of DGArcRR::rr()
Definition dgarc.h:95
void print(std::ostream &os) const override
Overload of DGArc::print()
Definition dgarc.h:99
Class DGArc describes arcs in a directed graph.
Definition dgarc.h:35
virtual void print(std::ostream &os) const =0
Print out the arc.
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24