shark::WeightedDataBatch< DataBatchType, WeightBatchType > Struct Template Reference

#include <shark/Data/WeightedDataset.h>

Public Types

typedef WeightedDataPair< decltype(getBatchElement(std::declval< DataBatchType & >), 0)), decltype(getBatchElement(std::declval< WeightBatchType & >), 0)) > reference
 
typedef WeightedDataPair< decltype(getBatchElement(std::declval< typename std::add_const< DataBatchType >::type & >), 0)), decltype(getBatchElement(std::declval< typename std::add_const< WeightBatchType >::type & >), 0)) > const_reference
 
typedef IndexingIterator< WeightedDataBatchiterator
 
typedef IndexingIterator< WeightedDataBatch const > const_iterator
 

Public Member Functions

template<class D , class W >
 WeightedDataBatch (D &&data, W &&weight)
 
template<class Pair >
 WeightedDataBatch (std::size_t size, Pair const &p)
 
template<class I , class L >
WeightedDataBatchoperator= (WeightedDataBatch< I, L > const &batch)
 
std::size_t size () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (std::size_t i)
 
const_reference operator[] (std::size_t i) const
 

Public Attributes

DataBatchType data
 
WeightBatchType weight
 

Detailed Description

template<class DataBatchType, class WeightBatchType>
struct shark::WeightedDataBatch< DataBatchType, WeightBatchType >

Definition at line 91 of file WeightedDataset.h.

Member Typedef Documentation

◆ const_iterator

template<class DataBatchType, class WeightBatchType>
typedef IndexingIterator<WeightedDataBatch const> shark::WeightedDataBatch< DataBatchType, WeightBatchType >::const_iterator

Definition at line 112 of file WeightedDataset.h.

◆ const_reference

template<class DataBatchType, class WeightBatchType>
typedef WeightedDataPair< decltype(getBatchElement(std::declval<typename std::add_const<DataBatchType>::type&>),0)), decltype(getBatchElement(std::declval<typename std::add_const<WeightBatchType>::type&>),0)) > shark::WeightedDataBatch< DataBatchType, WeightBatchType >::const_reference

Definition at line 110 of file WeightedDataset.h.

◆ iterator

template<class DataBatchType, class WeightBatchType>
typedef IndexingIterator<WeightedDataBatch> shark::WeightedDataBatch< DataBatchType, WeightBatchType >::iterator

Definition at line 111 of file WeightedDataset.h.

◆ reference

template<class DataBatchType, class WeightBatchType>
typedef WeightedDataPair< decltype(getBatchElement(std::declval<DataBatchType&>),0)), decltype(getBatchElement(std::declval<WeightBatchType&>),0)) > shark::WeightedDataBatch< DataBatchType, WeightBatchType >::reference

Definition at line 106 of file WeightedDataset.h.

Constructor & Destructor Documentation

◆ WeightedDataBatch() [1/2]

template<class DataBatchType, class WeightBatchType>
template<class D , class W >
shark::WeightedDataBatch< DataBatchType, WeightBatchType >::WeightedDataBatch ( D &&  data,
W &&  weight 
)
inline

Definition at line 115 of file WeightedDataset.h.

◆ WeightedDataBatch() [2/2]

template<class DataBatchType, class WeightBatchType>
template<class Pair >
shark::WeightedDataBatch< DataBatchType, WeightBatchType >::WeightedDataBatch ( std::size_t  size,
Pair const &  p 
)
inline

Definition at line 121 of file WeightedDataset.h.

Member Function Documentation

◆ begin() [1/2]

template<class DataBatchType, class WeightBatchType>
iterator shark::WeightedDataBatch< DataBatchType, WeightBatchType >::begin ( )
inline

Definition at line 136 of file WeightedDataset.h.

◆ begin() [2/2]

template<class DataBatchType, class WeightBatchType>
const_iterator shark::WeightedDataBatch< DataBatchType, WeightBatchType >::begin ( ) const
inline

Definition at line 139 of file WeightedDataset.h.

◆ end() [1/2]

template<class DataBatchType, class WeightBatchType>
iterator shark::WeightedDataBatch< DataBatchType, WeightBatchType >::end ( )
inline

Definition at line 143 of file WeightedDataset.h.

◆ end() [2/2]

template<class DataBatchType, class WeightBatchType>
const_iterator shark::WeightedDataBatch< DataBatchType, WeightBatchType >::end ( ) const
inline

Definition at line 146 of file WeightedDataset.h.

◆ operator=()

template<class DataBatchType, class WeightBatchType>
template<class I , class L >
WeightedDataBatch& shark::WeightedDataBatch< DataBatchType, WeightBatchType >::operator= ( WeightedDataBatch< I, L > const &  batch)
inline

◆ operator[]() [1/2]

template<class DataBatchType, class WeightBatchType>
reference shark::WeightedDataBatch< DataBatchType, WeightBatchType >::operator[] ( std::size_t  i)
inline

Definition at line 150 of file WeightedDataset.h.

References shark::getBatchElement().

◆ operator[]() [2/2]

template<class DataBatchType, class WeightBatchType>
const_reference shark::WeightedDataBatch< DataBatchType, WeightBatchType >::operator[] ( std::size_t  i) const
inline

Definition at line 153 of file WeightedDataset.h.

References shark::getBatchElement().

◆ size()

template<class DataBatchType, class WeightBatchType>
std::size_t shark::WeightedDataBatch< DataBatchType, WeightBatchType >::size ( ) const
inline

Definition at line 132 of file WeightedDataset.h.

Member Data Documentation

◆ data

template<class DataBatchType, class WeightBatchType>
DataBatchType shark::WeightedDataBatch< DataBatchType, WeightBatchType >::data

◆ weight

template<class DataBatchType, class WeightBatchType>
WeightBatchType shark::WeightedDataBatch< DataBatchType, WeightBatchType >::weight

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