|
libSBML Python API
5.18.0
|
For many elements in the render extension, it is necessary to specify coordinates not in terms of absolute values, but rather in terms of relative values or even a combination of absolute and relative values. Such a pair of values where one represents an absolute value and the other represents a relative value can be expressed by a RelAbsVector. The RelAbsVector class represents a pair of numerical values where one value represents an absolute value and the other value is a relative value in percent.
The relative and absolute values to initialize a RelAbsVector object can either be given as numerical datatypes (float) or as a valid value string. A value string is a combination of an absolute value and a relative value and the absolute value if given has to come first. So valid value strings would be: '5.0e3+20', or '100' or '4'.
Public Member Functions | |
| def | __add__ (self, other) |
| def | __eq__ (self, other) |
| def | __init__ (self, args) |
| This method has multiple variants; they differ in the arguments they accept. More... | |
| def | __ne__ (self, other) |
| def | clone (self) |
| Creates and returns a deep copy of this RelAbsVector object. More... | |
| def | empty (self) |
| def | erase (self) |
| def | getAbsoluteValue (self) |
| Returns the absolute coordinate value. More... | |
| def | getCoordinate (self) |
| Returns the coordinate value. More... | |
| def | getRelativeValue (self) |
| Returns the relative coordinate value. More... | |
| def | isSetAbsoluteValue (self) |
Predicate returning True if this RelAbsVector's 'abs' attribute is set. More... | |
| def | isSetCoordinate (self) |
Predicate returning True if this RelAbsVector's coordinate attribute is set. More... | |
| def | isSetRelativeValue (self) |
Predicate returning True if this RelAbsVector's 'rel' attribute is set. More... | |
| def | setAbsoluteValue (self, abs) |
| Sets the absolute coordinate value. More... | |
| def | setCoordinate (self, args) |
| This method has multiple variants; they differ in the arguments they accept. More... | |
| def | setRelativeValue (self, rel) |
| Sets the relative coordinate value. More... | |
| def | toString (self) |
| def | unsetAbsoluteValue (self) |
| Unsets the value of the 'abs' attribute of this RelAbsVector. More... | |
| def | unsetCoordinate (self) |
| Unsets the value of the 'rel' attribute of this RelAbsVector. More... | |
| def | unsetRelativeValue (self) |
| Unsets the value of the relative coordinate attribute of this RelAbsVector. More... | |
| def libsbml.RelAbsVector.__init__ | ( | self, | |
| args | |||
| ) |
This method has multiple variants; they differ in the arguments they accept.
__init__ (float a=0.0, float r=0.0) RelAbsVector __init__ (float a=0.0) RelAbsVector __init__() RelAbsVector __init__(string coordString) RelAbsVector __init__(RelAbsVector orig) RelAbsVector
Each variant is described separately below.
RelAbsVector (float a=0.0, float r=0.0)
Constructor with two values. First value sets the absolute value, second sets the relative value (%).
| a | absolute value |
| r | relative value in % (50 50%) |
RelAbsVector(string coordString)
Constructor with a value string. If the string does not represent a valid value, the relative and the absolute component of the RelAbsVector are set to NaN.
| coordString | value as a string |
RelAbsVector(RelAbsVector orig)
Copy constructor for RelAbsVector.
| orig | the RelAbsVector instance to copy. |
| def libsbml.RelAbsVector.__add__ | ( | self, | |
| other | |||
| ) |
__add__(RelAbsVector other) RelAbsVector
| def libsbml.RelAbsVector.__eq__ | ( | self, | |
| other | |||
| ) |
__eq__(RelAbsVector other) bool
| def libsbml.RelAbsVector.__ne__ | ( | self, | |
| other | |||
| ) |
__ne__(RelAbsVector other) bool
| def libsbml.RelAbsVector.clone | ( | self | ) |
Creates and returns a deep copy of this RelAbsVector object.
clone() RelAbsVector
| def libsbml.RelAbsVector.empty | ( | self | ) |
empty() bool | def libsbml.RelAbsVector.erase | ( | self | ) |
erase()
resets this element by setting the two coordinates to 0.0
| def libsbml.RelAbsVector.getAbsoluteValue | ( | self | ) |
Returns the absolute coordinate value.
getAbsoluteValue() float| def libsbml.RelAbsVector.getCoordinate | ( | self | ) |
Returns the coordinate value.
getCoordinate() string| def libsbml.RelAbsVector.getRelativeValue | ( | self | ) |
Returns the relative coordinate value.
getRelativeValue() float| def libsbml.RelAbsVector.isSetAbsoluteValue | ( | self | ) |
Predicate returning True if this RelAbsVector's 'abs' attribute is set.
isSetAbsoluteValue() boolTrue if this RelAbsVector's 'abs' attribute has been set, otherwise False is returned. | def libsbml.RelAbsVector.isSetCoordinate | ( | self | ) |
Predicate returning True if this RelAbsVector's coordinate attribute is set.
isSetCoordinate() boolTrue if this RelAbsVector's coordinate attribute has been set, otherwise False is returned. | def libsbml.RelAbsVector.isSetRelativeValue | ( | self | ) |
Predicate returning True if this RelAbsVector's 'rel' attribute is set.
isSetRelativeValue() boolTrue if this RelAbsVector's 'rel' attribute has been set, otherwise False is returned. | def libsbml.RelAbsVector.setAbsoluteValue | ( | self, | |
| abs | |||
| ) |
Sets the absolute coordinate value.
setAbsoluteValue (float abs) intCalling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.
| abs | float value of the 'abs' attribute to be set. |
| def libsbml.RelAbsVector.setCoordinate | ( | self, | |
| args | |||
| ) |
This method has multiple variants; they differ in the arguments they accept.
setCoordinate (float abs, float rel=0.0) int setCoordinate (float abs) int setCoordinate(string coordString) int
Each variant is described separately below.
setCoordinate (float abs,double rel=0.0)
Sets the relative and absolute value.
Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.
| abs | absolute value |
| rel | relative value. If the relative value is omitted, it is set to 0. |
setCoordinate(string coordString)
Sets the coordinates from the given string. If the string does not represent a valid value, the relative and the absolute component of the RelAbsVector are set to NaN.
Calling this function with either cooredinate having a value of '0.0' or 'NaN' is equivalent to unsetting the value.
| coordString | value string |
| def libsbml.RelAbsVector.setRelativeValue | ( | self, | |
| rel | |||
| ) |
Sets the relative coordinate value.
setRelativeValue (float rel) intCalling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.
| rel | float value of the 'rel' attribute to be set. |
| def libsbml.RelAbsVector.toString | ( | self | ) |
toString() string | def libsbml.RelAbsVector.unsetAbsoluteValue | ( | self | ) |
Unsets the value of the 'abs' attribute of this RelAbsVector.
unsetAbsoluteValue() int| def libsbml.RelAbsVector.unsetCoordinate | ( | self | ) |
Unsets the value of the 'rel' attribute of this RelAbsVector.
unsetCoordinate() int| def libsbml.RelAbsVector.unsetRelativeValue | ( | self | ) |
Unsets the value of the relative coordinate attribute of this RelAbsVector.
unsetRelativeValue() int