-- File: FunctionDerivative.cdl -- Created: Mon Jan 14 10:53:24 1991 -- Author: Arnaud BOUZY -- ---Copyright: Matra Datavision 1991, 1992 class FunctionDerivative from Expr inherits GeneralFunction from Expr uses NamedUnknown from Expr, GeneralExpression from Expr, Array1OfNamedUnknown from Expr, Array1OfReal from TColStd, AsciiString from TCollection raises OutOfRange from Standard, DimensionMismatch from Standard, NumericError from Standard, NotEvaluable from Expr is Create(func : GeneralFunction; withX : NamedUnknown; deg : Integer) ---Purpose: Creates a FunctionDerivative of degree relative -- to the variable. -- Raises OutOfRange if lower or equal to zero. ---Level : Advanced returns mutable FunctionDerivative raises OutOfRange; NbOfVariables(me) ---Purpose: Returns the number of variables of . returns Integer; Variable(me; index : Integer) ---Purpose: Returns the variable denoted by in . -- Raises OutOfRange if greater than -- NbOfVariables of . returns NamedUnknown raises OutOfRange; Evaluate(me; vars : Array1OfNamedUnknown; values : Array1OfReal) ---Purpose: Computes the value of with the given variables. -- Raises DimensionMismatch if Length(vars) is different from -- Length(values). returns Real raises DimensionMismatch, NumericError,NotEvaluable; Copy(me) ---Purpose: Returns a copy of with the same form. returns mutable like me; Derivative(me; var : NamedUnknown) ---Purpose: Returns Derivative of for variable . returns GeneralFunction; Derivative(me; var : NamedUnknown; deg : Integer) ---Purpose: Returns Derivative of for variable with -- degree . returns GeneralFunction; IsIdentical(me; func : GeneralFunction) ---Purpose: Tests if and are similar functions (same -- name and same used expression). returns Boolean; IsLinearOnVariable(me; index : Integer) ---Purpose: Tests if is linear on variable on range returns Boolean; Function(me) ---Purpose: Returns the function of which is the derivative. ---Level : Internal returns GeneralFunction is static; Degree(me) ---Purpose: Returns the degree of derivation of . ---Level : Internal returns Integer is static; DerivVariable(me) ---Purpose: Returns the derivation variable of . ---Level : Internal returns NamedUnknown is static; GetStringName(me) returns AsciiString; Expression(me) returns GeneralExpression ---Level : Internal is static; UpdateExpression(me: mutable); ---Level : Internal fields myFunction : GeneralFunction; myExp : GeneralExpression; myDerivate : NamedUnknown; myDegree : Integer; friends class NamedFunction from Expr end FunctionDerivative;