GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/*1* Normaliz2* Copyright (C) 2007-2014 Winfried Bruns, Bogdan Ichim, Christof Soeger3* This program is free software: you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation, either version 3 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program. If not, see <http://www.gnu.org/licenses/>.15*16* As an exception, when this program is distributed through (i) the App Store17* by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or (iii) Google Play18* by Google Inc., then that store may impose any digital rights management,19* device limits and/or redistribution restrictions that are required by its20* terms of service.21*/2223#ifndef CONE_DUAL_MODE_H24#define CONE_DUAL_MODE_H2526#include <list>27#include <vector>2829#include "libnormaliz/libnormaliz.h"30#include "libnormaliz/matrix.h"31#include "libnormaliz/sublattice_representation.h"32#include "libnormaliz/reduction.h"3334namespace libnormaliz {35using std::list;36using std::vector;3738template<typename Integer> class CandidateList;39template<typename Integer> class Candidate;4041template<typename Integer>42class Cone_Dual_Mode {43public:44size_t dim;45size_t nr_sh;4647bool verbose;4849bool inhomogeneous;50bool do_only_Deg1_Elements;51bool truncate; // = inhomogeneous || do_only_Deg1_Elements5253Matrix<Integer> SupportHyperplanes;54Matrix<Integer> Generators;55vector<bool> ExtremeRaysInd;56list<Candidate<Integer>* > ExtremeRayList; //only temporarily used57CandidateList<Integer> Intermediate_HB; // intermediate Hilbert basis58list<vector<Integer> > Hilbert_Basis; //the final result59Matrix<Integer> BasisMaxSubspace; // a basis of the maximal linear subspace of the cone6061/* ---------------------------------------------------------------------------62* Private routines, used in the public routines63* ---------------------------------------------------------------------------64*/65/* splices a vector of lists into a total list*/66void splice_them_sort(CandidateList< Integer>& Total, vector<CandidateList< Integer> >& Parts);6768/* computes the Hilbert basis after adding a support hyperplane with the dual algorithm */69void cut_with_halfspace_hilbert_basis(const size_t & hyp_counter, const bool lifting,70vector<Integer> & halfspace, bool pointed);7172/* computes the Hilbert basis after adding a support hyperplane with the dual algorithm , general case */73Matrix<Integer> cut_with_halfspace(const size_t & hyp_counter, const Matrix<Integer>& Basis_Max_Subspace);7475/* computes the extreme rays using rank test */76void extreme_rays_rank();7778void relevant_support_hyperplanes();7980// move candidates of old_tot_deg <= guaranteed_HB_deg to Irred81void select_HB(CandidateList<Integer>& Cand, size_t guaranteed_HB_deg,82CandidateList<Integer>& Irred, bool all_irreducible);8384Cone_Dual_Mode(Matrix<Integer>& M, const vector<Integer>& Truncation); //main constructor8586/*---------------------------------------------------------------------------87* Data access88*---------------------------------------------------------------------------89*/9091Matrix<Integer> get_support_hyperplanes() const;92Matrix<Integer> get_generators() const;93vector<bool> get_extreme_rays() const;949596/*---------------------------------------------------------------------------97* Computation Methods98*---------------------------------------------------------------------------99*/100void hilbert_basis_dual();101102/* transforms all data to the sublattice */103void to_sublattice(const Sublattice_Representation<Integer>& SR);104105};106//class end *****************************************************************107108}109110//---------------------------------------------------------------------------111#endif112//---------------------------------------------------------------------------113114115