/// <summary> /// Evaluates the function on a vector argument. /// </summary> /// <param name="Argument">Function argument.</param> /// <param name="Variables">Variables collection.</param> /// <returns>Function result.</returns> public override IElement EvaluateVector(IVector Argument, Variables Variables) { int i, c = Argument.Dimension; IElement[] E = new IElement[c]; for (i = 0; i < c; i++) { E[c - i - 1] = Argument.GetElement(i); } return(Argument.Encapsulate(E, this)); }
private void AddSegment(IVector X, IVector Y, ICollection <IElement> X2, ICollection <IElement> Y2, ScriptNode Node, DrawCallback PlotCallback, params object[] Parameters) { IVector X2V = (IVector)X.Encapsulate(X2, Node); IVector Y2V = (IVector)Y.Encapsulate(Y2, Node); if (this.axisTypeX == null) { this.axisTypeX = X2V.GetType(); this.axisTypeY = Y2V.GetType(); } else { if (X2V.GetType() != this.axisTypeX || Y2V.GetType() != this.axisTypeY) { throw new ScriptException("Incompatible types of series."); } } this.x.AddLast(X2V); this.y.AddLast(Y2V); this.callbacks.AddLast(PlotCallback); this.parameters.AddLast(Parameters); }