spielwiese
Last change
on this file since 3ba84c was
3ba84c,
checked in by Jens Schmidt <schmidt@…>, 25 years ago
|
***** merge from branch `factory-gcd' to main trunk
git-svn-id: file:///usr/local/Singular/svn/trunk@1329 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | /* $Id: norm.m4,v 1.2 1998-04-06 11:05:03 schmidt Exp $ */ |
---|
3 | |
---|
4 | ftestSetNameOfGame( norm, `" |
---|
5 | Usage: norm [<options>] [<envSpec>] <f> [<euclideanFlag>] |
---|
6 | returns maximum norm of canonical form <f>. If integer |
---|
7 | <euclideanFlag> is specified and non-zero, the euclidean |
---|
8 | norm of <f> is returned instead. |
---|
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 | |
---|
22 | ftestPreprocInit(); |
---|
23 | |
---|
24 | ftestGlobalInit(); |
---|
25 | |
---|
26 | // |
---|
27 | // - main program. |
---|
28 | // |
---|
29 | int |
---|
30 | main ( int argc, char ** argv ) |
---|
31 | { |
---|
32 | // initialization |
---|
33 | ftestMainInit(); |
---|
34 | |
---|
35 | // declare input and output variables |
---|
36 | ftestOutVar( CanonicalForm, result ); |
---|
37 | ftestInVar( CanonicalForm, f ); |
---|
38 | ftestInVar( int, euclideanFlag ); |
---|
39 | |
---|
40 | // process argument list and set environment |
---|
41 | ftestGetOpts(); |
---|
42 | ftestGetEnv(); |
---|
43 | ftestGetInVar( f ); |
---|
44 | ftestGetInVar( euclideanFlag, 0 ); |
---|
45 | |
---|
46 | // do the test! |
---|
47 | if ( euclideanFlag ) { |
---|
48 | ftestRun( result = euclideanNorm( f ); ); |
---|
49 | } else { |
---|
50 | ftestRun( result = maxNorm( f ); ); |
---|
51 | } |
---|
52 | |
---|
53 | // print results |
---|
54 | if ( euclideanFlag ) { |
---|
55 | ftestOutput( "euclideanNorm(f)", result ); |
---|
56 | } else { |
---|
57 | ftestOutput( "maxNorm(f)", result ); |
---|
58 | } |
---|
59 | |
---|
60 | // clean up |
---|
61 | ftestMainExit(); |
---|
62 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.