Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Sign Class Reference
[C++ Language Interface]

Scalar product sign function object depending on topology. More...

#include <Scalar_Products.defs.hh>

List of all members.

Public Member Functions

 Topology_Adjusted_Scalar_Product_Sign (const Constraint &c)
 Constructs the function object according to the topology of c.
 Topology_Adjusted_Scalar_Product_Sign (const Generator &g)
 Constructs the function object according to the topology of g.
int operator() (const Constraint &, const Generator &) const
 Computes the (topology adjusted) scalar product sign of c and g.
int operator() (const Generator &, const Constraint &) const
 Computes the (topology adjusted) scalar product sign of g and c.

Private Types

typedef int(* SPS_type )(const Linear_Row &, const Linear_Row &)
 The type of the scalar product sign function pointer.

Private Attributes

SPS_type sps_fp
 The scalar product sign function pointer.

Detailed Description

Scalar product sign function object depending on topology.

Definition at line 176 of file Scalar_Products.defs.hh.


Member Typedef Documentation

The type of the scalar product sign function pointer.

Definition at line 190 of file Scalar_Products.defs.hh.


Constructor & Destructor Documentation

Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Sign::Topology_Adjusted_Scalar_Product_Sign ( const Constraint c  )  [inline]

Constructs the function object according to the topology of c.

Definition at line 130 of file Scalar_Products.inlines.hh.

00131   : sps_fp(c.is_necessarily_closed()
00132            ? static_cast<SPS_type>(&Scalar_Products::sign)
00133            : static_cast<SPS_type>(&Scalar_Products::reduced_sign)) {
00134 }

Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Sign::Topology_Adjusted_Scalar_Product_Sign ( const Generator g  )  [inline]

Constructs the function object according to the topology of g.

Definition at line 138 of file Scalar_Products.inlines.hh.

00139   : sps_fp(g.is_necessarily_closed()
00140            ? static_cast<SPS_type>(&Scalar_Products::sign)
00141            : static_cast<SPS_type>(&Scalar_Products::reduced_sign)) {
00142 }


Member Function Documentation

int Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Sign::operator() ( const Generator g,
const Constraint c 
) const [inline]

Computes the (topology adjusted) scalar product sign of g and c.

Definition at line 156 of file Scalar_Products.inlines.hh.

References Parma_Polyhedra_Library::Linear_Row::is_necessarily_closed(), Parma_Polyhedra_Library::Scalar_Products::reduced_sign(), Parma_Polyhedra_Library::Scalar_Products::sign(), Parma_Polyhedra_Library::Constraint::space_dimension(), Parma_Polyhedra_Library::Generator::space_dimension(), and sps_fp.

00157                                                                              {
00158   PPL_ASSERT(g.space_dimension() <= c.space_dimension());
00159   PPL_ASSERT(sps_fp == (g.is_necessarily_closed()
00160                     ? static_cast<SPS_type>(&Scalar_Products::sign)
00161                     : static_cast<SPS_type>(&Scalar_Products::reduced_sign)));
00162   return sps_fp(static_cast<const Linear_Row&>(g),
00163                 static_cast<const Linear_Row&>(c));
00164 }

int Parma_Polyhedra_Library::Topology_Adjusted_Scalar_Product_Sign::operator() ( const Constraint c,
const Generator g 
) const [inline]

Computes the (topology adjusted) scalar product sign of c and g.

Definition at line 145 of file Scalar_Products.inlines.hh.

References Parma_Polyhedra_Library::Linear_Row::is_necessarily_closed(), Parma_Polyhedra_Library::Scalar_Products::reduced_sign(), Parma_Polyhedra_Library::Scalar_Products::sign(), Parma_Polyhedra_Library::Generator::space_dimension(), Parma_Polyhedra_Library::Constraint::space_dimension(), and sps_fp.

00146                                                                             {
00147   PPL_ASSERT(c.space_dimension() <= g.space_dimension());
00148   PPL_ASSERT(sps_fp == (c.is_necessarily_closed()
00149                     ? static_cast<SPS_type>(&Scalar_Products::sign)
00150                     : static_cast<SPS_type>(&Scalar_Products::reduced_sign)));
00151   return sps_fp(static_cast<const Linear_Row&>(c),
00152                 static_cast<const Linear_Row&>(g));
00153 }


Member Data Documentation

The scalar product sign function pointer.

Definition at line 193 of file Scalar_Products.defs.hh.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Sun Feb 27 16:20:25 2011 for PPL by  doxygen 1.6.3