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

        Final Project                                 MMU 1996

        ######################################################
        #                                                    #
        #               A Logical Neural Network             #   
        #                                                    #
        #               A Ram Based logical NN               #  
        #                                                    #
        ######################################################
 
        Albrecht Schmidt                              17.09.96
 
        FILE: CRamNet.C                            Version 1.0
 
   ************************************************************* */
#ifndef _CRamNet_h
#define _CRamNet_h


#include <stdlib.h>

#include "CSupport.h"
#include "CData.h"
#include "CRam.h"
#include "CDiscrim.h"

class CRamNet : CSupport
{
   private:
	int overlapp;
	int no_classes;
        int no_inps_per_ram;
        int no_user_inputs;

	int no_discrim;
      
        CDiscrim *discrim[MAX_DISCIMINATORS];
 
  public:
	CRamNet::CRamNet(int no_i, int no_c, int no_i_p_r = 8,  int overl = 1);
	CRamNet::CRamNet(char *filename);
	CRamNet::~CRamNet();
	void CRamNet::Learn(TVector inV, int class_no);
	void CRamNet::Learn(char * filename);
	int CRamNet::Detect(TVector inV, float diff = 0.01); // Returns the class
	TVector CRamNet::FullRecall(TVector resV, TVector inV);
	TVector CRamNet::Recall(TVector resV, TVector inV);

	void CRamNet::Test(char* filename, float diff =0.01);
	void CRamNet::Work(char* in_file, char* out_file);

	void CRamNet::StoreNet(char * filename);
};

#endif
