Releases: eduherminio/AoCHelper
v0.14.0
Add SolverConfiguration
class as the way to modify the default Solver
behavior-
It has the following public properties;
bool ClearConsole
bool ShowOverallResults
string? ElapsedTimeFormatSpecifier
Consequently, add:
Solver.Solve<TProblem>(SolverConfiguration)
Solver.SolveLast(SolverConfiguration)
Solver.Solve(IEnumerable<uint>, SolverConfiguration)
Solver.Solve(IEnumerable<Type>, SolverConfiguration)
Solver.Solve( SolverConfiguration, params uint[])
Solver.Solve( SolverConfiguration, params Type[])
Deprecate (marked with ObsoleteAttribute
, will be removed in the next major release):
Solve<TProblem>(bool)
SolveLast(bool)
Solver.Solve(params uint[])
Solver.Solve(params Type[])
Solver.ElapsedTimeFormatSpecifier
v0.13.0
Add overall stats when running SolveAll
Add a panel when using Solver.SolveAll()
with:
- Overall elapsed time.
- Mean elapsed time per day.
- Part 1 and 2 elapsed time.
- Part 1 and 2 mean elapsed time per part.
Mean times are colorized following the same logic as regular elapsed times.
Known limitations:
- Mean daily time should follow another colorizing logic
- Mean times are rounded to the nearest ms.
This resolves #31
SolveAll()
results with overall panel:
v0.12.1
Allow for higher resolution timings (#30)
-
Use
Stopwatch.ElapsedTicks
rather thanStopwatch.Milliseconds
, and show show 2 decimal digits if the measured time is less than 1ms -
Add public
Solver.ElapsedTimeFormatSpecifier
property*, modifiable by anyone that wants to get non-default behavior regarding resolution. It supports Standard numeric format strings. -
Re-evaluate elapsed time colors:
- Add
Color.Green1,
for <10ms. - Relax
Color.Red1
: now it's > 10s, andColor.OrangeRed1
will be in place between 1s and 10s.
- Add
* This solution may not last long as it is, I'm currently considering some kind of SolvingConfiguration
/SolvingOptions
class that will contain that and a few other options.
v0.11.0
Solve problem by index (#27).
Solve(params uint[])
and Solve(IEnumerable<uint>)
overloads have been added, allowing Solver
to solve problems by index (according to BaseProblem.CalculateIndex()
).
i.e.
Solver.Solve(1)
will solve all problems whoseCalculateIndex()
method returns 1 (i.e.Day01
,Day_01
,Problem01
,Problem_01
, etc.)Solver.Solve(1, 3 ,4)
will solve all problems whoseCalculateIndex()
method returns 1, 3 or 4.Solver.Solve(0)
will solve all problems whoseCalculateIndex()
returns 0, that is, any problem whoseCalculateIndex()
can't parse the index.
v0.10.0
- Add option to prevent the console from being cleared (i.e., to compare results) to
Solve<T>()
andSolveLast()
.
v0.9.0
- Add
Solver.SolveLast()
.
v0.8.2
- Prevent exceptions from stopping the execution (
[Not implemented]
is printed at solution instead). - Print minutes + seconds if seconds > 60 (
102 s
->1 min 42 s
). - Change color boundaries to be
<
instead of<=
.
v0.8.1
- Make
.txt
the default extension.
v0.8.0
- Make
ProblemSolver
and all its methods static. - Rename
ProblemSolver
toSolver
. - Add
Solve(params Type[]) and Solve(IEnumerable<Type>)
- Remove
Solve()
andSolveAll()
methods and removeWithMetrics
from the other ones, simplifying the API.Solve<TProblem>()
SolveAll<TProblem>()
Solve(params Type[])
Solve(IEnumerable<Type>)
- Use
Spectre.Console
.
Before:
using AoCHelper.PoC;
var solver = new ProblemSolver();
solver.SolveAllProblemsWithMetrics();
After:
using AoCHelper.PoC;
Solver.SolveAll();
v0.7.0
- Get rid of
IProblem
. - Refactor
BaseProblem
to addClassPrefix
,Index()
,InputFileExtension
andInputFileDirPath
; making them overridable. - Rename
FilePath
toInputFilePath
to be overridable. - Add
BaseDay
, with "Day" asClassPrefix
and ".txt" asInputFileExtension
. - Enable nullable.