Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Percent.cs
5
7{
12 {
22 {
23 }
24
30 public override IElement Evaluate(double Operand)
31 {
32 return new DoubleNumber(Operand / 100);
33 }
34
41 public ScriptNode Differentiate(string VariableName, Variables Variables)
42 {
43 if (this.op is IDifferentiable Differentiable)
44 {
45 return new Percent(
46 Differentiable.Differentiate(VariableName, Variables),
47 this.Start, this.Length, this.Expression);
48 }
49 else
50 throw new ScriptRuntimeException("Operand not differentiable.", this);
51 }
52
53 }
54}
Class managing a script expression.
Definition: Expression.cs:41
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Base class for unary double operators.
ScriptNode Differentiate(string VariableName, Variables Variables)
Differentiates a script node, if possible.
Definition: Percent.cs:41
override IElement Evaluate(double Operand)
Evaluates the double operator.
Definition: Percent.cs:30
Percent(ScriptNode Operand, int Start, int Length, Expression Expression)
Percent operator.
Definition: Percent.cs:20
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:21
Base interface for lambda expressions.