Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #13713

Re: Permutation Tensor

Newsgroups comp.lang.forth
From Albert van der Horst <albert@spenarnc.xs4all.nl>
Subject Re: Permutation Tensor
Date 2012-07-08 20:05 +0000
Message-ID <m6uyhe.n7x@spenarnc.xs4all.nl> (permalink)
Organization Dutch Forth Workshop
References <jt3erh$cd2$1@dont-email.me> <m6t3i7.6ey@spenarnc.xs4all.nl> <6774ceb8-dbe5-47db-890f-2f49eddcfe3b@d24g2000yqh.googlegroups.com>

Show all headers | View raw


In article <6774ceb8-dbe5-47db-890f-2f49eddcfe3b@d24g2000yqh.googlegroups.com>,
Krishna Myneni  <krishna.myneni@ccreweb.org> wrote:
>On Jul 7, 2:58=A0pm, Albert van der Horst <alb...@spenarnc.xs4all.nl>
>wrote:
>> In article <jt3erh$cd...@dont-email.me>,
>> Arnold Doray =A0<inva...@invalid.com> wrote:
>>
>> >What's the best way to implement the 3D permutation tensor E(I,J,K)?
>>
>> Something along
>> : eps
>> =A0 =A0 =A0 =A0 3DUP + + 3 MOD IF 3DROP 0 EXIT THEN
>> =A0 =A0 =A0 =A0 / At this point we know that all indices are different.
>> =A0 =A0 =A0 =A0 BEGIN DUP 3 <> WHILE ROT REPEAT
>> =A0 =A0 =A0 =A0 DROP < 2* 1-
>> ;
>>
>
>The above seems to go into an infinite loop for me.
>
>: epsh ( i j k -- n )
>        ( 3DUP) 2dup 2>r 2 pick 2r>
>        + + 3 MOD IF ( 3DROP) 2drop drop 0 EXIT THEN
>        \ At this point we know that all indices are different.
>        BEGIN DUP 3 <> WHILE ROT REPEAT
>        DROP < 2* 1-
>;
>
>1 1 1 epsh

Too hasty! I overlooked the possibility of 3 equals and didn't
test.

>
>
>KM
>

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Permutation Tensor Arnold Doray <invalid@invalid.com> - 2012-07-05 07:13 +0000
  Re: Permutation Tensor "A. K." <akk@nospam.org> - 2012-07-05 09:25 +0200
    Re: Permutation Tensor Arnold Doray <invalid@invalid.com> - 2012-07-05 08:42 +0000
      Re: Permutation Tensor "A. K." <akk@nospam.org> - 2012-07-05 11:25 +0200
        Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-06 18:49 -0700
          Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-07 08:32 +0200
            Re: Permutation Tensor "A. K." <akk@nospam.org> - 2012-07-07 09:49 +0200
            Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 05:35 -0700
               Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-07 15:45 +0200
                Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 07:32 -0700
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-07 17:53 +0200
                Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 09:10 -0700
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-07 18:41 +0200
                Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 12:24 -0700
                Re: Permutation Tensor Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-07-08 07:48 +0100
                Re: Permutation Tensor Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-07-08 08:09 +0100
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-08 09:23 +0200
                Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-08 05:55 -0700
                Re: Permutation Tensor Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-07-08 20:14 +0100
                Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-08 13:49 -0700
                Re: Permutation Tensor Paul Rubin <no.email@nospam.invalid> - 2012-07-07 13:03 -0700
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-07 23:54 +0200
                Re: Permutation Tensor Paul Rubin <no.email@nospam.invalid> - 2012-07-07 16:43 -0700
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-08 09:07 +0200
                Re: Permutation Tensor Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-08 13:03 +0000
                Re: Permutation Tensor anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-09 14:50 +0000
                Re: Permutation Tensor m.a.m.hendrix@tue.nl - 2012-07-10 00:28 -0700
                Re: Permutation Tensor anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-10 10:11 +0000
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-10 21:37 +0200
                Re: Permutation Tensor anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-11 13:50 +0000
                Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-10 05:10 -0700
        Re: Permutation Tensor Paul Rubin <no.email@nospam.invalid> - 2012-07-06 20:46 -0700
          Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 05:36 -0700
  Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-06 18:18 -0700
    Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-06 18:33 -0700
    Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 07:28 -0700
      Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-07 08:02 -0700
  Re: Permutation Tensor Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-07 19:58 +0000
    Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-08 05:45 -0700
      Re: Permutation Tensor Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-08 20:05 +0000
  Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-08 14:24 +0200
    Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-11 07:09 +0200
      Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-11 18:42 +0200
        Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-11 20:18 +0200
          Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-12 12:43 +0200
            Re: Permutation Tensor Arnold Doray <invalid@invalid.com> - 2012-07-25 14:07 +0000
              Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-27 13:42 +0200
                Re: Permutation Tensor mhx@iae.nl (Marcel Hendrix) - 2012-07-27 15:39 +0200
                Re: Permutation Tensor Arnold Doray <invalid@invalid.com> - 2012-07-30 04:52 +0000
  Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-08 23:44 +0200
    Re: Permutation Tensor Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-07-10 17:06 -0700
      Re: Permutation Tensor awegel@arcor.de (Alex Wegel) - 2012-07-11 07:09 +0200
  Re: Permutation Tensor Arnold Doray <invalid@invalid.com> - 2012-07-25 14:08 +0000

csiph-web