ReFRACtor
FullPhysics::BinMap< T > Class Template Reference

This is a map that takes and index and returns a value. More...

#include <bin_map.h>

+ Collaboration diagram for FullPhysics::BinMap< T >:

Public Types

typedef std::map< double, T >::const_iterator const_iterator
 
typedef std::map< double, T >::iterator iterator
 

Public Member Functions

 BinMap ()
 
template<class It >
 BinMap (It xstart, It xend, const T &Initial_value)
 Constructor. More...
 
template<class It , class C >
 BinMap (It xstart, It xend, const C &Initial_value_creator)
 Constructor. More...
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
const T & operator[] (double x) const
 Return bin that "x" falls into. More...
 
T & operator[] (double x)
 
std::vector< T > value () const
 

Detailed Description

template<class T>
class FullPhysics::BinMap< T >

This is a map that takes and index and returns a value.

The index is a double, and we find the bin that it maps to. This extrapolates, so if a index is greater the last bin than we return the last bin.

Definition at line 11 of file bin_map.h.

Member Typedef Documentation

◆ const_iterator

template<class T >
typedef std::map<double, T>::const_iterator FullPhysics::BinMap< T >::const_iterator

Definition at line 13 of file bin_map.h.

◆ iterator

template<class T >
typedef std::map<double, T>::iterator FullPhysics::BinMap< T >::iterator

Definition at line 14 of file bin_map.h.

Constructor & Destructor Documentation

◆ BinMap() [1/3]

template<class T >
FullPhysics::BinMap< T >::BinMap ( )
inline

Definition at line 20 of file bin_map.h.

◆ BinMap() [2/3]

template<class T >
template<class It >
FullPhysics::BinMap< T >::BinMap ( It  xstart,
It  xend,
const T &  Initial_value 
)
inline

Constructor.

This takes an iterator to fill in the boundaries of the bins.

Definition at line 26 of file bin_map.h.

◆ BinMap() [3/3]

template<class T >
template<class It , class C >
FullPhysics::BinMap< T >::BinMap ( It  xstart,
It  xend,
const C &  Initial_value_creator 
)
inline

Constructor.

This takes an iterator to fill in the boundaries of the bins, and a function that is used to create the initial value.

Definition at line 41 of file bin_map.h.

Member Function Documentation

◆ begin() [1/2]

template<class T >
const_iterator FullPhysics::BinMap< T >::begin ( ) const
inline

Definition at line 15 of file bin_map.h.

◆ begin() [2/2]

template<class T >
iterator FullPhysics::BinMap< T >::begin ( )
inline

Definition at line 16 of file bin_map.h.

◆ end() [1/2]

template<class T >
const_iterator FullPhysics::BinMap< T >::end ( ) const
inline

Definition at line 17 of file bin_map.h.

◆ end() [2/2]

template<class T >
iterator FullPhysics::BinMap< T >::end ( )
inline

Definition at line 18 of file bin_map.h.

◆ operator[]() [1/2]

template<class T >
const T& FullPhysics::BinMap< T >::operator[] ( double  x) const
inline

Return bin that "x" falls into.

Definition at line 55 of file bin_map.h.

◆ operator[]() [2/2]

template<class T >
T& FullPhysics::BinMap< T >::operator[] ( double  x)
inline

Definition at line 65 of file bin_map.h.

◆ value()

template<class T >
std::vector<T> FullPhysics::BinMap< T >::value ( ) const
inline

Definition at line 80 of file bin_map.h.


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

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:12