Bug 89688

Summary: INTEG() and DERIV() operators for equations
Product: [Applications] kst Reporter: Nicolas Brisset <nicolas.brisset>
Component: generalAssignee: kst
Status: CLOSED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Solaris   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolas Brisset 2004-09-17 12:36:56 UTC
Version:           1.0.0_devel (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.3.2
OS:                SunOS (sun4u) release 5.8

In the (long and growing) "I need more operators for equations" series, would it be possible to add INTEG() and DERIV() operators ?
- INTEG could have two different syntaxes: INTEG(Vec1), which would just compute the cumulative sum of all values, and INTEG(Vec1,Vec2) which would integrate i.e. add at each step Vec1(n)*(Vec2(n) - Vec2(n-1))
- DERIV in more or less the same fashion.
Comment 1 Netterfield 2004-09-17 14:39:49 UTC
At this point, No.
Equations operate value by value, and do not know about either the past or the 
future.
We are talking about a more general approach, however.... but this will 
require some thought and re-design.
On September 17, 2004 06:36 am, Nicolas Brisset wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=89688
>            Summary: INTEG() and DERIV() operators for equations
>            Product: kst
>            Version: unspecified
>           Platform: unspecified
>         OS/Version: Solaris
>             Status: UNCONFIRMED
>           Severity: wishlist
>           Priority: NOR
>          Component: general
>         AssignedTo: kst kde org
>         ReportedBy: nicolas.brisset eurocopter com
>
>
> Version:           1.0.0_devel (using KDE 3.3.0, compiled sources)
> Compiler:          gcc version 3.3.2
> OS:                SunOS (sun4u) release 5.8
>
> In the (long and growing) "I need more operators for equations" series,
> would it be possible to add INTEG() and DERIV() operators ? - INTEG could
> have two different syntaxes: INTEG(Vec1), which would just compute the
> cumulative sum of all values, and INTEG(Vec1,Vec2) which would integrate
> i.e. add at each step Vec1(n)*(Vec2(n) - Vec2(n-1)) - DERIV in more or less
> the same fashion.
> _______________________________________________
> Kst mailing list
> Kst@kde.org
> https://mail.kde.org/mailman/listinfo/kst

Comment 2 Andrew Walker 2004-09-23 00:25:35 UTC
It sounds as if INTEG and DERIV should be plugins.
Comment 3 Netterfield 2004-10-19 18:21:45 UTC
As Andrew says, INTEG() and DERIV() should be filter plugins.

The wishlist item, it seems to me, should be changed to 'implement filters in equations'

I will close this bug, and re-open one to this effect.
Comment 4 George Staikos 2004-10-21 04:47:19 UTC
CVS commit by staikos: 

preliminary support for plugin calling from equations.  Has several limitations
and missing code:
1) Updates FAR too often making it rather unusable
2) Doesn't handle localdata plugins
3) Doesn't work with "x"
4) Crashes Kst if the inputs aren't valid
5) Doesn't handle plugin errors
6) Data object dependency chain isn't updated

CCBUG: 89688


  A            kstmath.h   1.1 [GPL (v2+)]
  M +95 -3     enodes.cpp   1.19
  M +1 -0      enodes.h   1.14
  M +2 -0      kstdebug.cpp   1.13
  M +1 -37     kstvector.cpp   1.87



Comment 5 George Staikos 2004-10-22 00:39:17 UTC
CVS commit by staikos: 

Plugins from equations are now fully functional except for using "x", which
needs some thought before implementing, and is not really critical.

usage:

  plugin(name, inputs....)

FEATURE: 89688


  M +107 -58   enodes.cpp   1.25
  M +5 -0      enodes.h   1.16
  M +2 -3      kstequation.cpp   1.9



Comment 6 George Staikos 2004-10-22 00:42:41 UTC
As we said, integ() and deriv() can be done as plugins.  Now you can call them from equations, so this should solve your problems once you write your plugins. :)