Navigation
API > API/Plugins > API/Plugins/Learning
References
| Module | Learning |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/Learning/Public/MultiArrayView.h |
| Include | #include "MultiArrayView.h" |
Syntax
template<uint8 InDimNum, typename InElementType, bool bInIsChecked, bool bInIsRestrict, typename InSizeType>
class TMultiArrayView
Remarks
Templated fixed-size view of multi-dimensional array
A statically sized view of a multi-dimensional array of typed elements.
Specializations
TMultiArrayView< 1, InElementType, bInIsChecked, bInIsRestrict, InSizeType >
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Constructor. | |||
TMultiArrayView
(
ElementType* InData, |
Construct a view of an arbitrary pointer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| ElementType * | begin () |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support. | |
| void | Checks array invariants: if array size is greater than zero on each dimension | ||
| bool | Contains
(
const ComparisonType& Item |
Checks if this array contains the element. | |
| void | DimensionCheck
(
uint8 Dimension |
Checks if a dimension is within the allowed number of dimensions | |
| ElementType * | end () |
||
| TMultiArrayView< DimNum-1, ElementType, bIsChecked, bIsRestrict, SizeType > | Flatten () |
Flattens the array on a given dimension, merging that dimension and the following one. | |
| TMultiArrayView< 1, ElementType, bIsChecked, bIsRestrict, SizeType > | Flatten () |
Flattens the array view into a single dimension. | |
| TMultiArrayView< DimNum-1, ElementType, bIsChecked, bIsRestrict, SizeType > | Flatten
(
uint8 Dimension |
Flattens the array on a given dimension, merging that dimension and the following one. | |
| const PointerType | GetData () |
Helper function for returning a typed pointer to the first array entry. | |
| PointerType | GetData () |
Helper function for returning a typed pointer to the first array entry. | |
| constexpr size_t | Helper function returning the alignment of the inner type. | ||
| constexpr size_t | GetTypeSize () |
Helper function returning the size of the inner type. | |
| bool | IsEmpty
(
uint8 Dimension |
Returns true if the dimension is empty and contains no elements. | |
| bool | IsEmpty () |
Returns true if the array is empty and contains no elements. | |
| SizeType | Num
(
uint8 Dimension |
Returns the number of elements in a dimension. | |
| SizeType | Num () |
Returns the number of elements in a dimension. | |
| SizeType | Num () |
Returns the total number of elements | |
| void | RangeCheck
(
uint8 Dimension, |
Checks if index is in dimension range. | |
| SizeType | Rank () |
Returns the number of dimensions. | |
| TMultiArrayShape< DimNum, SizeType > | Shape () |
Returns the number of elements in each dimension. | |
| TMultiArrayView | Returns a sliced view. Slicing outside of the range of the view is illegal. | ||
| void | SliceRangeCheck
(
uint8 Dimension, |
Checks if a slice range [Index, Index+InNum) is in dimension range. | |
| SizeType | Stride
(
uint8 Dimension |
Returns the stride for a dimension. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| Implicit cast for Checked and Restrict. | |||
| TMultiArrayView< DimNum-1, ElementType, bIsChecked, bIsRestrict, SizeType > | operator[]
(
SizeType Index |
Array bracket operator. Returns reference to sub-view at given index. |
Typedefs
| Name | Description |
|---|---|
| ElementType | |
| PointerType | |
| SizeType |
Constants
| Name | Description |
|---|---|
| bIsChecked | |
| bIsRestrict | |
| DimNum |