Essays/Tensor Experiments/TensorExperiments13

From J Wiki
Jump to navigation Jump to search


GTE1300D.jpg


NB. ... script experimental.ijs ...

Ocv=:mcv smx"2 1 Ocn


Ocvdct0=:mcv  ((   [)smx 0|:])"2 2 Ocndc
Ocvdct1=:mcvdc((1|:[)smx    ])"3 1 Ocn

Ocvdc=:Ocvdct0+Ocvdct1


Ocvdcdct0=:(   ])"3@(mcv    ((   [)smx 0|:])"2 3 Ocndcdc)
Ocvdcdct1=:(1|:])"3@(mcvdc  ((1|:[)smx 0|:])"3 2 Ocndc  )
Ocvdcdct2=:(   ])"3@(mcvdc  ((1|:[)smx 0|:])"3 2 Ocndc  )
Ocvdcdct3=:(   ])"3@(mcvdcdc((1|:[)smx    ])"4 1 Ocn    )

Ocvdcdc=:Ocvdcdct0+Ocvdcdct1+Ocvdcdct2+Ocvdcdct3


Ocvdcdcdct00=:(     ])"4@(mcv      ((   [)smx 0|:])"2 4 Ocndcdcdc)
Ocvdcdcdct01=:(  1|:])"4@(mcvdc    ((1|:[)smx 0|:])"3 3 Ocndcdc  )
Ocvdcdcdct10=:(1 3|:])"4@(mcvdc    ((1|:[)smx 0|:])"3 3 Ocndcdc  )
Ocvdcdcdct11=:(1 2|:])"4@(mcvdcdc  ((1|:[)smx 0|:])"4 2 Ocndc    )
Ocvdcdcdct20=:(     ])"4@(mcvdc    ((1|:[)smx 0|:])"3 3 Ocndcdc  )
Ocvdcdcdct21=:(  2|:])"4@(mcvdcdc  ((1|:[)smx 0|:])"4 2 Ocndc    )
Ocvdcdcdct30=:(     ])"4@(mcvdcdc  ((1|:[)smx 0|:])"4 2 Ocndc    )
Ocvdcdcdct31=:(     ])"4@(mcvdcdcdc((1|:[)smx    ])"5 1 Ocn      )

Ocvdcdcdct0=:Ocvdcdcdct00+Ocvdcdcdct01
Ocvdcdcdct1=:Ocvdcdcdct10+Ocvdcdcdct11
Ocvdcdcdct2=:Ocvdcdcdct20+Ocvdcdcdct21
Ocvdcdcdct3=:Ocvdcdcdct30+Ocvdcdcdct31

Ocvdcdcdc=:Ocvdcdcdct0+Ocvdcdcdct1+Ocvdcdcdct2+Ocvdcdcdct3


Ocvdcdcdcdct00=:(       ])"5@(mcv        ((   [)smx 0|:])"2 5 Ocndcdcdcdc)
Ocvdcdcdcdct01=:(    1|:])"5@(mcvdc      ((1|:[)smx 0|:])"3 4 Ocndcdcdc  )
Ocvdcdcdcdct02=:(  1 4|:])"5@(mcvdc      ((1|:[)smx 0|:])"3 4 Ocndcdcdc  )
Ocvdcdcdcdct03=:(  1 2|:])"5@(mcvdcdc    ((1|:[)smx 0|:])"4 3 Ocndcdc    )
Ocvdcdcdcdct10=:(1 3 4|:])"5@(mcvdc      ((1|:[)smx 0|:])"3 4 Ocndcdcdc  )
Ocvdcdcdcdct11=:(1 4 2|:])"5@(mcvdcdc    ((1|:[)smx 0|:])"4 3 Ocndcdc    )
Ocvdcdcdcdct12=:(1 2 4|:])"5@(mcvdcdc    ((1|:[)smx 0|:])"4 3 Ocndcdc    )
Ocvdcdcdcdct13=:(1 2 3|:])"5@(mcvdcdcdc  ((1|:[)smx 0|:])"5 2 Ocndc      )
Ocvdcdcdcdct20=:(       ])"5@(mcvdc      ((1|:[)smx 0|:])"3 4 Ocndcdcdc  )
Ocvdcdcdcdct21=:(    2|:])"5@(mcvdcdc    ((1|:[)smx 0|:])"4 3 Ocndcdc    )
Ocvdcdcdcdct22=:(  2 4|:])"5@(mcvdcdc    ((1|:[)smx 0|:])"4 3 Ocndcdc    )
Ocvdcdcdcdct23=:(  2 3|:])"5@(mcvdcdcdc  ((1|:[)smx 0|:])"5 2 Ocndc      )
Ocvdcdcdcdct30=:(       ])"5@(mcvdcdc    ((1|:[)smx 0|:])"4 3 Ocndcdc    )
Ocvdcdcdcdct31=:(    3|:])"5@(mcvdcdcdc  ((1|:[)smx 0|:])"5 2 Ocndc      )
Ocvdcdcdcdct32=:(       ])"5@(mcvdcdcdc  ((1|:[)smx 0|:])"5 2 Ocndc      )
Ocvdcdcdcdct33=:(       ])"5@(mcvdcdcdcdc((1|:[)smx    ])"6 1 Ocn        )

Ocvdcdcdcdct0=:Ocvdcdcdcdct00+Ocvdcdcdcdct01+Ocvdcdcdcdct02+Ocvdcdcdcdct03
Ocvdcdcdcdct1=:Ocvdcdcdcdct10+Ocvdcdcdcdct11+Ocvdcdcdcdct12+Ocvdcdcdcdct13
Ocvdcdcdcdct2=:Ocvdcdcdcdct20+Ocvdcdcdcdct21+Ocvdcdcdcdct22+Ocvdcdcdcdct23
Ocvdcdcdcdct3=:Ocvdcdcdcdct30+Ocvdcdcdcdct31+Ocvdcdcdcdct32+Ocvdcdcdcdct33

Ocvdcdcdcdc=:Ocvdcdcdcdct0+Ocvdcdcdcdct1+Ocvdcdcdcdct2+Ocvdcdcdcdct3


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

   gXcw  =: 1.2  0.3  _    _    _  "_
   gXpAll=: 1.1  1.2  1.3  1.4  1.5"_

   xCpts=:_ 1 3 26,_ 0 1p1 26,_ 0 2p1 26,:_ 0 20 26"_

   A=:(gXT([Ocvdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocv xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_14)qteq[;])"2 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

   A=:(gXT([Ocvdcdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvdc xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_09)qteq[;])"3 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

   A=:(gXT([Ocvdcdcdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvdcdc xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_10)qteq[;])"4 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

   A=:(gXT([Ocvdcdcdcdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvdcdcdc xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_05)qteq[;])"5 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. ... execute (ijx) ...

   gXcw  =: 1.2  0.3  _    _    _  "_
   gXpAll=: 1.1  1.2  1.3  1.4  1.5"_

   yCpts=:__ 0.5 5 8,__ 0.5 5 8,__ 0.5 5 8,:_ 0 20 8"_

   A=:(gXT([Ocvdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocv yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_13)qteq[;])"2 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

   A=:(gXT([Ocvdcdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvdc yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_10)qteq[;])"3 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

   A=:(gXT([Ocvdcdcdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvdcdc yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_10)qteq[;])"4 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

   A=:(gXT([Ocvdcdcdcdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvdcdcdc yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_10)qteq[;])"5 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


GTE1301C.jpg


NB. ... script experimental.ijs ...

Ocvcv=:Ocvdc+-@(ch2k smx"3 1 Ocv)


Ocvcvdct0=:                              Ocvdcdc
Ocvcvdct1=:-@(ch2k  ((   [)smx 0|:])"3 2 Ocvdc  )
Ocvcvdct2=:-@(ch2kdc((2|:[)smx    ])"4 1 Ocv    )

Ocvcvdc=:Ocvcvdct0+Ocvcvdct1+Ocvcvdct2


Ocvcvdcdct0=:                                            Ocvdcdcdc
Ocvcvdcdct1=:-@:((   ])"4)@(ch2k    ((   [)smx 0|:])"3 3 Ocvdcdc  )
Ocvcvdcdct2=:-@:((2|:])"4)@(ch2kdc  ((2|:[)smx 0|:])"4 2 Ocvdc    )
Ocvcvdcdct3=:-@:((   ])"4)@(ch2kdc  ((2|:[)smx 0|:])"4 2 Ocvdc    )
Ocvcvdcdct4=:-@:((   ])"4)@(ch2kdcdc((2|:[)smx    ])"5 1 Ocv      )

Ocvcvdcdc=:Ocvcvdcdct0+Ocvcvdcdct1+Ocvcvdcdct2+Ocvcvdcdct3+Ocvcvdcdct4


Ocvcvdcdcdct00=:                                                Ocvdcdcdcdc
Ocvcvdcdcdct10=:-@:((     ])"5)@(ch2k      ((   [)smx 0|:])"3 4 Ocvdcdcdc  )
Ocvcvdcdcdct11=:-@:((4 2|:])"5)@(ch2kdc    ((2|:[)smx 0|:])"4 3 Ocvdcdc    )
Ocvcvdcdcdct12=:-@:((2 4|:])"5)@(ch2kdc    ((2|:[)smx 0|:])"4 3 Ocvdcdc    )
Ocvcvdcdcdct13=:-@:((2 3|:])"5)@(ch2kdcdc  ((2|:[)smx 0|:])"5 2 Ocvdc      )
Ocvcvdcdcdct20=:-@:((     ])"5)@(ch2kdc    ((2|:[)smx 0|:])"4 3 Ocvdcdc    )
Ocvcvdcdcdct21=:-@:((  3|:])"5)@(ch2kdcdc  ((2|:[)smx 0|:])"5 2 Ocvdc      )
Ocvcvdcdcdct22=:-@:((     ])"5)@(ch2kdcdc  ((2|:[)smx 0|:])"5 2 Ocvdc      )
Ocvcvdcdcdct23=:-@:((     ])"5)@(ch2kdcdcdc((2|:[)smx    ])"6 1 Ocv        )

Ocvcvdcdcdct0=:Ocvcvdcdcdct00
Ocvcvdcdcdct1=:Ocvcvdcdcdct10+Ocvcvdcdcdct11+Ocvcvdcdcdct12+Ocvcvdcdcdct13
Ocvcvdcdcdct2=:Ocvcvdcdcdct20+Ocvcvdcdcdct21+Ocvcvdcdcdct22+Ocvcvdcdcdct23

Ocvcvdcdcdc=:Ocvcvdcdcdct0+Ocvcvdcdcdct1+Ocvcvdcdcdct2


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

   gXcw  =: 1.2  0.3  _    _    _  "_
   gXpAll=: 1.1  1.2  1.3  1.4  1.5"_

   xCpts=:_ 1 3 26,_ 0 1p1 26,_ 0 2p1 26,:_ 0 20 26"_

   A=:(gXT([Ocvcvdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvcv xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_10)qteq[;])"3 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

   A=:(gXT([Ocvcvdcdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvcvdc xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_05)qteq[;])"4 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

   A=:(gXT([Ocvcvdcdcdc xRef@hkxF)]) ((0.1;50"_)pTRandom xCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvcvdcdc xRef@hkxF),:@])D.1])"_ 1)]) ((0.1;50"_)pTRandom xCpts)''

   A (((2^_44);2^_06)qteq[;])"5 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. ... execute (ijx) ...

   gXcw  =: 1.2  0.3  _    _    _  "_
   gXpAll=: 1.1  1.2  1.3  1.4  1.5"_

   yCpts=:__ 0.5 5 8,__ 0.5 5 8,__ 0.5 5 8,:_ 0 20 8"_

   A=:(gXT([Ocvcvdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvcv yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_10)qteq[;])"3 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

   A=:(gXT([Ocvcvdcdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvcvdc yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_10)qteq[;])"4 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

   A=:(gXT([Ocvcvdcdcdc yRef@hkyF)]) ((0;50"_)pTRandom yCpts)''
   B=:(gXT((0|:[:(gXT([(0{])@Ocvcvdcdc yRef@hkyF),:@])D.1])"_ 1)]) ((0;50"_)pTRandom yCpts)''

   A (((2^_44);2^_10)qteq[;])"5 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


GTE1302C.jpg


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

   gXcw  =: 1.2  0.3  _    _    _  "_
   gXpAll=: 1.1  1.2  1.3  1.4  1.5"_

   xCpts=:_ 1 3 26,_ 0 1p1 26,_ 0 2p1 26,:_ 0 20 26"_

NB. ... tensors ...

   vA=:[Ocv xRef
   vB=:[(ydx((0|:[)smx])"2 1 Ocv)yRef

   (gXT([(vA(((2^_44);2^_40)qteq[;])"1 vB)hkxF)]) ((0.1;50"_)pTRandom xCpts)''
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

   vA=:[Ocvcv xRef
   vB=:[(ydx((0|:[)smx])"2 ydx((0|:[)smx])"2 Ocvcv)yRef

   (gXT([(vA(((2^_44);2^_42)qteq[;])"2 vB)hkxF)]) ((0.1;50"_)pTRandom xCpts)''
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



Download: File:LTE1300D.txt
Download: File:LTE1301C.txt
Download: File:LTE1302C.txt




Download MoinMoin source: File:TensorExperiments13.ijs




Next Page: Essays/Tensor Experiments/TensorExperiments14
Prev Page: Essays/Tensor Experiments/TensorExperiments12