Variable¶
- class persalys.Variable(*args)¶
Create a variable base class.
Represents a variable.
- Parameters
- namestr
Name
- descriptionstr
Description text (optional)
Examples
>>> import persalys >>> G = persalys.Variable('G', 'deviation')
Methods
Accessor to the object's name.
Description accessor.
getName
()Accessor to the object's name.
Python script accessor.
getValue
()Default value accessor.
hasName
()Test if the object is named.
setDescription
(description)Description accessor.
setName
(name)Accessor to the object's name.
setValue
(value)Default value accessor.
getUnit
setUnit
- __init__(*args)¶
- getClassName()¶
Accessor to the object’s name.
- Returns
- class_namestr
The object class name (object.__class__.__name__).
- getDescription()¶
Description accessor.
- Returns
- description
openturns.Description
Text describing the variable
- description
- getName()¶
Accessor to the object’s name.
- Returns
- namestr
The name of the object.
- getPythonScript()¶
Python script accessor.
- Returns
- scriptstr
Python script to replay the analysis
- getValue()¶
Default value accessor.
- Returns
- valuefloat
Default value
- hasName()¶
Test if the object is named.
- Returns
- hasNamebool
True if the name is not empty.
- setDescription(description)¶
Description accessor.
- Parameters
- descriptionstr
Text describing the variable
- setName(name)¶
Accessor to the object’s name.
- Parameters
- namestr
The name of the object.
- setValue(value)¶
Default value accessor.
- Parameters
- valuefloat
Default value