Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Indices.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Props.hh"
5 
6 namespace cadabra {
7 
8 class Indices : public list_property {
9  public:
10  Indices(); //const std::string& parent="");
11  virtual bool parse(const Kernel&, keyval_t&) override;
12  virtual std::string name() const override;
13  virtual std::string unnamed_argument() const override { return "name"; };
14  virtual match_t equals(const property *) const override;
15 
16 // virtual void display(std::ostream&) const override;
17  virtual void latex(std::ostream&) const override;
18 
19  std::string set_name, parent_name;
21 
22  // List of possible values that indices of this type can take.
23  std::vector<Ex> values;
24 
25  private:
28 
29  void collect_index_values(Ex::iterator ind_values);
30 };
31 
32 }
std::string parent_name
Definition: Indices.hh:19
virtual std::string name() const override
Definition: Indices.cc:13
match_t
Definition: Props.hh:145
position_t
Definition: Indices.hh:20
virtual match_t equals(const property *) const override
Definition: Indices.cc:18
Definition: Indices.hh:8
Definition: Indices.hh:20
Indices()
Definition: Indices.cc:8
std::vector< Ex > values
Definition: Indices.hh:23
Arguments to properties get parsed into a keyval_t structure.
Definition: Props.hh:48
Base class for all properties, handling argument parsing and defining the interface.
Definition: Props.hh:107
virtual void latex(std::ostream &) const override
Display the property on the stream.
Definition: Indices.cc:74
enum cadabra::Indices::position_t position_type
Something cannot be both a list property and a normal property at the same time, so we can safely inh...
Definition: Props.hh:168
Definition: Kernel.hh:15
Definition: Indices.hh:20
Definition: Indices.hh:20
std::string set_name
Definition: Indices.hh:19
virtual bool parse(const Kernel &, keyval_t &) override
Definition: Indices.cc:33
void collect_index_values(Ex::iterator ind_values)
Given the right-hand side of a 'values={...}' node, generate a list of all index values in index_valu...
Definition: Indices.cc:90
virtual std::string unnamed_argument() const override
Definition: Indices.hh:13