Back to Forum | View unanswered posts | View active topics
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 |
|
|
Thank you very much. Highly appreciated.
Thank you very much. Highly appreciated.
|
|
|
|
Posted: Thu Jul 30, 2020 6:05 pm |
|
|
|
|
|
Post subject: |
Re: How to save and retrieve an already calculated basis |
|
|
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);
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);[/code] and reset it by [code]attrib(g,"isSB",0);[/code]. To display it, use [code]atttrrib(g,"isSB");[/code].
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); [/code] To read it in: [code]link l="ssi:r data"; def g=read(l);[/code]
|
|
|
|
Posted: Wed Jul 29, 2020 6:36 pm |
|
|
|
|
|
Post subject: |
How to save and retrieve an already calculated basis |
|
|
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?
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?
|
|
|
|
Posted: Wed Jul 29, 2020 1:07 am |
|
|
|
|
|
It is currently Fri May 13, 2022 10:55 am
|
|