QUGaR 0.0.4
|
Class representing a dim
-dimensional range defined by lower and upper tensor bounds.
More...
#include <tensor_index_tp.hpp>
Classes | |
class | Iterator |
Iterator class for tensor index ranges. More... | |
Public Member Functions | |
TensorIndexRangeTP (const TensorIndexTP< dim > &lower_bound, const TensorIndexTP< dim > &upper_bound) | |
Constructs a new TensorIndexRangeTP object from its lower and upper bounds. | |
TensorIndexRangeTP (const TensorIndexTP< dim > &upper_bound) | |
Constructs a new TensorIndexRangeTP object from its upper bound. The lower bound is assumed to be zero. | |
TensorIndexRangeTP (const TensorSizeTP< dim > &upper_bound) | |
Constructs a new TensorIndexRangeTP object from its upper bound. The lower bound is assumed to be zero. | |
TensorIndexRangeTP (int upper_bound) | |
Constructs a new TensorIndexRangeTP object from its upper bound. The lower bound is assumed to be zero. | |
TensorSizeTP< dim > | get_sizes () const |
Gets the sizes along all the directions. | |
int | size () const |
returns the number of entries in the range. | |
std::array< TensorIndexRangeTP< dim >, 2 > | split () const |
Splits the current range along the direction with a largest number of indices. | |
Iterator | cbegin () const |
Creates a begin iterator. | |
Iterator | begin () const |
Creates a begin iterator. | |
Iterator | cend () const |
Creates an end iterator. | |
Iterator | end () const |
Creates an end iterator. | |
const TensorIndexTP< dim > & | get_lower_bound () const |
Gets the lower bound. | |
const TensorIndexTP< dim > & | get_upper_bound () const |
Gets the upper bound. | |
bool | is_in_range (const TensorIndexTP< dim > &index) const |
Checks that the given index is contained in the range. | |
bool | is_in_range (int index) const |
Checks that the given index is contained in the range. | |
Private Attributes | |
TensorIndexTP< dim > | lower_bound_ |
Lower bounds. | |
TensorIndexTP< dim > | upper_bound_ |
Upper bounds. | |
Class representing a dim
-dimensional range defined by lower and upper tensor bounds.
dim | Dimension of the indices. |
qugar::TensorIndexRangeTP< dim >::TensorIndexRangeTP | ( | const TensorIndexTP< dim > & | lower_bound, |
const TensorIndexTP< dim > & | upper_bound ) |
Constructs a new TensorIndexRangeTP object from its lower and upper bounds.
lower_bound | Lower bounds. |
upper_bound | Upper bounds. |
|
explicit |
Constructs a new TensorIndexRangeTP object from its upper bound. The lower bound is assumed to be zero.
upper_bound | Upper bounds. |
|
explicit |
Constructs a new TensorIndexRangeTP object from its upper bound. The lower bound is assumed to be zero.
upper_bound | Upper bounds. |
|
explicit |
Constructs a new TensorIndexRangeTP object from its upper bound. The lower bound is assumed to be zero.
upper_bound | Upper bounds. All components are set to the given value. |
Iterator qugar::TensorIndexRangeTP< dim >::begin | ( | ) | const |
Creates a begin iterator.
Iterator qugar::TensorIndexRangeTP< dim >::cbegin | ( | ) | const |
Creates a begin iterator.
Iterator qugar::TensorIndexRangeTP< dim >::cend | ( | ) | const |
Creates an end iterator.
Iterator qugar::TensorIndexRangeTP< dim >::end | ( | ) | const |
Creates an end iterator.
|
nodiscard |
Gets the lower bound.
|
nodiscard |
Gets the sizes along all the directions.
|
nodiscard |
Gets the upper bound.
|
nodiscard |
Checks that the given index
is contained in the range.
index | Index to be checked. |
|
nodiscard |
Checks that the given index
is contained in the range.
index | Index to be checked. |
|
nodiscard |
returns the number of entries in the range.
|
nodiscard |
Splits the current range along the direction with a largest number of indices.
|
private |
Lower bounds.
|
private |
Upper bounds.