SawLocalDatasourceImpl class
Implementation of SawLocalDatasource that handles SAW algorithm operations.
This implementation supports:
- Automatic weight normalization
- Isolate-based processing for large datasets
- Performance profiling
- Comprehensive input validation
Example usage:
final datasource = SawLocalDatasourceImpl();
// Generate matrix
final matrix = await datasource.generateSawMatrix(
listAlternative: alternatives,
listCriteria: criteria,
);
// Calculate results
final results = await datasource.calculateSawResult(matrix: matrix);
- Implemented types
- Mixed-in types
Constructors
- SawLocalDatasourceImpl({DecisionMakingHelper? helper, Stopwatch? stopwatch, DecisionIsolateMain? isolate})
- Creates an instance of SawLocalDatasourceImpl.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- helper → DecisionMakingHelper
-
no setteroverride
- isolate → DecisionIsolateMain
-
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calculateResultWithExistingMatrix(
{required List< WeightedDecisionMatrix> matrix}) → Future<List< WeightedDecisionResult> > -
==========================================================================
RESULT WITH CRITERIAoverride -
calculateSawResult(
{required List< WeightedDecisionMatrix> matrix}) → Future<List< WeightedDecisionResult> > -
Calculates the final SAW results from a decision matrix.
override
-
ensureIdsForAlternatives(
List< WeightedDecisionAlternative> alternatives) → List<WeightedDecisionAlternative> -
Ensures all alternatives have unique IDs.
inherited
-
ensureIdsForCriteria(
List< WeightedDecisionCriteria> criteria) → List<WeightedDecisionCriteria> -
Ensures all criteria have unique IDs.
inherited
-
generateMatrixDirectly(
List< WeightedDecisionAlternative> alternatives, List<WeightedDecisionCriteria> criteria) → List<WeightedDecisionMatrix> -
Generates matrix directly without using isolate.
inherited
-
generateMatrixWithIsolate(
DecisionAlgorithm algorithm, DecisionProcessingIsolateCommand command, List< WeightedDecisionAlternative> alternatives, List<WeightedDecisionCriteria> criteria) → Future<List< WeightedDecisionMatrix> > -
Generates matrix using isolate for large datasets.
inherited
-
generateSawMatrix(
{required List< WeightedDecisionAlternative> listAlternative, required List<WeightedDecisionCriteria> listCriteria}) → Future<List< WeightedDecisionMatrix> > -
MATRIXGENERATE SAW MATRIXoverride -
normalizeCriteriaWeights(
List< WeightedDecisionCriteria> criteria) → List<WeightedDecisionCriteria> -
Normalizes criteria weights to sum to exactly 100%.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateAndFixMatrix(
List< WeightedDecisionMatrix> matrix) → List<WeightedDecisionMatrix> -
Validates and repairs matrix data structure.
inherited
-
validateInputs(
List< WeightedDecisionAlternative> alternatives, List<WeightedDecisionCriteria> criteria) → void -
Validates input data for matrix generation.
inherited
-
validateMaxInputValue(
List< WeightedDecisionMatrix> matrix) → Future<void> -
Validates that all rating values do not exceed their criteria's maximum value.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited