UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::TimeManagement::FCachedLinearRegressionSums Struct Reference

#include <CachedLinearRegressionSums.h>

Public Member Functions

 FCachedLinearRegressionSums (SIZE_T InNumSamples)
 
bool IsEmpty () const
 

Public Attributes

TModuloCircularBuffer< FVector2dSamples
 
FLinearRegressionArgs CachedSums
 

Detailed Description

Data structure for building a FLinearFunction based on linear regression.

Caches the sums required for linear regression: when an old sample is replaced, the old value is subtracted and the new value added. This effectively avoids the summing all elements whenever the a new sample is added.

Constructor & Destructor Documentation

◆ FCachedLinearRegressionSums()

UE::TimeManagement::FCachedLinearRegressionSums::FCachedLinearRegressionSums ( SIZE_T  InNumSamples)
inlineexplicit

Member Function Documentation

◆ IsEmpty()

bool UE::TimeManagement::FCachedLinearRegressionSums::IsEmpty ( ) const
inline
Returns
Whether no samples have been added.

Member Data Documentation

◆ CachedSums

FLinearRegressionArgs UE::TimeManagement::FCachedLinearRegressionSums::CachedSums

Caches the sums of the samples. Whenever a sample is replaced, the old value is subtracted and the new value added to the respective sums.

◆ Samples

TModuloCircularBuffer<FVector2d> UE::TimeManagement::FCachedLinearRegressionSums::Samples

Holds the samples based off of which the samples are created.


The documentation for this struct was generated from the following file: