[ return ]

connector.h



/*
 *  file : connector.h
 *
 * [DEFINE DESCRIPTION = Sparse matrix representation class, with connection strengths]
 *
 *  Name                Date        Description
 *  --------------      --------    -------------------------------------
 *  Andrew H. Fagg      08/10/92    Original
 *
 */

#ifndef CONNECTOR_CLASS
#define CONNECTOR_CLASS
#include "names.h"

#define ALLOC_BLOCK 5

#define NO_VALUE -1000.1
 
                            /*  Connector configuration.  */
#define CONNECTOR_RANDOM 0x1
#define CONNECTOR_NORMALIZE 0x2
#define CONNECTOR_UPDATE 0x4
#define CONNECTOR_NEW_NORMALIZE 0x8
#define CONNECTOR_NORMAL_ELIGIBILITY 0x10
#define CONNECTOR_CLIP_NORMALIZE 0x20

extern nsl_vector& new_normalize(nsl_vector&, nsl_data*, nsl_data*);

class connector_class
{
	nsl_data** pointers;
	name_class** names;
	int num_pointers;  /*  Number of connections.  */
	int num_allocated; /*  Number of spaces allocated for connections.*/
	nsl_vector* initial_weights;
	short flags;

public:
	connector_class(short);
	~connector_class();
	void add_connection(nsl_data*, name_class*, float);        //OVERLOAD CALL: add_connection: connector.c(connector_class), reverse_connector.c(reverse_connector_input_class), reverse_connector.c(reverse_connector_output_class)
	nsl_vector get_values();        //OVERLOAD CALL: get_values: connector.c(connector_class), reverse_connector.c(reverse_connector_input_class), reverse_connector.c(reverse_connector_output_class), sensor.c(sensor_class)
	int get_num_connections();        //OVERLOAD CALL: get_num_connections: connector.c(connector_class), reverse_connector.c(reverse_connector_input_class), reverse_connector.c(reverse_connector_output_class)
	name_class* get_name(int);        //OVERLOAD CALL: get_name: column.c(column_class), connector.c(connector_class), gate.c(gate_class), layer.c(layer_class), reverse_connector.c(reverse_connector_input_class), reverse_connector.c(reverse_connector_output_class), sensor.c(sensor_class)
	nsl_vector get_initial_weights(nsl_data*, nsl_data*, nsl_data*);
	short get_flags();        //OVERLOAD CALL: get_flags: connector.c(connector_class), reverse_connector.c(reverse_connector_output_class)
	void report_state(nsl_vector*, nsl_vector*, nsl_vector*, nsl_vector*);        //OVERLOAD CALL: report_state: connector.c(connector_class), reverse_connector.c(reverse_connector_input_class), reverse_connector.c(reverse_connector_output_class)
	int stuff(ifstream&);        //OVERLOAD CALL: stuff: gate.c(gate_class), layer.c(layer_class), column.c(column_class), connector.c(connector_class)
};



extern nsl_data* translate_string_to_pointer_name(char*, name_class**);

#endif



[ return ]