Skip to content

Struct FMultiBinarySpace

Struct FMultiBinarySpace

  • Defined in File MultiBinarySpace.h

Inheritance Relationships

Base Type

struct FMultiBinarySpace : public FSpace

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Dependencies: ConstSpaceVisitor, FPoint, SpaceVisitor

A struct representing a multi-binary space (boolean vector) of possible observations or actions.

A multi-binary space represents multiple independent binary (true/false) values, where each dimension is independent. This is commonly used for representing multiple on/off states or binary flags in observations or actions.


Public Functions

SymbolDetails
FMultiBinarySpaceConstructs an empty MultiBinarySpace with Shape=0.
FMultiBinarySpaceConstructs a MultiBinarySpace with a specific number of dimensions.
MergeMerges another MultiBinarySpace into this one.
CopyCopies the contents of another MultiBinarySpace into this one.
GetNumDimensionsGets the number of dimensions in this space.
IsEmptyChecks if this space is empty.
ValidateValidates that a point conforms to this space.
GetFlattenedSizeGets the flattened size of this space.
AcceptAccepts a mutable visitor for the visitor pattern.
AcceptAccepts a const visitor for the visitor pattern.

FMultiBinarySpace

FMultiBinarySpace()

Constructs an empty MultiBinarySpace with Shape=0.

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

FMultiBinarySpace

FMultiBinarySpace(int InShape)

Constructs a MultiBinarySpace with a specific number of dimensions.

Parameters

InShape – [in] The number of binary dimensions.

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

Merge

void Merge(const FMultiBinarySpace &Other)

Merges another MultiBinarySpace into this one.

Parameters

Other – [in] The space to merge.

#DirectionNameTypeDescription
1Otherconst FMultiBinarySpace &The space to merge.

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

Copy

void Copy(const FMultiBinarySpace &Other)

Copies the contents of another MultiBinarySpace into this one.

Parameters

Other – [in] The space to copy from.

#DirectionNameTypeDescription
1Otherconst FMultiBinarySpace &The space to copy from.

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

GetNumDimensions

virtual int GetNumDimensions() const override

Gets the number of dimensions in this space.

Returns:

The value of Shape.

Attributes: const, virtual

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

IsEmpty

virtual bool IsEmpty() const override

Checks if this space is empty.

Returns:

True if Shape is 0, false otherwise.

Attributes: const, virtual

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

Validate

virtual ESpaceValidationResult
Validate(const TInstancedStruct<FPoint> &InPoint) const override

Validates that a point conforms to this space.

Parameters

InPoint – [in] The point to validate.

Returns:

Validation result indicating success or failure reason.

#DirectionNameTypeDescription
1InPointconst TInstancedStruct< FPoint > &The point to validate.

Attributes: const, virtual

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

GetFlattenedSize

virtual int GetFlattenedSize() const override

Gets the flattened size of this space.

Returns:

The value of Shape.

Attributes: const, virtual

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Implementation: Source/Schola/Private/Common/Spaces/MultiBinarySpace.cpp

Accept

inline virtual void Accept(SpaceVisitor &InVisitor)

Accepts a mutable visitor for the visitor pattern.

Parameters

InVisitor – [inout] The visitor to accept.

#DirectionNameTypeDescription
1InVisitorSpaceVisitor &The visitor to accept.

Attributes: inline, virtual

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h

Accept

inline virtual void Accept(ConstSpaceVisitor &InVisitor) const

Accepts a const visitor for the visitor pattern.

Parameters

InVisitor – [inout] The const visitor to accept.

#DirectionNameTypeDescription
1InVisitorSpaceVisitor &The visitor to accept.

Attributes: inline, virtual

Source: Source/Schola/Public/Common/Spaces/MultiBinarySpace.h


Public Members

SymbolDetails
ShapeThe number of binary dimensions in this space.

Shape

int Shape = 0

The number of binary dimensions in this space.