# Dataset.h

    00001 /*
    00002  *             Copyright (C) 2005 Maarten Keijzer
    00003  *
    00004  *          This program is free software; you can redistribute it and/or modify
    00005  *          it under the terms of version 2 of the GNU General Public License as
    00006  *          published by the Free Software Foundation.
    00007  *
    00008  *          This program is distributed in the hope that it will be useful,
    00009  *          but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010  *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00011  *          GNU General Public License for more details.
    00012  *
    00013  *          You should have received a copy of the GNU General Public License
    00014  *          along with this program; if not, write to the Free Software
    00015  *          Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00016  */
    00017
    00018 #ifndef DATASET_H_
    00019 #define DATASET_H_
    00020
    00021 #include <string>
    00022 #include <vector>
    00023
    00024 class DataSetImpl;
    00025
    00026 class Dataset {
    00027
    00028     DataSetImpl* pimpl;
    00029
    00030     Dataset& operator=(const Dataset&); // cannot assign
    00031     public:
    00032
    00033     Dataset();
    00034     ~Dataset();
    00035     Dataset(const Dataset&);
    00036
    00037     void load_data(std::string filename);
    00038
    00039     unsigned n_records() const;
    00040     unsigned n_fields() const;
    00041
    00042     const std::vector<double>& get_inputs(unsigned record) const;
    00043     double get_target(unsigned record) const;
    00044
    00045     std::vector<double> input_minima() const;
    00046     std::vector<double> input_maxima() const;
    00047
    00048 };
    00049
    00050 #endif
    00051