PySharp Units of Measure
Units of Measure in Python
Loading...
Searching...
No Matches
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

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

Public Attributes

 name
 
 symbol
 
 factor
 

Static Public Attributes

int EPSILON = 1e-10
 
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__()

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

Construct a prefix.

Parameters
nameName
symbolSymbol
factorNumerical factor

Member Function Documentation

◆ fromFactor()

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

Find the prefix with the specified scaling factor.

Parameters
factorScaling factor
Returns
Prefix

◆ fromName()

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: