MultiNode
utils.MultiNode
case class MultiNode[Ctx, Key, Res](keyOf: Ctx => Key, branches: Map[Key, DecisionTree[Ctx, Res]], default: DecisionTree[Ctx, Res]) extends DecisionTree[Ctx, Res]
Represents a multi-way decision node in the decision tree.
A MultiNode dispatches to one of several branches based on a key extracted from the context. It includes a default branch for keys that do not have a specific corresponding branch.
Type parameters
- Ctx
-
The context type.
- Key
-
The type of the key extracted from the context.
- Res
-
The result type.
Value parameters
- branches
-
A map associating keys with their respective decision tree branches.
- default
-
The default DecisionTree to evaluate if no matching key is found in 'branches'.
- keyOf
-
A function that extracts a key from the context to select a branch.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article