*******************************************************************************
**********             The easiest way to use libnormaliz            **********
*******************************************************************************

This is an early version of libnormaliz. It may very well happen that the interface changes in the future!
Please contact us if you want to use the normaliz library.

More information on normaliz:
http://www.mathematik.uni-osnabrueck.de/normaliz/

Preperation:

Check the compile instructions in ../INSTALL

To use libnormaliz link libnormaliz.a in. It might be necessary to activate compilation  with OpenMP (in g++ use the -fopenmp flag).


Quick workflow overview:

1) include libnormaliz/cone.h in your source code
2) create a libnormaliz::Cone object
3) call one of the Cone.compute() methods
4) check if the desired data is computed: isComputed( X )
5) get the data: getX()
6) repeat 4+5 or 3+4+5


Example:

// we discourage the use of "using namespace libnormaliz", but you may find these useful
using libnormaliz::Cone;
using libnormaliz::ConeProperties;
using libnormaliz::Type::InputType;


// use your preferred integer type
typedef long long int Integer;
//typedef mpz_class Integer;   //if you need more than 64bit integers

// get some input data
vector< vector <Integer> > Data = ...
libnormaliz::InputType type = integral_closure; // for all input types see below
libnormaliz::Cone<Integer> MyCone = libnormaliz::Cone<Integer>(Data, type);

libnormaliz::ConeProperties Wanted;
Wanted.set(libnormaliz::ConeProperty::Triangulation).set(libnormaliz::ConeProperty::HilbertBasis);
MyCone.compute(Wanted);


if(MyCone.isComputed(libnormaliz::ConeProperty::HilbertBasis)) {
	vector< vector< Integer> > HB& = MyCone.getHilbertBasis();
	//use it
}
if(MyCone.isComputed(libnormaliz::ConeProperty::Multiplicity)) {
   cout << "MyCone has multiplicity " << MyCone.getMultiplicity();
}

Possible InputTypes (from libnormaliz.h):
    integral_closure,
    polyhedron,
    normalization,
    polytope,
    rees_algebra,
    inequalities,
    strict_inequalities,
    signs,
    strict_signs,
    equations,
    congruences,
    inhom_inequalities,
    dehomogenization,
    inhom_equations,
    inhom_congruences,
    lattice_ideal,
    grading,
    excluded_faces

To combine input types build a
std::map <libnormaliz::InputType, vector< vector<Integer> >
and construct the libnormaliz::Cone from it.

Possible ConeProperties (from cone_property.h):
    Generators,
    ExtremeRays,
    VerticesOfPolyhedron,
    SupportHyperplanes,
    TriangulationSize,
    TriangulationDetSum,
    Triangulation,
    Multiplicity,
    Shift,
    RecessionRank,
    AffineDim,
    ModuleRank,
    HilbertBasis,
    ModuleGenerators,
    Deg1Elements,
    HilbertSeries,
    Grading,
    IsPointed,
    IsDeg1Generated,
    IsDeg1ExtremeRays,
    IsDeg1HilbertBasis,
    IsIntegrallyClosed,
    GeneratorsOfToricRing,
    ReesPrimary,
    ReesPrimaryMultiplicity,
    StanleyDec,
    ExcludedFaces,
    Dehomogenization,
    InclusionExclusionData,
Additional compute options to choose a special algorithm (currently also ConeProperty):
    DualMode,
    ApproximateRatPolytope,
    DefaultMode


Please see the Normaliz Documentation for more information on the input types and computation modes
http://www.mathematik.uni-osnabrueck.de/normaliz/



Alternative Configuration

The integer type in the libnormaliz library is templated. So in theory it is possible to use other integer types. Then you have to include libnormaliz-all.cpp. In this case you do not need to link libnormaliz.a. We suggest (and only tested) 'long long int' and the gmp type 'mpz_class'.
