Binding function tree
This commit is contained in:
@@ -17,6 +17,7 @@ namespace StructureHelperCommon.Models.Functions.Decorator
|
||||
public LimXDecorator(IOneVariableFunction function, double leftBound, double rightBound) : base(function)
|
||||
{
|
||||
Name = $"x\u2208[{leftBound};{rightBound}]";
|
||||
FullName = $"{function.FullName}/{Name}";
|
||||
this.leftBound = leftBound;
|
||||
this.rightBound = rightBound;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace StructureHelperCommon.Models.Functions.Decorator
|
||||
public LimYDecorator(IOneVariableFunction function, double downBound, double upBound) : base(function)
|
||||
{
|
||||
Name = $"y\u2208[{downBound};{upBound}]";
|
||||
FullName = $"{function.FullName}/{Name}";
|
||||
this.downBound = downBound;
|
||||
this.upBound = upBound;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace StructureHelperCommon.Models.Functions.Decorator
|
||||
{
|
||||
this.factor = factor;
|
||||
Name = $"y=f({factor}x)";
|
||||
FullName = $"{function.FullName}/{Name}";
|
||||
}
|
||||
public override bool Check()
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace StructureHelperCommon.Models.Functions.Decorator
|
||||
{
|
||||
this.factor = factor;
|
||||
Name = $"y={factor}f(x)";
|
||||
FullName = $"{function.FullName}/{Name}";
|
||||
}
|
||||
public override bool Check()
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace StructureHelperCommon.Models.Functions
|
||||
public FunctionPurpose FunctionPurpose { get; set; }
|
||||
public string Group { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Description { get ; set; }
|
||||
public int Step { get; set; }
|
||||
public string Formula
|
||||
@@ -87,7 +88,8 @@ namespace StructureHelperCommon.Models.Functions
|
||||
{
|
||||
var formulaFunction = new FormulaFunction();
|
||||
formulaFunction.Type = Type;
|
||||
formulaFunction.Name = $"{Name} {COPY}";
|
||||
formulaFunction.Name = $"{Name} {COPY}";
|
||||
formulaFunction.FullName = formulaFunction.Name;
|
||||
formulaFunction.Description = Description;
|
||||
formulaFunction.Formula = Formula;
|
||||
formulaFunction.IsUser = true;
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace StructureHelperCommon.Models.Functions
|
||||
public FunctionPurpose FunctionPurpose { get; set; }
|
||||
public string Group { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string Description { get; set; }
|
||||
public List<GraphPoint> Table { get; set; }
|
||||
public Guid Id => throw new NotImplementedException();
|
||||
@@ -62,6 +63,7 @@ namespace StructureHelperCommon.Models.Functions
|
||||
var tableFunction = new TableFunction();
|
||||
tableFunction.Type = Type;
|
||||
tableFunction.Name = $"{Name} {COPY}";
|
||||
tableFunction.FullName = tableFunction.Name;
|
||||
tableFunction.Description = Description;
|
||||
var newTable = new List<GraphPoint>();
|
||||
Table.ForEach(x => newTable.Add(x.Clone() as GraphPoint));
|
||||
@@ -71,7 +73,6 @@ namespace StructureHelperCommon.Models.Functions
|
||||
tableFunction.FunctionPurpose = FunctionPurpose;
|
||||
return tableFunction;
|
||||
}
|
||||
|
||||
public double GetByX(double xValue)
|
||||
{
|
||||
double yValue = 0;
|
||||
|
||||
Reference in New Issue
Block a user