FDiscreteSpace
struct FDiscreteSpace : public FSpaceA struct representing a Discrete space (e.g.
Vector of integers) of possible observations or actions.
Dependencies: FDiscreteSpace, FSpace
Inherits from: public FSpace
Public Interface
Constructors:
FDiscreteSpace
FDiscreteSpace()Construct an empty DiscreteSpace.
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 28, column 1)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 6-8)
FDiscreteSpace
FDiscreteSpace(TArray<int> &High)Parameters:
| Name | Type | Default |
|---|---|---|
High | TArray<int> & | “ |
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 30, column 1)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 10-13)
Destructor:
~FDiscreteSpace
virtual ~FDiscreteSpace()Attributes: virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 51, column 9)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 67-70)
Public Functions:
Copy
void Copy(const FDiscreteSpace &Other)Copy construct a DiscreteSpace.
Parameters:
Other(const FDiscreteSpace &) – [in] The DiscreteSpace to copy
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 37, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 15-18)
Merge
void Merge(const FDiscreteSpace &Other)Merge another DiscreteSpace into this one.
Parameters:
Other(const FDiscreteSpace &) – [in] The DiscreteSpace to merge
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 43, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 20-23)
Add
void Add(int DimSize)Add a dimension to this DiscreteSpace.
Parameters:
DimSize(int) – [in] The maximum value of the dimension
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 49, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 25-28)
FillProtobuf
void FillProtobuf(DiscreteSpace *Msg) const constfill a protobuf message with the data from this DiscreteSpace
Parameters:
Msg(DiscreteSpace *) – [in] A ptr to the protobuf message to fill
Attributes: const
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 57, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 72-75)
FillProtobuf
void FillProtobuf(DiscreteSpace &Msg) const constfill a protobuf message with the data from this DiscreteSpace
Parameters:
Msg(DiscreteSpace &) – [in] A ref to the protobuf message to fill
Attributes: const
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 63, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 77-83)
GetMaxValue
int GetMaxValue(const TArray<float> &Vector) const constGet the3 index of the maximum value in an Array of Values.
Returns: The index of the maximum value in the vector
Parameters:
Vector(const TArray<float> &) – [in] The vector to get the maximum values index from
Returns: int
Attributes: const
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 70, column 5)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 85-100)
FillProtobuf
virtual void FillProtobuf(FundamentalSpace *Msg) const override constFill a protobuf message with the data from this space.
Parameters:
Msg(FundamentalSpace *) – [in] The protobuf message to fill
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 74, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 57-60)
GetNumDimensions
virtual int GetNumDimensions() const override constGet the number of dimensions in this space.
Returns: The number of dimensions in this space
Returns: int
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 76, column 5)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 62-65)
Validate
virtual ESpaceValidationResult Validate(TPoint &Observation) const override constTest if an observation is in this space.
Returns: An enum indicating the result of the validation
Parameters:
Observation(TPoint &) – [in] The observation to validate
Returns: ESpaceValidationResult
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 78, column 24)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 30-55)
GetFlattenedSize
virtual int GetFlattenedSize() const override constGet the size of the flattened representation of this space.
Returns: The size of the flattened representation of this space
Returns: int
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 80, column 5)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 141-149)
IsEmpty
virtual bool IsEmpty() const override constCheck if this space is empty.
Returns: True if this space is empty, false otherwise
Returns: bool
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 82, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 151-154)
MakeTPoint
virtual TPoint MakeTPoint() const override constCreate a TPoint from this space.
Returns: A TPoint belonging to this space, with correctly set variant type.
Returns: TPoint
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 84, column 8)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 156-159)
UnflattenAction
virtual TPoint UnflattenAction(const TArray<float> &Data, int Offset=0) const override constUnflatten an action from a buffer.
Parameters:
Data(const TArray<float> &) – [in] The buffer to unflatten fromOffset(int) – [in] The offset into the buffer to start unflattening from
Returns: TPoint
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 86, column 8)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 102-125)
FlattenPoint
virtual void FlattenPoint(TArrayView<float> Buffer, const TPoint &Point) const override constFlatten a point into a buffer.
Parameters:
Buffer(TArrayView<float>) – [inout] The buffer to flatten intoPoint(const TPoint &) – [in] The point to flatten
Attributes: const, virtual
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 88, column 6)
Implementation: Schola/Source/Schola/Private/Common/Spaces/DiscreteSpace.cpp (lines 127-139)
Public Members:
TArray<int> High
TArray<int> High = = TArray<int>()The maximum value on each dimension of this DiscreteSpace.
The Lower bound is always 0. e.g. High=2 gives actions 1
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 23, column 8)
Used By
This type is used by:
- FDictSpace
- FDiscreteSpace
- IBlueprintDiscreteActuatorWrapper
- IBlueprintDiscreteObserverWrapper
- IDiscreteActuatorWrapper
- IDiscreteObserverWrapper
- UBlueprintDiscreteActuator
- UBlueprintDiscreteObserver
- UDebugDiscreteActuator
- UDebugDiscreteObserver
- UDiscreteActuator
- UDiscreteObserver
- UTeleportActuator
Source: Schola/Source/Schola/Public/Common/Spaces/DiscreteSpace.h (line 17, column 1)