# doc-cache created by Octave 11.1.0
# name: cache
# type: cell
# rows: 3
# columns: 22
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
cascade


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 788

 [SW,R] = cascade(S,L)
 Launching the so-called cascade of homotopies for an embedded system S to
 find a list of witness sets and embedded system for the components of the 
 solution set L in every dimension;
 
 INPUTs:
 S  = embedded system in cell array format
 L  = structure of solutions for the embedded system S

 OUTPUT:
 SW = witness sets (lower-dimensional and higher-dimensional) in n*1 cell
      array format. 
      SW{1,1} is 0-dimensional component witness sets
      SW{2,1} is 1-dimensional component witness sets
      SW{i,1} is (i-1)-dimensional component witness sets
 It means the (i-1)-dimensional component does NOT exist if SW{i,1} is empty.

 R  = embeded systems in n*1 cell array format.
      R{i,1} is the corresponding embedded system for dimension (i-1)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [SW,R] = cascade(S,L)
 Launching the so-called cascade of homotopies for an...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
cmplx2str


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 351
 Writes complex (or real) number x as a string
 
 cmplx2str(1+2i) = (1.00000000000000e+00+2.00000000000000e+00*i)
 cmplx2str(1-2i) = (1.00000000000000e+00-2.00000000000000e+00*i)
 cmpl2str(3)     = 3.00000000000000e+00
 cmpl2str(-3)    = (-3.00000000000000e+00)
 cmpl2str(2i)    = (2.00000000000000e+00*i)
 cmpl2str(-2i)   = (-2.00000000000000e+00*i)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Writes complex (or real) number x as a string
 
 cmplx2str(1+2i) = (1.000000...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
decompose


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 376

 [decom] = decompose(S,fws)
 Performing the numeric irreducible decomposition of a pure-dimensional solution 
 component represented by a witness set fws;
 INPUTs:
 S    = embedded system
 fws  = filtered witness set. It is solution set in structure format.
 
 OUTPUT:
 decom = irreducible decomposition in n*1 cell array format.
         decom{j,1} = the jth decomposition




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [decom] = decompose(S,fws)
 Performing the numeric irreducible decompositio...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
deflation


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 338

 [L]=deflation(S,Sols)
    deflates the multiplicity of an isolated singular root
    while reconditioning the problem

 INPUTs:
 S = a polynomial system
 Sols = a (possibly partial) list of isolated solutions of S 
 
 OUTPUT:
 L{1,1} = system at dimension 0
 L{2,1} = solutions at level 0
 L{3,1} = system ...
 L{4,1} = solutions ...





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [L]=deflation(S,Sols)
    deflates the multiplicity of an isolated singular...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
embed


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 783

 [R]=embed(S,d)
 Constructs an embedded system for a given system S.
 INPUTs:
 S = polynomial system in tableau or cell array format
 note: if S is in cell array format, the polynomials are expanded.
 d = the expected dimension of the solution set

 OUPUTs:
 R = an embedded system for S in cell array format
 
 Example:
 system sys : x^2+y^2+(z-1)^2-1;
             (z-0.5)*(z-1)*y;
             (z-0.5)*(z-1)*x;
 i.e. x^2 + y^2 + z^2 - 2z;
      yz^2 - 1.5yz + 0.5y;
      xz^2 - 1.5xz + 0.5x;
 sys =  [1    2 0 0;
        1    0 2 0;
        1    0 0 2;
        -2   0 0 1;
        0    0 0 0;
        1    0 1 2;
        -1.5 0 1 1;
        0.5  0 1 0;
        0    0 0 0;
        1    1 0 2;
        -1.5 1 0 1;
        0.5  1 0 0;
        0    0 0 0];
 [embsys]=embed(sys,1)




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69

 [R]=embed(S,d)
 Constructs an embedded system for a given system S.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
eqnbyeqn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 625

 [WS,R]=eqnbyeqn(S)
 The equation-by-equation solver of PHCpack to find a list witness sets and 
 embedded system for the components of the solution to the original system 
 in every dimension.
 
 INPUTs:
 S  = polynomial system in tableau or cell array format

 OUTPUT:
 WS = witness sets (lower-dimensional and higher-dimensional) in n*1 cell
      array format. 
      WS{i,1} is (i-1)-dimensional component witness sets
 It means the (i-1)-dimensional component does NOT exist if WS{i,1} is empty.
 
 R  = embeded systems in n*1 cell array format.
      R{i,1} is the corresponding embedded system for dimension (i-1)
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [WS,R]=eqnbyeqn(S)
 The equation-by-equation solver of PHCpack to find a li...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
extract_info


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2066

 [n_poly,n_var,n_monomials,coeffs,exponents]=extract_info(tableau)
 INPUT:
 tableau   = tableau matrix defining the system, with
     1) coefficients in first column
     2) exponents of variables x1,...,xn in columns 2,...,(n+1)
     3) end of polynomials marked with a row of 0s 
 Example(gaukwa2):
  w1       + w2       + (-9.98250904334731E-01 + 5.91196413630250E-02*i);
  w1*x1    + w2*x2    + (-8.92749639148806E-01 + 4.50553084330444E-01*i);
  w1*x1**2 + w2*x2**2 + ( 1.60088552022675E-01 + 9.87102657027770E-01*i);
  w1*x1**3 + w2*x2**3 + (-7.25369971319578E-01 + 6.88359211972815E-01*i);
  tableau format:
              1                                               1 0 0 0
              1                                               0 1 0 0
              -9.98250904334731E-01 + 5.91196413630250E-02*i  0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 1 0
              1                                               0 1 0 1
              -8.92749639148806E-01 + 4.50553084330444E-01*i  0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 2 0
              1                                               0 1 0 2
              1.60088552022675E-01 + 9.87102657027770E-01*i   0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 3 0
              1                                               0 1 0 3
              -7.25369971319578E-01 + 6.88359211972815E-01*i  0 0 0 0
              0                                               0 0 0 0

 OUTPUTs:
 n_poly = number of polynomials in the system
 n_var  = number of variables in the system
 n_monomials = n_monomials(i) is the number of monomials in polynomial i
 coeffs = coefficient list; coeffs(i) is the coefficient of the ith monomial
 exponents = exponents list; ith row is the list of exponents of ith monomial 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [n_poly,n_var,n_monomials,coeffs,exponents]=extract_info(tableau)
 INPUT:
 ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
extract_sols


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 283

 [solutions] = extract_sols(char_sols)
 extract individual solution info. from black-box solver result 
 INPUT: 
 char_sols  = solution string returned by black-box solver

 OUTPUT:
 solutions = structure of solution
             fields: time,multiplicity,err,rco,res,x1,x2,x3,...




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [solutions] = extract_sols(char_sols)
 extract individual solution info. fr...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
form_poly


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 796

 [f]=form_poly(n_var,coeff,exponent)
 form one polynomial given coefficients and exponents list
 INPUTs:
   n_var  = number of variables in the system
   coeff  = mx1 vector of coefficients, m=number of terms
   exponent = nxm matrix of exponents
              n should be same as n_var 
              the mth column is the exponents of the mth term

 OUTPUT:
   f  = sum of terms;
        Each term is a coefficient times variables raised to
        their respective exponents
 Example:
 n_var    = 4
 coeff    = [1; 1; 1.6009e-001 +9.8710e-001i]
 exponent = [1 0 0;
             0 1 0;
             2 0 0;
             0 2 0]
 function returns a polynomial x1*x3**2 + x2*x4**2 + (0.16009+0.9871*i)

 This version of form_poly uses cmplx2str provided by Bor Plestenjak
 on Monday 19 May 2014.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [f]=form_poly(n_var,coeff,exponent)
 form one polynomial given coefficients...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
intersection


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 476

 [W3]=intersection(S1,W1,S2,W2)
 Applies the diagonal homotopy technique to find a witness set W3 for the
 intersection of the solution sets represented by the witness sets W1 and W2. 

 INPUTs:
 S* = polynomial system in cell array format
 W* = witness set of polynomial system in S*
 
 OUTPUT:
 W3 = a witness set for the intesection 
      W3{i,1} is (i-1)-dimensional component witness set.
 It means the (i-1)-dimensional component does NOT exist if W3{i,1} is
 empty.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [W3]=intersection(S1,W1,S2,W2)
 Applies the diagonal homotopy technique to ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
make_system


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1839

 [f,n_poly,n_var]=make_system(tableau)
 INPUT:
 tableau   = tableau matrix defining the system, with
     1) coefficients in first column
     2) exponents of variables x1,...,xn in columns 2,...,(n+1)
     3) end of polynomials marked with a row of 0s 
 Example(gaukwa2):
  w1       + w2       + (-9.98250904334731E-01 + 5.91196413630250E-02*i);
  w1*x1    + w2*x2    + (-8.92749639148806E-01 + 4.50553084330444E-01*i);
  w1*x1**2 + w2*x2**2 + ( 1.60088552022675E-01 + 9.87102657027770E-01*i);
  w1*x1**3 + w2*x2**3 + (-7.25369971319578E-01 + 6.88359211972815E-01*i);
  tableau format:
              1                                               1 0 0 0
              1                                               0 1 0 0
              -9.98250904334731E-01 + 5.91196413630250E-02*i  0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 1 0
              1                                               0 1 0 1
              -8.92749639148806E-01 + 4.50553084330444E-01*i  0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 2 0
              1                                               0 1 0 2
              1.60088552022675E-01 + 9.87102657027770E-01*i   0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 3 0
              1                                               0 1 0 3
              -7.25369971319578E-01 + 6.88359211972815E-01*i  0 0 0 0
              0                                               0 0 0 0
 OUTPUTs: 
 f      = polynomial system 
 n_poly = number of polynomials in the system
 n_var  = number of variables in the system




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [f,n_poly,n_var]=make_system(tableau)
 INPUT:
 tableau   = tableau matrix d...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
mixed_volume


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 885
 [vol, start, sols] = mixed_volume(s, flag_1, flag_2)
 computer mixed volume for polynomial system s
 INPUT:
 s    = polynomial system
 flag_1 = 1 ---- return a random coefficient start system and solutions
          0 ---- default. Do not return start system and solutions
          
 flag_2 = 1 ---- default. return stable mixed volume
        = 0 ---- return common mixed volume

 OUTPUT:
 vol   = stable mixed volume by default. If flag_2 is set to be 0, it is
         common mixed volume.
 startsys = a random coefficient start system
 sols  = solutions fof the start system
 
 Example: [vol,startsys,sols] = mixed_volume(s,1,1)
 compute stable mixed volume for system s and 
 return a random coefficient start system and solutions.
 
 NOTE: 
 No startsys and sols are returned if flag is set to be 0.
 sols could be empty in the case that mixed volume of given system s is 0.
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 [vol, start, sols] = mixed_volume(s, flag_1, flag_2)
 computer mixed volume ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
modify_poly


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 105

 [mf]=modify_poly(f)
 Taking only the real part of the complex coefficients
 of the given polynomial f




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [mf]=modify_poly(f)
 Taking only the real part of the complex coefficients
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
phc_filter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 389

 [F]=phc_filter(S,HD,LD)
    removes the points in a witness set LD that belong 
    to a higher-dimensional component HD.

 INPUTs:
   S  = embedded system
   HD = a witness set for a component of a higher dimension 
   LD = a witness set for a component of a lower dimension 
   LD, HD are both structure arrays.

 OUTPUT:
   F = the filtered witness set of 0-dimensional witness sets




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [F]=phc_filter(S,HD,LD)
    removes the points in a witness set LD that bel...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
read_system


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 396

 [system]=read_system(filename)
    Reads polynomial system from a file.

 INPUT:
   filename =  file name
   system   =  polynomial system in cell array format
               see help solve_system for details
 EXAMPLE: [T] = read_system('noon3');
   noon3 is the name of a file which contains the polynomial system.

 Note: Please make sure there are no extra blank lines between polynomials.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73

 [system]=read_system(filename)
    Reads polynomial system from a file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
refine_sols


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 887

 [refsols]=refine_sols(T,sols,tol_err,tol_sing,tol_res,max)
 Refines the given solutions to any specified precision and makes possible to 
 set error tolerance and other parameters in order to fine-tune the solver;
 INPUTs:
 Two format can be used for input
 (1) T   = tableau matrix defining the system, with
           1) coefficients in first column
           2) exponents of variables x1,...,xn in columns 2,...,(n+1)
           3) end of polynomials marked with a row of 0s 
 (2) T = cell array defining the system
         each cell contains one polynomial

 sols        approximate solutions of given system T
 tol_err     tolerance on magnitude of the correction vector;
 tol_sing    threshold on inverse of condition number;
 tol_res     tolerance on residual
 max         maximum number of iterations in Newton's method

 OUTPUT:
 refsols     refined approximate solutions.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [refsols]=refine_sols(T,sols,tol_err,tol_sing,tol_res,max)
 Refines the giv...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
set_phcpath


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 365

 set_phcpath(pathstr) sets the path to the location of 
                      the executable program phc

 INPUT :
   pathstr   full path name for the file name which defines
             the location for the executable program phc.

  EXAMPLES :
    set_phcpath('C:/Downloads/PHCpack/phc')   % on Windows
    set_phcpath('/tmp/phc')                   % on Linux




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 set_phcpath(pathstr) sets the path to the location of 
                    ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
solve_system


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2431

 [sols,n_var]=solve_system(T)
    calls the blackbox solver of phc, returns approximations to all
    complex isolated roots of a square system

 INPUT:
 Two format can be used for input
 (1) T   = tableau matrix defining the system, with
           1) coefficients in first column
           2) exponents of variables x1,...,xn in columns 2,...,(n+1)
           3) end of polynomials marked with a row of 0s 
 (2) T = cell array defining the system
         each cell contains one polynomial
 Example(gaukwa2):
  w1       + w2       + (-9.98250904334731E-01 + 5.91196413630250E-02*i);
  w1*x1    + w2*x2    + (-8.92749639148806E-01 + 4.50553084330444E-01*i);
  w1*x1**2 + w2*x2**2 + ( 1.60088552022675E-01 + 9.87102657027770E-01*i);
  w1*x1**3 + w2*x2**3 + (-7.25369971319578E-01 + 6.88359211972815E-01*i);
  tableau format:
              1                                               1 0 0 0
              1                                               0 1 0 0
              -9.98250904334731E-01 + 5.91196413630250E-02*i  0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 1 0
              1                                               0 1 0 1
              -8.92749639148806E-01 + 4.50553084330444E-01*i  0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 2 0
              1                                               0 1 0 2
              1.60088552022675E-01 + 9.87102657027770E-01*i   0 0 0 0
              0                                               0 0 0 0
              1                                               1 0 3 0
              1                                               0 1 0 3
              -7.25369971319578E-01 + 6.88359211972815E-01*i  0 0 0 0
              0                                               0 0 0 0
 cell array format:
   T = cell(4,1);
   T{1} = 'w1       + w2       + (-9.98250904334731E-01 + 5.91196413630250E-02*i)';
   T{2} = 'w1*x1    + w2*x2    + (-8.92749639148806E-01 + 4.50553084330444E-01*i)';
   T{3} = 'w1*x1**2 + w2*x2**2 + ( 1.60088552022675E-01 + 9.87102657027770E-01*i)';
   T{4} = 'w1*x1**3 + w2*x2**3 + (-7.25369971319578E-01 + 6.88359211972815E-01*i)';

 OUPUTS:
 solutions = structure of solution
             fields: time,multiplicity,err,rco,res,x1,x2,x3,...




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [sols,n_var]=solve_system(T)
    calls the blackbox solver of phc, returns ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
track


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 919

 [L]=track(t,s,startsolutions)
    tracks the specified solutions to a given start system 
    returning the corresponding solutions of a given target system;

 INPUTs:
   t = target system in tableau or cell array format
   s = start system in tableau or cell array format
   startsolution = solutions to the start system

 OUTPUT:
   L = structure of solution
       fields: time,multiplicity,err,rco,res,x1,x2,x3,...
 
 EXAMPLE: 
 target system: x^2+y^2-1;
                x^3+y^3-1;
 t = [ 1  2 0;
       1  0 2;
       -1 0 0;
       0  0 0;
       1  0 3;
       1  3 0;
       -1 0 0;
       0  0 0];

 start system: (1+i)*(x^2-1);
               (1+i)*(y^3-1);
  s= [(1+i)  2  0;
     (-1-i)  0  0;
     0       0  0;
     (1+i)   0  3;
     (-1-i)  0  0;
     0       0  0];
 
 startsolution = structure of that start system solutions
                 fields: time, multiplicity, err, rco, res, x1,x2,x3....




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 [L]=track(t,s,startsolutions)
    tracks the specified solutions to a given...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
write_cassys


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 339

 write_cassys(filename,system)
 A utility function special for cascade algorithm.
 The 1st row of written polynomial system only contains number of poly.
 Assuming the system is square.
 INPUT:
 filename =  file name
 system   =  polynomial system in tableau or cell array format
             see help solve_system for details




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80

 write_cassys(filename,system)
 A utility function special for cascade alg...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
write_solution


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 153

 write_solution(file,s)
    writes the solution s to a file in PHCpack format

 INPUTs:
 filename   file name
 s          solution in structure format




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 78

 write_solution(file,s)
    writes the solution s to a file in PHCpack format



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
write_system


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 218

 write_system(filename,system)
   write a polynomial system to a file.

 INPUT:
   filename   file name
   system     polynomial system in tableau or cell array format
              see help solve_system for details




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71

 write_system(filename,system)
   write a polynomial system to a file.





