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;
2using System.Collections.Generic;
3using System.Numerics;
9
11{
16 {
20 protected double[] homogeneousTransform = new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
21
25 protected double variationWeight = 1;
26
30 protected double re;
31
35 protected double im;
36
42 : base(new ScriptNode[] { Parameter1, Parameter2 },
43 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar }, Start, Length, Expression)
44 {
45 }
46
50 protected FlameVariationOneComplexParameter(Complex z, ScriptNode Parameter,
52 : base(new ScriptNode[] { Parameter }, new ArgumentType[] { ArgumentType.Scalar },
54 {
55 this.re = z.Real;
56 this.im = z.Imaginary;
57 }
58
62 protected FlameVariationOneComplexParameter(double Re, double Im, ScriptNode Parameter1,
63 ScriptNode Parameter2, int Start, int Length, Expression Expression)
64 : base(new ScriptNode[] { Parameter1, Parameter2 },
65 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar }, Start, Length, Expression)
66 {
67 this.re = Re;
68 this.im = Im;
69 }
70
74 public override string[] DefaultArgumentNames
75 {
76 get
77 {
78 return new string[] { "z" };
79 }
80 }
81
85 public override string ToString()
86 {
87 return LambdaDefinition.ToString(this);
88 }
89
90 #region IFlameVariation Members
91
95 public void Initialize(double[] HomogeneousTransform, double VariationWeight)
96 {
97 this.homogeneousTransform = HomogeneousTransform;
98 this.variationWeight = VariationWeight;
99 }
100
104 public abstract void Operate(ref double x, ref double y);
105
106 #endregion
107
108 #region ILambdaExpression Members
109
111 {
112 double x = Expression.ToDouble(Parameters[0].AssociatedObjectValue);
113 double y = Expression.ToDouble(Parameters[1].AssociatedObjectValue);
114
115 this.Operate(ref x, ref y);
116
117 return new DoubleVector(new double[] { x, y });
118 }
119
120 int ILambdaExpression.NrArguments
121 {
122 get { return 2; }
123 }
124
125 string[] ILambdaExpression.ArgumentNames
126 {
127 get { return FlameVariationZeroParameters.parameterNames; }
128 }
129
130 ArgumentType[] ILambdaExpression.ArgumentTypes
131 {
132 get { return FlameVariationZeroParameters.parameterTypes; }
133 }
134
135 #endregion
136
137 #region IElement members
138
142 public IElement Encapsulate(ICollection<IElement> Elements, ScriptNode Node)
143 {
144 return this;
145 }
146
150 public bool TryConvertTo(Type DesiredType, out object Value)
151 {
152 Value = null;
153 return false;
154 }
155
160 {
161 get
162 {
164 }
165 }
166
171 {
172 get
173 {
174 return this;
175 }
176 }
177
181 public bool IsScalar
182 {
183 get
184 {
185 return false;
186 }
187 }
188
192 public ICollection<IElement> ChildElements
193 {
194 get
195 {
196 return new IElement[0];
197 }
198 }
199
200 #endregion
201 }
202}
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
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
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:20
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