Class OperationContext
java.lang.Object
org.episteme.core.technical.algorithm.OperationContext
Describes the context of a numerical operation for provider selection.
Instead of purely priority-based selection, OperationContext allows
AlgorithmProvider.score(OperationContext) to make informed decisions
based on data characteristics.
OperationContext ctx = new OperationContext.Builder()
.dataSize(1_000_000)
.addHint(OperationContext.Hint.DENSE)
.build();
LinearAlgebraProvider best = ProviderSelector.select(
LinearAlgebraProvider.class, ctx);
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumHints about the data characteristics. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlongNumber of elements in the primary operand.intDimensionality of the data (e.g., rows for matrix).getHints()Unmodifiable set of operation hints.booleanhasHint(OperationContext.Hint hint) Whether a specific hint is present.booleanReturns true if this operation has been cancelled.voidsetCancelled(boolean cancelled) Sets the cancellation state of this operation.
-
Field Details
-
DEFAULT
-
-
Method Details
-
getDataSize
public long getDataSize()Number of elements in the primary operand. -
getHints
Unmodifiable set of operation hints. -
hasHint
Whether a specific hint is present. -
getDimensionality
public int getDimensionality()Dimensionality of the data (e.g., rows for matrix). -
isCancelled
public boolean isCancelled()Returns true if this operation has been cancelled. -
setCancelled
public void setCancelled(boolean cancelled) Sets the cancellation state of this operation.
-