Struct FBoxSpace
Struct FBoxSpace
- Defined in File BoxSpace.h
Inheritance Relationships
Base Type
public FSpace(Struct FSpace)
struct FBoxSpace : public FSpaceSource: Source/Schola/Public/Common/Spaces/BoxSpace.h
Dependencies: ConstSpaceVisitor, FBoxPoint, FBoxSpaceDimension, FPoint, SpaceVisitor
A struct representing a box (continuous) space of possible observations or actions.
A BoxSpace is a Cartesian product of BoxSpaceDimensions, where each dimension defines a continuous range with upper and lower bounds. This is commonly used for continuous control problems where actions or observations are real-valued vectors within specified ranges.
Public Functions
| Symbol | Details |
|---|---|
FBoxSpace | Constructs an empty BoxSpace with no dimensions. |
FBoxSpace | Constructs a BoxSpace with the given bounds arrays. |
FBoxSpace | Constructs a BoxSpace from an array of BoxSpaceDimensions. |
FBoxSpace | Constructs a BoxSpace from initializer lists. |
FBoxSpace | Constructs a BoxSpace with a specific shape and uninitialized dimensions. |
Copy | Copies the contents of another BoxSpace into this one. |
GetNormalizedObservationSpace | Gets a normalized version of this BoxSpace with all dimensions in [0, 1]. |
~FBoxSpace | Virtual destructor. |
Add | Adds a dimension to this BoxSpace. |
Add | Adds a dimension to this BoxSpace. |
GetNumDimensions | Gets the number of dimensions in this space. |
GetFlattenedSize | Gets the flattened size of this space. |
IsEmpty | Checks if this space is empty. |
Validate | Validates that a point conforms to this space. |
Accept | Accepts a mutable visitor for the visitor pattern. |
Accept | Accepts a const visitor for the visitor pattern. |
NormalizeObservation | Normalizes an observation in this space to the range [0, 1]. |
FBoxSpace
FBoxSpace()Constructs an empty BoxSpace with no dimensions.
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
FBoxSpace
FBoxSpace(const TArray<float> &Low, const TArray<float> &High, const TArray<int> &Shape = TArray<int>())Constructs a BoxSpace with the given bounds arrays.
Parameters
-
Low – [in] Array representing the lower bound of each dimension.
-
High – [in] Array representing the upper bound of each dimension.
-
Shape – [in] Optional dimensional shape for multi-dimensional structure.
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
FBoxSpace
FBoxSpace(const TArray<FBoxSpaceDimension> &Dimensions, const TArray<int> &Shape = TArray<int>())Constructs a BoxSpace from an array of BoxSpaceDimensions.
Parameters
-
Dimensions – [in] Array of BoxSpaceDimensions defining the space bounds.
-
Shape – [in] Optional dimensional shape for multi-dimensional structure.
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
FBoxSpace
FBoxSpace(std::initializer_list<float> Low, std::initializer_list<float> High, std::initializer_list<int> Shape = std::initializer_list<int>())Constructs a BoxSpace from initializer lists.
Parameters
-
Low – [in] Initializer list of lower bounds.
-
High – [in] Initializer list of upper bounds.
-
Shape – [in] Optional initializer list defining the dimensional shape.
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
FBoxSpace
FBoxSpace(const TArray<int> &Shape)Constructs a BoxSpace with a specific shape and uninitialized dimensions.
Parameters
Shape – [in] The dimensional shape to preallocate.
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
Copy
void Copy(const FBoxSpace &Other)Copies the contents of another BoxSpace into this one.
Parameters
Other – [in] The BoxSpace to copy from.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Other | const FBoxSpace & | The BoxSpace to copy from. |
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
GetNormalizedObservationSpace
FBoxSpace GetNormalizedObservationSpace() constGets a normalized version of this BoxSpace with all dimensions in [0, 1].
Returns:
A new BoxSpace with all dimensions normalized.
Attributes: const
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
~FBoxSpace
virtual ~FBoxSpace()Virtual destructor.
Attributes: virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
Add
void Add(float Low, float High)Adds a dimension to this BoxSpace.
Parameters
-
Low – [in] The lower bound of the new dimension.
-
High – [in] The upper bound of the new dimension.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Low | float | The lower bound of the new dimension. |
| 2 | — | High | float | The upper bound of the new dimension. |
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
Add
void Add(const FBoxSpaceDimension &Dimension)Adds a dimension to this BoxSpace.
Parameters
Dimension – [in] The BoxSpaceDimension to add.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Low | float | The lower bound of the new dimension. |
| 2 | — | High | float | The upper bound of the new dimension. |
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
GetNumDimensions
virtual int GetNumDimensions() const overrideGets the number of dimensions in this space.
Returns:
The number of dimensions.
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
GetFlattenedSize
virtual int GetFlattenedSize() const overrideGets the flattened size of this space.
Returns:
The total number of scalar values.
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
IsEmpty
virtual bool IsEmpty() const overrideChecks if this space is empty.
Returns:
True if empty, false otherwise.
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
Validate
virtual ESpaceValidationResultValidate(const TInstancedStruct<FPoint> &Point) const overrideValidates that a point conforms to this space.
Parameters
Point – [in] The point to validate.
Returns:
Validation result indicating success or failure reason.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Point | const TInstancedStruct< FPoint > & | The point to validate. |
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
Accept
inline virtual void Accept(SpaceVisitor &InVisitor)Accepts a mutable visitor for the visitor pattern.
Parameters
InVisitor – [inout] The visitor to accept.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InVisitor | SpaceVisitor & | The visitor to accept. |
Attributes: inline, virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Accept
inline virtual void Accept(ConstSpaceVisitor &InVisitor) constAccepts a const visitor for the visitor pattern.
Parameters
InVisitor – [inout] The const visitor to accept.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InVisitor | SpaceVisitor & | The visitor to accept. |
Attributes: inline, virtual
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
NormalizeObservation
FBoxPoint NormalizeObservation(const FBoxPoint &Observation) constNormalizes an observation in this space to the range [0, 1].
Parameters
Observation – [in] The observation to normalize.
Returns:
A new BoxPoint with the normalized observation.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Observation | const FBoxPoint & | The observation to normalize. |
Attributes: const
Source: Source/Schola/Public/Common/Spaces/BoxSpace.h
Implementation: Source/Schola/Private/Common/Spaces/BoxSpace.cpp
Public Members
| Symbol | Details |
|---|---|
Dimensions | The dimensions of this BoxSpace. |
Shape | The shape of the Box Space. |
Dimensions
TArray<FBoxSpaceDimension> Dimensions = TArray<FBoxSpaceDimension>()The dimensions of this BoxSpace.
Each dimension defines a continuous range with low and high bounds.
Shape
TArray<int> Shape = TArray<int>()The shape of the Box Space.
If empty, uses a 1D array for the Dimensions. Otherwise defines the multi-dimensional structure of the space.