UFO
ufo::PrimitiveVariables Class Reference

A range covering all "primitive" (single-channel) variables in a Variables object. More...

#include <PrimitiveVariables.h>

Collaboration diagram for ufo::PrimitiveVariables:

Public Member Functions

 PrimitiveVariables (const Variables &variables, const ObsFilterData &data)
 
PrimitiveVariablesIterator begin () const
 
PrimitiveVariablesIterator end () const
 

Private Attributes

const Variablesvariables_
 
const ObsFilterDatadata_
 

Detailed Description

A range covering all "primitive" (single-channel) variables in a Variables object.

It makes it possible to iterate over all these primitive variables using a range-based for loop. Each iteration has access to the name and group of a single variable as well as the vector of its values at all observation locations. For example:

Variables vars = ...;
ObsFilterData data = ...;  // within a filter, we'd typically use the data_ member variable
for (PrimitiveVariable var : PrimitiveVariables(vars, data)) {
  // Access to the name of the current primitive variable: var.name()
  // Access to its group: var.group()
  // Access to its values (a vector of floats): var.values()
} 

Definition at line 147 of file src/ufo/utils/PrimitiveVariables.h.

Constructor & Destructor Documentation

◆ PrimitiveVariables()

ufo::PrimitiveVariables::PrimitiveVariables ( const Variables variables,
const ObsFilterData data 
)
inline

Definition at line 149 of file src/ufo/utils/PrimitiveVariables.h.

Member Function Documentation

◆ begin()

PrimitiveVariablesIterator ufo::PrimitiveVariables::begin ( ) const
inline

Definition at line 153 of file src/ufo/utils/PrimitiveVariables.h.

◆ end()

PrimitiveVariablesIterator ufo::PrimitiveVariables::end ( ) const
inline

Definition at line 157 of file src/ufo/utils/PrimitiveVariables.h.

Member Data Documentation

◆ data_

const ObsFilterData& ufo::PrimitiveVariables::data_
private

Definition at line 163 of file src/ufo/utils/PrimitiveVariables.h.

◆ variables_

const Variables& ufo::PrimitiveVariables::variables_
private

Definition at line 162 of file src/ufo/utils/PrimitiveVariables.h.


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