queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO::DiscreteSubset< V, M > Class Template Reference

A templated class representing the discrete vector subsets. More...

#include <DiscreteSubset.h>

Inheritance diagram for QUESO::DiscreteSubset< V, M >:
QUESO::VectorSubset< V, M > QUESO::VectorSet< V, M >

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 BaseEnvironmentenv () 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 BaseEnvironmentm_env
 
std::string m_prefix
 
double m_volume
 

Detailed Description

template<class V = GslVector, class M = GslMatrix>
class QUESO::DiscreteSubset< V, M >

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.

Constructor & Destructor Documentation

template<class V , class M >
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.

35  : VectorSubset<V,M>(prefix, vectorSpace, 0.),
36  m_elements(elements.size(),NULL)
37 {
38  queso_deprecated();
39 
40  m_volume = 0.;
41  queso_not_implemented();
42 }
const std::string & prefix() const
Access to private attribute m_prefix.
Definition: VectorSet.C:84
std::vector< V * > m_elements
Number of elements in the discrete vector subset.
const VectorSpace< V, M > & vectorSpace() const
Vector space to which this set belongs to. See template specialization.
Definition: VectorSubset.C:68
template<class V , class M >
QUESO::DiscreteSubset< V, M >::~DiscreteSubset ( )

Destructor.

Definition at line 46 of file DiscreteSubset.C.

47 {
48  queso_deprecated();
49 }

Member Function Documentation

template<class V , class M >
bool QUESO::DiscreteSubset< V, M >::contains ( const V &  vec) const
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.

54 {
55  queso_deprecated();
56  queso_not_implemented();
57 }
template<class V , class M >
void QUESO::DiscreteSubset< V, M >::print ( std::ostream &  os) const
virtual

Prints nothing.

Reimplemented from QUESO::VectorSubset< V, M >.

Definition at line 61 of file DiscreteSubset.C.

62 {
63  queso_deprecated();
64 
65  os << "In DiscreteSubset<V,M>::print()"
66  << ": nothing to print"
67  << std::endl;
68 
69  return;
70 }

Member Data Documentation

template<class V = GslVector, class M = GslMatrix>
std::vector<V*> QUESO::DiscreteSubset< V, M >::m_elements
protected

Number of elements in the discrete vector subset.

Definition at line 77 of file DiscreteSubset.h.


The documentation for this class was generated from the following files:

Generated on Tue Jun 5 2018 19:48:59 for queso-0.57.1 by  doxygen 1.8.5