Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lissom.h File Reference

General definitions and declarations for LISSOM. More...

#include <assert.h>

Include dependency graph for lissom.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  Neuron

Defines

#define MAXITERATION   500000
 Highest valid training iteration. More...

#define DEATH_FLAG   1.0E-10
 Marker for dead connection: -ve for exc wts and +ve for inh wts. More...

#define ALIVE_MINIMUM   1.0E-09
 Larger so that dead ones don't confuse it. More...

#define MAXFILENAMELENGTH   255
 For files like the parameter file. More...

#define MAX_NUM_ANGLES   36
 To measure orientation preference. More...

#define NPES   1
 Assume single-processor architecture if unknown. More...

#define NMAX   24
 Maximum network size is determined by NROWS, if set; otherwise by NMAX, if set; otherwise chosen arbitrarily. More...

#define NROWS   ((NMAX)/(NPES))
#define RNMAX   36
 Maximum retina size. More...

#define MAX_RF_RADIUS   6
 Maximum afferent receptive-field size. More...

#define WTMAX   (2*MAX_RF_RADIUS+1)
#define MAX_NUM_EYES   2
#define combined_eyes   (num_eyes)
 Use a separate array for the combined eye response (aka binocular response, when num_eyes==2) only when there is more than one eye; otherwise the first one also doubles as the combined response. More...

#define EYE_ARRAY_SIZE   (MAX_NUM_EYES+1)
#define MAX_EXC_RADIUS   MIN(NMAX/10,1)
#define MAX_EXC_DIMENSION   ((2*MAX_EXC_RADIUS+1)*(2*MAX_EXC_RADIUS+1))
#define MAX_INH_RADIUS   MIN(NMAX/4,2)
#define MAX_INH_DIMENSION   ((2*MAX_INH_RADIUS+1)*(2*MAX_INH_RADIUS+1))
#define MAPROW(localrow)    (ARBITRARY_MAPROW((localrow),MyPE))
 Returns the corresponding row in the map for a given local row on the given PE. More...

#define ARBITRARY_MAPROW(localrow,pe)    (pe+(localrow)*NPEs)
#define LOCALROW(maprow)    ((maprow)/NPEs)
 Returns the corresponding locally-stored wts row for a given row in the global map. More...

#define PEFORROW(maprow)    ((maprow)%NPEs)
 Returns the number of the PE which holds the data for the given map row. More...

#define ROWISLOCAL(maprow)    (ARBITRARY_ROWISLOCAL((maprow),MyPE))
 Returns T if the given map row is stored on the given PE. More...

#define ARBITRARY_ROWISLOCAL(maprow,pe)    ((pe)==PEFORROW(maprow))
#define PARENTPE   0
 Declare which PE is the master (the oldest PE) and alternate master (the youngest PE). More...

#define YOUNGESTPE   (NPEs-1)
#define AMPARENTPE   (MyPE==PARENTPE)
#define AMYOUNGESTPE   (MyPE==YOUNGESTPE)
#define PEISME(pe)    ((pe)==MyPE)
#define PARTIAL_INP_INDEX(eye,x)    ((eye)*(RN*RN)+(x)*(RN))
 Wrappers to hide input vector index calculations to a given location (x,y) on a given eye:. More...

#define FULL_INP_INDEX(partial_inp_index,y)    ((partial_inp_index)+(y))
#define INP_INDEX(eye,x,y)    FULL_INP_INDEX(PARTIAL_INP_INDEX((eye),(x)),(y))
#define INP_INDEX_OTHER_EYE(eye,first_inp_index)    ((first_inp_index) + ((eye)*RN*RN))
#define WITHIN_RADIUS(xdistance,ydistance,radius_sq)
 Returns true if the x,y coordinate is inside the given radius_sq. More...

#define WITHIN_RADIUS_SQ(xdistance_sq,ydistance_sq,radius_sq)
 Returns true if the x,y coordinate (in squared form) is inside the given radius_sq. More...

#define PARTIAL_LAT_INDEX(ui,uj,k,radius,width)    (((k)-(ui)+(radius))*(width)-(uj)+(radius))
 Wrappers to hide lateral connection index calculations for a given unit (ui,uj):. More...

#define FULL_LAT_INDEX(partial_index,l)    ((partial_index)+(l))
#define LAT_INDEX(ui,uj,k,l,radius,width)    FULL_LAT_INDEX(PARTIAL_LAT_INDEX((ui),(uj),(k),(radius),(width)),(l))
#define CONSTRAIN_ANGLE(angle)
 Return a representation of the given angle in radians constrained to stay within [0,PI). More...

#define CONSTRAIN_SYMMETRIC(angle)
 Return a representation of the given angle in radians constrained to stay within [-PI/2,PI/2). More...

#define CONSTRAIN_CIRCLE(angle)
 Return a representation of the given angle in radians constrained to stay within [0,2*PI). More...

#define OR_PREF_TO_DEGREES(or_pref)    (180.0*(or_pref)/(double)or_num_angles)
 These convert between an orientation expressed in degrees [0,180], radians [0,PI], and an or_pref value from analyze.c (an integer out of or_num_angles). More...

#define RADIANS_TO_OR_PREF(theta)    (((int)ROUND(or_num_angles*(2+(theta)/M_PI))) % or_num_angles)
#define RADIANS_TO_DEGREES(theta)    (180.0*(theta)/M_PI)
#define DEGREES_TO_RADIANS(degree)    (M_PI*(degree)/180.0)
#define NEURON_OUTSIDE_CORTEX(ui,uj)
 Common check -- Ensure neuron or area is inside cortex boundaries. More...

#define ABORT_IF_NEURON_OUTSIDE_CORTEX(ui,uj)
#define ABORT_IF_RANGE_OUTSIDE_CORTEX(ui,uj,uk,ul)
#define PROGRESS_REPORT_NEEDED(last_msg_time)
#define DEBUGOUT(val)    cerr << #val << ": " << val << endl

Typedefs

typedef float a_weight
typedef float l_weight


Detailed Description

General definitions and declarations for LISSOM.

Created 09 Jun 1994 by Joseph Sirosh.

Header:
/u/nn/cvsroot/lissom/src/lissom.h,v 1.56 2000/08/21 05:03:59 jbednar Exp

Definition in file lissom.h.


Define Documentation

#define ABORT_IF_NEURON_OUTSIDE_CORTEX( ui, uj )
 

Initializer:

\
if ( NEURON_OUTSIDE_CORTEX(ui,uj)) {                                         \
  ipc_notify(IPC_ONE,IPC_ERROR,"Neuron (%d,%d) is out of range of the cortex", ui, uj); \
  return CMD_PARAMETER_ERROR;                                                \
}

Definition at line 289 of file lissom.h.

#define ABORT_IF_RANGE_OUTSIDE_CORTEX( ui, uj, uk, ul )
 

Initializer:

\
if ( NEURON_OUTSIDE_CORTEX(ui,uj) ||  NEURON_OUTSIDE_CORTEX(uk,ul)) {        \
  ipc_notify(IPC_ONE,IPC_ERROR,"Area (%d,%d) to (%d,%d) is out of range of the cortex", \
                ui, uj, uk, ul);                                             \
  return CMD_PARAMETER_ERROR;                                                \
}

Definition at line 295 of file lissom.h.

#define ALIVE_MINIMUM   1.0E-09
 

Larger so that dead ones don't confuse it.

Definition at line 21 of file lissom.h.

#define AMPARENTPE   (MyPE==PARENTPE)
 

Definition at line 158 of file lissom.h.

#define AMYOUNGESTPE   (MyPE==YOUNGESTPE)
 

Definition at line 159 of file lissom.h.

#define ARBITRARY_MAPROW( localrow, pe )   (pe+(localrow)*NPEs)
 

Definition at line 138 of file lissom.h.

#define ARBITRARY_ROWISLOCAL( maprow, pe )   ((pe)==PEFORROW(maprow))
 

Definition at line 149 of file lissom.h.

#define CONSTRAIN_ANGLE( angle )
 

Initializer:

\
  (((angle)>=0) ?                                                  \
   fmod( (angle),                                          M_PI ) : \
   fmod( (angle) + 2*M_PI*(-1*floor((angle)/(M_PI*2))+1),  M_PI)     )
Return a representation of the given angle in radians constrained to stay within [0,PI).

Definition at line 252 of file lissom.h.

Referenced by find_activity_max(), save_presentation_image(), and Retinal_Object::stringrep().

#define CONSTRAIN_CIRCLE( angle )
 

Initializer:

\
  (((angle)>=0) ?                                                    \
   fmod( (angle),                                          2*M_PI ) : \
   fmod( (angle) + M_PI*2*(-1*floor((angle)/(M_PI*2))+1),  2*M_PI)     )
Return a representation of the given angle in radians constrained to stay within [0,2*PI).

Definition at line 267 of file lissom.h.

#define CONSTRAIN_SYMMETRIC( angle )
 

Initializer:

\
  (( CONSTRAIN_ANGLE(angle) <M_PI/2) ?  \
   ( CONSTRAIN_ANGLE(angle))      :      \
   ( CONSTRAIN_ANGLE(angle) - M_PI)       )
Return a representation of the given angle in radians constrained to stay within [-PI/2,PI/2).

Definition at line 259 of file lissom.h.

Referenced by compute_activity_statistics().

#define DEATH_FLAG   1.0E-10
 

Marker for dead connection: -ve for exc wts and +ve for inh wts.

The value is small, to save checks in lat_resp()

Definition at line 17 of file lissom.h.

#define DEBUGOUT( val )   cerr << #val << ": " << val << endl
 

Definition at line 357 of file lissom.h.

#define DEGREES_TO_RADIANS( degree )   (M_PI*(degree)/180.0)
 

Definition at line 282 of file lissom.h.

#define EYE_ARRAY_SIZE   (MAX_NUM_EYES+1)
 

Definition at line 91 of file lissom.h.

#define FULL_INP_INDEX( partial_inp_index, y )   ((partial_inp_index)+(y))
 

Definition at line 188 of file lissom.h.

#define FULL_LAT_INDEX( partial_index, l )   ((partial_index)+(l))
 

Definition at line 222 of file lissom.h.

#define INP_INDEX( eye, x, y )   FULL_INP_INDEX(PARTIAL_INP_INDEX((eye),(x)),(y))
 

Definition at line 189 of file lissom.h.

#define INP_INDEX_OTHER_EYE( eye, first_inp_index )   ((first_inp_index) + ((eye)*RN*RN))
 

Definition at line 190 of file lissom.h.

#define LAT_INDEX( ui, uj, k, l, radius, width )   FULL_LAT_INDEX(PARTIAL_LAT_INDEX((ui),(uj),(k),(radius),(width)),(l))
 

Definition at line 223 of file lissom.h.

#define LOCALROW( maprow )   ((maprow)/NPEs)
 

Returns the corresponding locally-stored wts row for a given row in the global map.

Definition at line 142 of file lissom.h.

Referenced by binaryWeightsBufferProcess(), binaryWeightsFileReadInFixedOrder(), and cmd_dump_lat_wts_sq().

#define MAPROW( localrow )   (ARBITRARY_MAPROW((localrow),MyPE))
 

Returns the corresponding row in the map for a given local row on the given PE.

Definition at line 137 of file lissom.h.

Referenced by binaryWeightsFileWrite(), change_lateral_exc_radius(), clear_weights(), cmd_analyze_bubblewidth(), cmd_kill_connections(), cmd_uninit_network(), collect_activation_data(), compute_responses(), init_weights(), initialize_actlists(), initialize_markers(), input_response(), modify_lat_wts(), modify_weights(), od_preferences(), receptor_normalize(), response_to_input(), save_current(), save_image_data(), set_markers(), and setup_latw().

#define MAXFILENAMELENGTH   255
 

For files like the parameter file.

Definition at line 23 of file lissom.h.

#define MAXITERATION   500000
 

Highest valid training iteration.

Definition at line 15 of file lissom.h.

#define MAX_EXC_DIMENSION   ((2*MAX_EXC_RADIUS+1)*(2*MAX_EXC_RADIUS+1))
 

Definition at line 113 of file lissom.h.

#define MAX_EXC_RADIUS   MIN(NMAX/10,1)
 

Definition at line 109 of file lissom.h.

#define MAX_INH_DIMENSION   ((2*MAX_INH_RADIUS+1)*(2*MAX_INH_RADIUS+1))
 

Definition at line 125 of file lissom.h.

#define MAX_INH_RADIUS   MIN(NMAX/4,2)
 

Definition at line 121 of file lissom.h.

#define MAX_NUM_ANGLES   36
 

To measure orientation preference.

Definition at line 26 of file lissom.h.

#define MAX_NUM_EYES   2
 

Definition at line 74 of file lissom.h.

#define MAX_RF_RADIUS   6
 

Maximum afferent receptive-field size.

Definition at line 68 of file lissom.h.

#define NEURON_OUTSIDE_CORTEX( ui, uj )
 

Initializer:

\
     (((ui) < 0) || ((ui) >= N) || ((uj) < 0) || ((uj) >= N) )
Common check -- Ensure neuron or area is inside cortex boundaries.

Definition at line 286 of file lissom.h.

#define NMAX   24
 

Maximum network size is determined by NROWS, if set; otherwise by NMAX, if set; otherwise chosen arbitrarily.

Definition at line 48 of file lissom.h.

#define NPES   1
 

Assume single-processor architecture if unknown.

Definition at line 36 of file lissom.h.

#define NROWS   ((NMAX)/(NPES))
 

Definition at line 51 of file lissom.h.

#define OR_PREF_TO_DEGREES( or_pref )   (180.0*(or_pref)/(double)or_num_angles)
 

These convert between an orientation expressed in degrees [0,180], radians [0,PI], and an or_pref value from analyze.c (an integer out of or_num_angles).

Only the conversion to OR_PREF is lossy; the rest are reversible.

Definition at line 279 of file lissom.h.

Referenced by compute_activity_statistics(), find_activity_max(), ppm_draw_or_pref_line(), ppm_draw_orientations(), and ppm_lookup_color().

#define PARENTPE   0
 

Declare which PE is the master (the oldest PE) and alternate master (the youngest PE).

Definition at line 155 of file lissom.h.

#define PARTIAL_INP_INDEX( eye, x )   ((eye)*(RN*RN)+(x)*(RN))
 

Wrappers to hide input vector index calculations to a given location (x,y) on a given eye:.

index(eye,x,y) = eye*RN*RN + x*RN + y

The first term should be optimized out by any decent compiler if eye=0, and it should be precomputed by the compiler if eye=1. The second term can be optimized out of loop calculations by precomputing the partial index below, and then adding in the last term inside the loop using FULL_INP_INDEX.

Given the index `idx' for a location in the first eye, the index for the same location in another eye may be obtained using INP_INDEX_OTHER_EYE(idx,eye).

Definition at line 187 of file lissom.h.

#define PARTIAL_LAT_INDEX( ui, uj, k, radius, width )   (((k)-(ui)+(radius))*(width)-(uj)+(radius))
 

Wrappers to hide lateral connection index calculations for a given unit (ui,uj):.

 index(k,l) = (k-(ui-radius))*array_width + l - (uj-radius) 

The first term and last terms can be optimized out of loop calculations by precomputing the partial index below, and then adding in the middle term inside the loop using FULL_LAT_INDEX.

Definition at line 221 of file lissom.h.

Referenced by cmd_dump_lat_wts_sq(), lat_resp(), modify_latwt_loop(), and reduce_lateral_radius().

#define PEFORROW( maprow )   ((maprow)%NPEs)
 

Returns the number of the PE which holds the data for the given map row.

Definition at line 145 of file lissom.h.

Referenced by binaryWeightsFileReadInFixedOrder(), and cmd_dump_lat_wts_sq().

#define PEISME( pe )   ((pe)==MyPE)
 

Definition at line 163 of file lissom.h.

#define PROGRESS_REPORT_NEEDED( last_msg_time )
 

Initializer:

\
(progress_reports && (time(NULL)-(last_msg_time) >= progress_report_interval))

Definition at line 302 of file lissom.h.

#define RADIANS_TO_DEGREES( theta )   (180.0*(theta)/M_PI)
 

Definition at line 281 of file lissom.h.

#define RADIANS_TO_OR_PREF( theta )   (((int)ROUND(or_num_angles*(2+(theta)/M_PI))) % or_num_angles)
 

Definition at line 280 of file lissom.h.

#define RNMAX   36
 

Maximum retina size.

Definition at line 62 of file lissom.h.

#define ROWISLOCAL( maprow )   (ARBITRARY_ROWISLOCAL((maprow),MyPE))
 

Returns T if the given map row is stored on the given PE.

Definition at line 148 of file lissom.h.

Referenced by cmd_dump_lat_wts_sq(), and CortexMapWrapper::get_weights().

#define WITHIN_RADIUS( xdistance, ydistance, radius_sq )
 

Initializer:

\
(((xdistance)*(xdistance) + (ydistance)*(ydistance)) <= (radius_sq))
Returns true if the x,y coordinate is inside the given radius_sq.

Definition at line 198 of file lissom.h.

Referenced by compute_weight_scale(), init_weights(), and isInsideCircle().

#define WITHIN_RADIUS_SQ( xdistance_sq, ydistance_sq, radius_sq )
 

Initializer:

\
((xdistance_sq) + (ydistance_sq) <= (radius_sq))
Returns true if the x,y coordinate (in squared form) is inside the given radius_sq.

Definition at line 202 of file lissom.h.

Referenced by prune_circular_aff_weights(), and prune_circular_lat_weights().

#define WTMAX   (2*MAX_RF_RADIUS+1)
 

Definition at line 71 of file lissom.h.

#define YOUNGESTPE   (NPEs-1)
 

Definition at line 156 of file lissom.h.

#define combined_eyes   (num_eyes)
 

Use a separate array for the combined eye response (aka binocular response, when num_eyes==2) only when there is more than one eye; otherwise the first one also doubles as the combined response.

Definition at line 90 of file lissom.h.


Typedef Documentation

typedef float a_weight
 

Definition at line 231 of file lissom.h.

typedef float l_weight
 

Definition at line 232 of file lissom.h.


Generated at Mon Aug 21 00:31:07 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000