An Index is used in the symbolic notation for contractions.
More...
#include <chemistry/qc/lmp2/sma.h>
|
| | Index (const std::string &name) |
| | Allocate a named index.
|
| |
| | Index (int value) |
| | Allocate an index with a specific value.
|
| |
| | Index (const std::string &name, int value) |
| | Allocate an Index with a fixed value and a name.
|
| |
| const std::string | name () const |
| | Return the name of the index.
|
| |
| int | value () const |
| | Return the value of the index.
|
| |
|
bool | has_value () const |
| | Returns true if the index has a value, indicating that the index is to be fixed.
|
| |
| bool | symbolically_equivalent (const Index &i) const |
| | Returns true if the indices have non-empty names which are the same.
|
| |
|
bool | operator== (const Index &i) const |
| | Returns true if the indices are equivalent.
|
| |
|
void | set_value (int value) |
| | Set the value of the index.
|
| |
An Index is used in the symbolic notation for contractions.
◆ Index() [1/3]
| sc::sma2::Index::Index |
( |
const std::string & | name | ) |
|
|
inline |
Allocate a named index.
Indices with names can be external or internal indices.
◆ Index() [2/3]
| sc::sma2::Index::Index |
( |
int | value | ) |
|
|
inline |
Allocate an index with a specific value.
The value will be fixed during array manipulations. An Index with a value and no name may appear in just a single array, but this only makes sense, and is only allowed, when all of the blocks for that index are size one.
◆ Index() [3/3]
| sc::sma2::Index::Index |
( |
const std::string & | name, |
|
|
int | value ) |
|
inline |
Allocate an Index with a fixed value and a name.
This sort of Index can be used to specify fixed external indices. This is the only way to used fixed indices when the block size of the fixed index might be greater than one. The value is the fixed block number in this case.
◆ name()
| const std::string sc::sma2::Index::name |
( |
| ) |
const |
|
inline |
◆ symbolically_equivalent()
| bool sc::sma2::Index::symbolically_equivalent |
( |
const Index & | i | ) |
const |
|
inline |
Returns true if the indices have non-empty names which are the same.
The result is undefined if array operations are done when two Index names are the same but their values are different.
References name().
◆ value()
| int sc::sma2::Index::value |
( |
| ) |
const |
|
inline |
Return the value of the index.
This is only valid if has_value is true.
Referenced by set_value().
The documentation for this class was generated from the following file:
- src/lib/chemistry/qc/lmp2/sma.h