File: young_project.hh

package info (click to toggle)
cadabra2 2.4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 78,732 kB
  • sloc: ansic: 133,450; cpp: 92,064; python: 1,530; javascript: 203; sh: 184; xml: 182; objc: 53; makefile: 51
file content (35 lines) | stat: -rw-r--r-- 985 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#pragma once

#include "Algorithm.hh"
#include "YoungTab.hh"

namespace cadabra {

	class young_project : public Algorithm {
		public:
			young_project(const Kernel&, Ex&);
			young_project(const Kernel&, Ex&, const std::vector<int>& shape, const std::vector<int>& indices);

			virtual bool     can_apply(iterator);
			virtual result_t apply(iterator&);

			// Boxes represent tensor slots, the values in them
			// give the location in the tensor.
			typedef yngtab::filled_tableau<unsigned int> pos_tab_t;
			typedef yngtab::filled_tableau<iterator>     name_tab_t;
			pos_tab_t  tab;
			name_tab_t nametab;
			combin::symmetriser<unsigned int> sym;

			// Implicit antisymmetry; used by tableaux.cc only so far. These
			// store index locations, so these are "values" from the
			// combinatorics.hh point of view.
			combin::combinations<unsigned int>::permuted_sets_t asym_ranges;
			bool remove_traces;

		private:
			iterator nth_index_node(iterator, unsigned int);
		};

	}