#include <cone.hpp>
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_type & | equation () 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_type & | basis () const |
Try to represent cone as a subspace. Returns basis. | |
const equation_type & | min_ambient_equation () const |
basis_type | min_ambient_basis () const |
equation_type | max_embedded_equation () const |
const basis_type & | max_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_type & | inequation_matrix () const |
inequation_type & | inequation_matrix () |
const equation_type & | equation_matrix () const |
equation_type & | equation_matrix () |
const generatrix_type & | generatrix_matrix () const |
generatrix_type & | generatrix_matrix () |
const basis_type & | basis_matrix () const |
basis_type & | basis_matrix () |
Intersection and conic union. | |
template<typename Cone1> | |
cone & | intersection (const Cone1 &x) |
template<typename Cone1> | |
cone & | conic_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) |
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.
typedef T Arageli::cone< T, M, CFG >::basis_element_type |
typedef M Arageli::cone< T, M, CFG >::basis_type |
typedef M::difference_type Arageli::cone< T, M, CFG >::difference_type |
typedef M::difference_type Arageli::cone< T, M, CFG >::dim_type |
typedef T Arageli::cone< T, M, CFG >::equation_element_type |
typedef M Arageli::cone< T, M, CFG >::equation_type |
typedef T Arageli::cone< T, M, CFG >::generatrix_element_type |
typedef M Arageli::cone< T, M, CFG >::generatrix_type |
typedef T Arageli::cone< T, M, CFG >::inequation_element_type |
typedef M Arageli::cone< T, M, CFG >::inequation_type |
typedef M::size_type Arageli::cone< T, M, CFG >::size_type |
Arageli::cone< T, M, CFG >::cone | ( | ) | [inline] |
Arageli::cone< T, M, CFG >::cone | ( | const D & | dim, | |
const fromnull_t & | ||||
) | [inline] |
Arageli::cone< T, M, CFG >::cone | ( | const D & | dim, | |
const fromspace_t & | ||||
) | [inline] |
Arageli::cone< T, M, CFG >::cone | ( | const M1 & | ineqmat, | |
const fromineq_t & | ||||
) | [inline] |
Arageli::cone< T, M, CFG >::cone | ( | const M1 & | eqmat, | |
const fromeq_t & | ||||
) | [inline] |
Arageli::cone< T, M, CFG >::cone | ( | const M1 & | genmat, | |
const fromgen_t & | ||||
) | [inline] |
Arageli::cone< T, M, CFG >::cone | ( | const M1 & | basismat, | |
const frombasis_t & | ||||
) | [inline] |
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.
void Arageli::cone< T, M, CFG >::assign_null | ( | ) |
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.
basis_type& Arageli::cone< T, M, CFG >::basis_matrix | ( | ) | [inline] |
const basis_type& Arageli::cone< T, M, CFG >::basis_matrix | ( | ) | const [inline] |
cone& Arageli::cone< T, M, CFG >::conic_union | ( | const Cone1 & | x | ) |
dim_type Arageli::cone< T, M, CFG >::dim | ( | ) | const |
Cone dimention.
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.
equation_type& Arageli::cone< T, M, CFG >::equation_matrix | ( | ) | [inline] |
const equation_type& Arageli::cone< T, M, CFG >::equation_matrix | ( | ) | const [inline] |
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.
generatrix_type& Arageli::cone< T, M, CFG >::generatrix_matrix | ( | ) | [inline] |
const generatrix_type& Arageli::cone< T, M, CFG >::generatrix_matrix | ( | ) | const [inline] |
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.
inequation_type& Arageli::cone< T, M, CFG >::inequation_matrix | ( | ) | [inline] |
const inequation_type& Arageli::cone< T, M, CFG >::inequation_matrix | ( | ) | const [inline] |
cone& Arageli::cone< T, M, CFG >::intersection | ( | const Cone1 & | x | ) |
bool Arageli::cone< T, M, CFG >::is_all_normal | ( | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::is_all_valid | ( | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::is_bodily | ( | ) | const [inline] |
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.
bool Arageli::cone< T, M, CFG >::is_implicit_valid | ( | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::is_null | ( | ) | const |
True iff cone has only one point --- zero.
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.
bool Arageli::cone< T, M, CFG >::is_parametric_valid | ( | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::is_point | ( | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::is_pointed | ( | ) | const |
True iff cone is pointed.
Note, cone in 0-space is always pointed.
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.
bool Arageli::cone< T, M, CFG >::is_space | ( | ) | const |
True iff cone is whole space.
bool Arageli::cone< T, M, CFG >::is_subspace | ( | ) | const |
True iff cone is proper subspace (including 0-subspace) or whole space.
void Arageli::cone< T, M, CFG >::keep_only_implicit | ( | ) |
Validate the implicit representation and free parametric.
void Arageli::cone< T, M, CFG >::keep_only_parametric | ( | ) |
Validate the parametric representation and free implicit.
const basis_type& Arageli::cone< T, M, CFG >::max_embedded_basis | ( | ) | const |
equation_type Arageli::cone< T, M, CFG >::max_embedded_equation | ( | ) | const |
basis_type Arageli::cone< T, M, CFG >::min_ambient_basis | ( | ) | const |
const equation_type& Arageli::cone< T, M, CFG >::min_ambient_equation | ( | ) | const |
generatrix_type Arageli::cone< T, M, CFG >::min_generatrix | ( | ) | const |
Returns a minimal set of generatrices that completely defines the cone.
inequation_type Arageli::cone< T, M, CFG >::min_inequation | ( | ) | const |
Returns a minimal set of inequations that completely defines the cone.
void Arageli::cone< T, M, CFG >::normalize_all | ( | ) | const [inline] |
void Arageli::cone< T, M, CFG >::normalize_implicit | ( | ) | const [inline] |
void Arageli::cone< T, M, CFG >::normalize_parametric | ( | ) | const [inline] |
void Arageli::cone< T, M, CFG >::pack | ( | ) |
Free all temporary storages and the one of the representations.
matrix<bool> Arageli::cone< T, M, CFG >::relation | ( | ) | const [inline] |
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.
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.
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.
void Arageli::cone< T, M, CFG >::set_valid_all | ( | ) | [inline] |
void Arageli::cone< T, M, CFG >::set_valid_implicit | ( | ) | [inline] |
void Arageli::cone< T, M, CFG >::set_valid_parametric | ( | ) | [inline] |
dim_type Arageli::cone< T, M, CFG >::space_dim | ( | ) | const |
Space dimention.
bool Arageli::cone< T, M, CFG >::strict_inside | ( | const V1 & | x | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::strict_outside | ( | const V1 & | x | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::unstrict_inside | ( | const V1 & | x | ) | const [inline] |
bool Arageli::cone< T, M, CFG >::unstrict_outside | ( | const V1 & | x | ) | const [inline] |
void Arageli::cone< T, M, CFG >::validate_all | ( | ) | const [inline] |
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.
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.
void output_list | ( | Out & | out, | |
const cone< T2, M2, CFG2 > & | x | |||
) | [friend] |