#include <EnergyComponents.h>
|
double & | operator[] (const char *key) |
| Access by C-style string (need this to prevent ambiguous overload)
|
|
double & | operator[] (const string &key) |
| Expose base-class function hidden by the C-style string version above.
|
|
double | operator[] (const char *key) const |
| Access by C-style string (need this to prevent ambiguous overload)
|
|
double | operator[] (const string &key) const |
| Expose base-class function hidden by the C-style string version above.
|
|
void | operator= (const double &value) |
| Set to a simple scalar.
|
|
void | operator+= (const double &value) |
| Accumulate a simple scalar.
|
|
| operator double () const |
| Return sum of all components when cast to a simple number.
|
|
void | print (FILE *fp, bool nonzeroOnly, const char *format="\t%s = %le\n") const |
|
|
K | keys |
| STL member.
|
|
T | elements |
| STL member.
|
|
Simply a map of named components with a few extra features! Proper use: E["name"] = value; or E["name"] += value Casting to a double returns the total. Assignment or increment by a scalar happens in a "default" component name
void EnergyComponents::print |
( |
FILE * |
fp, |
|
|
bool |
nonzeroOnly, |
|
|
const char * |
format = "\t%s = %le\n" |
|
) |
| const |
|
inline |
Print to a stream:
- Parameters
-
fp | Output stream |
nonzeroOnly | If true, print only non-zero components |
format | Output format for each component - must have one string and one floating point conversion spec each |
The documentation for this class was generated from the following file: