2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -2,9 +2,11 @@ nodes=: 10 10 #: i. 100
nodeA=: 1 1
nodeB=: 6 7
NB. verb to pair up coordinates along a specific offset
conn =: [: (#~ e.~/@|:~&0 2) ([ ,: +)"1
ref =: ~. nodeA,nodes-.nodeB
wiring=: /:~ ref i. ,/ nodes conn"2 1 (,-)=i.2
Yii=: _1 _1 }. (* =@i.@#) #/.~ {."1 wiring
Yij=: - _1 _1 }. 1:`(<"1@[)`]}&(+/~ 0*i.1+#ref) wiring
Y=: Yii+Yij
ref =: ~. nodeA,nodes-.nodeB NB. all nodes, with A first and B omitted
wiring=: /:~ ref i. ,/ nodes conn"2 1 (,-)=i.2 NB. connected pairs (indices into ref)
Yii=: (* =@i.@#) #/.~ {."1 wiring NB. diagonal of Y represents connections to B
Yij=: -1:`(<"1@[)`]}&(+/~ 0*i.1+#ref) wiring NB. off diagonal of Y represents wiring
Y=: _1 _1 }. Yii+Yij

View file

@ -0,0 +1,28 @@
3 3 #: i.9
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2
(3 3 #: i.9) conn 0 1
0 0
0 1
0 1
0 2
1 0
1 1
1 1
1 2
2 0
2 1
2 1
2 2