source: git/factory/ftest/totaldegree.m4 @ cf0a71

spielwiese
Last change on this file since cf0a71 was cf0a71, checked in by Jens Schmidt <schmidt@…>, 26 years ago
* size.m4, degree.m4, deriv.m4, totaldegree, resultant: doc fix git-svn-id: file:///usr/local/Singular/svn/trunk@880 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2/* $Id: totaldegree.m4,v 1.3 1997-11-05 16:12:21 schmidt Exp $ */
3
4ftestSetNameOfGame( totaldegree, `"
5Usage: totaldegree [<options>] [<envSpec>] <f> [<x> <y>]
6  calculates total degree of canonical form f.  If the variables
7  x and y are specified, calculates total degree of f with
8  respect to the polynomial variables between x and y
9  (inclusively).
10"'`' )
11
12//{{{ docu
13//
14// ftestAlgorithm.m4 - ftestAlgorithm test program.
15//
16// To create ftestAlgorithm.cc, run m4 using the ftest_util.m4 library in
17// the following way:
18//
19// m4 ftest_util.m4 ftestAlgorithm.m4 > ftestAlgorithm.cc
20//
21//}}}
22
23ftestPreprocInit();
24
25ftestGlobalInit();
26
27//
28// - main program.
29//
30int
31main ( int argc, char ** argv )
32{
33    // initialization
34    ftestMainInit();
35
36    // declare input and output variables
37    ftestOutVar( int, result );
38    ftestInVar( CanonicalForm, f );
39    ftestInVar( Variable, x );
40    ftestInVar( Variable, y );
41
42    // process argument list and set environment
43    ftestGetOpts();
44    ftestGetEnv();
45    ftestGetInVar( f );
46    ftestGetInVar( x, Variable() );
47    ftestGetInVar( y, Variable() );
48
49    // do the test!
50    ftestRun(
51        if ( ftestArgGiven( x ) )
52            result = totaldegree( f, x, y );
53        else
54            result = totaldegree( f ); );
55
56    // print results
57    if ( ftestArgGiven( x ) ) {
58        ftestOutput( "totaldegree(f, x, y)", result );
59    } else {
60        ftestOutput( "totaldegree(f)", result );
61    }
62
63    // clean up
64    ftestMainExit();
65}
Note: See TracBrowser for help on using the repository browser.