|
QUGaR 0.1.3
|
Class representing a dim-dimensional tensor-product sizes container.
More...
#include <tensor_index_tp.hpp>
Public Member Functions | |
Constructors | |
| TensorSizeTP () | |
| Default constructor. Initializes indices to zero. | |
| TensorSizeTP (const int size) | |
| Construct a new TensorSizeTP object from size along directions. | |
| TensorSizeTP (const Vector< int, dim > &sizes) | |
| Construct a new TensorSizeTP object from sizes along directions. | |
| TensorSizeTP (const TensorIndexTP< dim > &sizes) | |
| Construct a new TensorSizeTP object from sizes along directions. | |
| const Vector< int, dim > & | as_Vector () const |
| Returns the tensor size casted as a Vector. | |
| Vector< int, dim > & | as_Vector () |
| Returns the tensor size casted as a Vector. | |
| std::size_t | size () const |
| Gets the total number of entries (product of sizes along all directions). | |
| bool | operator== (const TensorSizeTP< dim > &rhs) const |
| Checks if two tensor sizes are equal by comparing all its components. They are equal if all the components are equal. | |
| TensorSizeTP< dim > | operator+ (const TensorSizeTP< dim > &rhs) const |
| Adds two TensorSizeTP objects. | |
Class representing a dim-dimensional tensor-product sizes container.
| dim | Dimension of the container. |
| qugar::TensorSizeTP< dim >::TensorSizeTP | ( | ) |
Default constructor. Initializes indices to zero.
|
explicit |
Construct a new TensorSizeTP object from size along directions.
| size | Sizs along all the parametric directions. |
|
explicit |
Construct a new TensorSizeTP object from sizes along directions.
| sizes | Sizes along the parametric directions. |
|
explicit |
Construct a new TensorSizeTP object from sizes along directions.
| sizes | Sizes along the parametric directions. |
| Vector< int, dim > & qugar::TensorSizeTP< dim >::as_Vector | ( | ) |
Returns the tensor size casted as a Vector.
| const Vector< int, dim > & qugar::TensorSizeTP< dim >::as_Vector | ( | ) | const |
Returns the tensor size casted as a Vector.
|
nodiscard |
Adds two TensorSizeTP objects.
This operator performs element-wise addition of two TensorSizeTP objects.
| rhs | The right-hand side TensorSizeTP object to be added. |
|
nodiscard |
Checks if two tensor sizes are equal by comparing all its components. They are equal if all the components are equal.
|
nodiscard |
Gets the total number of entries (product of sizes along all directions).