On 11/30/2014 09:53 PM, Waldek Hebisch wrote:
> Attached is a patch adding them to SMTS.

Basically, yes, but there was a little typo and "coefficients" (and, in
fact, also the existing "coefficient") sounds a bit strange to me, since
it somehow makes the internal coding explicit in the concept
"coefficient". However, the result of "coefficient" lies ins SMP rather
than in Coef. That's mildly confusing.

I would rather prefer something like

  coefficient  --> homogeneousPart
  coefficients --> homogeneousParts

or something more telling. But for the moment I could also live with
"coefficients".

Attached a corrected patch.

Ralf

PS: Can you next time please send patches against files actually
existing in the repository.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
>From f42bc29cc6480e7ad613c09e96d18a73c0b22666 Mon Sep 17 00:00:00 2001
From: Ralf Hemmecke <[email protected]>
Date: Mon, 1 Dec 2014 17:39:08 +0100
Subject: add functions Stream(SMP) <--> %

---
 src/algebra/mts.spad | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/algebra/mts.spad b/src/algebra/mts.spad
index 4f87559..bd21699 100644
--- a/src/algebra/mts.spad
+++ b/src/algebra/mts.spad
@@ -37,6 +37,12 @@ SparseMultivariateTaylorSeries(Coef, Var, SMP) : _
   Exports ==> MultivariateTaylorSeriesCategory(Coef, Var) with
     coefficient : (%, NNI) -> SMP
       ++ \spad{coefficient(s, n)} gives the terms of total degree n.
+    coefficients : % -> StS
+      ++ \spad{coefficients(s)} gives stream of coefficients of s,
+      ++ i.e., [coefficient(s,0), coefficient(s,1), ...]
+    series : StS -> %
+      ++ \spad{series(st)} creates a series from a stream of
+      ++ coefficients.
     coerce : Var -> %
       ++ \spad{coerce(var)} converts a variable to a Taylor series
     coerce : SMP -> %
@@ -64,6 +70,10 @@ SparseMultivariateTaylorSeries(Coef, Var, SMP) : _
 
     Rep := StS
 
+    coefficients(s : %) : StS == s::Rep
+
+    series(st : StS) : % == st
+
     extend(x, n) == extend(x, n + 1)$Rep
     complete x == complete(x)$Rep
 
-- 
2.1.0

Reply via email to