libSBML Python API  5.18.0
libsbml.RelAbsVector Class Reference
Inheritance diagram for libsbml.RelAbsVector:
[legend]

Detailed Description

render Vectors with an absolute value and a relative value.

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...
 

Constructor & Destructor Documentation

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.


Method variant with the following signature:
RelAbsVector (float a=0.0, float r=0.0)

Constructor with two values. First value sets the absolute value, second sets the relative value (%).

Parameters
aabsolute value
rrelative value in % (50 50%)

Method variant with the following signature:
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.

Parameters
coordStringvalue as a string

Method variant with the following signature:
RelAbsVector(RelAbsVector orig)

Copy constructor for RelAbsVector.

Parameters
origthe RelAbsVector instance to copy.

Member Function Documentation

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
Returns
a (deep) copy of this RelAbsVector object.
def libsbml.RelAbsVector.empty (   self)
empty()   bool
 
Returns
an indication whether this element has been set (i.e., no zero entries for either relative or absolute coordinate)
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
Returns
absolute value
def libsbml.RelAbsVector.getCoordinate (   self)

Returns the coordinate value.

getCoordinate()   string
Returns
absolute value
def libsbml.RelAbsVector.getRelativeValue (   self)

Returns the relative coordinate value.

getRelativeValue()   float
Returns
absolute value
def libsbml.RelAbsVector.isSetAbsoluteValue (   self)

Predicate returning True if this RelAbsVector's 'abs' attribute is set.

isSetAbsoluteValue()   bool
Returns
True 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()   bool
Returns
True 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()   bool
Returns
True 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)   int

Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.

Parameters
absfloat 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.


Method variant with the following signature:
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.

Parameters
absabsolute value
relrelative value. If the relative value is omitted, it is set to 0.

Method variant with the following signature:
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.

Parameters
coordStringvalue string
def libsbml.RelAbsVector.setRelativeValue (   self,
  rel 
)

Sets the relative coordinate value.

setRelativeValue (float rel)   int

Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.

Parameters
relfloat value of the 'rel' attribute to be set.
def libsbml.RelAbsVector.toString (   self)
toString()   string
 
Returns
a string representation of this object
def libsbml.RelAbsVector.unsetAbsoluteValue (   self)

Unsets the value of the 'abs' attribute of this RelAbsVector.

unsetAbsoluteValue()   int
Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value:
def libsbml.RelAbsVector.unsetCoordinate (   self)

Unsets the value of the 'rel' attribute of this RelAbsVector.

unsetCoordinate()   int
Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value:
def libsbml.RelAbsVector.unsetRelativeValue (   self)

Unsets the value of the relative coordinate attribute of this RelAbsVector.

unsetRelativeValue()   int
Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value: