Cadabra
Computer algebra system for field theory problems
Exchange.hh
Go to the documentation of this file.
1 /*
2 
3 Cadabra: a field-theory motivated computer algebra system.
4 Copyright (C) 2001-2014 Kasper Peeters <kasper.peeters@phi-sci.com>
5 
6 This program is free software: you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version.
10 
11 This program 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 GNU
14 General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 */
20 
30 #pragma once
31 
32 #include <vector>
33 
34 #include "Storage.hh"
35 
37 #include "properties/Spinor.hh"
38 #include "properties/Traceless.hh"
42 
43 namespace cadabra {
44 
45  class exchange {
46  public:
48  unsigned int number_of_indices;
49  std::vector<Ex::sibling_iterator> tensors;
50  std::vector<int> seq_numbers_of_first_indices;
51 
53  const Spinor *spino;
54  const TableauBase *tab;
58  };
59 
60  // Obtain index exchange symmetries under tensor permutation. Returns 'false' if
61  // an identically zero expression is encountered.
62  static int collect_identical_tensors(const Properties& pr, Ex& tr, Ex::iterator it,
63  std::vector<identical_tensors_t>& idts);
64  static unsigned int possible_singlets(Ex&, Ex::iterator);
65  static bool get_node_gs(const Properties&, Ex&, Ex::iterator, std::vector<std::vector<int> >& );
66 
67  // static void get_index_gs(Ex::iterator, std::vector<std::vector<int> >& );
68 
69  struct tensor_type_t {
70  nset_t::iterator name;
71  unsigned int number_of_indices;
72  };
73 
74  };
75 
77 
78 
79  }
Storage.hh
cadabra::exchange::identical_tensors_t::seq_numbers_of_first_indices
std::vector< int > seq_numbers_of_first_indices
Definition: Exchange.hh:50
cadabra::exchange::identical_tensors_t::spino
const Spinor * spino
Definition: Exchange.hh:53
cadabra::exchange::identical_tensors_t::gammatraceless
const GammaTraceless * gammatraceless
Definition: Exchange.hh:56
cadabra::Traceless
Definition: Traceless.hh:8
cadabra::Spinor
Definition: Spinor.hh:8
cadabra::exchange::identical_tensors_t::tab
const TableauBase * tab
Definition: Exchange.hh:54
cadabra::exchange::identical_tensors_t::comm
const SelfCommutingBehaviour * comm
Definition: Exchange.hh:52
CommutingBehaviour.hh
cadabra::exchange::identical_tensors_t::tensors
std::vector< Ex::sibling_iterator > tensors
Definition: Exchange.hh:49
cadabra::exchange::identical_tensors_t::extra_sign
int extra_sign
Definition: Exchange.hh:57
cadabra::operator<
bool operator<(const exchange::tensor_type_t &one, const exchange::tensor_type_t &two)
Definition: Exchange.cc:229
cadabra::SelfCommutingBehaviour
Definition: SelfCommutingBehaviour.hh:8
cadabra::one
void one(rset_t::iterator &num)
Definition: Storage.cc:999
Traceless.hh
cadabra::TableauBase
Definition: TableauBase.hh:9
GammaTraceless.hh
GammaMatrix.hh
cadabra::Ex
Definition: Storage.hh:140
cadabra::exchange::identical_tensors_t::traceless
const Traceless * traceless
Definition: Exchange.hh:55
cadabra::GammaTraceless
Definition: GammaTraceless.hh:8
cadabra::exchange::get_node_gs
static bool get_node_gs(const Properties &, Ex &, Ex::iterator, std::vector< std::vector< int > > &)
Definition: Exchange.cc:138
cadabra::exchange
Definition: Exchange.hh:45
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
cadabra::Properties
Definition: Props.hh:233
cadabra::exchange::collect_identical_tensors
static int collect_identical_tensors(const Properties &pr, Ex &tr, Ex::iterator it, std::vector< identical_tensors_t > &idts)
Definition: Exchange.cc:32
cadabra::exchange::possible_singlets
static unsigned int possible_singlets(Ex &, Ex::iterator)
cadabra::exchange::tensor_type_t::number_of_indices
unsigned int number_of_indices
Definition: Exchange.hh:71
Spinor.hh
cadabra::exchange::identical_tensors_t::number_of_indices
unsigned int number_of_indices
Definition: Exchange.hh:48
cadabra::exchange::tensor_type_t::name
nset_t::iterator name
Definition: Exchange.hh:70
cadabra::exchange::tensor_type_t
Definition: Exchange.hh:69
SelfCommutingBehaviour.hh
cadabra::exchange::identical_tensors_t
Definition: Exchange.hh:47