List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: Kronecker delta
| [MUG] Re: Kronecker delta |
|
Author: Willard, Daniel Dr DUSA-OR
Posted: 23/11/2000 13:38:57 GMT
|
>> From: "Willard, Daniel Dr DUSA-OR"
Thanks. But how about: > kron:=proc(i::integer,j::integer)`if`(i<>j, 0, 1)
end:
With Windows 98 and Maple V rel 5.1 "inline" is defined only for plotting.
And since mostly i<>j no branching would then occur.
Dan Willard
>> From: Maple Group
| >> From: "Willard, Daniel Dr DUSA-OR"
| Does Maple V know how to give you a fast Kronecker delta (discrete
| form of Dirac delta)?
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=
-
Date: Mon, 13 Nov 2000 19:32:14 -0500 (EST)
From: Carl DeVore
To:
Subject: Kronecker delta
I'm not sure what you mean by fast when it comes to Maple. But, anyway,
here's the fastest that I could come up with:
> kron:= proc(x,y) option inline; `if`(x=y, 1, 0) end;
I did 100,000 evaluations in 1.1 seconds on a Sparc Ultra 1 (not a
particularly fast computer). About half of that time is just incrementing
the loop counter.
Carl Devore
University of Delaware
|
[View Complete Thread]
Previous by date: [MUG] Re: Rings ..., Maple Group
Next by date: [MUG] Maple and mechanics of deformable bodies, Guy Gendron
Previous thread: [MUG] NEWBY with problems with Maple 6.01 and Linux, Andre Estel
Next thread: [MUG] Maple and mechanics of deformable bodies, Guy Gendron
|