Cadabra
Computer algebra system for field theory problems
Toggle main menu visibility
Loading...
Searching...
No Matches
core
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
29
30
#pragma once
31
32
#include <vector>
33
34
#include "
Storage.hh
"
35
36
#include "
properties/GammaMatrix.hh
"
37
#include "
properties/Spinor.hh
"
38
#include "
properties/Traceless.hh
"
39
#include "
properties/GammaTraceless.hh
"
40
#include "
properties/SelfCommutingBehaviour.hh
"
41
#include "
properties/CommutingBehaviour.hh
"
42
43
namespace
cadabra
{
44
45
class
exchange
{
46
public
:
47
struct
identical_tensors_t
{
48
unsigned
int
number_of_indices
;
49
std::vector<Ex::sibling_iterator>
tensors
;
50
std::vector<int>
seq_numbers_of_first_indices
;
51
52
const
SelfCommutingBehaviour
*
comm
;
53
const
Spinor
*
spino
;
54
const
TableauBase
*
tab
;
55
const
Traceless
*
traceless
;
56
const
GammaTraceless
*
gammatraceless
;
57
int
extra_sign
;
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
76
bool
operator<
(
const
exchange::tensor_type_t
&
one
,
const
exchange::tensor_type_t
& two);
77
78
79
}
CommutingBehaviour.hh
GammaMatrix.hh
GammaTraceless.hh
SelfCommutingBehaviour.hh
Spinor.hh
Storage.hh
Traceless.hh
cadabra::Ex
Definition
Storage.hh:170
cadabra::GammaTraceless
Definition
GammaTraceless.hh:8
cadabra::Properties
Class holding a collection of properties attached to expressions.
Definition
Props.hh:242
cadabra::SelfCommutingBehaviour
Definition
SelfCommutingBehaviour.hh:8
cadabra::Spinor
Definition
Spinor.hh:8
cadabra::TableauBase
Definition
TableauBase.hh:9
cadabra::Traceless
Definition
Traceless.hh:8
cadabra::exchange
Definition
Exchange.hh:45
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:34
cadabra::exchange::possible_singlets
static unsigned int possible_singlets(Ex &, Ex::iterator)
cadabra::exchange::get_node_gs
static bool get_node_gs(const Properties &, Ex &, Ex::iterator, std::vector< std::vector< int > > &)
Definition
Exchange.cc:156
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition
Adjform.cc:83
cadabra::one
void one(rset_t::iterator &num)
Definition
Storage.cc:1201
cadabra::operator<
bool operator<(const exchange::tensor_type_t &one, const exchange::tensor_type_t &two)
cadabra::exchange::identical_tensors_t
Definition
Exchange.hh:47
cadabra::exchange::identical_tensors_t::extra_sign
int extra_sign
Definition
Exchange.hh:57
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::comm
const SelfCommutingBehaviour * comm
Definition
Exchange.hh:52
cadabra::exchange::identical_tensors_t::tab
const TableauBase * tab
Definition
Exchange.hh:54
cadabra::exchange::identical_tensors_t::number_of_indices
unsigned int number_of_indices
Definition
Exchange.hh:48
cadabra::exchange::identical_tensors_t::gammatraceless
const GammaTraceless * gammatraceless
Definition
Exchange.hh:56
cadabra::exchange::identical_tensors_t::tensors
std::vector< Ex::sibling_iterator > tensors
Definition
Exchange.hh:49
cadabra::exchange::identical_tensors_t::traceless
const Traceless * traceless
Definition
Exchange.hh:55
cadabra::exchange::identical_tensors_t::spino
const Spinor * spino
Definition
Exchange.hh:53
cadabra::exchange::tensor_type_t
Definition
Exchange.hh:69
cadabra::exchange::tensor_type_t::name
nset_t::iterator name
Definition
Exchange.hh:70
cadabra::exchange::tensor_type_t::number_of_indices
unsigned int number_of_indices
Definition
Exchange.hh:71
Generated by
1.17.0