Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
FlameVariationOneComplexParameter.cs
1using System;
3using System.Numerics;
10
12{
17 {
21 protected double[] homogeneousTransform = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
22
26 protected double variationWeight = 1;
27
31 protected double re;
32
36 protected double im;
37
43 : base(new ScriptNode[] { Parameter1, Parameter2 },
44 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar }, Start, Length, Expression)
45 {
46 }
47
51 protected FlameVariationOneComplexParameter(Complex z, ScriptNode Parameter,
53 : base(new ScriptNode[] { Parameter }, new ArgumentType[] { ArgumentType.Scalar },
55 {
56 this.re = z.Real;
57 this.im = z.Imaginary;
58 }
59
63 protected FlameVariationOneComplexParameter(double Re, double Im, ScriptNode Parameter1,
64 ScriptNode Parameter2, int Start, int Length, Expression Expression)
65 : base(new ScriptNode[] { Parameter1, Parameter2 },
66 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar }, Start, Length, Expression)
67 {
68 this.re = Re;
69 this.im = Im;
70 }
71
75 public override string[] DefaultArgumentNames
76 {
77 get
78 {
79 return new string[] { "z" };
80 }
81 }
82
86 public override string ToString()
87 {
88 return LambdaDefinition.ToString(this);
89 }
90
91 #region IFlameVariation Members
92
96 public void Initialize(double[] HomogeneousTransform, double VariationWeight)
97 {
98 this.homogeneousTransform = HomogeneousTransform;
99 this.variationWeight = VariationWeight;
100 }
101
105 public abstract void Operate(ref double x, ref double y);
106
107 #endregion
108
109 #region ILambdaExpression Members
110
112 {
113 double x = Expression.ToDouble(Parameters[0].AssociatedObjectValue);
114 double y = Expression.ToDouble(Parameters[1].AssociatedObjectValue);
115
116 this.Operate(ref x, ref y);
117
118 return new DoubleVector(new double[] { x, y });
119 }
120
121 int ILambdaExpression.NrArguments
122 {
123 get { return 2; }
124 }
125
126 string[] ILambdaExpression.ArgumentNames
127 {
128 get { return FlameVariationZeroParameters.parameterNames; }
129 }
130
131 ArgumentType[] ILambdaExpression.ArgumentTypes
132 {
133 get { return FlameVariationZeroParameters.parameterTypes; }
134 }
135
136 #endregion
137
138 #region IElement members
139
144 {
145 return this;
146 }
147
151 public IElement Encapsulate(ICollection<IElement> Elements, ScriptNode Node)
152 {
153 return this;
154 }
155
159 public bool TryConvertTo(Type DesiredType, out object Value)
160 {
161 Value = null;
162 return false;
163 }
164
169 {
170 get
171 {
173 }
174 }
175
180 {
181 get
182 {
183 return this;
184 }
185 }
186
190 public bool IsScalar
191 {
192 get
193 {
194 return false;
195 }
196 }
197
201 public ICollection<IElement> ChildElements
202 {
203 get
204 {
205 return Array.Empty<IElement>();
206 }
207 }
208
209 #endregion
210 }
211}
A chunked list is a linked list of chunks of objects of type T .
Definition: ChunkedList.cs:54
Class managing a script expression.
Definition: Expression.cs:41
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:5110
FlameVariationOneComplexParameter(double Re, double Im, ScriptNode Parameter1, ScriptNode Parameter2, int Start, int Length, Expression Expression)
TODO
IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
TODO
void Initialize(double[] HomogeneousTransform, double VariationWeight)
TODO
FlameVariationOneComplexParameter(Complex z, ScriptNode Parameter, int Start, int Length, Expression Expression)
TODO
FlameVariationOneComplexParameter(ScriptNode Parameter1, ScriptNode Parameter2, int Start, int Length, Expression Expression)
TODO
IElement Encapsulate(ChunkedList< IElement > Elements, ScriptNode Node)
TODO
abstract void Operate(ref double x, ref double y)
TODO
static readonly SetOfVariations Instance
TODO
Base class for multivariate funcions.
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:21
Basic interface for all types of sets.
Definition: ISet.cs:10
Base interface for lambda expressions.
IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the lambda expression.
ArgumentType
Type of parameter used in a function definition or a lambda definition.
Definition: IFunction.cs:9