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')
Attributes
thisown

The membership flag

Methods

getClassName()

Accessor to the object’s name.

getDescription()

Description accessor.

getId()

Accessor to the object’s id.

getName()

Accessor to the object’s name.

getPythonScript()

Python script accessor.

getShadowedId()

Accessor to the object’s shadowed id.

getValue()

Default value accessor.

getVisibility()

Accessor to the object’s visibility state.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

setDescription(description)

Description accessor.

setName(name)

Accessor to the object’s name.

setShadowedId(id)

Accessor to the object’s shadowed id.

setValue(value)

Default value accessor.

setVisibility(visible)

Accessor to the object’s visibility state.

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

getClassName()

Accessor to the object’s name.

Returns
class_namestr

The object class name (object.__class__.__name__).

getDescription()

Description accessor.

Returns
descriptionopenturns.Description

Text describing the variable

getId()

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

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

getShadowedId()

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getValue()

Default value accessor.

Returns
valuefloat

Default value

getVisibility()

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

True if the name is not empty and not the default one.

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.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setValue(value)

Default value accessor.

Parameters
valuefloat

Default value

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.

property thisown

The membership flag