/* $OpenXM: OpenXM/src/asir-contrib/packages/doc/phc.oxweave,v 1.1 2003/05/19 05:15:52 takayama Exp $ */ /*&C-texi @c DO NOT EDIT THIS FILE oxphc.texi @node PHC Functions,,, Top */ /*&jp-texi @chapter PHC 函数 この節では PHC pack の ox サーバ @code{ox_sm1_phc} とのインタフェース関数を解説する. これらの関数はファイル @file{phc} で定義されている. @code{phc} は @file{$(OpenXM_HOME)/lib/asir-contrib} にある. */ /*&eg-texi @chapter PHC Functions This chapter describes interface functions for PHC pack ox server @code{ox_sm1_phc}. These interface functions are defined in the file @file{phc}. The file @code{phc} is @* at @file{$(OpenXM_HOME)/lib/asir-contrib}. */ /*&C-texi @example @include opening.texi [255] phc.start(); 0 [257] phc.phc([x^2+y^2-4,x*y-1]); The detailed output is in the file tmp.output.* The answer is in the variable Phc. 0 [260] Phc ; [[[-0.517638,0],[-1.93185,0]], [[1.93185,0],[0.517638,0]], [[-1.93185,0],[-0.517638,0]], [[0.517638,0],[1.93185,0]]] [261] @end example */ /*&C-texi Author of @code{PHC pack}: Jan Verschelde. @* */ /*&jp-texi 参考書 1: Jan Verschelde, PHCpack: A general-purpose solver for polynomial systems by homotopy continuation". ACM Transaction on Mathematical Softwares, 25(2): 251-276, 1999. @* 参考書 2: Cox, D., O'Shea, Little, J., Using Algebraic Geometry, Springer. Mixed volumes についての章を見よ. */ /*&eg-texi Reference 1: Jan Verschelde, PHCpack: A general-purpose solver for polynomial systems by homotopy continuation". ACM Transaction on Mathematical Softwares, 25(2): 251-276, 1999. @* Reference 2: Cox, D., O'Shea, Little, J., Using Algebraic Geometry, Springer. See the chapter on mixed volumes. */ /*&C-texi @menu * phc_start:: * phc:: @end menu */ /*&jp-texi @section 函数一覧 */ /*&eg-texi @section Functions */ /*&jp-texi @node phc.start,,, PHC Functions @subsection @code{phc.start} @findex phc.start @table @t @item phc.start() :: Localhost で @code{ox_sm1_phc} を起動する. @end table @table @var @item return 整数 @end table @itemize @bullet @item Localhost で @code{ox_sm1_phc} を起動する. 起動された @code{ox_sm1_phc} の識別番号を戻す. @item @code{Xm_noX =1} としておくと, @code{ox_sm1_phc} 用の debug window が開かない. @item 識別番号は @code{Phc_proc} に格納される. @end itemize */ /*&eg-texi @node phc.start,,, PHC Functions @subsection @code{phc.start} @findex phc.start @table @t @item phc.start() :: Start @code{ox_sm1_phc} on the localhost. @end table @table @var @item return Integer @end table @itemize @bullet @item Start @code{ox_sm1_phc} on the localhost. It returns the descriptor of @code{ox_sm1_phc}. @item Set @code{Xm_noX = 1} to start @code{ox_sm1_phc} without a debug window. @item The descriptor is stored in @code{Phc_proc}. @end itemize */ /*&C-texi @example P = phc.start() @end example */ /*&jp-texi @table @t @item 参照 @code{ox_launch}, @code{phc} @end table */ /*&eg-texi @table @t @item Reference @code{ox_launch}, @code{phc} @end table */ /*&jp-texi @node phc.phc,,, PHC Functions @subsection @code{phc.phc} @findex phc.phc @table @t @item phc.phc(@var{s}|proc=@var{p}) :: PHC pack に代数方程式系 @var{s} の解をすべてもとめてくれるように頼む. @end table @table @var @item return なし @item p 数 @item s リスト @end table @itemize @bullet @item 代数方程式系 @var{S} をホモトピー法で解くために PHC pack を呼ぶ. PHC pack を開発したのは Jan Verschelde である. オリジナルの配布元は @code{www.mth.msu.edu/~jan} である. PHC pack は代数方程式系を解くためにいろいろな戦略をえらぶことができるが, このインタフェース関数では, black-box solver しか用いていない. black-box solver は一般的な戦略ではあるが, 能率的ではない. この関数で代数方程式を解くのに失敗したら, オリジナルの PHC pack を用い, ほかの戦略を試してみるとよい. @item PHC は作業ファイル @code{tmp.phc.out.pid}, @code{tmp.input.*}, @code{tmp.output.*} を生成する. ここで @code{pid} は @code{ox_sm1_phc} のプロセス番号である. ファイル @code{tmp.output.*} には PHC pack がどのように方程式系を解いたのかの 詳しい情報がはいっている. @item 変数の数と方程式の数 @code{length(@var{s})} は等しくないといけない. @end itemize */ /*&eg-texi @node phc.phc,,, PHC Functions @subsection @code{phc.phc} @findex phc.phc @table @t @item phc.phc(@var{s}|proc=@var{p}) :: Ask PHC pack to find all the roots in the complex torus of the given systems of polynomials @var{s} @end table @table @var @item return Void @item p Number @item s List @end table @itemize @bullet @item The server calls PHC pack to solve a system of algebraic equations S by homotopy methods. PHC pack has been developed by Jan Verschelde. See @code{www.mth.msu.edu/~jan} for the original distribution. The original PHC pack can choose several strategies to solve, but our phc interface uses only black-box solver, which is general and automatic but is not efficient. So, if you fails by our interface, try the other strategies via the original user interface. @item phc generates working files tmp.phc.out.pid, tmp.input.*, tmp.output.*. Here, pid the process number of the server. The file @code{tmp.output.*} contains details informations on how PCH pack solves the system. @item The number of variables and the number of equations @code{length(@var{s})} must agree. @end itemize */ /*&C-texi @noindent Algorithm: Jan Verschelde, PHCpack: A general-purpose solver for polynomial systems by homotopy continuation". ACM Transaction on Mathematical Softwares, 25(2): 251-276, 1999. @example [232] P = phc.start(); 0 [233] phc.phc([x^2+y^2-4,x*y-1]|proc=P); The detailed output is in the file tmp.output.* The answer is in the variable Phc. 0 [234] Phc; [[[-1.93185,0],[-0.517638,0]], [[0.517638,0],[1.93185,0]], [[-0.517638,0],[-1.93185,0]], [[1.93185,0],[0.517638,0]]] [[x=[real, imaginary], y=[real,imaginary]], the first solution [x=[real, imaginary], y=[real,imaginary]], the second solution ... @end example */ /*&jp-texi @table @t @item 参照 @code{ox_launch}, @code{phc.start}, @file{$(OpenXM_HOME)/bin/lin_phcv2}(original PHC pack binary for linux) @end table */ /*&eg-texi @table @t @item Reference @code{ox_launch}, @code{phc.start}, @file{$(OpenXM_HOME)/bin/lin_phcv2}(original PHC pack binary for linux) @end table */