Add calculators saving

This commit is contained in:
Evgeny Redikultsev
2024-10-19 20:32:25 +05:00
parent d16c0e1f79
commit d3a1992f4d
131 changed files with 1742 additions and 375 deletions

View File

@@ -1,8 +1,25 @@
namespace StructureHelperCommon.Models.Calculators
using System;
namespace StructureHelperCommon.Models.Calculators
{
/// <inheritdoc/>
public class Accuracy : IAccuracy
{
/// <inheritdoc/>
public Guid Id { get; }
/// <inheritdoc/>
public double IterationAccuracy { get; set; }
/// <inheritdoc/>
public int MaxIterationCount { get; set; }
public Accuracy(Guid id)
{
Id = id;
}
public Accuracy() : this (Guid.NewGuid())
{
}
}
}

View File

@@ -21,6 +21,8 @@ namespace StructureHelperCommon.Models.Calculators
public Action<IResult> ActionToOutputResults { get; set; }
public IShiftTraceLogger? TraceLogger { get; set; }
public Guid Id => throw new NotImplementedException();
public FindParameterCalculator()
{
InputData = new FindParameterCalculatorInputData();

View File

@@ -1,9 +1,11 @@
namespace StructureHelperCommon.Models.Calculators
using StructureHelperCommon.Infrastructures.Interfaces;
namespace StructureHelperCommon.Models.Calculators
{
/// <summary>
/// Rate of calculation which based on iteration of finished accuracy
/// </summary>
public interface IAccuracy
public interface IAccuracy : ISaveable
{
/// <summary>
/// Max accuracy of iteration

View File

@@ -3,7 +3,7 @@ using System;
namespace StructureHelperCommon.Models.Calculators
{
public interface ICalculator : ILogic, ICloneable
public interface ICalculator : ILogic, ISaveable, ICloneable
{
string Name { get; set; }
/// <summary>