hashedProbedAssociativeMemoryFunctor function
Creates an external bounded hashed/probed associative-memory binding.
The target macro must report a miss after maximumProbeCount unsuccessful
probes and must expose the selected full-table behavior through its macro
contract.
Implementation
AssociativeMemoryFunctor hashedProbedAssociativeMemoryFunctor({
required String definitionName,
required AssociativeMemoryCapabilities capabilities,
required int maximumProbeCount,
required String fullTableBehavior,
String? identity,
Map<String, String>? parameters,
}) {
if (maximumProbeCount < 1) {
throw ArgumentError.value(
maximumProbeCount, 'maximumProbeCount', 'Must be positive.');
}
if (fullTableBehavior.isEmpty) {
throw ArgumentError.value(
fullTableBehavior, 'fullTableBehavior', 'Must not be empty.');
}
return externalAssociativeMemoryFunctor(
definitionName: definitionName,
identity: identity ?? '${definitionName}_HashedProbed',
capabilities: capabilities,
parameters: {
'SEARCH_ARCHITECTURE': '"hashedProbed"',
'MAX_PROBES': '$maximumProbeCount',
'FULL_TABLE_BEHAVIOR': '"$fullTableBehavior"',
...?parameters,
},
);
}