source: git/factory/ftest/sqrfree.m4 @ 9f39e6

fieker-DuValspielwiese
Last change on this file since 9f39e6 was 341696, checked in by Hans Schönemann <hannes@…>, 15 years ago
Adding Id property to all files git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id$ */
3
4ftestSetNameOfGame( sqrfree, `"
5Usage: sqrfree [<options>] [<envSpec>] [sort=<flag>] <f>
6  computes squarefree decomposition of canonical form <f>.
7  If optional <flag> is set, squarefree factors are returned
8  sorted by multiplicity.
9"'`' )
10
11//{{{ docu
12//
13// ftestAlgorithm.m4 - ftestAlgorithm test program.
14//
15// To create ftestAlgorithm.cc, run m4 using the ftest_util.m4 library in
16// the following way:
17//
18// m4 ftest_util.m4 ftestAlgorithm.m4 > ftestAlgorithm.cc
19//
20//}}}
21
22ftestPreprocInit();
23
24ftestGlobalInit();
25
26//
27// - main program.
28//
29int
30main ( int argc, char ** argv )
31{
32    // initialization
33    ftestMainInit();
34
35    // declare input and output variables
36    ftestOutVar( CFFList, result );
37    ftestInVar( bool, flag );
38    ftestInVar( CanonicalForm, f );
39
40    // process argument list and set environment
41    ftestGetOpts();
42    ftestGetEnv();
43    ftestGetInVar( flag, false, "sort" );
44    ftestGetInVar( f );
45
46    // do the test!
47    ftestRun( result = sqrFree( f, flag ); );
48
49    // print results
50    if ( ftestArgGiven( flag ) && flag ) {
51        ftestOutput( "sqrfree(f)", result );
52    } else {
53        ftestOutput( "sqrfree(f) (unsorted)", result );
54    }
55
56    // clean up
57    ftestMainExit();
58}
Note: See TracBrowser for help on using the repository browser.