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  }
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:142
Definition: GammaTraceless.hh:8
Class holding a collection of properties attached to expressions.
Definition: Props.hh:234
Definition: SelfCommutingBehaviour.hh:8
Definition: Spinor.hh:8
Definition: TableauBase.hh:9
Definition: Traceless.hh:8
Definition: Exchange.hh:45
static int collect_identical_tensors(const Properties &pr, Ex &tr, Ex::iterator it, std::vector< identical_tensors_t > &idts)
Definition: Exchange.cc:34
static unsigned int possible_singlets(Ex &, Ex::iterator)
static bool get_node_gs(const Properties &, Ex &, Ex::iterator, std::vector< std::vector< int > > &)
Definition: Exchange.cc:156
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
void one(rset_t::iterator &num)
Definition: Storage.cc:1035
bool operator<(const exchange::tensor_type_t &one, const exchange::tensor_type_t &two)
Definition: Exchange.hh:47
int extra_sign
Definition: Exchange.hh:57
std::vector< int > seq_numbers_of_first_indices
Definition: Exchange.hh:50
const SelfCommutingBehaviour * comm
Definition: Exchange.hh:52
const TableauBase * tab
Definition: Exchange.hh:54
unsigned int number_of_indices
Definition: Exchange.hh:48
const GammaTraceless * gammatraceless
Definition: Exchange.hh:56
std::vector< Ex::sibling_iterator > tensors
Definition: Exchange.hh:49
const Traceless * traceless
Definition: Exchange.hh:55
const Spinor * spino
Definition: Exchange.hh:53
Definition: Exchange.hh:69
nset_t::iterator name
Definition: Exchange.hh:70
unsigned int number_of_indices
Definition: Exchange.hh:71