Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - How to save and retrieve an already calculated basis
Author Message
  Post subject:  Re: How to save and retrieve an already calculated basis  Reply with quote
Thank you very much. Highly appreciated.
Post Posted: Thu Jul 30, 2020 6:05 pm
  Post subject:  Re: How to save and retrieve an already calculated basis  Reply with quote
The warning will be printed for every ideal g for which the property "isSB" is unknown.
one can set this property by:
Code:
attrib(g,"isSB",1);

and reset it by
Code:
attrib(g,"isSB",0);
.
To display it, use
Code:
atttrrib(g,"isSB");
.

To write data to file for later retrival by Singular, the ssi format is better suied:
Code:
link l="ssi:w data";
write(l,g);

To read it in:
Code:
link l="ssi:r data";
def g=read(l);
Post Posted: Wed Jul 29, 2020 6:36 pm
  Post subject:  How to save and retrieve an already calculated basis  Reply with quote
Hi all,
I calculated a standard basis which took quite a long time ...

ring r=0,(Variables),dp;
ideal i=......;
ideal g=std(i);

Then I saved the basis g to a new file for later use ...
write("FileName",g)

Now, when I look at the file it starts right away with the polynomials in g, and there is also no semicolon at the end ..

f1,f2,f3,.....,fn

So far it is not too bad, i can still copy and paste it, if needed later, but then I even added the ring to the file and also defined the already existing f1,f2,f3,...,fn to be an ideal. So the file looks now like this:

ring r=0,(Variables),dp;
ideal g=f1,f2,f3,...,fn;

Now, I want to use this standard basis. So I read it and execute it ...

string s=read("FileName");
execute(s);

Now, I want to make sure that everything is fine, so I tried some commands to test if the standard basis is correctly loaded/created ....

dim(g);

And the output iii..s :

//** g is no standard basis
2

The dimension of g is indeed 2, but why isn't it recognized as a standard basis? Will the dimension reported always be correct?

If I use the attrib(g,"isSB"), I get a zero as output, also. Is there another (better) command to check if an ideal is a standard basis or not!?

I went on and calculated a standard basis for g (which is obviously a standard basis already) again. This time it took less time spitting out the same old g but actually I wanted to avoid this.

So how do you save your standard bases and retrieve them for later use, please?
Post Posted: Wed Jul 29, 2020 1:07 am


It is currently Fri May 13, 2022 10:55 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group