Trees | Index | Help |
---|
Module gwy :: Class SIUnit |
|
SIUnit
struct contains private data only and
should be accessed using the functions below.
Method Summary | |
---|---|
Divides two SI units. | |
Checks whether two SI units are equal. | |
Obtains string representing a SI unit. | |
Multiplies two SI units. | |
Calulates n-th root of an SI unit. | |
Computes a power of an SI unit. | |
Computes the product of two SI units raised to arbitrary powers. | |
Sets string that represents unit. | |
Changes an SI unit according to string representation. | |
Finds a good format for representing a value. | |
Finds format for representing a specific power-of-10 multiple of a unit. | |
Finds a good format for representing a values with given number of significant digits. | |
Finds a good format for representing a range of values with given resolution. |
Method Details |
---|
divide(siunit2, result)Divides two SI units.
|
equal(siunit2)Checks whether two SI units are equal.
|
get_string(style)Obtains string representing a SI unit.
|
multiply(siunit2, result)Multiplies two SI units.
|
nth_root(ipower, result)Calulates n-th root of an SI unit. This operation fails if the result would have fractional powers that are not representable bySIUnit .
|
power(power, result)Computes a power of an SI unit.
|
power_multiply(power1, siunit2, power2, result)Computes the product of two SI units raised to arbitrary powers. This is the most complex SI unit arithmetic function. It can be easily chained when more than two units are to be multiplied.
|
set_from_string(unit_string)Sets string that represents unit. It must be base unit with no prefixes (e. g. "m", "N", "A", etc.).
|
set_from_string_parse(unit_string, power10)Changes an SI unit according to string representation. This is a more powerful version ofSiUnit.set_from_string (), please see
SiUnit.new_parse () for some discussion.
|
UNIMPLEMENTED_get_format(style, value, format)Finds a good format for representing a value. The values should be then printed as value/format ->magnitude
[format ->units] with
format ->precision decimal places.
|
UNIMPLEMENTED_get_format_for_power10(style, power10, format)Finds format for representing a specific power-of-10 multiple of a unit. The values should be then printed as
value/ format .
|
UNIMPLEMENTED_get_format_with_digits(style, maximum, sdigits, format)Finds a good format for representing a values with given number of significant digits. The values should be then printed as value/format ->magnitude
[format ->units] with
format ->precision decimal places.
|
UNIMPLEMENTED_get_format_with_resolution(style, maximum, resolution, format)Finds a good format for representing a range of values with given resolution. The values should be then printed as value/format ->magnitude
[format ->units] with
format ->precision decimal places.
|
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 | http://epydoc.sf.net |