User:Tom Allen/TensorExperimentsZ05

From J Wiki
Jump to: navigation, search


GTEZ0500C.jpg


NB. ... script experimentalZ.ijs ...

E3=:+/"1@((<0 3)|:])"5@R

E1cv=:+/"1@((<0 1)|:])"3@(mcn([smx 0|:])"2 3 E3)

E1cn=:mcn smx"2 1 E1cv

E1cncv=:mcn([smx 0|:])"2 2 B2kCEr2+SBkCEr2

NB. ... also ...

L1cn=:mcn smx"2 1 LamCEr1
X1cn=:mcn smx"2 1 XiCEr1

L1cncv=:mcn([smx 0|:])"2 2 LamCEr2
X1cncv=:mcn([smx 0|:])"2 2 XiCEr2


NB. ... execute (ijx) ...

   gXcw  =:  1.2  0    _  _    _    _"_
   gXbAll=: _0.6  3.5  3  1.3  1.2  0"_

   xCpts=:_ 1 3 27,_ 0 1p1 27,_ 0 2p1 27,:_ 0 2 27"_

NB. ... sum of 2 ...

   A=:(gXZ([E1cv             xRef@hkxM)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXZ([(B2kCEr1+SBkCEr1)xRef@hkxM)]) ((0.1;50"_)pTRandom xCpts)''

   A-:B
1

NB. ... a tensor ...

   vA=:[E1cn xRef
   vB=:[(xdz smx"2 1 E1cn)zRef

   A=:(gXZ([vA hkxM)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXZ([vB hkxM)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_32);2^_44)qteq[;])"1 B
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

NB. ... a tensor ...

   vA=:[E1cn zRef
   vB=:[(zdx smx"2 1 E1cn)xRef

   A=:(gXZ([vA hkxM)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXZ([vB hkxM)]) ((0.1;50"_)pTRandom xCpts)''

   A-:B
1



Download: File:LTEZ0500C.txt




Download MoinMoin source: File:TensorExperimentsZ05.ijs