Skip to content

FSpace

struct FSpace

A class representing a space of possible observations or actions.

This is a base class for all spaces.

Subclassed by: FBinarySpace, FBoxSpace, FDiscreteSpace

Public Interface

Destructor:

~FSpace

virtual ~FSpace()=default

Attributes: virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 76, column 9)

Public Functions:

ToProtobuf

FundamentalSpace * ToProtobuf() const const

Convert this space to a protobuf message.

Returns: A protobuf message representing this space

Returns: FundamentalSpace *

Attributes: const

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 25, column 20)

Implementation: Schola/Source/Schola/Private/Common/Spaces/Space.cpp (lines 5-10)

FillProtobuf

inline virtual void FillProtobuf(FundamentalSpace *Msg) const const

Fill a protobuf message with the data from this space.

Parameters:

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

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 31, column 16)

GetNumDimensions

inline virtual int GetNumDimensions() const const

Get the number of dimensions in this space.

Returns: The number of dimensions in this space

Returns: int

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 37, column 15)

IsEmpty

inline virtual bool IsEmpty() const const

Check if this space is empty.

Returns: True if this space is empty, false otherwise

Returns: bool

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 43, column 16)

Validate

inline virtual ESpaceValidationResult Validate(TPoint &Observation) const const

Test 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, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 50, column 32)

GetFlattenedSize

inline virtual int GetFlattenedSize() const const

Get the size of the flattened representation of this space.

Returns: The size of the flattened representation of this space

Returns: int

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 56, column 15)

MakeTPoint

inline virtual TPoint MakeTPoint() const const

Create a TPoint from this space.

Returns: A TPoint belonging to this space, with correctly set variant type.

Returns: TPoint

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 62, column 18)

UnflattenAction

inline virtual TPoint UnflattenAction(const TArray<float> &Data, int Offset=0) const const

Unflatten an action from a buffer.

Parameters:

  • Data (const TArray<float> &) – [in] The buffer to unflatten from
  • Offset (int) – [in] The offset into the buffer to start unflattening from

Returns: TPoint

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 69, column 18)

FlattenPoint

inline virtual void FlattenPoint(TArrayView<float> Buffer, const TPoint &Point) const const

Flatten a point into a buffer.

Parameters:

  • Buffer (TArrayView<float>) – [inout] The buffer to flatten into
  • Point (const TPoint &) – [in] The point to flatten

Attributes: const, inline, virtual

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 75, column 16)

Used By: FBinarySpace, FBoxSpace, FDiscreteSpace

Source: Schola/Source/Schola/Public/Common/Spaces/Space.h (line 17, column 1)