Navigation
API > API/Plugins > API/Plugins/Learning > API/Plugins/Learning/FIndexSet
Description
Attempts to convert this IndexSet from a view of indices into a slice for more efficient processing. This works by finding the minimum and maximum elements in the array and comparing the range of this min and max to the number of elements. When indices are consecutive `Max - Min + 1 == Num_.
Warning: this algorithm works on the assumption that there are no duplicate indices in the view. If there are duplicate indices in your set this will not give the correct result.
| Name | TryMakeSlice |
| Type | function |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/Learning/Public/LearningArray.h |
| Include Path | #include "LearningArray.h" |
| Source | /Engine/Plugins/Experimental/LearningAgents/Source/Learning/Private/LearningArray.cpp |
bool TryMakeSlice()
true if conversion to a slice is successful