#  Copyright (c) 1997-2018
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------

object Cone<Float> {

rule cdd.convex_hull.primal: FACETS, LINEAR_SPAN : RAYS | INPUT_RAYS {
   cdd_ch_primal($this);
}
weight 4.10;
precondition : N_RAYS | N_INPUT_RAYS;
incurs FacetPerm;

rule cdd.convex_hull.dual: RAYS, LINEALITY_SPACE, POINTED, LINEALITY_DIM : FACETS | INEQUALITIES {
   cdd_ch_dual($this);
}
weight 4.10;
incurs VertexPerm;

# cdd redundancy checks
rule cdd.convex_hull.canon: POINTED, RAYS, LINEALITY_SPACE : INPUT_RAYS {
   cdd_canonicalize($this,0);
}
weight 3.10;
incurs VertexPerm;

rule cdd.convex_hull.lineality: LINEALITY_SPACE, POINTED : INPUT_RAYS {
   cdd_canonicalize_lineality($this,0);
}
weight 3.10;

rule cdd.convex_hull.redund: RAYS, RAY_SEPARATORS, LINEALITY_SPACE : INPUT_RAYS {
   cdd_eliminate_redundant_points($this);
}
weight 3.20;
precondition : POINTED;
incurs VertexPerm;

rule cdd.convex_hull.separators: RAY_SEPARATORS : RAYS {
   cdd_vertex_normals($this);
}
weight 3.20;
incurs VertexPerm;

rule cdd.convex_hull.canon : FACETS, LINEAR_SPAN : INEQUALITIES { 
  cdd_canonicalize($this,1)
}
weight 3.20;
incurs FacetPerm;

rule cdd.convex_hull.linear_span : LINEAR_SPAN : INEQUALITIES {     
   cdd_canonicalize_lineality($this,1);
}
weight 3.10;

}

INCLUDE
  lp_float.rules

# Local Variables:
# mode: perl
# c-basic-offset:3
# End:
