Skip to content

Struct FBoxPoint

Struct FBoxPoint

  • Defined in File BoxPoint.h

Inheritance Relationships

Base Type

struct FBoxPoint : public FPoint

Source: Source/Schola/Public/Common/Points/BoxPoint.h

Dependencies: ConstPointVisitor, PointVisitor

A point in a box (continuous) space.

Conceptually represents a floating point vector with continuous values. Box points are used to represent continuous observations or actions in a bounded multi-dimensional space.


Public Functions

SymbolDetails
FBoxPointConstructs an empty BoxPoint with no values.
FBoxPointConstructs a BoxPoint from an array of float values.
FBoxPointConstructs a BoxPoint from an initializer list of float values.
FBoxPointConstructs a BoxPoint with specific values and shape.
FBoxPointConstruct a BoxPoint from a raw array of floats.
FBoxPointConstructs a preallocated BoxPoint with no initial values.
operator[]Gets the value at the given index or dimension.
~FBoxPointVirtual destructor.
AddAdds a value to the BoxPoint, effectively adding a new dimension.
ResetResets the values of the BoxPoint, clearing the current values.
AcceptAccepts a mutable visitor for the visitor pattern.
AcceptAccepts a const visitor for the visitor pattern.
ToStringConverts this point to a string representation.

FBoxPoint

inline FBoxPoint()

Constructs an empty BoxPoint with no values.

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h

FBoxPoint

inline FBoxPoint(const TArray<float> &InValues)

Constructs a BoxPoint from an array of float values.

Parameters

InValues – [in] The array of float values to initialize the point with.

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h

FBoxPoint

inline FBoxPoint(std::initializer_list<float> InValues)

Constructs a BoxPoint from an initializer list of float values.

Parameters

InValues – [in] The initializer list of float values.

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h

FBoxPoint

inline FBoxPoint(const TArray<float> &InValues, const TArray<int> &InShape)

Constructs a BoxPoint with specific values and shape.

Parameters

  • InValues – [in] The array of float values.

  • InShape – [in] The dimensional shape for the point.

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h

FBoxPoint

inline FBoxPoint(const float *Data, int Num)

Construct a BoxPoint from a raw array of floats.

Parameters

  • Data – [in] The raw array of floats, as a const ptr

  • Num – [in] The size of the array

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h

FBoxPoint

inline FBoxPoint(int NumDims)

Constructs a preallocated BoxPoint with no initial values.

Parameters

NumDims – [in] The amount of memory to preallocate for values.

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h


operator[]

inline float operator[](int Index) const

Gets the value at the given index or dimension.

Parameters

Index – [in] The dimension to get the value at.

Returns:

The float value at the given index.

#DirectionNameTypeDescription
1IndexintThe dimension to get the value at.

Attributes: inline, const

Source: Source/Schola/Public/Common/Points/BoxPoint.h


~FBoxPoint

inline virtual ~FBoxPoint()

Virtual destructor.

Attributes: inline, virtual

Source: Source/Schola/Public/Common/Points/BoxPoint.h

Add

inline void Add(float Value)

Adds a value to the BoxPoint, effectively adding a new dimension.

Parameters

Value – [in] The float value to add.

#DirectionNameTypeDescription
1ValuefloatThe float value to add.

Attributes: inline

Source: Source/Schola/Public/Common/Points/BoxPoint.h

Reset

inline virtual void Reset() override

Resets the values of the BoxPoint, clearing the current values.

Attributes: inline, virtual

Source: Source/Schola/Public/Common/Points/BoxPoint.h

Accept

virtual void Accept(PointVisitor &Visitor) override

Accepts a mutable visitor for the visitor pattern.

Parameters

Visitor – [inout] The visitor to accept.

#DirectionNameTypeDescription
1VisitorPointVisitor &The visitor to accept.

Attributes: virtual

Source: Source/Schola/Public/Common/Points/BoxPoint.h

Implementation: Source/Schola/Private/Common/Points/BoxPoint.cpp

Accept

virtual void Accept(ConstPointVisitor &Visitor) const override

Accepts a const visitor for the visitor pattern.

Parameters

Visitor – [inout] The const visitor to accept.

#DirectionNameTypeDescription
1VisitorPointVisitor &The visitor to accept.

Attributes: virtual

Source: Source/Schola/Public/Common/Points/BoxPoint.h

Implementation: Source/Schola/Private/Common/Points/BoxPoint.cpp

ToString

inline virtual FString ToString() const override

Converts this point to a string representation.

Returns:

A comma-separated string of the float values.

Attributes: inline, const, virtual

Source: Source/Schola/Public/Common/Points/BoxPoint.h


Public Members

SymbolDetails
ValuesThe float values of this point.
ShapeThe dimensional shape of this point.

Values

TArray<float> Values

The float values of this point.


Shape

TArray<int> Shape

The dimensional shape of this point.

If this is empty, the point is 1D with length Values.Num(). Otherwise, defines the multi-dimensional structure of the values.