shark::MultiTaskSample< InputTypeT > Struct Template Reference

Aggregation of input data and task index. More...

#include <shark/Models/Kernels/MultiTaskKernel.h>

+ Inheritance diagram for shark::MultiTaskSample< InputTypeT >:

Public Types

typedef InputTypeT InputType
 

Public Member Functions

 MultiTaskSample ()
 Default constructor. More...
 
 MultiTaskSample (InputType const &i, std::size_t t)
 Construction from an input and a task index. More...
 
void read (InArchive &ar)
 Read the component from the supplied archive. More...
 
void write (OutArchive &ar) const
 Write the component to the supplied archive. More...
 
- Public Member Functions inherited from shark::ISerializable
virtual ~ISerializable ()
 Virtual d'tor. More...
 
void load (InArchive &archive, unsigned int version)
 Versioned loading of components, calls read(...). More...
 
void save (OutArchive &archive, unsigned int version) const
 Versioned storing of components, calls write(...). More...
 
 BOOST_SERIALIZATION_SPLIT_MEMBER ()
 

Public Attributes

InputType input
 input data More...
 
std::size_t task
 task index More...
 

Detailed Description

template<class InputTypeT>
struct shark::MultiTaskSample< InputTypeT >

Aggregation of input data and task index.

Generic data structure for augmenting arbitrary data with an integer. This integer is typically used as a task identifier in multi-task and transfer learning.

Definition at line 54 of file MultiTaskKernel.h.

Member Typedef Documentation

◆ InputType

template<class InputTypeT >
typedef InputTypeT shark::MultiTaskSample< InputTypeT >::InputType

Definition at line 56 of file MultiTaskKernel.h.

Constructor & Destructor Documentation

◆ MultiTaskSample() [1/2]

template<class InputTypeT >
shark::MultiTaskSample< InputTypeT >::MultiTaskSample ( )
inline

Default constructor.

Definition at line 58 of file MultiTaskKernel.h.

◆ MultiTaskSample() [2/2]

template<class InputTypeT >
shark::MultiTaskSample< InputTypeT >::MultiTaskSample ( InputType const &  i,
std::size_t  t 
)
inline

Construction from an input and a task index.

Definition at line 62 of file MultiTaskKernel.h.

Member Function Documentation

◆ read()

template<class InputTypeT >
void shark::MultiTaskSample< InputTypeT >::read ( InArchive archive)
inlinevirtual

Read the component from the supplied archive.

Parameters
[in,out]archiveThe archive to read from.

Reimplemented from shark::ISerializable.

Definition at line 66 of file MultiTaskKernel.h.

References shark::MultiTaskSample< InputTypeT >::input, and shark::MultiTaskSample< InputTypeT >::task.

◆ write()

template<class InputTypeT >
void shark::MultiTaskSample< InputTypeT >::write ( OutArchive archive) const
inlinevirtual

Write the component to the supplied archive.

Parameters
[in,out]archiveThe archive to write to.

Reimplemented from shark::ISerializable.

Definition at line 71 of file MultiTaskKernel.h.

References shark::MultiTaskSample< InputTypeT >::input, and shark::MultiTaskSample< InputTypeT >::task.

Member Data Documentation

◆ input

template<class InputTypeT >
InputType shark::MultiTaskSample< InputTypeT >::input

◆ task

template<class InputTypeT >
std::size_t shark::MultiTaskSample< InputTypeT >::task

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