ApCoCoA

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: how to input the f from the console window
PostPosted: Wed Nov 05, 2008 11:08 am 
Offline

Joined: Wed Nov 05, 2008 8:52 am
Posts: 8
I want to input the polynomial f from the console window,

for examples: input f=x*4-y^6+z^3

how can i do it


Report this post
Top
 Profile  
 
 Post subject: Re: how to input the f from the console window
PostPosted: Thu Nov 06, 2008 4:36 pm 
Offline
User avatar

Joined: Thu Sep 30, 2004 11:08 am
Posts: 477
Location: Genoa (usually)
To be able to answer your question properly we need to know
which version of CoCoA you are using, and which interface.
Normally there should be no problem about inputting a polynomial.

John.


Report this post
Top
 Profile  
 
 Post subject: Re: how to input the f from the console window
PostPosted: Sat Nov 08, 2008 7:43 am 
Offline

Joined: Wed Nov 05, 2008 8:52 am
Posts: 8
the version I use is cocalib0.9905,I hava installed cygwin in my computer ,which OS is window xp. I use cygwin to build the gmp and the cocoalib0.9905.

in the directory /examples/ have a sample ex-PolyInput1.C ,It have provided a method to input the polynomial f , but these inputing method is not useful .I want to have a method to inputing the polynomial f ,like the user interface of the cocoa.exe in the windows. users can input a random polynomial from the windows console,then the program comput it .

for examples,

I have a program to factorize the polynomial f ,I want to have a good user interface.when the program run .In the windows console,
it told the user ,please input the polynomial f, then the program can factorize it .

how to input the polynomial f form the windows console ,Do you have provide some function to finish it.

just liking have a program(sure ,the program not working,)
//f is a random polynomial .
program
{
std::cout<<"please input the polynomial f"<<endl;
std::cin>>f;
}


Report this post
Top
 Profile  
 
 Post subject: Re: how to input the f from the console window
PostPosted: Mon Nov 10, 2008 3:25 pm 
Offline

Joined: Wed Sep 29, 2004 6:36 pm
Posts: 457
The "easy" solution is to implement the program in CoCoAL code and then use the cocoa console program. You can have it start something automatically on start, which would read user input.

If you want to make a separate console program which uses the CoCoALib instead. you will have to write a parser for polynomial input.


Report this post
Top
 Profile  
 
 Post subject: Re: how to input the f from the console window
PostPosted: Wed Jan 07, 2009 9:19 am 
Offline
User avatar

Joined: Thu Sep 30, 2004 10:59 am
Posts: 599
Location: Genova
There is an example in examples/ex-PolyInput1.C. The input is not as elegant as you'd like: see examples/ex-PolyInput1.in

Ciao
Anna


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot 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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[ Time : 0.130s | 10 Queries | GZIP : Off ]