File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ #include " explicit_indices.hh"
3+
4+ #include " properties/ImplicitIndex.hh"
5+
6+ using namespace cadabra ;
7+
8+ explicit_indices::explicit_indices (const Kernel& k, Ex& tr)
9+ : Algorithm(k, tr)
10+ {
11+ }
12+
13+ bool explicit_indices::can_apply (iterator st)
14+ {
15+ // Work on equals nodes, or single terms (not terms in a sum) or
16+ // sums, provided the latter are not lhs or rhs of an equals node.
17+ // All this because when we generate free indices, we need to
18+ // ensure that all terms and all sides of an equals node use the
19+ // same index names.
20+
21+ return false ;
22+ }
23+
24+ Algorithm::result_t explicit_indices::apply (iterator& prod)
25+ {
26+
27+
28+ return result_t ::l_applied;
29+ }
Original file line number Diff line number Diff line change 1+
2+ #pragma once
3+
4+ #include " Algorithm.hh"
5+
6+ namespace cadabra {
7+
8+ class explicit_indices : public Algorithm {
9+ public:
10+ explicit_indices (const Kernel&, Ex&);
11+
12+ virtual bool can_apply (iterator);
13+ virtual result_t apply (iterator&);
14+ };
15+
16+ }
You can’t perform that action at this time.
0 commit comments