[GiNaC-devel] RFC: step function, Pauli matrices and improved matching

Matthias Dellweg dellweg at tp1.uni-duesseldorf.de
Wed Feb 5 11:09:39 CET 2014


Hi Richard,
finally i created a repository to pull from. Hope this helps.
The address would be:
https://mdellweg@bitbucket.org/mdellweg/ginac.git
The branches to look at are

* step_patch for integration with step-functions
  you can describe piecewise defined functions this way
  I added some tests as you suggested

* pauli_patch includes an implementation for Pauli matrices very
  similar to that of the color algebra
  This comes with tests and some documentation

* rmatch_patch is a reimplementation of the matching infrastructure
  which matches an expression to a pattern (not the other way around).
  This gives the benefit, that an expairseq can match a single term
  when it consist only of this term and global wildcards. In ginsh:
	> match(sin(x), sin($0)*$1);
	{$1==1,$0==x}
  The step_patch could benefit there.
  Then again the match in expairseq is rewritten to match in more cases
  when several global wildcards are involved. For example
	> match(sin(x)*x*a, sin($0)*$0*$1);
	{$1==a,$0==x}
  And it now uses the ordering of the non wildcard terms for
  performance.
  All this is done without changing the existing API.

If you want to see them all active at once (and a little more) you can
try the devel branch.

Looking forward to your comments.

-g Matthias

Am Tue, 14 Jan 2014 16:23:54 +0100
schrieb Matthias Dellweg <dellweg at tp1.uni-duesseldorf.de>:

> Am Mon, 13 Jan 2014 00:00:04 +0100
> schrieb "Richard B. Kreckel" <kreckel at ginac.de>:
> 
> > Hi Matthias,
> > 
> > I've had a quick look at your patches.
> > 
> > The first two are lightweight and appear rather harmless, but they
> > both introduce new functionality and should come with a test case.
> > 
> > The third and fourth patch introduces Pauli matrices, they should
> > not only come with extra test cases, but also with good
> > documentation.
> > 
> > If you intend to resubmit your patches, please also add comments in
> > the preferred git format, so that they can be readily applied.
> > 
> >   -richy.
> 
> Hi Richard,
> thanks for the feedback.
> Starting with the easy bits, i tried to get the patches concerning the
> step functions ready by adding test-cases.
> But i failed to see what is the 'preferred git format'. I created the
> patches with 'git format-patch' so i thougt the were applicable with
> 'git am'. I could use a hint there.
> -g Matthias


More information about the GiNaC-devel mailing list