Plugins
Loading...
Searching...
No Matches
ug::d3f::ValueById< TIdManager > Class Template Reference

#include <value_by_id.h>

+ Inheritance diagram for ug::d3f::ValueById< TIdManager >:

Public Types

typedef TIdManager id_manager_type
 the id manager
 

Public Member Functions

number interpolate (number x, number y, number t) const
 gets the value for a given point
 
void load_values_from (const char *file_name)
 loads values from a file
 
size_t max_identifier () const
 returns the maximum index
 
size_t num_columns () const
 returns the number of the 'columns'
 
void set_interval (number delta)
 sets the 'time interval' to determine the column
 
 ValueById (number default_value)
 constructor
 

Private Member Functions

void append_value (long ident, std::vector< number > &val)
 appends a value
 
void load_values_from (std::istream &input)
 loads values from a stream
 

Private Attributes

std::vector< bool > m_assigned
 if the data for the id has been read (i.e. specified)
 
std::vector< numberm_data
 the data as a raw array for every id
 
number m_default_value
 the value to return if no id specified
 
number m_interval
 interval for the 'time' parameter to choose the correct column
 
size_t m_numCols
 number of the "columns" in the data array (or 0 if not specified yet)
 

Detailed Description

template<typename TIdManager>
class ug::d3f::ValueById< TIdManager >

This class template evaluates data using an id obtained from the "id manager"

Member Typedef Documentation

◆ id_manager_type

template<typename TIdManager >
typedef TIdManager ug::d3f::ValueById< TIdManager >::id_manager_type

the id manager

Constructor & Destructor Documentation

◆ ValueById()

template<typename TIdManager >
ug::d3f::ValueById< TIdManager >::ValueById ( number  default_value)
inline

constructor

Member Function Documentation

◆ append_value()

template<typename TIdManager >
void ug::d3f::ValueById< TIdManager >::append_value ( long  ident,
std::vector< number > &  val 
)
private

appends a value

Appends a value to the data arrays

Parameters
identthe id for the value
valthe values

References UG_THROW.

◆ interpolate()

template<typename TIdManager >
number ug::d3f::ValueById< TIdManager >::interpolate ( number  x,
number  y,
number  t 
) const

gets the value for a given point

Gets the value for a given point:

Parameters
tthe 'time argument'

References UG_THROW.

◆ load_values_from() [1/2]

template<typename TIdManager >
void ug::d3f::ValueById< TIdManager >::load_values_from ( const char *  file_name)

loads values from a file

Loads values from a file.

References ug::FindFileInStandardPaths(), UG_COND_THROW, UG_LOG, and UG_THROW.

◆ load_values_from() [2/2]

template<typename TIdManager >
void ug::d3f::ValueById< TIdManager >::load_values_from ( std::istream &  input)
private

loads values from a stream

Loads values from a stream.

References UG_CATCH_THROW, UG_LOG, and UG_THROW.

◆ max_identifier()

template<typename TIdManager >
size_t ug::d3f::ValueById< TIdManager >::max_identifier ( ) const
inline

returns the maximum index

References ug::d3f::ValueById< TIdManager >::m_assigned.

◆ num_columns()

template<typename TIdManager >
size_t ug::d3f::ValueById< TIdManager >::num_columns ( ) const
inline

returns the number of the 'columns'

References ug::d3f::ValueById< TIdManager >::m_numCols.

◆ set_interval()

template<typename TIdManager >
void ug::d3f::ValueById< TIdManager >::set_interval ( number  delta)
inline

sets the 'time interval' to determine the column

References ug::d3f::ValueById< TIdManager >::m_interval.

Member Data Documentation

◆ m_assigned

template<typename TIdManager >
std::vector<bool> ug::d3f::ValueById< TIdManager >::m_assigned
private

if the data for the id has been read (i.e. specified)

Referenced by ug::d3f::ValueById< TIdManager >::max_identifier().

◆ m_data

template<typename TIdManager >
std::vector<number> ug::d3f::ValueById< TIdManager >::m_data
private

the data as a raw array for every id

◆ m_default_value

template<typename TIdManager >
number ug::d3f::ValueById< TIdManager >::m_default_value
private

the value to return if no id specified

◆ m_interval

template<typename TIdManager >
number ug::d3f::ValueById< TIdManager >::m_interval
private

interval for the 'time' parameter to choose the correct column

Referenced by ug::d3f::ValueById< TIdManager >::set_interval().

◆ m_numCols

template<typename TIdManager >
size_t ug::d3f::ValueById< TIdManager >::m_numCols
private

number of the "columns" in the data array (or 0 if not specified yet)

Referenced by ug::d3f::ValueById< TIdManager >::num_columns().


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