File: app_mixedvolume.cpp

package info (click to toggle)
gfan 0.5%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,348 kB
  • ctags: 5,683
  • sloc: cpp: 39,675; makefile: 454; sh: 1
file content (32 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include "parser.h"
#include "printer.h"
#include "polynomial.h"
#include "mixedvolume.h"
#include "gfanapplication.h"

class MixedVolumeApplication : public GFanApplication
{
public:
  const char *helpText()
  {
    return "This program computes the mixed volume of the Newton polytopes of a list of polynomials. The ring is specified on the input. After this follows the list of polynomials.\n";
  }
  MixedVolumeApplication()
  {
    registerOptions();
  }
  const char *name()
  {
    return "_mixedvolume";
  }
  int main()
  {
    FileParser P(Stdin);
    PolynomialSet s=P.parsePolynomialSetWithRing();
    cout << mixedVolume(s) << endl;
    return 0;
  }
};

static MixedVolumeApplication theApplication;