Navigation
API > API/Runtime > API/Runtime/Core
Description
Convert an array of Keys and a function that returns the directed edges from each Key into the Normalized Graph Form. Normalized Graph Form is an implicit set of vertices identified as integers from 0 to N - 1, and an array of arrayviews of edges from each vertex. The Normalized Graph form has two structures: The buffer which contains the memory storage for the graph and the graph itself which is the array of arrayviews of edges. The length of the array in the graph defines the number of vertices.
| Name | UE::Graph::ConvertToGraph |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Experimental/Graph/GraphConvert.h |
| Include Path | #include "Experimental/Graph/GraphConvert.h" |
namespace UE
{
namespace Graph
{
template<typename RangeType, typename GetKeyEdgesType>
FGraph UE::Graph::ConvertToGraph
(
const RangeType & UniqueKeys,
GetKeyEdgesType GetKeyEdges,
EConvertToGraphOptions Options
)
}
}
Output value that holds the graph. See @FGraph for a description of the format. Vertex i in the graph corresponds to UniqueKeys[i].
Parameters
| Name | Remarks |
|---|---|
| UniqueKeys | A range with element type KeyType. KeyType must support GetTypeHash and copy+move constructors. KeyType being pointertype is recommended. Keys in the range must be unique. The ith element of the range will correspond to a vertex i in the OutGraph. UniqueKeys must have length < MAX_int32. |
| GetKeyEdges | A callable with prototype that is one of RangeType |
| Options | for the conversion, |