Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Bent2Variation.cs
3
5{
10 {
11 private readonly double x;
12 private readonly double y;
13
18 : base(new ScriptNode[] { x, y }, new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar },
20 {
21 this.x = 0;
22 this.y = 0;
23 }
24
25 private Bent2Variation(double X, double Y, ScriptNode x, ScriptNode y, int Start, int Length,
27 : base(new ScriptNode[] { x, y }, new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar },
29 {
30 this.x = X;
31 this.y = Y;
32 }
33
37 public override string[] DefaultArgumentNames
38 {
39 get
40 {
41 return new string[] { "x", "y" };
42 }
43 }
44
49 {
52
53 return new Bent2Variation(X, Y, this.Arguments[0], this.Arguments[1], this.Start, this.Length, this.Expression);
54 }
55
59 public override void Operate(ref double x, ref double y)
60 {
61 if (x < 0)
62 x *= this.x;
63
64 if (y < 0)
65 y *= this.y;
66 }
67
71 public override string FunctionName => nameof(Bent2Variation);
72 }
73}
Class managing a script expression.
Definition: Expression.cs:39
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:4824
override void Operate(ref double x, ref double y)
TODO
Bent2Variation(ScriptNode x, ScriptNode y, int Start, int Length, Expression Expression)
TODO
override IElement Evaluate(IElement[] Arguments, Variables Variables)
TODO
ScriptNode[] Arguments
Function arguments.
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
Expression Expression
Expression of which the node is a part.
Definition: ScriptNode.cs:177
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20
ArgumentType
Type of parameter used in a function definition or a lambda definition.
Definition: IFunction.cs:9