libSBML Python API
5.10.0
|
This class represents a pair of numerical values where one value represents an absolute value and the other value is a relative value in percent.
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 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__ |
def | __div__ |
def | __eq__ |
def | __ne__ |
def | getAbsoluteValue |
def | getRelativeValue |
def | setAbsoluteValue |
def | setCoordinate |
def | setRelativeValue |
def libsbml.RelAbsVector.__add__ | ( | self, | |
args | |||
) |
Python method signature(s):
__add__(RelAbsVector self, RelAbsVector other)RelAbsVector
def libsbml.RelAbsVector.__div__ | ( | self, | |
args | |||
) |
Python method signature(s):
__div__(RelAbsVector self, float x)RelAbsVector
def libsbml.RelAbsVector.__eq__ | ( | self, | |
args | |||
) |
Python method signature(s):
__eq__(RelAbsVector self, RelAbsVector other)bool
def libsbml.RelAbsVector.__ne__ | ( | self, | |
args | |||
) |
Python method signature(s):
__ne__(RelAbsVector self, RelAbsVector other)bool
def libsbml.RelAbsVector.getAbsoluteValue | ( | self | ) |
Python method signature(s):
getAbsoluteValue(RelAbsVector self)float
Returns the absolute coordinate value.
def libsbml.RelAbsVector.getRelativeValue | ( | self | ) |
Python method signature(s):
getRelativeValue(RelAbsVector self)float
Returns the relative coordinate value.
def libsbml.RelAbsVector.setAbsoluteValue | ( | self, | |
args | |||
) |
Python method signature(s):
setAbsoluteValue(RelAbsVector self, float abs)
Sets the absolute coordinate value.
abs | absolute value to be set |
def libsbml.RelAbsVector.setCoordinate | ( | self, | |
args | |||
) |
This class represents a pair of numerical values where one value represents an absolute value and the other value is a relative value in percent.
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 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'. Python method signature(s):
setCoordinate(RelAbsVector self, float abs, float rel=0.0) setCoordinate(RelAbsVector self, float abs) setCoordinate(RelAbsVector self, string coordString)
This method has multiple variants that differ in the arguments they accept. Each is described separately below.
setCoordinate (float abs,double rel=0.0)
Sets the relative and absolute value.
abs | absolute value |
rel | relative value. If the relative value is omitted, it is set to 0. |
setCoordinate(string coordString)
Sets the coordinatees 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.
coordString | value string |
def libsbml.RelAbsVector.setRelativeValue | ( | self, | |
args | |||
) |
Python method signature(s):
setRelativeValue(RelAbsVector self, float rel)
Sets the relative coordinate value.
rel | relative value to be set |