Skip to content

Releases: eduherminio/AoCHelper

v0.14.0

06 Dec 14:35
Compare
Choose a tag to compare

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

04 Dec 22:43
Compare
Choose a tag to compare

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:

image

v0.12.1

03 Dec 23:05
Compare
Choose a tag to compare

Allow for higher resolution timings (#30)

  • Use Stopwatch.ElapsedTicks rather than Stopwatch.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, and Color.OrangeRed1 will be in place between 1s and 10s.

* 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

02 Dec 23:46
Compare
Choose a tag to compare

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 whose CalculateIndex() method returns 1 (i.e. Day01, Day_01, Problem01, Problem_01, etc.)
  • Solver.Solve(1, 3 ,4) will solve all problems whose CalculateIndex() method returns 1, 3 or 4.
  • Solver.Solve(0) will solve all problems whose CalculateIndex() returns 0, that is, any problem whose CalculateIndex() can't parse the index.

v0.10.0

29 Nov 19:17
Compare
Choose a tag to compare
  • Add option to prevent the console from being cleared (i.e., to compare results) to Solve<T>() and SolveLast().

v0.9.0

29 Nov 17:11
Compare
Choose a tag to compare
  • Add Solver.SolveLast().

v0.8.2

28 Nov 22:49
Compare
Choose a tag to compare
  • 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

28 Nov 19:57
Compare
Choose a tag to compare
  • Make .txt the default extension.

v0.8.0

28 Nov 18:05
Compare
Choose a tag to compare
  • Make ProblemSolver and all its methods static.
  • Rename ProblemSolver to Solver.
  • Add Solve(params Type[]) and Solve(IEnumerable<Type>)
  • Remove Solve() and SolveAll() methods and remove WithMetrics 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();

image

After:

using AoCHelper.PoC;

Solver.SolveAll();

image

v0.7.0

26 Nov 21:11
Compare
Choose a tag to compare
  • Get rid of IProblem.
  • Refactor BaseProblem to add ClassPrefix, Index(), InputFileExtension and InputFileDirPath; making them overridable.
  • Rename FilePath to InputFilePath to be overridable.
  • Add BaseDay, with "Day" as ClassPrefix and ".txt" as InputFileExtension.
  • Enable nullable.