queso-0.57.1
|
A templated class representing the discrete vector subsets. More...
#include <DiscreteSubset.h>
Public Member Functions | |
Constructor/Destructor methods. | |
DiscreteSubset (const char *prefix, const VectorSpace< V, M > &vectorSpace, const std::vector< V * > &elements) | |
Default Constructor. More... | |
~DiscreteSubset () | |
Destructor. More... | |
Mathematical methods. | |
bool | contains (const V &vec) const |
Checks whether this discrete subset contains vector vec . TODO: incomplete code. More... | |
I/O methods. | |
void | print (std::ostream &os) const |
Prints nothing. More... | |
Public Member Functions inherited from QUESO::VectorSubset< V, M > | |
VectorSubset () | |
Default Constructor. More... | |
VectorSubset (const char *prefix, const VectorSpace< V, M > &vectorSpace, double volume) | |
Shaped constructor (with volume). More... | |
virtual | ~VectorSubset () |
Destructor. More... | |
const VectorSpace< V, M > & | vectorSpace () const |
Vector space to which this set belongs to. See template specialization. More... | |
Public Member Functions inherited from QUESO::VectorSet< V, M > | |
VectorSet (const BaseEnvironment &env, const char *prefix, double volume) | |
Shaped constructor. More... | |
virtual | ~VectorSet () |
Virtual destructor. More... | |
const BaseEnvironment & | env () const |
Environment. Access to private attribute m_env. More... | |
const std::string & | prefix () const |
Access to private attribute m_prefix. More... | |
double | volume () const |
Set volume; access to private attribute m_volume. More... | |
virtual void | centroid (V &vec) const =0 |
Returns the set centroid in the vector vec . See template specialization. More... | |
virtual void | moments (M &mat) const =0 |
Returns the set moments of inertia in the matrix mat . See template specialization. More... | |
Protected Attributes | |
std::vector< V * > | m_elements |
Number of elements in the discrete vector subset. More... | |
Protected Attributes inherited from QUESO::VectorSubset< V, M > | |
const VectorSpace< V, M > * | m_vectorSpace |
Protected Attributes inherited from QUESO::VectorSet< V, M > | |
const BaseEnvironment & | m_env |
std::string | m_prefix |
double | m_volume |
A templated class representing the discrete vector subsets.
This class is used to represent the a discrete vector subset. Here the notion of volume does not apply, instead there is the total number of elements (vectors) that belongs to the subset.
Definition at line 45 of file DiscreteSubset.h.
QUESO::DiscreteSubset< V, M >::DiscreteSubset | ( | const char * | prefix, |
const VectorSpace< V, M > & | vectorSpace, | ||
const std::vector< V * > & | elements | ||
) |
Default Constructor.
It constructs a class object given the prefix, vector space to which it belongs and its number of elements.
Definition at line 32 of file DiscreteSubset.C.
References QUESO::VectorSet< V, M >::m_volume.
QUESO::DiscreteSubset< V, M >::~DiscreteSubset | ( | ) |
|
virtual |
Checks whether this discrete subset contains vector vec
. TODO: incomplete code.
Implements QUESO::VectorSubset< V, M >.
Definition at line 53 of file DiscreteSubset.C.
|
virtual |
Prints nothing.
Reimplemented from QUESO::VectorSubset< V, M >.
Definition at line 61 of file DiscreteSubset.C.
|
protected |
Number of elements in the discrete vector subset.
Definition at line 77 of file DiscreteSubset.h.