SourceXtractorPlusPlus  0.11
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
ModelFitting::DataVsModelInputTraits< InputType > Class Template Reference

Traits class the DataVsModelResiduals class uses for accessing its inputs. More...

#include <DataVsModelInputTraits.h>

Public Types

using iterator = typename InputType::const_iterator
 

Static Public Member Functions

static iterator begin (InputType &input)
 Returns an iterator to the first element of the input. More...
 
static iterator end (InputType &input)
 Returns an iterator to one after the last element of the input. More...
 
static size_t size (const InputType &input)
 Returns the size of the input. More...
 

Detailed Description

template<typename InputType>
class ModelFitting::DataVsModelInputTraits< InputType >

Traits class the DataVsModelResiduals class uses for accessing its inputs.

To achieve an extra level of abstraction, the DataVsModelResiduals is not accessing directly its templated input parameters. Instead, it uses the static methods of this class, with the correct InputType template parameter. This way, classes which are not providing the required methods can still be used as DataVsModelResiduals inputs.

The default implementation of the DataVsModelInputTraits is designed to cover STL containers. To use a custom class which is not compliant with this interface as input, a specialization of the DataVsModelInputTraits can be created.

Template Parameters
InputTypeThe type of the parameter the traits manages

Definition at line 50 of file DataVsModelInputTraits.h.

Member Typedef Documentation

template<typename InputType >
using ModelFitting::DataVsModelInputTraits< InputType >::iterator = typename InputType::const_iterator

The type of the iterator used for accessing the input elements. It must provide the input iterator operations.

Definition at line 54 of file DataVsModelInputTraits.h.

Member Function Documentation

template<typename InputType >
static iterator ModelFitting::DataVsModelInputTraits< InputType >::begin ( InputType &  input)
inlinestatic

Returns an iterator to the first element of the input.

Definition at line 57 of file DataVsModelInputTraits.h.

template<typename InputType >
static iterator ModelFitting::DataVsModelInputTraits< InputType >::end ( InputType &  input)
inlinestatic

Returns an iterator to one after the last element of the input.

Definition at line 62 of file DataVsModelInputTraits.h.

template<typename InputType >
static size_t ModelFitting::DataVsModelInputTraits< InputType >::size ( const InputType &  input)
inlinestatic

Returns the size of the input.

Definition at line 67 of file DataVsModelInputTraits.h.


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