ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
UnionListIF< F > Class Template Reference

#include <ERF_EBIF.H>

Collaboration diagram for UnionListIF< F >:

Public Member Functions

 UnionListIF (const Vector< F > &a_ifs)
 
 ~UnionListIF ()
 
 UnionListIF (const UnionListIF &rhs)=default
 
 UnionListIF (UnionListIF &&rhs)=default
 
UnionListIFoperator= (const UnionListIF &rhs)=default
 
UnionListIFoperator= (UnionListIF &&rhs)=default
 
bool is_empty () const
 
Real operator() (const RealArray &p) const
 

Private Attributes

Vector< F > m_ifs
 
bool m_empty
 

Constructor & Destructor Documentation

◆ UnionListIF() [1/3]

template<class F >
UnionListIF< F >::UnionListIF ( const Vector< F > &  a_ifs)
inline
17  : m_ifs(a_ifs)
18  {
19  m_empty = ! a_ifs.empty();
20  }
Vector< F > m_ifs
Definition: ERF_EBIF.H:45
bool m_empty
Definition: ERF_EBIF.H:46

◆ ~UnionListIF()

template<class F >
UnionListIF< F >::~UnionListIF ( )
inline
22 {}

◆ UnionListIF() [2/3]

template<class F >
UnionListIF< F >::UnionListIF ( const UnionListIF< F > &  rhs)
default

◆ UnionListIF() [3/3]

template<class F >
UnionListIF< F >::UnionListIF ( UnionListIF< F > &&  rhs)
default

Member Function Documentation

◆ is_empty()

template<class F >
bool UnionListIF< F >::is_empty ( ) const
inline
29 {return m_empty;}

◆ operator()()

template<class F >
Real UnionListIF< F >::operator() ( const RealArray &  p) const
inline
31  {
32 
33  // NOTE: this assumes that m_ifs is not empty
34  Real vmax=m_ifs[0](p);
35  for (int i=1; i< m_ifs.size(); i++) {
36  Real vcur = m_ifs[i](p);
37  if ( vmax < vcur ) vmax = vcur;
38  }
39 
40  return vmax;
41  }

◆ operator=() [1/2]

template<class F >
UnionListIF& UnionListIF< F >::operator= ( const UnionListIF< F > &  rhs)
default

◆ operator=() [2/2]

template<class F >
UnionListIF& UnionListIF< F >::operator= ( UnionListIF< F > &&  rhs)
default

Member Data Documentation

◆ m_empty

template<class F >
bool UnionListIF< F >::m_empty
private

◆ m_ifs

template<class F >
Vector<F> UnionListIF< F >::m_ifs
private

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