Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
zLogNVariation.cs
1using System;
4
6{
11 {
12 private readonly double N;
13
18 : base(Parameter, Start, Length, Expression)
19 {
20 this.N = 10;
21 }
22
23 private ZLogNVariation(double N, ScriptNode Parameter, int Start, int Length, Expression Expression)
24 : base(Parameter, Start, Length, Expression)
25 {
26 this.N = N;
27 }
28
33 {
34 return new ZLogNVariation(Expression.ToDouble(Argument.AssociatedObjectValue), this.Argument, this.Start, this.Length, this.Expression);
35 }
36
40 public override void Operate(ref double x, ref double y)
41 {
42 double d = 1.0 / Math.Log(N);
43 // logN(x+iy)
44 x = Math.Sqrt(x * x + y * y) * d;
45 y = Math.Atan2(y, x) * d;
46 }
47
51 public override string FunctionName => nameof(ZLogNVariation);
52 }
53}
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 IElement Evaluate(IElement Argument, Variables Variables)
TODO
override void Operate(ref double x, ref double y)
TODO
ZLogNVariation(ScriptNode Parameter, int Start, int Length, Expression Expression)
TODO
ScriptNode Argument
Function argument.
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
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20