Arageli::polyhedron< T, M, C, CFG > Class Template Reference

The polyhedron representation as the base cone. More...

#include <polyhedron.hpp>

List of all members.

Public Types

typedef C cone
typedef C::inequation_element_type inequation_element_type
typedef C::equation_element_type equation_element_type
typedef C::generatrix_element_type generatrix_element_type
typedef C::basis_element_type basis_element_type
typedef C::inequation_type inequation_type
typedef C::equation_type equation_type
typedef C::generatrix_type generatrix_type
typedef C::basis_type basis_type
typedef C::size_type size_type
typedef C::dim_type dim_type
typedef C::difference_type difference_type

Public Member Functions

 polyhedron ()
 Creates an empty polyhedron in 0-space.
template<typename D>
 polyhedron (const D &dim, const fromempty_t &)
 Creates an empty polyhedron in the space with specified dimention.
template<typename D>
 polyhedron (const D &dim, const fromspace_t &)
 Creates polyhedron as all space with specified dimention.
template<typename M1>
 polyhedron (const M1 &ineqmat, const fromineq_t &)
 Creates polyhedron as a solution of specified inequations set with extended matrix.
template<typename M1>
 polyhedron (const M1 &vert, const fromivert_t &)
 Creates a poytope from vertices each element of which is representable as T.
template<typename M1>
 polyhedron (const M1 &vert, const fromvert_t &)
 Creates a poytope from vertices set.
sideset sides () const
template<typename M1>
M1 vertices () const
const T & inequation_matrix (std::size_t i, std::size_t j) const
vector< T > facet_normal (std::size_t i) const
std::size_t space_dim () const
Access to valid/normal flags.
bool is_implicit_valid () const
 If it returns true than implicit representation (inequations and equations) is actual.
bool is_parametric_valid () const
 If it returns true than parametric representation (generatrices and basis) is actual.
bool is_all_valid () const
 If it returns true than implicit and parametric representations are both valid.
bool is_implicit_normal () const
 If it returns true than representation (inequations and equations) is in normal form.
bool is_parametric_normal () const
 If it returns true than parametric representation (generatrices and basis) is in normal form.
bool is_all_normal () const
 If it returns true than implicit and parametric representations are both in normal form.
Validation and normalization of the representations.
void validate_implicit () const
 Make the implicit representation valid.
void validate_parametric () const
 Make the parametric representation valid.
void validate_all () const
 Make invalid representation valid.
void normalize_implicit () const
 Normalize the implicit representation.
void normalize_parametric () const
 Normalize the parametric representation.
void normalize_all () const
 Normalize both implicit and parametric representations.
Explicit set of valid/normal flags.
void set_valid_implicit ()
 Set the valid implicit flag without an actual valid test or validation.
void set_valid_parametric ()
 Set the valid parametric flag without an actual valid test or validation.
void set_valid_all ()
 Set the valid both implicit and parametric flags without an actual valid test or validation.
void set_normal_implicit ()
 Set the normal implicit flag without an actual normal test or normalization.
void set_normal_parametric ()
 Set the normal parametric flag without an actual normal test or normalization.
void set_normal_all ()
 Set the normal both implicit and parametric flags without an actual normal test or normalization.


Detailed Description

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
class Arageli::polyhedron< T, M, C, CFG >

The polyhedron representation as the base cone.

The polyhedron in n-dimetion space is represented as a cone Ax >= 0 in (n+1) dimention space and hyperplane x[0] = 1, so the polyhedra is {x : Ax >= 0 & x[0] = 1}. In other words, polyhedron that is completely defined by system Ax >= b, represented as a cone (-b|A)x' >= 0, where x is n-vector and x' is (n+1)-vector.

Definition at line 64 of file polyhedron.hpp.


Member Typedef Documentation

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::basis_element_type Arageli::polyhedron< T, M, C, CFG >::basis_element_type

Definition at line 75 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::basis_type Arageli::polyhedron< T, M, C, CFG >::basis_type

Definition at line 80 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C Arageli::polyhedron< T, M, C, CFG >::cone

Definition at line 70 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::difference_type Arageli::polyhedron< T, M, C, CFG >::difference_type

Definition at line 84 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::dim_type Arageli::polyhedron< T, M, C, CFG >::dim_type

Definition at line 83 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::equation_element_type Arageli::polyhedron< T, M, C, CFG >::equation_element_type

Definition at line 73 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::equation_type Arageli::polyhedron< T, M, C, CFG >::equation_type

Definition at line 78 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::generatrix_element_type Arageli::polyhedron< T, M, C, CFG >::generatrix_element_type

Definition at line 74 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::generatrix_type Arageli::polyhedron< T, M, C, CFG >::generatrix_type

Definition at line 79 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::inequation_element_type Arageli::polyhedron< T, M, C, CFG >::inequation_element_type

Definition at line 72 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::inequation_type Arageli::polyhedron< T, M, C, CFG >::inequation_type

Definition at line 77 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
typedef C::size_type Arageli::polyhedron< T, M, C, CFG >::size_type

Definition at line 82 of file polyhedron.hpp.


Constructor & Destructor Documentation

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
Arageli::polyhedron< T, M, C, CFG >::polyhedron (  )  [inline]

Creates an empty polyhedron in 0-space.

After creating the base cone is x[0] = 0 and only parametric representation is valid and normal.

Definition at line 90 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
template<typename D>
Arageli::polyhedron< T, M, C, CFG >::polyhedron ( const D &  dim,
const fromempty_t  
) [inline]

Creates an empty polyhedron in the space with specified dimention.

After creating only parametric representation is valid and normal.

Definition at line 96 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
template<typename D>
Arageli::polyhedron< T, M, C, CFG >::polyhedron ( const D &  dim,
const fromspace_t  
)

Creates polyhedron as all space with specified dimention.

After creating only implicit representation is valid and normal.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
template<typename M1>
Arageli::polyhedron< T, M, C, CFG >::polyhedron ( const M1 &  ineqmat,
const fromineq_t  
)

Creates polyhedron as a solution of specified inequations set with extended matrix.

Matrix ineqmat = (-b|A). After creating only implicit representation is valid but not necessarily normal.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
template<typename M1>
Arageli::polyhedron< T, M, C, CFG >::polyhedron ( const M1 &  vert,
const fromivert_t  
)

Creates a poytope from vertices each element of which is representable as T.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
template<typename M1>
Arageli::polyhedron< T, M, C, CFG >::polyhedron ( const M1 &  vert,
const fromvert_t  
)

Creates a poytope from vertices set.

The vertices can be have not only T-compatible values. In this case we multiply each vertex by the particular multiplier so make them representable as element of type T and take the multiplier out of real vertices elements to x[0].
<bold>WARNING! Now it works only for rational elements.</bold>


Member Function Documentation

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
vector<T> Arageli::polyhedron< T, M, C, CFG >::facet_normal ( std::size_t  i  )  const [inline]

Definition at line 297 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
const T& Arageli::polyhedron< T, M, C, CFG >::inequation_matrix ( std::size_t  i,
std::size_t  j 
) const [inline]

Definition at line 293 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
bool Arageli::polyhedron< T, M, C, CFG >::is_all_normal (  )  const [inline]

If it returns true than implicit and parametric representations are both in normal form.

Definition at line 171 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
bool Arageli::polyhedron< T, M, C, CFG >::is_all_valid (  )  const [inline]

If it returns true than implicit and parametric representations are both valid.

Definition at line 151 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
bool Arageli::polyhedron< T, M, C, CFG >::is_implicit_normal (  )  const [inline]

If it returns true than representation (inequations and equations) is in normal form.

The implicit representation is in normal form iff this representation is valid and maximum non-zero linear variety (if any) represented only as a set of equations and there are no negligible inequations or negligible equations. Note, this form is not a single form.

Definition at line 159 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
bool Arageli::polyhedron< T, M, C, CFG >::is_implicit_valid (  )  const [inline]

If it returns true than implicit representation (inequations and equations) is actual.

Definition at line 143 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
bool Arageli::polyhedron< T, M, C, CFG >::is_parametric_normal (  )  const [inline]

If it returns true than parametric representation (generatrices and basis) is in normal form.

The parametric representation is in normal form iff this representation is valid maximum non-zero linear variety (if any) represented only as its corresponding basis and there are no negligible generatrix. Note, this form is not a single form.

Definition at line 167 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
bool Arageli::polyhedron< T, M, C, CFG >::is_parametric_valid (  )  const [inline]

If it returns true than parametric representation (generatrices and basis) is actual.

Definition at line 147 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::normalize_all (  )  const [inline]

Normalize both implicit and parametric representations.

Definition at line 213 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::normalize_implicit (  )  const [inline]

Normalize the implicit representation.

This is based on the implicit representation itself (if it's valid) or/and on the parametric representation.

Definition at line 203 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::normalize_parametric (  )  const [inline]

Normalize the parametric representation.

This is based on the parametric representation itself (if it's valid) or/and on the parametric representation.

Definition at line 209 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::set_normal_all (  )  [inline]

Set the normal both implicit and parametric flags without an actual normal test or normalization.

Be careful! If you have set normal flags for both implicit and parametric representations but one of them or both aren't normal or they don't represent the same polyhedron base cone, the future behaviour is undefined.

Definition at line 265 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::set_normal_implicit (  )  [inline]

Set the normal implicit flag without an actual normal test or normalization.

Be careful! If you have set normal flags for both implicit and parametric representations but one of them or both aren't normal or they don't represent the same polyhedron base cone, the future behaviour is undefined.

Definition at line 251 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::set_normal_parametric (  )  [inline]

Set the normal parametric flag without an actual normal test or normalization.

Be careful! If you have set normal flags for both implicit and parametric representations but one of them or both aren't normal or they don't represent the same polyhedron base cone, the future behaviour is undefined.

Definition at line 258 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::set_valid_all (  )  [inline]

Set the valid both implicit and parametric flags without an actual valid test or validation.

Be careful! If you have set valid flags for both implicit and parametric representations but they don't represent the same polyhedron base cone, the future behaviour is undefined.

Definition at line 244 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::set_valid_implicit (  )  [inline]

Set the valid implicit flag without an actual valid test or validation.

Be careful! If you have set valid flags for both implicit and parametric representations but they don't represent the same polyhedron base cone, the future behaviour is undefined.

Definition at line 230 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::set_valid_parametric (  )  [inline]

Set the valid parametric flag without an actual valid test or validation.

Be careful! If you have set valid flags for both implicit and parametric representations but they don't represent the same polyhedron base cone, the future behaviour is undefined.

Definition at line 237 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
sideset Arageli::polyhedron< T, M, C, CFG >::sides (  )  const

WARNING! TEMPORARY IMPLEMENTATION! ONLY FACETS AND ONLY FOR BODILY POLYTOPE.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
std::size_t Arageli::polyhedron< T, M, C, CFG >::space_dim (  )  const [inline]

Definition at line 304 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::validate_all (  )  const [inline]

Make invalid representation valid.

Definition at line 197 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::validate_implicit (  )  const [inline]

Make the implicit representation valid.

This is based on the parametric representation. Actual validation is performed only if is_implicit_valid() == false.

Definition at line 187 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
void Arageli::polyhedron< T, M, C, CFG >::validate_parametric (  )  const [inline]

Make the parametric representation valid.

This is based on the implicit representation. Actual validation is performed only if is_parametric_valid() == false.

Definition at line 193 of file polyhedron.hpp.

template<typename T = big_int, typename M = matrix<big_int>, typename C = cone<T, M>, typename CFG = polyhedron_default_config<T, M, C>>
template<typename M1>
M1 Arageli::polyhedron< T, M, C, CFG >::vertices (  )  const [inline]

Definition at line 273 of file polyhedron.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Aug 31 17:38:26 2006 for Arageli by  doxygen 1.4.7