scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
|
▼Nscifir | The namespace scifir contains all scifir-units, excepting the string literals, which are outside |
Caddress | |
Caid | Class that stores astronomical ids, not as an integer but with an string as identifier. Initialization string example: "(P) universe:milky-way:solar-system:earth" |
Cangle | Class that allows to work with angles. Each angle sizes 4 bytes. Initialization string example: "20°" |
Ccolor | |
Ccomplex_number | |
Cconversion | |
Ccoordinates_1d | |
Ccoordinates_1d< float > | |
Ccoordinates_2d | |
Ccoordinates_2d< float > | |
Ccoordinates_2dr | |
Ccoordinates_2dr< float > | |
Ccoordinates_3d | Class that represents the position in 3D spaces. The space can be a length or, for the case of imaginary spaces, any custom dimension. The most interesting feature is the fact that all the coordinates systems in 3D are present at the same time, it's possible to use cartesian, cylindrical or spherical coordinates as needed for the same instance of coordinates, it's not needed to select just one of those systems. The geographical coordinates aren't yet finished |
Ccoordinates_3d< float > | Specialization of coordinates_3d, with the same behaviour and functions, that is specialized for float types. It can be used when it's needed to save memory, because a float uses less memory than a scalar_unit |
Ccoordinates_3dr | |
Ccoordinates_3dr< float > | |
Ccoordinates_nd | |
Ccoordinates_nd< float > | |
Ccoordinates_ndr | |
Ccoordinates_ndr< float > | |
Cdimension | Class that represents dimensions of the SI system of units. Each dimension sizes 6 bytes, 1 byte for the dimension type, 1 byte for the prefix, 1 byte for the position (which can be the NUMERATOR or the DENOMINATOR), and 3 bytes for the custom dimension (in case it's used one). A base dimension is a dimension that doesn't has more base dimensions, a derived dimension has always base dimensions from which it's defined |
Cdirection | |
Cis_integer_number | |
Cis_number | |
Clab_number | |
Clatitude | |
Clongitude | |
Cmatrix | |
Cpercentage | Class that allows to handle percentages and do calculations with it easy. It supports normal percentages (with %), ppm, ppb, ppt and ppq. The types ppb, ppt and ppq are currently not supported because the float type in percentage class can't store so lower values |
Cpixel | |
Cprefix | Class that represents prefixes of the SI system of units. Each prefix sizes 1 byte. The prefix micro is added to a dimension with the symbol µ |
Cscalar_unit | Class that allows to create scalar units, which are composed of a value (as a float) and dimensions. The dimensions can be of any number, and be simple dimensions, composite dimensions and/or special names of dimensions. All base and derived scalar unit classes inherit from scalar_unit. Initialization string example: "1 N" |
Csize_2d | Class that allows to store and calculate size in 2D, with width and height. The template parameter T allows to select any scalar_unit or numeric type to be the type of width and height (they always have the same type in the same instance). The width and height can be any scalar_unit, usually length, but imaginary spaces with custom dimensions are also allowed. Initialization string example: "1 m * 2 m" |
Csize_2d< float > | Specialization class of size_2d<T> that allows to store and calculate size in 2D, with width and height as float types. Initialization string example: "1 * 2" |
Csize_3d | Class that allows to store and calculate size in 3D, with width, height and depth. The template parameter T allows to select any scalar_unit or numeric type to be the type of the width, the height and the depth (they always have the same type in the same instance). The width, height and depth can be any scalar_unit, usually length, but imaginary spaces with custom dimensions are also allowed. Initialization string example: "1 m * 2 m * 4 m" |
Csize_3d< float > | Specialization class of size_3d<T> that allows to store and calculate size in 3D, with width, height and depth as float types. Initialization string example: "1 * 2 * 4" |
Csize_nd | |
Csize_nd< float > | |
Ctime_duration | |
Cvector_unit_2d | Class that creates a vector unit in 2D. The vector is in polar coordinates with a value and dimensions of the scalar_unit, and an angle theta for his direction. All base and derived vectorial unit classes in 2D inherit from vector_unit_2d, and add the suffix **_2d** in their name. Initialization string example: "1 N 20θ". 'θ' is the Unicode Character U+03B8 |
Cvector_unit_3d | Class that creates a vector unit in 3D. The vector is in spherical coordinates with a value and dimensions of the scalar_unit, and an angle theta and another angle phi for his direction. All base and derived vectorial unit classes in 3D inherit from vector_unit_3d, and add the suffix **_3d** in their name. Initialization string example: "1 N 20θ 30Φ". 'θ' is the Unicode Character U+03B8. 'Φ' is the Unicode Character U+03A6 |
Cvector_unit_nd | Class that creates a vector in ND, which means a variable number of dimensions. A vector_unit_nd can change to be in 1D, in 2D or in 3D, but it cannot be in more than one dimension at the same time. The member-variables of vector_unit_nd are the value and the vector<dimension> of scalar_unit, and a vector<angle> angles. The number of angles is equal to the number of dimensions vector unit has - 1. In 1D vector_unit_nd doesn't has angles, in 2D vector_unit_nd is in polar coordinates and has 1 angle, and in 3D vector_unit_nd is in spherical coordinates and has 2 angles. All base and derived vectorial unit classes in ND inherit from vector_unit_nd, and add the suffix **_nd** in their name. Initialization string example: "1 N 20° 30° 40°". '°' is the Unicode Character U+00B0 |
Czid | Class that allows to store information about a zone, including the astronomical object inside which the zone is. The zone can be in any astronomical object, not only the Earth is supported. Initialization string example: "(P) universe:milky-way:solar-system:earth (Z) chile:region-metropolitana:santiago:providencia" |