Class EvaluationContext
Inheritance
System.Object
EvaluationContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: SpiceSharpParser.dll
Syntax
public class EvaluationContext
Constructors
|
Improve this Doc
View Source
EvaluationContext(String, ISpiceNetlistCaseSensitivitySettings, IRandomizer, IExpressionParserFactory, IExpressionFeaturesReader, IExpressionValueProvider, INameGenerator, IResultService)
Declaration
public EvaluationContext(string name, ISpiceNetlistCaseSensitivitySettings caseSettings, IRandomizer randomizer, IExpressionParserFactory expressionParserFactory, IExpressionFeaturesReader expressionFeaturesReader, IExpressionValueProvider expressionValueProvider, INameGenerator nameGenerator, IResultService resultService)
Parameters
Properties
|
Improve this Doc
View Source
Arguments
Declaration
public Dictionary<string, Expression> Arguments { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, Expression> |
|
|
Improve this Doc
View Source
CaseSettings
Declaration
public ISpiceNetlistCaseSensitivitySettings CaseSettings { get; }
Property Value
|
Improve this Doc
View Source
Children
Gets or sets the children simulationEvaluators.
Declaration
public List<EvaluationContext> Children { get; set; }
Property Value
|
Improve this Doc
View Source
ExpressionFeaturesReader
Declaration
public IExpressionFeaturesReader ExpressionFeaturesReader { get; }
Property Value
|
Improve this Doc
View Source
ExpressionParserFactory
Declaration
protected IExpressionParserFactory ExpressionParserFactory { get; }
Property Value
|
Improve this Doc
View Source
ExpressionRegistry
Gets or sets expression registry for the context.
Declaration
public ExpressionRegistry ExpressionRegistry { get; set; }
Property Value
|
Improve this Doc
View Source
ExpressionValueProvider
Declaration
public IExpressionValueProvider ExpressionValueProvider { get; }
Property Value
|
Improve this Doc
View Source
FunctionArguments
Declaration
public Dictionary<string, List<string>> FunctionArguments { get; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.String>> |
|
|
Improve this Doc
View Source
Functions
Gets or sets custom functions.
Declaration
public Dictionary<string, List<IFunction>> Functions { get; protected set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<IFunction>> |
|
|
Improve this Doc
View Source
FunctionsBody
Declaration
public Dictionary<string, string> FunctionsBody { get; protected set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
|
|
Improve this Doc
View Source
Name
Gets the name of the context.
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
NameGenerator
Declaration
public INameGenerator NameGenerator { get; set; }
Property Value
|
Improve this Doc
View Source
Parameters
Gets or sets the parameters.
Declaration
public Dictionary<string, Expression> Parameters { get; protected set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, Expression> |
|
|
Improve this Doc
View Source
Randomizer
Declaration
public IRandomizer Randomizer { get; set; }
Property Value
|
Improve this Doc
View Source
ResultService
Declaration
public IResultService ResultService { get; }
Property Value
|
Improve this Doc
View Source
Seed
Gets or sets the random seed for the evaluator.
Declaration
public int? Seed { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
Simulation
Declaration
public Simulation Simulation { get; set; }
Property Value
Type |
Description |
SpiceSharp.Simulations.Simulation |
|
Methods
|
Improve this Doc
View Source
AddFunction(String, String, List<String>, IFunction)
Declaration
public void AddFunction(string functionName, string body, List<string> arguments, IFunction function)
Parameters
Type |
Name |
Description |
System.String |
functionName |
|
System.String |
body |
|
System.Collections.Generic.List<System.String> |
arguments |
|
IFunction |
function |
|
|
Improve this Doc
View Source
Clone()
Declaration
public virtual EvaluationContext Clone()
Returns
|
Improve this Doc
View Source
CreateChildContext(String, Boolean)
Declaration
public virtual EvaluationContext CreateChildContext(string name, bool addToChildren)
Parameters
Type |
Name |
Description |
System.String |
name |
Name of a context.
|
System.Boolean |
addToChildren |
Specifies whether context should be added to children.
|
Returns
|
Improve this Doc
View Source
Evaluate(Expression)
Declaration
public virtual double Evaluate(Expression expression)
Parameters
Returns
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Evaluate(String)
Evaluates a specific expression to double.
Declaration
public virtual double Evaluate(string expression)
Parameters
Type |
Name |
Description |
System.String |
expression |
An expression to evaluate.
|
Returns
Type |
Description |
System.Double |
A double value.
|
|
Improve this Doc
View Source
Find(String)
Declaration
public EvaluationContext Find(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
|
Improve this Doc
View Source
GetDeriveParser(EvaluationContext)
Declaration
public ExpressionParser GetDeriveParser(EvaluationContext context = null)
Parameters
Returns
|
Improve this Doc
View Source
GetExpression(String)
Gets the expression by name.
Declaration
public Expression GetExpression(string expressionName)
Parameters
Type |
Name |
Description |
System.String |
expressionName |
Name of expression.
|
Returns
|
Improve this Doc
View Source
GetExpressionNames()
Gets the expression names.
Declaration
public IEnumerable<string> GetExpressionNames()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
Enumerable of strings.
|
|
Improve this Doc
View Source
GetExpressionParameters(String, Boolean)
Declaration
public List<string> GetExpressionParameters(string expression, bool b)
Parameters
Type |
Name |
Description |
System.String |
expression |
|
System.Boolean |
b |
|
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
|
Improve this Doc
View Source
HaveFunction(String, String)
Declaration
public bool HaveFunction(string expression, string functionName)
Parameters
Type |
Name |
Description |
System.String |
expression |
|
System.String |
functionName |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HaveFunctions(String)
Declaration
public bool HaveFunctions(string expression)
Parameters
Type |
Name |
Description |
System.String |
expression |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HaveSpiceProperties(String)
Declaration
public bool HaveSpiceProperties(string expression)
Parameters
Type |
Name |
Description |
System.String |
expression |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SetNamedExpression(String, String)
Sets the named expression.
Declaration
public void SetNamedExpression(string expressionName, string expression)
Parameters
Type |
Name |
Description |
System.String |
expressionName |
Expression name.
|
System.String |
expression |
Expression.
|
|
Improve this Doc
View Source
SetParameter(String, Double)
Declaration
public void SetParameter(string parameterName, double value)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
A name of parameter.
|
System.Double |
value |
A value of parameter.
|
|
Improve this Doc
View Source
SetParameter(String, Func<Double>)
Declaration
public void SetParameter(string parameterName, Func<double> value)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
A name of parameter.
|
System.Func<System.Double> |
value |
A value of parameter.
|
|
Improve this Doc
View Source
SetParameter(String, String)
Declaration
public void SetParameter(string parameterName, string expression)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
A name of parameter.
|
System.String |
expression |
An expression of parameter.
|
|
Improve this Doc
View Source
SetParameter(String, String, Expression)
Declaration
protected void SetParameter(string parameterName, string expression, Expression parameter)
Parameters
Type |
Name |
Description |
System.String |
parameterName |
|
System.String |
expression |
|
Expression |
parameter |
|
|
Improve this Doc
View Source
SetParameters(Dictionary<String, String>)
Declaration
public void SetParameters(Dictionary<string, string> parameters)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
parameters |
|