[BACK]Return to ts_local.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Schubert

File: [local] / OpenXM_contrib / PHC / Ada / Schubert / ts_local.adb (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:32 2000 UTC (23 years, 6 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with text_io,integer_io;                 use text_io,integer_io;
with Standard_Integer_Matrices;          use Standard_Integer_Matrices;
with Standard_Integer_Matrices_io;       use Standard_Integer_Matrices_io;
with Symbol_Table;
with Standard_Complex_Polynomials;       use Standard_Complex_Polynomials;
with Standard_Complex_Polynomials_io;    use Standard_Complex_Polynomials_io;
with Brackets,Brackets_io;               use Brackets,Brackets_io;
with Bracket_Expansions;                 use Bracket_Expansions;
with Matrix_Indeterminates;

procedure ts_local is

  procedure Main is

    n,d : natural;
    ans : character;

  begin
    put("Give n, the dimension of the space : "); get(n);
    put("Give d, the dimension of the plane : "); get(d);
    declare
      locmap : Matrix(1..n,1..d) := Localization_Map(n,d);
      b : Bracket(1..d);
      e : Poly;
    begin
      put_line("The localization map : "); put(locmap);
      loop
        Matrix_Indeterminates.Initialize_Symbols(n,d);
        put("Give "); put(d,1); put(" numbers for a bracket : "); get(b);
        e := Expand(locmap,b);
        put("The expansion of minor "); put(b);
        put_line(" following the localization map : ");
        put(e); new_line;
        Matrix_Indeterminates.Reduce_Symbols(locmap);
        Reduce_Variables(locmap,e);
        put_line("The expansion polynomial in reduced format : ");
        put(e); new_line;
        put("Do you wish to give other brackets ? (y/n) "); get(ans);
        exit when (ans /= 'y');
        Matrix_Indeterminates.Clear_Symbols;
      end loop;
    end;
  end Main;

begin
  new_line;
  put_line("Test of setting up a spanning localization.");
  new_line;
  Main;
end ts_local;