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