UniVariateFunction¶
- class UniVariateFunction(*args)¶
- Base class for univariate functions. - Methods - draw(xMin, xMax, pointNumber)- Draw the function. - Accessor to the object's name. - getId()- Accessor to the object's id. - Accessor to the underlying implementation. - getName()- Accessor to the object's name. - gradient(x)- Compute the gradient at point - . - hessian(x)- Compute the hessian at point - . - setName(name)- Accessor to the object's name. - __init__(*args)¶
 - draw(xMin, xMax, pointNumber)¶
- Draw the function. - Parameters:
- x_minfloat, optional
- The starting value that is used for meshing the x-axis. 
- x_maxfloat, optional, 
- The ending value that is used for meshing the x-axis. 
- n_pointsint, optional
- The number of points that is used for meshing the x-axis. 
 
 - Examples - >>> import openturns as ot >>> from openturns.viewer import View >>> f = ot.UniVariatePolynomial([1.0, 2.0, -3.0, 5.0]) >>> View(f.draw(-10.0, 10.0, 100)).show() 
 - getClassName()¶
- Accessor to the object’s name. - Returns:
- class_namestr
- The object class name (object.__class__.__name__). 
 
 
 - getId()¶
- Accessor to the object’s id. - Returns:
- idint
- Internal unique identifier. 
 
 
 - getImplementation()¶
- Accessor to the underlying implementation. - Returns:
- implImplementation
- A copy of the underlying implementation object. 
 
 
 - getName()¶
- Accessor to the object’s name. - Returns:
- namestr
- The name of the object. 
 
 
 - gradient(x)¶
- Compute the gradient at point - . - Returns:
- gradientfloat
- The value of the function’s first-order derivative at point - . 
 
 - Examples - >>> import openturns as ot >>> P = ot.UniVariatePolynomial([1.0, 2.0, 3.0]) >>> print(P.gradient(1.0)) 8.0 
 - hessian(x)¶
- Compute the hessian at point - . - Parameters:
- xfloat
- Input value. 
 
- Returns:
- hessianfloat
- The value of the function’s second-order derivative at point - . 
 
 
 - setName(name)¶
- Accessor to the object’s name. - Parameters:
- namestr
- The name of the object. 
 
 
 
 OpenTURNS
      OpenTURNS