Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SameScale.cs
1using System;
2using System.Threading.Tasks;
6
8{
13 {
22 : base(Graph, Start, Length, Expression)
23 {
24 }
25
29 public override string[] DefaultArgumentNames
30 {
31 get
32 {
33 return new string[] { "Graph" };
34 }
35 }
36
40 public override string FunctionName
41 {
42 get
43 {
44 return "SameScale";
45 }
46 }
47
55 {
56 if (Argument is Graph G)
57 {
58 G.SameScale = true;
59 return G;
60 }
61 else
62 throw new ScriptRuntimeException("Graph expected.", this);
63 }
64
71 public override Task<IElement> EvaluateScalarAsync(IElement Argument, Variables Variables)
72 {
73 return Task.FromResult(this.EvaluateScalar(Argument, Variables));
74 }
75 }
76}
Class managing a script expression.
Definition: Expression.cs:39
Makes a graph use the same scale for all axes.
Definition: SameScale.cs:13
override IElement EvaluateScalar(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Definition: SameScale.cs:54
override string FunctionName
Name of the function
Definition: SameScale.cs:41
SameScale(ScriptNode Graph, int Start, int Length, Expression Expression)
Makes a graph use the same scale for all axes.
Definition: SameScale.cs:21
override Task< IElement > EvaluateScalarAsync(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Definition: SameScale.cs:71
override string[] DefaultArgumentNames
Default Argument names
Definition: SameScale.cs:30
Base class for graphs.
Definition: Graph.cs:79
Base class for funcions of one scalar variable.
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