Table of Contents

Interface ICachedCalculator<TInput, TOutput>

Namespace
MoonBark.GridPlacement.Core.Services
Assembly
MoonBark.GridPlacement.Core.dll

Cached calculator interface for performance-optimized calculations.

public interface ICachedCalculator<TInput, TOutput> : ICalculator<TInput, TOutput>, ICalculator

Type Parameters

TInput
TOutput
Inherited Members

Properties

CacheCapacity

Gets or sets the cache capacity.

int CacheCapacity { get; set; }

Property Value

int

CacheStatistics

Gets current cache statistics.

CalculatorCacheStatistics CacheStatistics { get; }

Property Value

CalculatorCacheStatistics

Methods

Calculate(TInput)

Performs calculation with caching.

TOutput Calculate(TInput input)

Parameters

input TInput

Input data for calculation.

Returns

TOutput

Cached or calculated result.

CalculateUncached(TInput)

Performs calculation without caching.

TOutput CalculateUncached(TInput input)

Parameters

input TInput

Input data for calculation.

Returns

TOutput

Fresh calculation result.

ClearCache()

Clears the calculation cache.

void ClearCache()