// 
// File name: Pattern.h
//
// Discription: Описание класса Выборка
//
// Programmer: Vladimir P. Stasevich (SV)
//
// History: 
//    Created 24.02.2000 (SV)
//

#ifndef PATTERN_H
#define PATTERN_H

#include <list>
#include "TCommonNeuroConsts.h"
#pragma hdrstop

using namespace std;

struct TSolverPatternElem
{
   // входы
   float   i[SOLVER_INPUTS_NUMB];

   // выходы
   float   o[SOLVER_OUTPUTS_NUMB];
};

class TSolverLearnPattern
{
      int  numb;
      TSolverPatternElem *patt;
      
   public:
      TSolverLearnPattern() 
      { patt = NULL; };

      ~TSolverLearnPattern()
       {
          if( patt ) 
            delete [] patt;
       }

      int getNumb( void ) { return numb; };

      void destroyPattern( void );
      int  loadPattern( const char* fileName = "solver.pat" );
      int  savePattern( const char* fileName = "solver.pat" );

      TSolverPatternElem* get( int i )
      {
         return patt + i;
      }
};
#endif

