OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Friends
OpenANN::DataSetView Class Reference

An index-based dataset wrapper for representing efficient dataset views on any DataSet instance. More...

#include <DataSetView.h>

+ Inheritance diagram for OpenANN::DataSetView:

Public Member Functions

 DataSetView (const DataSetView &dataset)
 Create an new instance on a given DataSetView (copy constructor) More...
 
 DataSetView (DataSet &dataset)
 Create an empty view on a given OpenANN::DataSet without samples. More...
 
template<typename InputIt >
 DataSetView (DataSet &dataset, InputIt index_begin, InputIt index_end)
 Create a new dataset view on a given OpenANN::DataSet by using an STL-like interface on std::vector<int>::iterators for indices. More...
 
virtual ~DataSetView ()
 Destructor for DataSetView (does nothing internally) More...
 
virtual int samples ()
 See OpenANN::DataSet::samples() More...
 
virtual int inputs ()
 See OpenANN::DataSet::inputs() More...
 
virtual int outputs ()
 See OpenANN::DataSet::inputs() More...
 
virtual Eigen::VectorXd & getInstance (int i)
 See OpenANN::DataSet::getInstance(int) More...
 
virtual Eigen::VectorXd & getTarget (int i)
 See OpenANN::DataSet::getTarget(int) More...
 
virtual void finishIteration (Learner &learner)
 See OpenANN::DataSet::finishIteration(OpenANN::Learner&) More...
 
virtual DataSetViewshuffle ()
 Shuffle the order of instances within this dataset view. More...
 
- Public Member Functions inherited from OpenANN::DataSet
virtual ~DataSet ()
 

Friends

void merge (DataSetView &merging, std::vector< DataSetView > &groups)
 Friend declaration for direct access to indices. More...
 

Detailed Description

An index-based dataset wrapper for representing efficient dataset views on any DataSet instance.

Its only operating on an index container that points to the current accessable instances from the reference DataSet.

Can be used for splitting and merging any DataSet partitions.

No manual memory de- and allocation is needed to handle internal pointers.

Constructor & Destructor Documentation

OpenANN::DataSetView::DataSetView ( const DataSetView dataset)

Create an new instance on a given DataSetView (copy constructor)

Parameters
datasetsource instance whose internal data is copied
OpenANN::DataSetView::DataSetView ( DataSet dataset)
inline

Create an empty view on a given OpenANN::DataSet without samples.

Parameters
datasetsource instance that is referenced by this view
template<typename InputIt >
OpenANN::DataSetView::DataSetView ( DataSet dataset,
InputIt  index_begin,
InputIt  index_end 
)
inline

Create a new dataset view on a given OpenANN::DataSet by using an STL-like interface on std::vector<int>::iterators for indices.

Parameters
datasetsource instance that is referenced by this view
index_beginiterator to the first index of an int stl container
index_enditerator to the last index of an int stl container
virtual OpenANN::DataSetView::~DataSetView ( )
inlinevirtual

Destructor for DataSetView (does nothing internally)

Member Function Documentation

virtual void OpenANN::DataSetView::finishIteration ( Learner learner)
virtual
virtual Eigen::VectorXd& OpenANN::DataSetView::getInstance ( int  i)
virtual
virtual Eigen::VectorXd& OpenANN::DataSetView::getTarget ( int  i)
virtual
virtual int OpenANN::DataSetView::inputs ( )
virtual
virtual int OpenANN::DataSetView::outputs ( )
virtual
virtual int OpenANN::DataSetView::samples ( )
virtual
virtual DataSetView& OpenANN::DataSetView::shuffle ( )
virtual

Shuffle the order of instances within this dataset view.

Returns
this instance shuffled.

Friends And Related Function Documentation

void merge ( DataSetView merging,
std::vector< DataSetView > &  groups 
)
friend

Friend declaration for direct access to indices.

Parameters
mergingthe destination DataSetView that will contain later all instances from the group
groupsnumber of DataSetView that should be merged into the destination.

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