libSBML Python API  5.10.0
 All Classes Namespaces Files Functions Variables Modules Pages
libsbml.RelAbsVector Class Reference
Inheritance diagram for libsbml.RelAbsVector:
[legend]

Detailed Description

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
 

Member Function Documentation

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.

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

Python method signature(s):

getRelativeValue(RelAbsVector self)   float

Returns the relative coordinate value.

Returns
absolute value
def libsbml.RelAbsVector.setAbsoluteValue (   self,
  args 
)

Python method signature(s):

setAbsoluteValue(RelAbsVector self, float abs)

Sets the absolute coordinate value.

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


Method variant with the following signature:
setCoordinate (float abs,double rel=0.0)

Sets the relative and absolute 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 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.

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

Python method signature(s):

setRelativeValue(RelAbsVector self, float rel)

Sets the relative coordinate value.

Parameters
relrelative value to be set