Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to save and retrieve an already calculated basis
PostPosted: Wed Jul 29, 2020 1:07 am 

Joined: Sun Nov 15, 2015 12:13 am
Posts: 25
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: How to save and retrieve an already calculated basis
PostPosted: Wed Jul 29, 2020 6:36 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
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);


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: How to save and retrieve an already calculated basis
PostPosted: Thu Jul 30, 2020 6:05 pm 

Joined: Sun Nov 15, 2015 12:13 am
Posts: 25
Thank you very much. Highly appreciated.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

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