AlgoMetadata class final

Immutable metadata describing an algorithm's characteristics and requirements.

Annotations
  • @immutable

Constructors

AlgoMetadata({required String name, required TimeComplexity timeComplexity, TimeComplexity spaceComplexity = TimeComplexity.o1, bool requiresSorted = false, int memoryOverheadBytes = 0, String? description})
Creates metadata for an algorithm strategy.
const

Properties

description → String?
Optional description of the algorithm
final
hashCode → int
The hash code for this object.
no setteroverride
memoryOverheadBytes → int
Additional memory overhead in bytes (0 for in-place algorithms)
final
name → String
Human-readable name of the algorithm (e.g., "binary_search", "merge_sort")
final
requiresSorted → bool
Whether the algorithm requires sorted input
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spaceComplexity → TimeComplexity
Space complexity of the algorithm (additional memory used)
final
timeComplexity → TimeComplexity
Time complexity of the algorithm
final

Methods

copyWith({String? name, TimeComplexity? timeComplexity, TimeComplexity? spaceComplexity, bool? requiresSorted, int? memoryOverheadBytes, String? description}) → AlgoMetadata
Creates a copy of this metadata with optional field overrides
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override