2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -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
|
||||
|
|
|
|||
28
Task/Resistor-mesh/J/resistor-mesh-4.j
Normal file
28
Task/Resistor-mesh/J/resistor-mesh-4.j
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue