-- Created on: 1991-01-14 -- Created by: Arnaud BOUZY -- Copyright (c) 1991-1999 Matra Datavision -- Copyright (c) 1999-2014 OPEN CASCADE SAS -- -- This file is part of Open CASCADE Technology software library. -- -- This library is free software; you can redistribute it and/or modify it under -- the terms of the GNU Lesser General Public License version 2.1 as published -- by the Free Software Foundation, with special exception defined in the file -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -- distribution for complete text of the license and disclaimer of any warranty. -- -- Alternatively, this file may be used under the terms of Open CASCADE -- commercial license or contractual agreement. class NamedFunction from Expr inherits GeneralFunction from Expr uses GeneralExpression from Expr, NamedUnknown from Expr, Array1OfReal from TColStd, Array1OfNamedUnknown from Expr, AsciiString from TCollection raises OutOfRange from Standard, DimensionMismatch from Standard, NumericError from Standard, NotEvaluable from Expr is Create( name : AsciiString; exp : GeneralExpression; vars : Array1OfNamedUnknown) ---Purpose: Creates a function of given variables with name -- defined by the expression . ---Level : Advanced returns NamedFunction; SetName(me : mutable; newname : AsciiString) ---Purpose: Sets the name to . ---Level : Internal is static; GetName(me) ---Purpose: Returns the name assigned to ---Level : Internal returns AsciiString is static; NbOfVariables(me) ---Purpose: Returns the number of variables of . returns Integer is static; Variable(me ; index : Integer) ---Purpose: Returns the variable denoted by in . -- Raises OutOfRange if is greater than -- NbOfVariables of , or less than or equal to zero. returns NamedUnknown raises OutOfRange is static; 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 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; GetStringName(me) returns AsciiString from TCollection; Expression(me) ---Purpose: Returns equivalent expression of . ---Level : Internal returns GeneralExpression is static; SetExpression(me : mutable; exp : GeneralExpression); ---Purpose: Modifies expression of . -- Warning: Beware of derivatives. See FunctionDerivative ---Level : Internal fields myName : AsciiString; myExp : GeneralExpression; myVariables : Array1OfNamedUnknown; end NamedFunction;