42 : base(new
ScriptNode[] { Data, MinX, MaxX, NX, MinY, MaxY, NY }, argumentTypes7Parameters,
Start,
Length,
Expression)
56 get {
return new string[] {
"data",
"minX",
"maxX",
"NX",
"minY",
"maxY",
"NY" }; }
71 int NX = (int)Math.Round(dX);
72 if (NX <= 0 || NX != dX)
81 int NY = (int)Math.Round(dY);
82 if (NY <= 0 || NY != dY)
88 double[,] Result =
new double[NX, NY];
89 double DiffX = MaxX - MinX;
90 double DiffY = MaxY - MinY;
96 double[,] w = M.Values;
98 if (w.GetLength(0) == 2)
102 for (j = 0; j < c; j++)
107 if (x >= MinX && x <= MaxX && y >= MinY && y <= MaxY)
109 ix = (int)(((x - MinX) * NX) / DiffX);
113 iy = (int)(((y - MinY) * NY) / DiffY);
121 else if (w.GetLength(1) == 2)
125 for (j = 0; j < c; j++)
130 if (x >= MinX && x <= MaxX && y >= MinY && y <= MaxY)
132 ix = (int)(((x - MinX) * NX) / DiffX);
136 iy = (int)(((y - MinY) * NY) / DiffY);
155 for (j = 0; j < c; j++)
189 if (x >= MinX && x <= MaxX && y >= MinY && y <= MaxY)
191 ix = (int)(((x - MinX) * NX) / DiffX);
195 iy = (int)(((y - MinY) * NY) / DiffY);
207 for (j = 0; j < c; j++)
241 if (x >= MinX && x <= MaxX && y >= MinY && y <= MaxY)
243 ix = (int)(((x - MinX) * NX) / DiffX);
247 iy = (int)(((y - MinY) * NY) / DiffY);
Script runtime exception.
Class managing a script expression.
static double ToDouble(object Object)
Converts an object to a double value.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Computes a two-dimensional histogram from a set of data.
override string[] DefaultArgumentNames
Default Argument names
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override string FunctionName
Name of the function
Histogram2D(ScriptNode Data, ScriptNode MinX, ScriptNode MaxX, ScriptNode NX, ScriptNode MinY, ScriptNode MaxY, ScriptNode NY, int Start, int Length, Expression Expression)
Computes a two-dimensional histogram from a set of data.
Computes a histogram from a set of data.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for matrices.
int Columns
Number of columns.
IElement GetElement(int Column, int Row)
Gets an element of the matrix.
ArgumentType
Type of parameter used in a function definition or a lambda definition.