Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NewtonFractal.cs
1using System;
2using System.Numerics;
3using System.Text;
4using SkiaSharp;
11
13{
48 {
54 : base(new ScriptNode[] { z, dr, R, c, Palette, DimX, DimY },
55 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
56 ArgumentType.Normal, ArgumentType.Vector, ArgumentType.Scalar, ArgumentType.Scalar},
58 {
59 }
60
66 : base(new ScriptNode[] { z, dr, R, c, Palette, DimX },
67 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
68 ArgumentType.Normal, ArgumentType.Vector, ArgumentType.Scalar},
70 {
71 }
72
78 : base(new ScriptNode[] { z, dr, R, c, Palette },
79 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
80 ArgumentType.Normal, ArgumentType.Vector },
82 {
83 }
84
90 : base(new ScriptNode[] { z, dr, R, c },
91 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
92 ArgumentType.Normal },
94 {
95 }
96
100 public override string[] DefaultArgumentNames
101 {
102 get
103 {
104 return new string[] { "z", "dr", "R", "c", "Palette", "DimX", "DimY" };
105 }
106 }
107
112 {
113 string ColorExpression = null;
114 SKColor[] Palette;
115 double[] Coefficients = null;
116 Complex[] CoefficientsZ = null;
117 ILambdaExpression f = null;
118 ScriptNode fDef = null;
119 double rc, ic;
120 double dr;
121 Complex R;
122 int dimx, dimy;
123 int c = Arguments.Length;
124 int i = 0;
125 object Obj;
126
127 Obj = Arguments[i++].AssociatedObjectValue;
128 if (Obj is Complex z)
129 {
130 rc = z.Real;
131 ic = z.Imaginary;
132 }
133 else
134 {
135 rc = Expression.ToDouble(Obj);
136 ic = Expression.ToDouble(Arguments[i++].AssociatedObjectValue);
137 }
138
139 if (i >= c)
140 throw new ScriptRuntimeException("Insufficient parameters in call to NewtonFractal().", this);
141
142 dr = Expression.ToDouble(Arguments[i++].AssociatedObjectValue);
143
144 if (i < c && ((Obj = Arguments[i].AssociatedObjectValue) is double || Obj is Complex))
145 {
146 R = Expression.ToComplex(Obj);
147 i++;
148 }
149 else
150 {
151 R = Complex.One;
152
153 if (i < c && this.Arguments[i] is null)
154 i++;
155 }
156
157 if (i < c)
158 {
159 if (Arguments[i] is DoubleVector)
160 Coefficients = (double[])Arguments[i++].AssociatedObjectValue;
161 else if (Arguments[i] is ComplexVector)
162 CoefficientsZ = (Complex[])Arguments[i++].AssociatedObjectValue;
163 /*else if (Parameters[i] is RealPolynomial)
164 Coefficients = ((RealPolynomial)Arguments[i++].AssociatedObjectValue).Coefficients;
165 else if (Parameters[i] is ComplexPolynomial)
166 CoefficientsZ = ((ComplexPolynomial)Arguments[i++].AssociatedObjectValue).Coefficients;*/
167 else if (Arguments[i] is IVector)
168 {
169 IVector Vector = (IVector)Arguments[i++];
170 int j, d = Vector.Dimension;
171
172 CoefficientsZ = new Complex[d];
173 for (j = 0; j < d; j++)
174 CoefficientsZ[j] = Expression.ToComplex(Vector.GetElement(j).AssociatedObjectValue);
175 }
176 else if (Arguments[i].AssociatedObjectValue is ILambdaExpression)
177 {
179 if (f.NrArguments != 1)
180 throw new ScriptRuntimeException("Lambda expression in calls to NewtonFractal() must be of one variable.", this);
181
182 fDef = this.Arguments[i++];
183 }
184 else
185 {
186 throw new ScriptRuntimeException("Parameter " + (i + 1).ToString() +
187 " in call to NewtonFractal has to be a vector of numbers, containing coefficients " +
188 "of the polynomial to use. Now it was of type " + Arguments[i].GetType().FullName,
189 this);
190 }
191 }
192 else
193 throw new ScriptRuntimeException("Missing coefficients or lambda expression.", this);
194
195 if (i < c && !(this.Arguments[i] is null) && Arguments[i] is ObjectVector)
196 {
197 ColorExpression = this.Arguments[i].SubExpression;
199 }
200 else
201 {
202 Palette = ColorModels.RandomLinearAnalogousHSL.CreatePalette(128, 4, out int Seed, this, Variables);
203 ColorExpression = "RandomLinearAnalogousHSL(128,4," + Seed.ToString() + ")";
204
205 if (i < c && this.Arguments[i] is null)
206 i++;
207 }
208
209 if (i < c)
210 dimx = (int)Expression.ToDouble(Arguments[i++].AssociatedObjectValue);
211 else
212 dimx = 320;
213
214 if (i < c)
215 dimy = (int)Expression.ToDouble(Arguments[i++].AssociatedObjectValue);
216 else
217 dimy = 200;
218
219 if (i < c)
220 {
221 throw new ScriptRuntimeException("Parameter mismatch in call to NewtonFractal(r,c,dr,Coefficients[,Palette][,dimx[,dimy]]).",
222 this);
223 }
224
225 if (dimx <= 0 || dimx > 5000 || dimy <= 0 || dimy > 5000)
226 throw new FractalImageSizeScriptException(this);
227
228 if (!(f is null))
229 {
230 return CalcNewton(rc, ic, dr, R, f, fDef, Variables, Palette, dimx, dimy,
231 this, this.FractalZoomScript, new object[] { Palette, dimx, dimy, R, fDef, ColorExpression });
232 }
233 else if (!(CoefficientsZ is null))
234 {
235 return CalcNewton(Variables, rc, ic, dr, R, CoefficientsZ, Palette, dimx, dimy,
236 this, this.FractalZoomScript, new object[] { Palette, dimx, dimy, R, CoefficientsZ, ColorExpression });
237 }
238 else
239 {
240 return CalcNewton(Variables, rc, ic, dr, R, Coefficients, Palette, dimx, dimy,
241 this, this.FractalZoomScript, new object[] { Palette, dimx, dimy, R, Coefficients, ColorExpression });
242 }
243 }
244
245 private string FractalZoomScript(double r, double i, double Size, object State)
246 {
247 object[] Parameters = (object[])State;
248 int DimX = (int)Parameters[1];
249 int DimY = (int)Parameters[2];
250 Complex R = (Complex)Parameters[3];
251 double[] Coefficients = Parameters[4] as double[];
252 string ColorExpression = (string)Parameters[5];
253
254 StringBuilder sb = new StringBuilder();
255
256 sb.Append("NewtonFractal((");
257 sb.Append(Expression.ToString(r));
258 sb.Append(',');
259 sb.Append(Expression.ToString(i));
260 sb.Append("),");
261 sb.Append(Expression.ToString(Size / 4));
262 sb.Append(',');
263 sb.Append(Expression.ToString(R));
264 sb.Append(',');
265
266 if (Parameters[4] is ScriptNode fDef)
267 sb.Append(fDef.SubExpression);
268 else if (Parameters[4] is Complex[] CoefficientsZ)
269 sb.Append(Expression.ToString(CoefficientsZ));
270 else
271 sb.Append(Expression.ToString(Coefficients));
272
273 if (!string.IsNullOrEmpty(ColorExpression))
274 {
275 sb.Append(',');
276 sb.Append(ColorExpression);
277 }
278
279 sb.Append(',');
280 sb.Append(DimX.ToString());
281 sb.Append(',');
282 sb.Append(DimY.ToString());
283 sb.Append(')');
284
285 return sb.ToString();
286 }
287
291 public static FractalGraph CalcNewton(Variables Variables, double rCenter, double iCenter, double rDelta, Complex R,
292 double[] Coefficients, SKColor[] Palette, int Width, int Height, ScriptNode Node, FractalZoomScript FractalZoomScript,
293 object State)
294 {
295 byte[] reds;
296 byte[] greens;
297 byte[] blues;
298 double r0, i0, r1, i1;
299 double dr, di;
300 double r, i;
301 double zr, zi, zr2, zi2, zr3, zi3, zr4, zi4;
302 double RRe = R.Real;
303 double RIm = R.Imaginary;
304 double aspect;
305 double Temp;
306 int x, y;
307 int n, N;
308 int index;
309 int Degree = Coefficients.Length - 1;
310 SKColor cl;
311
312 N = Palette.Length;
313 reds = new byte[N];
314 greens = new byte[N];
315 blues = new byte[N];
316
317 for (x = 0; x < N; x++)
318 {
319 cl = Palette[x];
320 reds[x] = cl.Red;
321 greens[x] = cl.Green;
322 blues[x] = cl.Blue;
323 }
324
325 if (Degree < 2)
326 {
327 Array.Resize(ref Coefficients, 3);
328 while (Degree < 2)
329 Coefficients[++Degree] = 0;
330 }
331
332 double[] Prim = new double[Degree];
333 for (x = 1; x <= Degree; x++)
334 Prim[x - 1] = x * Coefficients[x];
335
336 Array.Reverse(Prim);
337 Coefficients = (double[])Coefficients.Clone();
338 Array.Reverse(Coefficients);
339
340 int size = Width * Height * 4;
341 double Conv = 1e-10;
342 double Div = 1e10;
343 byte[] rgb = new byte[size];
344
345 rDelta *= 0.5;
346 r0 = rCenter - rDelta;
347 r1 = rCenter + rDelta;
348
349 aspect = ((double)Width) / Height;
350
351 i0 = iCenter - rDelta / aspect;
352 i1 = iCenter + rDelta / aspect;
353
354 dr = (r1 - r0) / Width;
355 di = (i1 - i0) / Height;
356
357 for (y = 0, i = i0, index = 0; y < Height; y++, i += di)
358 {
359 for (x = 0, r = r0; x < Width; x++, r += dr)
360 {
361 zr = r;
362 zi = i;
363
364 n = 0;
365 do
366 {
367 // f:
368 zr2 = zi2 = 0;
369 foreach (double C in Coefficients)
370 {
371 Temp = zr2 * zr - zi2 * zi + C;
372 zi2 = zr2 * zi + zi2 * zr;
373 zr2 = Temp;
374 }
375
376 // f':
377 zr3 = zi3 = 0;
378 foreach (double C in Prim)
379 {
380 Temp = zr3 * zr - zi3 * zi + C;
381 zi3 = zr3 * zi + zi3 * zr;
382 zr3 = Temp;
383 }
384
385 // f/f':
386
387 Temp = 1.0 / (zr3 * zr3 + zi3 * zi3);
388 zr4 = (zr2 * zr3 + zi2 * zi3) * Temp;
389 zi4 = (zi2 * zr3 - zr2 * zi3) * Temp;
390
391 // R*f/f'
392 Temp = zr4 * RRe - zi4 * RIm;
393 zi4 = zr4 * RIm + zi4 * RRe;
394 zr4 = Temp;
395
396 zr -= zr4;
397 zi -= zi4;
398
399 Temp = Math.Sqrt(zr4 * zr4 + zi4 * zi4);
400 }
401 while ((Temp > Conv) && (Temp < Div) && (n++ < N));
402
403 if (Temp < Conv && n < N)
404 {
405 rgb[index++] = blues[n];
406 rgb[index++] = greens[n];
407 rgb[index++] = reds[n];
408 }
409 else
410 {
411 rgb[index++] = 0;
412 rgb[index++] = 0;
413 rgb[index++] = 0;
414 }
415
416 rgb[index++] = 255;
417 }
418 }
419
420 PixelInformation Pixels = new PixelInformationRaw(SKColorType.Bgra8888, rgb, Width, Height, Width << 2);
421 return new FractalGraph(Variables, Pixels, r0, i0, r1, i1, rDelta * 2, true, Node, FractalZoomScript, State);
422 }
423
427 public static FractalGraph CalcNewton(Variables Variables, double rCenter, double iCenter, double rDelta, Complex R,
428 Complex[] Coefficients, SKColor[] Palette, int Width, int Height, ScriptNode Node, FractalZoomScript FractalZoomScript,
429 object State)
430 {
431 byte[] reds;
432 byte[] greens;
433 byte[] blues;
434 double RRe = R.Real;
435 double RIm = R.Imaginary;
436 double r0, i0, r1, i1;
437 double dr, di;
438 double r, i;
439 double zr, zi, zr2, zi2, zr3, zi3, zr4, zi4;
440 double aspect;
441 double Temp;
442 int x, y;
443 int n, N;
444 int index;
445 int Degree = Coefficients.Length - 1;
446 SKColor cl;
447
448 N = Palette.Length;
449 reds = new byte[N];
450 greens = new byte[N];
451 blues = new byte[N];
452
453 for (x = 0; x < N; x++)
454 {
455 cl = Palette[x];
456 reds[x] = cl.Red;
457 greens[x] = cl.Green;
458 blues[x] = cl.Blue;
459 }
460
461 if (Degree < 2)
462 {
463 Array.Resize(ref Coefficients, 3);
464 while (Degree < 2)
465 Coefficients[++Degree] = Complex.Zero;
466 }
467
468 Complex[] Prim = new Complex[Degree];
469 for (x = 1; x <= Degree; x++)
470 Prim[x - 1] = x * Coefficients[x];
471
472 Array.Reverse(Prim);
473 Coefficients = (Complex[])Coefficients.Clone();
474 Array.Reverse(Coefficients);
475
476 int j, c = Prim.Length;
477 double[] ReC = new double[c + 1];
478 double[] ImC = new double[c + 1];
479 double[] RePrim = new double[c];
480 double[] ImPrim = new double[c];
481 Complex z;
482
483 for (j = 0; j < c; j++)
484 {
485 z = Coefficients[j];
486 ReC[j] = z.Real;
487 ImC[j] = z.Imaginary;
488
489 z = Prim[j];
490 RePrim[j] = z.Real;
491 ImPrim[j] = z.Imaginary;
492 }
493
494 z = Coefficients[j];
495 ReC[j] = z.Real;
496 ImC[j] = z.Imaginary;
497
498 int size = Width * Height * 4;
499 double Conv = 1e-10;
500 double Div = 1e10;
501 byte[] rgb = new byte[size];
502
503 rDelta *= 0.5;
504 r0 = rCenter - rDelta;
505 r1 = rCenter + rDelta;
506
507 aspect = ((double)Width) / Height;
508
509 i0 = iCenter - rDelta / aspect;
510 i1 = iCenter + rDelta / aspect;
511
512 dr = (r1 - r0) / Width;
513 di = (i1 - i0) / Height;
514
515 for (y = 0, i = i0, index = 0; y < Height; y++, i += di)
516 {
517 for (x = 0, r = r0; x < Width; x++, r += dr)
518 {
519 zr = r;
520 zi = i;
521
522 n = 0;
523 do
524 {
525 // f:
526 zr2 = zi2 = 0;
527 for (j = 0; j <= c; j++)
528 {
529 Temp = zr2 * zr - zi2 * zi + ReC[j];
530 zi2 = zr2 * zi + zi2 * zr + ImC[j];
531 zr2 = Temp;
532 }
533
534 // f':
535 zr3 = zi3 = 0;
536 for (j = 0; j < c; j++)
537 {
538 Temp = zr3 * zr - zi3 * zi + RePrim[j];
539 zi3 = zr3 * zi + zi3 * zr + ImPrim[j];
540 zr3 = Temp;
541 }
542
543 // f/f':
544
545 Temp = 1.0 / (zr3 * zr3 + zi3 * zi3);
546 zr4 = (zr2 * zr3 + zi2 * zi3) * Temp;
547 zi4 = (zi2 * zr3 - zr2 * zi3) * Temp;
548
549 // R*f/f'
550 Temp = zr4 * RRe - zi4 * RIm;
551 zi4 = zr4 * RIm + zi4 * RRe;
552 zr4 = Temp;
553
554 zr -= zr4;
555 zi -= zi4;
556
557 Temp = Math.Sqrt(zr4 * zr4 + zi4 * zi4);
558 }
559 while ((Temp > Conv) && (Temp < Div) && (n++ < N));
560
561 if (Temp < Conv && n < N)
562 {
563 rgb[index++] = blues[n];
564 rgb[index++] = greens[n];
565 rgb[index++] = reds[n];
566 }
567 else
568 {
569 rgb[index++] = 0;
570 rgb[index++] = 0;
571 rgb[index++] = 0;
572 }
573
574 rgb[index++] = 255;
575 }
576 }
577
578 PixelInformation Pixels = new PixelInformationRaw(SKColorType.Bgra8888, rgb, Width, Height, Width << 2);
579 return new FractalGraph(Variables, Pixels, r0, i0, r1, i1, rDelta * 2, true, Node, FractalZoomScript, State);
580 }
581
585 public static FractalGraph CalcNewton(double rCenter, double iCenter, double rDelta, Complex R,
586 ILambdaExpression f, ScriptNode _, Variables Variables, SKColor[] Palette, int Width, int Height,
587 ScriptNode Node, FractalZoomScript FractalZoomScript, object State)
588 {
589 byte[] reds;
590 byte[] greens;
591 byte[] blues;
592 double RRe = R.Real;
593 double RIm = R.Imaginary;
594 double r0, i0, r1, i1;
595 double dr, di;
596 double r, i;
597 double aspect;
598 int x, y;
599 int n, N;
600 SKColor cl;
601 Complex z;
602
603 N = Palette.Length;
604 reds = new byte[N];
605 greens = new byte[N];
606 blues = new byte[N];
607
608 for (x = 0; x < N; x++)
609 {
610 cl = Palette[x];
611 reds[x] = cl.Red;
612 greens[x] = cl.Green;
613 blues[x] = cl.Blue;
614 }
615
616 Variables v = new Variables();
617 Variables.CopyTo(v);
618
619 if (!(f is IDifferentiable Differentiable) ||
620 !(Differentiable.Differentiate(Differentiable.DefaultVariableName, v) is ILambdaExpression fPrim))
621 {
622 throw new ScriptRuntimeException("Lambda expression not differentiable.", Node);
623 }
624
625 int size = Width * Height * 4;
626 double Conv = 1e-10;
627 double Div = 1e10;
628 byte[] rgb = new byte[size];
629
630 Complex[] Row;
631 Complex[] Row2;
632 Complex[] Row3;
633 int[] Offset;
634 IElement[] P = new IElement[1];
635 int j, c, x2;
636 IElement Obj, Obj2;
637 double Mod;
638
639 rDelta *= 0.5;
640 r0 = rCenter - rDelta;
641 r1 = rCenter + rDelta;
642
643 aspect = ((double)Width) / Height;
644
645 i0 = iCenter - rDelta / aspect;
646 i1 = iCenter + rDelta / aspect;
647
648 dr = (r1 - r0) / Width;
649 di = (i1 - i0) / Height;
650
651 for (y = 0, i = i0; y < Height; y++, i += di)
652 {
653 Row = new Complex[Width];
654 Offset = new int[Width];
655
656 c = Width;
657 for (x = 0, x2 = y * Width * 4, r = r0; x < Width; x++, r += dr, x2 += 4)
658 {
659 Row[x] = new Complex(r, i);
660 Offset[x] = x2;
661 }
662
663 n = 0;
664 while (n < N && c > 0)
665 {
666 n++;
667 P[0] = new ComplexVector(Row);
668 Obj = f.Evaluate(P, v);
669 Obj2 = fPrim.Evaluate(P, v);
670 Row2 = Obj.AssociatedObjectValue as Complex[];
671 Row3 = Obj2.AssociatedObjectValue as Complex[];
672
673 if (Row2 is null || Row3 is null)
674 {
675 throw new ScriptRuntimeException("Lambda expression (and its first derivative) must be able to accept complex vectors, " +
676 "and return complex vectors of equal length. Type returned: " +
677 Obj.GetType().FullName + " and " + Obj2.GetType().FullName, Node);
678 }
679 else if (Row2.Length != c || Row3.Length != c)
680 {
681 throw new ScriptRuntimeException("Lambda expression (and its first derivative) must be able to accept complex vectors, " +
682 "and return complex vectors of equal length. Length returned: " +
683 Row2.Length.ToString() + " and " + Row3.Length.ToString() +
684 ". Expected: " + c.ToString(), Node);
685 }
686
687 for (x = x2 = 0; x < c; x++)
688 {
689 j = Offset[x];
690 z = R * Row2[x] / Row3[x];
691 Row[x] -= z;
692
693 Mod = z.Magnitude;
694
695 if (Mod > Conv && Mod < Div)
696 {
697 if (x != x2)
698 Offset[x2] = j;
699
700 x2++;
701 }
702 else
703 {
704 if (n >= N)
705 {
706 rgb[j++] = 0;
707 rgb[j++] = 0;
708 rgb[j++] = 0;
709 }
710 else
711 {
712 rgb[j++] = blues[n];
713 rgb[j++] = greens[n];
714 rgb[j++] = reds[n];
715 }
716
717 rgb[j++] = 255;
718 }
719 }
720
721 if (x2 < x)
722 {
723 Array.Resize(ref Row, x2);
724 Array.Resize(ref Offset, x2);
725 c = x2;
726 }
727 }
728 }
729
730 PixelInformation Pixels = new PixelInformationRaw(SKColorType.Bgra8888, rgb, Width, Height, Width << 2);
731 return new FractalGraph(Variables, Pixels, r0, i0, r1, i1, rDelta * 2, true, Node, FractalZoomScript, State);
732 }
733
737 public override string FunctionName => nameof(NewtonFractal);
738 }
739}
Class managing a script expression.
Definition: Expression.cs:41
static Complex ToComplex(object Object)
Converts an object to a complex value.
Definition: Expression.cs:5228
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:5110
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
Definition: Expression.cs:4760
static FractalGraph CalcNewton(Variables Variables, double rCenter, double iCenter, double rDelta, Complex R, Complex[] Coefficients, SKColor[] Palette, int Width, int Height, ScriptNode Node, FractalZoomScript FractalZoomScript, object State)
TODO
override IElement Evaluate(IElement[] Arguments, Variables Variables)
TODO
NewtonFractal(ScriptNode z, ScriptNode dr, ScriptNode R, ScriptNode c, ScriptNode Palette, ScriptNode DimX, int Start, int Length, Expression Expression)
TODO
static FractalGraph CalcNewton(double rCenter, double iCenter, double rDelta, Complex R, ILambdaExpression f, ScriptNode _, Variables Variables, SKColor[] Palette, int Width, int Height, ScriptNode Node, FractalZoomScript FractalZoomScript, object State)
TODO
NewtonFractal(ScriptNode z, ScriptNode dr, ScriptNode R, ScriptNode c, ScriptNode Palette, int Start, int Length, Expression Expression)
TODO
NewtonFractal(ScriptNode z, ScriptNode dr, ScriptNode R, ScriptNode c, int Start, int Length, Expression Expression)
TODO
NewtonFractal(ScriptNode z, ScriptNode dr, ScriptNode R, ScriptNode c, ScriptNode Palette, ScriptNode DimX, ScriptNode DimY, int Start, int Length, Expression Expression)
TODO
static FractalGraph CalcNewton(Variables Variables, double rCenter, double iCenter, double rDelta, Complex R, double[] Coefficients, SKColor[] Palette, int Width, int Height, ScriptNode Node, FractalZoomScript FractalZoomScript, object State)
TODO
Exception thrown if an image with invalid size is requested.
Defines a clickable fractal graph in the complex plane.
Definition: FractalGraph.cs:23
static SKColor[] ToPalette(ObjectVector Vector)
TODO
Contains pixel information
Contains pixel information in a raw unencoded format.
Base class for multivariate funcions.
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
override string ToString()
Definition: ScriptNode.cs:359
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
void CopyTo(Variables Variables)
Copies available variables to another variable collection.
Definition: Variables.cs:334
Basic interface for all types of elements.
Definition: IElement.cs:21
object AssociatedObjectValue
Associated object value.
Definition: IElement.cs:34
Basic interface for vectors.
Definition: IVector.cs:9
int Dimension
Dimension of vector.
Definition: IVector.cs:14
IElement GetElement(int Index)
Gets an element of the vector.
Base interface for lambda expressions.
Base interface for lambda expressions.
IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the lambda expression.
Definition: ImplTypes.g.cs:58
delegate string FractalZoomScript(double r, double i, double Size, object State)
Generates new script when zoomed.
ArgumentType
Type of parameter used in a function definition or a lambda definition.
Definition: IFunction.cs:9