1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
function [bonds,components,n_vector_bonds] = rbg2abg(name,rbonds,rstrokes,rcomponents,\
port_coord,port_name,\
infofile,errorfile)
## ###############################################################
## ## Version control history
## ###############################################################
## ## $Id$
## ## $Log$
## ## Revision 1.44 1999/10/19 00:05:44 peterg
## ## Now defaults junction ports when only one specified (for vector junctions)
## ##
## ## Revision 1.43 1999/10/18 04:08:46 peterg
## ## Now computes n_vector_bonds -- number apparent (maybe vector) bonds per component.
## ## Neeeded to vectorise junctions.
## ##
|
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
function [bonds,components,n_vector_bonds] = rbg2abg(name,rbonds,rstrokes,rcomponents,\
port_coord,port_name,\
infofile,errorfile)
## ###############################################################
## ## Version control history
## ###############################################################
## ## $Id$
## ## $Log$
## ## Revision 1.45 1999/10/19 02:13:31 peterg
## ## Now assigns correct bonds to the new junction port names
## ##
## ## Revision 1.44 1999/10/19 00:05:44 peterg
## ## Now defaults junction ports when only one specified (for vector junctions)
## ##
## ## Revision 1.43 1999/10/18 04:08:46 peterg
## ## Now computes n_vector_bonds -- number apparent (maybe vector) bonds per component.
## ## Neeeded to vectorise junctions.
## ##
|
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
signed_bond_list = nozeros(components(i,:));
n_comp_bonds = length(signed_bond_list);
direction = sign(signed_bond_list);
##Find the port list for this component
if exist([comp_type, '_cause'])==0
eval(["ABG = ",comp_type, "_abg;"]);
port_list = ABG.portlist;
else
port_list=comp_ports(comp_type,n_comp_bonds)
endif
[n_comp_ports,m_comp_ports] = size(port_list);
subport_list="";
|
>
|
>
>
>
>
|
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
|
signed_bond_list = nozeros(components(i,:));
n_comp_bonds = length(signed_bond_list);
direction = sign(signed_bond_list);
##Find the port list for this component
if exist([comp_type, '_cause'])==0
eval(["ABG = ",comp_type, "_abg;"]);
if struct_contains (ABG, "portlist")
port_list = ABG.portlist;
else
error(sprintf("Component %s has no ports", comp_type));
port_list = [];
endif
else
port_list=comp_ports(comp_type,n_comp_bonds)
endif
[n_comp_ports,m_comp_ports] = size(port_list);
subport_list="";
|