algomate 0.2.5
algomate: ^0.2.5 copied to clipboard
Professional algorithm selection companion with intelligent strategy selection, built-in benchmarking, and performance optimization.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.4 - 2025-09-03 #
Changed #
- Version bump to 0.2.4.
- Documentation and install snippet updates.
- All code formatted and static analysis passes.
0.2.3 - 2025-09-03 #
Changed #
- Version bump to 0.2.3.
- Manual edits to core logic, benchmark runner, and facade.
- CI workflow and benchmarking improvements.
- All tests and static analysis pass; formatting validated.
0.2.2 - 2025-09-02 #
Changed #
- Version bump to 0.2.2
- Docs: updated installation snippets and Thai README version labels.
- No code changes; formatting validated.
0.2.1 - 2025-09-02 #
Unreleased #
-
Add reproducible benchmark script
benchmarks/run_bench.sh
with JSON/CSV outputs and CI artifact publishing. -
Expose selection-only API:
AlgoSelectorFacade.recommend()
returningStrategyRecommendation
with explainability. -
CI: tests with coverage and Codecov upload; add badge to README.
-
Benchmark runner enhancements: CLI args (--iterations, --seed, --json, --csv) and basic memory snapshot (RSS). Micro-metrics placeholders for allocations/GC.
-
Version bump to 0.2.1.
-
Updated installation snippets and Thai README version mentions.
-
Housekeeping after 0.2.0 publish.
0.2.0 - 2025-09-02 #
Changed #
- Version bump to 0.2.0.
- Updated documentation references and installation snippets.
- Resolved doc comment lint infos (angle bracket HTML) for pub.dev scoring.
- Static analysis: No issues found; tests remain green.
0.1.9 - 2025-09-02 #
Changed #
- Updated version to 0.1.9 for new release.
- Various bug fixes and improvements for WASM/web compatibility.
- Improved documentation and Thai README.
- All tests pass and static analysis is clean.
0.1.8 - 2025-09-02 #
Added #
-
🚀 Comprehensive Algorithm Collection (54+ Algorithms):
🔄 Sorting Algorithms (8 strategies):
InsertionSort
: O(n²) - เหมาะสำหรับข้อมูลเล็ก < 50 ตัวInPlaceInsertionSort
: O(n²) - ประหยัด memory สำหรับข้อมูลที่เรียงแล้วบางส่วนBinaryInsertionSort
: O(n log n) - เร็วกว่า insertion sort ปกติMergeSort
: O(n log n) - เสถียร สำหรับข้อมูลปานกลาง-ใหญ่IterativeMergeSort
: O(n log n) - ไม่ recursive ประหยัด call stackHybridMergeSort
: O(n log n) - ผสม insertion + merge สำหรับประสิทธิภาพสูงParallelMergeSort
: O(n log n) - ใช้ multi-core สำหรับข้อมูลใหญ่ParallelQuickSort
: O(n log n) - parallel quicksort สำหรับประสิทธิภาพสูงสุด
🔍 Search Algorithms (3 strategies):
LinearSearch
: O(n) - ข้อมูลที่ไม่เรียงBinarySearch
: O(log n) - ข้อมูลที่เรียงแล้วParallelBinarySearch
: O(log n) - binary search แบบ parallel
🌐 Graph Algorithms (15+ strategies):
- Traversal: BFS, DFS, Bidirectional Search
- Shortest Path: Dijkstra, Bellman-Ford, Floyd-Warshall, SPFA
- Minimum Spanning Tree: Kruskal, Prim
- Network Analysis: Tarjan's SCC, Kosaraju's SCC, Articulation Points
- Topological: Topological Sort, DAG Shortest Path
- Connectivity: Connected Components, Bridge Finding
🧮 Dynamic Programming (10+ strategies):
- Classic DP: Fibonacci (3 variants), Knapsack, Coin Change
- String DP: Longest Common Subsequence, Edit Distance, Longest Increasing Subsequence
- Advanced DP: Matrix Chain Multiplication, Subset Sum, Palindrome Partitioning
🔤 String Processing (12+ strategies):
- Pattern Matching: KMP, Rabin-Karp, Z-Algorithm, Boyer-Moore
- Advanced Search: Aho-Corasick (multi-pattern), Suffix Array
- Text Structures: Trie construction and search, Suffix Tree
- Palindromes: Manacher's Algorithm, Palindrome detection
- Compression: Run Length Encoding, LZ77, Huffman Coding
🧮 Matrix Operations (5+ strategies):
- Standard Matrix Multiplication, Parallel Matrix Multiplication
- Strassen's Algorithm, Block Matrix Multiplication
- Parallel Strassen's Algorithm
-
🏗️ Custom Data Structures:
PriorityQueue<T>
: Min-heap implementation with O(log n) operationsBinarySearchTree<T>
: Self-balancing BST with O(log n) average operationsCircularBuffer<T>
: Fixed-size buffer with O(1) operationsGraph<T>
: Comprehensive graph with weighted/directed supportMatrix
: Dense matrix with conversion methods and operations
-
⚡ Performance Optimizations:
- 8+ million operations/second sustained throughput
- Zero-allocation hot paths for maximum performance
- Automatic CPU core detection and parallel execution
- Cache-friendly algorithms with optimal memory access patterns
- Web-compatible fallbacks for all parallel algorithms
Enhanced #
- 📖 Professional Documentation: Comprehensive README with installation steps at the top
- 🌐 Full Flutter Web Compatibility: Auto-platform detection with conditional imports
- 📊 Advanced Performance Monitoring: Built-in benchmarking with statistical analysis
- 🔧 Enterprise Configuration: Memory management, circuit breakers, rate limiting
- 🧪 Production-Ready Features: Error recovery, graceful degradation, resource pooling
Performance Benchmarks #
- Small datasets (50 elements): 625K elements/second
- Medium datasets (5,000 elements): 8.3M elements/second
- Large datasets (50,000 elements): 8.9M elements/second
- Memory constrained: 3.1M elements/second with hybrid algorithms
- Graph algorithms: 1M+ nodes/second for BFS/DFS traversal
- Dynamic programming: 2M+ operations/second for optimization problems
- String processing: 5M+ characters/second for pattern matching
Technical Details #
- Complete Clean Architecture implementation with domain-driven design
- 54+ Built-in algorithms covering O(1) to O(n³) time complexities
- Multi-platform support: Native (iOS, Android, Desktop) and Web compatibility
- Advanced error handling with functional Result types
- Comprehensive logging with configurable levels and filtering
- Memory management with configurable constraints and monitoring
- Statistical analysis with execution time tracking and algorithm selection insights
0.1.7 - 2025-09-02 #
Changed #
- Version bump to 0.1.7 for new release
- Updated documentation (README.md, doc/README.th.md, CUSTOM_OBJECTS_GUIDE.md)
- Minor improvements and formatting updates
Fixed #
- All tests pass and static analysis shows no issues
- Ensured compatibility for pub.dev publishing
Technical Details #
- Release tagged as v0.1.7 on GitHub
0.1.5 - 2025-09-01 #
Added #
-
🚀 Comprehensive Parallel/Divide-and-Conquer Algorithms for multi-core systems:
- ParallelMergeSort: Isolate-based sorting with work-stealing distribution
- ParallelQuickSort: Multi-core quicksort with pivot distribution and load balancing
- ParallelBinarySearch: Concurrent search across multiple data ranges
- ParallelMatrixMultiplication: Block decomposition matrix operations
- ParallelStrassenMultiplication: Recursive Strassen algorithm with parallel execution
- ParallelBFS/DFS: Graph traversal with level-synchronous processing
- ParallelConnectedComponents: Connected components analysis with work distribution
-
📊 Performance Architecture:
- 8M+ elements/second throughput with automatic CPU core detection
- Threshold-based switching between parallel and sequential execution
- Zero-allocation hot paths for maximum performance
- Cache-efficient block algorithms for matrix operations
-
🏗️ Advanced Infrastructure:
- Matrix class with toLists/fromLists conversion methods
- Graph class with adjacency list representation
- DirectExecutor interface for performance-critical scenarios
- ConcreteDirectExecutor implementation with timing capabilities
-
📚 Comprehensive Documentation:
- Complete Thai documentation (
doc/README.th.md
) with detailed explanations for beginners - Enhanced English README with 4 real-world use cases (gaming, mobile, financial, scientific)
- Performance comparisons with actual benchmark data
- Working demonstration examples with comprehensive performance analysis
- Complete Thai documentation (
-
✅ Quality Assurance:
- 26 comprehensive tests covering edge cases, performance, and integration scenarios
- Working demo programs with real performance benchmarking
- Complete code formatting and static analysis compliance
Technical Details #
- Architecture: Maintained Clean Architecture compliance with domain-driven design
- Multi-Core Support: Automatic detection of available CPU cores (tested with 10 cores)
- Memory Management: Intelligent memory allocation with automatic fallback mechanisms
- Platform Compatibility: Full support for all Dart platforms with graceful degradation
- Performance Monitoring: Built-in timing and algorithm selection reporting
Performance Benchmarks #
- Small datasets (50 elements): 625K elements/second using merge_sort
- Medium datasets (5,000 elements): 8.3M elements/second using merge_sort
- Large datasets (50,000 elements): 8.9M elements/second using parallel algorithms
- Memory constrained scenarios: 3.1M elements/second using hybrid algorithms
Files Added #
lib/src/infrastructure/strategies/sort/parallel_sort_algorithms.dart
(766 lines)lib/src/infrastructure/strategies/matrix/parallel_matrix_algorithms.dart
lib/src/infrastructure/strategies/graph/parallel_graph_algorithms.dart
example/algomate_demo.dart
- Working comprehensive demonstrationdoc/README.th.md
- Complete Thai documentation- 21+ additional example and implementation files
0.1.4 - 2025-09-01 #
Fixed #
- CHANGELOG.md Compliance: Added missing version 0.1.3 reference with detailed technical notes addressing pub.dev validation requirements
- Dart Formatting: Fixed code formatting issues in
isolate_executor.dart
to comply withdart format
standards - Pub.dev Scoring: Addressed "Follow Dart file conventions" and "Partially passed static analysis" validation failures
Technical Details #
- Updated CHANGELOG.md to include comprehensive 0.1.3 release notes with proper version references per Dart package conventions
- Applied
dart format
to resolve formatting inconsistencies detected by pub.dev static analysis - Ensured compliance with pub.dev package scoring criteria for better discoverability
- Maintained backward compatibility while improving pub.dev package scoring
Validation Status #
- ✅ CHANGELOG.md: Now includes proper version references and formatting
- ✅ Code Formatting: All files comply with Dart formatting standards
- ✅ Static Analysis: Passes pub.dev validation without warnings
- ✅ Package Scoring: Improved compliance with pub.dev guidelines
Technical Details #
- Updated CHANGELOG.md to include comprehensive 0.1.3 release notes with web compatibility features
- Applied
dart format
to resolve formatting inconsistencies detected by pub.dev analysis - Ensured compliance with Dart package conventions for CHANGELOG.md
- Maintained backward compatibility while improving pub.dev package scoring
Validation Status #
- ✅ CHANGELOG.md now contains reference to current version (0.1.4)
- ✅ All files pass
dart format
validation - ✅ Static analysis passes with "No issues found!"
- ✅ All 26 tests continue to pass
0.1.3 - 2025-09-01 #
Added #
- 🌐 Web Platform Compatibility: Full support for web/WASM platforms without breaking native performance
StubIsolateExecutor
: Web-compatible isolate executor for platforms withoutdart:isolate
support- Conditional export system with automatic platform detection using
dart.library.html
- Platform-aware isolate executor exports in
isolate_executor.dart
Fixed #
- Resolved pub.dev web/WASM platform compatibility warnings
- Fixed "Package not compatible with platform Web" validation errors
- Maintained native performance while adding web compatibility layer
Changed #
- Updated main library exports to use conditional isolate executor
- Enhanced platform detection for seamless cross-platform deployment
- Improved pub.dev scoring with comprehensive platform support
Technical Details #
- Created
lib/src/infrastructure/adapters/concurrency/stub_isolate_executor.dart
for web compatibility - Implemented conditional exports in
lib/src/infrastructure/adapters/concurrency/isolate_executor.dart
- Updated
lib/algomate.dart
to use platform-aware isolate executor - All 26 tests continue to pass across all supported platforms
- Supports Android, iOS, Linux, macOS, Web, and Windows platforms
0.1.2 - 2025-01-24 #
Fixed #
- Fixed repository URL format from
kidpech-code
toKidpech-code
to match actual GitHub repository - Applied comprehensive code formatting using
dart format
across all 35 files - Added 182 trailing commas for consistent code style compliance
- Resolved all pub.dev static analysis formatting issues
Technical Details #
- Updated pubspec.yaml URLs to use correct GitHub username casing
- Applied automatic Dart formatting fixes for better code consistency
- Improved pub.dev scoring by addressing code formatting requirements
- All tests continue to pass (26/26) after formatting changes
0.1.1 - 2025-01-24 #
Fixed #
- Fixed documentation comment angle bracket escaping issues for pub.dev lint compliance
- Shortened package description to meet pub.dev requirements (117 characters)
- Improved pub.dev scoring by addressing post-publication validation feedback
Technical Details #
- Fixed HTML interpretation of angle brackets in documentation comments across all files
- Updated pubspec.yaml description for better search engine optimization
- Resolved all static analysis warnings related to documentation formatting
0.1.0 - 2025-09-01 #
Added #
- 🎯 Intelligent Algorithm Selection: Context-aware strategy selection based on data characteristics
- ⚡ Performance-Focused Architecture: Zero-allocation hot paths with traditional loops
- 🏗️ Clean Architecture Implementation: Complete DDD + Clean Architecture with 4 distinct layers
- 📊 Built-in Algorithm Library:
- 6 sorting strategies (InsertionSort, InPlaceInsertionSort, BinaryInsertionSort, MergeSort, IterativeMergeSort, HybridMergeSort)
- 2 search strategies (LinearSearch, BinarySearch)
- 🔧 Comprehensive Infrastructure:
- Statistical benchmarking with
HarnessBenchmarkRunner
,SimpleBenchmarkRunner
,MockBenchmarkRunner
- Isolate execution with
DartIsolateExecutor
,StubIsolateExecutor
,MockIsolateExecutor
- Flexible logging with
ConsoleLogger
,SilentLogger
,BufferedLogger
- Statistical benchmarking with
- 🧪 Production-Ready Features:
- Functional error handling with
Result<T, Failure>
pattern - Resource management for isolate execution
- Configurable logging levels and statistics
- Functional error handling with
- 🔄 Advanced Capabilities:
- CPU-intensive operations in isolates with timeout support
- Performance measurement and comparison tools
- Custom strategy registration system
- 📝 Developer Experience:
- Simple facade API (
AlgoSelectorFacade.development()
) - Builder pattern configuration (
AlgoMate.createSelector()
) - Comprehensive documentation and examples
- Type-safe strategy storage and execution
- Simple facade API (
Technical Details #
- Architecture: Domain-Driven Design with Clean Architecture principles
- Layers: Domain (6 files), Application (4 files), Infrastructure (10 files), Interface (2 files)
- Dependencies: Flutter, Meta for annotations
- Development Dependencies: Flutter Test, Benchmark Harness, Flutter Lints
- Total Files: 25 implementation files
- Test Coverage: Basic unit tests with integration scenarios
- Performance: Optimized for speed with zero-allocation hot paths
Breaking Changes #
- N/A (Initial release)
Deprecated #
- N/A (Initial release)
Removed #
- N/A (Initial release)
Fixed #
- N/A (Initial release)
Security #
- N/A (Initial release)