PySharp Units of Measure
Units of Measure in Python
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
uom.prefix.Prefix Class Reference

The Prefix class defines SI unit of measure prefixes as well as those found in computer science. More...

Public Member Functions

def yotta (cls)
 
def zetta (cls)
 
def exa (cls)
 
def peta (cls)
 
def tera (cls)
 
def giga (cls)
 
def mega (cls)
 
def kilo (cls)
 
def hecto (cls)
 
def deka (cls)
 
def deci (cls)
 
def centi (cls)
 
def milli (cls)
 
def micro (cls)
 
def nano (cls)
 
def pico (cls)
 
def femto (cls)
 
def atto (cls)
 
def zepto (cls)
 
def yocto (cls)
 
def kibi (cls)
 
def mebi (cls)
 
def gibi (cls)
 
def __init__ (self, name, symbol, factor)
 Construct a prefix. More...
 
def fromName (cls, name)
 Find the prefix with the specified name. More...
 
def fromFactor (cls, factor)
 Find the prefix with the specified scaling factor. More...
 
def __str__ (self)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 

Public Attributes

 name
 
 symbol
 
 factor
 

Static Public Attributes

list prefixes = []
 

Detailed Description

The Prefix class defines SI unit of measure prefixes as well as those found in computer science.

Constructor & Destructor Documentation

◆ __init__()

def uom.prefix.Prefix.__init__ (   self,
  name,
  symbol,
  factor 
)

Construct a prefix.

Parameters
nameName
symbolSymbol
factorNumerical factor

Member Function Documentation

◆ fromFactor()

def uom.prefix.Prefix.fromFactor (   cls,
  factor 
)

Find the prefix with the specified scaling factor.

Parameters
factorScaling factor
Returns
Prefix

◆ fromName()

def uom.prefix.Prefix.fromName (   cls,
  name 
)

Find the prefix with the specified name.

Parameters
nameName of prefix
Returns
Prefix

The documentation for this class was generated from the following file: