/* *************************************************************

        Final Project                                 MMU 1996

        ######################################################
        #                                                    #
        #               A Modular Neural Network             #   
        #                                                    #
        #              A Fast File Access Class              #   
        #                                                    #
        ######################################################

        Albrecht Schmidt                              17.09.96

        FILE: CData.h                              Version 1.0

   ************************************************************* */

#ifndef _CData_h
#define _CData_h

#include "CSupport.h"


typedef double* vector;

typedef struct pair
{
       vector inputV;
       vector targetV;
};


class CData : CSupport
{
  private:
    pair *data; // pointer to the data memory
    int count;  // number of pairs in the memory
    int inp_len ; // lenght of the inputs
    int out_len ; // length of the outputs

  public:
    CData::CData();
    CData::~CData();

    int CData::Read(char * filename, int inp_len, int out_len=0);
    void CData::Write(char * filename);
    void CData::WriteReal(char * filename);
    void CData::WriteClass(char * filename) ;

    void CData::InpNoise(double level);
    void CData::InpNoiseReal(double level) ;
    double *CData::GetInV(vector vect, int no);
    void CData::PutInV(vector vect, int no);
    double *CData::GetOutV(vector vect, int no);
};

#endif
