%
% Set Mex interface gateways (this example for Machintosh)
% Copyright H.Shouno 2009
%

addpath('./Macintosh');
% addpath( './Linux' );
% addpath( './WIndows' );
%

%
% Set Inital layer coefficients
%

%
% Setup Number of Stages
%
LH = 4; 

%
% Setup Input to On-Off layer connection CG
%
Ng  = 7;
Ag  = 3.3;            % radius of the off-periphery (connect.area)
Ago = 1.5;            % radius of the on-center component
Gamcg = 0.05;         % spatial decay at x = Ag
CG = MakeC( Ng, Ag, Ago, Gamcg );

%
% Setup Connection from C, Uc(l-1) ---> Us(l),
% that is, connections from Uc planes to Usv Plane
% Connection named C{}
%
Nc   = [   6    6    6    9 ];   %  connection size, which should be identical to A
As   = [ 3.4  3.4  3.4  4.9 ];   %  connection area
GamS = [ 0.7  0.7  0.7  0.6 ];   %  spatial decay
CoS  = [   1    1    1    1 ];   %  Center value
for l = 1:LH
    C{l} = MakeC( Nc(l), As(l), GamS(l), CoS(l) );
end


%
% Connections from  Us(l) ---> Uc(l)
% Connection named D
%
Nd    = [   18    14     8   1  ];    % size
Ac    = [  9.4   7.4   4.4   0  ];    % connection area
Aco   = [  3.4   3.4   4.4   0  ];    % on center connection radius
GamC  = [  0.7   0.7   0.7   0  ];    % spatial decay of excitatory component
GamCo = [ 0.12  0.12  0.12   0  ];    % spatial decay of inhibitory component at x = Ao
GamCp = [  0.8   0.8   0.8   0  ];    % spatial decay of inhibitory companent at x = A
CoC   = [    4     4     4   1  ];    % Value at the connection center
PNC   = [    1     1     1   0  ];    % Ratio of Positive/Negative
for l=1:LH-1
  D{l} = MakeAC( Nd(l), Ac(l), Aco(l), GamC(l), GamCo(l), GamCp(l), CoC(l), PNC(l) );
end


%
% Layer size
%
UsSize  =   [ 68     38    22     5    ];
UcSize  =   [    37     21    13    1  ];
Us = {};
Uc = {};

%
% Threshold, Thl(l) means learning threshold, and
% Thr(l) means recognition threshold.
%
Thl     =    [ 0      0.66   0.67   0.30 ];
Thr     =    [ 0.55   0.51   0.58   0.30 ];
