Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PdjVariation.cs
1using System;
4
6{
11 {
12 private readonly double a;
13 private readonly double b;
14 private readonly double c;
15 private readonly double d;
16
22 : base(new ScriptNode[] { a, b, c, d},
23 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar },
25 {
26 this.a = 0;
27 this.b = 0;
28 this.c = 0;
29 this.d = 0;
30 }
31
35 public PdjVariation(double A, double B, double C, double D,
38 : base(new ScriptNode[] { a, b, c, d },
39 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar },
41 {
42 this.a = A;
43 this.b = B;
44 this.c = C;
45 this.d = D;
46 }
47
51 public override string[] DefaultArgumentNames
52 {
53 get
54 {
55 return new string[] { "a", "b", "c", "d" };
56 }
57 }
58
63 {
68
69 return new PdjVariation(A, B, C, D, this.Arguments[0],
70 this.Arguments[1], this.Arguments[2], this.Arguments[3], this.Start, this.Length,
71 this.Expression);
72 }
73
77 public override void Operate(ref double x, ref double y)
78 {
79 x = Math.Sin(this.a * y) - Math.Cos(this.b * x);
80 y = Math.Sin(this.c * x) - Math.Cos(this.d * y);
81 }
82
86 public override string FunctionName => nameof(PdjVariation);
87 }
88}
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
Definition: PdjVariation.cs:77
PdjVariation(double A, double B, double C, double D, ScriptNode a, ScriptNode b, ScriptNode c, ScriptNode d, int Start, int Length, Expression Expression)
TODO
Definition: PdjVariation.cs:35
PdjVariation(ScriptNode a, ScriptNode b, ScriptNode c, ScriptNode d, int Start, int Length, Expression Expression)
TODO
Definition: PdjVariation.cs:20
override IElement Evaluate(IElement[] Arguments, Variables Variables)
TODO
Definition: PdjVariation.cs:62
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