Arageli::cone< T, M, CFG > Class Template Reference

The polyhedral cone representation as a set of facets or a set of generators. More...

#include <cone.hpp>

List of all members.

Public Types

Standard type definition.
typedef T inequation_element_type
typedef T equation_element_type
typedef T generatrix_element_type
typedef T basis_element_type
typedef M inequation_type
typedef M equation_type
typedef M generatrix_type
typedef M basis_type
typedef M::difference_type dim_type
typedef M::difference_type difference_type
typedef M::size_type size_type

Public Member Functions

void pack ()
 Free all temporary storages and the one of the representations.
void keep_only_implicit ()
 Validate the implicit representation and free parametric.
void keep_only_parametric ()
 Validate the parametric representation and free implicit.
void assign_null ()
matrix< bool > relation () const
 Relation matrix without information about basis and equation.
Constructors.
 cone ()
 Creates cone in 0-space (only one point --- zero).
template<typename D>
 cone (const D &dim, const fromnull_t &)
 Creates cone as one point (zero) in the space with specified dimention.
template<typename D>
 cone (const D &dim, const fromspace_t &)
 Creates cone as all space with specified dimention.
template<typename M1>
 cone (const M1 &ineqmat, const fromineq_t &)
 Creates cone as a solution of specified inequations set.
template<typename M1>
 cone (const M1 &eqmat, const fromeq_t &)
 Creates cone as a solution of specified equations set.
template<typename M1>
 cone (const M1 &genmat, const fromgen_t &)
 Creates cone as a cone hull of specified generatrix set.
template<typename M1>
 cone (const M1 &basismat, const frombasis_t &)
 Creates cone as a subspace with specified basis.
template<typename Cone1>
 cone (const Cone1 &c, const fromdual_t &)
 Creates cone as a dual to given cone.
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.
Several properties of a cone.
bool is_pointed () const
 True iff cone is pointed.
bool is_subspace () const
 True iff cone is proper subspace (including 0-subspace) or whole space.
bool is_space () const
 True iff cone is whole space.
bool is_null () const
 True iff cone has only one point --- zero.
bool is_point () const
 True iff cone has only one point. The same as is_null.
dim_type space_dim () const
 Space dimention.
dim_type dim () const
 Cone dimention.
bool is_bodily () const
 True iff cone is a bodily, i.e. when its dimention is equal to the space dimention.
bool is_simplicial () const
 True iff cone is a simplicial cone, i.e. when the minimal system of generatrices is a square non singular matrix.
The cone and a point positional relationship.
template<typename V1>
bool strict_inside (const V1 &x) const
template<typename V1>
bool strict_outside (const V1 &x) const
template<typename V1>
bool unstrict_inside (const V1 &x) const
template<typename V1>
bool unstrict_outside (const V1 &x) const
Several representations of cone and related representations.
inequation_type inequation () const
 Returns set of inequations that completely defines the cone.
const equation_typeequation () const
 Try to represent cone as a subspace. Returns equation matrix.
generatrix_type generatrix () const
 Returns set of generatrices that completely defines the cone.
const basis_typebasis () const
 Try to represent cone as a subspace. Returns basis.
const equation_typemin_ambient_equation () const
basis_type min_ambient_basis () const
equation_type max_embedded_equation () const
const basis_typemax_embedded_basis () const
inequation_type min_inequation () const
 Returns a minimal set of inequations that completely defines the cone.
generatrix_type min_generatrix () const
 Returns a minimal set of generatrices that completely defines the cone.
Direct access to the representation matrices.
const inequation_typeinequation_matrix () const
inequation_typeinequation_matrix ()
const equation_typeequation_matrix () const
equation_typeequation_matrix ()
const generatrix_typegeneratrix_matrix () const
generatrix_typegeneratrix_matrix ()
const basis_typebasis_matrix () const
basis_typebasis_matrix ()
Intersection and conic union.
template<typename Cone1>
coneintersection (const Cone1 &x)
template<typename Cone1>
coneconic_union (const Cone1 &x)

Friends

template<typename Out, typename T2, typename M2, typename CFG2>
void output_list (Out &out, const cone< T2, M2, CFG2 > &x)


Detailed Description

template<typename T, typename M, typename CFG>
class Arageli::cone< T, M, CFG >

The polyhedral cone representation as a set of facets or a set of generators.

This class represents cone as a four matrices. Two matrices for facet representation: the left matrix of a homogeneous system of inequations and left matrix for homogeneous system of equations. Other two matrices for parametric representations: vectors involved to cone hull (generatrix) and a basis of subspace.

Note only one of those pairs matrices is necessary for full representation of a cone, but another pair builds on-the-fly when it is need for a particular operation. So we have four matrices inequation_matrix, equation_matrix, generatrix_matrix, basis_matrix and two way to represent a cone:

Template parameters. T is a type to represent element of matrices and vectors in given vector space. M is a type for each of those matrices.

Definition at line 109 of file cone.hpp.


Member Typedef Documentation

template<typename T, typename M, typename CFG>
typedef T Arageli::cone< T, M, CFG >::basis_element_type

Definition at line 121 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M Arageli::cone< T, M, CFG >::basis_type

Definition at line 126 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M::difference_type Arageli::cone< T, M, CFG >::difference_type

Definition at line 129 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M::difference_type Arageli::cone< T, M, CFG >::dim_type

Definition at line 128 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef T Arageli::cone< T, M, CFG >::equation_element_type

Definition at line 119 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M Arageli::cone< T, M, CFG >::equation_type

Definition at line 124 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef T Arageli::cone< T, M, CFG >::generatrix_element_type

Definition at line 120 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M Arageli::cone< T, M, CFG >::generatrix_type

Definition at line 125 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef T Arageli::cone< T, M, CFG >::inequation_element_type

Definition at line 118 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M Arageli::cone< T, M, CFG >::inequation_type

Definition at line 123 of file cone.hpp.

template<typename T, typename M, typename CFG>
typedef M::size_type Arageli::cone< T, M, CFG >::size_type

Definition at line 130 of file cone.hpp.


Constructor & Destructor Documentation

template<typename T, typename M, typename CFG>
Arageli::cone< T, M, CFG >::cone (  )  [inline]

Creates cone in 0-space (only one point --- zero).

All matrices are zero-by-zero matrices. After creating all representations are valid.

Definition at line 144 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename D>
Arageli::cone< T, M, CFG >::cone ( const D &  dim,
const fromnull_t  
) [inline]

Creates cone as one point (zero) in the space with specified dimention.

After creating the parametric representation is valid and normal. If dim == 0, the implicit representation is valid and normal too.

Definition at line 151 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename D>
Arageli::cone< T, M, CFG >::cone ( const D &  dim,
const fromspace_t  
) [inline]

Creates cone as all space with specified dimention.

After creating the implicit representation is valid and normal. If dim == 0, the parametric representation is valid and normal too.

Definition at line 162 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename M1>
Arageli::cone< T, M, CFG >::cone ( const M1 &  ineqmat,
const fromineq_t  
) [inline]

Creates cone as a solution of specified inequations set.

After creating only implicit representation is valid but not necessarily normal.

Definition at line 173 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename M1>
Arageli::cone< T, M, CFG >::cone ( const M1 &  eqmat,
const fromeq_t  
) [inline]

Creates cone as a solution of specified equations set.

After creating only implicit representation is valid but not necessarily normal.

Definition at line 184 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename M1>
Arageli::cone< T, M, CFG >::cone ( const M1 &  genmat,
const fromgen_t  
) [inline]

Creates cone as a cone hull of specified generatrix set.

After creating only parametric representation is valid but not necessarily normal.

Definition at line 195 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename M1>
Arageli::cone< T, M, CFG >::cone ( const M1 &  basismat,
const frombasis_t  
) [inline]

Creates cone as a subspace with specified basis.

After creating only parametric representation is valid but not necessarily normal.

Definition at line 206 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename Cone1>
Arageli::cone< T, M, CFG >::cone ( const Cone1 &  c,
const fromdual_t  
)

Creates cone as a dual to given cone.

A dual cone is a cone with swapped implicit and parametric representations.


Member Function Documentation

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, CFG >::assign_null (  ) 

template<typename T, typename M, typename CFG>
const basis_type& Arageli::cone< T, M, CFG >::basis (  )  const

Try to represent cone as a subspace. Returns basis.

If this cone isn't actually subspace, cannot_represent_cone exception is being generated.

template<typename T, typename M, typename CFG>
basis_type& Arageli::cone< T, M, CFG >::basis_matrix (  )  [inline]

Definition at line 578 of file cone.hpp.

template<typename T, typename M, typename CFG>
const basis_type& Arageli::cone< T, M, CFG >::basis_matrix (  )  const [inline]

Definition at line 575 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename Cone1>
cone& Arageli::cone< T, M, CFG >::conic_union ( const Cone1 &  x  ) 

template<typename T, typename M, typename CFG>
dim_type Arageli::cone< T, M, CFG >::dim (  )  const

Cone dimention.

template<typename T, typename M, typename CFG>
const equation_type& Arageli::cone< T, M, CFG >::equation (  )  const

Try to represent cone as a subspace. Returns equation matrix.

If this cone isn't actually subspase, cannot_represent_cone exception is being generated.

template<typename T, typename M, typename CFG>
equation_type& Arageli::cone< T, M, CFG >::equation_matrix (  )  [inline]

Definition at line 560 of file cone.hpp.

template<typename T, typename M, typename CFG>
const equation_type& Arageli::cone< T, M, CFG >::equation_matrix (  )  const [inline]

Definition at line 557 of file cone.hpp.

template<typename T, typename M, typename CFG>
generatrix_type Arageli::cone< T, M, CFG >::generatrix (  )  const

Returns set of generatrices that completely defines the cone.

The returned system can be not a minimal system. To obtain a minimal system of generatrix use min_generatrix.

template<typename T, typename M, typename CFG>
generatrix_type& Arageli::cone< T, M, CFG >::generatrix_matrix (  )  [inline]

Definition at line 569 of file cone.hpp.

template<typename T, typename M, typename CFG>
const generatrix_type& Arageli::cone< T, M, CFG >::generatrix_matrix (  )  const [inline]

Definition at line 566 of file cone.hpp.

template<typename T, typename M, typename CFG>
inequation_type Arageli::cone< T, M, CFG >::inequation (  )  const

Returns set of inequations that completely defines the cone.

The returned system can be not a minimal system. To obtain a minimal system of inequations use min_inequation.

template<typename T, typename M, typename CFG>
inequation_type& Arageli::cone< T, M, CFG >::inequation_matrix (  )  [inline]

Definition at line 551 of file cone.hpp.

template<typename T, typename M, typename CFG>
const inequation_type& Arageli::cone< T, M, CFG >::inequation_matrix (  )  const [inline]

Definition at line 548 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename Cone1>
cone& Arageli::cone< T, M, CFG >::intersection ( const Cone1 &  x  ) 

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_all_normal (  )  const [inline]

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

Definition at line 276 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_all_valid (  )  const [inline]

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

Definition at line 244 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_bodily (  )  const [inline]

True iff cone is a bodily, i.e. when its dimention is equal to the space dimention.

Definition at line 446 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, 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 subspace (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 256 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_implicit_valid (  )  const [inline]

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

Definition at line 230 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_null (  )  const

True iff cone has only one point --- zero.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, 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 subspace (if any) represented only as its basis and there are no negligible generatrix. Note, this form is not a single form.

Definition at line 268 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_parametric_valid (  )  const [inline]

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

Definition at line 237 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_point (  )  const [inline]

True iff cone has only one point. The same as is_null.

Definition at line 437 of file cone.hpp.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_pointed (  )  const

True iff cone is pointed.

Note, cone in 0-space is always pointed.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_simplicial (  )  const

True iff cone is a simplicial cone, i.e. when the minimal system of generatrices is a square non singular matrix.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_space (  )  const

True iff cone is whole space.

template<typename T, typename M, typename CFG>
bool Arageli::cone< T, M, CFG >::is_subspace (  )  const

True iff cone is proper subspace (including 0-subspace) or whole space.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, CFG >::keep_only_implicit (  ) 

Validate the implicit representation and free parametric.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, CFG >::keep_only_parametric (  ) 

Validate the parametric representation and free implicit.

template<typename T, typename M, typename CFG>
const basis_type& Arageli::cone< T, M, CFG >::max_embedded_basis (  )  const

template<typename T, typename M, typename CFG>
equation_type Arageli::cone< T, M, CFG >::max_embedded_equation (  )  const

template<typename T, typename M, typename CFG>
basis_type Arageli::cone< T, M, CFG >::min_ambient_basis (  )  const

template<typename T, typename M, typename CFG>
const equation_type& Arageli::cone< T, M, CFG >::min_ambient_equation (  )  const

template<typename T, typename M, typename CFG>
generatrix_type Arageli::cone< T, M, CFG >::min_generatrix (  )  const

Returns a minimal set of generatrices that completely defines the cone.

template<typename T, typename M, typename CFG>
inequation_type Arageli::cone< T, M, CFG >::min_inequation (  )  const

Returns a minimal set of inequations that completely defines the cone.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, CFG >::normalize_all (  )  const [inline]

Normalize both implicit and parametric representations.

Definition at line 338 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 322 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 331 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, CFG >::pack (  ) 

Free all temporary storages and the one of the representations.

template<typename T, typename M, typename CFG>
matrix<bool> Arageli::cone< T, M, CFG >::relation (  )  const [inline]

Relation matrix without information about basis and equation.

Definition at line 599 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 cone, the future behaviour is undefined.

Definition at line 408 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 cone, the future behaviour is undefined.

Definition at line 388 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 cone, the future behaviour is undefined.

Definition at line 398 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 cone, the future behaviour is undefined.

Definition at line 378 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 cone, the future behaviour is undefined.

Definition at line 358 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 cone, the future behaviour is undefined.

Definition at line 368 of file cone.hpp.

template<typename T, typename M, typename CFG>
dim_type Arageli::cone< T, M, CFG >::space_dim (  )  const

Space dimention.

template<typename T, typename M, typename CFG>
template<typename V1>
bool Arageli::cone< T, M, CFG >::strict_inside ( const V1 &  x  )  const [inline]

Definition at line 461 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename V1>
bool Arageli::cone< T, M, CFG >::strict_outside ( const V1 &  x  )  const [inline]

Definition at line 470 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename V1>
bool Arageli::cone< T, M, CFG >::unstrict_inside ( const V1 &  x  )  const [inline]

Definition at line 479 of file cone.hpp.

template<typename T, typename M, typename CFG>
template<typename V1>
bool Arageli::cone< T, M, CFG >::unstrict_outside ( const V1 &  x  )  const [inline]

Definition at line 488 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, CFG >::validate_all (  )  const [inline]

Make invalid representation valid.

Definition at line 311 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 295 of file cone.hpp.

template<typename T, typename M, typename CFG>
void Arageli::cone< T, M, 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 304 of file cone.hpp.


Friends And Related Function Documentation

template<typename T, typename M, typename CFG>
template<typename Out, typename T2, typename M2, typename CFG2>
void output_list ( Out &  out,
const cone< T2, M2, CFG2 > &  x 
) [friend]


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