|
|
| OSQuantityVector (const Unit &units=Unit()) |
|
| OSQuantityVector (const Unit &units, unsigned n, double value=0.0) |
|
| OSQuantityVector (const Unit &units, const std::vector< double > &values) |
|
| OSQuantityVector (const std::vector< Quantity > &values) |
|
| OSQuantityVector (const OSQuantityVector &other) |
|
OSQuantityVector & | operator= (const OSQuantityVector &other) |
|
|
Unit | units () const |
| Returns a clone of this object's units. More...
|
|
UnitSystem | system () const |
|
Scale | scale () const |
|
std::vector< Quantity > | quantities () const |
| Creates a vector of separate quantities. More...
|
|
std::vector< double > | values () const |
| Returns the underlying values of this OSQuantityVector. More...
|
|
Quantity | getQuantity (unsigned i) const |
|
bool | empty () const |
| Return value is equivalent to values().empty(). More...
|
|
unsigned | size () const |
| Return value is equivalent to values().size(). More...
|
|
|
bool | setScale (int scaleExponent) |
| Sets the scale to the one registered in ScaleFactory for 10^scaleExponent. More...
|
|
bool | setScale (const std::string &scaleAbbreviation) |
| Sets the scale to the one registered in ScaleFactory under scaleAbbreviation. More...
|
|
void | push_back (Quantity q) |
| Pushes q onto this vector if possible, otherwise throws. More...
|
|
void | pop_back () |
| Removes the last value in this OSQuantityVector. More...
|
|
void | resize (unsigned n, double value=0.0) |
| Changes the size of this OSQuantityVector to n, using value to fill in any newly created elements as necessary. More...
|
|
void | clear () |
| Empties all values out of this OSQuantityVector. More...
|
|
|
Quantities that have units of temperature need several extra functions to distinguish between absolute and relative measures.
|
bool | isTemperature () const |
| Returns true if units().optionalCast<TemperatureUnit>(). More...
|
|
bool | isAbsolute () const |
| Throws if !units().optionalCast<TemperatureUnit>(). More...
|
|
bool | isRelative () const |
| Throws if !units().optionalCast<TemperatureUnit>(). More...
|
|
void | setAsAbsolute () |
| Set temperature as absolute. More...
|
|
void | setAsRelative () |
| Set temperature as relative. More...
|
|
|
void | lbmToLbf () |
| Conversions for pounds mass to pounds force. More...
|
|
void | lbfToLbm () |
| Conversions for pounds mass to pounds force. More...
|
|
|
OSQuantityVector & | operator+= (OSQuantityVector rVector) |
| Adds rVector to this vector, if possible. More...
|
|
OSQuantityVector & | operator+= (Quantity rQuantity) |
| Adds rQuantity to this vector element-wise, if possible. More...
|
|
OSQuantityVector & | operator-= (OSQuantityVector rVector) |
| Subtracts rVector from this vector, if possible. More...
|
|
OSQuantityVector & | operator-= (Quantity rQuantity) |
| Subtracts rQuantity from this vector element-wise, if possible. More...
|
|
OSQuantityVector & | operator*= (const Quantity &rQuantity) |
| Multiplies all values of this vector by rQuantity. More...
|
|
OSQuantityVector & | operator/= (const Quantity &rQuantity) |
| Divides all values of this vector by rQuantity. More...
|
|
OSQuantityVector & | operator*= (double d) |
| Multiplies all values of this vector by d. More...
|
|
OSQuantityVector & | operator/= (double d) |
| Divides all values of this vector by d. More...
|
|
|
(Note that these are not member functions.)
|
OSQuantityVector | convert (const OSQuantityVector &original, UnitSystem sys) |
| Non-member function that uses just two calls to QuantityConverter to convert an entire OSQuantityVector. More...
|
|
OSQuantityVector | convert (const OSQuantityVector &original, const Unit &targetUnits) |
| Non-member function that uses just two calls to QuantityConverter to convert an entire OSQuantityVector. More...
|
|
Quantity | dot (OSQuantityVector lVector, const OSQuantityVector &rVector) |
|
bool | operator!= (const OSQuantityVector &lVector, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator* (const OSQuantityVector &lVector, const Quantity &rQuantity) |
|
OSQuantityVector | operator* (const OSQuantityVector &lVector, double d) |
|
OSQuantityVector | operator* (const Quantity &lQuantity, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator* (double d, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator+ (const OSQuantityVector &lVector, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator+ (const OSQuantityVector &lVector, const Quantity &rQuantity) |
|
OSQuantityVector | operator+ (const Quantity &lQuantity, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator- (const OSQuantityVector &rVector) |
|
OSQuantityVector | operator- (const OSQuantityVector &lVector, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator- (const OSQuantityVector &lVector, const Quantity &rQuantity) |
|
OSQuantityVector | operator- (const Quantity &lQuantity, const OSQuantityVector &rVector) |
|
OSQuantityVector | operator/ (const OSQuantityVector &lVector, const Quantity &rQuantity) |
|
OSQuantityVector | operator/ (const OSQuantityVector &lVector, double d) |
|
bool | operator== (const OSQuantityVector &lVector, const OSQuantityVector &rVector) |
|
Represents a vector of quantities all with the same units.
Provides performance improvements over directly operating on std::vector<Quantity>. The constructors and assignment operator ensure that this class behaves as "plain
old data" (POD) by cloning any units information (to avoid multiple objects pointing to the exact same unit data).