Skip to content

FDictSpace

struct FDictSpace

A struct representing a dictionary of possible observations or actions.

Dependencies

This type depends on:

Public Interface

Constructor:

FDictSpace

FDictSpace()

Construct an empty DictSpace.

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 31, column 1)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 5-7)

Public Functions:

Num

int Num()

Get the number of spaces in this dictionary.

Returns: The number of spaces in this dictionary

Returns: int

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 38, column 7)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 10-13)

GetFlattenedSize

int GetFlattenedSize() const const

Get the number of dimensions, of all spaces in this dictionary after flattening.

Returns: The number of dimensions

Returns: int

Attributes: const

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 44, column 7)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 16-25)

Validate

ESpaceValidationResult Validate(FDictPoint &PointMap) const const

Validate a point in this space, by checking if all of it’s dimensions pass validation.

Returns: An enum indicating the result of the validation

Parameters:

  • PointMap (FDictPoint &) – [in] The point to validate

Returns: ESpaceValidationResult

Attributes: const

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 52, column 26)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 27-51)

Reset

void Reset()

Empty this Dict Space, by deleting all the keys and values.

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 57, column 8)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 53-57)

Add

TSpace & Add(const FString &Key)

Create a new empty space in place in this dictionary.

Returns: A reference to the newly added space

Parameters:

  • Key (const FString &) – [in] The label of the space

Returns: TSpace &

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 66, column 8)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 100-104)

Add

void Add(const FString &Key, TSpace &Value)

Add a preallocated space from a reference to this dictionary.

Parameters:

  • Key (const FString &) – [in] The label of the space
  • Value (TSpace &) – [in] The BoxSpace to add

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 72, column 5)

Add

void Add(const FString &Key, FBoxSpace &Value)

Add a BoxSpace to this dictionary from a reference.

Parameters:

  • Key (const FString &) – [in] The label of the space
  • Value (FBoxSpace &) – [in] The BoxSpace to add

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 78, column 5)

Add

void Add(const FString &Key, FDiscreteSpace &Value)

Add a DiscreteSpace to this dictionary from a reference.

Parameters:

  • Key (const FString &) – [in] The label of the space
  • Value (FDiscreteSpace &) – [in] The DiscreteSpace to add

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 84, column 5)

Add

void Add(const FString &Key, FBinarySpace &Value)

Add a BinarySpace to this dictionary from a reference.

Parameters:

  • Key (const FString &) – [in] The label of the space
  • Value (FBinarySpace &) – [in] The BinarySpace to add

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 90, column 5)

Append

void Append(const FDictSpace &Other)

Append another DictSpace to this one.

Parameters:

  • Other (const FDictSpace &) – [in] The DictSpace to append

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 96, column 5)

ToProtobuf

DictSpace * ToProtobuf() const const

Convert this DictSpace to a protobuf message.

Returns: A protobuf message representing this DictSpace

Returns: DictSpace *

Attributes: const

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 103, column 11)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 59-64)

FillProtobuf

void FillProtobuf(DictSpace *Msg) const const

Fill a protobuf message with the data from this DictSpace.

Parameters:

  • Msg (DictSpace *) – [in] The protobuf message to fill

Attributes: const

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 109, column 8)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 66-74)

InitializeEmptyDictPoint

void InitializeEmptyDictPoint(FDictPoint &EmptyPoint)

Configure an empty DictPoint with the correct entries corresponding to this space.

Parameters:

  • EmptyPoint (FDictPoint &) – [inout] The point to initialize

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 114, column 6)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 76-83)

UnflattenPoint

FDictPoint UnflattenPoint(TArray<float> &FlattenedPoint)

Create an empty DictPoint from a flattened point.

Returns: The unflattened point

Parameters:

  • FlattenedPoint (TArray<float> &) – [in] The flattened point buffer to unflatten

Returns: FDictPoint

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 121, column 14)

Implementation: Schola/Source/Schola/Private/Common/Spaces/DictSpace.cpp (lines 85-97)

operator[]

inline TSpace & operator[](int Index)

Get a subspace from this DictSpace, from an Index.

Returns: The subspace

Parameters:

  • Index (int) – [in] The index of the subspace

Returns: TSpace &

Attributes: inline

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 128, column 8)

operator[]

inline TSpace & operator[](const FString &Label)

Get a subspace from this DictSpace, from a Label.

Returns: The subspace

Parameters:

  • Label (const FString &) – [in] The label of the subspace

Returns: TSpace &

Attributes: inline

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 139, column 8)

Public Members:

TArray<FString> Labels

TArray<FString> Labels

The labels of the spaces in this dictionary, used as keys for lookups.

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 23, column 8)

TArray<TSpace> Spaces

TArray<TSpace> Spaces

The spaces in this dictionary.

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 26, column 7)

Used By

This type is used by:

Source: Schola/Source/Schola/Public/Common/Spaces/DictSpace.h (line 16, column 1)