0022904: Clean up sccsid variables
[occt.git] / src / Expr / Expr_GeneralExpression.cxx
CommitLineData
7fd59977 1// Copyright: Matra-Datavision 1991
2// File: Expr_GeneralExpression.cxx
3// Created: Wed Mar 6 11:04:58 1991
4// Author: Arnaud BOUZY
5// <adn>
6
7
8#include <Expr_GeneralExpression.ixx>
9#include <Expr_NotEvaluable.hxx>
10#include <Standard_OutOfRange.hxx>
11
12 Standard_Boolean Expr_GeneralExpression::IsShareable() const
13 {
14 return Standard_False;
15 }
16
17 Handle(Expr_GeneralExpression) Expr_GeneralExpression::NDerivative (const Handle(Expr_NamedUnknown)& X, const Standard_Integer N) const
18 {
19 if (N <= 0) {
20 Standard_OutOfRange::Raise();
21 }
22 Handle(Expr_GeneralExpression) first = Derivative(X);
23 if (N > 1) {
24 return first->NDerivative(X,N-1);
25 }
26 return first;
27 }
28
29
30 Standard_Real Expr_GeneralExpression::EvaluateNumeric() const
31 {
32 if (ContainsUnknowns()) {
33 Expr_NotEvaluable::Raise();
34 }
35 Expr_Array1OfNamedUnknown tabvr(1,1);
36 TColStd_Array1OfReal tabvl(1,1);
37 return Evaluate(tabvr,tabvl);
38 }